@revisium/admin 1.7.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var $re=Object.defineProperty;var Are=(t,e,r)=>e in t?$re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Mre=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var
|
|
1
|
+
var $re=Object.defineProperty;var Are=(t,e,r)=>e in t?$re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Mre=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var fe=(t,e,r)=>Are(t,typeof e!="symbol"?e+"":e,r);var n7e=Mre((S7e,ib)=>{function yx(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var uD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function c$(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var $C={exports:{}},hm={},AC={exports:{}},Zt={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -34,10 +34,10 @@ var $re=Object.defineProperty;var Are=(t,e,r)=>e in t?$re(t,e,{enumerable:!0,con
|
|
|
34
34
|
`+N+u}var J=!1;function Q(u,f){if(!u||J)return"";J=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(be){var x=be}Reflect.construct(u,[],f)}else{try{f.call()}catch(be){x=be}u.call(f.prototype)}else{try{throw Error()}catch(be){x=be}u()}}catch(be){if(be&&x&&typeof be.stack=="string"){for(var R=be.stack.split(`
|
|
35
35
|
`),I=x.stack.split(`
|
|
36
36
|
`),L=R.length-1,K=I.length-1;1<=L&&0<=K&&R[L]!==I[K];)K--;for(;1<=L&&0<=K;L--,K--)if(R[L]!==I[K]){if(L!==1||K!==1)do if(L--,K--,0>K||R[L]!==I[K]){var ae=`
|
|
37
|
-
`+R[L].replace(" at new "," at ");return u.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",u.displayName)),ae}while(1<=L&&0<=K);break}}}finally{J=!1,Error.prepareStackTrace=v}return(u=u?u.displayName||u.name:"")?U(u):""}function q(u){switch(u.tag){case 5:return U(u.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return u=Q(u.type,!1),u;case 11:return u=Q(u.type.render,!1),u;case 1:return u=Q(u.type,!0),u;default:return""}}function oe(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case _:return"Fragment";case E:return"Portal";case M:return"Profiler";case $:return"StrictMode";case X:return"Suspense";case D:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case B:return(u.displayName||"Context")+".Consumer";case j:return(u._context.displayName||"Context")+".Provider";case V:var f=u.render;return u=u.displayName,u||(u=f.displayName||f.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case F:return f=u.displayName||null,f!==null?f:oe(u.type)||"Memo";case Y:f=u._payload,u=u._init;try{return oe(u(f))}catch{}}return null}function Oe(u){var f=u.type;switch(u.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=f.render,u=u.displayName||u.name||"",f.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oe(f);case 8:return 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 f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function Z(u){switch(typeof u){case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function le(u){var f=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(f==="checkbox"||f==="radio")}function Pe(u){var f=le(u)?"checked":"value",v=Object.getOwnPropertyDescriptor(u.constructor.prototype,f),x=""+u[f];if(!u.hasOwnProperty(f)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var R=v.get,I=v.set;return Object.defineProperty(u,f,{configurable:!0,get:function(){return R.call(this)},set:function(L){x=""+L,I.call(this,L)}}),Object.defineProperty(u,f,{enumerable:v.enumerable}),{getValue:function(){return x},setValue:function(L){x=""+L},stopTracking:function(){u._valueTracker=null,delete u[f]}}}}function ee(u){u._valueTracker||(u._valueTracker=Pe(u))}function re(u){if(!u)return!1;var f=u._valueTracker;if(!f)return!0;var v=f.getValue(),x="";return u&&(x=le(u)?u.checked?"true":"false":u.value),u=x,u!==v?(f.setValue(u),!0):!1}function ye(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}function ke(u,f){var v=f.checked;return z({},f,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:v??u._wrapperState.initialChecked})}function Me(u,f){var v=f.defaultValue==null?"":f.defaultValue,x=f.checked!=null?f.checked:f.defaultChecked;v=Z(f.value!=null?f.value:v),u._wrapperState={initialChecked:x,initialValue:v,controlled:f.type==="checkbox"||f.type==="radio"?f.checked!=null:f.value!=null}}function De(u,f){f=f.checked,f!=null&&k(u,"checked",f,!1)}function Vt(u,f){De(u,f);var v=Z(f.value),x=f.type;if(v!=null)x==="number"?(v===0&&u.value===""||u.value!=v)&&(u.value=""+v):u.value!==""+v&&(u.value=""+v);else if(x==="submit"||x==="reset"){u.removeAttribute("value");return}f.hasOwnProperty("value")?yr(u,f.type,v):f.hasOwnProperty("defaultValue")&&yr(u,f.type,Z(f.defaultValue)),f.checked==null&&f.defaultChecked!=null&&(u.defaultChecked=!!f.defaultChecked)}function vr(u,f,v){if(f.hasOwnProperty("value")||f.hasOwnProperty("defaultValue")){var x=f.type;if(!(x!=="submit"&&x!=="reset"||f.value!==void 0&&f.value!==null))return;f=""+u._wrapperState.initialValue,v||f===u.value||(u.value=f),u.defaultValue=f}v=u.name,v!==""&&(u.name=""),u.defaultChecked=!!u._wrapperState.initialChecked,v!==""&&(u.name=v)}function yr(u,f,v){(f!=="number"||ye(u.ownerDocument)!==u)&&(v==null?u.defaultValue=""+u._wrapperState.initialValue:u.defaultValue!==""+v&&(u.defaultValue=""+v))}var ur=Array.isArray;function or(u,f,v,x){if(u=u.options,f){f={};for(var R=0;R<v.length;R++)f["$"+v[R]]=!0;for(v=0;v<u.length;v++)R=f.hasOwnProperty("$"+u[v].value),u[v].selected!==R&&(u[v].selected=R),R&&x&&(u[v].defaultSelected=!0)}else{for(v=""+Z(v),f=null,R=0;R<u.length;R++){if(u[R].value===v){u[R].selected=!0,x&&(u[R].defaultSelected=!0);return}f!==null||u[R].disabled||(f=u[R])}f!==null&&(f.selected=!0)}}function Rr(u,f){if(f.dangerouslySetInnerHTML!=null)throw Error(r(91));return z({},f,{value:void 0,defaultValue:void 0,children:""+u._wrapperState.initialValue})}function zt(u,f){var v=f.value;if(v==null){if(v=f.children,f=f.defaultValue,v!=null){if(f!=null)throw Error(r(92));if(ur(v)){if(1<v.length)throw Error(r(93));v=v[0]}f=v}f==null&&(f=""),v=f}u._wrapperState={initialValue:Z(v)}}function Tn(u,f){var v=Z(f.value),x=Z(f.defaultValue);v!=null&&(v=""+v,v!==u.value&&(u.value=v),f.defaultValue==null&&u.defaultValue!==v&&(u.defaultValue=v)),x!=null&&(u.defaultValue=""+x)}function zn(u){var f=u.textContent;f===u._wrapperState.initialValue&&f!==""&&f!==null&&(u.value=f)}function $n(u){switch(u){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pi(u,f){return u==null||u==="http://www.w3.org/1999/xhtml"?$n(f):u==="http://www.w3.org/2000/svg"&&f==="foreignObject"?"http://www.w3.org/1999/xhtml":u}var io,En=function(u){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(f,v,x,R){MSApp.execUnsafeLocalFunction(function(){return u(f,v,x,R)})}:u}(function(u,f){if(u.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in u)u.innerHTML=f;else{for(io=io||document.createElement("div"),io.innerHTML="<svg>"+f.valueOf().toString()+"</svg>",f=io.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;f.firstChild;)u.appendChild(f.firstChild)}});function Ii(u,f){if(f){var v=u.firstChild;if(v&&v===u.lastChild&&v.nodeType===3){v.nodeValue=f;return}}u.textContent=f}var qn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Rl=["Webkit","ms","Moz","O"];Object.keys(qn).forEach(function(u){Rl.forEach(function(f){f=f+u.charAt(0).toUpperCase()+u.substring(1),qn[f]=qn[u]})});function Ja(u,f,v){return f==null||typeof f=="boolean"||f===""?"":v||typeof f!="number"||f===0||qn.hasOwnProperty(u)&&qn[u]?(""+f).trim():f+"px"}function Ic(u,f){u=u.style;for(var v in f)if(f.hasOwnProperty(v)){var x=v.indexOf("--")===0,R=Ja(v,f[v],x);v==="float"&&(v="cssFloat"),x?u.setProperty(v,R):u[v]=R}}var Mg=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Il(u,f){if(f){if(Mg[u]&&(f.children!=null||f.dangerouslySetInnerHTML!=null))throw Error(r(137,u));if(f.dangerouslySetInnerHTML!=null){if(f.children!=null)throw Error(r(60));if(typeof f.dangerouslySetInnerHTML!="object"||!("__html"in f.dangerouslySetInnerHTML))throw Error(r(61))}if(f.style!=null&&typeof f.style!="object")throw Error(r(62))}}function ni(u,f){if(u.indexOf("-")===-1)return typeof f.is=="string";switch(u){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $c=null;function $l(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var cd=null,es=null,$s=null;function ud(u){if(u=Kg(u)){if(typeof cd!="function")throw Error(r(280));var f=u.stateNode;f&&(f=g0(f),cd(u.stateNode,u.type,f))}}function ts(u){es?$s?$s.push(u):$s=[u]:es=u}function ue(){if(es){var u=es,f=$s;if($s=es=null,ud(u),f)for(u=0;u<f.length;u++)ud(f[u])}}function ve(u,f){return u(f)}function we(){}var $e=!1;function We(u,f,v){if($e)return u(f,v);$e=!0;try{return ve(u,f,v)}finally{$e=!1,(es!==null||$s!==null)&&(we(),ue())}}function wt(u,f){var v=u.stateNode;if(v===null)return null;var x=g0(v);if(x===null)return null;v=x[f];e:switch(f){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(x=!x.disabled)||(u=u.type,x=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!x;break e;default:u=!1}if(u)return null;if(v&&typeof v!="function")throw Error(r(231,f,typeof v));return v}var at=!1;if(s)try{var Ue={};Object.defineProperty(Ue,"passive",{get:function(){at=!0}}),window.addEventListener("test",Ue,Ue),window.removeEventListener("test",Ue,Ue)}catch{at=!1}function Ct(u,f,v,x,R,I,L,K,ae){var be=Array.prototype.slice.call(arguments,3);try{f.apply(v,be)}catch(_e){this.onError(_e)}}var G=!1,W=null,te=!1,ce=null,fe={onError:function(u){G=!0,W=u}};function qe(u,f,v,x,R,I,L,K,ae){G=!1,W=null,Ct.apply(fe,arguments)}function tt(u,f,v,x,R,I,L,K,ae){if(qe.apply(this,arguments),G){if(G){var be=W;G=!1,W=null}else throw Error(r(198));te||(te=!0,ce=be)}}function Ot(u){var f=u,v=u;if(u.alternate)for(;f.return;)f=f.return;else{u=f;do f=u,(f.flags&4098)!==0&&(v=f.return),u=f.return;while(u)}return f.tag===3?v:null}function ir(u){if(u.tag===13){var f=u.memoizedState;if(f===null&&(u=u.alternate,u!==null&&(f=u.memoizedState)),f!==null)return f.dehydrated}return null}function br(u){if(Ot(u)!==u)throw Error(r(188))}function It(u){var f=u.alternate;if(!f){if(f=Ot(u),f===null)throw Error(r(188));return f!==u?null:u}for(var v=u,x=f;;){var R=v.return;if(R===null)break;var I=R.alternate;if(I===null){if(x=R.return,x!==null){v=x;continue}break}if(R.child===I.child){for(I=R.child;I;){if(I===v)return br(R),u;if(I===x)return br(R),f;I=I.sibling}throw Error(r(188))}if(v.return!==x.return)v=R,x=I;else{for(var L=!1,K=R.child;K;){if(K===v){L=!0,v=R,x=I;break}if(K===x){L=!0,x=R,v=I;break}K=K.sibling}if(!L){for(K=I.child;K;){if(K===v){L=!0,v=I,x=R;break}if(K===x){L=!0,x=I,v=R;break}K=K.sibling}if(!L)throw Error(r(189))}}if(v.alternate!==x)throw Error(r(190))}if(v.tag!==3)throw Error(r(188));return v.stateNode.current===v?u:f}function qt(u){return u=It(u),u!==null?Ir(u):null}function Ir(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var f=Ir(u);if(f!==null)return f;u=u.sibling}return null}var vt=e.unstable_scheduleCallback,pr=e.unstable_cancelCallback,ct=e.unstable_shouldYield,Qt=e.unstable_requestPaint,Dt=e.unstable_now,xr=e.unstable_getCurrentPriorityLevel,Wn=e.unstable_ImmediatePriority,wa=e.unstable_UserBlockingPriority,mo=e.unstable_NormalPriority,vo=e.unstable_LowPriority,Ho=e.unstable_IdlePriority,Sa=null,Un=null;function dd(u){if(Un&&typeof Un.onCommitFiberRoot=="function")try{Un.onCommitFiberRoot(Sa,u,void 0,(u.current.flags&128)===128)}catch{}}var yo=Math.clz32?Math.clz32:Uf,Jb=Math.log,Wf=Math.LN2;function Uf(u){return u>>>=0,u===0?32:31-(Jb(u)/Wf|0)|0}var Al=64,fd=4194304;function Ac(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function As(u,f){var v=u.pendingLanes;if(v===0)return 0;var x=0,R=u.suspendedLanes,I=u.pingedLanes,L=v&268435455;if(L!==0){var K=L&~R;K!==0?x=Ac(K):(I&=L,I!==0&&(x=Ac(I)))}else L=v&~R,L!==0?x=Ac(L):I!==0&&(x=Ac(I));if(x===0)return 0;if(f!==0&&f!==x&&(f&R)===0&&(R=x&-x,I=f&-f,R>=I||R===16&&(I&4194240)!==0))return f;if((x&4)!==0&&(x|=v&16),f=u.entangledLanes,f!==0)for(u=u.entanglements,f&=x;0<f;)v=31-yo(f),R=1<<v,x|=u[v],f&=~R;return x}function Yee(u,f){switch(u){case 1:case 2:case 4:return f+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Kee(u,f){for(var v=u.suspendedLanes,x=u.pingedLanes,R=u.expirationTimes,I=u.pendingLanes;0<I;){var L=31-yo(I),K=1<<L,ae=R[L];ae===-1?((K&v)===0||(K&x)!==0)&&(R[L]=Yee(K,f)):ae<=f&&(u.expiredLanes|=K),I&=~K}}function JP(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function FM(){var u=Al;return Al<<=1,(Al&4194240)===0&&(Al=64),u}function ek(u){for(var f=[],v=0;31>v;v++)f.push(u);return f}function Ng(u,f,v){u.pendingLanes|=f,f!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,f=31-yo(f),u[f]=v}function Jee(u,f){var v=u.pendingLanes&~f;u.pendingLanes=f,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=f,u.mutableReadLanes&=f,u.entangledLanes&=f,f=u.entanglements;var x=u.eventTimes;for(u=u.expirationTimes;0<v;){var R=31-yo(v),I=1<<R;f[R]=0,x[R]=-1,u[R]=-1,v&=~I}}function tk(u,f){var v=u.entangledLanes|=f;for(u=u.entanglements;v;){var x=31-yo(v),R=1<<x;R&f|u[x]&f&&(u[x]|=f),v&=~R}}var $r=0;function BM(u){return u&=-u,1<u?4<u?(u&268435455)!==0?16:536870912:4:1}var zM,rk,qM,WM,UM,nk=!1,e0=[],Mc=null,Nc=null,jc=null,jg=new Map,Dg=new Map,Dc=[],ete="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function HM(u,f){switch(u){case"focusin":case"focusout":Mc=null;break;case"dragenter":case"dragleave":Nc=null;break;case"mouseover":case"mouseout":jc=null;break;case"pointerover":case"pointerout":jg.delete(f.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dg.delete(f.pointerId)}}function Lg(u,f,v,x,R,I){return u===null||u.nativeEvent!==I?(u={blockedOn:f,domEventName:v,eventSystemFlags:x,nativeEvent:I,targetContainers:[R]},f!==null&&(f=Kg(f),f!==null&&rk(f)),u):(u.eventSystemFlags|=x,f=u.targetContainers,R!==null&&f.indexOf(R)===-1&&f.push(R),u)}function tte(u,f,v,x,R){switch(f){case"focusin":return Mc=Lg(Mc,u,f,v,x,R),!0;case"dragenter":return Nc=Lg(Nc,u,f,v,x,R),!0;case"mouseover":return jc=Lg(jc,u,f,v,x,R),!0;case"pointerover":var I=R.pointerId;return jg.set(I,Lg(jg.get(I)||null,u,f,v,x,R)),!0;case"gotpointercapture":return I=R.pointerId,Dg.set(I,Lg(Dg.get(I)||null,u,f,v,x,R)),!0}return!1}function XM(u){var f=hd(u.target);if(f!==null){var v=Ot(f);if(v!==null){if(f=v.tag,f===13){if(f=ir(v),f!==null){u.blockedOn=f,UM(u.priority,function(){qM(v)});return}}else if(f===3&&v.stateNode.current.memoizedState.isDehydrated){u.blockedOn=v.tag===3?v.stateNode.containerInfo:null;return}}}u.blockedOn=null}function t0(u){if(u.blockedOn!==null)return!1;for(var f=u.targetContainers;0<f.length;){var v=ok(u.domEventName,u.eventSystemFlags,f[0],u.nativeEvent);if(v===null){v=u.nativeEvent;var x=new v.constructor(v.type,v);$c=x,v.target.dispatchEvent(x),$c=null}else return f=Kg(v),f!==null&&rk(f),u.blockedOn=v,!1;f.shift()}return!0}function ZM(u,f,v){t0(u)&&v.delete(f)}function rte(){nk=!1,Mc!==null&&t0(Mc)&&(Mc=null),Nc!==null&&t0(Nc)&&(Nc=null),jc!==null&&t0(jc)&&(jc=null),jg.forEach(ZM),Dg.forEach(ZM)}function Qg(u,f){u.blockedOn===f&&(u.blockedOn=null,nk||(nk=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,rte)))}function Vg(u){function f(R){return Qg(R,u)}if(0<e0.length){Qg(e0[0],u);for(var v=1;v<e0.length;v++){var x=e0[v];x.blockedOn===u&&(x.blockedOn=null)}}for(Mc!==null&&Qg(Mc,u),Nc!==null&&Qg(Nc,u),jc!==null&&Qg(jc,u),jg.forEach(f),Dg.forEach(f),v=0;v<Dc.length;v++)x=Dc[v],x.blockedOn===u&&(x.blockedOn=null);for(;0<Dc.length&&(v=Dc[0],v.blockedOn===null);)XM(v),v.blockedOn===null&&Dc.shift()}var Hf=T.ReactCurrentBatchConfig,r0=!0;function nte(u,f,v,x){var R=$r,I=Hf.transition;Hf.transition=null;try{$r=1,ik(u,f,v,x)}finally{$r=R,Hf.transition=I}}function ite(u,f,v,x){var R=$r,I=Hf.transition;Hf.transition=null;try{$r=4,ik(u,f,v,x)}finally{$r=R,Hf.transition=I}}function ik(u,f,v,x){if(r0){var R=ok(u,f,v,x);if(R===null)Sk(u,f,x,n0,v),HM(u,x);else if(tte(R,u,f,v,x))x.stopPropagation();else if(HM(u,x),f&4&&-1<ete.indexOf(u)){for(;R!==null;){var I=Kg(R);if(I!==null&&zM(I),I=ok(u,f,v,x),I===null&&Sk(u,f,x,n0,v),I===R)break;R=I}R!==null&&x.stopPropagation()}else Sk(u,f,x,null,v)}}var n0=null;function ok(u,f,v,x){if(n0=null,u=$l(x),u=hd(u),u!==null)if(f=Ot(u),f===null)u=null;else if(v=f.tag,v===13){if(u=ir(f),u!==null)return u;u=null}else if(v===3){if(f.stateNode.current.memoizedState.isDehydrated)return f.tag===3?f.stateNode.containerInfo:null;u=null}else f!==u&&(u=null);return n0=u,null}function GM(u){switch(u){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(xr()){case Wn:return 1;case wa:return 4;case mo:case vo:return 16;case Ho:return 536870912;default:return 16}default:return 16}}var Lc=null,ak=null,i0=null;function YM(){if(i0)return i0;var u,f=ak,v=f.length,x,R="value"in Lc?Lc.value:Lc.textContent,I=R.length;for(u=0;u<v&&f[u]===R[u];u++);var L=v-u;for(x=1;x<=L&&f[v-x]===R[I-x];x++);return i0=R.slice(u,1<x?1-x:void 0)}function o0(u){var f=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&f===13&&(u=13)):u=f,u===10&&(u=13),32<=u||u===13?u:0}function a0(){return!0}function KM(){return!1}function Xo(u){function f(v,x,R,I,L){this._reactName=v,this._targetInst=R,this.type=x,this.nativeEvent=I,this.target=L,this.currentTarget=null;for(var K in u)u.hasOwnProperty(K)&&(v=u[K],this[K]=v?v(I):I[K]);return this.isDefaultPrevented=(I.defaultPrevented!=null?I.defaultPrevented:I.returnValue===!1)?a0:KM,this.isPropagationStopped=KM,this}return z(f.prototype,{preventDefault:function(){this.defaultPrevented=!0;var v=this.nativeEvent;v&&(v.preventDefault?v.preventDefault():typeof v.returnValue!="unknown"&&(v.returnValue=!1),this.isDefaultPrevented=a0)},stopPropagation:function(){var v=this.nativeEvent;v&&(v.stopPropagation?v.stopPropagation():typeof v.cancelBubble!="unknown"&&(v.cancelBubble=!0),this.isPropagationStopped=a0)},persist:function(){},isPersistent:a0}),f}var Xf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sk=Xo(Xf),Fg=z({},Xf,{view:0,detail:0}),ote=Xo(Fg),lk,ck,Bg,s0=z({},Fg,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dk,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==Bg&&(Bg&&u.type==="mousemove"?(lk=u.screenX-Bg.screenX,ck=u.screenY-Bg.screenY):ck=lk=0,Bg=u),lk)},movementY:function(u){return"movementY"in u?u.movementY:ck}}),JM=Xo(s0),ate=z({},s0,{dataTransfer:0}),ste=Xo(ate),lte=z({},Fg,{relatedTarget:0}),uk=Xo(lte),cte=z({},Xf,{animationName:0,elapsedTime:0,pseudoElement:0}),ute=Xo(cte),dte=z({},Xf,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),fte=Xo(dte),hte=z({},Xf,{data:0}),eN=Xo(hte),pte={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gte={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mte={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vte(u){var f=this.nativeEvent;return f.getModifierState?f.getModifierState(u):(u=mte[u])?!!f[u]:!1}function dk(){return vte}var yte=z({},Fg,{key:function(u){if(u.key){var f=pte[u.key]||u.key;if(f!=="Unidentified")return f}return u.type==="keypress"?(u=o0(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?gte[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dk,charCode:function(u){return u.type==="keypress"?o0(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?o0(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),bte=Xo(yte),Ote=z({},s0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tN=Xo(Ote),wte=z({},Fg,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dk}),Ste=Xo(wte),xte=z({},Xf,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pte=Xo(xte),kte=z({},s0,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),Cte=Xo(kte),Tte=[9,13,27,32],fk=s&&"CompositionEvent"in window,zg=null;s&&"documentMode"in document&&(zg=document.documentMode);var Ete=s&&"TextEvent"in window&&!zg,rN=s&&(!fk||zg&&8<zg&&11>=zg),nN=" ",iN=!1;function oN(u,f){switch(u){case"keyup":return Tte.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aN(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var Zf=!1;function _te(u,f){switch(u){case"compositionend":return aN(f);case"keypress":return f.which!==32?null:(iN=!0,nN);case"textInput":return u=f.data,u===nN&&iN?null:u;default:return null}}function Rte(u,f){if(Zf)return u==="compositionend"||!fk&&oN(u,f)?(u=YM(),i0=ak=Lc=null,Zf=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(f.ctrlKey||f.altKey||f.metaKey)||f.ctrlKey&&f.altKey){if(f.char&&1<f.char.length)return f.char;if(f.which)return String.fromCharCode(f.which)}return null;case"compositionend":return rN&&f.locale!=="ko"?null:f.data;default:return null}}var Ite={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function sN(u){var f=u&&u.nodeName&&u.nodeName.toLowerCase();return f==="input"?!!Ite[u.type]:f==="textarea"}function lN(u,f,v,x){ts(x),f=f0(f,"onChange"),0<f.length&&(v=new sk("onChange","change",null,v,x),u.push({event:v,listeners:f}))}var qg=null,Wg=null;function $te(u){CN(u,0)}function l0(u){var f=eh(u);if(re(f))return u}function Ate(u,f){if(u==="change")return f}var cN=!1;if(s){var hk;if(s){var pk="oninput"in document;if(!pk){var uN=document.createElement("div");uN.setAttribute("oninput","return;"),pk=typeof uN.oninput=="function"}hk=pk}else hk=!1;cN=hk&&(!document.documentMode||9<document.documentMode)}function dN(){qg&&(qg.detachEvent("onpropertychange",fN),Wg=qg=null)}function fN(u){if(u.propertyName==="value"&&l0(Wg)){var f=[];lN(f,Wg,u,$l(u)),We($te,f)}}function Mte(u,f,v){u==="focusin"?(dN(),qg=f,Wg=v,qg.attachEvent("onpropertychange",fN)):u==="focusout"&&dN()}function Nte(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return l0(Wg)}function jte(u,f){if(u==="click")return l0(f)}function Dte(u,f){if(u==="input"||u==="change")return l0(f)}function Lte(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var rs=typeof Object.is=="function"?Object.is:Lte;function Ug(u,f){if(rs(u,f))return!0;if(typeof u!="object"||u===null||typeof f!="object"||f===null)return!1;var v=Object.keys(u),x=Object.keys(f);if(v.length!==x.length)return!1;for(x=0;x<v.length;x++){var R=v[x];if(!l.call(f,R)||!rs(u[R],f[R]))return!1}return!0}function hN(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function pN(u,f){var v=hN(u);u=0;for(var x;v;){if(v.nodeType===3){if(x=u+v.textContent.length,u<=f&&x>=f)return{node:v,offset:f-u};u=x}e:{for(;v;){if(v.nextSibling){v=v.nextSibling;break e}v=v.parentNode}v=void 0}v=hN(v)}}function gN(u,f){return u&&f?u===f?!0:u&&u.nodeType===3?!1:f&&f.nodeType===3?gN(u,f.parentNode):"contains"in u?u.contains(f):u.compareDocumentPosition?!!(u.compareDocumentPosition(f)&16):!1:!1}function mN(){for(var u=window,f=ye();f instanceof u.HTMLIFrameElement;){try{var v=typeof f.contentWindow.location.href=="string"}catch{v=!1}if(v)u=f.contentWindow;else break;f=ye(u.document)}return f}function gk(u){var f=u&&u.nodeName&&u.nodeName.toLowerCase();return f&&(f==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||f==="textarea"||u.contentEditable==="true")}function Qte(u){var f=mN(),v=u.focusedElem,x=u.selectionRange;if(f!==v&&v&&v.ownerDocument&&gN(v.ownerDocument.documentElement,v)){if(x!==null&&gk(v)){if(f=x.start,u=x.end,u===void 0&&(u=f),"selectionStart"in v)v.selectionStart=f,v.selectionEnd=Math.min(u,v.value.length);else if(u=(f=v.ownerDocument||document)&&f.defaultView||window,u.getSelection){u=u.getSelection();var R=v.textContent.length,I=Math.min(x.start,R);x=x.end===void 0?I:Math.min(x.end,R),!u.extend&&I>x&&(R=x,x=I,I=R),R=pN(v,I);var L=pN(v,x);R&&L&&(u.rangeCount!==1||u.anchorNode!==R.node||u.anchorOffset!==R.offset||u.focusNode!==L.node||u.focusOffset!==L.offset)&&(f=f.createRange(),f.setStart(R.node,R.offset),u.removeAllRanges(),I>x?(u.addRange(f),u.extend(L.node,L.offset)):(f.setEnd(L.node,L.offset),u.addRange(f)))}}for(f=[],u=v;u=u.parentNode;)u.nodeType===1&&f.push({element:u,left:u.scrollLeft,top:u.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<f.length;v++)u=f[v],u.element.scrollLeft=u.left,u.element.scrollTop=u.top}}var Vte=s&&"documentMode"in document&&11>=document.documentMode,Gf=null,mk=null,Hg=null,vk=!1;function vN(u,f,v){var x=v.window===v?v.document:v.nodeType===9?v:v.ownerDocument;vk||Gf==null||Gf!==ye(x)||(x=Gf,"selectionStart"in x&&gk(x)?x={start:x.selectionStart,end:x.selectionEnd}:(x=(x.ownerDocument&&x.ownerDocument.defaultView||window).getSelection(),x={anchorNode:x.anchorNode,anchorOffset:x.anchorOffset,focusNode:x.focusNode,focusOffset:x.focusOffset}),Hg&&Ug(Hg,x)||(Hg=x,x=f0(mk,"onSelect"),0<x.length&&(f=new sk("onSelect","select",null,f,v),u.push({event:f,listeners:x}),f.target=Gf)))}function c0(u,f){var v={};return v[u.toLowerCase()]=f.toLowerCase(),v["Webkit"+u]="webkit"+f,v["Moz"+u]="moz"+f,v}var Yf={animationend:c0("Animation","AnimationEnd"),animationiteration:c0("Animation","AnimationIteration"),animationstart:c0("Animation","AnimationStart"),transitionend:c0("Transition","TransitionEnd")},yk={},yN={};s&&(yN=document.createElement("div").style,"AnimationEvent"in window||(delete Yf.animationend.animation,delete Yf.animationiteration.animation,delete Yf.animationstart.animation),"TransitionEvent"in window||delete Yf.transitionend.transition);function u0(u){if(yk[u])return yk[u];if(!Yf[u])return u;var f=Yf[u],v;for(v in f)if(f.hasOwnProperty(v)&&v in yN)return yk[u]=f[v];return u}var bN=u0("animationend"),ON=u0("animationiteration"),wN=u0("animationstart"),SN=u0("transitionend"),xN=new Map,PN="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Qc(u,f){xN.set(u,f),o(f,[u])}for(var bk=0;bk<PN.length;bk++){var Ok=PN[bk],Fte=Ok.toLowerCase(),Bte=Ok[0].toUpperCase()+Ok.slice(1);Qc(Fte,"on"+Bte)}Qc(bN,"onAnimationEnd"),Qc(ON,"onAnimationIteration"),Qc(wN,"onAnimationStart"),Qc("dblclick","onDoubleClick"),Qc("focusin","onFocus"),Qc("focusout","onBlur"),Qc(SN,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xg="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),zte=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xg));function kN(u,f,v){var x=u.type||"unknown-event";u.currentTarget=v,tt(x,f,void 0,u),u.currentTarget=null}function CN(u,f){f=(f&4)!==0;for(var v=0;v<u.length;v++){var x=u[v],R=x.event;x=x.listeners;e:{var I=void 0;if(f)for(var L=x.length-1;0<=L;L--){var K=x[L],ae=K.instance,be=K.currentTarget;if(K=K.listener,ae!==I&&R.isPropagationStopped())break e;kN(R,K,be),I=ae}else for(L=0;L<x.length;L++){if(K=x[L],ae=K.instance,be=K.currentTarget,K=K.listener,ae!==I&&R.isPropagationStopped())break e;kN(R,K,be),I=ae}}}if(te)throw u=ce,te=!1,ce=null,u}function sn(u,f){var v=f[Ek];v===void 0&&(v=f[Ek]=new Set);var x=u+"__bubble";v.has(x)||(TN(f,u,2,!1),v.add(x))}function wk(u,f,v){var x=0;f&&(x|=4),TN(v,u,x,f)}var d0="_reactListening"+Math.random().toString(36).slice(2);function Zg(u){if(!u[d0]){u[d0]=!0,n.forEach(function(v){v!=="selectionchange"&&(zte.has(v)||wk(v,!1,u),wk(v,!0,u))});var f=u.nodeType===9?u:u.ownerDocument;f===null||f[d0]||(f[d0]=!0,wk("selectionchange",!1,f))}}function TN(u,f,v,x){switch(GM(f)){case 1:var R=nte;break;case 4:R=ite;break;default:R=ik}v=R.bind(null,f,v,u),R=void 0,!at||f!=="touchstart"&&f!=="touchmove"&&f!=="wheel"||(R=!0),x?R!==void 0?u.addEventListener(f,v,{capture:!0,passive:R}):u.addEventListener(f,v,!0):R!==void 0?u.addEventListener(f,v,{passive:R}):u.addEventListener(f,v,!1)}function Sk(u,f,v,x,R){var I=x;if((f&1)===0&&(f&2)===0&&x!==null)e:for(;;){if(x===null)return;var L=x.tag;if(L===3||L===4){var K=x.stateNode.containerInfo;if(K===R||K.nodeType===8&&K.parentNode===R)break;if(L===4)for(L=x.return;L!==null;){var ae=L.tag;if((ae===3||ae===4)&&(ae=L.stateNode.containerInfo,ae===R||ae.nodeType===8&&ae.parentNode===R))return;L=L.return}for(;K!==null;){if(L=hd(K),L===null)return;if(ae=L.tag,ae===5||ae===6){x=I=L;continue e}K=K.parentNode}}x=x.return}We(function(){var be=I,_e=$l(v),Re=[];e:{var Ee=xN.get(u);if(Ee!==void 0){var He=sk,Je=u;switch(u){case"keypress":if(o0(v)===0)break e;case"keydown":case"keyup":He=bte;break;case"focusin":Je="focus",He=uk;break;case"focusout":Je="blur",He=uk;break;case"beforeblur":case"afterblur":He=uk;break;case"click":if(v.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":He=JM;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":He=ste;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":He=Ste;break;case bN:case ON:case wN:He=ute;break;case SN:He=Pte;break;case"scroll":He=ote;break;case"wheel":He=Cte;break;case"copy":case"cut":case"paste":He=fte;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":He=tN}var rt=(f&4)!==0,Ln=!rt&&u==="scroll",he=rt?Ee!==null?Ee+"Capture":null:Ee;rt=[];for(var se=be,pe;se!==null;){pe=se;var Ne=pe.stateNode;if(pe.tag===5&&Ne!==null&&(pe=Ne,he!==null&&(Ne=wt(se,he),Ne!=null&&rt.push(Gg(se,Ne,pe)))),Ln)break;se=se.return}0<rt.length&&(Ee=new He(Ee,Je,null,v,_e),Re.push({event:Ee,listeners:rt}))}}if((f&7)===0){e:{if(Ee=u==="mouseover"||u==="pointerover",He=u==="mouseout"||u==="pointerout",Ee&&v!==$c&&(Je=v.relatedTarget||v.fromElement)&&(hd(Je)||Je[Ml]))break e;if((He||Ee)&&(Ee=_e.window===_e?_e:(Ee=_e.ownerDocument)?Ee.defaultView||Ee.parentWindow:window,He?(Je=v.relatedTarget||v.toElement,He=be,Je=Je?hd(Je):null,Je!==null&&(Ln=Ot(Je),Je!==Ln||Je.tag!==5&&Je.tag!==6)&&(Je=null)):(He=null,Je=be),He!==Je)){if(rt=JM,Ne="onMouseLeave",he="onMouseEnter",se="mouse",(u==="pointerout"||u==="pointerover")&&(rt=tN,Ne="onPointerLeave",he="onPointerEnter",se="pointer"),Ln=He==null?Ee:eh(He),pe=Je==null?Ee:eh(Je),Ee=new rt(Ne,se+"leave",He,v,_e),Ee.target=Ln,Ee.relatedTarget=pe,Ne=null,hd(_e)===be&&(rt=new rt(he,se+"enter",Je,v,_e),rt.target=pe,rt.relatedTarget=Ln,Ne=rt),Ln=Ne,He&&Je)t:{for(rt=He,he=Je,se=0,pe=rt;pe;pe=Kf(pe))se++;for(pe=0,Ne=he;Ne;Ne=Kf(Ne))pe++;for(;0<se-pe;)rt=Kf(rt),se--;for(;0<pe-se;)he=Kf(he),pe--;for(;se--;){if(rt===he||he!==null&&rt===he.alternate)break t;rt=Kf(rt),he=Kf(he)}rt=null}else rt=null;He!==null&&EN(Re,Ee,He,rt,!1),Je!==null&&Ln!==null&&EN(Re,Ln,Je,rt,!0)}}e:{if(Ee=be?eh(be):window,He=Ee.nodeName&&Ee.nodeName.toLowerCase(),He==="select"||He==="input"&&Ee.type==="file")var ot=Ate;else if(sN(Ee))if(cN)ot=Dte;else{ot=Nte;var yt=Mte}else(He=Ee.nodeName)&&He.toLowerCase()==="input"&&(Ee.type==="checkbox"||Ee.type==="radio")&&(ot=jte);if(ot&&(ot=ot(u,be))){lN(Re,ot,v,_e);break e}yt&&yt(u,Ee,be),u==="focusout"&&(yt=Ee._wrapperState)&&yt.controlled&&Ee.type==="number"&&yr(Ee,"number",Ee.value)}switch(yt=be?eh(be):window,u){case"focusin":(sN(yt)||yt.contentEditable==="true")&&(Gf=yt,mk=be,Hg=null);break;case"focusout":Hg=mk=Gf=null;break;case"mousedown":vk=!0;break;case"contextmenu":case"mouseup":case"dragend":vk=!1,vN(Re,v,_e);break;case"selectionchange":if(Vte)break;case"keydown":case"keyup":vN(Re,v,_e)}var bt;if(fk)e:{switch(u){case"compositionstart":var kt="onCompositionStart";break e;case"compositionend":kt="onCompositionEnd";break e;case"compositionupdate":kt="onCompositionUpdate";break e}kt=void 0}else Zf?oN(u,v)&&(kt="onCompositionEnd"):u==="keydown"&&v.keyCode===229&&(kt="onCompositionStart");kt&&(rN&&v.locale!=="ko"&&(Zf||kt!=="onCompositionStart"?kt==="onCompositionEnd"&&Zf&&(bt=YM()):(Lc=_e,ak="value"in Lc?Lc.value:Lc.textContent,Zf=!0)),yt=f0(be,kt),0<yt.length&&(kt=new eN(kt,u,null,v,_e),Re.push({event:kt,listeners:yt}),bt?kt.data=bt:(bt=aN(v),bt!==null&&(kt.data=bt)))),(bt=Ete?_te(u,v):Rte(u,v))&&(be=f0(be,"onBeforeInput"),0<be.length&&(_e=new eN("onBeforeInput","beforeinput",null,v,_e),Re.push({event:_e,listeners:be}),_e.data=bt))}CN(Re,f)})}function Gg(u,f,v){return{instance:u,listener:f,currentTarget:v}}function f0(u,f){for(var v=f+"Capture",x=[];u!==null;){var R=u,I=R.stateNode;R.tag===5&&I!==null&&(R=I,I=wt(u,v),I!=null&&x.unshift(Gg(u,I,R)),I=wt(u,f),I!=null&&x.push(Gg(u,I,R))),u=u.return}return x}function Kf(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5);return u||null}function EN(u,f,v,x,R){for(var I=f._reactName,L=[];v!==null&&v!==x;){var K=v,ae=K.alternate,be=K.stateNode;if(ae!==null&&ae===x)break;K.tag===5&&be!==null&&(K=be,R?(ae=wt(v,I),ae!=null&&L.unshift(Gg(v,ae,K))):R||(ae=wt(v,I),ae!=null&&L.push(Gg(v,ae,K)))),v=v.return}L.length!==0&&u.push({event:f,listeners:L})}var qte=/\r\n?/g,Wte=/\u0000|\uFFFD/g;function _N(u){return(typeof u=="string"?u:""+u).replace(qte,`
|
|
37
|
+
`+R[L].replace(" at new "," at ");return u.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",u.displayName)),ae}while(1<=L&&0<=K);break}}}finally{J=!1,Error.prepareStackTrace=v}return(u=u?u.displayName||u.name:"")?U(u):""}function q(u){switch(u.tag){case 5:return U(u.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return u=Q(u.type,!1),u;case 11:return u=Q(u.type.render,!1),u;case 1:return u=Q(u.type,!0),u;default:return""}}function oe(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case _:return"Fragment";case E:return"Portal";case M:return"Profiler";case $:return"StrictMode";case X:return"Suspense";case D:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case B:return(u.displayName||"Context")+".Consumer";case j:return(u._context.displayName||"Context")+".Provider";case V:var f=u.render;return u=u.displayName,u||(u=f.displayName||f.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case F:return f=u.displayName||null,f!==null?f:oe(u.type)||"Memo";case Y:f=u._payload,u=u._init;try{return oe(u(f))}catch{}}return null}function Oe(u){var f=u.type;switch(u.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=f.render,u=u.displayName||u.name||"",f.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oe(f);case 8:return 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 f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function Z(u){switch(typeof u){case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function le(u){var f=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(f==="checkbox"||f==="radio")}function Pe(u){var f=le(u)?"checked":"value",v=Object.getOwnPropertyDescriptor(u.constructor.prototype,f),x=""+u[f];if(!u.hasOwnProperty(f)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var R=v.get,I=v.set;return Object.defineProperty(u,f,{configurable:!0,get:function(){return R.call(this)},set:function(L){x=""+L,I.call(this,L)}}),Object.defineProperty(u,f,{enumerable:v.enumerable}),{getValue:function(){return x},setValue:function(L){x=""+L},stopTracking:function(){u._valueTracker=null,delete u[f]}}}}function ee(u){u._valueTracker||(u._valueTracker=Pe(u))}function re(u){if(!u)return!1;var f=u._valueTracker;if(!f)return!0;var v=f.getValue(),x="";return u&&(x=le(u)?u.checked?"true":"false":u.value),u=x,u!==v?(f.setValue(u),!0):!1}function ye(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}function ke(u,f){var v=f.checked;return z({},f,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:v??u._wrapperState.initialChecked})}function Me(u,f){var v=f.defaultValue==null?"":f.defaultValue,x=f.checked!=null?f.checked:f.defaultChecked;v=Z(f.value!=null?f.value:v),u._wrapperState={initialChecked:x,initialValue:v,controlled:f.type==="checkbox"||f.type==="radio"?f.checked!=null:f.value!=null}}function De(u,f){f=f.checked,f!=null&&k(u,"checked",f,!1)}function Vt(u,f){De(u,f);var v=Z(f.value),x=f.type;if(v!=null)x==="number"?(v===0&&u.value===""||u.value!=v)&&(u.value=""+v):u.value!==""+v&&(u.value=""+v);else if(x==="submit"||x==="reset"){u.removeAttribute("value");return}f.hasOwnProperty("value")?yr(u,f.type,v):f.hasOwnProperty("defaultValue")&&yr(u,f.type,Z(f.defaultValue)),f.checked==null&&f.defaultChecked!=null&&(u.defaultChecked=!!f.defaultChecked)}function vr(u,f,v){if(f.hasOwnProperty("value")||f.hasOwnProperty("defaultValue")){var x=f.type;if(!(x!=="submit"&&x!=="reset"||f.value!==void 0&&f.value!==null))return;f=""+u._wrapperState.initialValue,v||f===u.value||(u.value=f),u.defaultValue=f}v=u.name,v!==""&&(u.name=""),u.defaultChecked=!!u._wrapperState.initialChecked,v!==""&&(u.name=v)}function yr(u,f,v){(f!=="number"||ye(u.ownerDocument)!==u)&&(v==null?u.defaultValue=""+u._wrapperState.initialValue:u.defaultValue!==""+v&&(u.defaultValue=""+v))}var ur=Array.isArray;function or(u,f,v,x){if(u=u.options,f){f={};for(var R=0;R<v.length;R++)f["$"+v[R]]=!0;for(v=0;v<u.length;v++)R=f.hasOwnProperty("$"+u[v].value),u[v].selected!==R&&(u[v].selected=R),R&&x&&(u[v].defaultSelected=!0)}else{for(v=""+Z(v),f=null,R=0;R<u.length;R++){if(u[R].value===v){u[R].selected=!0,x&&(u[R].defaultSelected=!0);return}f!==null||u[R].disabled||(f=u[R])}f!==null&&(f.selected=!0)}}function Rr(u,f){if(f.dangerouslySetInnerHTML!=null)throw Error(r(91));return z({},f,{value:void 0,defaultValue:void 0,children:""+u._wrapperState.initialValue})}function zt(u,f){var v=f.value;if(v==null){if(v=f.children,f=f.defaultValue,v!=null){if(f!=null)throw Error(r(92));if(ur(v)){if(1<v.length)throw Error(r(93));v=v[0]}f=v}f==null&&(f=""),v=f}u._wrapperState={initialValue:Z(v)}}function Tn(u,f){var v=Z(f.value),x=Z(f.defaultValue);v!=null&&(v=""+v,v!==u.value&&(u.value=v),f.defaultValue==null&&u.defaultValue!==v&&(u.defaultValue=v)),x!=null&&(u.defaultValue=""+x)}function zn(u){var f=u.textContent;f===u._wrapperState.initialValue&&f!==""&&f!==null&&(u.value=f)}function $n(u){switch(u){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pi(u,f){return u==null||u==="http://www.w3.org/1999/xhtml"?$n(f):u==="http://www.w3.org/2000/svg"&&f==="foreignObject"?"http://www.w3.org/1999/xhtml":u}var io,En=function(u){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(f,v,x,R){MSApp.execUnsafeLocalFunction(function(){return u(f,v,x,R)})}:u}(function(u,f){if(u.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in u)u.innerHTML=f;else{for(io=io||document.createElement("div"),io.innerHTML="<svg>"+f.valueOf().toString()+"</svg>",f=io.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;f.firstChild;)u.appendChild(f.firstChild)}});function Ii(u,f){if(f){var v=u.firstChild;if(v&&v===u.lastChild&&v.nodeType===3){v.nodeValue=f;return}}u.textContent=f}var qn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Rl=["Webkit","ms","Moz","O"];Object.keys(qn).forEach(function(u){Rl.forEach(function(f){f=f+u.charAt(0).toUpperCase()+u.substring(1),qn[f]=qn[u]})});function Ja(u,f,v){return f==null||typeof f=="boolean"||f===""?"":v||typeof f!="number"||f===0||qn.hasOwnProperty(u)&&qn[u]?(""+f).trim():f+"px"}function Ic(u,f){u=u.style;for(var v in f)if(f.hasOwnProperty(v)){var x=v.indexOf("--")===0,R=Ja(v,f[v],x);v==="float"&&(v="cssFloat"),x?u.setProperty(v,R):u[v]=R}}var Mg=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Il(u,f){if(f){if(Mg[u]&&(f.children!=null||f.dangerouslySetInnerHTML!=null))throw Error(r(137,u));if(f.dangerouslySetInnerHTML!=null){if(f.children!=null)throw Error(r(60));if(typeof f.dangerouslySetInnerHTML!="object"||!("__html"in f.dangerouslySetInnerHTML))throw Error(r(61))}if(f.style!=null&&typeof f.style!="object")throw Error(r(62))}}function ni(u,f){if(u.indexOf("-")===-1)return typeof f.is=="string";switch(u){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $c=null;function $l(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var cd=null,es=null,$s=null;function ud(u){if(u=Kg(u)){if(typeof cd!="function")throw Error(r(280));var f=u.stateNode;f&&(f=g0(f),cd(u.stateNode,u.type,f))}}function ts(u){es?$s?$s.push(u):$s=[u]:es=u}function ue(){if(es){var u=es,f=$s;if($s=es=null,ud(u),f)for(u=0;u<f.length;u++)ud(f[u])}}function ve(u,f){return u(f)}function we(){}var $e=!1;function We(u,f,v){if($e)return u(f,v);$e=!0;try{return ve(u,f,v)}finally{$e=!1,(es!==null||$s!==null)&&(we(),ue())}}function wt(u,f){var v=u.stateNode;if(v===null)return null;var x=g0(v);if(x===null)return null;v=x[f];e:switch(f){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(x=!x.disabled)||(u=u.type,x=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!x;break e;default:u=!1}if(u)return null;if(v&&typeof v!="function")throw Error(r(231,f,typeof v));return v}var at=!1;if(s)try{var Ue={};Object.defineProperty(Ue,"passive",{get:function(){at=!0}}),window.addEventListener("test",Ue,Ue),window.removeEventListener("test",Ue,Ue)}catch{at=!1}function Ct(u,f,v,x,R,I,L,K,ae){var be=Array.prototype.slice.call(arguments,3);try{f.apply(v,be)}catch(_e){this.onError(_e)}}var G=!1,W=null,te=!1,ce=null,de={onError:function(u){G=!0,W=u}};function qe(u,f,v,x,R,I,L,K,ae){G=!1,W=null,Ct.apply(de,arguments)}function tt(u,f,v,x,R,I,L,K,ae){if(qe.apply(this,arguments),G){if(G){var be=W;G=!1,W=null}else throw Error(r(198));te||(te=!0,ce=be)}}function Ot(u){var f=u,v=u;if(u.alternate)for(;f.return;)f=f.return;else{u=f;do f=u,(f.flags&4098)!==0&&(v=f.return),u=f.return;while(u)}return f.tag===3?v:null}function ir(u){if(u.tag===13){var f=u.memoizedState;if(f===null&&(u=u.alternate,u!==null&&(f=u.memoizedState)),f!==null)return f.dehydrated}return null}function br(u){if(Ot(u)!==u)throw Error(r(188))}function It(u){var f=u.alternate;if(!f){if(f=Ot(u),f===null)throw Error(r(188));return f!==u?null:u}for(var v=u,x=f;;){var R=v.return;if(R===null)break;var I=R.alternate;if(I===null){if(x=R.return,x!==null){v=x;continue}break}if(R.child===I.child){for(I=R.child;I;){if(I===v)return br(R),u;if(I===x)return br(R),f;I=I.sibling}throw Error(r(188))}if(v.return!==x.return)v=R,x=I;else{for(var L=!1,K=R.child;K;){if(K===v){L=!0,v=R,x=I;break}if(K===x){L=!0,x=R,v=I;break}K=K.sibling}if(!L){for(K=I.child;K;){if(K===v){L=!0,v=I,x=R;break}if(K===x){L=!0,x=I,v=R;break}K=K.sibling}if(!L)throw Error(r(189))}}if(v.alternate!==x)throw Error(r(190))}if(v.tag!==3)throw Error(r(188));return v.stateNode.current===v?u:f}function qt(u){return u=It(u),u!==null?Ir(u):null}function Ir(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var f=Ir(u);if(f!==null)return f;u=u.sibling}return null}var vt=e.unstable_scheduleCallback,pr=e.unstable_cancelCallback,ct=e.unstable_shouldYield,Qt=e.unstable_requestPaint,Dt=e.unstable_now,xr=e.unstable_getCurrentPriorityLevel,Wn=e.unstable_ImmediatePriority,wa=e.unstable_UserBlockingPriority,mo=e.unstable_NormalPriority,vo=e.unstable_LowPriority,Ho=e.unstable_IdlePriority,Sa=null,Un=null;function dd(u){if(Un&&typeof Un.onCommitFiberRoot=="function")try{Un.onCommitFiberRoot(Sa,u,void 0,(u.current.flags&128)===128)}catch{}}var yo=Math.clz32?Math.clz32:Uf,Jb=Math.log,Wf=Math.LN2;function Uf(u){return u>>>=0,u===0?32:31-(Jb(u)/Wf|0)|0}var Al=64,fd=4194304;function Ac(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function As(u,f){var v=u.pendingLanes;if(v===0)return 0;var x=0,R=u.suspendedLanes,I=u.pingedLanes,L=v&268435455;if(L!==0){var K=L&~R;K!==0?x=Ac(K):(I&=L,I!==0&&(x=Ac(I)))}else L=v&~R,L!==0?x=Ac(L):I!==0&&(x=Ac(I));if(x===0)return 0;if(f!==0&&f!==x&&(f&R)===0&&(R=x&-x,I=f&-f,R>=I||R===16&&(I&4194240)!==0))return f;if((x&4)!==0&&(x|=v&16),f=u.entangledLanes,f!==0)for(u=u.entanglements,f&=x;0<f;)v=31-yo(f),R=1<<v,x|=u[v],f&=~R;return x}function Yee(u,f){switch(u){case 1:case 2:case 4:return f+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Kee(u,f){for(var v=u.suspendedLanes,x=u.pingedLanes,R=u.expirationTimes,I=u.pendingLanes;0<I;){var L=31-yo(I),K=1<<L,ae=R[L];ae===-1?((K&v)===0||(K&x)!==0)&&(R[L]=Yee(K,f)):ae<=f&&(u.expiredLanes|=K),I&=~K}}function JP(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function FM(){var u=Al;return Al<<=1,(Al&4194240)===0&&(Al=64),u}function ek(u){for(var f=[],v=0;31>v;v++)f.push(u);return f}function Ng(u,f,v){u.pendingLanes|=f,f!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,f=31-yo(f),u[f]=v}function Jee(u,f){var v=u.pendingLanes&~f;u.pendingLanes=f,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=f,u.mutableReadLanes&=f,u.entangledLanes&=f,f=u.entanglements;var x=u.eventTimes;for(u=u.expirationTimes;0<v;){var R=31-yo(v),I=1<<R;f[R]=0,x[R]=-1,u[R]=-1,v&=~I}}function tk(u,f){var v=u.entangledLanes|=f;for(u=u.entanglements;v;){var x=31-yo(v),R=1<<x;R&f|u[x]&f&&(u[x]|=f),v&=~R}}var $r=0;function BM(u){return u&=-u,1<u?4<u?(u&268435455)!==0?16:536870912:4:1}var zM,rk,qM,WM,UM,nk=!1,e0=[],Mc=null,Nc=null,jc=null,jg=new Map,Dg=new Map,Dc=[],ete="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function HM(u,f){switch(u){case"focusin":case"focusout":Mc=null;break;case"dragenter":case"dragleave":Nc=null;break;case"mouseover":case"mouseout":jc=null;break;case"pointerover":case"pointerout":jg.delete(f.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dg.delete(f.pointerId)}}function Lg(u,f,v,x,R,I){return u===null||u.nativeEvent!==I?(u={blockedOn:f,domEventName:v,eventSystemFlags:x,nativeEvent:I,targetContainers:[R]},f!==null&&(f=Kg(f),f!==null&&rk(f)),u):(u.eventSystemFlags|=x,f=u.targetContainers,R!==null&&f.indexOf(R)===-1&&f.push(R),u)}function tte(u,f,v,x,R){switch(f){case"focusin":return Mc=Lg(Mc,u,f,v,x,R),!0;case"dragenter":return Nc=Lg(Nc,u,f,v,x,R),!0;case"mouseover":return jc=Lg(jc,u,f,v,x,R),!0;case"pointerover":var I=R.pointerId;return jg.set(I,Lg(jg.get(I)||null,u,f,v,x,R)),!0;case"gotpointercapture":return I=R.pointerId,Dg.set(I,Lg(Dg.get(I)||null,u,f,v,x,R)),!0}return!1}function XM(u){var f=hd(u.target);if(f!==null){var v=Ot(f);if(v!==null){if(f=v.tag,f===13){if(f=ir(v),f!==null){u.blockedOn=f,UM(u.priority,function(){qM(v)});return}}else if(f===3&&v.stateNode.current.memoizedState.isDehydrated){u.blockedOn=v.tag===3?v.stateNode.containerInfo:null;return}}}u.blockedOn=null}function t0(u){if(u.blockedOn!==null)return!1;for(var f=u.targetContainers;0<f.length;){var v=ok(u.domEventName,u.eventSystemFlags,f[0],u.nativeEvent);if(v===null){v=u.nativeEvent;var x=new v.constructor(v.type,v);$c=x,v.target.dispatchEvent(x),$c=null}else return f=Kg(v),f!==null&&rk(f),u.blockedOn=v,!1;f.shift()}return!0}function ZM(u,f,v){t0(u)&&v.delete(f)}function rte(){nk=!1,Mc!==null&&t0(Mc)&&(Mc=null),Nc!==null&&t0(Nc)&&(Nc=null),jc!==null&&t0(jc)&&(jc=null),jg.forEach(ZM),Dg.forEach(ZM)}function Qg(u,f){u.blockedOn===f&&(u.blockedOn=null,nk||(nk=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,rte)))}function Vg(u){function f(R){return Qg(R,u)}if(0<e0.length){Qg(e0[0],u);for(var v=1;v<e0.length;v++){var x=e0[v];x.blockedOn===u&&(x.blockedOn=null)}}for(Mc!==null&&Qg(Mc,u),Nc!==null&&Qg(Nc,u),jc!==null&&Qg(jc,u),jg.forEach(f),Dg.forEach(f),v=0;v<Dc.length;v++)x=Dc[v],x.blockedOn===u&&(x.blockedOn=null);for(;0<Dc.length&&(v=Dc[0],v.blockedOn===null);)XM(v),v.blockedOn===null&&Dc.shift()}var Hf=T.ReactCurrentBatchConfig,r0=!0;function nte(u,f,v,x){var R=$r,I=Hf.transition;Hf.transition=null;try{$r=1,ik(u,f,v,x)}finally{$r=R,Hf.transition=I}}function ite(u,f,v,x){var R=$r,I=Hf.transition;Hf.transition=null;try{$r=4,ik(u,f,v,x)}finally{$r=R,Hf.transition=I}}function ik(u,f,v,x){if(r0){var R=ok(u,f,v,x);if(R===null)Sk(u,f,x,n0,v),HM(u,x);else if(tte(R,u,f,v,x))x.stopPropagation();else if(HM(u,x),f&4&&-1<ete.indexOf(u)){for(;R!==null;){var I=Kg(R);if(I!==null&&zM(I),I=ok(u,f,v,x),I===null&&Sk(u,f,x,n0,v),I===R)break;R=I}R!==null&&x.stopPropagation()}else Sk(u,f,x,null,v)}}var n0=null;function ok(u,f,v,x){if(n0=null,u=$l(x),u=hd(u),u!==null)if(f=Ot(u),f===null)u=null;else if(v=f.tag,v===13){if(u=ir(f),u!==null)return u;u=null}else if(v===3){if(f.stateNode.current.memoizedState.isDehydrated)return f.tag===3?f.stateNode.containerInfo:null;u=null}else f!==u&&(u=null);return n0=u,null}function GM(u){switch(u){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(xr()){case Wn:return 1;case wa:return 4;case mo:case vo:return 16;case Ho:return 536870912;default:return 16}default:return 16}}var Lc=null,ak=null,i0=null;function YM(){if(i0)return i0;var u,f=ak,v=f.length,x,R="value"in Lc?Lc.value:Lc.textContent,I=R.length;for(u=0;u<v&&f[u]===R[u];u++);var L=v-u;for(x=1;x<=L&&f[v-x]===R[I-x];x++);return i0=R.slice(u,1<x?1-x:void 0)}function o0(u){var f=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&f===13&&(u=13)):u=f,u===10&&(u=13),32<=u||u===13?u:0}function a0(){return!0}function KM(){return!1}function Xo(u){function f(v,x,R,I,L){this._reactName=v,this._targetInst=R,this.type=x,this.nativeEvent=I,this.target=L,this.currentTarget=null;for(var K in u)u.hasOwnProperty(K)&&(v=u[K],this[K]=v?v(I):I[K]);return this.isDefaultPrevented=(I.defaultPrevented!=null?I.defaultPrevented:I.returnValue===!1)?a0:KM,this.isPropagationStopped=KM,this}return z(f.prototype,{preventDefault:function(){this.defaultPrevented=!0;var v=this.nativeEvent;v&&(v.preventDefault?v.preventDefault():typeof v.returnValue!="unknown"&&(v.returnValue=!1),this.isDefaultPrevented=a0)},stopPropagation:function(){var v=this.nativeEvent;v&&(v.stopPropagation?v.stopPropagation():typeof v.cancelBubble!="unknown"&&(v.cancelBubble=!0),this.isPropagationStopped=a0)},persist:function(){},isPersistent:a0}),f}var Xf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sk=Xo(Xf),Fg=z({},Xf,{view:0,detail:0}),ote=Xo(Fg),lk,ck,Bg,s0=z({},Fg,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dk,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==Bg&&(Bg&&u.type==="mousemove"?(lk=u.screenX-Bg.screenX,ck=u.screenY-Bg.screenY):ck=lk=0,Bg=u),lk)},movementY:function(u){return"movementY"in u?u.movementY:ck}}),JM=Xo(s0),ate=z({},s0,{dataTransfer:0}),ste=Xo(ate),lte=z({},Fg,{relatedTarget:0}),uk=Xo(lte),cte=z({},Xf,{animationName:0,elapsedTime:0,pseudoElement:0}),ute=Xo(cte),dte=z({},Xf,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),fte=Xo(dte),hte=z({},Xf,{data:0}),eN=Xo(hte),pte={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gte={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mte={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vte(u){var f=this.nativeEvent;return f.getModifierState?f.getModifierState(u):(u=mte[u])?!!f[u]:!1}function dk(){return vte}var yte=z({},Fg,{key:function(u){if(u.key){var f=pte[u.key]||u.key;if(f!=="Unidentified")return f}return u.type==="keypress"?(u=o0(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?gte[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dk,charCode:function(u){return u.type==="keypress"?o0(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?o0(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),bte=Xo(yte),Ote=z({},s0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tN=Xo(Ote),wte=z({},Fg,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dk}),Ste=Xo(wte),xte=z({},Xf,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pte=Xo(xte),kte=z({},s0,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),Cte=Xo(kte),Tte=[9,13,27,32],fk=s&&"CompositionEvent"in window,zg=null;s&&"documentMode"in document&&(zg=document.documentMode);var Ete=s&&"TextEvent"in window&&!zg,rN=s&&(!fk||zg&&8<zg&&11>=zg),nN=" ",iN=!1;function oN(u,f){switch(u){case"keyup":return Tte.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aN(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var Zf=!1;function _te(u,f){switch(u){case"compositionend":return aN(f);case"keypress":return f.which!==32?null:(iN=!0,nN);case"textInput":return u=f.data,u===nN&&iN?null:u;default:return null}}function Rte(u,f){if(Zf)return u==="compositionend"||!fk&&oN(u,f)?(u=YM(),i0=ak=Lc=null,Zf=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(f.ctrlKey||f.altKey||f.metaKey)||f.ctrlKey&&f.altKey){if(f.char&&1<f.char.length)return f.char;if(f.which)return String.fromCharCode(f.which)}return null;case"compositionend":return rN&&f.locale!=="ko"?null:f.data;default:return null}}var Ite={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function sN(u){var f=u&&u.nodeName&&u.nodeName.toLowerCase();return f==="input"?!!Ite[u.type]:f==="textarea"}function lN(u,f,v,x){ts(x),f=f0(f,"onChange"),0<f.length&&(v=new sk("onChange","change",null,v,x),u.push({event:v,listeners:f}))}var qg=null,Wg=null;function $te(u){CN(u,0)}function l0(u){var f=eh(u);if(re(f))return u}function Ate(u,f){if(u==="change")return f}var cN=!1;if(s){var hk;if(s){var pk="oninput"in document;if(!pk){var uN=document.createElement("div");uN.setAttribute("oninput","return;"),pk=typeof uN.oninput=="function"}hk=pk}else hk=!1;cN=hk&&(!document.documentMode||9<document.documentMode)}function dN(){qg&&(qg.detachEvent("onpropertychange",fN),Wg=qg=null)}function fN(u){if(u.propertyName==="value"&&l0(Wg)){var f=[];lN(f,Wg,u,$l(u)),We($te,f)}}function Mte(u,f,v){u==="focusin"?(dN(),qg=f,Wg=v,qg.attachEvent("onpropertychange",fN)):u==="focusout"&&dN()}function Nte(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return l0(Wg)}function jte(u,f){if(u==="click")return l0(f)}function Dte(u,f){if(u==="input"||u==="change")return l0(f)}function Lte(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var rs=typeof Object.is=="function"?Object.is:Lte;function Ug(u,f){if(rs(u,f))return!0;if(typeof u!="object"||u===null||typeof f!="object"||f===null)return!1;var v=Object.keys(u),x=Object.keys(f);if(v.length!==x.length)return!1;for(x=0;x<v.length;x++){var R=v[x];if(!l.call(f,R)||!rs(u[R],f[R]))return!1}return!0}function hN(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function pN(u,f){var v=hN(u);u=0;for(var x;v;){if(v.nodeType===3){if(x=u+v.textContent.length,u<=f&&x>=f)return{node:v,offset:f-u};u=x}e:{for(;v;){if(v.nextSibling){v=v.nextSibling;break e}v=v.parentNode}v=void 0}v=hN(v)}}function gN(u,f){return u&&f?u===f?!0:u&&u.nodeType===3?!1:f&&f.nodeType===3?gN(u,f.parentNode):"contains"in u?u.contains(f):u.compareDocumentPosition?!!(u.compareDocumentPosition(f)&16):!1:!1}function mN(){for(var u=window,f=ye();f instanceof u.HTMLIFrameElement;){try{var v=typeof f.contentWindow.location.href=="string"}catch{v=!1}if(v)u=f.contentWindow;else break;f=ye(u.document)}return f}function gk(u){var f=u&&u.nodeName&&u.nodeName.toLowerCase();return f&&(f==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||f==="textarea"||u.contentEditable==="true")}function Qte(u){var f=mN(),v=u.focusedElem,x=u.selectionRange;if(f!==v&&v&&v.ownerDocument&&gN(v.ownerDocument.documentElement,v)){if(x!==null&&gk(v)){if(f=x.start,u=x.end,u===void 0&&(u=f),"selectionStart"in v)v.selectionStart=f,v.selectionEnd=Math.min(u,v.value.length);else if(u=(f=v.ownerDocument||document)&&f.defaultView||window,u.getSelection){u=u.getSelection();var R=v.textContent.length,I=Math.min(x.start,R);x=x.end===void 0?I:Math.min(x.end,R),!u.extend&&I>x&&(R=x,x=I,I=R),R=pN(v,I);var L=pN(v,x);R&&L&&(u.rangeCount!==1||u.anchorNode!==R.node||u.anchorOffset!==R.offset||u.focusNode!==L.node||u.focusOffset!==L.offset)&&(f=f.createRange(),f.setStart(R.node,R.offset),u.removeAllRanges(),I>x?(u.addRange(f),u.extend(L.node,L.offset)):(f.setEnd(L.node,L.offset),u.addRange(f)))}}for(f=[],u=v;u=u.parentNode;)u.nodeType===1&&f.push({element:u,left:u.scrollLeft,top:u.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<f.length;v++)u=f[v],u.element.scrollLeft=u.left,u.element.scrollTop=u.top}}var Vte=s&&"documentMode"in document&&11>=document.documentMode,Gf=null,mk=null,Hg=null,vk=!1;function vN(u,f,v){var x=v.window===v?v.document:v.nodeType===9?v:v.ownerDocument;vk||Gf==null||Gf!==ye(x)||(x=Gf,"selectionStart"in x&&gk(x)?x={start:x.selectionStart,end:x.selectionEnd}:(x=(x.ownerDocument&&x.ownerDocument.defaultView||window).getSelection(),x={anchorNode:x.anchorNode,anchorOffset:x.anchorOffset,focusNode:x.focusNode,focusOffset:x.focusOffset}),Hg&&Ug(Hg,x)||(Hg=x,x=f0(mk,"onSelect"),0<x.length&&(f=new sk("onSelect","select",null,f,v),u.push({event:f,listeners:x}),f.target=Gf)))}function c0(u,f){var v={};return v[u.toLowerCase()]=f.toLowerCase(),v["Webkit"+u]="webkit"+f,v["Moz"+u]="moz"+f,v}var Yf={animationend:c0("Animation","AnimationEnd"),animationiteration:c0("Animation","AnimationIteration"),animationstart:c0("Animation","AnimationStart"),transitionend:c0("Transition","TransitionEnd")},yk={},yN={};s&&(yN=document.createElement("div").style,"AnimationEvent"in window||(delete Yf.animationend.animation,delete Yf.animationiteration.animation,delete Yf.animationstart.animation),"TransitionEvent"in window||delete Yf.transitionend.transition);function u0(u){if(yk[u])return yk[u];if(!Yf[u])return u;var f=Yf[u],v;for(v in f)if(f.hasOwnProperty(v)&&v in yN)return yk[u]=f[v];return u}var bN=u0("animationend"),ON=u0("animationiteration"),wN=u0("animationstart"),SN=u0("transitionend"),xN=new Map,PN="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Qc(u,f){xN.set(u,f),o(f,[u])}for(var bk=0;bk<PN.length;bk++){var Ok=PN[bk],Fte=Ok.toLowerCase(),Bte=Ok[0].toUpperCase()+Ok.slice(1);Qc(Fte,"on"+Bte)}Qc(bN,"onAnimationEnd"),Qc(ON,"onAnimationIteration"),Qc(wN,"onAnimationStart"),Qc("dblclick","onDoubleClick"),Qc("focusin","onFocus"),Qc("focusout","onBlur"),Qc(SN,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xg="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),zte=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xg));function kN(u,f,v){var x=u.type||"unknown-event";u.currentTarget=v,tt(x,f,void 0,u),u.currentTarget=null}function CN(u,f){f=(f&4)!==0;for(var v=0;v<u.length;v++){var x=u[v],R=x.event;x=x.listeners;e:{var I=void 0;if(f)for(var L=x.length-1;0<=L;L--){var K=x[L],ae=K.instance,be=K.currentTarget;if(K=K.listener,ae!==I&&R.isPropagationStopped())break e;kN(R,K,be),I=ae}else for(L=0;L<x.length;L++){if(K=x[L],ae=K.instance,be=K.currentTarget,K=K.listener,ae!==I&&R.isPropagationStopped())break e;kN(R,K,be),I=ae}}}if(te)throw u=ce,te=!1,ce=null,u}function sn(u,f){var v=f[Ek];v===void 0&&(v=f[Ek]=new Set);var x=u+"__bubble";v.has(x)||(TN(f,u,2,!1),v.add(x))}function wk(u,f,v){var x=0;f&&(x|=4),TN(v,u,x,f)}var d0="_reactListening"+Math.random().toString(36).slice(2);function Zg(u){if(!u[d0]){u[d0]=!0,n.forEach(function(v){v!=="selectionchange"&&(zte.has(v)||wk(v,!1,u),wk(v,!0,u))});var f=u.nodeType===9?u:u.ownerDocument;f===null||f[d0]||(f[d0]=!0,wk("selectionchange",!1,f))}}function TN(u,f,v,x){switch(GM(f)){case 1:var R=nte;break;case 4:R=ite;break;default:R=ik}v=R.bind(null,f,v,u),R=void 0,!at||f!=="touchstart"&&f!=="touchmove"&&f!=="wheel"||(R=!0),x?R!==void 0?u.addEventListener(f,v,{capture:!0,passive:R}):u.addEventListener(f,v,!0):R!==void 0?u.addEventListener(f,v,{passive:R}):u.addEventListener(f,v,!1)}function Sk(u,f,v,x,R){var I=x;if((f&1)===0&&(f&2)===0&&x!==null)e:for(;;){if(x===null)return;var L=x.tag;if(L===3||L===4){var K=x.stateNode.containerInfo;if(K===R||K.nodeType===8&&K.parentNode===R)break;if(L===4)for(L=x.return;L!==null;){var ae=L.tag;if((ae===3||ae===4)&&(ae=L.stateNode.containerInfo,ae===R||ae.nodeType===8&&ae.parentNode===R))return;L=L.return}for(;K!==null;){if(L=hd(K),L===null)return;if(ae=L.tag,ae===5||ae===6){x=I=L;continue e}K=K.parentNode}}x=x.return}We(function(){var be=I,_e=$l(v),Re=[];e:{var Ee=xN.get(u);if(Ee!==void 0){var He=sk,Je=u;switch(u){case"keypress":if(o0(v)===0)break e;case"keydown":case"keyup":He=bte;break;case"focusin":Je="focus",He=uk;break;case"focusout":Je="blur",He=uk;break;case"beforeblur":case"afterblur":He=uk;break;case"click":if(v.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":He=JM;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":He=ste;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":He=Ste;break;case bN:case ON:case wN:He=ute;break;case SN:He=Pte;break;case"scroll":He=ote;break;case"wheel":He=Cte;break;case"copy":case"cut":case"paste":He=fte;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":He=tN}var rt=(f&4)!==0,Ln=!rt&&u==="scroll",he=rt?Ee!==null?Ee+"Capture":null:Ee;rt=[];for(var se=be,pe;se!==null;){pe=se;var Ne=pe.stateNode;if(pe.tag===5&&Ne!==null&&(pe=Ne,he!==null&&(Ne=wt(se,he),Ne!=null&&rt.push(Gg(se,Ne,pe)))),Ln)break;se=se.return}0<rt.length&&(Ee=new He(Ee,Je,null,v,_e),Re.push({event:Ee,listeners:rt}))}}if((f&7)===0){e:{if(Ee=u==="mouseover"||u==="pointerover",He=u==="mouseout"||u==="pointerout",Ee&&v!==$c&&(Je=v.relatedTarget||v.fromElement)&&(hd(Je)||Je[Ml]))break e;if((He||Ee)&&(Ee=_e.window===_e?_e:(Ee=_e.ownerDocument)?Ee.defaultView||Ee.parentWindow:window,He?(Je=v.relatedTarget||v.toElement,He=be,Je=Je?hd(Je):null,Je!==null&&(Ln=Ot(Je),Je!==Ln||Je.tag!==5&&Je.tag!==6)&&(Je=null)):(He=null,Je=be),He!==Je)){if(rt=JM,Ne="onMouseLeave",he="onMouseEnter",se="mouse",(u==="pointerout"||u==="pointerover")&&(rt=tN,Ne="onPointerLeave",he="onPointerEnter",se="pointer"),Ln=He==null?Ee:eh(He),pe=Je==null?Ee:eh(Je),Ee=new rt(Ne,se+"leave",He,v,_e),Ee.target=Ln,Ee.relatedTarget=pe,Ne=null,hd(_e)===be&&(rt=new rt(he,se+"enter",Je,v,_e),rt.target=pe,rt.relatedTarget=Ln,Ne=rt),Ln=Ne,He&&Je)t:{for(rt=He,he=Je,se=0,pe=rt;pe;pe=Kf(pe))se++;for(pe=0,Ne=he;Ne;Ne=Kf(Ne))pe++;for(;0<se-pe;)rt=Kf(rt),se--;for(;0<pe-se;)he=Kf(he),pe--;for(;se--;){if(rt===he||he!==null&&rt===he.alternate)break t;rt=Kf(rt),he=Kf(he)}rt=null}else rt=null;He!==null&&EN(Re,Ee,He,rt,!1),Je!==null&&Ln!==null&&EN(Re,Ln,Je,rt,!0)}}e:{if(Ee=be?eh(be):window,He=Ee.nodeName&&Ee.nodeName.toLowerCase(),He==="select"||He==="input"&&Ee.type==="file")var ot=Ate;else if(sN(Ee))if(cN)ot=Dte;else{ot=Nte;var yt=Mte}else(He=Ee.nodeName)&&He.toLowerCase()==="input"&&(Ee.type==="checkbox"||Ee.type==="radio")&&(ot=jte);if(ot&&(ot=ot(u,be))){lN(Re,ot,v,_e);break e}yt&&yt(u,Ee,be),u==="focusout"&&(yt=Ee._wrapperState)&&yt.controlled&&Ee.type==="number"&&yr(Ee,"number",Ee.value)}switch(yt=be?eh(be):window,u){case"focusin":(sN(yt)||yt.contentEditable==="true")&&(Gf=yt,mk=be,Hg=null);break;case"focusout":Hg=mk=Gf=null;break;case"mousedown":vk=!0;break;case"contextmenu":case"mouseup":case"dragend":vk=!1,vN(Re,v,_e);break;case"selectionchange":if(Vte)break;case"keydown":case"keyup":vN(Re,v,_e)}var bt;if(fk)e:{switch(u){case"compositionstart":var kt="onCompositionStart";break e;case"compositionend":kt="onCompositionEnd";break e;case"compositionupdate":kt="onCompositionUpdate";break e}kt=void 0}else Zf?oN(u,v)&&(kt="onCompositionEnd"):u==="keydown"&&v.keyCode===229&&(kt="onCompositionStart");kt&&(rN&&v.locale!=="ko"&&(Zf||kt!=="onCompositionStart"?kt==="onCompositionEnd"&&Zf&&(bt=YM()):(Lc=_e,ak="value"in Lc?Lc.value:Lc.textContent,Zf=!0)),yt=f0(be,kt),0<yt.length&&(kt=new eN(kt,u,null,v,_e),Re.push({event:kt,listeners:yt}),bt?kt.data=bt:(bt=aN(v),bt!==null&&(kt.data=bt)))),(bt=Ete?_te(u,v):Rte(u,v))&&(be=f0(be,"onBeforeInput"),0<be.length&&(_e=new eN("onBeforeInput","beforeinput",null,v,_e),Re.push({event:_e,listeners:be}),_e.data=bt))}CN(Re,f)})}function Gg(u,f,v){return{instance:u,listener:f,currentTarget:v}}function f0(u,f){for(var v=f+"Capture",x=[];u!==null;){var R=u,I=R.stateNode;R.tag===5&&I!==null&&(R=I,I=wt(u,v),I!=null&&x.unshift(Gg(u,I,R)),I=wt(u,f),I!=null&&x.push(Gg(u,I,R))),u=u.return}return x}function Kf(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5);return u||null}function EN(u,f,v,x,R){for(var I=f._reactName,L=[];v!==null&&v!==x;){var K=v,ae=K.alternate,be=K.stateNode;if(ae!==null&&ae===x)break;K.tag===5&&be!==null&&(K=be,R?(ae=wt(v,I),ae!=null&&L.unshift(Gg(v,ae,K))):R||(ae=wt(v,I),ae!=null&&L.push(Gg(v,ae,K)))),v=v.return}L.length!==0&&u.push({event:f,listeners:L})}var qte=/\r\n?/g,Wte=/\u0000|\uFFFD/g;function _N(u){return(typeof u=="string"?u:""+u).replace(qte,`
|
|
38
38
|
`).replace(Wte,"")}function h0(u,f,v){if(f=_N(f),_N(u)!==f&&v)throw Error(r(425))}function p0(){}var xk=null,Pk=null;function kk(u,f){return u==="textarea"||u==="noscript"||typeof f.children=="string"||typeof f.children=="number"||typeof f.dangerouslySetInnerHTML=="object"&&f.dangerouslySetInnerHTML!==null&&f.dangerouslySetInnerHTML.__html!=null}var Ck=typeof setTimeout=="function"?setTimeout:void 0,Ute=typeof clearTimeout=="function"?clearTimeout:void 0,RN=typeof Promise=="function"?Promise:void 0,Hte=typeof queueMicrotask=="function"?queueMicrotask:typeof RN<"u"?function(u){return RN.resolve(null).then(u).catch(Xte)}:Ck;function Xte(u){setTimeout(function(){throw u})}function Tk(u,f){var v=f,x=0;do{var R=v.nextSibling;if(u.removeChild(v),R&&R.nodeType===8)if(v=R.data,v==="/$"){if(x===0){u.removeChild(R),Vg(f);return}x--}else v!=="$"&&v!=="$?"&&v!=="$!"||x++;v=R}while(v);Vg(f)}function Vc(u){for(;u!=null;u=u.nextSibling){var f=u.nodeType;if(f===1||f===3)break;if(f===8){if(f=u.data,f==="$"||f==="$!"||f==="$?")break;if(f==="/$")return null}}return u}function IN(u){u=u.previousSibling;for(var f=0;u;){if(u.nodeType===8){var v=u.data;if(v==="$"||v==="$!"||v==="$?"){if(f===0)return u;f--}else v==="/$"&&f++}u=u.previousSibling}return null}var Jf=Math.random().toString(36).slice(2),Ms="__reactFiber$"+Jf,Yg="__reactProps$"+Jf,Ml="__reactContainer$"+Jf,Ek="__reactEvents$"+Jf,Zte="__reactListeners$"+Jf,Gte="__reactHandles$"+Jf;function hd(u){var f=u[Ms];if(f)return f;for(var v=u.parentNode;v;){if(f=v[Ml]||v[Ms]){if(v=f.alternate,f.child!==null||v!==null&&v.child!==null)for(u=IN(u);u!==null;){if(v=u[Ms])return v;u=IN(u)}return f}u=v,v=u.parentNode}return null}function Kg(u){return u=u[Ms]||u[Ml],!u||u.tag!==5&&u.tag!==6&&u.tag!==13&&u.tag!==3?null:u}function eh(u){if(u.tag===5||u.tag===6)return u.stateNode;throw Error(r(33))}function g0(u){return u[Yg]||null}var _k=[],th=-1;function Fc(u){return{current:u}}function ln(u){0>th||(u.current=_k[th],_k[th]=null,th--)}function Ur(u,f){th++,_k[th]=u.current,u.current=f}var Bc={},Hi=Fc(Bc),bo=Fc(!1),pd=Bc;function rh(u,f){var v=u.type.contextTypes;if(!v)return Bc;var x=u.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===f)return x.__reactInternalMemoizedMaskedChildContext;var R={},I;for(I in v)R[I]=f[I];return x&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=f,u.__reactInternalMemoizedMaskedChildContext=R),R}function Oo(u){return u=u.childContextTypes,u!=null}function m0(){ln(bo),ln(Hi)}function $N(u,f,v){if(Hi.current!==Bc)throw Error(r(168));Ur(Hi,f),Ur(bo,v)}function AN(u,f,v){var x=u.stateNode;if(f=f.childContextTypes,typeof x.getChildContext!="function")return v;x=x.getChildContext();for(var R in x)if(!(R in f))throw Error(r(108,Oe(u)||"Unknown",R));return z({},v,x)}function v0(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||Bc,pd=Hi.current,Ur(Hi,u),Ur(bo,bo.current),!0}function MN(u,f,v){var x=u.stateNode;if(!x)throw Error(r(169));v?(u=AN(u,f,pd),x.__reactInternalMemoizedMergedChildContext=u,ln(bo),ln(Hi),Ur(Hi,u)):ln(bo),Ur(bo,v)}var Nl=null,y0=!1,Rk=!1;function NN(u){Nl===null?Nl=[u]:Nl.push(u)}function Yte(u){y0=!0,NN(u)}function zc(){if(!Rk&&Nl!==null){Rk=!0;var u=0,f=$r;try{var v=Nl;for($r=1;u<v.length;u++){var x=v[u];do x=x(!0);while(x!==null)}Nl=null,y0=!1}catch(R){throw Nl!==null&&(Nl=Nl.slice(u+1)),vt(Wn,zc),R}finally{$r=f,Rk=!1}}return null}var nh=[],ih=0,b0=null,O0=0,xa=[],Pa=0,gd=null,jl=1,Dl="";function md(u,f){nh[ih++]=O0,nh[ih++]=b0,b0=u,O0=f}function jN(u,f,v){xa[Pa++]=jl,xa[Pa++]=Dl,xa[Pa++]=gd,gd=u;var x=jl;u=Dl;var R=32-yo(x)-1;x&=~(1<<R),v+=1;var I=32-yo(f)+R;if(30<I){var L=R-R%5;I=(x&(1<<L)-1).toString(32),x>>=L,R-=L,jl=1<<32-yo(f)+R|v<<R|x,Dl=I+u}else jl=1<<I|v<<R|x,Dl=u}function Ik(u){u.return!==null&&(md(u,1),jN(u,1,0))}function $k(u){for(;u===b0;)b0=nh[--ih],nh[ih]=null,O0=nh[--ih],nh[ih]=null;for(;u===gd;)gd=xa[--Pa],xa[Pa]=null,Dl=xa[--Pa],xa[Pa]=null,jl=xa[--Pa],xa[Pa]=null}var Zo=null,Go=null,wn=!1,ns=null;function DN(u,f){var v=Ea(5,null,null,0);v.elementType="DELETED",v.stateNode=f,v.return=u,f=u.deletions,f===null?(u.deletions=[v],u.flags|=16):f.push(v)}function LN(u,f){switch(u.tag){case 5:var v=u.type;return f=f.nodeType!==1||v.toLowerCase()!==f.nodeName.toLowerCase()?null:f,f!==null?(u.stateNode=f,Zo=u,Go=Vc(f.firstChild),!0):!1;case 6:return f=u.pendingProps===""||f.nodeType!==3?null:f,f!==null?(u.stateNode=f,Zo=u,Go=null,!0):!1;case 13:return f=f.nodeType!==8?null:f,f!==null?(v=gd!==null?{id:jl,overflow:Dl}:null,u.memoizedState={dehydrated:f,treeContext:v,retryLane:1073741824},v=Ea(18,null,null,0),v.stateNode=f,v.return=u,u.child=v,Zo=u,Go=null,!0):!1;default:return!1}}function Ak(u){return(u.mode&1)!==0&&(u.flags&128)===0}function Mk(u){if(wn){var f=Go;if(f){var v=f;if(!LN(u,f)){if(Ak(u))throw Error(r(418));f=Vc(v.nextSibling);var x=Zo;f&&LN(u,f)?DN(x,v):(u.flags=u.flags&-4097|2,wn=!1,Zo=u)}}else{if(Ak(u))throw Error(r(418));u.flags=u.flags&-4097|2,wn=!1,Zo=u}}}function QN(u){for(u=u.return;u!==null&&u.tag!==5&&u.tag!==3&&u.tag!==13;)u=u.return;Zo=u}function w0(u){if(u!==Zo)return!1;if(!wn)return QN(u),wn=!0,!1;var f;if((f=u.tag!==3)&&!(f=u.tag!==5)&&(f=u.type,f=f!=="head"&&f!=="body"&&!kk(u.type,u.memoizedProps)),f&&(f=Go)){if(Ak(u))throw VN(),Error(r(418));for(;f;)DN(u,f),f=Vc(f.nextSibling)}if(QN(u),u.tag===13){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));e:{for(u=u.nextSibling,f=0;u;){if(u.nodeType===8){var v=u.data;if(v==="/$"){if(f===0){Go=Vc(u.nextSibling);break e}f--}else v!=="$"&&v!=="$!"&&v!=="$?"||f++}u=u.nextSibling}Go=null}}else Go=Zo?Vc(u.stateNode.nextSibling):null;return!0}function VN(){for(var u=Go;u;)u=Vc(u.nextSibling)}function oh(){Go=Zo=null,wn=!1}function Nk(u){ns===null?ns=[u]:ns.push(u)}var Kte=T.ReactCurrentBatchConfig;function Jg(u,f,v){if(u=v.ref,u!==null&&typeof u!="function"&&typeof u!="object"){if(v._owner){if(v=v._owner,v){if(v.tag!==1)throw Error(r(309));var x=v.stateNode}if(!x)throw Error(r(147,u));var R=x,I=""+u;return f!==null&&f.ref!==null&&typeof f.ref=="function"&&f.ref._stringRef===I?f.ref:(f=function(L){var K=R.refs;L===null?delete K[I]:K[I]=L},f._stringRef=I,f)}if(typeof u!="string")throw Error(r(284));if(!v._owner)throw Error(r(290,u))}return u}function S0(u,f){throw u=Object.prototype.toString.call(f),Error(r(31,u==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":u))}function FN(u){var f=u._init;return f(u._payload)}function BN(u){function f(he,se){if(u){var pe=he.deletions;pe===null?(he.deletions=[se],he.flags|=16):pe.push(se)}}function v(he,se){if(!u)return null;for(;se!==null;)f(he,se),se=se.sibling;return null}function x(he,se){for(he=new Map;se!==null;)se.key!==null?he.set(se.key,se):he.set(se.index,se),se=se.sibling;return he}function R(he,se){return he=Yc(he,se),he.index=0,he.sibling=null,he}function I(he,se,pe){return he.index=pe,u?(pe=he.alternate,pe!==null?(pe=pe.index,pe<se?(he.flags|=2,se):pe):(he.flags|=2,se)):(he.flags|=1048576,se)}function L(he){return u&&he.alternate===null&&(he.flags|=2),he}function K(he,se,pe,Ne){return se===null||se.tag!==6?(se=CC(pe,he.mode,Ne),se.return=he,se):(se=R(se,pe),se.return=he,se)}function ae(he,se,pe,Ne){var ot=pe.type;return ot===_?_e(he,se,pe.props.children,Ne,pe.key):se!==null&&(se.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===Y&&FN(ot)===se.type)?(Ne=R(se,pe.props),Ne.ref=Jg(he,se,pe),Ne.return=he,Ne):(Ne=U0(pe.type,pe.key,pe.props,null,he.mode,Ne),Ne.ref=Jg(he,se,pe),Ne.return=he,Ne)}function be(he,se,pe,Ne){return se===null||se.tag!==4||se.stateNode.containerInfo!==pe.containerInfo||se.stateNode.implementation!==pe.implementation?(se=TC(pe,he.mode,Ne),se.return=he,se):(se=R(se,pe.children||[]),se.return=he,se)}function _e(he,se,pe,Ne,ot){return se===null||se.tag!==7?(se=Pd(pe,he.mode,Ne,ot),se.return=he,se):(se=R(se,pe),se.return=he,se)}function Re(he,se,pe){if(typeof se=="string"&&se!==""||typeof se=="number")return se=CC(""+se,he.mode,pe),se.return=he,se;if(typeof se=="object"&&se!==null){switch(se.$$typeof){case C:return pe=U0(se.type,se.key,se.props,null,he.mode,pe),pe.ref=Jg(he,null,se),pe.return=he,pe;case E:return se=TC(se,he.mode,pe),se.return=he,se;case Y:var Ne=se._init;return Re(he,Ne(se._payload),pe)}if(ur(se)||ne(se))return se=Pd(se,he.mode,pe,null),se.return=he,se;S0(he,se)}return null}function Ee(he,se,pe,Ne){var ot=se!==null?se.key:null;if(typeof pe=="string"&&pe!==""||typeof pe=="number")return ot!==null?null:K(he,se,""+pe,Ne);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case C:return pe.key===ot?ae(he,se,pe,Ne):null;case E:return pe.key===ot?be(he,se,pe,Ne):null;case Y:return ot=pe._init,Ee(he,se,ot(pe._payload),Ne)}if(ur(pe)||ne(pe))return ot!==null?null:_e(he,se,pe,Ne,null);S0(he,pe)}return null}function He(he,se,pe,Ne,ot){if(typeof Ne=="string"&&Ne!==""||typeof Ne=="number")return he=he.get(pe)||null,K(se,he,""+Ne,ot);if(typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case C:return he=he.get(Ne.key===null?pe:Ne.key)||null,ae(se,he,Ne,ot);case E:return he=he.get(Ne.key===null?pe:Ne.key)||null,be(se,he,Ne,ot);case Y:var yt=Ne._init;return He(he,se,pe,yt(Ne._payload),ot)}if(ur(Ne)||ne(Ne))return he=he.get(pe)||null,_e(se,he,Ne,ot,null);S0(se,Ne)}return null}function Je(he,se,pe,Ne){for(var ot=null,yt=null,bt=se,kt=se=0,vi=null;bt!==null&&kt<pe.length;kt++){bt.index>kt?(vi=bt,bt=null):vi=bt.sibling;var gr=Ee(he,bt,pe[kt],Ne);if(gr===null){bt===null&&(bt=vi);break}u&&bt&&gr.alternate===null&&f(he,bt),se=I(gr,se,kt),yt===null?ot=gr:yt.sibling=gr,yt=gr,bt=vi}if(kt===pe.length)return v(he,bt),wn&&md(he,kt),ot;if(bt===null){for(;kt<pe.length;kt++)bt=Re(he,pe[kt],Ne),bt!==null&&(se=I(bt,se,kt),yt===null?ot=bt:yt.sibling=bt,yt=bt);return wn&&md(he,kt),ot}for(bt=x(he,bt);kt<pe.length;kt++)vi=He(bt,he,kt,pe[kt],Ne),vi!==null&&(u&&vi.alternate!==null&&bt.delete(vi.key===null?kt:vi.key),se=I(vi,se,kt),yt===null?ot=vi:yt.sibling=vi,yt=vi);return u&&bt.forEach(function(Kc){return f(he,Kc)}),wn&&md(he,kt),ot}function rt(he,se,pe,Ne){var ot=ne(pe);if(typeof ot!="function")throw Error(r(150));if(pe=ot.call(pe),pe==null)throw Error(r(151));for(var yt=ot=null,bt=se,kt=se=0,vi=null,gr=pe.next();bt!==null&&!gr.done;kt++,gr=pe.next()){bt.index>kt?(vi=bt,bt=null):vi=bt.sibling;var Kc=Ee(he,bt,gr.value,Ne);if(Kc===null){bt===null&&(bt=vi);break}u&&bt&&Kc.alternate===null&&f(he,bt),se=I(Kc,se,kt),yt===null?ot=Kc:yt.sibling=Kc,yt=Kc,bt=vi}if(gr.done)return v(he,bt),wn&&md(he,kt),ot;if(bt===null){for(;!gr.done;kt++,gr=pe.next())gr=Re(he,gr.value,Ne),gr!==null&&(se=I(gr,se,kt),yt===null?ot=gr:yt.sibling=gr,yt=gr);return wn&&md(he,kt),ot}for(bt=x(he,bt);!gr.done;kt++,gr=pe.next())gr=He(bt,he,kt,gr.value,Ne),gr!==null&&(u&&gr.alternate!==null&&bt.delete(gr.key===null?kt:gr.key),se=I(gr,se,kt),yt===null?ot=gr:yt.sibling=gr,yt=gr);return u&&bt.forEach(function(Ire){return f(he,Ire)}),wn&&md(he,kt),ot}function Ln(he,se,pe,Ne){if(typeof pe=="object"&&pe!==null&&pe.type===_&&pe.key===null&&(pe=pe.props.children),typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case C:e:{for(var ot=pe.key,yt=se;yt!==null;){if(yt.key===ot){if(ot=pe.type,ot===_){if(yt.tag===7){v(he,yt.sibling),se=R(yt,pe.props.children),se.return=he,he=se;break e}}else if(yt.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===Y&&FN(ot)===yt.type){v(he,yt.sibling),se=R(yt,pe.props),se.ref=Jg(he,yt,pe),se.return=he,he=se;break e}v(he,yt);break}else f(he,yt);yt=yt.sibling}pe.type===_?(se=Pd(pe.props.children,he.mode,Ne,pe.key),se.return=he,he=se):(Ne=U0(pe.type,pe.key,pe.props,null,he.mode,Ne),Ne.ref=Jg(he,se,pe),Ne.return=he,he=Ne)}return L(he);case E:e:{for(yt=pe.key;se!==null;){if(se.key===yt)if(se.tag===4&&se.stateNode.containerInfo===pe.containerInfo&&se.stateNode.implementation===pe.implementation){v(he,se.sibling),se=R(se,pe.children||[]),se.return=he,he=se;break e}else{v(he,se);break}else f(he,se);se=se.sibling}se=TC(pe,he.mode,Ne),se.return=he,he=se}return L(he);case Y:return yt=pe._init,Ln(he,se,yt(pe._payload),Ne)}if(ur(pe))return Je(he,se,pe,Ne);if(ne(pe))return rt(he,se,pe,Ne);S0(he,pe)}return typeof pe=="string"&&pe!==""||typeof pe=="number"?(pe=""+pe,se!==null&&se.tag===6?(v(he,se.sibling),se=R(se,pe),se.return=he,he=se):(v(he,se),se=CC(pe,he.mode,Ne),se.return=he,he=se),L(he)):v(he,se)}return Ln}var ah=BN(!0),zN=BN(!1),x0=Fc(null),P0=null,sh=null,jk=null;function Dk(){jk=sh=P0=null}function Lk(u){var f=x0.current;ln(x0),u._currentValue=f}function Qk(u,f,v){for(;u!==null;){var x=u.alternate;if((u.childLanes&f)!==f?(u.childLanes|=f,x!==null&&(x.childLanes|=f)):x!==null&&(x.childLanes&f)!==f&&(x.childLanes|=f),u===v)break;u=u.return}}function lh(u,f){P0=u,jk=sh=null,u=u.dependencies,u!==null&&u.firstContext!==null&&((u.lanes&f)!==0&&(wo=!0),u.firstContext=null)}function ka(u){var f=u._currentValue;if(jk!==u)if(u={context:u,memoizedValue:f,next:null},sh===null){if(P0===null)throw Error(r(308));sh=u,P0.dependencies={lanes:0,firstContext:u}}else sh=sh.next=u;return f}var vd=null;function Vk(u){vd===null?vd=[u]:vd.push(u)}function qN(u,f,v,x){var R=f.interleaved;return R===null?(v.next=v,Vk(f)):(v.next=R.next,R.next=v),f.interleaved=v,Ll(u,x)}function Ll(u,f){u.lanes|=f;var v=u.alternate;for(v!==null&&(v.lanes|=f),v=u,u=u.return;u!==null;)u.childLanes|=f,v=u.alternate,v!==null&&(v.childLanes|=f),v=u,u=u.return;return v.tag===3?v.stateNode:null}var qc=!1;function Fk(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function WN(u,f){u=u.updateQueue,f.updateQueue===u&&(f.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects})}function Ql(u,f){return{eventTime:u,lane:f,tag:0,payload:null,callback:null,next:null}}function Wc(u,f,v){var x=u.updateQueue;if(x===null)return null;if(x=x.shared,(dr&2)!==0){var R=x.pending;return R===null?f.next=f:(f.next=R.next,R.next=f),x.pending=f,Ll(u,v)}return R=x.interleaved,R===null?(f.next=f,Vk(x)):(f.next=R.next,R.next=f),x.interleaved=f,Ll(u,v)}function k0(u,f,v){if(f=f.updateQueue,f!==null&&(f=f.shared,(v&4194240)!==0)){var x=f.lanes;x&=u.pendingLanes,v|=x,f.lanes=v,tk(u,v)}}function UN(u,f){var v=u.updateQueue,x=u.alternate;if(x!==null&&(x=x.updateQueue,v===x)){var R=null,I=null;if(v=v.firstBaseUpdate,v!==null){do{var L={eventTime:v.eventTime,lane:v.lane,tag:v.tag,payload:v.payload,callback:v.callback,next:null};I===null?R=I=L:I=I.next=L,v=v.next}while(v!==null);I===null?R=I=f:I=I.next=f}else R=I=f;v={baseState:x.baseState,firstBaseUpdate:R,lastBaseUpdate:I,shared:x.shared,effects:x.effects},u.updateQueue=v;return}u=v.lastBaseUpdate,u===null?v.firstBaseUpdate=f:u.next=f,v.lastBaseUpdate=f}function C0(u,f,v,x){var R=u.updateQueue;qc=!1;var I=R.firstBaseUpdate,L=R.lastBaseUpdate,K=R.shared.pending;if(K!==null){R.shared.pending=null;var ae=K,be=ae.next;ae.next=null,L===null?I=be:L.next=be,L=ae;var _e=u.alternate;_e!==null&&(_e=_e.updateQueue,K=_e.lastBaseUpdate,K!==L&&(K===null?_e.firstBaseUpdate=be:K.next=be,_e.lastBaseUpdate=ae))}if(I!==null){var Re=R.baseState;L=0,_e=be=ae=null,K=I;do{var Ee=K.lane,He=K.eventTime;if((x&Ee)===Ee){_e!==null&&(_e=_e.next={eventTime:He,lane:0,tag:K.tag,payload:K.payload,callback:K.callback,next:null});e:{var Je=u,rt=K;switch(Ee=f,He=v,rt.tag){case 1:if(Je=rt.payload,typeof Je=="function"){Re=Je.call(He,Re,Ee);break e}Re=Je;break e;case 3:Je.flags=Je.flags&-65537|128;case 0:if(Je=rt.payload,Ee=typeof Je=="function"?Je.call(He,Re,Ee):Je,Ee==null)break e;Re=z({},Re,Ee);break e;case 2:qc=!0}}K.callback!==null&&K.lane!==0&&(u.flags|=64,Ee=R.effects,Ee===null?R.effects=[K]:Ee.push(K))}else He={eventTime:He,lane:Ee,tag:K.tag,payload:K.payload,callback:K.callback,next:null},_e===null?(be=_e=He,ae=Re):_e=_e.next=He,L|=Ee;if(K=K.next,K===null){if(K=R.shared.pending,K===null)break;Ee=K,K=Ee.next,Ee.next=null,R.lastBaseUpdate=Ee,R.shared.pending=null}}while(!0);if(_e===null&&(ae=Re),R.baseState=ae,R.firstBaseUpdate=be,R.lastBaseUpdate=_e,f=R.shared.interleaved,f!==null){R=f;do L|=R.lane,R=R.next;while(R!==f)}else I===null&&(R.shared.lanes=0);Od|=L,u.lanes=L,u.memoizedState=Re}}function HN(u,f,v){if(u=f.effects,f.effects=null,u!==null)for(f=0;f<u.length;f++){var x=u[f],R=x.callback;if(R!==null){if(x.callback=null,x=v,typeof R!="function")throw Error(r(191,R));R.call(x)}}}var em={},Ns=Fc(em),tm=Fc(em),rm=Fc(em);function yd(u){if(u===em)throw Error(r(174));return u}function Bk(u,f){switch(Ur(rm,f),Ur(tm,u),Ur(Ns,em),u=f.nodeType,u){case 9:case 11:f=(f=f.documentElement)?f.namespaceURI:pi(null,"");break;default:u=u===8?f.parentNode:f,f=u.namespaceURI||null,u=u.tagName,f=pi(f,u)}ln(Ns),Ur(Ns,f)}function ch(){ln(Ns),ln(tm),ln(rm)}function XN(u){yd(rm.current);var f=yd(Ns.current),v=pi(f,u.type);f!==v&&(Ur(tm,u),Ur(Ns,v))}function zk(u){tm.current===u&&(ln(Ns),ln(tm))}var _n=Fc(0);function T0(u){for(var f=u;f!==null;){if(f.tag===13){var v=f.memoizedState;if(v!==null&&(v=v.dehydrated,v===null||v.data==="$?"||v.data==="$!"))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var qk=[];function Wk(){for(var u=0;u<qk.length;u++)qk[u]._workInProgressVersionPrimary=null;qk.length=0}var E0=T.ReactCurrentDispatcher,Uk=T.ReactCurrentBatchConfig,bd=0,Rn=null,ii=null,gi=null,_0=!1,nm=!1,im=0,Jte=0;function Xi(){throw Error(r(321))}function Hk(u,f){if(f===null)return!1;for(var v=0;v<f.length&&v<u.length;v++)if(!rs(u[v],f[v]))return!1;return!0}function Xk(u,f,v,x,R,I){if(bd=I,Rn=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,E0.current=u===null||u.memoizedState===null?nre:ire,u=v(x,R),nm){I=0;do{if(nm=!1,im=0,25<=I)throw Error(r(301));I+=1,gi=ii=null,f.updateQueue=null,E0.current=ore,u=v(x,R)}while(nm)}if(E0.current=$0,f=ii!==null&&ii.next!==null,bd=0,gi=ii=Rn=null,_0=!1,f)throw Error(r(300));return u}function Zk(){var u=im!==0;return im=0,u}function js(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gi===null?Rn.memoizedState=gi=u:gi=gi.next=u,gi}function Ca(){if(ii===null){var u=Rn.alternate;u=u!==null?u.memoizedState:null}else u=ii.next;var f=gi===null?Rn.memoizedState:gi.next;if(f!==null)gi=f,ii=u;else{if(u===null)throw Error(r(310));ii=u,u={memoizedState:ii.memoizedState,baseState:ii.baseState,baseQueue:ii.baseQueue,queue:ii.queue,next:null},gi===null?Rn.memoizedState=gi=u:gi=gi.next=u}return gi}function om(u,f){return typeof f=="function"?f(u):f}function Gk(u){var f=Ca(),v=f.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=u;var x=ii,R=x.baseQueue,I=v.pending;if(I!==null){if(R!==null){var L=R.next;R.next=I.next,I.next=L}x.baseQueue=R=I,v.pending=null}if(R!==null){I=R.next,x=x.baseState;var K=L=null,ae=null,be=I;do{var _e=be.lane;if((bd&_e)===_e)ae!==null&&(ae=ae.next={lane:0,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null}),x=be.hasEagerState?be.eagerState:u(x,be.action);else{var Re={lane:_e,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null};ae===null?(K=ae=Re,L=x):ae=ae.next=Re,Rn.lanes|=_e,Od|=_e}be=be.next}while(be!==null&&be!==I);ae===null?L=x:ae.next=K,rs(x,f.memoizedState)||(wo=!0),f.memoizedState=x,f.baseState=L,f.baseQueue=ae,v.lastRenderedState=x}if(u=v.interleaved,u!==null){R=u;do I=R.lane,Rn.lanes|=I,Od|=I,R=R.next;while(R!==u)}else R===null&&(v.lanes=0);return[f.memoizedState,v.dispatch]}function Yk(u){var f=Ca(),v=f.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=u;var x=v.dispatch,R=v.pending,I=f.memoizedState;if(R!==null){v.pending=null;var L=R=R.next;do I=u(I,L.action),L=L.next;while(L!==R);rs(I,f.memoizedState)||(wo=!0),f.memoizedState=I,f.baseQueue===null&&(f.baseState=I),v.lastRenderedState=I}return[I,x]}function ZN(){}function GN(u,f){var v=Rn,x=Ca(),R=f(),I=!rs(x.memoizedState,R);if(I&&(x.memoizedState=R,wo=!0),x=x.queue,Kk(JN.bind(null,v,x,u),[u]),x.getSnapshot!==f||I||gi!==null&&gi.memoizedState.tag&1){if(v.flags|=2048,am(9,KN.bind(null,v,x,R,f),void 0,null),mi===null)throw Error(r(349));(bd&30)!==0||YN(v,f,R)}return R}function YN(u,f,v){u.flags|=16384,u={getSnapshot:f,value:v},f=Rn.updateQueue,f===null?(f={lastEffect:null,stores:null},Rn.updateQueue=f,f.stores=[u]):(v=f.stores,v===null?f.stores=[u]:v.push(u))}function KN(u,f,v,x){f.value=v,f.getSnapshot=x,ej(f)&&tj(u)}function JN(u,f,v){return v(function(){ej(f)&&tj(u)})}function ej(u){var f=u.getSnapshot;u=u.value;try{var v=f();return!rs(u,v)}catch{return!0}}function tj(u){var f=Ll(u,1);f!==null&&ss(f,u,1,-1)}function rj(u){var f=js();return typeof u=="function"&&(u=u()),f.memoizedState=f.baseState=u,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:om,lastRenderedState:u},f.queue=u,u=u.dispatch=rre.bind(null,Rn,u),[f.memoizedState,u]}function am(u,f,v,x){return u={tag:u,create:f,destroy:v,deps:x,next:null},f=Rn.updateQueue,f===null?(f={lastEffect:null,stores:null},Rn.updateQueue=f,f.lastEffect=u.next=u):(v=f.lastEffect,v===null?f.lastEffect=u.next=u:(x=v.next,v.next=u,u.next=x,f.lastEffect=u)),u}function nj(){return Ca().memoizedState}function R0(u,f,v,x){var R=js();Rn.flags|=u,R.memoizedState=am(1|f,v,void 0,x===void 0?null:x)}function I0(u,f,v,x){var R=Ca();x=x===void 0?null:x;var I=void 0;if(ii!==null){var L=ii.memoizedState;if(I=L.destroy,x!==null&&Hk(x,L.deps)){R.memoizedState=am(f,v,I,x);return}}Rn.flags|=u,R.memoizedState=am(1|f,v,I,x)}function ij(u,f){return R0(8390656,8,u,f)}function Kk(u,f){return I0(2048,8,u,f)}function oj(u,f){return I0(4,2,u,f)}function aj(u,f){return I0(4,4,u,f)}function sj(u,f){if(typeof f=="function")return u=u(),f(u),function(){f(null)};if(f!=null)return u=u(),f.current=u,function(){f.current=null}}function lj(u,f,v){return v=v!=null?v.concat([u]):null,I0(4,4,sj.bind(null,f,u),v)}function Jk(){}function cj(u,f){var v=Ca();f=f===void 0?null:f;var x=v.memoizedState;return x!==null&&f!==null&&Hk(f,x[1])?x[0]:(v.memoizedState=[u,f],u)}function uj(u,f){var v=Ca();f=f===void 0?null:f;var x=v.memoizedState;return x!==null&&f!==null&&Hk(f,x[1])?x[0]:(u=u(),v.memoizedState=[u,f],u)}function dj(u,f,v){return(bd&21)===0?(u.baseState&&(u.baseState=!1,wo=!0),u.memoizedState=v):(rs(v,f)||(v=FM(),Rn.lanes|=v,Od|=v,u.baseState=!0),f)}function ere(u,f){var v=$r;$r=v!==0&&4>v?v:4,u(!0);var x=Uk.transition;Uk.transition={};try{u(!1),f()}finally{$r=v,Uk.transition=x}}function fj(){return Ca().memoizedState}function tre(u,f,v){var x=Zc(u);if(v={lane:x,action:v,hasEagerState:!1,eagerState:null,next:null},hj(u))pj(f,v);else if(v=qN(u,f,v,x),v!==null){var R=ao();ss(v,u,x,R),gj(v,f,x)}}function rre(u,f,v){var x=Zc(u),R={lane:x,action:v,hasEagerState:!1,eagerState:null,next:null};if(hj(u))pj(f,R);else{var I=u.alternate;if(u.lanes===0&&(I===null||I.lanes===0)&&(I=f.lastRenderedReducer,I!==null))try{var L=f.lastRenderedState,K=I(L,v);if(R.hasEagerState=!0,R.eagerState=K,rs(K,L)){var ae=f.interleaved;ae===null?(R.next=R,Vk(f)):(R.next=ae.next,ae.next=R),f.interleaved=R;return}}catch{}finally{}v=qN(u,f,R,x),v!==null&&(R=ao(),ss(v,u,x,R),gj(v,f,x))}}function hj(u){var f=u.alternate;return u===Rn||f!==null&&f===Rn}function pj(u,f){nm=_0=!0;var v=u.pending;v===null?f.next=f:(f.next=v.next,v.next=f),u.pending=f}function gj(u,f,v){if((v&4194240)!==0){var x=f.lanes;x&=u.pendingLanes,v|=x,f.lanes=v,tk(u,v)}}var $0={readContext:ka,useCallback:Xi,useContext:Xi,useEffect:Xi,useImperativeHandle:Xi,useInsertionEffect:Xi,useLayoutEffect:Xi,useMemo:Xi,useReducer:Xi,useRef:Xi,useState:Xi,useDebugValue:Xi,useDeferredValue:Xi,useTransition:Xi,useMutableSource:Xi,useSyncExternalStore:Xi,useId:Xi,unstable_isNewReconciler:!1},nre={readContext:ka,useCallback:function(u,f){return js().memoizedState=[u,f===void 0?null:f],u},useContext:ka,useEffect:ij,useImperativeHandle:function(u,f,v){return v=v!=null?v.concat([u]):null,R0(4194308,4,sj.bind(null,f,u),v)},useLayoutEffect:function(u,f){return R0(4194308,4,u,f)},useInsertionEffect:function(u,f){return R0(4,2,u,f)},useMemo:function(u,f){var v=js();return f=f===void 0?null:f,u=u(),v.memoizedState=[u,f],u},useReducer:function(u,f,v){var x=js();return f=v!==void 0?v(f):f,x.memoizedState=x.baseState=f,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:f},x.queue=u,u=u.dispatch=tre.bind(null,Rn,u),[x.memoizedState,u]},useRef:function(u){var f=js();return u={current:u},f.memoizedState=u},useState:rj,useDebugValue:Jk,useDeferredValue:function(u){return js().memoizedState=u},useTransition:function(){var u=rj(!1),f=u[0];return u=ere.bind(null,u[1]),js().memoizedState=u,[f,u]},useMutableSource:function(){},useSyncExternalStore:function(u,f,v){var x=Rn,R=js();if(wn){if(v===void 0)throw Error(r(407));v=v()}else{if(v=f(),mi===null)throw Error(r(349));(bd&30)!==0||YN(x,f,v)}R.memoizedState=v;var I={value:v,getSnapshot:f};return R.queue=I,ij(JN.bind(null,x,I,u),[u]),x.flags|=2048,am(9,KN.bind(null,x,I,v,f),void 0,null),v},useId:function(){var u=js(),f=mi.identifierPrefix;if(wn){var v=Dl,x=jl;v=(x&~(1<<32-yo(x)-1)).toString(32)+v,f=":"+f+"R"+v,v=im++,0<v&&(f+="H"+v.toString(32)),f+=":"}else v=Jte++,f=":"+f+"r"+v.toString(32)+":";return u.memoizedState=f},unstable_isNewReconciler:!1},ire={readContext:ka,useCallback:cj,useContext:ka,useEffect:Kk,useImperativeHandle:lj,useInsertionEffect:oj,useLayoutEffect:aj,useMemo:uj,useReducer:Gk,useRef:nj,useState:function(){return Gk(om)},useDebugValue:Jk,useDeferredValue:function(u){var f=Ca();return dj(f,ii.memoizedState,u)},useTransition:function(){var u=Gk(om)[0],f=Ca().memoizedState;return[u,f]},useMutableSource:ZN,useSyncExternalStore:GN,useId:fj,unstable_isNewReconciler:!1},ore={readContext:ka,useCallback:cj,useContext:ka,useEffect:Kk,useImperativeHandle:lj,useInsertionEffect:oj,useLayoutEffect:aj,useMemo:uj,useReducer:Yk,useRef:nj,useState:function(){return Yk(om)},useDebugValue:Jk,useDeferredValue:function(u){var f=Ca();return ii===null?f.memoizedState=u:dj(f,ii.memoizedState,u)},useTransition:function(){var u=Yk(om)[0],f=Ca().memoizedState;return[u,f]},useMutableSource:ZN,useSyncExternalStore:GN,useId:fj,unstable_isNewReconciler:!1};function is(u,f){if(u&&u.defaultProps){f=z({},f),u=u.defaultProps;for(var v in u)f[v]===void 0&&(f[v]=u[v]);return f}return f}function eC(u,f,v,x){f=u.memoizedState,v=v(x,f),v=v==null?f:z({},f,v),u.memoizedState=v,u.lanes===0&&(u.updateQueue.baseState=v)}var A0={isMounted:function(u){return(u=u._reactInternals)?Ot(u)===u:!1},enqueueSetState:function(u,f,v){u=u._reactInternals;var x=ao(),R=Zc(u),I=Ql(x,R);I.payload=f,v!=null&&(I.callback=v),f=Wc(u,I,R),f!==null&&(ss(f,u,R,x),k0(f,u,R))},enqueueReplaceState:function(u,f,v){u=u._reactInternals;var x=ao(),R=Zc(u),I=Ql(x,R);I.tag=1,I.payload=f,v!=null&&(I.callback=v),f=Wc(u,I,R),f!==null&&(ss(f,u,R,x),k0(f,u,R))},enqueueForceUpdate:function(u,f){u=u._reactInternals;var v=ao(),x=Zc(u),R=Ql(v,x);R.tag=2,f!=null&&(R.callback=f),f=Wc(u,R,x),f!==null&&(ss(f,u,x,v),k0(f,u,x))}};function mj(u,f,v,x,R,I,L){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(x,I,L):f.prototype&&f.prototype.isPureReactComponent?!Ug(v,x)||!Ug(R,I):!0}function vj(u,f,v){var x=!1,R=Bc,I=f.contextType;return typeof I=="object"&&I!==null?I=ka(I):(R=Oo(f)?pd:Hi.current,x=f.contextTypes,I=(x=x!=null)?rh(u,R):Bc),f=new f(v,I),u.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=A0,u.stateNode=f,f._reactInternals=u,x&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=R,u.__reactInternalMemoizedMaskedChildContext=I),f}function yj(u,f,v,x){u=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(v,x),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(v,x),f.state!==u&&A0.enqueueReplaceState(f,f.state,null)}function tC(u,f,v,x){var R=u.stateNode;R.props=v,R.state=u.memoizedState,R.refs={},Fk(u);var I=f.contextType;typeof I=="object"&&I!==null?R.context=ka(I):(I=Oo(f)?pd:Hi.current,R.context=rh(u,I)),R.state=u.memoizedState,I=f.getDerivedStateFromProps,typeof I=="function"&&(eC(u,f,I,v),R.state=u.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(f=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),f!==R.state&&A0.enqueueReplaceState(R,R.state,null),C0(u,v,R,x),R.state=u.memoizedState),typeof R.componentDidMount=="function"&&(u.flags|=4194308)}function uh(u,f){try{var v="",x=f;do v+=q(x),x=x.return;while(x);var R=v}catch(I){R=`
|
|
39
39
|
Error generating stack: `+I.message+`
|
|
40
|
-
`+I.stack}return{value:u,source:f,stack:R,digest:null}}function rC(u,f,v){return{value:u,source:null,stack:v??null,digest:f??null}}function nC(u,f){try{console.error(f.value)}catch(v){setTimeout(function(){throw v})}}var are=typeof WeakMap=="function"?WeakMap:Map;function bj(u,f,v){v=Ql(-1,v),v.tag=3,v.payload={element:null};var x=f.value;return v.callback=function(){V0||(V0=!0,yC=x),nC(u,f)},v}function Oj(u,f,v){v=Ql(-1,v),v.tag=3;var x=u.type.getDerivedStateFromError;if(typeof x=="function"){var R=f.value;v.payload=function(){return x(R)},v.callback=function(){nC(u,f)}}var I=u.stateNode;return I!==null&&typeof I.componentDidCatch=="function"&&(v.callback=function(){nC(u,f),typeof x!="function"&&(Hc===null?Hc=new Set([this]):Hc.add(this));var L=f.stack;this.componentDidCatch(f.value,{componentStack:L!==null?L:""})}),v}function wj(u,f,v){var x=u.pingCache;if(x===null){x=u.pingCache=new are;var R=new Set;x.set(f,R)}else R=x.get(f),R===void 0&&(R=new Set,x.set(f,R));R.has(v)||(R.add(v),u=Ore.bind(null,u,f,v),f.then(u,u))}function Sj(u){do{var f;if((f=u.tag===13)&&(f=u.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return u;u=u.return}while(u!==null);return null}function xj(u,f,v,x,R){return(u.mode&1)===0?(u===f?u.flags|=65536:(u.flags|=128,v.flags|=131072,v.flags&=-52805,v.tag===1&&(v.alternate===null?v.tag=17:(f=Ql(-1,1),f.tag=2,Wc(v,f,1))),v.lanes|=1),u):(u.flags|=65536,u.lanes=R,u)}var sre=T.ReactCurrentOwner,wo=!1;function oo(u,f,v,x){f.child=u===null?zN(f,null,v,x):ah(f,u.child,v,x)}function Pj(u,f,v,x,R){v=v.render;var I=f.ref;return lh(f,R),x=Xk(u,f,v,x,I,R),v=Zk(),u!==null&&!wo?(f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~R,Vl(u,f,R)):(wn&&v&&Ik(f),f.flags|=1,oo(u,f,x,R),f.child)}function kj(u,f,v,x,R){if(u===null){var I=v.type;return typeof I=="function"&&!kC(I)&&I.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(f.tag=15,f.type=I,Cj(u,f,I,x,R)):(u=U0(v.type,null,x,f,f.mode,R),u.ref=f.ref,u.return=f,f.child=u)}if(I=u.child,(u.lanes&R)===0){var L=I.memoizedProps;if(v=v.compare,v=v!==null?v:Ug,v(L,x)&&u.ref===f.ref)return Vl(u,f,R)}return f.flags|=1,u=Yc(I,x),u.ref=f.ref,u.return=f,f.child=u}function Cj(u,f,v,x,R){if(u!==null){var I=u.memoizedProps;if(Ug(I,x)&&u.ref===f.ref)if(wo=!1,f.pendingProps=x=I,(u.lanes&R)!==0)(u.flags&131072)!==0&&(wo=!0);else return f.lanes=u.lanes,Vl(u,f,R)}return iC(u,f,v,x,R)}function Tj(u,f,v){var x=f.pendingProps,R=x.children,I=u!==null?u.memoizedState:null;if(x.mode==="hidden")if((f.mode&1)===0)f.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ur(fh,Yo),Yo|=v;else{if((v&1073741824)===0)return u=I!==null?I.baseLanes|v:v,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:u,cachePool:null,transitions:null},f.updateQueue=null,Ur(fh,Yo),Yo|=u,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},x=I!==null?I.baseLanes:v,Ur(fh,Yo),Yo|=x}else I!==null?(x=I.baseLanes|v,f.memoizedState=null):x=v,Ur(fh,Yo),Yo|=x;return oo(u,f,R,v),f.child}function Ej(u,f){var v=f.ref;(u===null&&v!==null||u!==null&&u.ref!==v)&&(f.flags|=512,f.flags|=2097152)}function iC(u,f,v,x,R){var I=Oo(v)?pd:Hi.current;return I=rh(f,I),lh(f,R),v=Xk(u,f,v,x,I,R),x=Zk(),u!==null&&!wo?(f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~R,Vl(u,f,R)):(wn&&x&&Ik(f),f.flags|=1,oo(u,f,v,R),f.child)}function _j(u,f,v,x,R){if(Oo(v)){var I=!0;v0(f)}else I=!1;if(lh(f,R),f.stateNode===null)N0(u,f),vj(f,v,x),tC(f,v,x,R),x=!0;else if(u===null){var L=f.stateNode,K=f.memoizedProps;L.props=K;var ae=L.context,be=v.contextType;typeof be=="object"&&be!==null?be=ka(be):(be=Oo(v)?pd:Hi.current,be=rh(f,be));var _e=v.getDerivedStateFromProps,Re=typeof _e=="function"||typeof L.getSnapshotBeforeUpdate=="function";Re||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(K!==x||ae!==be)&&yj(f,L,x,be),qc=!1;var Ee=f.memoizedState;L.state=Ee,C0(f,x,L,R),ae=f.memoizedState,K!==x||Ee!==ae||bo.current||qc?(typeof _e=="function"&&(eC(f,v,_e,x),ae=f.memoizedState),(K=qc||mj(f,v,K,x,Ee,ae,be))?(Re||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount()),typeof L.componentDidMount=="function"&&(f.flags|=4194308)):(typeof L.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=x,f.memoizedState=ae),L.props=x,L.state=ae,L.context=be,x=K):(typeof L.componentDidMount=="function"&&(f.flags|=4194308),x=!1)}else{L=f.stateNode,WN(u,f),K=f.memoizedProps,be=f.type===f.elementType?K:is(f.type,K),L.props=be,Re=f.pendingProps,Ee=L.context,ae=v.contextType,typeof ae=="object"&&ae!==null?ae=ka(ae):(ae=Oo(v)?pd:Hi.current,ae=rh(f,ae));var He=v.getDerivedStateFromProps;(_e=typeof He=="function"||typeof L.getSnapshotBeforeUpdate=="function")||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(K!==Re||Ee!==ae)&&yj(f,L,x,ae),qc=!1,Ee=f.memoizedState,L.state=Ee,C0(f,x,L,R);var Je=f.memoizedState;K!==Re||Ee!==Je||bo.current||qc?(typeof He=="function"&&(eC(f,v,He,x),Je=f.memoizedState),(be=qc||mj(f,v,be,x,Ee,Je,ae)||!1)?(_e||typeof L.UNSAFE_componentWillUpdate!="function"&&typeof L.componentWillUpdate!="function"||(typeof L.componentWillUpdate=="function"&&L.componentWillUpdate(x,Je,ae),typeof L.UNSAFE_componentWillUpdate=="function"&&L.UNSAFE_componentWillUpdate(x,Je,ae)),typeof L.componentDidUpdate=="function"&&(f.flags|=4),typeof L.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof L.componentDidUpdate!="function"||K===u.memoizedProps&&Ee===u.memoizedState||(f.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||K===u.memoizedProps&&Ee===u.memoizedState||(f.flags|=1024),f.memoizedProps=x,f.memoizedState=Je),L.props=x,L.state=Je,L.context=ae,x=be):(typeof L.componentDidUpdate!="function"||K===u.memoizedProps&&Ee===u.memoizedState||(f.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||K===u.memoizedProps&&Ee===u.memoizedState||(f.flags|=1024),x=!1)}return oC(u,f,v,x,I,R)}function oC(u,f,v,x,R,I){Ej(u,f);var L=(f.flags&128)!==0;if(!x&&!L)return R&&MN(f,v,!1),Vl(u,f,I);x=f.stateNode,sre.current=f;var K=L&&typeof v.getDerivedStateFromError!="function"?null:x.render();return f.flags|=1,u!==null&&L?(f.child=ah(f,u.child,null,I),f.child=ah(f,null,K,I)):oo(u,f,K,I),f.memoizedState=x.state,R&&MN(f,v,!0),f.child}function Rj(u){var f=u.stateNode;f.pendingContext?$N(u,f.pendingContext,f.pendingContext!==f.context):f.context&&$N(u,f.context,!1),Bk(u,f.containerInfo)}function Ij(u,f,v,x,R){return oh(),Nk(R),f.flags|=256,oo(u,f,v,x),f.child}var aC={dehydrated:null,treeContext:null,retryLane:0};function sC(u){return{baseLanes:u,cachePool:null,transitions:null}}function $j(u,f,v){var x=f.pendingProps,R=_n.current,I=!1,L=(f.flags&128)!==0,K;if((K=L)||(K=u!==null&&u.memoizedState===null?!1:(R&2)!==0),K?(I=!0,f.flags&=-129):(u===null||u.memoizedState!==null)&&(R|=1),Ur(_n,R&1),u===null)return Mk(f),u=f.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?((f.mode&1)===0?f.lanes=1:u.data==="$!"?f.lanes=8:f.lanes=1073741824,null):(L=x.children,u=x.fallback,I?(x=f.mode,I=f.child,L={mode:"hidden",children:L},(x&1)===0&&I!==null?(I.childLanes=0,I.pendingProps=L):I=H0(L,x,0,null),u=Pd(u,x,v,null),I.return=f,u.return=f,I.sibling=u,f.child=I,f.child.memoizedState=sC(v),f.memoizedState=aC,u):lC(f,L));if(R=u.memoizedState,R!==null&&(K=R.dehydrated,K!==null))return lre(u,f,L,x,K,R,v);if(I){I=x.fallback,L=f.mode,R=u.child,K=R.sibling;var ae={mode:"hidden",children:x.children};return(L&1)===0&&f.child!==R?(x=f.child,x.childLanes=0,x.pendingProps=ae,f.deletions=null):(x=Yc(R,ae),x.subtreeFlags=R.subtreeFlags&14680064),K!==null?I=Yc(K,I):(I=Pd(I,L,v,null),I.flags|=2),I.return=f,x.return=f,x.sibling=I,f.child=x,x=I,I=f.child,L=u.child.memoizedState,L=L===null?sC(v):{baseLanes:L.baseLanes|v,cachePool:null,transitions:L.transitions},I.memoizedState=L,I.childLanes=u.childLanes&~v,f.memoizedState=aC,x}return I=u.child,u=I.sibling,x=Yc(I,{mode:"visible",children:x.children}),(f.mode&1)===0&&(x.lanes=v),x.return=f,x.sibling=null,u!==null&&(v=f.deletions,v===null?(f.deletions=[u],f.flags|=16):v.push(u)),f.child=x,f.memoizedState=null,x}function lC(u,f){return f=H0({mode:"visible",children:f},u.mode,0,null),f.return=u,u.child=f}function M0(u,f,v,x){return x!==null&&Nk(x),ah(f,u.child,null,v),u=lC(f,f.pendingProps.children),u.flags|=2,f.memoizedState=null,u}function lre(u,f,v,x,R,I,L){if(v)return f.flags&256?(f.flags&=-257,x=rC(Error(r(422))),M0(u,f,L,x)):f.memoizedState!==null?(f.child=u.child,f.flags|=128,null):(I=x.fallback,R=f.mode,x=H0({mode:"visible",children:x.children},R,0,null),I=Pd(I,R,L,null),I.flags|=2,x.return=f,I.return=f,x.sibling=I,f.child=x,(f.mode&1)!==0&&ah(f,u.child,null,L),f.child.memoizedState=sC(L),f.memoizedState=aC,I);if((f.mode&1)===0)return M0(u,f,L,null);if(R.data==="$!"){if(x=R.nextSibling&&R.nextSibling.dataset,x)var K=x.dgst;return x=K,I=Error(r(419)),x=rC(I,x,void 0),M0(u,f,L,x)}if(K=(L&u.childLanes)!==0,wo||K){if(x=mi,x!==null){switch(L&-L){case 4:R=2;break;case 16:R=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:R=32;break;case 536870912:R=268435456;break;default:R=0}R=(R&(x.suspendedLanes|L))!==0?0:R,R!==0&&R!==I.retryLane&&(I.retryLane=R,Ll(u,R),ss(x,u,R,-1))}return PC(),x=rC(Error(r(421))),M0(u,f,L,x)}return R.data==="$?"?(f.flags|=128,f.child=u.child,f=wre.bind(null,u),R._reactRetry=f,null):(u=I.treeContext,Go=Vc(R.nextSibling),Zo=f,wn=!0,ns=null,u!==null&&(xa[Pa++]=jl,xa[Pa++]=Dl,xa[Pa++]=gd,jl=u.id,Dl=u.overflow,gd=f),f=lC(f,x.children),f.flags|=4096,f)}function Aj(u,f,v){u.lanes|=f;var x=u.alternate;x!==null&&(x.lanes|=f),Qk(u.return,f,v)}function cC(u,f,v,x,R){var I=u.memoizedState;I===null?u.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:x,tail:v,tailMode:R}:(I.isBackwards=f,I.rendering=null,I.renderingStartTime=0,I.last=x,I.tail=v,I.tailMode=R)}function Mj(u,f,v){var x=f.pendingProps,R=x.revealOrder,I=x.tail;if(oo(u,f,x.children,v),x=_n.current,(x&2)!==0)x=x&1|2,f.flags|=128;else{if(u!==null&&(u.flags&128)!==0)e:for(u=f.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&Aj(u,v,f);else if(u.tag===19)Aj(u,v,f);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===f)break e;for(;u.sibling===null;){if(u.return===null||u.return===f)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}x&=1}if(Ur(_n,x),(f.mode&1)===0)f.memoizedState=null;else switch(R){case"forwards":for(v=f.child,R=null;v!==null;)u=v.alternate,u!==null&&T0(u)===null&&(R=v),v=v.sibling;v=R,v===null?(R=f.child,f.child=null):(R=v.sibling,v.sibling=null),cC(f,!1,R,v,I);break;case"backwards":for(v=null,R=f.child,f.child=null;R!==null;){if(u=R.alternate,u!==null&&T0(u)===null){f.child=R;break}u=R.sibling,R.sibling=v,v=R,R=u}cC(f,!0,v,null,I);break;case"together":cC(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function N0(u,f){(f.mode&1)===0&&u!==null&&(u.alternate=null,f.alternate=null,f.flags|=2)}function Vl(u,f,v){if(u!==null&&(f.dependencies=u.dependencies),Od|=f.lanes,(v&f.childLanes)===0)return null;if(u!==null&&f.child!==u.child)throw Error(r(153));if(f.child!==null){for(u=f.child,v=Yc(u,u.pendingProps),f.child=v,v.return=f;u.sibling!==null;)u=u.sibling,v=v.sibling=Yc(u,u.pendingProps),v.return=f;v.sibling=null}return f.child}function cre(u,f,v){switch(f.tag){case 3:Rj(f),oh();break;case 5:XN(f);break;case 1:Oo(f.type)&&v0(f);break;case 4:Bk(f,f.stateNode.containerInfo);break;case 10:var x=f.type._context,R=f.memoizedProps.value;Ur(x0,x._currentValue),x._currentValue=R;break;case 13:if(x=f.memoizedState,x!==null)return x.dehydrated!==null?(Ur(_n,_n.current&1),f.flags|=128,null):(v&f.child.childLanes)!==0?$j(u,f,v):(Ur(_n,_n.current&1),u=Vl(u,f,v),u!==null?u.sibling:null);Ur(_n,_n.current&1);break;case 19:if(x=(v&f.childLanes)!==0,(u.flags&128)!==0){if(x)return Mj(u,f,v);f.flags|=128}if(R=f.memoizedState,R!==null&&(R.rendering=null,R.tail=null,R.lastEffect=null),Ur(_n,_n.current),x)break;return null;case 22:case 23:return f.lanes=0,Tj(u,f,v)}return Vl(u,f,v)}var Nj,uC,jj,Dj;Nj=function(u,f){for(var v=f.child;v!==null;){if(v.tag===5||v.tag===6)u.appendChild(v.stateNode);else if(v.tag!==4&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===f)break;for(;v.sibling===null;){if(v.return===null||v.return===f)return;v=v.return}v.sibling.return=v.return,v=v.sibling}},uC=function(){},jj=function(u,f,v,x){var R=u.memoizedProps;if(R!==x){u=f.stateNode,yd(Ns.current);var I=null;switch(v){case"input":R=ke(u,R),x=ke(u,x),I=[];break;case"select":R=z({},R,{value:void 0}),x=z({},x,{value:void 0}),I=[];break;case"textarea":R=Rr(u,R),x=Rr(u,x),I=[];break;default:typeof R.onClick!="function"&&typeof x.onClick=="function"&&(u.onclick=p0)}Il(v,x);var L;v=null;for(be in R)if(!x.hasOwnProperty(be)&&R.hasOwnProperty(be)&&R[be]!=null)if(be==="style"){var K=R[be];for(L in K)K.hasOwnProperty(L)&&(v||(v={}),v[L]="")}else be!=="dangerouslySetInnerHTML"&&be!=="children"&&be!=="suppressContentEditableWarning"&&be!=="suppressHydrationWarning"&&be!=="autoFocus"&&(i.hasOwnProperty(be)?I||(I=[]):(I=I||[]).push(be,null));for(be in x){var ae=x[be];if(K=R!=null?R[be]:void 0,x.hasOwnProperty(be)&&ae!==K&&(ae!=null||K!=null))if(be==="style")if(K){for(L in K)!K.hasOwnProperty(L)||ae&&ae.hasOwnProperty(L)||(v||(v={}),v[L]="");for(L in ae)ae.hasOwnProperty(L)&&K[L]!==ae[L]&&(v||(v={}),v[L]=ae[L])}else v||(I||(I=[]),I.push(be,v)),v=ae;else be==="dangerouslySetInnerHTML"?(ae=ae?ae.__html:void 0,K=K?K.__html:void 0,ae!=null&&K!==ae&&(I=I||[]).push(be,ae)):be==="children"?typeof ae!="string"&&typeof ae!="number"||(I=I||[]).push(be,""+ae):be!=="suppressContentEditableWarning"&&be!=="suppressHydrationWarning"&&(i.hasOwnProperty(be)?(ae!=null&&be==="onScroll"&&sn("scroll",u),I||K===ae||(I=[])):(I=I||[]).push(be,ae))}v&&(I=I||[]).push("style",v);var be=I;(f.updateQueue=be)&&(f.flags|=4)}},Dj=function(u,f,v,x){v!==x&&(f.flags|=4)};function sm(u,f){if(!wn)switch(u.tailMode){case"hidden":f=u.tail;for(var v=null;f!==null;)f.alternate!==null&&(v=f),f=f.sibling;v===null?u.tail=null:v.sibling=null;break;case"collapsed":v=u.tail;for(var x=null;v!==null;)v.alternate!==null&&(x=v),v=v.sibling;x===null?f||u.tail===null?u.tail=null:u.tail.sibling=null:x.sibling=null}}function Zi(u){var f=u.alternate!==null&&u.alternate.child===u.child,v=0,x=0;if(f)for(var R=u.child;R!==null;)v|=R.lanes|R.childLanes,x|=R.subtreeFlags&14680064,x|=R.flags&14680064,R.return=u,R=R.sibling;else for(R=u.child;R!==null;)v|=R.lanes|R.childLanes,x|=R.subtreeFlags,x|=R.flags,R.return=u,R=R.sibling;return u.subtreeFlags|=x,u.childLanes=v,f}function ure(u,f,v){var x=f.pendingProps;switch($k(f),f.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zi(f),null;case 1:return Oo(f.type)&&m0(),Zi(f),null;case 3:return x=f.stateNode,ch(),ln(bo),ln(Hi),Wk(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),(u===null||u.child===null)&&(w0(f)?f.flags|=4:u===null||u.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,ns!==null&&(wC(ns),ns=null))),uC(u,f),Zi(f),null;case 5:zk(f);var R=yd(rm.current);if(v=f.type,u!==null&&f.stateNode!=null)jj(u,f,v,x,R),u.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!x){if(f.stateNode===null)throw Error(r(166));return Zi(f),null}if(u=yd(Ns.current),w0(f)){x=f.stateNode,v=f.type;var I=f.memoizedProps;switch(x[Ms]=f,x[Yg]=I,u=(f.mode&1)!==0,v){case"dialog":sn("cancel",x),sn("close",x);break;case"iframe":case"object":case"embed":sn("load",x);break;case"video":case"audio":for(R=0;R<Xg.length;R++)sn(Xg[R],x);break;case"source":sn("error",x);break;case"img":case"image":case"link":sn("error",x),sn("load",x);break;case"details":sn("toggle",x);break;case"input":Me(x,I),sn("invalid",x);break;case"select":x._wrapperState={wasMultiple:!!I.multiple},sn("invalid",x);break;case"textarea":zt(x,I),sn("invalid",x)}Il(v,I),R=null;for(var L in I)if(I.hasOwnProperty(L)){var K=I[L];L==="children"?typeof K=="string"?x.textContent!==K&&(I.suppressHydrationWarning!==!0&&h0(x.textContent,K,u),R=["children",K]):typeof K=="number"&&x.textContent!==""+K&&(I.suppressHydrationWarning!==!0&&h0(x.textContent,K,u),R=["children",""+K]):i.hasOwnProperty(L)&&K!=null&&L==="onScroll"&&sn("scroll",x)}switch(v){case"input":ee(x),vr(x,I,!0);break;case"textarea":ee(x),zn(x);break;case"select":case"option":break;default:typeof I.onClick=="function"&&(x.onclick=p0)}x=R,f.updateQueue=x,x!==null&&(f.flags|=4)}else{L=R.nodeType===9?R:R.ownerDocument,u==="http://www.w3.org/1999/xhtml"&&(u=$n(v)),u==="http://www.w3.org/1999/xhtml"?v==="script"?(u=L.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild)):typeof x.is=="string"?u=L.createElement(v,{is:x.is}):(u=L.createElement(v),v==="select"&&(L=u,x.multiple?L.multiple=!0:x.size&&(L.size=x.size))):u=L.createElementNS(u,v),u[Ms]=f,u[Yg]=x,Nj(u,f,!1,!1),f.stateNode=u;e:{switch(L=ni(v,x),v){case"dialog":sn("cancel",u),sn("close",u),R=x;break;case"iframe":case"object":case"embed":sn("load",u),R=x;break;case"video":case"audio":for(R=0;R<Xg.length;R++)sn(Xg[R],u);R=x;break;case"source":sn("error",u),R=x;break;case"img":case"image":case"link":sn("error",u),sn("load",u),R=x;break;case"details":sn("toggle",u),R=x;break;case"input":Me(u,x),R=ke(u,x),sn("invalid",u);break;case"option":R=x;break;case"select":u._wrapperState={wasMultiple:!!x.multiple},R=z({},x,{value:void 0}),sn("invalid",u);break;case"textarea":zt(u,x),R=Rr(u,x),sn("invalid",u);break;default:R=x}Il(v,R),K=R;for(I in K)if(K.hasOwnProperty(I)){var ae=K[I];I==="style"?Ic(u,ae):I==="dangerouslySetInnerHTML"?(ae=ae?ae.__html:void 0,ae!=null&&En(u,ae)):I==="children"?typeof ae=="string"?(v!=="textarea"||ae!=="")&&Ii(u,ae):typeof ae=="number"&&Ii(u,""+ae):I!=="suppressContentEditableWarning"&&I!=="suppressHydrationWarning"&&I!=="autoFocus"&&(i.hasOwnProperty(I)?ae!=null&&I==="onScroll"&&sn("scroll",u):ae!=null&&k(u,I,ae,L))}switch(v){case"input":ee(u),vr(u,x,!1);break;case"textarea":ee(u),zn(u);break;case"option":x.value!=null&&u.setAttribute("value",""+Z(x.value));break;case"select":u.multiple=!!x.multiple,I=x.value,I!=null?or(u,!!x.multiple,I,!1):x.defaultValue!=null&&or(u,!!x.multiple,x.defaultValue,!0);break;default:typeof R.onClick=="function"&&(u.onclick=p0)}switch(v){case"button":case"input":case"select":case"textarea":x=!!x.autoFocus;break e;case"img":x=!0;break e;default:x=!1}}x&&(f.flags|=4)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return Zi(f),null;case 6:if(u&&f.stateNode!=null)Dj(u,f,u.memoizedProps,x);else{if(typeof x!="string"&&f.stateNode===null)throw Error(r(166));if(v=yd(rm.current),yd(Ns.current),w0(f)){if(x=f.stateNode,v=f.memoizedProps,x[Ms]=f,(I=x.nodeValue!==v)&&(u=Zo,u!==null))switch(u.tag){case 3:h0(x.nodeValue,v,(u.mode&1)!==0);break;case 5:u.memoizedProps.suppressHydrationWarning!==!0&&h0(x.nodeValue,v,(u.mode&1)!==0)}I&&(f.flags|=4)}else x=(v.nodeType===9?v:v.ownerDocument).createTextNode(x),x[Ms]=f,f.stateNode=x}return Zi(f),null;case 13:if(ln(_n),x=f.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(wn&&Go!==null&&(f.mode&1)!==0&&(f.flags&128)===0)VN(),oh(),f.flags|=98560,I=!1;else if(I=w0(f),x!==null&&x.dehydrated!==null){if(u===null){if(!I)throw Error(r(318));if(I=f.memoizedState,I=I!==null?I.dehydrated:null,!I)throw Error(r(317));I[Ms]=f}else oh(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Zi(f),I=!1}else ns!==null&&(wC(ns),ns=null),I=!0;if(!I)return f.flags&65536?f:null}return(f.flags&128)!==0?(f.lanes=v,f):(x=x!==null,x!==(u!==null&&u.memoizedState!==null)&&x&&(f.child.flags|=8192,(f.mode&1)!==0&&(u===null||(_n.current&1)!==0?oi===0&&(oi=3):PC())),f.updateQueue!==null&&(f.flags|=4),Zi(f),null);case 4:return ch(),uC(u,f),u===null&&Zg(f.stateNode.containerInfo),Zi(f),null;case 10:return Lk(f.type._context),Zi(f),null;case 17:return Oo(f.type)&&m0(),Zi(f),null;case 19:if(ln(_n),I=f.memoizedState,I===null)return Zi(f),null;if(x=(f.flags&128)!==0,L=I.rendering,L===null)if(x)sm(I,!1);else{if(oi!==0||u!==null&&(u.flags&128)!==0)for(u=f.child;u!==null;){if(L=T0(u),L!==null){for(f.flags|=128,sm(I,!1),x=L.updateQueue,x!==null&&(f.updateQueue=x,f.flags|=4),f.subtreeFlags=0,x=v,v=f.child;v!==null;)I=v,u=x,I.flags&=14680066,L=I.alternate,L===null?(I.childLanes=0,I.lanes=u,I.child=null,I.subtreeFlags=0,I.memoizedProps=null,I.memoizedState=null,I.updateQueue=null,I.dependencies=null,I.stateNode=null):(I.childLanes=L.childLanes,I.lanes=L.lanes,I.child=L.child,I.subtreeFlags=0,I.deletions=null,I.memoizedProps=L.memoizedProps,I.memoizedState=L.memoizedState,I.updateQueue=L.updateQueue,I.type=L.type,u=L.dependencies,I.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),v=v.sibling;return Ur(_n,_n.current&1|2),f.child}u=u.sibling}I.tail!==null&&Dt()>hh&&(f.flags|=128,x=!0,sm(I,!1),f.lanes=4194304)}else{if(!x)if(u=T0(L),u!==null){if(f.flags|=128,x=!0,v=u.updateQueue,v!==null&&(f.updateQueue=v,f.flags|=4),sm(I,!0),I.tail===null&&I.tailMode==="hidden"&&!L.alternate&&!wn)return Zi(f),null}else 2*Dt()-I.renderingStartTime>hh&&v!==1073741824&&(f.flags|=128,x=!0,sm(I,!1),f.lanes=4194304);I.isBackwards?(L.sibling=f.child,f.child=L):(v=I.last,v!==null?v.sibling=L:f.child=L,I.last=L)}return I.tail!==null?(f=I.tail,I.rendering=f,I.tail=f.sibling,I.renderingStartTime=Dt(),f.sibling=null,v=_n.current,Ur(_n,x?v&1|2:v&1),f):(Zi(f),null);case 22:case 23:return xC(),x=f.memoizedState!==null,u!==null&&u.memoizedState!==null!==x&&(f.flags|=8192),x&&(f.mode&1)!==0?(Yo&1073741824)!==0&&(Zi(f),f.subtreeFlags&6&&(f.flags|=8192)):Zi(f),null;case 24:return null;case 25:return null}throw Error(r(156,f.tag))}function dre(u,f){switch($k(f),f.tag){case 1:return Oo(f.type)&&m0(),u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 3:return ch(),ln(bo),ln(Hi),Wk(),u=f.flags,(u&65536)!==0&&(u&128)===0?(f.flags=u&-65537|128,f):null;case 5:return zk(f),null;case 13:if(ln(_n),u=f.memoizedState,u!==null&&u.dehydrated!==null){if(f.alternate===null)throw Error(r(340));oh()}return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 19:return ln(_n),null;case 4:return ch(),null;case 10:return Lk(f.type._context),null;case 22:case 23:return xC(),null;case 24:return null;default:return null}}var j0=!1,Gi=!1,fre=typeof WeakSet=="function"?WeakSet:Set,Ge=null;function dh(u,f){var v=u.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(x){An(u,f,x)}else v.current=null}function dC(u,f,v){try{v()}catch(x){An(u,f,x)}}var Lj=!1;function hre(u,f){if(xk=r0,u=mN(),gk(u)){if("selectionStart"in u)var v={start:u.selectionStart,end:u.selectionEnd};else e:{v=(v=u.ownerDocument)&&v.defaultView||window;var x=v.getSelection&&v.getSelection();if(x&&x.rangeCount!==0){v=x.anchorNode;var R=x.anchorOffset,I=x.focusNode;x=x.focusOffset;try{v.nodeType,I.nodeType}catch{v=null;break e}var L=0,K=-1,ae=-1,be=0,_e=0,Re=u,Ee=null;t:for(;;){for(var He;Re!==v||R!==0&&Re.nodeType!==3||(K=L+R),Re!==I||x!==0&&Re.nodeType!==3||(ae=L+x),Re.nodeType===3&&(L+=Re.nodeValue.length),(He=Re.firstChild)!==null;)Ee=Re,Re=He;for(;;){if(Re===u)break t;if(Ee===v&&++be===R&&(K=L),Ee===I&&++_e===x&&(ae=L),(He=Re.nextSibling)!==null)break;Re=Ee,Ee=Re.parentNode}Re=He}v=K===-1||ae===-1?null:{start:K,end:ae}}else v=null}v=v||{start:0,end:0}}else v=null;for(Pk={focusedElem:u,selectionRange:v},r0=!1,Ge=f;Ge!==null;)if(f=Ge,u=f.child,(f.subtreeFlags&1028)!==0&&u!==null)u.return=f,Ge=u;else for(;Ge!==null;){f=Ge;try{var Je=f.alternate;if((f.flags&1024)!==0)switch(f.tag){case 0:case 11:case 15:break;case 1:if(Je!==null){var rt=Je.memoizedProps,Ln=Je.memoizedState,he=f.stateNode,se=he.getSnapshotBeforeUpdate(f.elementType===f.type?rt:is(f.type,rt),Ln);he.__reactInternalSnapshotBeforeUpdate=se}break;case 3:var pe=f.stateNode.containerInfo;pe.nodeType===1?pe.textContent="":pe.nodeType===9&&pe.documentElement&&pe.removeChild(pe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Ne){An(f,f.return,Ne)}if(u=f.sibling,u!==null){u.return=f.return,Ge=u;break}Ge=f.return}return Je=Lj,Lj=!1,Je}function lm(u,f,v){var x=f.updateQueue;if(x=x!==null?x.lastEffect:null,x!==null){var R=x=x.next;do{if((R.tag&u)===u){var I=R.destroy;R.destroy=void 0,I!==void 0&&dC(f,v,I)}R=R.next}while(R!==x)}}function D0(u,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var v=f=f.next;do{if((v.tag&u)===u){var x=v.create;v.destroy=x()}v=v.next}while(v!==f)}}function fC(u){var f=u.ref;if(f!==null){var v=u.stateNode;switch(u.tag){case 5:u=v;break;default:u=v}typeof f=="function"?f(u):f.current=u}}function Qj(u){var f=u.alternate;f!==null&&(u.alternate=null,Qj(f)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(f=u.stateNode,f!==null&&(delete f[Ms],delete f[Yg],delete f[Ek],delete f[Zte],delete f[Gte])),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function Vj(u){return u.tag===5||u.tag===3||u.tag===4}function Fj(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||Vj(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function hC(u,f,v){var x=u.tag;if(x===5||x===6)u=u.stateNode,f?v.nodeType===8?v.parentNode.insertBefore(u,f):v.insertBefore(u,f):(v.nodeType===8?(f=v.parentNode,f.insertBefore(u,v)):(f=v,f.appendChild(u)),v=v._reactRootContainer,v!=null||f.onclick!==null||(f.onclick=p0));else if(x!==4&&(u=u.child,u!==null))for(hC(u,f,v),u=u.sibling;u!==null;)hC(u,f,v),u=u.sibling}function pC(u,f,v){var x=u.tag;if(x===5||x===6)u=u.stateNode,f?v.insertBefore(u,f):v.appendChild(u);else if(x!==4&&(u=u.child,u!==null))for(pC(u,f,v),u=u.sibling;u!==null;)pC(u,f,v),u=u.sibling}var $i=null,os=!1;function Uc(u,f,v){for(v=v.child;v!==null;)Bj(u,f,v),v=v.sibling}function Bj(u,f,v){if(Un&&typeof Un.onCommitFiberUnmount=="function")try{Un.onCommitFiberUnmount(Sa,v)}catch{}switch(v.tag){case 5:Gi||dh(v,f);case 6:var x=$i,R=os;$i=null,Uc(u,f,v),$i=x,os=R,$i!==null&&(os?(u=$i,v=v.stateNode,u.nodeType===8?u.parentNode.removeChild(v):u.removeChild(v)):$i.removeChild(v.stateNode));break;case 18:$i!==null&&(os?(u=$i,v=v.stateNode,u.nodeType===8?Tk(u.parentNode,v):u.nodeType===1&&Tk(u,v),Vg(u)):Tk($i,v.stateNode));break;case 4:x=$i,R=os,$i=v.stateNode.containerInfo,os=!0,Uc(u,f,v),$i=x,os=R;break;case 0:case 11:case 14:case 15:if(!Gi&&(x=v.updateQueue,x!==null&&(x=x.lastEffect,x!==null))){R=x=x.next;do{var I=R,L=I.destroy;I=I.tag,L!==void 0&&((I&2)!==0||(I&4)!==0)&&dC(v,f,L),R=R.next}while(R!==x)}Uc(u,f,v);break;case 1:if(!Gi&&(dh(v,f),x=v.stateNode,typeof x.componentWillUnmount=="function"))try{x.props=v.memoizedProps,x.state=v.memoizedState,x.componentWillUnmount()}catch(K){An(v,f,K)}Uc(u,f,v);break;case 21:Uc(u,f,v);break;case 22:v.mode&1?(Gi=(x=Gi)||v.memoizedState!==null,Uc(u,f,v),Gi=x):Uc(u,f,v);break;default:Uc(u,f,v)}}function zj(u){var f=u.updateQueue;if(f!==null){u.updateQueue=null;var v=u.stateNode;v===null&&(v=u.stateNode=new fre),f.forEach(function(x){var R=Sre.bind(null,u,x);v.has(x)||(v.add(x),x.then(R,R))})}}function as(u,f){var v=f.deletions;if(v!==null)for(var x=0;x<v.length;x++){var R=v[x];try{var I=u,L=f,K=L;e:for(;K!==null;){switch(K.tag){case 5:$i=K.stateNode,os=!1;break e;case 3:$i=K.stateNode.containerInfo,os=!0;break e;case 4:$i=K.stateNode.containerInfo,os=!0;break e}K=K.return}if($i===null)throw Error(r(160));Bj(I,L,R),$i=null,os=!1;var ae=R.alternate;ae!==null&&(ae.return=null),R.return=null}catch(be){An(R,f,be)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)qj(f,u),f=f.sibling}function qj(u,f){var v=u.alternate,x=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:if(as(f,u),Ds(u),x&4){try{lm(3,u,u.return),D0(3,u)}catch(rt){An(u,u.return,rt)}try{lm(5,u,u.return)}catch(rt){An(u,u.return,rt)}}break;case 1:as(f,u),Ds(u),x&512&&v!==null&&dh(v,v.return);break;case 5:if(as(f,u),Ds(u),x&512&&v!==null&&dh(v,v.return),u.flags&32){var R=u.stateNode;try{Ii(R,"")}catch(rt){An(u,u.return,rt)}}if(x&4&&(R=u.stateNode,R!=null)){var I=u.memoizedProps,L=v!==null?v.memoizedProps:I,K=u.type,ae=u.updateQueue;if(u.updateQueue=null,ae!==null)try{K==="input"&&I.type==="radio"&&I.name!=null&&De(R,I),ni(K,L);var be=ni(K,I);for(L=0;L<ae.length;L+=2){var _e=ae[L],Re=ae[L+1];_e==="style"?Ic(R,Re):_e==="dangerouslySetInnerHTML"?En(R,Re):_e==="children"?Ii(R,Re):k(R,_e,Re,be)}switch(K){case"input":Vt(R,I);break;case"textarea":Tn(R,I);break;case"select":var Ee=R._wrapperState.wasMultiple;R._wrapperState.wasMultiple=!!I.multiple;var He=I.value;He!=null?or(R,!!I.multiple,He,!1):Ee!==!!I.multiple&&(I.defaultValue!=null?or(R,!!I.multiple,I.defaultValue,!0):or(R,!!I.multiple,I.multiple?[]:"",!1))}R[Yg]=I}catch(rt){An(u,u.return,rt)}}break;case 6:if(as(f,u),Ds(u),x&4){if(u.stateNode===null)throw Error(r(162));R=u.stateNode,I=u.memoizedProps;try{R.nodeValue=I}catch(rt){An(u,u.return,rt)}}break;case 3:if(as(f,u),Ds(u),x&4&&v!==null&&v.memoizedState.isDehydrated)try{Vg(f.containerInfo)}catch(rt){An(u,u.return,rt)}break;case 4:as(f,u),Ds(u);break;case 13:as(f,u),Ds(u),R=u.child,R.flags&8192&&(I=R.memoizedState!==null,R.stateNode.isHidden=I,!I||R.alternate!==null&&R.alternate.memoizedState!==null||(vC=Dt())),x&4&&zj(u);break;case 22:if(_e=v!==null&&v.memoizedState!==null,u.mode&1?(Gi=(be=Gi)||_e,as(f,u),Gi=be):as(f,u),Ds(u),x&8192){if(be=u.memoizedState!==null,(u.stateNode.isHidden=be)&&!_e&&(u.mode&1)!==0)for(Ge=u,_e=u.child;_e!==null;){for(Re=Ge=_e;Ge!==null;){switch(Ee=Ge,He=Ee.child,Ee.tag){case 0:case 11:case 14:case 15:lm(4,Ee,Ee.return);break;case 1:dh(Ee,Ee.return);var Je=Ee.stateNode;if(typeof Je.componentWillUnmount=="function"){x=Ee,v=Ee.return;try{f=x,Je.props=f.memoizedProps,Je.state=f.memoizedState,Je.componentWillUnmount()}catch(rt){An(x,v,rt)}}break;case 5:dh(Ee,Ee.return);break;case 22:if(Ee.memoizedState!==null){Hj(Re);continue}}He!==null?(He.return=Ee,Ge=He):Hj(Re)}_e=_e.sibling}e:for(_e=null,Re=u;;){if(Re.tag===5){if(_e===null){_e=Re;try{R=Re.stateNode,be?(I=R.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none"):(K=Re.stateNode,ae=Re.memoizedProps.style,L=ae!=null&&ae.hasOwnProperty("display")?ae.display:null,K.style.display=Ja("display",L))}catch(rt){An(u,u.return,rt)}}}else if(Re.tag===6){if(_e===null)try{Re.stateNode.nodeValue=be?"":Re.memoizedProps}catch(rt){An(u,u.return,rt)}}else if((Re.tag!==22&&Re.tag!==23||Re.memoizedState===null||Re===u)&&Re.child!==null){Re.child.return=Re,Re=Re.child;continue}if(Re===u)break e;for(;Re.sibling===null;){if(Re.return===null||Re.return===u)break e;_e===Re&&(_e=null),Re=Re.return}_e===Re&&(_e=null),Re.sibling.return=Re.return,Re=Re.sibling}}break;case 19:as(f,u),Ds(u),x&4&&zj(u);break;case 21:break;default:as(f,u),Ds(u)}}function Ds(u){var f=u.flags;if(f&2){try{e:{for(var v=u.return;v!==null;){if(Vj(v)){var x=v;break e}v=v.return}throw Error(r(160))}switch(x.tag){case 5:var R=x.stateNode;x.flags&32&&(Ii(R,""),x.flags&=-33);var I=Fj(u);pC(u,I,R);break;case 3:case 4:var L=x.stateNode.containerInfo,K=Fj(u);hC(u,K,L);break;default:throw Error(r(161))}}catch(ae){An(u,u.return,ae)}u.flags&=-3}f&4096&&(u.flags&=-4097)}function pre(u,f,v){Ge=u,Wj(u)}function Wj(u,f,v){for(var x=(u.mode&1)!==0;Ge!==null;){var R=Ge,I=R.child;if(R.tag===22&&x){var L=R.memoizedState!==null||j0;if(!L){var K=R.alternate,ae=K!==null&&K.memoizedState!==null||Gi;K=j0;var be=Gi;if(j0=L,(Gi=ae)&&!be)for(Ge=R;Ge!==null;)L=Ge,ae=L.child,L.tag===22&&L.memoizedState!==null?Xj(R):ae!==null?(ae.return=L,Ge=ae):Xj(R);for(;I!==null;)Ge=I,Wj(I),I=I.sibling;Ge=R,j0=K,Gi=be}Uj(u)}else(R.subtreeFlags&8772)!==0&&I!==null?(I.return=R,Ge=I):Uj(u)}}function Uj(u){for(;Ge!==null;){var f=Ge;if((f.flags&8772)!==0){var v=f.alternate;try{if((f.flags&8772)!==0)switch(f.tag){case 0:case 11:case 15:Gi||D0(5,f);break;case 1:var x=f.stateNode;if(f.flags&4&&!Gi)if(v===null)x.componentDidMount();else{var R=f.elementType===f.type?v.memoizedProps:is(f.type,v.memoizedProps);x.componentDidUpdate(R,v.memoizedState,x.__reactInternalSnapshotBeforeUpdate)}var I=f.updateQueue;I!==null&&HN(f,I,x);break;case 3:var L=f.updateQueue;if(L!==null){if(v=null,f.child!==null)switch(f.child.tag){case 5:v=f.child.stateNode;break;case 1:v=f.child.stateNode}HN(f,L,v)}break;case 5:var K=f.stateNode;if(v===null&&f.flags&4){v=K;var ae=f.memoizedProps;switch(f.type){case"button":case"input":case"select":case"textarea":ae.autoFocus&&v.focus();break;case"img":ae.src&&(v.src=ae.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(f.memoizedState===null){var be=f.alternate;if(be!==null){var _e=be.memoizedState;if(_e!==null){var Re=_e.dehydrated;Re!==null&&Vg(Re)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Gi||f.flags&512&&fC(f)}catch(Ee){An(f,f.return,Ee)}}if(f===u){Ge=null;break}if(v=f.sibling,v!==null){v.return=f.return,Ge=v;break}Ge=f.return}}function Hj(u){for(;Ge!==null;){var f=Ge;if(f===u){Ge=null;break}var v=f.sibling;if(v!==null){v.return=f.return,Ge=v;break}Ge=f.return}}function Xj(u){for(;Ge!==null;){var f=Ge;try{switch(f.tag){case 0:case 11:case 15:var v=f.return;try{D0(4,f)}catch(ae){An(f,v,ae)}break;case 1:var x=f.stateNode;if(typeof x.componentDidMount=="function"){var R=f.return;try{x.componentDidMount()}catch(ae){An(f,R,ae)}}var I=f.return;try{fC(f)}catch(ae){An(f,I,ae)}break;case 5:var L=f.return;try{fC(f)}catch(ae){An(f,L,ae)}}}catch(ae){An(f,f.return,ae)}if(f===u){Ge=null;break}var K=f.sibling;if(K!==null){K.return=f.return,Ge=K;break}Ge=f.return}}var gre=Math.ceil,L0=T.ReactCurrentDispatcher,gC=T.ReactCurrentOwner,Ta=T.ReactCurrentBatchConfig,dr=0,mi=null,Hn=null,Ai=0,Yo=0,fh=Fc(0),oi=0,cm=null,Od=0,Q0=0,mC=0,um=null,So=null,vC=0,hh=1/0,Fl=null,V0=!1,yC=null,Hc=null,F0=!1,Xc=null,B0=0,dm=0,bC=null,z0=-1,q0=0;function ao(){return(dr&6)!==0?Dt():z0!==-1?z0:z0=Dt()}function Zc(u){return(u.mode&1)===0?1:(dr&2)!==0&&Ai!==0?Ai&-Ai:Kte.transition!==null?(q0===0&&(q0=FM()),q0):(u=$r,u!==0||(u=window.event,u=u===void 0?16:GM(u.type)),u)}function ss(u,f,v,x){if(50<dm)throw dm=0,bC=null,Error(r(185));Ng(u,v,x),((dr&2)===0||u!==mi)&&(u===mi&&((dr&2)===0&&(Q0|=v),oi===4&&Gc(u,Ai)),xo(u,x),v===1&&dr===0&&(f.mode&1)===0&&(hh=Dt()+500,y0&&zc()))}function xo(u,f){var v=u.callbackNode;Kee(u,f);var x=As(u,u===mi?Ai:0);if(x===0)v!==null&&pr(v),u.callbackNode=null,u.callbackPriority=0;else if(f=x&-x,u.callbackPriority!==f){if(v!=null&&pr(v),f===1)u.tag===0?Yte(Gj.bind(null,u)):NN(Gj.bind(null,u)),Hte(function(){(dr&6)===0&&zc()}),v=null;else{switch(BM(x)){case 1:v=Wn;break;case 4:v=wa;break;case 16:v=mo;break;case 536870912:v=Ho;break;default:v=mo}v=iD(v,Zj.bind(null,u))}u.callbackPriority=f,u.callbackNode=v}}function Zj(u,f){if(z0=-1,q0=0,(dr&6)!==0)throw Error(r(327));var v=u.callbackNode;if(ph()&&u.callbackNode!==v)return null;var x=As(u,u===mi?Ai:0);if(x===0)return null;if((x&30)!==0||(x&u.expiredLanes)!==0||f)f=W0(u,x);else{f=x;var R=dr;dr|=2;var I=Kj();(mi!==u||Ai!==f)&&(Fl=null,hh=Dt()+500,Sd(u,f));do try{yre();break}catch(K){Yj(u,K)}while(!0);Dk(),L0.current=I,dr=R,Hn!==null?f=0:(mi=null,Ai=0,f=oi)}if(f!==0){if(f===2&&(R=JP(u),R!==0&&(x=R,f=OC(u,R))),f===1)throw v=cm,Sd(u,0),Gc(u,x),xo(u,Dt()),v;if(f===6)Gc(u,x);else{if(R=u.current.alternate,(x&30)===0&&!mre(R)&&(f=W0(u,x),f===2&&(I=JP(u),I!==0&&(x=I,f=OC(u,I))),f===1))throw v=cm,Sd(u,0),Gc(u,x),xo(u,Dt()),v;switch(u.finishedWork=R,u.finishedLanes=x,f){case 0:case 1:throw Error(r(345));case 2:xd(u,So,Fl);break;case 3:if(Gc(u,x),(x&130023424)===x&&(f=vC+500-Dt(),10<f)){if(As(u,0)!==0)break;if(R=u.suspendedLanes,(R&x)!==x){ao(),u.pingedLanes|=u.suspendedLanes&R;break}u.timeoutHandle=Ck(xd.bind(null,u,So,Fl),f);break}xd(u,So,Fl);break;case 4:if(Gc(u,x),(x&4194240)===x)break;for(f=u.eventTimes,R=-1;0<x;){var L=31-yo(x);I=1<<L,L=f[L],L>R&&(R=L),x&=~I}if(x=R,x=Dt()-x,x=(120>x?120:480>x?480:1080>x?1080:1920>x?1920:3e3>x?3e3:4320>x?4320:1960*gre(x/1960))-x,10<x){u.timeoutHandle=Ck(xd.bind(null,u,So,Fl),x);break}xd(u,So,Fl);break;case 5:xd(u,So,Fl);break;default:throw Error(r(329))}}}return xo(u,Dt()),u.callbackNode===v?Zj.bind(null,u):null}function OC(u,f){var v=um;return u.current.memoizedState.isDehydrated&&(Sd(u,f).flags|=256),u=W0(u,f),u!==2&&(f=So,So=v,f!==null&&wC(f)),u}function wC(u){So===null?So=u:So.push.apply(So,u)}function mre(u){for(var f=u;;){if(f.flags&16384){var v=f.updateQueue;if(v!==null&&(v=v.stores,v!==null))for(var x=0;x<v.length;x++){var R=v[x],I=R.getSnapshot;R=R.value;try{if(!rs(I(),R))return!1}catch{return!1}}}if(v=f.child,f.subtreeFlags&16384&&v!==null)v.return=f,f=v;else{if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function Gc(u,f){for(f&=~mC,f&=~Q0,u.suspendedLanes|=f,u.pingedLanes&=~f,u=u.expirationTimes;0<f;){var v=31-yo(f),x=1<<v;u[v]=-1,f&=~x}}function Gj(u){if((dr&6)!==0)throw Error(r(327));ph();var f=As(u,0);if((f&1)===0)return xo(u,Dt()),null;var v=W0(u,f);if(u.tag!==0&&v===2){var x=JP(u);x!==0&&(f=x,v=OC(u,x))}if(v===1)throw v=cm,Sd(u,0),Gc(u,f),xo(u,Dt()),v;if(v===6)throw Error(r(345));return u.finishedWork=u.current.alternate,u.finishedLanes=f,xd(u,So,Fl),xo(u,Dt()),null}function SC(u,f){var v=dr;dr|=1;try{return u(f)}finally{dr=v,dr===0&&(hh=Dt()+500,y0&&zc())}}function wd(u){Xc!==null&&Xc.tag===0&&(dr&6)===0&&ph();var f=dr;dr|=1;var v=Ta.transition,x=$r;try{if(Ta.transition=null,$r=1,u)return u()}finally{$r=x,Ta.transition=v,dr=f,(dr&6)===0&&zc()}}function xC(){Yo=fh.current,ln(fh)}function Sd(u,f){u.finishedWork=null,u.finishedLanes=0;var v=u.timeoutHandle;if(v!==-1&&(u.timeoutHandle=-1,Ute(v)),Hn!==null)for(v=Hn.return;v!==null;){var x=v;switch($k(x),x.tag){case 1:x=x.type.childContextTypes,x!=null&&m0();break;case 3:ch(),ln(bo),ln(Hi),Wk();break;case 5:zk(x);break;case 4:ch();break;case 13:ln(_n);break;case 19:ln(_n);break;case 10:Lk(x.type._context);break;case 22:case 23:xC()}v=v.return}if(mi=u,Hn=u=Yc(u.current,null),Ai=Yo=f,oi=0,cm=null,mC=Q0=Od=0,So=um=null,vd!==null){for(f=0;f<vd.length;f++)if(v=vd[f],x=v.interleaved,x!==null){v.interleaved=null;var R=x.next,I=v.pending;if(I!==null){var L=I.next;I.next=R,x.next=L}v.pending=x}vd=null}return u}function Yj(u,f){do{var v=Hn;try{if(Dk(),E0.current=$0,_0){for(var x=Rn.memoizedState;x!==null;){var R=x.queue;R!==null&&(R.pending=null),x=x.next}_0=!1}if(bd=0,gi=ii=Rn=null,nm=!1,im=0,gC.current=null,v===null||v.return===null){oi=1,cm=f,Hn=null;break}e:{var I=u,L=v.return,K=v,ae=f;if(f=Ai,K.flags|=32768,ae!==null&&typeof ae=="object"&&typeof ae.then=="function"){var be=ae,_e=K,Re=_e.tag;if((_e.mode&1)===0&&(Re===0||Re===11||Re===15)){var Ee=_e.alternate;Ee?(_e.updateQueue=Ee.updateQueue,_e.memoizedState=Ee.memoizedState,_e.lanes=Ee.lanes):(_e.updateQueue=null,_e.memoizedState=null)}var He=Sj(L);if(He!==null){He.flags&=-257,xj(He,L,K,I,f),He.mode&1&&wj(I,be,f),f=He,ae=be;var Je=f.updateQueue;if(Je===null){var rt=new Set;rt.add(ae),f.updateQueue=rt}else Je.add(ae);break e}else{if((f&1)===0){wj(I,be,f),PC();break e}ae=Error(r(426))}}else if(wn&&K.mode&1){var Ln=Sj(L);if(Ln!==null){(Ln.flags&65536)===0&&(Ln.flags|=256),xj(Ln,L,K,I,f),Nk(uh(ae,K));break e}}I=ae=uh(ae,K),oi!==4&&(oi=2),um===null?um=[I]:um.push(I),I=L;do{switch(I.tag){case 3:I.flags|=65536,f&=-f,I.lanes|=f;var he=bj(I,ae,f);UN(I,he);break e;case 1:K=ae;var se=I.type,pe=I.stateNode;if((I.flags&128)===0&&(typeof se.getDerivedStateFromError=="function"||pe!==null&&typeof pe.componentDidCatch=="function"&&(Hc===null||!Hc.has(pe)))){I.flags|=65536,f&=-f,I.lanes|=f;var Ne=Oj(I,K,f);UN(I,Ne);break e}}I=I.return}while(I!==null)}eD(v)}catch(ot){f=ot,Hn===v&&v!==null&&(Hn=v=v.return);continue}break}while(!0)}function Kj(){var u=L0.current;return L0.current=$0,u===null?$0:u}function PC(){(oi===0||oi===3||oi===2)&&(oi=4),mi===null||(Od&268435455)===0&&(Q0&268435455)===0||Gc(mi,Ai)}function W0(u,f){var v=dr;dr|=2;var x=Kj();(mi!==u||Ai!==f)&&(Fl=null,Sd(u,f));do try{vre();break}catch(R){Yj(u,R)}while(!0);if(Dk(),dr=v,L0.current=x,Hn!==null)throw Error(r(261));return mi=null,Ai=0,oi}function vre(){for(;Hn!==null;)Jj(Hn)}function yre(){for(;Hn!==null&&!ct();)Jj(Hn)}function Jj(u){var f=nD(u.alternate,u,Yo);u.memoizedProps=u.pendingProps,f===null?eD(u):Hn=f,gC.current=null}function eD(u){var f=u;do{var v=f.alternate;if(u=f.return,(f.flags&32768)===0){if(v=ure(v,f,Yo),v!==null){Hn=v;return}}else{if(v=dre(v,f),v!==null){v.flags&=32767,Hn=v;return}if(u!==null)u.flags|=32768,u.subtreeFlags=0,u.deletions=null;else{oi=6,Hn=null;return}}if(f=f.sibling,f!==null){Hn=f;return}Hn=f=u}while(f!==null);oi===0&&(oi=5)}function xd(u,f,v){var x=$r,R=Ta.transition;try{Ta.transition=null,$r=1,bre(u,f,v,x)}finally{Ta.transition=R,$r=x}return null}function bre(u,f,v,x){do ph();while(Xc!==null);if((dr&6)!==0)throw Error(r(327));v=u.finishedWork;var R=u.finishedLanes;if(v===null)return null;if(u.finishedWork=null,u.finishedLanes=0,v===u.current)throw Error(r(177));u.callbackNode=null,u.callbackPriority=0;var I=v.lanes|v.childLanes;if(Jee(u,I),u===mi&&(Hn=mi=null,Ai=0),(v.subtreeFlags&2064)===0&&(v.flags&2064)===0||F0||(F0=!0,iD(mo,function(){return ph(),null})),I=(v.flags&15990)!==0,(v.subtreeFlags&15990)!==0||I){I=Ta.transition,Ta.transition=null;var L=$r;$r=1;var K=dr;dr|=4,gC.current=null,hre(u,v),qj(v,u),Qte(Pk),r0=!!xk,Pk=xk=null,u.current=v,pre(v),Qt(),dr=K,$r=L,Ta.transition=I}else u.current=v;if(F0&&(F0=!1,Xc=u,B0=R),I=u.pendingLanes,I===0&&(Hc=null),dd(v.stateNode),xo(u,Dt()),f!==null)for(x=u.onRecoverableError,v=0;v<f.length;v++)R=f[v],x(R.value,{componentStack:R.stack,digest:R.digest});if(V0)throw V0=!1,u=yC,yC=null,u;return(B0&1)!==0&&u.tag!==0&&ph(),I=u.pendingLanes,(I&1)!==0?u===bC?dm++:(dm=0,bC=u):dm=0,zc(),null}function ph(){if(Xc!==null){var u=BM(B0),f=Ta.transition,v=$r;try{if(Ta.transition=null,$r=16>u?16:u,Xc===null)var x=!1;else{if(u=Xc,Xc=null,B0=0,(dr&6)!==0)throw Error(r(331));var R=dr;for(dr|=4,Ge=u.current;Ge!==null;){var I=Ge,L=I.child;if((Ge.flags&16)!==0){var K=I.deletions;if(K!==null){for(var ae=0;ae<K.length;ae++){var be=K[ae];for(Ge=be;Ge!==null;){var _e=Ge;switch(_e.tag){case 0:case 11:case 15:lm(8,_e,I)}var Re=_e.child;if(Re!==null)Re.return=_e,Ge=Re;else for(;Ge!==null;){_e=Ge;var Ee=_e.sibling,He=_e.return;if(Qj(_e),_e===be){Ge=null;break}if(Ee!==null){Ee.return=He,Ge=Ee;break}Ge=He}}}var Je=I.alternate;if(Je!==null){var rt=Je.child;if(rt!==null){Je.child=null;do{var Ln=rt.sibling;rt.sibling=null,rt=Ln}while(rt!==null)}}Ge=I}}if((I.subtreeFlags&2064)!==0&&L!==null)L.return=I,Ge=L;else e:for(;Ge!==null;){if(I=Ge,(I.flags&2048)!==0)switch(I.tag){case 0:case 11:case 15:lm(9,I,I.return)}var he=I.sibling;if(he!==null){he.return=I.return,Ge=he;break e}Ge=I.return}}var se=u.current;for(Ge=se;Ge!==null;){L=Ge;var pe=L.child;if((L.subtreeFlags&2064)!==0&&pe!==null)pe.return=L,Ge=pe;else e:for(L=se;Ge!==null;){if(K=Ge,(K.flags&2048)!==0)try{switch(K.tag){case 0:case 11:case 15:D0(9,K)}}catch(ot){An(K,K.return,ot)}if(K===L){Ge=null;break e}var Ne=K.sibling;if(Ne!==null){Ne.return=K.return,Ge=Ne;break e}Ge=K.return}}if(dr=R,zc(),Un&&typeof Un.onPostCommitFiberRoot=="function")try{Un.onPostCommitFiberRoot(Sa,u)}catch{}x=!0}return x}finally{$r=v,Ta.transition=f}}return!1}function tD(u,f,v){f=uh(v,f),f=bj(u,f,1),u=Wc(u,f,1),f=ao(),u!==null&&(Ng(u,1,f),xo(u,f))}function An(u,f,v){if(u.tag===3)tD(u,u,v);else for(;f!==null;){if(f.tag===3){tD(f,u,v);break}else if(f.tag===1){var x=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof x.componentDidCatch=="function"&&(Hc===null||!Hc.has(x))){u=uh(v,u),u=Oj(f,u,1),f=Wc(f,u,1),u=ao(),f!==null&&(Ng(f,1,u),xo(f,u));break}}f=f.return}}function Ore(u,f,v){var x=u.pingCache;x!==null&&x.delete(f),f=ao(),u.pingedLanes|=u.suspendedLanes&v,mi===u&&(Ai&v)===v&&(oi===4||oi===3&&(Ai&130023424)===Ai&&500>Dt()-vC?Sd(u,0):mC|=v),xo(u,f)}function rD(u,f){f===0&&((u.mode&1)===0?f=1:(f=fd,fd<<=1,(fd&130023424)===0&&(fd=4194304)));var v=ao();u=Ll(u,f),u!==null&&(Ng(u,f,v),xo(u,v))}function wre(u){var f=u.memoizedState,v=0;f!==null&&(v=f.retryLane),rD(u,v)}function Sre(u,f){var v=0;switch(u.tag){case 13:var x=u.stateNode,R=u.memoizedState;R!==null&&(v=R.retryLane);break;case 19:x=u.stateNode;break;default:throw Error(r(314))}x!==null&&x.delete(f),rD(u,v)}var nD;nD=function(u,f,v){if(u!==null)if(u.memoizedProps!==f.pendingProps||bo.current)wo=!0;else{if((u.lanes&v)===0&&(f.flags&128)===0)return wo=!1,cre(u,f,v);wo=(u.flags&131072)!==0}else wo=!1,wn&&(f.flags&1048576)!==0&&jN(f,O0,f.index);switch(f.lanes=0,f.tag){case 2:var x=f.type;N0(u,f),u=f.pendingProps;var R=rh(f,Hi.current);lh(f,v),R=Xk(null,f,x,u,R,v);var I=Zk();return f.flags|=1,typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Oo(x)?(I=!0,v0(f)):I=!1,f.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,Fk(f),R.updater=A0,f.stateNode=R,R._reactInternals=f,tC(f,x,u,v),f=oC(null,f,x,!0,I,v)):(f.tag=0,wn&&I&&Ik(f),oo(null,f,R,v),f=f.child),f;case 16:x=f.elementType;e:{switch(N0(u,f),u=f.pendingProps,R=x._init,x=R(x._payload),f.type=x,R=f.tag=Pre(x),u=is(x,u),R){case 0:f=iC(null,f,x,u,v);break e;case 1:f=_j(null,f,x,u,v);break e;case 11:f=Pj(null,f,x,u,v);break e;case 14:f=kj(null,f,x,is(x.type,u),v);break e}throw Error(r(306,x,""))}return f;case 0:return x=f.type,R=f.pendingProps,R=f.elementType===x?R:is(x,R),iC(u,f,x,R,v);case 1:return x=f.type,R=f.pendingProps,R=f.elementType===x?R:is(x,R),_j(u,f,x,R,v);case 3:e:{if(Rj(f),u===null)throw Error(r(387));x=f.pendingProps,I=f.memoizedState,R=I.element,WN(u,f),C0(f,x,null,v);var L=f.memoizedState;if(x=L.element,I.isDehydrated)if(I={element:x,isDehydrated:!1,cache:L.cache,pendingSuspenseBoundaries:L.pendingSuspenseBoundaries,transitions:L.transitions},f.updateQueue.baseState=I,f.memoizedState=I,f.flags&256){R=uh(Error(r(423)),f),f=Ij(u,f,x,v,R);break e}else if(x!==R){R=uh(Error(r(424)),f),f=Ij(u,f,x,v,R);break e}else for(Go=Vc(f.stateNode.containerInfo.firstChild),Zo=f,wn=!0,ns=null,v=zN(f,null,x,v),f.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(oh(),x===R){f=Vl(u,f,v);break e}oo(u,f,x,v)}f=f.child}return f;case 5:return XN(f),u===null&&Mk(f),x=f.type,R=f.pendingProps,I=u!==null?u.memoizedProps:null,L=R.children,kk(x,R)?L=null:I!==null&&kk(x,I)&&(f.flags|=32),Ej(u,f),oo(u,f,L,v),f.child;case 6:return u===null&&Mk(f),null;case 13:return $j(u,f,v);case 4:return Bk(f,f.stateNode.containerInfo),x=f.pendingProps,u===null?f.child=ah(f,null,x,v):oo(u,f,x,v),f.child;case 11:return x=f.type,R=f.pendingProps,R=f.elementType===x?R:is(x,R),Pj(u,f,x,R,v);case 7:return oo(u,f,f.pendingProps,v),f.child;case 8:return oo(u,f,f.pendingProps.children,v),f.child;case 12:return oo(u,f,f.pendingProps.children,v),f.child;case 10:e:{if(x=f.type._context,R=f.pendingProps,I=f.memoizedProps,L=R.value,Ur(x0,x._currentValue),x._currentValue=L,I!==null)if(rs(I.value,L)){if(I.children===R.children&&!bo.current){f=Vl(u,f,v);break e}}else for(I=f.child,I!==null&&(I.return=f);I!==null;){var K=I.dependencies;if(K!==null){L=I.child;for(var ae=K.firstContext;ae!==null;){if(ae.context===x){if(I.tag===1){ae=Ql(-1,v&-v),ae.tag=2;var be=I.updateQueue;if(be!==null){be=be.shared;var _e=be.pending;_e===null?ae.next=ae:(ae.next=_e.next,_e.next=ae),be.pending=ae}}I.lanes|=v,ae=I.alternate,ae!==null&&(ae.lanes|=v),Qk(I.return,v,f),K.lanes|=v;break}ae=ae.next}}else if(I.tag===10)L=I.type===f.type?null:I.child;else if(I.tag===18){if(L=I.return,L===null)throw Error(r(341));L.lanes|=v,K=L.alternate,K!==null&&(K.lanes|=v),Qk(L,v,f),L=I.sibling}else L=I.child;if(L!==null)L.return=I;else for(L=I;L!==null;){if(L===f){L=null;break}if(I=L.sibling,I!==null){I.return=L.return,L=I;break}L=L.return}I=L}oo(u,f,R.children,v),f=f.child}return f;case 9:return R=f.type,x=f.pendingProps.children,lh(f,v),R=ka(R),x=x(R),f.flags|=1,oo(u,f,x,v),f.child;case 14:return x=f.type,R=is(x,f.pendingProps),R=is(x.type,R),kj(u,f,x,R,v);case 15:return Cj(u,f,f.type,f.pendingProps,v);case 17:return x=f.type,R=f.pendingProps,R=f.elementType===x?R:is(x,R),N0(u,f),f.tag=1,Oo(x)?(u=!0,v0(f)):u=!1,lh(f,v),vj(f,x,R),tC(f,x,R,v),oC(null,f,x,!0,u,v);case 19:return Mj(u,f,v);case 22:return Tj(u,f,v)}throw Error(r(156,f.tag))};function iD(u,f){return vt(u,f)}function xre(u,f,v,x){this.tag=u,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ea(u,f,v,x){return new xre(u,f,v,x)}function kC(u){return u=u.prototype,!(!u||!u.isReactComponent)}function Pre(u){if(typeof u=="function")return kC(u)?1:0;if(u!=null){if(u=u.$$typeof,u===V)return 11;if(u===F)return 14}return 2}function Yc(u,f){var v=u.alternate;return v===null?(v=Ea(u.tag,f,u.key,u.mode),v.elementType=u.elementType,v.type=u.type,v.stateNode=u.stateNode,v.alternate=u,u.alternate=v):(v.pendingProps=f,v.type=u.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=u.flags&14680064,v.childLanes=u.childLanes,v.lanes=u.lanes,v.child=u.child,v.memoizedProps=u.memoizedProps,v.memoizedState=u.memoizedState,v.updateQueue=u.updateQueue,f=u.dependencies,v.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},v.sibling=u.sibling,v.index=u.index,v.ref=u.ref,v}function U0(u,f,v,x,R,I){var L=2;if(x=u,typeof u=="function")kC(u)&&(L=1);else if(typeof u=="string")L=5;else e:switch(u){case _:return Pd(v.children,R,I,f);case $:L=8,R|=8;break;case M:return u=Ea(12,v,f,R|2),u.elementType=M,u.lanes=I,u;case X:return u=Ea(13,v,f,R),u.elementType=X,u.lanes=I,u;case D:return u=Ea(19,v,f,R),u.elementType=D,u.lanes=I,u;case ie:return H0(v,R,I,f);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case j:L=10;break e;case B:L=9;break e;case V:L=11;break e;case F:L=14;break e;case Y:L=16,x=null;break e}throw Error(r(130,u==null?u:typeof u,""))}return f=Ea(L,v,f,R),f.elementType=u,f.type=x,f.lanes=I,f}function Pd(u,f,v,x){return u=Ea(7,u,x,f),u.lanes=v,u}function H0(u,f,v,x){return u=Ea(22,u,x,f),u.elementType=ie,u.lanes=v,u.stateNode={isHidden:!1},u}function CC(u,f,v){return u=Ea(6,u,null,f),u.lanes=v,u}function TC(u,f,v){return f=Ea(4,u.children!==null?u.children:[],u.key,f),f.lanes=v,f.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},f}function kre(u,f,v,x,R){this.tag=f,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ek(0),this.expirationTimes=ek(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ek(0),this.identifierPrefix=x,this.onRecoverableError=R,this.mutableSourceEagerHydrationData=null}function EC(u,f,v,x,R,I,L,K,ae){return u=new kre(u,f,v,K,ae),f===1?(f=1,I===!0&&(f|=8)):f=0,I=Ea(3,null,null,f),u.current=I,I.stateNode=u,I.memoizedState={element:x,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fk(I),u}function Cre(u,f,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:E,key:x==null?null:""+x,children:u,containerInfo:f,implementation:v}}function oD(u){if(!u)return Bc;u=u._reactInternals;e:{if(Ot(u)!==u||u.tag!==1)throw Error(r(170));var f=u;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Oo(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(r(171))}if(u.tag===1){var v=u.type;if(Oo(v))return AN(u,v,f)}return f}function aD(u,f,v,x,R,I,L,K,ae){return u=EC(v,x,!0,u,R,I,L,K,ae),u.context=oD(null),v=u.current,x=ao(),R=Zc(v),I=Ql(x,R),I.callback=f??null,Wc(v,I,R),u.current.lanes=R,Ng(u,R,x),xo(u,x),u}function X0(u,f,v,x){var R=f.current,I=ao(),L=Zc(R);return v=oD(v),f.context===null?f.context=v:f.pendingContext=v,f=Ql(I,L),f.payload={element:u},x=x===void 0?null:x,x!==null&&(f.callback=x),u=Wc(R,f,L),u!==null&&(ss(u,R,L,I),k0(u,R,L)),L}function Z0(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return u.child.stateNode;default:return u.child.stateNode}}function sD(u,f){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var v=u.retryLane;u.retryLane=v!==0&&v<f?v:f}}function _C(u,f){sD(u,f),(u=u.alternate)&&sD(u,f)}function Tre(){return null}var lD=typeof reportError=="function"?reportError:function(u){console.error(u)};function RC(u){this._internalRoot=u}G0.prototype.render=RC.prototype.render=function(u){var f=this._internalRoot;if(f===null)throw Error(r(409));X0(u,f,null,null)},G0.prototype.unmount=RC.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var f=u.containerInfo;wd(function(){X0(null,u,null,null)}),f[Ml]=null}};function G0(u){this._internalRoot=u}G0.prototype.unstable_scheduleHydration=function(u){if(u){var f=WM();u={blockedOn:null,target:u,priority:f};for(var v=0;v<Dc.length&&f!==0&&f<Dc[v].priority;v++);Dc.splice(v,0,u),v===0&&XM(u)}};function IC(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function Y0(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11&&(u.nodeType!==8||u.nodeValue!==" react-mount-point-unstable "))}function cD(){}function Ere(u,f,v,x,R){if(R){if(typeof x=="function"){var I=x;x=function(){var be=Z0(L);I.call(be)}}var L=aD(f,x,u,0,null,!1,!1,"",cD);return u._reactRootContainer=L,u[Ml]=L.current,Zg(u.nodeType===8?u.parentNode:u),wd(),L}for(;R=u.lastChild;)u.removeChild(R);if(typeof x=="function"){var K=x;x=function(){var be=Z0(ae);K.call(be)}}var ae=EC(u,0,!1,null,null,!1,!1,"",cD);return u._reactRootContainer=ae,u[Ml]=ae.current,Zg(u.nodeType===8?u.parentNode:u),wd(function(){X0(f,ae,v,x)}),ae}function K0(u,f,v,x,R){var I=v._reactRootContainer;if(I){var L=I;if(typeof R=="function"){var K=R;R=function(){var ae=Z0(L);K.call(ae)}}X0(f,L,u,R)}else L=Ere(v,f,u,R,x);return Z0(L)}zM=function(u){switch(u.tag){case 3:var f=u.stateNode;if(f.current.memoizedState.isDehydrated){var v=Ac(f.pendingLanes);v!==0&&(tk(f,v|1),xo(f,Dt()),(dr&6)===0&&(hh=Dt()+500,zc()))}break;case 13:wd(function(){var x=Ll(u,1);if(x!==null){var R=ao();ss(x,u,1,R)}}),_C(u,1)}},rk=function(u){if(u.tag===13){var f=Ll(u,134217728);if(f!==null){var v=ao();ss(f,u,134217728,v)}_C(u,134217728)}},qM=function(u){if(u.tag===13){var f=Zc(u),v=Ll(u,f);if(v!==null){var x=ao();ss(v,u,f,x)}_C(u,f)}},WM=function(){return $r},UM=function(u,f){var v=$r;try{return $r=u,f()}finally{$r=v}},cd=function(u,f,v){switch(f){case"input":if(Vt(u,v),f=v.name,v.type==="radio"&&f!=null){for(v=u;v.parentNode;)v=v.parentNode;for(v=v.querySelectorAll("input[name="+JSON.stringify(""+f)+'][type="radio"]'),f=0;f<v.length;f++){var x=v[f];if(x!==u&&x.form===u.form){var R=g0(x);if(!R)throw Error(r(90));re(x),Vt(x,R)}}}break;case"textarea":Tn(u,v);break;case"select":f=v.value,f!=null&&or(u,!!v.multiple,f,!1)}},ve=SC,we=wd;var _re={usingClientEntryPoint:!1,Events:[Kg,eh,g0,ts,ue,SC]},fm={findFiberByHostInstance:hd,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Rre={bundleType:fm.bundleType,version:fm.version,rendererPackageName:fm.rendererPackageName,rendererConfig:fm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(u){return u=qt(u),u===null?null:u.stateNode},findFiberByHostInstance:fm.findFiberByHostInstance||Tre,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var J0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!J0.isDisabled&&J0.supportsFiber)try{Sa=J0.inject(Rre),Un=J0}catch{}}return Po.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_re,Po.createPortal=function(u,f){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!IC(f))throw Error(r(200));return Cre(u,f,null,v)},Po.createRoot=function(u,f){if(!IC(u))throw Error(r(299));var v=!1,x="",R=lD;return f!=null&&(f.unstable_strictMode===!0&&(v=!0),f.identifierPrefix!==void 0&&(x=f.identifierPrefix),f.onRecoverableError!==void 0&&(R=f.onRecoverableError)),f=EC(u,1,!1,null,null,v,!1,x,R),u[Ml]=f.current,Zg(u.nodeType===8?u.parentNode:u),new RC(f)},Po.findDOMNode=function(u){if(u==null)return null;if(u.nodeType===1)return u;var f=u._reactInternals;if(f===void 0)throw typeof u.render=="function"?Error(r(188)):(u=Object.keys(u).join(","),Error(r(268,u)));return u=qt(f),u=u===null?null:u.stateNode,u},Po.flushSync=function(u){return wd(u)},Po.hydrate=function(u,f,v){if(!Y0(f))throw Error(r(200));return K0(null,u,f,!0,v)},Po.hydrateRoot=function(u,f,v){if(!IC(u))throw Error(r(405));var x=v!=null&&v.hydratedSources||null,R=!1,I="",L=lD;if(v!=null&&(v.unstable_strictMode===!0&&(R=!0),v.identifierPrefix!==void 0&&(I=v.identifierPrefix),v.onRecoverableError!==void 0&&(L=v.onRecoverableError)),f=aD(f,null,u,1,v??null,R,!1,I,L),u[Ml]=f.current,Zg(u),x)for(u=0;u<x.length;u++)v=x[u],R=v._getVersion,R=R(v._source),f.mutableSourceEagerHydrationData==null?f.mutableSourceEagerHydrationData=[v,R]:f.mutableSourceEagerHydrationData.push(v,R);return new G0(f)},Po.render=function(u,f,v){if(!Y0(f))throw Error(r(200));return K0(null,u,f,!1,v)},Po.unmountComponentAtNode=function(u){if(!Y0(u))throw Error(r(40));return u._reactRootContainer?(wd(function(){K0(null,null,u,!1,function(){u._reactRootContainer=null,u[Ml]=null})}),!0):!1},Po.unstable_batchedUpdates=SC,Po.unstable_renderSubtreeIntoContainer=function(u,f,v,x){if(!Y0(v))throw Error(r(200));if(u==null||u._reactInternals===void 0)throw Error(r(38));return K0(u,f,v,!1,x)},Po.version="18.3.1-next-f1338f8080-20240426",Po}var yD;function cz(){if(yD)return MC.exports;yD=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),MC.exports=Vre(),MC.exports}var bD;function Fre(){if(bD)return eO;bD=1;var t=cz();return eO.createRoot=t.createRoot,eO.hydrateRoot=t.hydrateRoot,eO}var Bre=Fre();const zre={BASE_URL:"/",DEV:!1,GIT_BRANCH_NAME:"HEAD",GIT_COMMIT_HASH:"58754ca",MODE:"production",PACKAGE_VERSION:"1.7.1",PROD:!0,REACT_APP_ENDPOINT_HOST:"",REACT_APP_ENDPOINT_PORT:"",REACT_APP_ENDPOINT_SERVER_URL:"/endpoint",REACT_APP_GRAPHQL_SERVER_URL:"/graphql",REACT_APP_SWAGGER_SERVER_URL:"/api",SSR:!1},gv=t=>{var n;const e=zre[t];return((n=window.__env__)==null?void 0:n[t])||e},Lo=(...t)=>t.filter(Boolean).map(e=>e.trim()).join(" ");function qre(t,e){return`${t} returned \`undefined\`. Seems you forgot to wrap component within ${e}`}function mv(t={}){const{name:e,strict:r=!0,hookName:n="useContext",providerName:i="Provider",errorMessage:o,defaultValue:a}=t,s=A.createContext(a);s.displayName=e;function l(){var d;const c=A.useContext(s);if(!c&&r){const p=new Error(o??qre(n,i));throw p.name="ContextError",(d=Error.captureStackTrace)==null||d.call(Error,p,l),p}return c}return[s.Provider,l,s]}function Wre(...t){return function(...r){t.forEach(n=>n==null?void 0:n(...r))}}const Ure=(...t)=>t.map(e=>{var r;return(r=e==null?void 0:e.trim)==null?void 0:r.call(e)}).filter(Boolean).join(" "),Hre=/^on[A-Z]/;function Wv(...t){let e={};for(let r of t){for(let n in e){if(Hre.test(n)&&typeof e[n]=="function"&&typeof r[n]=="function"){e[n]=Wre(e[n],r[n]);continue}if(n==="className"||n==="class"){e[n]=Ure(e[n],r[n]);continue}if(n==="style"){e[n]=Object.assign({},e[n]??{},r[n]??{});continue}e[n]=r[n]!==void 0?r[n]:e[n]}for(let n in r)e[n]===void 0&&(e[n]=r[n])}return e}const Xre=Object.freeze({}),Zre=Object.freeze({});function uz(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var Gre=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Yre=uz(function(t){return Gre.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function Kre(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function Jre(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var ene=function(){function t(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Jre(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Kre(i);try{o.insertRule(n,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},t}(),Yi="-ms-",Q1="-moz-",Or="-webkit-",dz="comm",u$="rule",d$="decl",tne="@import",fz="@keyframes",rne="@layer",nne=Math.abs,bx=String.fromCharCode,ine=Object.assign;function one(t,e){return Vi(t,0)^45?(((e<<2^Vi(t,0))<<2^Vi(t,1))<<2^Vi(t,2))<<2^Vi(t,3):0}function hz(t){return t.trim()}function ane(t,e){return(t=e.exec(t))?t[0]:t}function wr(t,e,r){return t.replace(e,r)}function m_(t,e){return t.indexOf(e)}function Vi(t,e){return t.charCodeAt(e)|0}function Uv(t,e,r){return t.slice(e,r)}function qs(t){return t.length}function f$(t){return t.length}function tO(t,e){return e.push(t),t}function sne(t,e){return t.map(e).join("")}var Ox=1,Op=1,pz=0,Vo=0,Jn=0,Zp="";function wx(t,e,r,n,i,o,a){return{value:t,root:e,parent:r,type:n,props:i,children:o,line:Ox,column:Op,length:a,return:""}}function pm(t,e){return ine(wx("",null,null,"",null,null,0),t,{length:-t.length},e)}function lne(){return Jn}function cne(){return Jn=Vo>0?Vi(Zp,--Vo):0,Op--,Jn===10&&(Op=1,Ox--),Jn}function pa(){return Jn=Vo<pz?Vi(Zp,Vo++):0,Op++,Jn===10&&(Op=1,Ox++),Jn}function tl(){return Vi(Zp,Vo)}function Jw(){return Vo}function ab(t,e){return Uv(Zp,t,e)}function Hv(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function gz(t){return Ox=Op=1,pz=qs(Zp=t),Vo=0,[]}function mz(t){return Zp="",t}function e1(t){return hz(ab(Vo-1,v_(t===91?t+2:t===40?t+1:t)))}function une(t){for(;(Jn=tl())&&Jn<33;)pa();return Hv(t)>2||Hv(Jn)>3?"":" "}function dne(t,e){for(;--e&&pa()&&!(Jn<48||Jn>102||Jn>57&&Jn<65||Jn>70&&Jn<97););return ab(t,Jw()+(e<6&&tl()==32&&pa()==32))}function v_(t){for(;pa();)switch(Jn){case t:return Vo;case 34:case 39:t!==34&&t!==39&&v_(Jn);break;case 40:t===41&&v_(t);break;case 92:pa();break}return Vo}function fne(t,e){for(;pa()&&t+Jn!==57;)if(t+Jn===84&&tl()===47)break;return"/*"+ab(e,Vo-1)+"*"+bx(t===47?t:pa())}function hne(t){for(;!Hv(tl());)pa();return ab(t,Vo)}function pne(t){return mz(t1("",null,null,null,[""],t=gz(t),0,[0],t))}function t1(t,e,r,n,i,o,a,s,l){for(var c=0,d=0,p=a,g=0,m=0,y=0,b=1,O=1,S=1,w=0,k="",T=i,C=o,E=n,_=k;O;)switch(y=w,w=pa()){case 40:if(y!=108&&Vi(_,p-1)==58){m_(_+=wr(e1(w),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:_+=e1(w);break;case 9:case 10:case 13:case 32:_+=une(y);break;case 92:_+=dne(Jw()-1,7);continue;case 47:switch(tl()){case 42:case 47:tO(gne(fne(pa(),Jw()),e,r),l);break;default:_+="/"}break;case 123*b:s[c++]=qs(_)*S;case 125*b:case 59:case 0:switch(w){case 0:case 125:O=0;case 59+d:S==-1&&(_=wr(_,/\f/g,"")),m>0&&qs(_)-p&&tO(m>32?wD(_+";",n,r,p-1):wD(wr(_," ","")+";",n,r,p-2),l);break;case 59:_+=";";default:if(tO(E=OD(_,e,r,c,d,i,s,k,T=[],C=[],p),o),w===123)if(d===0)t1(_,e,E,E,T,o,p,s,C);else switch(g===99&&Vi(_,3)===110?100:g){case 100:case 108:case 109:case 115:t1(t,E,E,n&&tO(OD(t,E,E,0,0,i,s,k,i,T=[],p),C),i,C,p,s,n?T:C);break;default:t1(_,E,E,E,[""],C,0,s,C)}}c=d=m=0,b=S=1,k=_="",p=a;break;case 58:p=1+qs(_),m=y;default:if(b<1){if(w==123)--b;else if(w==125&&b++==0&&cne()==125)continue}switch(_+=bx(w),w*b){case 38:S=d>0?1:(_+="\f",-1);break;case 44:s[c++]=(qs(_)-1)*S,S=1;break;case 64:tl()===45&&(_+=e1(pa())),g=tl(),d=p=qs(k=_+=hne(Jw())),w++;break;case 45:y===45&&qs(_)==2&&(b=0)}}return o}function OD(t,e,r,n,i,o,a,s,l,c,d){for(var p=i-1,g=i===0?o:[""],m=f$(g),y=0,b=0,O=0;y<n;++y)for(var S=0,w=Uv(t,p+1,p=nne(b=a[y])),k=t;S<m;++S)(k=hz(b>0?g[S]+" "+w:wr(w,/&\f/g,g[S])))&&(l[O++]=k);return wx(t,e,r,i===0?u$:s,l,c,d)}function gne(t,e,r){return wx(t,e,r,dz,bx(lne()),Uv(t,2,-2),0)}function wD(t,e,r,n){return wx(t,e,r,d$,Uv(t,0,n),Uv(t,n+1,-1),n)}function op(t,e){for(var r="",n=f$(t),i=0;i<n;i++)r+=e(t[i],i,t,e)||"";return r}function mne(t,e,r,n){switch(t.type){case rne:if(t.children.length)break;case tne:case d$:return t.return=t.return||t.value;case dz:return"";case fz:return t.return=t.value+"{"+op(t.children,n)+"}";case u$:t.value=t.props.join(",")}return qs(r=op(t.children,n))?t.return=t.value+"{"+r+"}":""}function vne(t){var e=f$(t);return function(r,n,i,o){for(var a="",s=0;s<e;s++)a+=t[s](r,n,i,o)||"";return a}}function yne(t){return function(e){e.root||(e=e.return)&&t(e)}}var bne=function(e,r,n){for(var i=0,o=0;i=o,o=tl(),i===38&&o===12&&(r[n]=1),!Hv(o);)pa();return ab(e,Vo)},One=function(e,r){var n=-1,i=44;do switch(Hv(i)){case 0:i===38&&tl()===12&&(r[n]=1),e[n]+=bne(Vo-1,r,n);break;case 2:e[n]+=e1(i);break;case 4:if(i===44){e[++n]=tl()===58?"&\f":"",r[n]=e[n].length;break}default:e[n]+=bx(i)}while(i=pa());return e},wne=function(e,r){return mz(One(gz(e),r))},SD=new WeakMap,Sne=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,n=e.parent,i=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!SD.get(n))&&!i){SD.set(e,!0);for(var o=[],a=wne(r,o),s=n.props,l=0,c=0;l<a.length;l++)for(var d=0;d<s.length;d++,c++)e.props[c]=o[l]?a[l].replace(/&\f/g,s[d]):s[d]+" "+a[l]}}},xne=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}};function vz(t,e){switch(one(t,e)){case 5103:return Or+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Or+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Or+t+Q1+t+Yi+t+t;case 6828:case 4268:return Or+t+Yi+t+t;case 6165:return Or+t+Yi+"flex-"+t+t;case 5187:return Or+t+wr(t,/(\w+).+(:[^]+)/,Or+"box-$1$2"+Yi+"flex-$1$2")+t;case 5443:return Or+t+Yi+"flex-item-"+wr(t,/flex-|-self/,"")+t;case 4675:return Or+t+Yi+"flex-line-pack"+wr(t,/align-content|flex-|-self/,"")+t;case 5548:return Or+t+Yi+wr(t,"shrink","negative")+t;case 5292:return Or+t+Yi+wr(t,"basis","preferred-size")+t;case 6060:return Or+"box-"+wr(t,"-grow","")+Or+t+Yi+wr(t,"grow","positive")+t;case 4554:return Or+wr(t,/([^-])(transform)/g,"$1"+Or+"$2")+t;case 6187:return wr(wr(wr(t,/(zoom-|grab)/,Or+"$1"),/(image-set)/,Or+"$1"),t,"")+t;case 5495:case 3959:return wr(t,/(image-set\([^]*)/,Or+"$1$`$1");case 4968:return wr(wr(t,/(.+:)(flex-)?(.*)/,Or+"box-pack:$3"+Yi+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Or+t+t;case 4095:case 3583:case 4068:case 2532:return wr(t,/(.+)-inline(.+)/,Or+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(qs(t)-1-e>6)switch(Vi(t,e+1)){case 109:if(Vi(t,e+4)!==45)break;case 102:return wr(t,/(.+:)(.+)-([^]+)/,"$1"+Or+"$2-$3$1"+Q1+(Vi(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~m_(t,"stretch")?vz(wr(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Vi(t,e+1)!==115)break;case 6444:switch(Vi(t,qs(t)-3-(~m_(t,"!important")&&10))){case 107:return wr(t,":",":"+Or)+t;case 101:return wr(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Or+(Vi(t,14)===45?"inline-":"")+"box$3$1"+Or+"$2$3$1"+Yi+"$2box$3")+t}break;case 5936:switch(Vi(t,e+11)){case 114:return Or+t+Yi+wr(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Or+t+Yi+wr(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Or+t+Yi+wr(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Or+t+Yi+t+t}return t}var Pne=function(e,r,n,i){if(e.length>-1&&!e.return)switch(e.type){case d$:e.return=vz(e.value,e.length);break;case fz:return op([pm(e,{value:wr(e.value,"@","@"+Or)})],i);case u$:if(e.length)return sne(e.props,function(o){switch(ane(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return op([pm(e,{props:[wr(o,/:(read-\w+)/,":"+Q1+"$1")]})],i);case"::placeholder":return op([pm(e,{props:[wr(o,/:(plac\w+)/,":"+Or+"input-$1")]}),pm(e,{props:[wr(o,/:(plac\w+)/,":"+Q1+"$1")]}),pm(e,{props:[wr(o,/:(plac\w+)/,Yi+"input-$1")]})],i)}return""})}},kne=[Pne],Cne=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(b){var O=b.getAttribute("data-emotion");O.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var i=e.stylisPlugins||kne,o={},a,s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(b){for(var O=b.getAttribute("data-emotion").split(" "),S=1;S<O.length;S++)o[O[S]]=!0;s.push(b)});var l,c=[Sne,xne];{var d,p=[mne,yne(function(b){d.insert(b)})],g=vne(c.concat(i,p)),m=function(O){return op(pne(O),g)};l=function(O,S,w,k){d=w,m(O?O+"{"+S.styles+"}":S.styles),k&&(y.inserted[S.name]=!0)}}var y={key:r,sheet:new ene({key:r,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return y.sheet.hydrate(s),y};function Pt(){return Pt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Pt.apply(null,arguments)}var DC={exports:{}},Pr={};/** @license React v16.13.1
|
|
40
|
+
`+I.stack}return{value:u,source:f,stack:R,digest:null}}function rC(u,f,v){return{value:u,source:null,stack:v??null,digest:f??null}}function nC(u,f){try{console.error(f.value)}catch(v){setTimeout(function(){throw v})}}var are=typeof WeakMap=="function"?WeakMap:Map;function bj(u,f,v){v=Ql(-1,v),v.tag=3,v.payload={element:null};var x=f.value;return v.callback=function(){V0||(V0=!0,yC=x),nC(u,f)},v}function Oj(u,f,v){v=Ql(-1,v),v.tag=3;var x=u.type.getDerivedStateFromError;if(typeof x=="function"){var R=f.value;v.payload=function(){return x(R)},v.callback=function(){nC(u,f)}}var I=u.stateNode;return I!==null&&typeof I.componentDidCatch=="function"&&(v.callback=function(){nC(u,f),typeof x!="function"&&(Hc===null?Hc=new Set([this]):Hc.add(this));var L=f.stack;this.componentDidCatch(f.value,{componentStack:L!==null?L:""})}),v}function wj(u,f,v){var x=u.pingCache;if(x===null){x=u.pingCache=new are;var R=new Set;x.set(f,R)}else R=x.get(f),R===void 0&&(R=new Set,x.set(f,R));R.has(v)||(R.add(v),u=Ore.bind(null,u,f,v),f.then(u,u))}function Sj(u){do{var f;if((f=u.tag===13)&&(f=u.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return u;u=u.return}while(u!==null);return null}function xj(u,f,v,x,R){return(u.mode&1)===0?(u===f?u.flags|=65536:(u.flags|=128,v.flags|=131072,v.flags&=-52805,v.tag===1&&(v.alternate===null?v.tag=17:(f=Ql(-1,1),f.tag=2,Wc(v,f,1))),v.lanes|=1),u):(u.flags|=65536,u.lanes=R,u)}var sre=T.ReactCurrentOwner,wo=!1;function oo(u,f,v,x){f.child=u===null?zN(f,null,v,x):ah(f,u.child,v,x)}function Pj(u,f,v,x,R){v=v.render;var I=f.ref;return lh(f,R),x=Xk(u,f,v,x,I,R),v=Zk(),u!==null&&!wo?(f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~R,Vl(u,f,R)):(wn&&v&&Ik(f),f.flags|=1,oo(u,f,x,R),f.child)}function kj(u,f,v,x,R){if(u===null){var I=v.type;return typeof I=="function"&&!kC(I)&&I.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(f.tag=15,f.type=I,Cj(u,f,I,x,R)):(u=U0(v.type,null,x,f,f.mode,R),u.ref=f.ref,u.return=f,f.child=u)}if(I=u.child,(u.lanes&R)===0){var L=I.memoizedProps;if(v=v.compare,v=v!==null?v:Ug,v(L,x)&&u.ref===f.ref)return Vl(u,f,R)}return f.flags|=1,u=Yc(I,x),u.ref=f.ref,u.return=f,f.child=u}function Cj(u,f,v,x,R){if(u!==null){var I=u.memoizedProps;if(Ug(I,x)&&u.ref===f.ref)if(wo=!1,f.pendingProps=x=I,(u.lanes&R)!==0)(u.flags&131072)!==0&&(wo=!0);else return f.lanes=u.lanes,Vl(u,f,R)}return iC(u,f,v,x,R)}function Tj(u,f,v){var x=f.pendingProps,R=x.children,I=u!==null?u.memoizedState:null;if(x.mode==="hidden")if((f.mode&1)===0)f.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ur(fh,Yo),Yo|=v;else{if((v&1073741824)===0)return u=I!==null?I.baseLanes|v:v,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:u,cachePool:null,transitions:null},f.updateQueue=null,Ur(fh,Yo),Yo|=u,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},x=I!==null?I.baseLanes:v,Ur(fh,Yo),Yo|=x}else I!==null?(x=I.baseLanes|v,f.memoizedState=null):x=v,Ur(fh,Yo),Yo|=x;return oo(u,f,R,v),f.child}function Ej(u,f){var v=f.ref;(u===null&&v!==null||u!==null&&u.ref!==v)&&(f.flags|=512,f.flags|=2097152)}function iC(u,f,v,x,R){var I=Oo(v)?pd:Hi.current;return I=rh(f,I),lh(f,R),v=Xk(u,f,v,x,I,R),x=Zk(),u!==null&&!wo?(f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~R,Vl(u,f,R)):(wn&&x&&Ik(f),f.flags|=1,oo(u,f,v,R),f.child)}function _j(u,f,v,x,R){if(Oo(v)){var I=!0;v0(f)}else I=!1;if(lh(f,R),f.stateNode===null)N0(u,f),vj(f,v,x),tC(f,v,x,R),x=!0;else if(u===null){var L=f.stateNode,K=f.memoizedProps;L.props=K;var ae=L.context,be=v.contextType;typeof be=="object"&&be!==null?be=ka(be):(be=Oo(v)?pd:Hi.current,be=rh(f,be));var _e=v.getDerivedStateFromProps,Re=typeof _e=="function"||typeof L.getSnapshotBeforeUpdate=="function";Re||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(K!==x||ae!==be)&&yj(f,L,x,be),qc=!1;var Ee=f.memoizedState;L.state=Ee,C0(f,x,L,R),ae=f.memoizedState,K!==x||Ee!==ae||bo.current||qc?(typeof _e=="function"&&(eC(f,v,_e,x),ae=f.memoizedState),(K=qc||mj(f,v,K,x,Ee,ae,be))?(Re||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount()),typeof L.componentDidMount=="function"&&(f.flags|=4194308)):(typeof L.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=x,f.memoizedState=ae),L.props=x,L.state=ae,L.context=be,x=K):(typeof L.componentDidMount=="function"&&(f.flags|=4194308),x=!1)}else{L=f.stateNode,WN(u,f),K=f.memoizedProps,be=f.type===f.elementType?K:is(f.type,K),L.props=be,Re=f.pendingProps,Ee=L.context,ae=v.contextType,typeof ae=="object"&&ae!==null?ae=ka(ae):(ae=Oo(v)?pd:Hi.current,ae=rh(f,ae));var He=v.getDerivedStateFromProps;(_e=typeof He=="function"||typeof L.getSnapshotBeforeUpdate=="function")||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(K!==Re||Ee!==ae)&&yj(f,L,x,ae),qc=!1,Ee=f.memoizedState,L.state=Ee,C0(f,x,L,R);var Je=f.memoizedState;K!==Re||Ee!==Je||bo.current||qc?(typeof He=="function"&&(eC(f,v,He,x),Je=f.memoizedState),(be=qc||mj(f,v,be,x,Ee,Je,ae)||!1)?(_e||typeof L.UNSAFE_componentWillUpdate!="function"&&typeof L.componentWillUpdate!="function"||(typeof L.componentWillUpdate=="function"&&L.componentWillUpdate(x,Je,ae),typeof L.UNSAFE_componentWillUpdate=="function"&&L.UNSAFE_componentWillUpdate(x,Je,ae)),typeof L.componentDidUpdate=="function"&&(f.flags|=4),typeof L.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof L.componentDidUpdate!="function"||K===u.memoizedProps&&Ee===u.memoizedState||(f.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||K===u.memoizedProps&&Ee===u.memoizedState||(f.flags|=1024),f.memoizedProps=x,f.memoizedState=Je),L.props=x,L.state=Je,L.context=ae,x=be):(typeof L.componentDidUpdate!="function"||K===u.memoizedProps&&Ee===u.memoizedState||(f.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||K===u.memoizedProps&&Ee===u.memoizedState||(f.flags|=1024),x=!1)}return oC(u,f,v,x,I,R)}function oC(u,f,v,x,R,I){Ej(u,f);var L=(f.flags&128)!==0;if(!x&&!L)return R&&MN(f,v,!1),Vl(u,f,I);x=f.stateNode,sre.current=f;var K=L&&typeof v.getDerivedStateFromError!="function"?null:x.render();return f.flags|=1,u!==null&&L?(f.child=ah(f,u.child,null,I),f.child=ah(f,null,K,I)):oo(u,f,K,I),f.memoizedState=x.state,R&&MN(f,v,!0),f.child}function Rj(u){var f=u.stateNode;f.pendingContext?$N(u,f.pendingContext,f.pendingContext!==f.context):f.context&&$N(u,f.context,!1),Bk(u,f.containerInfo)}function Ij(u,f,v,x,R){return oh(),Nk(R),f.flags|=256,oo(u,f,v,x),f.child}var aC={dehydrated:null,treeContext:null,retryLane:0};function sC(u){return{baseLanes:u,cachePool:null,transitions:null}}function $j(u,f,v){var x=f.pendingProps,R=_n.current,I=!1,L=(f.flags&128)!==0,K;if((K=L)||(K=u!==null&&u.memoizedState===null?!1:(R&2)!==0),K?(I=!0,f.flags&=-129):(u===null||u.memoizedState!==null)&&(R|=1),Ur(_n,R&1),u===null)return Mk(f),u=f.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?((f.mode&1)===0?f.lanes=1:u.data==="$!"?f.lanes=8:f.lanes=1073741824,null):(L=x.children,u=x.fallback,I?(x=f.mode,I=f.child,L={mode:"hidden",children:L},(x&1)===0&&I!==null?(I.childLanes=0,I.pendingProps=L):I=H0(L,x,0,null),u=Pd(u,x,v,null),I.return=f,u.return=f,I.sibling=u,f.child=I,f.child.memoizedState=sC(v),f.memoizedState=aC,u):lC(f,L));if(R=u.memoizedState,R!==null&&(K=R.dehydrated,K!==null))return lre(u,f,L,x,K,R,v);if(I){I=x.fallback,L=f.mode,R=u.child,K=R.sibling;var ae={mode:"hidden",children:x.children};return(L&1)===0&&f.child!==R?(x=f.child,x.childLanes=0,x.pendingProps=ae,f.deletions=null):(x=Yc(R,ae),x.subtreeFlags=R.subtreeFlags&14680064),K!==null?I=Yc(K,I):(I=Pd(I,L,v,null),I.flags|=2),I.return=f,x.return=f,x.sibling=I,f.child=x,x=I,I=f.child,L=u.child.memoizedState,L=L===null?sC(v):{baseLanes:L.baseLanes|v,cachePool:null,transitions:L.transitions},I.memoizedState=L,I.childLanes=u.childLanes&~v,f.memoizedState=aC,x}return I=u.child,u=I.sibling,x=Yc(I,{mode:"visible",children:x.children}),(f.mode&1)===0&&(x.lanes=v),x.return=f,x.sibling=null,u!==null&&(v=f.deletions,v===null?(f.deletions=[u],f.flags|=16):v.push(u)),f.child=x,f.memoizedState=null,x}function lC(u,f){return f=H0({mode:"visible",children:f},u.mode,0,null),f.return=u,u.child=f}function M0(u,f,v,x){return x!==null&&Nk(x),ah(f,u.child,null,v),u=lC(f,f.pendingProps.children),u.flags|=2,f.memoizedState=null,u}function lre(u,f,v,x,R,I,L){if(v)return f.flags&256?(f.flags&=-257,x=rC(Error(r(422))),M0(u,f,L,x)):f.memoizedState!==null?(f.child=u.child,f.flags|=128,null):(I=x.fallback,R=f.mode,x=H0({mode:"visible",children:x.children},R,0,null),I=Pd(I,R,L,null),I.flags|=2,x.return=f,I.return=f,x.sibling=I,f.child=x,(f.mode&1)!==0&&ah(f,u.child,null,L),f.child.memoizedState=sC(L),f.memoizedState=aC,I);if((f.mode&1)===0)return M0(u,f,L,null);if(R.data==="$!"){if(x=R.nextSibling&&R.nextSibling.dataset,x)var K=x.dgst;return x=K,I=Error(r(419)),x=rC(I,x,void 0),M0(u,f,L,x)}if(K=(L&u.childLanes)!==0,wo||K){if(x=mi,x!==null){switch(L&-L){case 4:R=2;break;case 16:R=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:R=32;break;case 536870912:R=268435456;break;default:R=0}R=(R&(x.suspendedLanes|L))!==0?0:R,R!==0&&R!==I.retryLane&&(I.retryLane=R,Ll(u,R),ss(x,u,R,-1))}return PC(),x=rC(Error(r(421))),M0(u,f,L,x)}return R.data==="$?"?(f.flags|=128,f.child=u.child,f=wre.bind(null,u),R._reactRetry=f,null):(u=I.treeContext,Go=Vc(R.nextSibling),Zo=f,wn=!0,ns=null,u!==null&&(xa[Pa++]=jl,xa[Pa++]=Dl,xa[Pa++]=gd,jl=u.id,Dl=u.overflow,gd=f),f=lC(f,x.children),f.flags|=4096,f)}function Aj(u,f,v){u.lanes|=f;var x=u.alternate;x!==null&&(x.lanes|=f),Qk(u.return,f,v)}function cC(u,f,v,x,R){var I=u.memoizedState;I===null?u.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:x,tail:v,tailMode:R}:(I.isBackwards=f,I.rendering=null,I.renderingStartTime=0,I.last=x,I.tail=v,I.tailMode=R)}function Mj(u,f,v){var x=f.pendingProps,R=x.revealOrder,I=x.tail;if(oo(u,f,x.children,v),x=_n.current,(x&2)!==0)x=x&1|2,f.flags|=128;else{if(u!==null&&(u.flags&128)!==0)e:for(u=f.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&Aj(u,v,f);else if(u.tag===19)Aj(u,v,f);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===f)break e;for(;u.sibling===null;){if(u.return===null||u.return===f)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}x&=1}if(Ur(_n,x),(f.mode&1)===0)f.memoizedState=null;else switch(R){case"forwards":for(v=f.child,R=null;v!==null;)u=v.alternate,u!==null&&T0(u)===null&&(R=v),v=v.sibling;v=R,v===null?(R=f.child,f.child=null):(R=v.sibling,v.sibling=null),cC(f,!1,R,v,I);break;case"backwards":for(v=null,R=f.child,f.child=null;R!==null;){if(u=R.alternate,u!==null&&T0(u)===null){f.child=R;break}u=R.sibling,R.sibling=v,v=R,R=u}cC(f,!0,v,null,I);break;case"together":cC(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function N0(u,f){(f.mode&1)===0&&u!==null&&(u.alternate=null,f.alternate=null,f.flags|=2)}function Vl(u,f,v){if(u!==null&&(f.dependencies=u.dependencies),Od|=f.lanes,(v&f.childLanes)===0)return null;if(u!==null&&f.child!==u.child)throw Error(r(153));if(f.child!==null){for(u=f.child,v=Yc(u,u.pendingProps),f.child=v,v.return=f;u.sibling!==null;)u=u.sibling,v=v.sibling=Yc(u,u.pendingProps),v.return=f;v.sibling=null}return f.child}function cre(u,f,v){switch(f.tag){case 3:Rj(f),oh();break;case 5:XN(f);break;case 1:Oo(f.type)&&v0(f);break;case 4:Bk(f,f.stateNode.containerInfo);break;case 10:var x=f.type._context,R=f.memoizedProps.value;Ur(x0,x._currentValue),x._currentValue=R;break;case 13:if(x=f.memoizedState,x!==null)return x.dehydrated!==null?(Ur(_n,_n.current&1),f.flags|=128,null):(v&f.child.childLanes)!==0?$j(u,f,v):(Ur(_n,_n.current&1),u=Vl(u,f,v),u!==null?u.sibling:null);Ur(_n,_n.current&1);break;case 19:if(x=(v&f.childLanes)!==0,(u.flags&128)!==0){if(x)return Mj(u,f,v);f.flags|=128}if(R=f.memoizedState,R!==null&&(R.rendering=null,R.tail=null,R.lastEffect=null),Ur(_n,_n.current),x)break;return null;case 22:case 23:return f.lanes=0,Tj(u,f,v)}return Vl(u,f,v)}var Nj,uC,jj,Dj;Nj=function(u,f){for(var v=f.child;v!==null;){if(v.tag===5||v.tag===6)u.appendChild(v.stateNode);else if(v.tag!==4&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===f)break;for(;v.sibling===null;){if(v.return===null||v.return===f)return;v=v.return}v.sibling.return=v.return,v=v.sibling}},uC=function(){},jj=function(u,f,v,x){var R=u.memoizedProps;if(R!==x){u=f.stateNode,yd(Ns.current);var I=null;switch(v){case"input":R=ke(u,R),x=ke(u,x),I=[];break;case"select":R=z({},R,{value:void 0}),x=z({},x,{value:void 0}),I=[];break;case"textarea":R=Rr(u,R),x=Rr(u,x),I=[];break;default:typeof R.onClick!="function"&&typeof x.onClick=="function"&&(u.onclick=p0)}Il(v,x);var L;v=null;for(be in R)if(!x.hasOwnProperty(be)&&R.hasOwnProperty(be)&&R[be]!=null)if(be==="style"){var K=R[be];for(L in K)K.hasOwnProperty(L)&&(v||(v={}),v[L]="")}else be!=="dangerouslySetInnerHTML"&&be!=="children"&&be!=="suppressContentEditableWarning"&&be!=="suppressHydrationWarning"&&be!=="autoFocus"&&(i.hasOwnProperty(be)?I||(I=[]):(I=I||[]).push(be,null));for(be in x){var ae=x[be];if(K=R!=null?R[be]:void 0,x.hasOwnProperty(be)&&ae!==K&&(ae!=null||K!=null))if(be==="style")if(K){for(L in K)!K.hasOwnProperty(L)||ae&&ae.hasOwnProperty(L)||(v||(v={}),v[L]="");for(L in ae)ae.hasOwnProperty(L)&&K[L]!==ae[L]&&(v||(v={}),v[L]=ae[L])}else v||(I||(I=[]),I.push(be,v)),v=ae;else be==="dangerouslySetInnerHTML"?(ae=ae?ae.__html:void 0,K=K?K.__html:void 0,ae!=null&&K!==ae&&(I=I||[]).push(be,ae)):be==="children"?typeof ae!="string"&&typeof ae!="number"||(I=I||[]).push(be,""+ae):be!=="suppressContentEditableWarning"&&be!=="suppressHydrationWarning"&&(i.hasOwnProperty(be)?(ae!=null&&be==="onScroll"&&sn("scroll",u),I||K===ae||(I=[])):(I=I||[]).push(be,ae))}v&&(I=I||[]).push("style",v);var be=I;(f.updateQueue=be)&&(f.flags|=4)}},Dj=function(u,f,v,x){v!==x&&(f.flags|=4)};function sm(u,f){if(!wn)switch(u.tailMode){case"hidden":f=u.tail;for(var v=null;f!==null;)f.alternate!==null&&(v=f),f=f.sibling;v===null?u.tail=null:v.sibling=null;break;case"collapsed":v=u.tail;for(var x=null;v!==null;)v.alternate!==null&&(x=v),v=v.sibling;x===null?f||u.tail===null?u.tail=null:u.tail.sibling=null:x.sibling=null}}function Zi(u){var f=u.alternate!==null&&u.alternate.child===u.child,v=0,x=0;if(f)for(var R=u.child;R!==null;)v|=R.lanes|R.childLanes,x|=R.subtreeFlags&14680064,x|=R.flags&14680064,R.return=u,R=R.sibling;else for(R=u.child;R!==null;)v|=R.lanes|R.childLanes,x|=R.subtreeFlags,x|=R.flags,R.return=u,R=R.sibling;return u.subtreeFlags|=x,u.childLanes=v,f}function ure(u,f,v){var x=f.pendingProps;switch($k(f),f.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zi(f),null;case 1:return Oo(f.type)&&m0(),Zi(f),null;case 3:return x=f.stateNode,ch(),ln(bo),ln(Hi),Wk(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),(u===null||u.child===null)&&(w0(f)?f.flags|=4:u===null||u.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,ns!==null&&(wC(ns),ns=null))),uC(u,f),Zi(f),null;case 5:zk(f);var R=yd(rm.current);if(v=f.type,u!==null&&f.stateNode!=null)jj(u,f,v,x,R),u.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!x){if(f.stateNode===null)throw Error(r(166));return Zi(f),null}if(u=yd(Ns.current),w0(f)){x=f.stateNode,v=f.type;var I=f.memoizedProps;switch(x[Ms]=f,x[Yg]=I,u=(f.mode&1)!==0,v){case"dialog":sn("cancel",x),sn("close",x);break;case"iframe":case"object":case"embed":sn("load",x);break;case"video":case"audio":for(R=0;R<Xg.length;R++)sn(Xg[R],x);break;case"source":sn("error",x);break;case"img":case"image":case"link":sn("error",x),sn("load",x);break;case"details":sn("toggle",x);break;case"input":Me(x,I),sn("invalid",x);break;case"select":x._wrapperState={wasMultiple:!!I.multiple},sn("invalid",x);break;case"textarea":zt(x,I),sn("invalid",x)}Il(v,I),R=null;for(var L in I)if(I.hasOwnProperty(L)){var K=I[L];L==="children"?typeof K=="string"?x.textContent!==K&&(I.suppressHydrationWarning!==!0&&h0(x.textContent,K,u),R=["children",K]):typeof K=="number"&&x.textContent!==""+K&&(I.suppressHydrationWarning!==!0&&h0(x.textContent,K,u),R=["children",""+K]):i.hasOwnProperty(L)&&K!=null&&L==="onScroll"&&sn("scroll",x)}switch(v){case"input":ee(x),vr(x,I,!0);break;case"textarea":ee(x),zn(x);break;case"select":case"option":break;default:typeof I.onClick=="function"&&(x.onclick=p0)}x=R,f.updateQueue=x,x!==null&&(f.flags|=4)}else{L=R.nodeType===9?R:R.ownerDocument,u==="http://www.w3.org/1999/xhtml"&&(u=$n(v)),u==="http://www.w3.org/1999/xhtml"?v==="script"?(u=L.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild)):typeof x.is=="string"?u=L.createElement(v,{is:x.is}):(u=L.createElement(v),v==="select"&&(L=u,x.multiple?L.multiple=!0:x.size&&(L.size=x.size))):u=L.createElementNS(u,v),u[Ms]=f,u[Yg]=x,Nj(u,f,!1,!1),f.stateNode=u;e:{switch(L=ni(v,x),v){case"dialog":sn("cancel",u),sn("close",u),R=x;break;case"iframe":case"object":case"embed":sn("load",u),R=x;break;case"video":case"audio":for(R=0;R<Xg.length;R++)sn(Xg[R],u);R=x;break;case"source":sn("error",u),R=x;break;case"img":case"image":case"link":sn("error",u),sn("load",u),R=x;break;case"details":sn("toggle",u),R=x;break;case"input":Me(u,x),R=ke(u,x),sn("invalid",u);break;case"option":R=x;break;case"select":u._wrapperState={wasMultiple:!!x.multiple},R=z({},x,{value:void 0}),sn("invalid",u);break;case"textarea":zt(u,x),R=Rr(u,x),sn("invalid",u);break;default:R=x}Il(v,R),K=R;for(I in K)if(K.hasOwnProperty(I)){var ae=K[I];I==="style"?Ic(u,ae):I==="dangerouslySetInnerHTML"?(ae=ae?ae.__html:void 0,ae!=null&&En(u,ae)):I==="children"?typeof ae=="string"?(v!=="textarea"||ae!=="")&&Ii(u,ae):typeof ae=="number"&&Ii(u,""+ae):I!=="suppressContentEditableWarning"&&I!=="suppressHydrationWarning"&&I!=="autoFocus"&&(i.hasOwnProperty(I)?ae!=null&&I==="onScroll"&&sn("scroll",u):ae!=null&&k(u,I,ae,L))}switch(v){case"input":ee(u),vr(u,x,!1);break;case"textarea":ee(u),zn(u);break;case"option":x.value!=null&&u.setAttribute("value",""+Z(x.value));break;case"select":u.multiple=!!x.multiple,I=x.value,I!=null?or(u,!!x.multiple,I,!1):x.defaultValue!=null&&or(u,!!x.multiple,x.defaultValue,!0);break;default:typeof R.onClick=="function"&&(u.onclick=p0)}switch(v){case"button":case"input":case"select":case"textarea":x=!!x.autoFocus;break e;case"img":x=!0;break e;default:x=!1}}x&&(f.flags|=4)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return Zi(f),null;case 6:if(u&&f.stateNode!=null)Dj(u,f,u.memoizedProps,x);else{if(typeof x!="string"&&f.stateNode===null)throw Error(r(166));if(v=yd(rm.current),yd(Ns.current),w0(f)){if(x=f.stateNode,v=f.memoizedProps,x[Ms]=f,(I=x.nodeValue!==v)&&(u=Zo,u!==null))switch(u.tag){case 3:h0(x.nodeValue,v,(u.mode&1)!==0);break;case 5:u.memoizedProps.suppressHydrationWarning!==!0&&h0(x.nodeValue,v,(u.mode&1)!==0)}I&&(f.flags|=4)}else x=(v.nodeType===9?v:v.ownerDocument).createTextNode(x),x[Ms]=f,f.stateNode=x}return Zi(f),null;case 13:if(ln(_n),x=f.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(wn&&Go!==null&&(f.mode&1)!==0&&(f.flags&128)===0)VN(),oh(),f.flags|=98560,I=!1;else if(I=w0(f),x!==null&&x.dehydrated!==null){if(u===null){if(!I)throw Error(r(318));if(I=f.memoizedState,I=I!==null?I.dehydrated:null,!I)throw Error(r(317));I[Ms]=f}else oh(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Zi(f),I=!1}else ns!==null&&(wC(ns),ns=null),I=!0;if(!I)return f.flags&65536?f:null}return(f.flags&128)!==0?(f.lanes=v,f):(x=x!==null,x!==(u!==null&&u.memoizedState!==null)&&x&&(f.child.flags|=8192,(f.mode&1)!==0&&(u===null||(_n.current&1)!==0?oi===0&&(oi=3):PC())),f.updateQueue!==null&&(f.flags|=4),Zi(f),null);case 4:return ch(),uC(u,f),u===null&&Zg(f.stateNode.containerInfo),Zi(f),null;case 10:return Lk(f.type._context),Zi(f),null;case 17:return Oo(f.type)&&m0(),Zi(f),null;case 19:if(ln(_n),I=f.memoizedState,I===null)return Zi(f),null;if(x=(f.flags&128)!==0,L=I.rendering,L===null)if(x)sm(I,!1);else{if(oi!==0||u!==null&&(u.flags&128)!==0)for(u=f.child;u!==null;){if(L=T0(u),L!==null){for(f.flags|=128,sm(I,!1),x=L.updateQueue,x!==null&&(f.updateQueue=x,f.flags|=4),f.subtreeFlags=0,x=v,v=f.child;v!==null;)I=v,u=x,I.flags&=14680066,L=I.alternate,L===null?(I.childLanes=0,I.lanes=u,I.child=null,I.subtreeFlags=0,I.memoizedProps=null,I.memoizedState=null,I.updateQueue=null,I.dependencies=null,I.stateNode=null):(I.childLanes=L.childLanes,I.lanes=L.lanes,I.child=L.child,I.subtreeFlags=0,I.deletions=null,I.memoizedProps=L.memoizedProps,I.memoizedState=L.memoizedState,I.updateQueue=L.updateQueue,I.type=L.type,u=L.dependencies,I.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),v=v.sibling;return Ur(_n,_n.current&1|2),f.child}u=u.sibling}I.tail!==null&&Dt()>hh&&(f.flags|=128,x=!0,sm(I,!1),f.lanes=4194304)}else{if(!x)if(u=T0(L),u!==null){if(f.flags|=128,x=!0,v=u.updateQueue,v!==null&&(f.updateQueue=v,f.flags|=4),sm(I,!0),I.tail===null&&I.tailMode==="hidden"&&!L.alternate&&!wn)return Zi(f),null}else 2*Dt()-I.renderingStartTime>hh&&v!==1073741824&&(f.flags|=128,x=!0,sm(I,!1),f.lanes=4194304);I.isBackwards?(L.sibling=f.child,f.child=L):(v=I.last,v!==null?v.sibling=L:f.child=L,I.last=L)}return I.tail!==null?(f=I.tail,I.rendering=f,I.tail=f.sibling,I.renderingStartTime=Dt(),f.sibling=null,v=_n.current,Ur(_n,x?v&1|2:v&1),f):(Zi(f),null);case 22:case 23:return xC(),x=f.memoizedState!==null,u!==null&&u.memoizedState!==null!==x&&(f.flags|=8192),x&&(f.mode&1)!==0?(Yo&1073741824)!==0&&(Zi(f),f.subtreeFlags&6&&(f.flags|=8192)):Zi(f),null;case 24:return null;case 25:return null}throw Error(r(156,f.tag))}function dre(u,f){switch($k(f),f.tag){case 1:return Oo(f.type)&&m0(),u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 3:return ch(),ln(bo),ln(Hi),Wk(),u=f.flags,(u&65536)!==0&&(u&128)===0?(f.flags=u&-65537|128,f):null;case 5:return zk(f),null;case 13:if(ln(_n),u=f.memoizedState,u!==null&&u.dehydrated!==null){if(f.alternate===null)throw Error(r(340));oh()}return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 19:return ln(_n),null;case 4:return ch(),null;case 10:return Lk(f.type._context),null;case 22:case 23:return xC(),null;case 24:return null;default:return null}}var j0=!1,Gi=!1,fre=typeof WeakSet=="function"?WeakSet:Set,Ge=null;function dh(u,f){var v=u.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(x){An(u,f,x)}else v.current=null}function dC(u,f,v){try{v()}catch(x){An(u,f,x)}}var Lj=!1;function hre(u,f){if(xk=r0,u=mN(),gk(u)){if("selectionStart"in u)var v={start:u.selectionStart,end:u.selectionEnd};else e:{v=(v=u.ownerDocument)&&v.defaultView||window;var x=v.getSelection&&v.getSelection();if(x&&x.rangeCount!==0){v=x.anchorNode;var R=x.anchorOffset,I=x.focusNode;x=x.focusOffset;try{v.nodeType,I.nodeType}catch{v=null;break e}var L=0,K=-1,ae=-1,be=0,_e=0,Re=u,Ee=null;t:for(;;){for(var He;Re!==v||R!==0&&Re.nodeType!==3||(K=L+R),Re!==I||x!==0&&Re.nodeType!==3||(ae=L+x),Re.nodeType===3&&(L+=Re.nodeValue.length),(He=Re.firstChild)!==null;)Ee=Re,Re=He;for(;;){if(Re===u)break t;if(Ee===v&&++be===R&&(K=L),Ee===I&&++_e===x&&(ae=L),(He=Re.nextSibling)!==null)break;Re=Ee,Ee=Re.parentNode}Re=He}v=K===-1||ae===-1?null:{start:K,end:ae}}else v=null}v=v||{start:0,end:0}}else v=null;for(Pk={focusedElem:u,selectionRange:v},r0=!1,Ge=f;Ge!==null;)if(f=Ge,u=f.child,(f.subtreeFlags&1028)!==0&&u!==null)u.return=f,Ge=u;else for(;Ge!==null;){f=Ge;try{var Je=f.alternate;if((f.flags&1024)!==0)switch(f.tag){case 0:case 11:case 15:break;case 1:if(Je!==null){var rt=Je.memoizedProps,Ln=Je.memoizedState,he=f.stateNode,se=he.getSnapshotBeforeUpdate(f.elementType===f.type?rt:is(f.type,rt),Ln);he.__reactInternalSnapshotBeforeUpdate=se}break;case 3:var pe=f.stateNode.containerInfo;pe.nodeType===1?pe.textContent="":pe.nodeType===9&&pe.documentElement&&pe.removeChild(pe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Ne){An(f,f.return,Ne)}if(u=f.sibling,u!==null){u.return=f.return,Ge=u;break}Ge=f.return}return Je=Lj,Lj=!1,Je}function lm(u,f,v){var x=f.updateQueue;if(x=x!==null?x.lastEffect:null,x!==null){var R=x=x.next;do{if((R.tag&u)===u){var I=R.destroy;R.destroy=void 0,I!==void 0&&dC(f,v,I)}R=R.next}while(R!==x)}}function D0(u,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var v=f=f.next;do{if((v.tag&u)===u){var x=v.create;v.destroy=x()}v=v.next}while(v!==f)}}function fC(u){var f=u.ref;if(f!==null){var v=u.stateNode;switch(u.tag){case 5:u=v;break;default:u=v}typeof f=="function"?f(u):f.current=u}}function Qj(u){var f=u.alternate;f!==null&&(u.alternate=null,Qj(f)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(f=u.stateNode,f!==null&&(delete f[Ms],delete f[Yg],delete f[Ek],delete f[Zte],delete f[Gte])),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function Vj(u){return u.tag===5||u.tag===3||u.tag===4}function Fj(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||Vj(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function hC(u,f,v){var x=u.tag;if(x===5||x===6)u=u.stateNode,f?v.nodeType===8?v.parentNode.insertBefore(u,f):v.insertBefore(u,f):(v.nodeType===8?(f=v.parentNode,f.insertBefore(u,v)):(f=v,f.appendChild(u)),v=v._reactRootContainer,v!=null||f.onclick!==null||(f.onclick=p0));else if(x!==4&&(u=u.child,u!==null))for(hC(u,f,v),u=u.sibling;u!==null;)hC(u,f,v),u=u.sibling}function pC(u,f,v){var x=u.tag;if(x===5||x===6)u=u.stateNode,f?v.insertBefore(u,f):v.appendChild(u);else if(x!==4&&(u=u.child,u!==null))for(pC(u,f,v),u=u.sibling;u!==null;)pC(u,f,v),u=u.sibling}var $i=null,os=!1;function Uc(u,f,v){for(v=v.child;v!==null;)Bj(u,f,v),v=v.sibling}function Bj(u,f,v){if(Un&&typeof Un.onCommitFiberUnmount=="function")try{Un.onCommitFiberUnmount(Sa,v)}catch{}switch(v.tag){case 5:Gi||dh(v,f);case 6:var x=$i,R=os;$i=null,Uc(u,f,v),$i=x,os=R,$i!==null&&(os?(u=$i,v=v.stateNode,u.nodeType===8?u.parentNode.removeChild(v):u.removeChild(v)):$i.removeChild(v.stateNode));break;case 18:$i!==null&&(os?(u=$i,v=v.stateNode,u.nodeType===8?Tk(u.parentNode,v):u.nodeType===1&&Tk(u,v),Vg(u)):Tk($i,v.stateNode));break;case 4:x=$i,R=os,$i=v.stateNode.containerInfo,os=!0,Uc(u,f,v),$i=x,os=R;break;case 0:case 11:case 14:case 15:if(!Gi&&(x=v.updateQueue,x!==null&&(x=x.lastEffect,x!==null))){R=x=x.next;do{var I=R,L=I.destroy;I=I.tag,L!==void 0&&((I&2)!==0||(I&4)!==0)&&dC(v,f,L),R=R.next}while(R!==x)}Uc(u,f,v);break;case 1:if(!Gi&&(dh(v,f),x=v.stateNode,typeof x.componentWillUnmount=="function"))try{x.props=v.memoizedProps,x.state=v.memoizedState,x.componentWillUnmount()}catch(K){An(v,f,K)}Uc(u,f,v);break;case 21:Uc(u,f,v);break;case 22:v.mode&1?(Gi=(x=Gi)||v.memoizedState!==null,Uc(u,f,v),Gi=x):Uc(u,f,v);break;default:Uc(u,f,v)}}function zj(u){var f=u.updateQueue;if(f!==null){u.updateQueue=null;var v=u.stateNode;v===null&&(v=u.stateNode=new fre),f.forEach(function(x){var R=Sre.bind(null,u,x);v.has(x)||(v.add(x),x.then(R,R))})}}function as(u,f){var v=f.deletions;if(v!==null)for(var x=0;x<v.length;x++){var R=v[x];try{var I=u,L=f,K=L;e:for(;K!==null;){switch(K.tag){case 5:$i=K.stateNode,os=!1;break e;case 3:$i=K.stateNode.containerInfo,os=!0;break e;case 4:$i=K.stateNode.containerInfo,os=!0;break e}K=K.return}if($i===null)throw Error(r(160));Bj(I,L,R),$i=null,os=!1;var ae=R.alternate;ae!==null&&(ae.return=null),R.return=null}catch(be){An(R,f,be)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)qj(f,u),f=f.sibling}function qj(u,f){var v=u.alternate,x=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:if(as(f,u),Ds(u),x&4){try{lm(3,u,u.return),D0(3,u)}catch(rt){An(u,u.return,rt)}try{lm(5,u,u.return)}catch(rt){An(u,u.return,rt)}}break;case 1:as(f,u),Ds(u),x&512&&v!==null&&dh(v,v.return);break;case 5:if(as(f,u),Ds(u),x&512&&v!==null&&dh(v,v.return),u.flags&32){var R=u.stateNode;try{Ii(R,"")}catch(rt){An(u,u.return,rt)}}if(x&4&&(R=u.stateNode,R!=null)){var I=u.memoizedProps,L=v!==null?v.memoizedProps:I,K=u.type,ae=u.updateQueue;if(u.updateQueue=null,ae!==null)try{K==="input"&&I.type==="radio"&&I.name!=null&&De(R,I),ni(K,L);var be=ni(K,I);for(L=0;L<ae.length;L+=2){var _e=ae[L],Re=ae[L+1];_e==="style"?Ic(R,Re):_e==="dangerouslySetInnerHTML"?En(R,Re):_e==="children"?Ii(R,Re):k(R,_e,Re,be)}switch(K){case"input":Vt(R,I);break;case"textarea":Tn(R,I);break;case"select":var Ee=R._wrapperState.wasMultiple;R._wrapperState.wasMultiple=!!I.multiple;var He=I.value;He!=null?or(R,!!I.multiple,He,!1):Ee!==!!I.multiple&&(I.defaultValue!=null?or(R,!!I.multiple,I.defaultValue,!0):or(R,!!I.multiple,I.multiple?[]:"",!1))}R[Yg]=I}catch(rt){An(u,u.return,rt)}}break;case 6:if(as(f,u),Ds(u),x&4){if(u.stateNode===null)throw Error(r(162));R=u.stateNode,I=u.memoizedProps;try{R.nodeValue=I}catch(rt){An(u,u.return,rt)}}break;case 3:if(as(f,u),Ds(u),x&4&&v!==null&&v.memoizedState.isDehydrated)try{Vg(f.containerInfo)}catch(rt){An(u,u.return,rt)}break;case 4:as(f,u),Ds(u);break;case 13:as(f,u),Ds(u),R=u.child,R.flags&8192&&(I=R.memoizedState!==null,R.stateNode.isHidden=I,!I||R.alternate!==null&&R.alternate.memoizedState!==null||(vC=Dt())),x&4&&zj(u);break;case 22:if(_e=v!==null&&v.memoizedState!==null,u.mode&1?(Gi=(be=Gi)||_e,as(f,u),Gi=be):as(f,u),Ds(u),x&8192){if(be=u.memoizedState!==null,(u.stateNode.isHidden=be)&&!_e&&(u.mode&1)!==0)for(Ge=u,_e=u.child;_e!==null;){for(Re=Ge=_e;Ge!==null;){switch(Ee=Ge,He=Ee.child,Ee.tag){case 0:case 11:case 14:case 15:lm(4,Ee,Ee.return);break;case 1:dh(Ee,Ee.return);var Je=Ee.stateNode;if(typeof Je.componentWillUnmount=="function"){x=Ee,v=Ee.return;try{f=x,Je.props=f.memoizedProps,Je.state=f.memoizedState,Je.componentWillUnmount()}catch(rt){An(x,v,rt)}}break;case 5:dh(Ee,Ee.return);break;case 22:if(Ee.memoizedState!==null){Hj(Re);continue}}He!==null?(He.return=Ee,Ge=He):Hj(Re)}_e=_e.sibling}e:for(_e=null,Re=u;;){if(Re.tag===5){if(_e===null){_e=Re;try{R=Re.stateNode,be?(I=R.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none"):(K=Re.stateNode,ae=Re.memoizedProps.style,L=ae!=null&&ae.hasOwnProperty("display")?ae.display:null,K.style.display=Ja("display",L))}catch(rt){An(u,u.return,rt)}}}else if(Re.tag===6){if(_e===null)try{Re.stateNode.nodeValue=be?"":Re.memoizedProps}catch(rt){An(u,u.return,rt)}}else if((Re.tag!==22&&Re.tag!==23||Re.memoizedState===null||Re===u)&&Re.child!==null){Re.child.return=Re,Re=Re.child;continue}if(Re===u)break e;for(;Re.sibling===null;){if(Re.return===null||Re.return===u)break e;_e===Re&&(_e=null),Re=Re.return}_e===Re&&(_e=null),Re.sibling.return=Re.return,Re=Re.sibling}}break;case 19:as(f,u),Ds(u),x&4&&zj(u);break;case 21:break;default:as(f,u),Ds(u)}}function Ds(u){var f=u.flags;if(f&2){try{e:{for(var v=u.return;v!==null;){if(Vj(v)){var x=v;break e}v=v.return}throw Error(r(160))}switch(x.tag){case 5:var R=x.stateNode;x.flags&32&&(Ii(R,""),x.flags&=-33);var I=Fj(u);pC(u,I,R);break;case 3:case 4:var L=x.stateNode.containerInfo,K=Fj(u);hC(u,K,L);break;default:throw Error(r(161))}}catch(ae){An(u,u.return,ae)}u.flags&=-3}f&4096&&(u.flags&=-4097)}function pre(u,f,v){Ge=u,Wj(u)}function Wj(u,f,v){for(var x=(u.mode&1)!==0;Ge!==null;){var R=Ge,I=R.child;if(R.tag===22&&x){var L=R.memoizedState!==null||j0;if(!L){var K=R.alternate,ae=K!==null&&K.memoizedState!==null||Gi;K=j0;var be=Gi;if(j0=L,(Gi=ae)&&!be)for(Ge=R;Ge!==null;)L=Ge,ae=L.child,L.tag===22&&L.memoizedState!==null?Xj(R):ae!==null?(ae.return=L,Ge=ae):Xj(R);for(;I!==null;)Ge=I,Wj(I),I=I.sibling;Ge=R,j0=K,Gi=be}Uj(u)}else(R.subtreeFlags&8772)!==0&&I!==null?(I.return=R,Ge=I):Uj(u)}}function Uj(u){for(;Ge!==null;){var f=Ge;if((f.flags&8772)!==0){var v=f.alternate;try{if((f.flags&8772)!==0)switch(f.tag){case 0:case 11:case 15:Gi||D0(5,f);break;case 1:var x=f.stateNode;if(f.flags&4&&!Gi)if(v===null)x.componentDidMount();else{var R=f.elementType===f.type?v.memoizedProps:is(f.type,v.memoizedProps);x.componentDidUpdate(R,v.memoizedState,x.__reactInternalSnapshotBeforeUpdate)}var I=f.updateQueue;I!==null&&HN(f,I,x);break;case 3:var L=f.updateQueue;if(L!==null){if(v=null,f.child!==null)switch(f.child.tag){case 5:v=f.child.stateNode;break;case 1:v=f.child.stateNode}HN(f,L,v)}break;case 5:var K=f.stateNode;if(v===null&&f.flags&4){v=K;var ae=f.memoizedProps;switch(f.type){case"button":case"input":case"select":case"textarea":ae.autoFocus&&v.focus();break;case"img":ae.src&&(v.src=ae.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(f.memoizedState===null){var be=f.alternate;if(be!==null){var _e=be.memoizedState;if(_e!==null){var Re=_e.dehydrated;Re!==null&&Vg(Re)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Gi||f.flags&512&&fC(f)}catch(Ee){An(f,f.return,Ee)}}if(f===u){Ge=null;break}if(v=f.sibling,v!==null){v.return=f.return,Ge=v;break}Ge=f.return}}function Hj(u){for(;Ge!==null;){var f=Ge;if(f===u){Ge=null;break}var v=f.sibling;if(v!==null){v.return=f.return,Ge=v;break}Ge=f.return}}function Xj(u){for(;Ge!==null;){var f=Ge;try{switch(f.tag){case 0:case 11:case 15:var v=f.return;try{D0(4,f)}catch(ae){An(f,v,ae)}break;case 1:var x=f.stateNode;if(typeof x.componentDidMount=="function"){var R=f.return;try{x.componentDidMount()}catch(ae){An(f,R,ae)}}var I=f.return;try{fC(f)}catch(ae){An(f,I,ae)}break;case 5:var L=f.return;try{fC(f)}catch(ae){An(f,L,ae)}}}catch(ae){An(f,f.return,ae)}if(f===u){Ge=null;break}var K=f.sibling;if(K!==null){K.return=f.return,Ge=K;break}Ge=f.return}}var gre=Math.ceil,L0=T.ReactCurrentDispatcher,gC=T.ReactCurrentOwner,Ta=T.ReactCurrentBatchConfig,dr=0,mi=null,Hn=null,Ai=0,Yo=0,fh=Fc(0),oi=0,cm=null,Od=0,Q0=0,mC=0,um=null,So=null,vC=0,hh=1/0,Fl=null,V0=!1,yC=null,Hc=null,F0=!1,Xc=null,B0=0,dm=0,bC=null,z0=-1,q0=0;function ao(){return(dr&6)!==0?Dt():z0!==-1?z0:z0=Dt()}function Zc(u){return(u.mode&1)===0?1:(dr&2)!==0&&Ai!==0?Ai&-Ai:Kte.transition!==null?(q0===0&&(q0=FM()),q0):(u=$r,u!==0||(u=window.event,u=u===void 0?16:GM(u.type)),u)}function ss(u,f,v,x){if(50<dm)throw dm=0,bC=null,Error(r(185));Ng(u,v,x),((dr&2)===0||u!==mi)&&(u===mi&&((dr&2)===0&&(Q0|=v),oi===4&&Gc(u,Ai)),xo(u,x),v===1&&dr===0&&(f.mode&1)===0&&(hh=Dt()+500,y0&&zc()))}function xo(u,f){var v=u.callbackNode;Kee(u,f);var x=As(u,u===mi?Ai:0);if(x===0)v!==null&&pr(v),u.callbackNode=null,u.callbackPriority=0;else if(f=x&-x,u.callbackPriority!==f){if(v!=null&&pr(v),f===1)u.tag===0?Yte(Gj.bind(null,u)):NN(Gj.bind(null,u)),Hte(function(){(dr&6)===0&&zc()}),v=null;else{switch(BM(x)){case 1:v=Wn;break;case 4:v=wa;break;case 16:v=mo;break;case 536870912:v=Ho;break;default:v=mo}v=iD(v,Zj.bind(null,u))}u.callbackPriority=f,u.callbackNode=v}}function Zj(u,f){if(z0=-1,q0=0,(dr&6)!==0)throw Error(r(327));var v=u.callbackNode;if(ph()&&u.callbackNode!==v)return null;var x=As(u,u===mi?Ai:0);if(x===0)return null;if((x&30)!==0||(x&u.expiredLanes)!==0||f)f=W0(u,x);else{f=x;var R=dr;dr|=2;var I=Kj();(mi!==u||Ai!==f)&&(Fl=null,hh=Dt()+500,Sd(u,f));do try{yre();break}catch(K){Yj(u,K)}while(!0);Dk(),L0.current=I,dr=R,Hn!==null?f=0:(mi=null,Ai=0,f=oi)}if(f!==0){if(f===2&&(R=JP(u),R!==0&&(x=R,f=OC(u,R))),f===1)throw v=cm,Sd(u,0),Gc(u,x),xo(u,Dt()),v;if(f===6)Gc(u,x);else{if(R=u.current.alternate,(x&30)===0&&!mre(R)&&(f=W0(u,x),f===2&&(I=JP(u),I!==0&&(x=I,f=OC(u,I))),f===1))throw v=cm,Sd(u,0),Gc(u,x),xo(u,Dt()),v;switch(u.finishedWork=R,u.finishedLanes=x,f){case 0:case 1:throw Error(r(345));case 2:xd(u,So,Fl);break;case 3:if(Gc(u,x),(x&130023424)===x&&(f=vC+500-Dt(),10<f)){if(As(u,0)!==0)break;if(R=u.suspendedLanes,(R&x)!==x){ao(),u.pingedLanes|=u.suspendedLanes&R;break}u.timeoutHandle=Ck(xd.bind(null,u,So,Fl),f);break}xd(u,So,Fl);break;case 4:if(Gc(u,x),(x&4194240)===x)break;for(f=u.eventTimes,R=-1;0<x;){var L=31-yo(x);I=1<<L,L=f[L],L>R&&(R=L),x&=~I}if(x=R,x=Dt()-x,x=(120>x?120:480>x?480:1080>x?1080:1920>x?1920:3e3>x?3e3:4320>x?4320:1960*gre(x/1960))-x,10<x){u.timeoutHandle=Ck(xd.bind(null,u,So,Fl),x);break}xd(u,So,Fl);break;case 5:xd(u,So,Fl);break;default:throw Error(r(329))}}}return xo(u,Dt()),u.callbackNode===v?Zj.bind(null,u):null}function OC(u,f){var v=um;return u.current.memoizedState.isDehydrated&&(Sd(u,f).flags|=256),u=W0(u,f),u!==2&&(f=So,So=v,f!==null&&wC(f)),u}function wC(u){So===null?So=u:So.push.apply(So,u)}function mre(u){for(var f=u;;){if(f.flags&16384){var v=f.updateQueue;if(v!==null&&(v=v.stores,v!==null))for(var x=0;x<v.length;x++){var R=v[x],I=R.getSnapshot;R=R.value;try{if(!rs(I(),R))return!1}catch{return!1}}}if(v=f.child,f.subtreeFlags&16384&&v!==null)v.return=f,f=v;else{if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function Gc(u,f){for(f&=~mC,f&=~Q0,u.suspendedLanes|=f,u.pingedLanes&=~f,u=u.expirationTimes;0<f;){var v=31-yo(f),x=1<<v;u[v]=-1,f&=~x}}function Gj(u){if((dr&6)!==0)throw Error(r(327));ph();var f=As(u,0);if((f&1)===0)return xo(u,Dt()),null;var v=W0(u,f);if(u.tag!==0&&v===2){var x=JP(u);x!==0&&(f=x,v=OC(u,x))}if(v===1)throw v=cm,Sd(u,0),Gc(u,f),xo(u,Dt()),v;if(v===6)throw Error(r(345));return u.finishedWork=u.current.alternate,u.finishedLanes=f,xd(u,So,Fl),xo(u,Dt()),null}function SC(u,f){var v=dr;dr|=1;try{return u(f)}finally{dr=v,dr===0&&(hh=Dt()+500,y0&&zc())}}function wd(u){Xc!==null&&Xc.tag===0&&(dr&6)===0&&ph();var f=dr;dr|=1;var v=Ta.transition,x=$r;try{if(Ta.transition=null,$r=1,u)return u()}finally{$r=x,Ta.transition=v,dr=f,(dr&6)===0&&zc()}}function xC(){Yo=fh.current,ln(fh)}function Sd(u,f){u.finishedWork=null,u.finishedLanes=0;var v=u.timeoutHandle;if(v!==-1&&(u.timeoutHandle=-1,Ute(v)),Hn!==null)for(v=Hn.return;v!==null;){var x=v;switch($k(x),x.tag){case 1:x=x.type.childContextTypes,x!=null&&m0();break;case 3:ch(),ln(bo),ln(Hi),Wk();break;case 5:zk(x);break;case 4:ch();break;case 13:ln(_n);break;case 19:ln(_n);break;case 10:Lk(x.type._context);break;case 22:case 23:xC()}v=v.return}if(mi=u,Hn=u=Yc(u.current,null),Ai=Yo=f,oi=0,cm=null,mC=Q0=Od=0,So=um=null,vd!==null){for(f=0;f<vd.length;f++)if(v=vd[f],x=v.interleaved,x!==null){v.interleaved=null;var R=x.next,I=v.pending;if(I!==null){var L=I.next;I.next=R,x.next=L}v.pending=x}vd=null}return u}function Yj(u,f){do{var v=Hn;try{if(Dk(),E0.current=$0,_0){for(var x=Rn.memoizedState;x!==null;){var R=x.queue;R!==null&&(R.pending=null),x=x.next}_0=!1}if(bd=0,gi=ii=Rn=null,nm=!1,im=0,gC.current=null,v===null||v.return===null){oi=1,cm=f,Hn=null;break}e:{var I=u,L=v.return,K=v,ae=f;if(f=Ai,K.flags|=32768,ae!==null&&typeof ae=="object"&&typeof ae.then=="function"){var be=ae,_e=K,Re=_e.tag;if((_e.mode&1)===0&&(Re===0||Re===11||Re===15)){var Ee=_e.alternate;Ee?(_e.updateQueue=Ee.updateQueue,_e.memoizedState=Ee.memoizedState,_e.lanes=Ee.lanes):(_e.updateQueue=null,_e.memoizedState=null)}var He=Sj(L);if(He!==null){He.flags&=-257,xj(He,L,K,I,f),He.mode&1&&wj(I,be,f),f=He,ae=be;var Je=f.updateQueue;if(Je===null){var rt=new Set;rt.add(ae),f.updateQueue=rt}else Je.add(ae);break e}else{if((f&1)===0){wj(I,be,f),PC();break e}ae=Error(r(426))}}else if(wn&&K.mode&1){var Ln=Sj(L);if(Ln!==null){(Ln.flags&65536)===0&&(Ln.flags|=256),xj(Ln,L,K,I,f),Nk(uh(ae,K));break e}}I=ae=uh(ae,K),oi!==4&&(oi=2),um===null?um=[I]:um.push(I),I=L;do{switch(I.tag){case 3:I.flags|=65536,f&=-f,I.lanes|=f;var he=bj(I,ae,f);UN(I,he);break e;case 1:K=ae;var se=I.type,pe=I.stateNode;if((I.flags&128)===0&&(typeof se.getDerivedStateFromError=="function"||pe!==null&&typeof pe.componentDidCatch=="function"&&(Hc===null||!Hc.has(pe)))){I.flags|=65536,f&=-f,I.lanes|=f;var Ne=Oj(I,K,f);UN(I,Ne);break e}}I=I.return}while(I!==null)}eD(v)}catch(ot){f=ot,Hn===v&&v!==null&&(Hn=v=v.return);continue}break}while(!0)}function Kj(){var u=L0.current;return L0.current=$0,u===null?$0:u}function PC(){(oi===0||oi===3||oi===2)&&(oi=4),mi===null||(Od&268435455)===0&&(Q0&268435455)===0||Gc(mi,Ai)}function W0(u,f){var v=dr;dr|=2;var x=Kj();(mi!==u||Ai!==f)&&(Fl=null,Sd(u,f));do try{vre();break}catch(R){Yj(u,R)}while(!0);if(Dk(),dr=v,L0.current=x,Hn!==null)throw Error(r(261));return mi=null,Ai=0,oi}function vre(){for(;Hn!==null;)Jj(Hn)}function yre(){for(;Hn!==null&&!ct();)Jj(Hn)}function Jj(u){var f=nD(u.alternate,u,Yo);u.memoizedProps=u.pendingProps,f===null?eD(u):Hn=f,gC.current=null}function eD(u){var f=u;do{var v=f.alternate;if(u=f.return,(f.flags&32768)===0){if(v=ure(v,f,Yo),v!==null){Hn=v;return}}else{if(v=dre(v,f),v!==null){v.flags&=32767,Hn=v;return}if(u!==null)u.flags|=32768,u.subtreeFlags=0,u.deletions=null;else{oi=6,Hn=null;return}}if(f=f.sibling,f!==null){Hn=f;return}Hn=f=u}while(f!==null);oi===0&&(oi=5)}function xd(u,f,v){var x=$r,R=Ta.transition;try{Ta.transition=null,$r=1,bre(u,f,v,x)}finally{Ta.transition=R,$r=x}return null}function bre(u,f,v,x){do ph();while(Xc!==null);if((dr&6)!==0)throw Error(r(327));v=u.finishedWork;var R=u.finishedLanes;if(v===null)return null;if(u.finishedWork=null,u.finishedLanes=0,v===u.current)throw Error(r(177));u.callbackNode=null,u.callbackPriority=0;var I=v.lanes|v.childLanes;if(Jee(u,I),u===mi&&(Hn=mi=null,Ai=0),(v.subtreeFlags&2064)===0&&(v.flags&2064)===0||F0||(F0=!0,iD(mo,function(){return ph(),null})),I=(v.flags&15990)!==0,(v.subtreeFlags&15990)!==0||I){I=Ta.transition,Ta.transition=null;var L=$r;$r=1;var K=dr;dr|=4,gC.current=null,hre(u,v),qj(v,u),Qte(Pk),r0=!!xk,Pk=xk=null,u.current=v,pre(v),Qt(),dr=K,$r=L,Ta.transition=I}else u.current=v;if(F0&&(F0=!1,Xc=u,B0=R),I=u.pendingLanes,I===0&&(Hc=null),dd(v.stateNode),xo(u,Dt()),f!==null)for(x=u.onRecoverableError,v=0;v<f.length;v++)R=f[v],x(R.value,{componentStack:R.stack,digest:R.digest});if(V0)throw V0=!1,u=yC,yC=null,u;return(B0&1)!==0&&u.tag!==0&&ph(),I=u.pendingLanes,(I&1)!==0?u===bC?dm++:(dm=0,bC=u):dm=0,zc(),null}function ph(){if(Xc!==null){var u=BM(B0),f=Ta.transition,v=$r;try{if(Ta.transition=null,$r=16>u?16:u,Xc===null)var x=!1;else{if(u=Xc,Xc=null,B0=0,(dr&6)!==0)throw Error(r(331));var R=dr;for(dr|=4,Ge=u.current;Ge!==null;){var I=Ge,L=I.child;if((Ge.flags&16)!==0){var K=I.deletions;if(K!==null){for(var ae=0;ae<K.length;ae++){var be=K[ae];for(Ge=be;Ge!==null;){var _e=Ge;switch(_e.tag){case 0:case 11:case 15:lm(8,_e,I)}var Re=_e.child;if(Re!==null)Re.return=_e,Ge=Re;else for(;Ge!==null;){_e=Ge;var Ee=_e.sibling,He=_e.return;if(Qj(_e),_e===be){Ge=null;break}if(Ee!==null){Ee.return=He,Ge=Ee;break}Ge=He}}}var Je=I.alternate;if(Je!==null){var rt=Je.child;if(rt!==null){Je.child=null;do{var Ln=rt.sibling;rt.sibling=null,rt=Ln}while(rt!==null)}}Ge=I}}if((I.subtreeFlags&2064)!==0&&L!==null)L.return=I,Ge=L;else e:for(;Ge!==null;){if(I=Ge,(I.flags&2048)!==0)switch(I.tag){case 0:case 11:case 15:lm(9,I,I.return)}var he=I.sibling;if(he!==null){he.return=I.return,Ge=he;break e}Ge=I.return}}var se=u.current;for(Ge=se;Ge!==null;){L=Ge;var pe=L.child;if((L.subtreeFlags&2064)!==0&&pe!==null)pe.return=L,Ge=pe;else e:for(L=se;Ge!==null;){if(K=Ge,(K.flags&2048)!==0)try{switch(K.tag){case 0:case 11:case 15:D0(9,K)}}catch(ot){An(K,K.return,ot)}if(K===L){Ge=null;break e}var Ne=K.sibling;if(Ne!==null){Ne.return=K.return,Ge=Ne;break e}Ge=K.return}}if(dr=R,zc(),Un&&typeof Un.onPostCommitFiberRoot=="function")try{Un.onPostCommitFiberRoot(Sa,u)}catch{}x=!0}return x}finally{$r=v,Ta.transition=f}}return!1}function tD(u,f,v){f=uh(v,f),f=bj(u,f,1),u=Wc(u,f,1),f=ao(),u!==null&&(Ng(u,1,f),xo(u,f))}function An(u,f,v){if(u.tag===3)tD(u,u,v);else for(;f!==null;){if(f.tag===3){tD(f,u,v);break}else if(f.tag===1){var x=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof x.componentDidCatch=="function"&&(Hc===null||!Hc.has(x))){u=uh(v,u),u=Oj(f,u,1),f=Wc(f,u,1),u=ao(),f!==null&&(Ng(f,1,u),xo(f,u));break}}f=f.return}}function Ore(u,f,v){var x=u.pingCache;x!==null&&x.delete(f),f=ao(),u.pingedLanes|=u.suspendedLanes&v,mi===u&&(Ai&v)===v&&(oi===4||oi===3&&(Ai&130023424)===Ai&&500>Dt()-vC?Sd(u,0):mC|=v),xo(u,f)}function rD(u,f){f===0&&((u.mode&1)===0?f=1:(f=fd,fd<<=1,(fd&130023424)===0&&(fd=4194304)));var v=ao();u=Ll(u,f),u!==null&&(Ng(u,f,v),xo(u,v))}function wre(u){var f=u.memoizedState,v=0;f!==null&&(v=f.retryLane),rD(u,v)}function Sre(u,f){var v=0;switch(u.tag){case 13:var x=u.stateNode,R=u.memoizedState;R!==null&&(v=R.retryLane);break;case 19:x=u.stateNode;break;default:throw Error(r(314))}x!==null&&x.delete(f),rD(u,v)}var nD;nD=function(u,f,v){if(u!==null)if(u.memoizedProps!==f.pendingProps||bo.current)wo=!0;else{if((u.lanes&v)===0&&(f.flags&128)===0)return wo=!1,cre(u,f,v);wo=(u.flags&131072)!==0}else wo=!1,wn&&(f.flags&1048576)!==0&&jN(f,O0,f.index);switch(f.lanes=0,f.tag){case 2:var x=f.type;N0(u,f),u=f.pendingProps;var R=rh(f,Hi.current);lh(f,v),R=Xk(null,f,x,u,R,v);var I=Zk();return f.flags|=1,typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Oo(x)?(I=!0,v0(f)):I=!1,f.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,Fk(f),R.updater=A0,f.stateNode=R,R._reactInternals=f,tC(f,x,u,v),f=oC(null,f,x,!0,I,v)):(f.tag=0,wn&&I&&Ik(f),oo(null,f,R,v),f=f.child),f;case 16:x=f.elementType;e:{switch(N0(u,f),u=f.pendingProps,R=x._init,x=R(x._payload),f.type=x,R=f.tag=Pre(x),u=is(x,u),R){case 0:f=iC(null,f,x,u,v);break e;case 1:f=_j(null,f,x,u,v);break e;case 11:f=Pj(null,f,x,u,v);break e;case 14:f=kj(null,f,x,is(x.type,u),v);break e}throw Error(r(306,x,""))}return f;case 0:return x=f.type,R=f.pendingProps,R=f.elementType===x?R:is(x,R),iC(u,f,x,R,v);case 1:return x=f.type,R=f.pendingProps,R=f.elementType===x?R:is(x,R),_j(u,f,x,R,v);case 3:e:{if(Rj(f),u===null)throw Error(r(387));x=f.pendingProps,I=f.memoizedState,R=I.element,WN(u,f),C0(f,x,null,v);var L=f.memoizedState;if(x=L.element,I.isDehydrated)if(I={element:x,isDehydrated:!1,cache:L.cache,pendingSuspenseBoundaries:L.pendingSuspenseBoundaries,transitions:L.transitions},f.updateQueue.baseState=I,f.memoizedState=I,f.flags&256){R=uh(Error(r(423)),f),f=Ij(u,f,x,v,R);break e}else if(x!==R){R=uh(Error(r(424)),f),f=Ij(u,f,x,v,R);break e}else for(Go=Vc(f.stateNode.containerInfo.firstChild),Zo=f,wn=!0,ns=null,v=zN(f,null,x,v),f.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(oh(),x===R){f=Vl(u,f,v);break e}oo(u,f,x,v)}f=f.child}return f;case 5:return XN(f),u===null&&Mk(f),x=f.type,R=f.pendingProps,I=u!==null?u.memoizedProps:null,L=R.children,kk(x,R)?L=null:I!==null&&kk(x,I)&&(f.flags|=32),Ej(u,f),oo(u,f,L,v),f.child;case 6:return u===null&&Mk(f),null;case 13:return $j(u,f,v);case 4:return Bk(f,f.stateNode.containerInfo),x=f.pendingProps,u===null?f.child=ah(f,null,x,v):oo(u,f,x,v),f.child;case 11:return x=f.type,R=f.pendingProps,R=f.elementType===x?R:is(x,R),Pj(u,f,x,R,v);case 7:return oo(u,f,f.pendingProps,v),f.child;case 8:return oo(u,f,f.pendingProps.children,v),f.child;case 12:return oo(u,f,f.pendingProps.children,v),f.child;case 10:e:{if(x=f.type._context,R=f.pendingProps,I=f.memoizedProps,L=R.value,Ur(x0,x._currentValue),x._currentValue=L,I!==null)if(rs(I.value,L)){if(I.children===R.children&&!bo.current){f=Vl(u,f,v);break e}}else for(I=f.child,I!==null&&(I.return=f);I!==null;){var K=I.dependencies;if(K!==null){L=I.child;for(var ae=K.firstContext;ae!==null;){if(ae.context===x){if(I.tag===1){ae=Ql(-1,v&-v),ae.tag=2;var be=I.updateQueue;if(be!==null){be=be.shared;var _e=be.pending;_e===null?ae.next=ae:(ae.next=_e.next,_e.next=ae),be.pending=ae}}I.lanes|=v,ae=I.alternate,ae!==null&&(ae.lanes|=v),Qk(I.return,v,f),K.lanes|=v;break}ae=ae.next}}else if(I.tag===10)L=I.type===f.type?null:I.child;else if(I.tag===18){if(L=I.return,L===null)throw Error(r(341));L.lanes|=v,K=L.alternate,K!==null&&(K.lanes|=v),Qk(L,v,f),L=I.sibling}else L=I.child;if(L!==null)L.return=I;else for(L=I;L!==null;){if(L===f){L=null;break}if(I=L.sibling,I!==null){I.return=L.return,L=I;break}L=L.return}I=L}oo(u,f,R.children,v),f=f.child}return f;case 9:return R=f.type,x=f.pendingProps.children,lh(f,v),R=ka(R),x=x(R),f.flags|=1,oo(u,f,x,v),f.child;case 14:return x=f.type,R=is(x,f.pendingProps),R=is(x.type,R),kj(u,f,x,R,v);case 15:return Cj(u,f,f.type,f.pendingProps,v);case 17:return x=f.type,R=f.pendingProps,R=f.elementType===x?R:is(x,R),N0(u,f),f.tag=1,Oo(x)?(u=!0,v0(f)):u=!1,lh(f,v),vj(f,x,R),tC(f,x,R,v),oC(null,f,x,!0,u,v);case 19:return Mj(u,f,v);case 22:return Tj(u,f,v)}throw Error(r(156,f.tag))};function iD(u,f){return vt(u,f)}function xre(u,f,v,x){this.tag=u,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ea(u,f,v,x){return new xre(u,f,v,x)}function kC(u){return u=u.prototype,!(!u||!u.isReactComponent)}function Pre(u){if(typeof u=="function")return kC(u)?1:0;if(u!=null){if(u=u.$$typeof,u===V)return 11;if(u===F)return 14}return 2}function Yc(u,f){var v=u.alternate;return v===null?(v=Ea(u.tag,f,u.key,u.mode),v.elementType=u.elementType,v.type=u.type,v.stateNode=u.stateNode,v.alternate=u,u.alternate=v):(v.pendingProps=f,v.type=u.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=u.flags&14680064,v.childLanes=u.childLanes,v.lanes=u.lanes,v.child=u.child,v.memoizedProps=u.memoizedProps,v.memoizedState=u.memoizedState,v.updateQueue=u.updateQueue,f=u.dependencies,v.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},v.sibling=u.sibling,v.index=u.index,v.ref=u.ref,v}function U0(u,f,v,x,R,I){var L=2;if(x=u,typeof u=="function")kC(u)&&(L=1);else if(typeof u=="string")L=5;else e:switch(u){case _:return Pd(v.children,R,I,f);case $:L=8,R|=8;break;case M:return u=Ea(12,v,f,R|2),u.elementType=M,u.lanes=I,u;case X:return u=Ea(13,v,f,R),u.elementType=X,u.lanes=I,u;case D:return u=Ea(19,v,f,R),u.elementType=D,u.lanes=I,u;case ie:return H0(v,R,I,f);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case j:L=10;break e;case B:L=9;break e;case V:L=11;break e;case F:L=14;break e;case Y:L=16,x=null;break e}throw Error(r(130,u==null?u:typeof u,""))}return f=Ea(L,v,f,R),f.elementType=u,f.type=x,f.lanes=I,f}function Pd(u,f,v,x){return u=Ea(7,u,x,f),u.lanes=v,u}function H0(u,f,v,x){return u=Ea(22,u,x,f),u.elementType=ie,u.lanes=v,u.stateNode={isHidden:!1},u}function CC(u,f,v){return u=Ea(6,u,null,f),u.lanes=v,u}function TC(u,f,v){return f=Ea(4,u.children!==null?u.children:[],u.key,f),f.lanes=v,f.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},f}function kre(u,f,v,x,R){this.tag=f,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ek(0),this.expirationTimes=ek(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ek(0),this.identifierPrefix=x,this.onRecoverableError=R,this.mutableSourceEagerHydrationData=null}function EC(u,f,v,x,R,I,L,K,ae){return u=new kre(u,f,v,K,ae),f===1?(f=1,I===!0&&(f|=8)):f=0,I=Ea(3,null,null,f),u.current=I,I.stateNode=u,I.memoizedState={element:x,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fk(I),u}function Cre(u,f,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:E,key:x==null?null:""+x,children:u,containerInfo:f,implementation:v}}function oD(u){if(!u)return Bc;u=u._reactInternals;e:{if(Ot(u)!==u||u.tag!==1)throw Error(r(170));var f=u;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Oo(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(r(171))}if(u.tag===1){var v=u.type;if(Oo(v))return AN(u,v,f)}return f}function aD(u,f,v,x,R,I,L,K,ae){return u=EC(v,x,!0,u,R,I,L,K,ae),u.context=oD(null),v=u.current,x=ao(),R=Zc(v),I=Ql(x,R),I.callback=f??null,Wc(v,I,R),u.current.lanes=R,Ng(u,R,x),xo(u,x),u}function X0(u,f,v,x){var R=f.current,I=ao(),L=Zc(R);return v=oD(v),f.context===null?f.context=v:f.pendingContext=v,f=Ql(I,L),f.payload={element:u},x=x===void 0?null:x,x!==null&&(f.callback=x),u=Wc(R,f,L),u!==null&&(ss(u,R,L,I),k0(u,R,L)),L}function Z0(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return u.child.stateNode;default:return u.child.stateNode}}function sD(u,f){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var v=u.retryLane;u.retryLane=v!==0&&v<f?v:f}}function _C(u,f){sD(u,f),(u=u.alternate)&&sD(u,f)}function Tre(){return null}var lD=typeof reportError=="function"?reportError:function(u){console.error(u)};function RC(u){this._internalRoot=u}G0.prototype.render=RC.prototype.render=function(u){var f=this._internalRoot;if(f===null)throw Error(r(409));X0(u,f,null,null)},G0.prototype.unmount=RC.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var f=u.containerInfo;wd(function(){X0(null,u,null,null)}),f[Ml]=null}};function G0(u){this._internalRoot=u}G0.prototype.unstable_scheduleHydration=function(u){if(u){var f=WM();u={blockedOn:null,target:u,priority:f};for(var v=0;v<Dc.length&&f!==0&&f<Dc[v].priority;v++);Dc.splice(v,0,u),v===0&&XM(u)}};function IC(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function Y0(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11&&(u.nodeType!==8||u.nodeValue!==" react-mount-point-unstable "))}function cD(){}function Ere(u,f,v,x,R){if(R){if(typeof x=="function"){var I=x;x=function(){var be=Z0(L);I.call(be)}}var L=aD(f,x,u,0,null,!1,!1,"",cD);return u._reactRootContainer=L,u[Ml]=L.current,Zg(u.nodeType===8?u.parentNode:u),wd(),L}for(;R=u.lastChild;)u.removeChild(R);if(typeof x=="function"){var K=x;x=function(){var be=Z0(ae);K.call(be)}}var ae=EC(u,0,!1,null,null,!1,!1,"",cD);return u._reactRootContainer=ae,u[Ml]=ae.current,Zg(u.nodeType===8?u.parentNode:u),wd(function(){X0(f,ae,v,x)}),ae}function K0(u,f,v,x,R){var I=v._reactRootContainer;if(I){var L=I;if(typeof R=="function"){var K=R;R=function(){var ae=Z0(L);K.call(ae)}}X0(f,L,u,R)}else L=Ere(v,f,u,R,x);return Z0(L)}zM=function(u){switch(u.tag){case 3:var f=u.stateNode;if(f.current.memoizedState.isDehydrated){var v=Ac(f.pendingLanes);v!==0&&(tk(f,v|1),xo(f,Dt()),(dr&6)===0&&(hh=Dt()+500,zc()))}break;case 13:wd(function(){var x=Ll(u,1);if(x!==null){var R=ao();ss(x,u,1,R)}}),_C(u,1)}},rk=function(u){if(u.tag===13){var f=Ll(u,134217728);if(f!==null){var v=ao();ss(f,u,134217728,v)}_C(u,134217728)}},qM=function(u){if(u.tag===13){var f=Zc(u),v=Ll(u,f);if(v!==null){var x=ao();ss(v,u,f,x)}_C(u,f)}},WM=function(){return $r},UM=function(u,f){var v=$r;try{return $r=u,f()}finally{$r=v}},cd=function(u,f,v){switch(f){case"input":if(Vt(u,v),f=v.name,v.type==="radio"&&f!=null){for(v=u;v.parentNode;)v=v.parentNode;for(v=v.querySelectorAll("input[name="+JSON.stringify(""+f)+'][type="radio"]'),f=0;f<v.length;f++){var x=v[f];if(x!==u&&x.form===u.form){var R=g0(x);if(!R)throw Error(r(90));re(x),Vt(x,R)}}}break;case"textarea":Tn(u,v);break;case"select":f=v.value,f!=null&&or(u,!!v.multiple,f,!1)}},ve=SC,we=wd;var _re={usingClientEntryPoint:!1,Events:[Kg,eh,g0,ts,ue,SC]},fm={findFiberByHostInstance:hd,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Rre={bundleType:fm.bundleType,version:fm.version,rendererPackageName:fm.rendererPackageName,rendererConfig:fm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(u){return u=qt(u),u===null?null:u.stateNode},findFiberByHostInstance:fm.findFiberByHostInstance||Tre,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var J0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!J0.isDisabled&&J0.supportsFiber)try{Sa=J0.inject(Rre),Un=J0}catch{}}return Po.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_re,Po.createPortal=function(u,f){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!IC(f))throw Error(r(200));return Cre(u,f,null,v)},Po.createRoot=function(u,f){if(!IC(u))throw Error(r(299));var v=!1,x="",R=lD;return f!=null&&(f.unstable_strictMode===!0&&(v=!0),f.identifierPrefix!==void 0&&(x=f.identifierPrefix),f.onRecoverableError!==void 0&&(R=f.onRecoverableError)),f=EC(u,1,!1,null,null,v,!1,x,R),u[Ml]=f.current,Zg(u.nodeType===8?u.parentNode:u),new RC(f)},Po.findDOMNode=function(u){if(u==null)return null;if(u.nodeType===1)return u;var f=u._reactInternals;if(f===void 0)throw typeof u.render=="function"?Error(r(188)):(u=Object.keys(u).join(","),Error(r(268,u)));return u=qt(f),u=u===null?null:u.stateNode,u},Po.flushSync=function(u){return wd(u)},Po.hydrate=function(u,f,v){if(!Y0(f))throw Error(r(200));return K0(null,u,f,!0,v)},Po.hydrateRoot=function(u,f,v){if(!IC(u))throw Error(r(405));var x=v!=null&&v.hydratedSources||null,R=!1,I="",L=lD;if(v!=null&&(v.unstable_strictMode===!0&&(R=!0),v.identifierPrefix!==void 0&&(I=v.identifierPrefix),v.onRecoverableError!==void 0&&(L=v.onRecoverableError)),f=aD(f,null,u,1,v??null,R,!1,I,L),u[Ml]=f.current,Zg(u),x)for(u=0;u<x.length;u++)v=x[u],R=v._getVersion,R=R(v._source),f.mutableSourceEagerHydrationData==null?f.mutableSourceEagerHydrationData=[v,R]:f.mutableSourceEagerHydrationData.push(v,R);return new G0(f)},Po.render=function(u,f,v){if(!Y0(f))throw Error(r(200));return K0(null,u,f,!1,v)},Po.unmountComponentAtNode=function(u){if(!Y0(u))throw Error(r(40));return u._reactRootContainer?(wd(function(){K0(null,null,u,!1,function(){u._reactRootContainer=null,u[Ml]=null})}),!0):!1},Po.unstable_batchedUpdates=SC,Po.unstable_renderSubtreeIntoContainer=function(u,f,v,x){if(!Y0(v))throw Error(r(200));if(u==null||u._reactInternals===void 0)throw Error(r(38));return K0(u,f,v,!1,x)},Po.version="18.3.1-next-f1338f8080-20240426",Po}var yD;function cz(){if(yD)return MC.exports;yD=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),MC.exports=Vre(),MC.exports}var bD;function Fre(){if(bD)return eO;bD=1;var t=cz();return eO.createRoot=t.createRoot,eO.hydrateRoot=t.hydrateRoot,eO}var Bre=Fre();const zre={BASE_URL:"/",DEV:!1,GIT_BRANCH_NAME:"HEAD",GIT_COMMIT_HASH:"f1f9aa5",MODE:"production",PACKAGE_VERSION:"2.0.0",PROD:!0,REACT_APP_ENDPOINT_HOST:"",REACT_APP_ENDPOINT_PORT:"",REACT_APP_ENDPOINT_SERVER_URL:"/endpoint",REACT_APP_GRAPHQL_SERVER_URL:"/graphql",REACT_APP_SWAGGER_SERVER_URL:"/api",SSR:!1},gv=t=>{var n;const e=zre[t];return((n=window.__env__)==null?void 0:n[t])||e},Lo=(...t)=>t.filter(Boolean).map(e=>e.trim()).join(" ");function qre(t,e){return`${t} returned \`undefined\`. Seems you forgot to wrap component within ${e}`}function mv(t={}){const{name:e,strict:r=!0,hookName:n="useContext",providerName:i="Provider",errorMessage:o,defaultValue:a}=t,s=A.createContext(a);s.displayName=e;function l(){var d;const c=A.useContext(s);if(!c&&r){const p=new Error(o??qre(n,i));throw p.name="ContextError",(d=Error.captureStackTrace)==null||d.call(Error,p,l),p}return c}return[s.Provider,l,s]}function Wre(...t){return function(...r){t.forEach(n=>n==null?void 0:n(...r))}}const Ure=(...t)=>t.map(e=>{var r;return(r=e==null?void 0:e.trim)==null?void 0:r.call(e)}).filter(Boolean).join(" "),Hre=/^on[A-Z]/;function Wv(...t){let e={};for(let r of t){for(let n in e){if(Hre.test(n)&&typeof e[n]=="function"&&typeof r[n]=="function"){e[n]=Wre(e[n],r[n]);continue}if(n==="className"||n==="class"){e[n]=Ure(e[n],r[n]);continue}if(n==="style"){e[n]=Object.assign({},e[n]??{},r[n]??{});continue}e[n]=r[n]!==void 0?r[n]:e[n]}for(let n in r)e[n]===void 0&&(e[n]=r[n])}return e}const Xre=Object.freeze({}),Zre=Object.freeze({});function uz(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var Gre=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Yre=uz(function(t){return Gre.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function Kre(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function Jre(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var ene=function(){function t(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Jre(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Kre(i);try{o.insertRule(n,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},t}(),Yi="-ms-",Q1="-moz-",Or="-webkit-",dz="comm",u$="rule",d$="decl",tne="@import",fz="@keyframes",rne="@layer",nne=Math.abs,bx=String.fromCharCode,ine=Object.assign;function one(t,e){return Vi(t,0)^45?(((e<<2^Vi(t,0))<<2^Vi(t,1))<<2^Vi(t,2))<<2^Vi(t,3):0}function hz(t){return t.trim()}function ane(t,e){return(t=e.exec(t))?t[0]:t}function wr(t,e,r){return t.replace(e,r)}function m_(t,e){return t.indexOf(e)}function Vi(t,e){return t.charCodeAt(e)|0}function Uv(t,e,r){return t.slice(e,r)}function qs(t){return t.length}function f$(t){return t.length}function tO(t,e){return e.push(t),t}function sne(t,e){return t.map(e).join("")}var Ox=1,Op=1,pz=0,Vo=0,Jn=0,Zp="";function wx(t,e,r,n,i,o,a){return{value:t,root:e,parent:r,type:n,props:i,children:o,line:Ox,column:Op,length:a,return:""}}function pm(t,e){return ine(wx("",null,null,"",null,null,0),t,{length:-t.length},e)}function lne(){return Jn}function cne(){return Jn=Vo>0?Vi(Zp,--Vo):0,Op--,Jn===10&&(Op=1,Ox--),Jn}function pa(){return Jn=Vo<pz?Vi(Zp,Vo++):0,Op++,Jn===10&&(Op=1,Ox++),Jn}function tl(){return Vi(Zp,Vo)}function Jw(){return Vo}function ab(t,e){return Uv(Zp,t,e)}function Hv(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function gz(t){return Ox=Op=1,pz=qs(Zp=t),Vo=0,[]}function mz(t){return Zp="",t}function e1(t){return hz(ab(Vo-1,v_(t===91?t+2:t===40?t+1:t)))}function une(t){for(;(Jn=tl())&&Jn<33;)pa();return Hv(t)>2||Hv(Jn)>3?"":" "}function dne(t,e){for(;--e&&pa()&&!(Jn<48||Jn>102||Jn>57&&Jn<65||Jn>70&&Jn<97););return ab(t,Jw()+(e<6&&tl()==32&&pa()==32))}function v_(t){for(;pa();)switch(Jn){case t:return Vo;case 34:case 39:t!==34&&t!==39&&v_(Jn);break;case 40:t===41&&v_(t);break;case 92:pa();break}return Vo}function fne(t,e){for(;pa()&&t+Jn!==57;)if(t+Jn===84&&tl()===47)break;return"/*"+ab(e,Vo-1)+"*"+bx(t===47?t:pa())}function hne(t){for(;!Hv(tl());)pa();return ab(t,Vo)}function pne(t){return mz(t1("",null,null,null,[""],t=gz(t),0,[0],t))}function t1(t,e,r,n,i,o,a,s,l){for(var c=0,d=0,p=a,g=0,m=0,y=0,b=1,O=1,S=1,w=0,k="",T=i,C=o,E=n,_=k;O;)switch(y=w,w=pa()){case 40:if(y!=108&&Vi(_,p-1)==58){m_(_+=wr(e1(w),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:_+=e1(w);break;case 9:case 10:case 13:case 32:_+=une(y);break;case 92:_+=dne(Jw()-1,7);continue;case 47:switch(tl()){case 42:case 47:tO(gne(fne(pa(),Jw()),e,r),l);break;default:_+="/"}break;case 123*b:s[c++]=qs(_)*S;case 125*b:case 59:case 0:switch(w){case 0:case 125:O=0;case 59+d:S==-1&&(_=wr(_,/\f/g,"")),m>0&&qs(_)-p&&tO(m>32?wD(_+";",n,r,p-1):wD(wr(_," ","")+";",n,r,p-2),l);break;case 59:_+=";";default:if(tO(E=OD(_,e,r,c,d,i,s,k,T=[],C=[],p),o),w===123)if(d===0)t1(_,e,E,E,T,o,p,s,C);else switch(g===99&&Vi(_,3)===110?100:g){case 100:case 108:case 109:case 115:t1(t,E,E,n&&tO(OD(t,E,E,0,0,i,s,k,i,T=[],p),C),i,C,p,s,n?T:C);break;default:t1(_,E,E,E,[""],C,0,s,C)}}c=d=m=0,b=S=1,k=_="",p=a;break;case 58:p=1+qs(_),m=y;default:if(b<1){if(w==123)--b;else if(w==125&&b++==0&&cne()==125)continue}switch(_+=bx(w),w*b){case 38:S=d>0?1:(_+="\f",-1);break;case 44:s[c++]=(qs(_)-1)*S,S=1;break;case 64:tl()===45&&(_+=e1(pa())),g=tl(),d=p=qs(k=_+=hne(Jw())),w++;break;case 45:y===45&&qs(_)==2&&(b=0)}}return o}function OD(t,e,r,n,i,o,a,s,l,c,d){for(var p=i-1,g=i===0?o:[""],m=f$(g),y=0,b=0,O=0;y<n;++y)for(var S=0,w=Uv(t,p+1,p=nne(b=a[y])),k=t;S<m;++S)(k=hz(b>0?g[S]+" "+w:wr(w,/&\f/g,g[S])))&&(l[O++]=k);return wx(t,e,r,i===0?u$:s,l,c,d)}function gne(t,e,r){return wx(t,e,r,dz,bx(lne()),Uv(t,2,-2),0)}function wD(t,e,r,n){return wx(t,e,r,d$,Uv(t,0,n),Uv(t,n+1,-1),n)}function op(t,e){for(var r="",n=f$(t),i=0;i<n;i++)r+=e(t[i],i,t,e)||"";return r}function mne(t,e,r,n){switch(t.type){case rne:if(t.children.length)break;case tne:case d$:return t.return=t.return||t.value;case dz:return"";case fz:return t.return=t.value+"{"+op(t.children,n)+"}";case u$:t.value=t.props.join(",")}return qs(r=op(t.children,n))?t.return=t.value+"{"+r+"}":""}function vne(t){var e=f$(t);return function(r,n,i,o){for(var a="",s=0;s<e;s++)a+=t[s](r,n,i,o)||"";return a}}function yne(t){return function(e){e.root||(e=e.return)&&t(e)}}var bne=function(e,r,n){for(var i=0,o=0;i=o,o=tl(),i===38&&o===12&&(r[n]=1),!Hv(o);)pa();return ab(e,Vo)},One=function(e,r){var n=-1,i=44;do switch(Hv(i)){case 0:i===38&&tl()===12&&(r[n]=1),e[n]+=bne(Vo-1,r,n);break;case 2:e[n]+=e1(i);break;case 4:if(i===44){e[++n]=tl()===58?"&\f":"",r[n]=e[n].length;break}default:e[n]+=bx(i)}while(i=pa());return e},wne=function(e,r){return mz(One(gz(e),r))},SD=new WeakMap,Sne=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,n=e.parent,i=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!SD.get(n))&&!i){SD.set(e,!0);for(var o=[],a=wne(r,o),s=n.props,l=0,c=0;l<a.length;l++)for(var d=0;d<s.length;d++,c++)e.props[c]=o[l]?a[l].replace(/&\f/g,s[d]):s[d]+" "+a[l]}}},xne=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}};function vz(t,e){switch(one(t,e)){case 5103:return Or+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Or+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Or+t+Q1+t+Yi+t+t;case 6828:case 4268:return Or+t+Yi+t+t;case 6165:return Or+t+Yi+"flex-"+t+t;case 5187:return Or+t+wr(t,/(\w+).+(:[^]+)/,Or+"box-$1$2"+Yi+"flex-$1$2")+t;case 5443:return Or+t+Yi+"flex-item-"+wr(t,/flex-|-self/,"")+t;case 4675:return Or+t+Yi+"flex-line-pack"+wr(t,/align-content|flex-|-self/,"")+t;case 5548:return Or+t+Yi+wr(t,"shrink","negative")+t;case 5292:return Or+t+Yi+wr(t,"basis","preferred-size")+t;case 6060:return Or+"box-"+wr(t,"-grow","")+Or+t+Yi+wr(t,"grow","positive")+t;case 4554:return Or+wr(t,/([^-])(transform)/g,"$1"+Or+"$2")+t;case 6187:return wr(wr(wr(t,/(zoom-|grab)/,Or+"$1"),/(image-set)/,Or+"$1"),t,"")+t;case 5495:case 3959:return wr(t,/(image-set\([^]*)/,Or+"$1$`$1");case 4968:return wr(wr(t,/(.+:)(flex-)?(.*)/,Or+"box-pack:$3"+Yi+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Or+t+t;case 4095:case 3583:case 4068:case 2532:return wr(t,/(.+)-inline(.+)/,Or+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(qs(t)-1-e>6)switch(Vi(t,e+1)){case 109:if(Vi(t,e+4)!==45)break;case 102:return wr(t,/(.+:)(.+)-([^]+)/,"$1"+Or+"$2-$3$1"+Q1+(Vi(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~m_(t,"stretch")?vz(wr(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Vi(t,e+1)!==115)break;case 6444:switch(Vi(t,qs(t)-3-(~m_(t,"!important")&&10))){case 107:return wr(t,":",":"+Or)+t;case 101:return wr(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Or+(Vi(t,14)===45?"inline-":"")+"box$3$1"+Or+"$2$3$1"+Yi+"$2box$3")+t}break;case 5936:switch(Vi(t,e+11)){case 114:return Or+t+Yi+wr(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Or+t+Yi+wr(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Or+t+Yi+wr(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Or+t+Yi+t+t}return t}var Pne=function(e,r,n,i){if(e.length>-1&&!e.return)switch(e.type){case d$:e.return=vz(e.value,e.length);break;case fz:return op([pm(e,{value:wr(e.value,"@","@"+Or)})],i);case u$:if(e.length)return sne(e.props,function(o){switch(ane(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return op([pm(e,{props:[wr(o,/:(read-\w+)/,":"+Q1+"$1")]})],i);case"::placeholder":return op([pm(e,{props:[wr(o,/:(plac\w+)/,":"+Or+"input-$1")]}),pm(e,{props:[wr(o,/:(plac\w+)/,":"+Q1+"$1")]}),pm(e,{props:[wr(o,/:(plac\w+)/,Yi+"input-$1")]})],i)}return""})}},kne=[Pne],Cne=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(b){var O=b.getAttribute("data-emotion");O.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var i=e.stylisPlugins||kne,o={},a,s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(b){for(var O=b.getAttribute("data-emotion").split(" "),S=1;S<O.length;S++)o[O[S]]=!0;s.push(b)});var l,c=[Sne,xne];{var d,p=[mne,yne(function(b){d.insert(b)})],g=vne(c.concat(i,p)),m=function(O){return op(pne(O),g)};l=function(O,S,w,k){d=w,m(O?O+"{"+S.styles+"}":S.styles),k&&(y.inserted[S.name]=!0)}}var y={key:r,sheet:new ene({key:r,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return y.sheet.hydrate(s),y};function Pt(){return Pt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Pt.apply(null,arguments)}var DC={exports:{}},Pr={};/** @license React v16.13.1
|
|
41
41
|
* react-is.production.min.js
|
|
42
42
|
*
|
|
43
43
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -71,7 +71,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
71
71
|
* LICENSE.md file in the root directory of this source tree.
|
|
72
72
|
*
|
|
73
73
|
* @license MIT
|
|
74
|
-
*/function xn(){return xn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xn.apply(this,arguments)}var Zn;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Zn||(Zn={}));const N5="popstate";function wye(t){t===void 0&&(t={});function e(n,i){let{pathname:o,search:a,hash:s}=n.location;return ay("",{pathname:o,search:a,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:mf(i)}return xye(e,r,null,t)}function Yt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function gf(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Sye(){return Math.random().toString(36).substr(2,8)}function j5(t,e){return{usr:t.state,key:t.key,idx:e}}function ay(t,e,r,n){return r===void 0&&(r=null),xn({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?td(e):e,{state:r,key:e&&e.key||n||Sye()})}function mf(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function td(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function xye(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s=Zn.Pop,l=null,c=d();c==null&&(c=0,a.replaceState(xn({},a.state,{idx:c}),""));function d(){return(a.state||{idx:null}).idx}function p(){s=Zn.Pop;let O=d(),S=O==null?null:O-c;c=O,l&&l({action:s,location:b.location,delta:S})}function g(O,S){s=Zn.Push;let w=ay(b.location,O,S);c=d()+1;let k=j5(w,c),T=b.createHref(w);try{a.pushState(k,"",T)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(T)}o&&l&&l({action:s,location:b.location,delta:1})}function m(O,S){s=Zn.Replace;let w=ay(b.location,O,S);c=d();let k=j5(w,c),T=b.createHref(w);a.replaceState(k,"",T),o&&l&&l({action:s,location:b.location,delta:0})}function y(O){let S=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof O=="string"?O:mf(O);return w=w.replace(/ $/,"%20"),Yt(S,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,S)}let b={get action(){return s},get location(){return t(i,a)},listen(O){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(N5,p),l=O,()=>{i.removeEventListener(N5,p),l=null}},createHref(O){return e(i,O)},createURL:y,encodeLocation(O){let S=y(O);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:g,replace:m,go(O){return a.go(O)}};return b}var Pn;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Pn||(Pn={}));const Pye=new Set(["lazy","caseSensitive","path","id","index","children"]);function kye(t){return t.index===!0}function J_(t,e,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),t.map((i,o)=>{let a=[...r,o],s=typeof i.id=="string"?i.id:a.join("-");if(Yt(i.index!==!0||!i.children,"Cannot specify children on an index route"),Yt(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),kye(i)){let l=xn({},i,e(i),{id:s});return n[s]=l,l}else{let l=xn({},i,e(i),{id:s,children:void 0});return n[s]=l,i.children&&(l.children=J_(i.children,e,a,n)),l}})}function Yh(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?td(e):e,i=ug(n.pathname||"/",r);if(i==null)return null;let o=OU(t);Tye(o);let a=null;for(let s=0;a==null&&s<o.length;++s){let l=Qye(i);a=jye(o[s],l)}return a}function Cye(t,e){let{route:r,pathname:n,params:i}=t;return{id:r.id,pathname:n,params:i,data:e[r.id],handle:r.handle}}function OU(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(o,a,s)=>{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(Yt(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=rc([n,l.relativePath]),d=r.concat(l);o.children&&o.children.length>0&&(Yt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),OU(o.children,e,d,c)),!(o.path==null&&!o.index)&&e.push({path:c,score:Mye(c,o.index),routesMeta:d})};return t.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of wU(o.path))i(o,a,l)}),e}function wU(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let a=wU(n.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function Tye(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Nye(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Eye=/^:[\w-]+$/,_ye=3,Rye=2,Iye=1,$ye=10,Aye=-2,D5=t=>t==="*";function Mye(t,e){let r=t.split("/"),n=r.length;return r.some(D5)&&(n+=Aye),e&&(n+=Rye),r.filter(i=>!D5(i)).reduce((i,o)=>i+(Eye.test(o)?_ye:o===""?Iye:$ye),n)}function Nye(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function jye(t,e){let{routesMeta:r}=t,n={},i="/",o=[];for(let a=0;a<r.length;++a){let s=r[a],l=a===r.length-1,c=i==="/"?e:e.slice(i.length)||"/",d=Dye({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c);if(!d)return null;Object.assign(n,d.params);let p=s.route;o.push({params:n,pathname:rc([i,d.pathname]),pathnameBase:Bye(rc([i,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(i=rc([i,d.pathnameBase]))}return o}function fa(t,e){e===void 0&&(e={});let r=t;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(gf(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",i=a=>a==null?"":typeof a=="string"?a:String(a),o=r.split(/\/+/).map((a,s,l)=>{if(s===l.length-1&&a==="*")return i(e["*"]);const d=a.match(/^:([\w-]+)(\??)$/);if(d){const[,p,g]=d;let m=e[p];return Yt(g==="?"||m!=null,'Missing ":'+p+'" param'),i(m)}return a.replace(/\?$/g,"")}).filter(a=>!!a);return n+o.join("/")}function Dye(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=Lye(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((c,d,p)=>{let{paramName:g,isOptional:m}=d;if(g==="*"){let b=s[p]||"";a=o.slice(0,o.length-b.length).replace(/(.)\/+$/,"$1")}const y=s[p];return m&&!y?c[g]=void 0:c[g]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:a,pattern:t}}function Lye(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),gf(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function Qye(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return gf(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function ug(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Vye(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?td(t):t;return{pathname:r?r.startsWith("/")?r:Fye(r,e):e,search:zye(n),hash:qye(i)}}function Fye(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function bT(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function SU(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function g2(t,e){let r=SU(t);return e?r.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function m2(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=td(t):(i=xn({},t),Yt(!i.pathname||!i.pathname.includes("?"),bT("?","pathname","search",i)),Yt(!i.pathname||!i.pathname.includes("#"),bT("#","pathname","hash",i)),Yt(!i.search||!i.search.includes("#"),bT("#","search","hash",i)));let o=t===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=r;else{let p=e.length-1;if(!n&&a.startsWith("..")){let g=a.split("/");for(;g[0]==="..";)g.shift(),p-=1;i.pathname=g.join("/")}s=p>=0?e[p]:"/"}let l=Vye(i,s),c=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const rc=t=>t.join("/").replace(/\/\/+/g,"/"),Bye=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),zye=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,qye=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,Tp=function(e,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let i=new Headers(n.headers);return i.set("Location",e),new Response(null,xn({},n,{headers:i}))};class v2{constructor(e,r,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function y2(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const xU=["post","put","patch","delete"],Wye=new Set(xU),Uye=["get",...xU],Hye=new Set(Uye),Xye=new Set([301,302,303,307,308]),Zye=new Set([307,308]),OT={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Gye={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Cm={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},b2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yye=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),PU="remix-router-transitions";function Kye(t){const e=t.window?t.window:typeof window<"u"?window:void 0,r=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",n=!r;Yt(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let ue=t.detectErrorBoundary;i=ve=>({hasErrorBoundary:ue(ve)})}else i=Yye;let o={},a=J_(t.routes,i,void 0,o),s,l=t.basename||"/",c=t.unstable_dataStrategy||rbe,d=xn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},t.future),p=null,g=new Set,m=null,y=null,b=null,O=t.hydrationData!=null,S=Yh(a,t.history.location,l),w=null;if(S==null){let ue=Ia(404,{pathname:t.history.location.pathname}),{matches:ve,route:we}=H5(a);S=ve,w={[we.id]:ue}}let k,T=S.some(ue=>ue.route.lazy),C=S.some(ue=>ue.route.loader);if(T)k=!1;else if(!C)k=!0;else if(d.v7_partialHydration){let ue=t.hydrationData?t.hydrationData.loaderData:null,ve=t.hydrationData?t.hydrationData.errors:null,we=$e=>$e.route.loader?typeof $e.route.loader=="function"&&$e.route.loader.hydrate===!0?!1:ue&&ue[$e.route.id]!==void 0||ve&&ve[$e.route.id]!==void 0:!0;if(ve){let $e=S.findIndex(We=>ve[We.route.id]!==void 0);k=S.slice(0,$e+1).every(we)}else k=S.every(we)}else k=t.hydrationData!=null;let E,_={historyAction:t.history.action,location:t.history.location,matches:S,initialized:k,navigation:OT,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||w,fetchers:new Map,blockers:new Map},$=Zn.Pop,M=!1,j,B=!1,V=new Map,X=null,D=!1,F=!1,Y=[],ie=[],H=new Map,ne=0,z=-1,N=new Map,U=new Set,J=new Map,Q=new Map,q=new Set,oe=new Map,Oe=new Map,Z=!1;function le(){if(p=t.history.listen(ue=>{let{action:ve,location:we,delta:$e}=ue;if(Z){Z=!1;return}gf(Oe.size===0||$e!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let We=$c({currentLocation:_.location,nextLocation:we,historyAction:ve});if(We&&$e!=null){Z=!0,t.history.go($e*-1),ni(We,{state:"blocked",location:we,proceed(){ni(We,{state:"proceeding",proceed:void 0,reset:void 0,location:we}),t.history.go($e)},reset(){let wt=new Map(_.blockers);wt.set(We,Cm),re({blockers:wt})}});return}return De(ve,we)}),r){pbe(e,V);let ue=()=>gbe(e,V);e.addEventListener("pagehide",ue),X=()=>e.removeEventListener("pagehide",ue)}return _.initialized||De(Zn.Pop,_.location,{initialHydration:!0}),E}function Pe(){p&&p(),X&&X(),g.clear(),j&&j.abort(),_.fetchers.forEach((ue,ve)=>En(ve)),_.blockers.forEach((ue,ve)=>Il(ve))}function ee(ue){return g.add(ue),()=>g.delete(ue)}function re(ue,ve){ve===void 0&&(ve={}),_=xn({},_,ue);let we=[],$e=[];d.v7_fetcherPersist&&_.fetchers.forEach((We,wt)=>{We.state==="idle"&&(q.has(wt)?$e.push(wt):we.push(wt))}),[...g].forEach(We=>We(_,{deletedFetchers:$e,unstable_viewTransitionOpts:ve.viewTransitionOpts,unstable_flushSync:ve.flushSync===!0})),d.v7_fetcherPersist&&(we.forEach(We=>_.fetchers.delete(We)),$e.forEach(We=>En(We)))}function ye(ue,ve,we){var $e,We;let{flushSync:wt}=we===void 0?{}:we,at=_.actionData!=null&&_.navigation.formMethod!=null&&us(_.navigation.formMethod)&&_.navigation.state==="loading"&&(($e=ue.state)==null?void 0:$e._isRedirect)!==!0,Ue;ve.actionData?Object.keys(ve.actionData).length>0?Ue=ve.actionData:Ue=null:at?Ue=_.actionData:Ue=null;let Ct=ve.loaderData?W5(_.loaderData,ve.loaderData,ve.matches||[],ve.errors):_.loaderData,G=_.blockers;G.size>0&&(G=new Map(G),G.forEach((ce,fe)=>G.set(fe,Cm)));let W=M===!0||_.navigation.formMethod!=null&&us(_.navigation.formMethod)&&((We=ue.state)==null?void 0:We._isRedirect)!==!0;s&&(a=s,s=void 0),D||$===Zn.Pop||($===Zn.Push?t.history.push(ue,ue.state):$===Zn.Replace&&t.history.replace(ue,ue.state));let te;if($===Zn.Pop){let ce=V.get(_.location.pathname);ce&&ce.has(ue.pathname)?te={currentLocation:_.location,nextLocation:ue}:V.has(ue.pathname)&&(te={currentLocation:ue,nextLocation:_.location})}else if(B){let ce=V.get(_.location.pathname);ce?ce.add(ue.pathname):(ce=new Set([ue.pathname]),V.set(_.location.pathname,ce)),te={currentLocation:_.location,nextLocation:ue}}re(xn({},ve,{actionData:Ue,loaderData:Ct,historyAction:$,location:ue,initialized:!0,navigation:OT,revalidation:"idle",restoreScrollPosition:ud(ue,ve.matches||_.matches),preventScrollReset:W,blockers:G}),{viewTransitionOpts:te,flushSync:wt===!0}),$=Zn.Pop,M=!1,B=!1,D=!1,F=!1,Y=[],ie=[]}async function ke(ue,ve){if(typeof ue=="number"){t.history.go(ue);return}let we=eR(_.location,_.matches,l,d.v7_prependBasename,ue,d.v7_relativeSplatPath,ve==null?void 0:ve.fromRouteId,ve==null?void 0:ve.relative),{path:$e,submission:We,error:wt}=L5(d.v7_normalizeFormMethod,!1,we,ve),at=_.location,Ue=ay(_.location,$e,ve&&ve.state);Ue=xn({},Ue,t.history.encodeLocation(Ue));let Ct=ve&&ve.replace!=null?ve.replace:void 0,G=Zn.Push;Ct===!0?G=Zn.Replace:Ct===!1||We!=null&&us(We.formMethod)&&We.formAction===_.location.pathname+_.location.search&&(G=Zn.Replace);let W=ve&&"preventScrollReset"in ve?ve.preventScrollReset===!0:void 0,te=(ve&&ve.unstable_flushSync)===!0,ce=$c({currentLocation:at,nextLocation:Ue,historyAction:G});if(ce){ni(ce,{state:"blocked",location:Ue,proceed(){ni(ce,{state:"proceeding",proceed:void 0,reset:void 0,location:Ue}),ke(ue,ve)},reset(){let fe=new Map(_.blockers);fe.set(ce,Cm),re({blockers:fe})}});return}return await De(G,Ue,{submission:We,pendingError:wt,preventScrollReset:W,replace:ve&&ve.replace,enableViewTransition:ve&&ve.unstable_viewTransition,flushSync:te})}function Me(){if(zn(),re({revalidation:"loading"}),_.navigation.state!=="submitting"){if(_.navigation.state==="idle"){De(_.historyAction,_.location,{startUninterruptedRevalidation:!0});return}De($||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation})}}async function De(ue,ve,we){j&&j.abort(),j=null,$=ue,D=(we&&we.startUninterruptedRevalidation)===!0,$s(_.location,_.matches),M=(we&&we.preventScrollReset)===!0,B=(we&&we.enableViewTransition)===!0;let $e=s||a,We=we&&we.overrideNavigation,wt=Yh($e,ve,l),at=(we&&we.flushSync)===!0;if(!wt){let ce=Ia(404,{pathname:ve.pathname}),{matches:fe,route:qe}=H5($e);$l(),ye(ve,{matches:fe,loaderData:{},errors:{[qe.id]:ce}},{flushSync:at});return}if(_.initialized&&!F&&lbe(_.location,ve)&&!(we&&we.submission&&us(we.submission.formMethod))){ye(ve,{matches:wt},{flushSync:at});return}j=new AbortController;let Ue=Sh(t.history,ve,j.signal,we&&we.submission),Ct;if(we&&we.pendingError)Ct=[Pv(wt).route.id,{type:Pn.error,error:we.pendingError}];else if(we&&we.submission&&us(we.submission.formMethod)){let ce=await Vt(Ue,ve,we.submission,wt,{replace:we.replace,flushSync:at});if(ce.shortCircuited)return;Ct=ce.pendingActionResult,We=wT(ve,we.submission),at=!1,Ue=Sh(t.history,Ue.url,Ue.signal)}let{shortCircuited:G,loaderData:W,errors:te}=await vr(Ue,ve,wt,We,we&&we.submission,we&&we.fetcherSubmission,we&&we.replace,we&&we.initialHydration===!0,at,Ct);G||(j=null,ye(ve,xn({matches:wt},U5(Ct),{loaderData:W,errors:te})))}async function Vt(ue,ve,we,$e,We){We===void 0&&(We={}),zn();let wt=fbe(ve,we);re({navigation:wt},{flushSync:We.flushSync===!0});let at,Ue=rR($e,ve);if(!Ue.route.action&&!Ue.route.lazy)at={type:Pn.error,error:Ia(405,{method:ue.method,pathname:ve.pathname,routeId:Ue.route.id})};else if(at=(await zt("action",ue,[Ue],$e))[0],ue.signal.aborted)return{shortCircuited:!0};if(Zd(at)){let Ct;return We&&We.replace!=null?Ct=We.replace:Ct=B5(at.response.headers.get("Location"),new URL(ue.url),l)===_.location.pathname+_.location.search,await Rr(ue,at,{submission:we,replace:Ct}),{shortCircuited:!0}}if(Xd(at))throw Ia(400,{type:"defer-action"});if(Ma(at)){let Ct=Pv($e,Ue.route.id);return(We&&We.replace)!==!0&&($=Zn.Push),{pendingActionResult:[Ct.route.id,at]}}return{pendingActionResult:[Ue.route.id,at]}}async function vr(ue,ve,we,$e,We,wt,at,Ue,Ct,G){let W=$e||wT(ve,We),te=We||wt||G5(W),ce=s||a,[fe,qe]=Q5(t.history,_,we,te,ve,d.v7_partialHydration&&Ue===!0,d.unstable_skipActionErrorRevalidation,F,Y,ie,q,J,U,ce,l,G);if($l(ct=>!(we&&we.some(Qt=>Qt.route.id===ct))||fe&&fe.some(Qt=>Qt.route.id===ct)),z=++ne,fe.length===0&&qe.length===0){let ct=Ja();return ye(ve,xn({matches:we,loaderData:{},errors:G&&Ma(G[1])?{[G[0]]:G[1].error}:null},U5(G),ct?{fetchers:new Map(_.fetchers)}:{}),{flushSync:Ct}),{shortCircuited:!0}}if(!D&&(!d.v7_partialHydration||!Ue)){qe.forEach(Qt=>{let Dt=_.fetchers.get(Qt.key),xr=Tm(void 0,Dt?Dt.data:void 0);_.fetchers.set(Qt.key,xr)});let ct;G&&!Ma(G[1])?ct={[G[0]]:G[1].data}:_.actionData&&(Object.keys(_.actionData).length===0?ct=null:ct=_.actionData),re(xn({navigation:W},ct!==void 0?{actionData:ct}:{},qe.length>0?{fetchers:new Map(_.fetchers)}:{}),{flushSync:Ct})}qe.forEach(ct=>{H.has(ct.key)&&qn(ct.key),ct.controller&&H.set(ct.key,ct.controller)});let tt=()=>qe.forEach(ct=>qn(ct.key));j&&j.signal.addEventListener("abort",tt);let{loaderResults:Ot,fetcherResults:ir}=await Tn(_.matches,we,fe,qe,ue);if(ue.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",tt),qe.forEach(ct=>H.delete(ct.key));let br=X5([...Ot,...ir]);if(br){if(br.idx>=fe.length){let ct=qe[br.idx-fe.length].key;U.add(ct)}return await Rr(ue,br.result,{replace:at}),{shortCircuited:!0}}let{loaderData:It,errors:qt}=q5(_,we,fe,Ot,G,qe,ir,oe);oe.forEach((ct,Qt)=>{ct.subscribe(Dt=>{(Dt||ct.done)&&oe.delete(Qt)})}),d.v7_partialHydration&&Ue&&_.errors&&Object.entries(_.errors).filter(ct=>{let[Qt]=ct;return!fe.some(Dt=>Dt.route.id===Qt)}).forEach(ct=>{let[Qt,Dt]=ct;qt=Object.assign(qt||{},{[Qt]:Dt})});let Ir=Ja(),vt=Ic(z),pr=Ir||vt||qe.length>0;return xn({loaderData:It,errors:qt},pr?{fetchers:new Map(_.fetchers)}:{})}function yr(ue,ve,we,$e){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");H.has(ue)&&qn(ue);let We=($e&&$e.unstable_flushSync)===!0,wt=s||a,at=eR(_.location,_.matches,l,d.v7_prependBasename,we,d.v7_relativeSplatPath,ve,$e==null?void 0:$e.relative),Ue=Yh(wt,at,l);if(!Ue){pi(ue,ve,Ia(404,{pathname:at}),{flushSync:We});return}let{path:Ct,submission:G,error:W}=L5(d.v7_normalizeFormMethod,!0,at,$e);if(W){pi(ue,ve,W,{flushSync:We});return}let te=rR(Ue,Ct);if(M=($e&&$e.preventScrollReset)===!0,G&&us(G.formMethod)){ur(ue,ve,Ct,te,Ue,We,G);return}J.set(ue,{routeId:ve,path:Ct}),or(ue,ve,Ct,te,Ue,We,G)}async function ur(ue,ve,we,$e,We,wt,at){if(zn(),J.delete(ue),!$e.route.action&&!$e.route.lazy){let xr=Ia(405,{method:at.formMethod,pathname:we,routeId:ve});pi(ue,ve,xr,{flushSync:wt});return}let Ue=_.fetchers.get(ue);$n(ue,hbe(at,Ue),{flushSync:wt});let Ct=new AbortController,G=Sh(t.history,we,Ct.signal,at);H.set(ue,Ct);let W=ne,ce=(await zt("action",G,[$e],We))[0];if(G.signal.aborted){H.get(ue)===Ct&&H.delete(ue);return}if(d.v7_fetcherPersist&&q.has(ue)){if(Zd(ce)||Ma(ce)){$n(ue,nu(void 0));return}}else{if(Zd(ce))if(H.delete(ue),z>W){$n(ue,nu(void 0));return}else return U.add(ue),$n(ue,Tm(at)),Rr(G,ce,{fetcherSubmission:at});if(Ma(ce)){pi(ue,ve,ce.error);return}}if(Xd(ce))throw Ia(400,{type:"defer-action"});let fe=_.navigation.location||_.location,qe=Sh(t.history,fe,Ct.signal),tt=s||a,Ot=_.navigation.state!=="idle"?Yh(tt,_.navigation.location,l):_.matches;Yt(Ot,"Didn't find any matches after fetcher action");let ir=++ne;N.set(ue,ir);let br=Tm(at,ce.data);_.fetchers.set(ue,br);let[It,qt]=Q5(t.history,_,Ot,at,fe,!1,d.unstable_skipActionErrorRevalidation,F,Y,ie,q,J,U,tt,l,[$e.route.id,ce]);qt.filter(xr=>xr.key!==ue).forEach(xr=>{let Wn=xr.key,wa=_.fetchers.get(Wn),mo=Tm(void 0,wa?wa.data:void 0);_.fetchers.set(Wn,mo),H.has(Wn)&&qn(Wn),xr.controller&&H.set(Wn,xr.controller)}),re({fetchers:new Map(_.fetchers)});let Ir=()=>qt.forEach(xr=>qn(xr.key));Ct.signal.addEventListener("abort",Ir);let{loaderResults:vt,fetcherResults:pr}=await Tn(_.matches,Ot,It,qt,qe);if(Ct.signal.aborted)return;Ct.signal.removeEventListener("abort",Ir),N.delete(ue),H.delete(ue),qt.forEach(xr=>H.delete(xr.key));let ct=X5([...vt,...pr]);if(ct){if(ct.idx>=It.length){let xr=qt[ct.idx-It.length].key;U.add(xr)}return Rr(qe,ct.result)}let{loaderData:Qt,errors:Dt}=q5(_,_.matches,It,vt,void 0,qt,pr,oe);if(_.fetchers.has(ue)){let xr=nu(ce.data);_.fetchers.set(ue,xr)}Ic(ir),_.navigation.state==="loading"&&ir>z?(Yt($,"Expected pending action"),j&&j.abort(),ye(_.navigation.location,{matches:Ot,loaderData:Qt,errors:Dt,fetchers:new Map(_.fetchers)})):(re({errors:Dt,loaderData:W5(_.loaderData,Qt,Ot,Dt),fetchers:new Map(_.fetchers)}),F=!1)}async function or(ue,ve,we,$e,We,wt,at){let Ue=_.fetchers.get(ue);$n(ue,Tm(at,Ue?Ue.data:void 0),{flushSync:wt});let Ct=new AbortController,G=Sh(t.history,we,Ct.signal);H.set(ue,Ct);let W=ne,ce=(await zt("loader",G,[$e],We))[0];if(Xd(ce)&&(ce=await EU(ce,G.signal,!0)||ce),H.get(ue)===Ct&&H.delete(ue),!G.signal.aborted){if(q.has(ue)){$n(ue,nu(void 0));return}if(Zd(ce))if(z>W){$n(ue,nu(void 0));return}else{U.add(ue),await Rr(G,ce);return}if(Ma(ce)){pi(ue,ve,ce.error);return}Yt(!Xd(ce),"Unhandled fetcher deferred data"),$n(ue,nu(ce.data))}}async function Rr(ue,ve,we){let{submission:$e,fetcherSubmission:We,replace:wt}=we===void 0?{}:we;ve.response.headers.has("X-Remix-Revalidate")&&(F=!0);let at=ve.response.headers.get("Location");Yt(at,"Expected a Location header on the redirect Response"),at=B5(at,new URL(ue.url),l);let Ue=ay(_.location,at,{_isRedirect:!0});if(r){let fe=!1;if(ve.response.headers.has("X-Remix-Reload-Document"))fe=!0;else if(b2.test(at)){const qe=t.history.createURL(at);fe=qe.origin!==e.location.origin||ug(qe.pathname,l)==null}if(fe){wt?e.location.replace(at):e.location.assign(at);return}}j=null;let Ct=wt===!0?Zn.Replace:Zn.Push,{formMethod:G,formAction:W,formEncType:te}=_.navigation;!$e&&!We&&G&&W&&te&&($e=G5(_.navigation));let ce=$e||We;if(Zye.has(ve.response.status)&&ce&&us(ce.formMethod))await De(Ct,Ue,{submission:xn({},ce,{formAction:at}),preventScrollReset:M});else{let fe=wT(Ue,$e);await De(Ct,Ue,{overrideNavigation:fe,fetcherSubmission:We,preventScrollReset:M})}}async function zt(ue,ve,we,$e){try{let We=await nbe(c,ue,ve,we,$e,o,i);return await Promise.all(We.map((wt,at)=>{if(cbe(wt)){let Ue=wt.result;return{type:Pn.redirect,response:abe(Ue,ve,we[at].route.id,$e,l,d.v7_relativeSplatPath)}}return obe(wt)}))}catch(We){return we.map(()=>({type:Pn.error,error:We}))}}async function Tn(ue,ve,we,$e,We){let[wt,...at]=await Promise.all([we.length?zt("loader",We,we,ve):[],...$e.map(Ue=>{if(Ue.matches&&Ue.match&&Ue.controller){let Ct=Sh(t.history,Ue.path,Ue.controller.signal);return zt("loader",Ct,[Ue.match],Ue.matches).then(G=>G[0])}else return Promise.resolve({type:Pn.error,error:Ia(404,{pathname:Ue.path})})})]);return await Promise.all([Z5(ue,we,wt,wt.map(()=>We.signal),!1,_.loaderData),Z5(ue,$e.map(Ue=>Ue.match),at,$e.map(Ue=>Ue.controller?Ue.controller.signal:null),!0)]),{loaderResults:wt,fetcherResults:at}}function zn(){F=!0,Y.push(...$l()),J.forEach((ue,ve)=>{H.has(ve)&&(ie.push(ve),qn(ve))})}function $n(ue,ve,we){we===void 0&&(we={}),_.fetchers.set(ue,ve),re({fetchers:new Map(_.fetchers)},{flushSync:(we&&we.flushSync)===!0})}function pi(ue,ve,we,$e){$e===void 0&&($e={});let We=Pv(_.matches,ve);En(ue),re({errors:{[We.route.id]:we},fetchers:new Map(_.fetchers)},{flushSync:($e&&$e.flushSync)===!0})}function io(ue){return d.v7_fetcherPersist&&(Q.set(ue,(Q.get(ue)||0)+1),q.has(ue)&&q.delete(ue)),_.fetchers.get(ue)||Gye}function En(ue){let ve=_.fetchers.get(ue);H.has(ue)&&!(ve&&ve.state==="loading"&&N.has(ue))&&qn(ue),J.delete(ue),N.delete(ue),U.delete(ue),q.delete(ue),_.fetchers.delete(ue)}function Ii(ue){if(d.v7_fetcherPersist){let ve=(Q.get(ue)||0)-1;ve<=0?(Q.delete(ue),q.add(ue)):Q.set(ue,ve)}else En(ue);re({fetchers:new Map(_.fetchers)})}function qn(ue){let ve=H.get(ue);Yt(ve,"Expected fetch controller: "+ue),ve.abort(),H.delete(ue)}function Rl(ue){for(let ve of ue){let we=io(ve),$e=nu(we.data);_.fetchers.set(ve,$e)}}function Ja(){let ue=[],ve=!1;for(let we of U){let $e=_.fetchers.get(we);Yt($e,"Expected fetcher: "+we),$e.state==="loading"&&(U.delete(we),ue.push(we),ve=!0)}return Rl(ue),ve}function Ic(ue){let ve=[];for(let[we,$e]of N)if($e<ue){let We=_.fetchers.get(we);Yt(We,"Expected fetcher: "+we),We.state==="loading"&&(qn(we),N.delete(we),ve.push(we))}return Rl(ve),ve.length>0}function Mg(ue,ve){let we=_.blockers.get(ue)||Cm;return Oe.get(ue)!==ve&&Oe.set(ue,ve),we}function Il(ue){_.blockers.delete(ue),Oe.delete(ue)}function ni(ue,ve){let we=_.blockers.get(ue)||Cm;Yt(we.state==="unblocked"&&ve.state==="blocked"||we.state==="blocked"&&ve.state==="blocked"||we.state==="blocked"&&ve.state==="proceeding"||we.state==="blocked"&&ve.state==="unblocked"||we.state==="proceeding"&&ve.state==="unblocked","Invalid blocker state transition: "+we.state+" -> "+ve.state);let $e=new Map(_.blockers);$e.set(ue,ve),re({blockers:$e})}function $c(ue){let{currentLocation:ve,nextLocation:we,historyAction:$e}=ue;if(Oe.size===0)return;Oe.size>1&&gf(!1,"A router only supports one blocker at a time");let We=Array.from(Oe.entries()),[wt,at]=We[We.length-1],Ue=_.blockers.get(wt);if(!(Ue&&Ue.state==="proceeding")&&at({currentLocation:ve,nextLocation:we,historyAction:$e}))return wt}function $l(ue){let ve=[];return oe.forEach((we,$e)=>{(!ue||ue($e))&&(we.cancel(),ve.push($e),oe.delete($e))}),ve}function cd(ue,ve,we){if(m=ue,b=ve,y=we||null,!O&&_.navigation===OT){O=!0;let $e=ud(_.location,_.matches);$e!=null&&re({restoreScrollPosition:$e})}return()=>{m=null,b=null,y=null}}function es(ue,ve){return y&&y(ue,ve.map($e=>Cye($e,_.loaderData)))||ue.key}function $s(ue,ve){if(m&&b){let we=es(ue,ve);m[we]=b()}}function ud(ue,ve){if(m){let we=es(ue,ve),$e=m[we];if(typeof $e=="number")return $e}return null}function ts(ue){o={},s=J_(ue,i,void 0,o)}return E={get basename(){return l},get future(){return d},get state(){return _},get routes(){return a},get window(){return e},initialize:le,subscribe:ee,enableScrollRestoration:cd,navigate:ke,fetch:yr,revalidate:Me,createHref:ue=>t.history.createHref(ue),encodeLocation:ue=>t.history.encodeLocation(ue),getFetcher:io,deleteFetcher:Ii,dispose:Pe,getBlocker:Mg,deleteBlocker:Il,_internalFetchControllers:H,_internalActiveDeferreds:oe,_internalSetRoutes:ts},E}function Jye(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function eR(t,e,r,n,i,o,a,s){let l,c;if(a){l=[];for(let p of e)if(l.push(p),p.route.id===a){c=p;break}}else l=e,c=e[e.length-1];let d=m2(i||".",g2(l,o),ug(t.pathname,r)||t.pathname,s==="path");return i==null&&(d.search=t.search,d.hash=t.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!O2(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(d.pathname=d.pathname==="/"?r:rc([r,d.pathname])),mf(d)}function L5(t,e,r,n){if(!n||!Jye(n))return{path:r};if(n.formMethod&&!dbe(n.formMethod))return{path:r,error:Ia(405,{method:n.formMethod})};let i=()=>({path:r,error:Ia(400,{type:"invalid-body"})}),o=n.formMethod||"get",a=t?o.toUpperCase():o.toLowerCase(),s=CU(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!us(a))return i();let g=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((m,y)=>{let[b,O]=y;return""+m+b+"="+O+`
|
|
74
|
+
*/function xn(){return xn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xn.apply(this,arguments)}var Zn;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Zn||(Zn={}));const N5="popstate";function wye(t){t===void 0&&(t={});function e(n,i){let{pathname:o,search:a,hash:s}=n.location;return ay("",{pathname:o,search:a,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:mf(i)}return xye(e,r,null,t)}function Yt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function gf(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Sye(){return Math.random().toString(36).substr(2,8)}function j5(t,e){return{usr:t.state,key:t.key,idx:e}}function ay(t,e,r,n){return r===void 0&&(r=null),xn({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?td(e):e,{state:r,key:e&&e.key||n||Sye()})}function mf(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function td(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function xye(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s=Zn.Pop,l=null,c=d();c==null&&(c=0,a.replaceState(xn({},a.state,{idx:c}),""));function d(){return(a.state||{idx:null}).idx}function p(){s=Zn.Pop;let O=d(),S=O==null?null:O-c;c=O,l&&l({action:s,location:b.location,delta:S})}function g(O,S){s=Zn.Push;let w=ay(b.location,O,S);c=d()+1;let k=j5(w,c),T=b.createHref(w);try{a.pushState(k,"",T)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(T)}o&&l&&l({action:s,location:b.location,delta:1})}function m(O,S){s=Zn.Replace;let w=ay(b.location,O,S);c=d();let k=j5(w,c),T=b.createHref(w);a.replaceState(k,"",T),o&&l&&l({action:s,location:b.location,delta:0})}function y(O){let S=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof O=="string"?O:mf(O);return w=w.replace(/ $/,"%20"),Yt(S,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,S)}let b={get action(){return s},get location(){return t(i,a)},listen(O){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(N5,p),l=O,()=>{i.removeEventListener(N5,p),l=null}},createHref(O){return e(i,O)},createURL:y,encodeLocation(O){let S=y(O);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:g,replace:m,go(O){return a.go(O)}};return b}var Pn;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Pn||(Pn={}));const Pye=new Set(["lazy","caseSensitive","path","id","index","children"]);function kye(t){return t.index===!0}function J_(t,e,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),t.map((i,o)=>{let a=[...r,o],s=typeof i.id=="string"?i.id:a.join("-");if(Yt(i.index!==!0||!i.children,"Cannot specify children on an index route"),Yt(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),kye(i)){let l=xn({},i,e(i),{id:s});return n[s]=l,l}else{let l=xn({},i,e(i),{id:s,children:void 0});return n[s]=l,i.children&&(l.children=J_(i.children,e,a,n)),l}})}function Yh(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?td(e):e,i=ug(n.pathname||"/",r);if(i==null)return null;let o=OU(t);Tye(o);let a=null;for(let s=0;a==null&&s<o.length;++s){let l=Qye(i);a=jye(o[s],l)}return a}function Cye(t,e){let{route:r,pathname:n,params:i}=t;return{id:r.id,pathname:n,params:i,data:e[r.id],handle:r.handle}}function OU(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(o,a,s)=>{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(Yt(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=rc([n,l.relativePath]),d=r.concat(l);o.children&&o.children.length>0&&(Yt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),OU(o.children,e,d,c)),!(o.path==null&&!o.index)&&e.push({path:c,score:Mye(c,o.index),routesMeta:d})};return t.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of wU(o.path))i(o,a,l)}),e}function wU(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let a=wU(n.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function Tye(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Nye(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Eye=/^:[\w-]+$/,_ye=3,Rye=2,Iye=1,$ye=10,Aye=-2,D5=t=>t==="*";function Mye(t,e){let r=t.split("/"),n=r.length;return r.some(D5)&&(n+=Aye),e&&(n+=Rye),r.filter(i=>!D5(i)).reduce((i,o)=>i+(Eye.test(o)?_ye:o===""?Iye:$ye),n)}function Nye(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function jye(t,e){let{routesMeta:r}=t,n={},i="/",o=[];for(let a=0;a<r.length;++a){let s=r[a],l=a===r.length-1,c=i==="/"?e:e.slice(i.length)||"/",d=Dye({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c);if(!d)return null;Object.assign(n,d.params);let p=s.route;o.push({params:n,pathname:rc([i,d.pathname]),pathnameBase:Bye(rc([i,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(i=rc([i,d.pathnameBase]))}return o}function fa(t,e){e===void 0&&(e={});let r=t;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(gf(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",i=a=>a==null?"":typeof a=="string"?a:String(a),o=r.split(/\/+/).map((a,s,l)=>{if(s===l.length-1&&a==="*")return i(e["*"]);const d=a.match(/^:([\w-]+)(\??)$/);if(d){const[,p,g]=d;let m=e[p];return Yt(g==="?"||m!=null,'Missing ":'+p+'" param'),i(m)}return a.replace(/\?$/g,"")}).filter(a=>!!a);return n+o.join("/")}function Dye(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=Lye(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((c,d,p)=>{let{paramName:g,isOptional:m}=d;if(g==="*"){let b=s[p]||"";a=o.slice(0,o.length-b.length).replace(/(.)\/+$/,"$1")}const y=s[p];return m&&!y?c[g]=void 0:c[g]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:a,pattern:t}}function Lye(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),gf(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function Qye(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return gf(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function ug(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Vye(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?td(t):t;return{pathname:r?r.startsWith("/")?r:Fye(r,e):e,search:zye(n),hash:qye(i)}}function Fye(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function bT(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function SU(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function g2(t,e){let r=SU(t);return e?r.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function m2(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=td(t):(i=xn({},t),Yt(!i.pathname||!i.pathname.includes("?"),bT("?","pathname","search",i)),Yt(!i.pathname||!i.pathname.includes("#"),bT("#","pathname","hash",i)),Yt(!i.search||!i.search.includes("#"),bT("#","search","hash",i)));let o=t===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=r;else{let p=e.length-1;if(!n&&a.startsWith("..")){let g=a.split("/");for(;g[0]==="..";)g.shift(),p-=1;i.pathname=g.join("/")}s=p>=0?e[p]:"/"}let l=Vye(i,s),c=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const rc=t=>t.join("/").replace(/\/\/+/g,"/"),Bye=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),zye=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,qye=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,Tp=function(e,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let i=new Headers(n.headers);return i.set("Location",e),new Response(null,xn({},n,{headers:i}))};class v2{constructor(e,r,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function y2(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const xU=["post","put","patch","delete"],Wye=new Set(xU),Uye=["get",...xU],Hye=new Set(Uye),Xye=new Set([301,302,303,307,308]),Zye=new Set([307,308]),OT={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Gye={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Cm={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},b2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yye=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),PU="remix-router-transitions";function Kye(t){const e=t.window?t.window:typeof window<"u"?window:void 0,r=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",n=!r;Yt(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let ue=t.detectErrorBoundary;i=ve=>({hasErrorBoundary:ue(ve)})}else i=Yye;let o={},a=J_(t.routes,i,void 0,o),s,l=t.basename||"/",c=t.unstable_dataStrategy||rbe,d=xn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},t.future),p=null,g=new Set,m=null,y=null,b=null,O=t.hydrationData!=null,S=Yh(a,t.history.location,l),w=null;if(S==null){let ue=Ia(404,{pathname:t.history.location.pathname}),{matches:ve,route:we}=H5(a);S=ve,w={[we.id]:ue}}let k,T=S.some(ue=>ue.route.lazy),C=S.some(ue=>ue.route.loader);if(T)k=!1;else if(!C)k=!0;else if(d.v7_partialHydration){let ue=t.hydrationData?t.hydrationData.loaderData:null,ve=t.hydrationData?t.hydrationData.errors:null,we=$e=>$e.route.loader?typeof $e.route.loader=="function"&&$e.route.loader.hydrate===!0?!1:ue&&ue[$e.route.id]!==void 0||ve&&ve[$e.route.id]!==void 0:!0;if(ve){let $e=S.findIndex(We=>ve[We.route.id]!==void 0);k=S.slice(0,$e+1).every(we)}else k=S.every(we)}else k=t.hydrationData!=null;let E,_={historyAction:t.history.action,location:t.history.location,matches:S,initialized:k,navigation:OT,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||w,fetchers:new Map,blockers:new Map},$=Zn.Pop,M=!1,j,B=!1,V=new Map,X=null,D=!1,F=!1,Y=[],ie=[],H=new Map,ne=0,z=-1,N=new Map,U=new Set,J=new Map,Q=new Map,q=new Set,oe=new Map,Oe=new Map,Z=!1;function le(){if(p=t.history.listen(ue=>{let{action:ve,location:we,delta:$e}=ue;if(Z){Z=!1;return}gf(Oe.size===0||$e!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let We=$c({currentLocation:_.location,nextLocation:we,historyAction:ve});if(We&&$e!=null){Z=!0,t.history.go($e*-1),ni(We,{state:"blocked",location:we,proceed(){ni(We,{state:"proceeding",proceed:void 0,reset:void 0,location:we}),t.history.go($e)},reset(){let wt=new Map(_.blockers);wt.set(We,Cm),re({blockers:wt})}});return}return De(ve,we)}),r){pbe(e,V);let ue=()=>gbe(e,V);e.addEventListener("pagehide",ue),X=()=>e.removeEventListener("pagehide",ue)}return _.initialized||De(Zn.Pop,_.location,{initialHydration:!0}),E}function Pe(){p&&p(),X&&X(),g.clear(),j&&j.abort(),_.fetchers.forEach((ue,ve)=>En(ve)),_.blockers.forEach((ue,ve)=>Il(ve))}function ee(ue){return g.add(ue),()=>g.delete(ue)}function re(ue,ve){ve===void 0&&(ve={}),_=xn({},_,ue);let we=[],$e=[];d.v7_fetcherPersist&&_.fetchers.forEach((We,wt)=>{We.state==="idle"&&(q.has(wt)?$e.push(wt):we.push(wt))}),[...g].forEach(We=>We(_,{deletedFetchers:$e,unstable_viewTransitionOpts:ve.viewTransitionOpts,unstable_flushSync:ve.flushSync===!0})),d.v7_fetcherPersist&&(we.forEach(We=>_.fetchers.delete(We)),$e.forEach(We=>En(We)))}function ye(ue,ve,we){var $e,We;let{flushSync:wt}=we===void 0?{}:we,at=_.actionData!=null&&_.navigation.formMethod!=null&&us(_.navigation.formMethod)&&_.navigation.state==="loading"&&(($e=ue.state)==null?void 0:$e._isRedirect)!==!0,Ue;ve.actionData?Object.keys(ve.actionData).length>0?Ue=ve.actionData:Ue=null:at?Ue=_.actionData:Ue=null;let Ct=ve.loaderData?W5(_.loaderData,ve.loaderData,ve.matches||[],ve.errors):_.loaderData,G=_.blockers;G.size>0&&(G=new Map(G),G.forEach((ce,de)=>G.set(de,Cm)));let W=M===!0||_.navigation.formMethod!=null&&us(_.navigation.formMethod)&&((We=ue.state)==null?void 0:We._isRedirect)!==!0;s&&(a=s,s=void 0),D||$===Zn.Pop||($===Zn.Push?t.history.push(ue,ue.state):$===Zn.Replace&&t.history.replace(ue,ue.state));let te;if($===Zn.Pop){let ce=V.get(_.location.pathname);ce&&ce.has(ue.pathname)?te={currentLocation:_.location,nextLocation:ue}:V.has(ue.pathname)&&(te={currentLocation:ue,nextLocation:_.location})}else if(B){let ce=V.get(_.location.pathname);ce?ce.add(ue.pathname):(ce=new Set([ue.pathname]),V.set(_.location.pathname,ce)),te={currentLocation:_.location,nextLocation:ue}}re(xn({},ve,{actionData:Ue,loaderData:Ct,historyAction:$,location:ue,initialized:!0,navigation:OT,revalidation:"idle",restoreScrollPosition:ud(ue,ve.matches||_.matches),preventScrollReset:W,blockers:G}),{viewTransitionOpts:te,flushSync:wt===!0}),$=Zn.Pop,M=!1,B=!1,D=!1,F=!1,Y=[],ie=[]}async function ke(ue,ve){if(typeof ue=="number"){t.history.go(ue);return}let we=eR(_.location,_.matches,l,d.v7_prependBasename,ue,d.v7_relativeSplatPath,ve==null?void 0:ve.fromRouteId,ve==null?void 0:ve.relative),{path:$e,submission:We,error:wt}=L5(d.v7_normalizeFormMethod,!1,we,ve),at=_.location,Ue=ay(_.location,$e,ve&&ve.state);Ue=xn({},Ue,t.history.encodeLocation(Ue));let Ct=ve&&ve.replace!=null?ve.replace:void 0,G=Zn.Push;Ct===!0?G=Zn.Replace:Ct===!1||We!=null&&us(We.formMethod)&&We.formAction===_.location.pathname+_.location.search&&(G=Zn.Replace);let W=ve&&"preventScrollReset"in ve?ve.preventScrollReset===!0:void 0,te=(ve&&ve.unstable_flushSync)===!0,ce=$c({currentLocation:at,nextLocation:Ue,historyAction:G});if(ce){ni(ce,{state:"blocked",location:Ue,proceed(){ni(ce,{state:"proceeding",proceed:void 0,reset:void 0,location:Ue}),ke(ue,ve)},reset(){let de=new Map(_.blockers);de.set(ce,Cm),re({blockers:de})}});return}return await De(G,Ue,{submission:We,pendingError:wt,preventScrollReset:W,replace:ve&&ve.replace,enableViewTransition:ve&&ve.unstable_viewTransition,flushSync:te})}function Me(){if(zn(),re({revalidation:"loading"}),_.navigation.state!=="submitting"){if(_.navigation.state==="idle"){De(_.historyAction,_.location,{startUninterruptedRevalidation:!0});return}De($||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation})}}async function De(ue,ve,we){j&&j.abort(),j=null,$=ue,D=(we&&we.startUninterruptedRevalidation)===!0,$s(_.location,_.matches),M=(we&&we.preventScrollReset)===!0,B=(we&&we.enableViewTransition)===!0;let $e=s||a,We=we&&we.overrideNavigation,wt=Yh($e,ve,l),at=(we&&we.flushSync)===!0;if(!wt){let ce=Ia(404,{pathname:ve.pathname}),{matches:de,route:qe}=H5($e);$l(),ye(ve,{matches:de,loaderData:{},errors:{[qe.id]:ce}},{flushSync:at});return}if(_.initialized&&!F&&lbe(_.location,ve)&&!(we&&we.submission&&us(we.submission.formMethod))){ye(ve,{matches:wt},{flushSync:at});return}j=new AbortController;let Ue=Sh(t.history,ve,j.signal,we&&we.submission),Ct;if(we&&we.pendingError)Ct=[Pv(wt).route.id,{type:Pn.error,error:we.pendingError}];else if(we&&we.submission&&us(we.submission.formMethod)){let ce=await Vt(Ue,ve,we.submission,wt,{replace:we.replace,flushSync:at});if(ce.shortCircuited)return;Ct=ce.pendingActionResult,We=wT(ve,we.submission),at=!1,Ue=Sh(t.history,Ue.url,Ue.signal)}let{shortCircuited:G,loaderData:W,errors:te}=await vr(Ue,ve,wt,We,we&&we.submission,we&&we.fetcherSubmission,we&&we.replace,we&&we.initialHydration===!0,at,Ct);G||(j=null,ye(ve,xn({matches:wt},U5(Ct),{loaderData:W,errors:te})))}async function Vt(ue,ve,we,$e,We){We===void 0&&(We={}),zn();let wt=fbe(ve,we);re({navigation:wt},{flushSync:We.flushSync===!0});let at,Ue=rR($e,ve);if(!Ue.route.action&&!Ue.route.lazy)at={type:Pn.error,error:Ia(405,{method:ue.method,pathname:ve.pathname,routeId:Ue.route.id})};else if(at=(await zt("action",ue,[Ue],$e))[0],ue.signal.aborted)return{shortCircuited:!0};if(Zd(at)){let Ct;return We&&We.replace!=null?Ct=We.replace:Ct=B5(at.response.headers.get("Location"),new URL(ue.url),l)===_.location.pathname+_.location.search,await Rr(ue,at,{submission:we,replace:Ct}),{shortCircuited:!0}}if(Xd(at))throw Ia(400,{type:"defer-action"});if(Ma(at)){let Ct=Pv($e,Ue.route.id);return(We&&We.replace)!==!0&&($=Zn.Push),{pendingActionResult:[Ct.route.id,at]}}return{pendingActionResult:[Ue.route.id,at]}}async function vr(ue,ve,we,$e,We,wt,at,Ue,Ct,G){let W=$e||wT(ve,We),te=We||wt||G5(W),ce=s||a,[de,qe]=Q5(t.history,_,we,te,ve,d.v7_partialHydration&&Ue===!0,d.unstable_skipActionErrorRevalidation,F,Y,ie,q,J,U,ce,l,G);if($l(ct=>!(we&&we.some(Qt=>Qt.route.id===ct))||de&&de.some(Qt=>Qt.route.id===ct)),z=++ne,de.length===0&&qe.length===0){let ct=Ja();return ye(ve,xn({matches:we,loaderData:{},errors:G&&Ma(G[1])?{[G[0]]:G[1].error}:null},U5(G),ct?{fetchers:new Map(_.fetchers)}:{}),{flushSync:Ct}),{shortCircuited:!0}}if(!D&&(!d.v7_partialHydration||!Ue)){qe.forEach(Qt=>{let Dt=_.fetchers.get(Qt.key),xr=Tm(void 0,Dt?Dt.data:void 0);_.fetchers.set(Qt.key,xr)});let ct;G&&!Ma(G[1])?ct={[G[0]]:G[1].data}:_.actionData&&(Object.keys(_.actionData).length===0?ct=null:ct=_.actionData),re(xn({navigation:W},ct!==void 0?{actionData:ct}:{},qe.length>0?{fetchers:new Map(_.fetchers)}:{}),{flushSync:Ct})}qe.forEach(ct=>{H.has(ct.key)&&qn(ct.key),ct.controller&&H.set(ct.key,ct.controller)});let tt=()=>qe.forEach(ct=>qn(ct.key));j&&j.signal.addEventListener("abort",tt);let{loaderResults:Ot,fetcherResults:ir}=await Tn(_.matches,we,de,qe,ue);if(ue.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",tt),qe.forEach(ct=>H.delete(ct.key));let br=X5([...Ot,...ir]);if(br){if(br.idx>=de.length){let ct=qe[br.idx-de.length].key;U.add(ct)}return await Rr(ue,br.result,{replace:at}),{shortCircuited:!0}}let{loaderData:It,errors:qt}=q5(_,we,de,Ot,G,qe,ir,oe);oe.forEach((ct,Qt)=>{ct.subscribe(Dt=>{(Dt||ct.done)&&oe.delete(Qt)})}),d.v7_partialHydration&&Ue&&_.errors&&Object.entries(_.errors).filter(ct=>{let[Qt]=ct;return!de.some(Dt=>Dt.route.id===Qt)}).forEach(ct=>{let[Qt,Dt]=ct;qt=Object.assign(qt||{},{[Qt]:Dt})});let Ir=Ja(),vt=Ic(z),pr=Ir||vt||qe.length>0;return xn({loaderData:It,errors:qt},pr?{fetchers:new Map(_.fetchers)}:{})}function yr(ue,ve,we,$e){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");H.has(ue)&&qn(ue);let We=($e&&$e.unstable_flushSync)===!0,wt=s||a,at=eR(_.location,_.matches,l,d.v7_prependBasename,we,d.v7_relativeSplatPath,ve,$e==null?void 0:$e.relative),Ue=Yh(wt,at,l);if(!Ue){pi(ue,ve,Ia(404,{pathname:at}),{flushSync:We});return}let{path:Ct,submission:G,error:W}=L5(d.v7_normalizeFormMethod,!0,at,$e);if(W){pi(ue,ve,W,{flushSync:We});return}let te=rR(Ue,Ct);if(M=($e&&$e.preventScrollReset)===!0,G&&us(G.formMethod)){ur(ue,ve,Ct,te,Ue,We,G);return}J.set(ue,{routeId:ve,path:Ct}),or(ue,ve,Ct,te,Ue,We,G)}async function ur(ue,ve,we,$e,We,wt,at){if(zn(),J.delete(ue),!$e.route.action&&!$e.route.lazy){let xr=Ia(405,{method:at.formMethod,pathname:we,routeId:ve});pi(ue,ve,xr,{flushSync:wt});return}let Ue=_.fetchers.get(ue);$n(ue,hbe(at,Ue),{flushSync:wt});let Ct=new AbortController,G=Sh(t.history,we,Ct.signal,at);H.set(ue,Ct);let W=ne,ce=(await zt("action",G,[$e],We))[0];if(G.signal.aborted){H.get(ue)===Ct&&H.delete(ue);return}if(d.v7_fetcherPersist&&q.has(ue)){if(Zd(ce)||Ma(ce)){$n(ue,nu(void 0));return}}else{if(Zd(ce))if(H.delete(ue),z>W){$n(ue,nu(void 0));return}else return U.add(ue),$n(ue,Tm(at)),Rr(G,ce,{fetcherSubmission:at});if(Ma(ce)){pi(ue,ve,ce.error);return}}if(Xd(ce))throw Ia(400,{type:"defer-action"});let de=_.navigation.location||_.location,qe=Sh(t.history,de,Ct.signal),tt=s||a,Ot=_.navigation.state!=="idle"?Yh(tt,_.navigation.location,l):_.matches;Yt(Ot,"Didn't find any matches after fetcher action");let ir=++ne;N.set(ue,ir);let br=Tm(at,ce.data);_.fetchers.set(ue,br);let[It,qt]=Q5(t.history,_,Ot,at,de,!1,d.unstable_skipActionErrorRevalidation,F,Y,ie,q,J,U,tt,l,[$e.route.id,ce]);qt.filter(xr=>xr.key!==ue).forEach(xr=>{let Wn=xr.key,wa=_.fetchers.get(Wn),mo=Tm(void 0,wa?wa.data:void 0);_.fetchers.set(Wn,mo),H.has(Wn)&&qn(Wn),xr.controller&&H.set(Wn,xr.controller)}),re({fetchers:new Map(_.fetchers)});let Ir=()=>qt.forEach(xr=>qn(xr.key));Ct.signal.addEventListener("abort",Ir);let{loaderResults:vt,fetcherResults:pr}=await Tn(_.matches,Ot,It,qt,qe);if(Ct.signal.aborted)return;Ct.signal.removeEventListener("abort",Ir),N.delete(ue),H.delete(ue),qt.forEach(xr=>H.delete(xr.key));let ct=X5([...vt,...pr]);if(ct){if(ct.idx>=It.length){let xr=qt[ct.idx-It.length].key;U.add(xr)}return Rr(qe,ct.result)}let{loaderData:Qt,errors:Dt}=q5(_,_.matches,It,vt,void 0,qt,pr,oe);if(_.fetchers.has(ue)){let xr=nu(ce.data);_.fetchers.set(ue,xr)}Ic(ir),_.navigation.state==="loading"&&ir>z?(Yt($,"Expected pending action"),j&&j.abort(),ye(_.navigation.location,{matches:Ot,loaderData:Qt,errors:Dt,fetchers:new Map(_.fetchers)})):(re({errors:Dt,loaderData:W5(_.loaderData,Qt,Ot,Dt),fetchers:new Map(_.fetchers)}),F=!1)}async function or(ue,ve,we,$e,We,wt,at){let Ue=_.fetchers.get(ue);$n(ue,Tm(at,Ue?Ue.data:void 0),{flushSync:wt});let Ct=new AbortController,G=Sh(t.history,we,Ct.signal);H.set(ue,Ct);let W=ne,ce=(await zt("loader",G,[$e],We))[0];if(Xd(ce)&&(ce=await EU(ce,G.signal,!0)||ce),H.get(ue)===Ct&&H.delete(ue),!G.signal.aborted){if(q.has(ue)){$n(ue,nu(void 0));return}if(Zd(ce))if(z>W){$n(ue,nu(void 0));return}else{U.add(ue),await Rr(G,ce);return}if(Ma(ce)){pi(ue,ve,ce.error);return}Yt(!Xd(ce),"Unhandled fetcher deferred data"),$n(ue,nu(ce.data))}}async function Rr(ue,ve,we){let{submission:$e,fetcherSubmission:We,replace:wt}=we===void 0?{}:we;ve.response.headers.has("X-Remix-Revalidate")&&(F=!0);let at=ve.response.headers.get("Location");Yt(at,"Expected a Location header on the redirect Response"),at=B5(at,new URL(ue.url),l);let Ue=ay(_.location,at,{_isRedirect:!0});if(r){let de=!1;if(ve.response.headers.has("X-Remix-Reload-Document"))de=!0;else if(b2.test(at)){const qe=t.history.createURL(at);de=qe.origin!==e.location.origin||ug(qe.pathname,l)==null}if(de){wt?e.location.replace(at):e.location.assign(at);return}}j=null;let Ct=wt===!0?Zn.Replace:Zn.Push,{formMethod:G,formAction:W,formEncType:te}=_.navigation;!$e&&!We&&G&&W&&te&&($e=G5(_.navigation));let ce=$e||We;if(Zye.has(ve.response.status)&&ce&&us(ce.formMethod))await De(Ct,Ue,{submission:xn({},ce,{formAction:at}),preventScrollReset:M});else{let de=wT(Ue,$e);await De(Ct,Ue,{overrideNavigation:de,fetcherSubmission:We,preventScrollReset:M})}}async function zt(ue,ve,we,$e){try{let We=await nbe(c,ue,ve,we,$e,o,i);return await Promise.all(We.map((wt,at)=>{if(cbe(wt)){let Ue=wt.result;return{type:Pn.redirect,response:abe(Ue,ve,we[at].route.id,$e,l,d.v7_relativeSplatPath)}}return obe(wt)}))}catch(We){return we.map(()=>({type:Pn.error,error:We}))}}async function Tn(ue,ve,we,$e,We){let[wt,...at]=await Promise.all([we.length?zt("loader",We,we,ve):[],...$e.map(Ue=>{if(Ue.matches&&Ue.match&&Ue.controller){let Ct=Sh(t.history,Ue.path,Ue.controller.signal);return zt("loader",Ct,[Ue.match],Ue.matches).then(G=>G[0])}else return Promise.resolve({type:Pn.error,error:Ia(404,{pathname:Ue.path})})})]);return await Promise.all([Z5(ue,we,wt,wt.map(()=>We.signal),!1,_.loaderData),Z5(ue,$e.map(Ue=>Ue.match),at,$e.map(Ue=>Ue.controller?Ue.controller.signal:null),!0)]),{loaderResults:wt,fetcherResults:at}}function zn(){F=!0,Y.push(...$l()),J.forEach((ue,ve)=>{H.has(ve)&&(ie.push(ve),qn(ve))})}function $n(ue,ve,we){we===void 0&&(we={}),_.fetchers.set(ue,ve),re({fetchers:new Map(_.fetchers)},{flushSync:(we&&we.flushSync)===!0})}function pi(ue,ve,we,$e){$e===void 0&&($e={});let We=Pv(_.matches,ve);En(ue),re({errors:{[We.route.id]:we},fetchers:new Map(_.fetchers)},{flushSync:($e&&$e.flushSync)===!0})}function io(ue){return d.v7_fetcherPersist&&(Q.set(ue,(Q.get(ue)||0)+1),q.has(ue)&&q.delete(ue)),_.fetchers.get(ue)||Gye}function En(ue){let ve=_.fetchers.get(ue);H.has(ue)&&!(ve&&ve.state==="loading"&&N.has(ue))&&qn(ue),J.delete(ue),N.delete(ue),U.delete(ue),q.delete(ue),_.fetchers.delete(ue)}function Ii(ue){if(d.v7_fetcherPersist){let ve=(Q.get(ue)||0)-1;ve<=0?(Q.delete(ue),q.add(ue)):Q.set(ue,ve)}else En(ue);re({fetchers:new Map(_.fetchers)})}function qn(ue){let ve=H.get(ue);Yt(ve,"Expected fetch controller: "+ue),ve.abort(),H.delete(ue)}function Rl(ue){for(let ve of ue){let we=io(ve),$e=nu(we.data);_.fetchers.set(ve,$e)}}function Ja(){let ue=[],ve=!1;for(let we of U){let $e=_.fetchers.get(we);Yt($e,"Expected fetcher: "+we),$e.state==="loading"&&(U.delete(we),ue.push(we),ve=!0)}return Rl(ue),ve}function Ic(ue){let ve=[];for(let[we,$e]of N)if($e<ue){let We=_.fetchers.get(we);Yt(We,"Expected fetcher: "+we),We.state==="loading"&&(qn(we),N.delete(we),ve.push(we))}return Rl(ve),ve.length>0}function Mg(ue,ve){let we=_.blockers.get(ue)||Cm;return Oe.get(ue)!==ve&&Oe.set(ue,ve),we}function Il(ue){_.blockers.delete(ue),Oe.delete(ue)}function ni(ue,ve){let we=_.blockers.get(ue)||Cm;Yt(we.state==="unblocked"&&ve.state==="blocked"||we.state==="blocked"&&ve.state==="blocked"||we.state==="blocked"&&ve.state==="proceeding"||we.state==="blocked"&&ve.state==="unblocked"||we.state==="proceeding"&&ve.state==="unblocked","Invalid blocker state transition: "+we.state+" -> "+ve.state);let $e=new Map(_.blockers);$e.set(ue,ve),re({blockers:$e})}function $c(ue){let{currentLocation:ve,nextLocation:we,historyAction:$e}=ue;if(Oe.size===0)return;Oe.size>1&&gf(!1,"A router only supports one blocker at a time");let We=Array.from(Oe.entries()),[wt,at]=We[We.length-1],Ue=_.blockers.get(wt);if(!(Ue&&Ue.state==="proceeding")&&at({currentLocation:ve,nextLocation:we,historyAction:$e}))return wt}function $l(ue){let ve=[];return oe.forEach((we,$e)=>{(!ue||ue($e))&&(we.cancel(),ve.push($e),oe.delete($e))}),ve}function cd(ue,ve,we){if(m=ue,b=ve,y=we||null,!O&&_.navigation===OT){O=!0;let $e=ud(_.location,_.matches);$e!=null&&re({restoreScrollPosition:$e})}return()=>{m=null,b=null,y=null}}function es(ue,ve){return y&&y(ue,ve.map($e=>Cye($e,_.loaderData)))||ue.key}function $s(ue,ve){if(m&&b){let we=es(ue,ve);m[we]=b()}}function ud(ue,ve){if(m){let we=es(ue,ve),$e=m[we];if(typeof $e=="number")return $e}return null}function ts(ue){o={},s=J_(ue,i,void 0,o)}return E={get basename(){return l},get future(){return d},get state(){return _},get routes(){return a},get window(){return e},initialize:le,subscribe:ee,enableScrollRestoration:cd,navigate:ke,fetch:yr,revalidate:Me,createHref:ue=>t.history.createHref(ue),encodeLocation:ue=>t.history.encodeLocation(ue),getFetcher:io,deleteFetcher:Ii,dispose:Pe,getBlocker:Mg,deleteBlocker:Il,_internalFetchControllers:H,_internalActiveDeferreds:oe,_internalSetRoutes:ts},E}function Jye(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function eR(t,e,r,n,i,o,a,s){let l,c;if(a){l=[];for(let p of e)if(l.push(p),p.route.id===a){c=p;break}}else l=e,c=e[e.length-1];let d=m2(i||".",g2(l,o),ug(t.pathname,r)||t.pathname,s==="path");return i==null&&(d.search=t.search,d.hash=t.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!O2(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(d.pathname=d.pathname==="/"?r:rc([r,d.pathname])),mf(d)}function L5(t,e,r,n){if(!n||!Jye(n))return{path:r};if(n.formMethod&&!dbe(n.formMethod))return{path:r,error:Ia(405,{method:n.formMethod})};let i=()=>({path:r,error:Ia(400,{type:"invalid-body"})}),o=n.formMethod||"get",a=t?o.toUpperCase():o.toLowerCase(),s=CU(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!us(a))return i();let g=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((m,y)=>{let[b,O]=y;return""+m+b+"="+O+`
|
|
75
75
|
`},""):String(n.body);return{path:r,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:g}}}else if(n.formEncType==="application/json"){if(!us(a))return i();try{let g=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:g,text:void 0}}}catch{return i()}}}Yt(typeof FormData=="function","FormData is not available in this environment");let l,c;if(n.formData)l=tR(n.formData),c=n.formData;else if(n.body instanceof FormData)l=tR(n.body),c=n.body;else if(n.body instanceof URLSearchParams)l=n.body,c=z5(l);else if(n.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(n.body),c=z5(l)}catch{return i()}let d={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(us(d.formMethod))return{path:r,submission:d};let p=td(r);return e&&p.search&&O2(p.search)&&l.append("index",""),p.search="?"+l,{path:mf(p),submission:d}}function ebe(t,e){let r=t;if(e){let n=t.findIndex(i=>i.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function Q5(t,e,r,n,i,o,a,s,l,c,d,p,g,m,y,b){let O=b?Ma(b[1])?b[1].error:b[1].data:void 0,S=t.createURL(e.location),w=t.createURL(i),k=b&&Ma(b[1])?b[0]:void 0,T=k?ebe(r,k):r,C=b?b[1].statusCode:void 0,E=a&&C&&C>=400,_=T.filter((M,j)=>{let{route:B}=M;if(B.lazy)return!0;if(B.loader==null)return!1;if(o)return typeof B.loader!="function"||B.loader.hydrate?!0:e.loaderData[B.id]===void 0&&(!e.errors||e.errors[B.id]===void 0);if(tbe(e.loaderData,e.matches[j],M)||l.some(D=>D===M.route.id))return!0;let V=e.matches[j],X=M;return V5(M,xn({currentUrl:S,currentParams:V.params,nextUrl:w,nextParams:X.params},n,{actionResult:O,unstable_actionStatus:C,defaultShouldRevalidate:E?!1:s||S.pathname+S.search===w.pathname+w.search||S.search!==w.search||kU(V,X)}))}),$=[];return p.forEach((M,j)=>{if(o||!r.some(F=>F.route.id===M.routeId)||d.has(j))return;let B=Yh(m,M.path,y);if(!B){$.push({key:j,routeId:M.routeId,path:M.path,matches:null,match:null,controller:null});return}let V=e.fetchers.get(j),X=rR(B,M.path),D=!1;g.has(j)?D=!1:c.includes(j)?D=!0:V&&V.state!=="idle"&&V.data===void 0?D=s:D=V5(X,xn({currentUrl:S,currentParams:e.matches[e.matches.length-1].params,nextUrl:w,nextParams:r[r.length-1].params},n,{actionResult:O,unstable_actionStatus:C,defaultShouldRevalidate:E?!1:s})),D&&$.push({key:j,routeId:M.routeId,path:M.path,matches:B,match:X,controller:new AbortController})}),[_,$]}function tbe(t,e,r){let n=!e||r.route.id!==e.route.id,i=t[r.route.id]===void 0;return n||i}function kU(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function V5(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function F5(t,e,r){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let i=r[t.id];Yt(i,"No route found in manifest");let o={};for(let a in n){let l=i[a]!==void 0&&a!=="hasErrorBoundary";gf(!l,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!l&&!Pye.has(a)&&(o[a]=n[a])}Object.assign(i,o),Object.assign(i,xn({},e(i),{lazy:void 0}))}function rbe(t){return Promise.all(t.matches.map(e=>e.resolve()))}async function nbe(t,e,r,n,i,o,a,s){let l=n.reduce((p,g)=>p.add(g.route.id),new Set),c=new Set,d=await t({matches:i.map(p=>{let g=l.has(p.route.id);return xn({},p,{shouldLoad:g,resolve:y=>(c.add(p.route.id),g?ibe(e,r,p,o,a,y,s):Promise.resolve({type:Pn.data,result:void 0}))})}),request:r,params:i[0].params,context:s});return i.forEach(p=>Yt(c.has(p.route.id),'`match.resolve()` was not called for route id "'+p.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((p,g)=>l.has(i[g].route.id))}async function ibe(t,e,r,n,i,o,a){let s,l,c=d=>{let p,g=new Promise((b,O)=>p=O);l=()=>p(),e.signal.addEventListener("abort",l);let m=b=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+r.route.id+"]"))):d({request:e,params:r.params,context:a},...b!==void 0?[b]:[]),y;return o?y=o(b=>m(b)):y=(async()=>{try{return{type:"data",result:await m()}}catch(b){return{type:"error",result:b}}})(),Promise.race([y,g])};try{let d=r.route[t];if(r.route.lazy)if(d){let p,[g]=await Promise.all([c(d).catch(m=>{p=m}),F5(r.route,i,n)]);if(p!==void 0)throw p;s=g}else if(await F5(r.route,i,n),d=r.route[t],d)s=await c(d);else if(t==="action"){let p=new URL(e.url),g=p.pathname+p.search;throw Ia(405,{method:e.method,pathname:g,routeId:r.route.id})}else return{type:Pn.data,result:void 0};else if(d)s=await c(d);else{let p=new URL(e.url),g=p.pathname+p.search;throw Ia(404,{pathname:g})}Yt(s.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:Pn.error,result:d}}finally{l&&e.signal.removeEventListener("abort",l)}return s}async function obe(t){let{result:e,type:r,status:n}=t;if(TU(e)){let a;try{let s=e.headers.get("Content-Type");s&&/\bapplication\/json\b/.test(s)?e.body==null?a=null:a=await e.json():a=await e.text()}catch(s){return{type:Pn.error,error:s}}return r===Pn.error?{type:Pn.error,error:new v2(e.status,e.statusText,a),statusCode:e.status,headers:e.headers}:{type:Pn.data,data:a,statusCode:e.status,headers:e.headers}}if(r===Pn.error)return{type:Pn.error,error:e,statusCode:y2(e)?e.status:n};if(ube(e)){var i,o;return{type:Pn.deferred,deferredData:e,statusCode:(i=e.init)==null?void 0:i.status,headers:((o=e.init)==null?void 0:o.headers)&&new Headers(e.init.headers)}}return{type:Pn.data,data:e,statusCode:n}}function abe(t,e,r,n,i,o){let a=t.headers.get("Location");if(Yt(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!b2.test(a)){let s=n.slice(0,n.findIndex(l=>l.route.id===r)+1);a=eR(new URL(e.url),s,i,!0,a,o),t.headers.set("Location",a)}return t}function B5(t,e,r){if(b2.test(t)){let n=t,i=n.startsWith("//")?new URL(e.protocol+n):new URL(n),o=ug(i.pathname,r)!=null;if(i.origin===e.origin&&o)return i.pathname+i.search+i.hash}return t}function Sh(t,e,r,n){let i=t.createURL(CU(e)).toString(),o={signal:r};if(n&&us(n.formMethod)){let{formMethod:a,formEncType:s}=n;o.method=a.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):s==="text/plain"?o.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?o.body=tR(n.formData):o.body=n.formData}return new Request(i,o)}function tR(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function z5(t){let e=new FormData;for(let[r,n]of t.entries())e.append(r,n);return e}function sbe(t,e,r,n,i,o){let a={},s=null,l,c=!1,d={},p=n&&Ma(n[1])?n[1].error:void 0;return r.forEach((g,m)=>{let y=e[m].route.id;if(Yt(!Zd(g),"Cannot handle redirect results in processLoaderData"),Ma(g)){let b=g.error;p!==void 0&&(b=p,p=void 0),s=s||{};{let O=Pv(t,y);s[O.route.id]==null&&(s[O.route.id]=b)}a[y]=void 0,c||(c=!0,l=y2(g.error)?g.error.status:500),g.headers&&(d[y]=g.headers)}else Xd(g)?(i.set(y,g.deferredData),a[y]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!c&&(l=g.statusCode),g.headers&&(d[y]=g.headers)):(a[y]=g.data,g.statusCode&&g.statusCode!==200&&!c&&(l=g.statusCode),g.headers&&(d[y]=g.headers))}),p!==void 0&&n&&(s={[n[0]]:p},a[n[0]]=void 0),{loaderData:a,errors:s,statusCode:l||200,loaderHeaders:d}}function q5(t,e,r,n,i,o,a,s){let{loaderData:l,errors:c}=sbe(e,r,n,i,s);for(let d=0;d<o.length;d++){let{key:p,match:g,controller:m}=o[d];Yt(a!==void 0&&a[d]!==void 0,"Did not find corresponding fetcher result");let y=a[d];if(!(m&&m.signal.aborted))if(Ma(y)){let b=Pv(t.matches,g==null?void 0:g.route.id);c&&c[b.route.id]||(c=xn({},c,{[b.route.id]:y.error})),t.fetchers.delete(p)}else if(Zd(y))Yt(!1,"Unhandled fetcher revalidation redirect");else if(Xd(y))Yt(!1,"Unhandled fetcher deferred data");else{let b=nu(y.data);t.fetchers.set(p,b)}}return{loaderData:l,errors:c}}function W5(t,e,r,n){let i=xn({},e);for(let o of r){let a=o.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(i[a]=e[a]):t[a]!==void 0&&o.route.loader&&(i[a]=t[a]),n&&n.hasOwnProperty(a))break}return i}function U5(t){return t?Ma(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function Pv(t,e){return(e?t.slice(0,t.findIndex(n=>n.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function H5(t){let e=t.length===1?t[0]:t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Ia(t,e){let{pathname:r,routeId:n,method:i,type:o}=e===void 0?{}:e,a="Unknown Server Error",s="Unknown @remix-run/router error";return t===400?(a="Bad Request",i&&r&&n?s="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):t===403?(a="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):t===404?(a="Not Found",s='No route matches URL "'+r+'"'):t===405&&(a="Method Not Allowed",i&&r&&n?s="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new v2(t||500,a,new Error(s),!0)}function X5(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(Zd(r))return{result:r,idx:e}}}function CU(t){let e=typeof t=="string"?td(t):t;return mf(xn({},e,{hash:""}))}function lbe(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function cbe(t){return TU(t.result)&&Xye.has(t.result.status)}function Xd(t){return t.type===Pn.deferred}function Ma(t){return t.type===Pn.error}function Zd(t){return(t&&t.type)===Pn.redirect}function ube(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function TU(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function dbe(t){return Hye.has(t.toLowerCase())}function us(t){return Wye.has(t.toLowerCase())}async function Z5(t,e,r,n,i,o){for(let a=0;a<r.length;a++){let s=r[a],l=e[a];if(!l)continue;let c=t.find(p=>p.route.id===l.route.id),d=c!=null&&!kU(c,l)&&(o&&o[l.route.id])!==void 0;if(Xd(s)&&(i||d)){let p=n[a];Yt(p,"Expected an AbortSignal for revalidating fetcher deferred result"),await EU(s,p,i).then(g=>{g&&(r[a]=g||r[a])})}}}async function EU(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:Pn.data,data:t.deferredData.unwrappedData}}catch(i){return{type:Pn.error,error:i}}return{type:Pn.data,data:t.deferredData.data}}}function O2(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function rR(t,e){let r=typeof e=="string"?td(e).search:e.search;if(t[t.length-1].route.index&&O2(r||""))return t[t.length-1];let n=SU(t);return n[n.length-1]}function G5(t){let{formMethod:e,formAction:r,formEncType:n,text:i,formData:o,json:a}=t;if(!(!e||!r||!n)){if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:a,text:void 0}}}function wT(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function fbe(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Tm(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function hbe(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function nu(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function pbe(t,e){try{let r=t.sessionStorage.getItem(PU);if(r){let n=JSON.parse(r);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function gbe(t,e){if(e.size>0){let r={};for(let[n,i]of e)r[n]=[...i];try{t.sessionStorage.setItem(PU,JSON.stringify(r))}catch(n){gf(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
|
|
76
76
|
* React Router v6.23.1
|
|
77
77
|
*
|
|
@@ -146,7 +146,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
146
146
|
`),w=Ewe(O.slice(0,S)),k=w["content-type"],k&&k.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");if(T=O.slice(S),T){if(C=IH(t,T),Object.keys(C).length>1||"data"in C||"incremental"in C||"errors"in C||"payload"in C)if(lwe(C)){if(E={},"payload"in C){if(Object.keys(C).length===1&&C.payload===null)return[2];E=ge({},C.payload)}"errors"in C&&(E=ge(ge({},E),{extensions:ge(ge({},"extensions"in E?E.extensions:null),($={},$[B2]=C.errors,$))})),e(E)}else e(C);else if(Object.keys(C).length===1&&"hasNext"in C&&!C.hasNext)return[2]}b=s.indexOf(a)}return[3,1];case 3:return[2]}})})}function Ewe(t){var e={};return t.split(`
|
|
147
147
|
`).forEach(function(r){var n=r.indexOf(":");if(n>-1){var i=r.slice(0,n).trim().toLowerCase(),o=r.slice(n+1).trim();e[i]=o}}),e}function IH(t,e){if(t.status>=300){var r=function(){try{return JSON.parse(e)}catch{return e}};RH(t,r(),"Response not successful: Received status code ".concat(t.status))}try{return JSON.parse(e)}catch(i){var n=i;throw n.name="ServerParseError",n.response=t,n.statusCode=t.status,n.bodyText=e,n}}function _we(t,e){t.result&&t.result.errors&&t.result.data&&e.next(t.result),e.error(t)}function Rwe(t){return function(e){return e.text().then(function(r){return IH(e,r)}).then(function(r){return!Array.isArray(r)&&!EQ.call(r,"data")&&!EQ.call(r,"errors")&&RH(e,r,"Server response was missing for query '".concat(Array.isArray(t)?t.map(function(n){return n.operationName}):t.operationName,"'.")),r})}}var SR=function(t,e){var r;try{r=JSON.stringify(t)}catch(i){var n=fo(39,e,i.message);throw n.parseError=i,n}return r},Iwe={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},$we={accept:"*/*","content-type":"application/json"},Awe={method:"POST"},Mwe={http:Iwe,headers:$we,options:Awe},Nwe=function(t,e){return e(t)};function jwe(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={},o={};r.forEach(function(p){i=ge(ge(ge({},i),p.options),{headers:ge(ge({},i.headers),p.headers)}),p.credentials&&(i.credentials=p.credentials),o=ge(ge({},o),p.http)}),i.headers&&(i.headers=Dwe(i.headers,o.preserveHeaderCase));var a=t.operationName,s=t.extensions,l=t.variables,c=t.query,d={operationName:a,variables:l};return o.includeExtensions&&(d.extensions=s),o.includeQuery&&(d.query=e(c,dP)),{options:i,body:d}}function Dwe(t,e){if(!e){var r=Object.create(null);return Object.keys(Object(t)).forEach(function(o){r[o.toLowerCase()]=t[o]}),r}var n=Object.create(null);Object.keys(Object(t)).forEach(function(o){n[o.toLowerCase()]={originalName:o,value:t[o]}});var i=Object.create(null);return Object.keys(n).forEach(function(o){i[n[o].originalName]=n[o].value}),i}var Lwe=function(t){if(!t&&typeof fetch>"u")throw fo(37)},Qwe=function(t,e){var r=t.getContext(),n=r.uri;return n||(typeof e=="function"?e(t):e||"/graphql")};function Vwe(t,e){var r=[],n=function(p,g){r.push("".concat(p,"=").concat(encodeURIComponent(g)))};if("query"in e&&n("query",e.query),e.operationName&&n("operationName",e.operationName),e.variables){var i=void 0;try{i=SR(e.variables,"Variables map")}catch(p){return{parseError:p}}n("variables",i)}if(e.extensions){var o=void 0;try{o=SR(e.extensions,"Extensions map")}catch(p){return{parseError:p}}n("extensions",o)}var a="",s=t,l=t.indexOf("#");l!==-1&&(a=t.substr(l),s=t.substr(0,l));var c=s.indexOf("?")===-1?"?":"&",d=s+c+r.join("&")+a;return{newURI:d}}var _Q=ds(function(){return fetch}),$H=function(t){t===void 0&&(t={});var e=t.uri,r=e===void 0?"/graphql":e,n=t.fetch,i=t.print,o=i===void 0?Nwe:i,a=t.includeExtensions,s=t.preserveHeaderCase,l=t.useGETForQueries,c=t.includeUnusedVariables,d=c===void 0?!1:c,p=pc(t,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);globalThis.__DEV__!==!1&&Lwe(n||_Q);var g={http:{includeExtensions:a,preserveHeaderCase:s},options:p.fetchOptions,credentials:p.credentials,headers:p.headers};return new Cc(function(m){var y=Qwe(m,r),b=m.getContext(),O={};if(b.clientAwareness){var S=b.clientAwareness,w=S.name,k=S.version;w&&(O["apollographql-client-name"]=w),k&&(O["apollographql-client-version"]=k)}var T=ge(ge({},O),b.headers),C={http:b.http,options:b.fetchOptions,credentials:b.credentials,headers:T};if(cy(["client"],m.query)){var E=xH(m.query);if(!E)return RT(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));m.query=E}var _=jwe(m,o,Mwe,g,C),$=_.options,M=_.body;M.variables&&!d&&(M.variables=fwe(M.variables,m.query));var j;!$.signal&&typeof AbortController<"u"&&(j=new AbortController,$.signal=j.signal);var B=function(ne){return ne.kind==="OperationDefinition"&&ne.operation==="mutation"},V=function(ne){return ne.kind==="OperationDefinition"&&ne.operation==="subscription"},X=V($b(m.query)),D=cy(["defer"],m.query);if(l&&!m.query.definitions.some(B)&&($.method="GET"),D||X){$.headers=$.headers||{};var F="multipart/mixed;";X&&D&&globalThis.__DEV__!==!1&&xt.warn(38),X?F+="boundary=graphql;subscriptionSpec=1.0,application/json":D&&(F+="deferSpec=20220824,application/json"),$.headers.accept=F}if($.method==="GET"){var Y=Vwe(y,M),ie=Y.newURI,H=Y.parseError;if(H)return RT(H);y=ie}else try{$.body=SR(M,"Payload")}catch(ne){return RT(ne)}return new Nr(function(ne){var z=n||ds(function(){return fetch})||_Q,N=ne.next.bind(ne);return z(y,$).then(function(U){var J;m.setContext({response:U});var Q=(J=U.headers)===null||J===void 0?void 0:J.get("content-type");return Q!==null&&/^multipart\/mixed/i.test(Q)?Twe(U,N):Rwe(m)(U).then(N)}).then(function(){j=void 0,ne.complete()}).catch(function(U){j=void 0,_we(U,ne)}),function(){j&&j.abort()}})})},Fwe=function(t){Ts(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,$H(r).request)||this;return n.options=r,n}return e}(Cc);const{toString:RQ,hasOwnProperty:Bwe}=Object.prototype,IQ=Function.prototype.toString,xR=new Map;function hn(t,e){try{return PR(t,e)}finally{xR.clear()}}function PR(t,e){if(t===e)return!0;const r=RQ.call(t),n=RQ.call(e);if(r!==n)return!1;switch(r){case"[object Array]":if(t.length!==e.length)return!1;case"[object Object]":{if(AQ(t,e))return!0;const i=$Q(t),o=$Q(e),a=i.length;if(a!==o.length)return!1;for(let s=0;s<a;++s)if(!Bwe.call(e,i[s]))return!1;for(let s=0;s<a;++s){const l=i[s];if(!PR(t[l],e[l]))return!1}return!0}case"[object Error]":return t.name===e.name&&t.message===e.message;case"[object Number]":if(t!==t)return e!==e;case"[object Boolean]":case"[object Date]":return+t==+e;case"[object RegExp]":case"[object String]":return t==`${e}`;case"[object Map]":case"[object Set]":{if(t.size!==e.size)return!1;if(AQ(t,e))return!0;const i=t.entries(),o=r==="[object Map]";for(;;){const a=i.next();if(a.done)break;const[s,l]=a.value;if(!e.has(s)||o&&!PR(l,e.get(s)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":t=new Uint8Array(t),e=new Uint8Array(e);case"[object DataView]":{let i=t.byteLength;if(i===e.byteLength)for(;i--&&t[i]===e[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=IQ.call(t);return i!==IQ.call(e)?!1:!Wwe(i,qwe)}}return!1}function $Q(t){return Object.keys(t).filter(zwe,t)}function zwe(t){return this[t]!==void 0}const qwe="{ [native code] }";function Wwe(t,e){const r=t.length-e.length;return r>=0&&t.indexOf(e,r)===r}function AQ(t,e){let r=xR.get(t);if(r){if(r.has(e))return!0}else xR.set(t,r=new Set);return r.add(e),!1}function AH(t,e,r,n){var i=e.data,o=pc(e,["data"]),a=r.data,s=pc(r,["data"]);return hn(o,s)&&b1($b(t).selectionSet,i,a,{fragmentMap:oP(lP(t)),variables:n})}function b1(t,e,r,n){if(e===r)return!0;var i=new Set;return t.selections.every(function(o){if(i.has(o)||(i.add(o),!_b(o,n.variables))||MQ(o))return!0;if(Nu(o)){var a=Mu(o),s=e&&e[a],l=r&&r[a],c=o.selectionSet;if(!c)return hn(s,l);var d=Array.isArray(s),p=Array.isArray(l);if(d!==p)return!1;if(d&&p){var g=s.length;if(l.length!==g)return!1;for(var m=0;m<g;++m)if(!b1(c,s[m],l[m],n))return!1;return!0}return b1(c,s,l,n)}else{var y=aP(o,n.fragmentMap);if(y)return MQ(y)?!0:b1(y.selectionSet,e,r,n)}})}function MQ(t){return!!t.directives&&t.directives.some(Uwe)}function Uwe(t){return t.name.value==="nonreactive"}var MH=function(){function t(){this.assumeImmutableResults=!1,this.getFragmentDoc=dy(G0e,{max:mc["cache.fragmentQueryDocuments"]||1e3,cache:fS})}return t.prototype.batch=function(e){var r=this,n=typeof e.optimistic=="string"?e.optimistic:e.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=e.update(r)},n),i},t.prototype.recordOptimisticTransaction=function(e,r){this.performTransaction(e,r)},t.prototype.transformDocument=function(e){return e},t.prototype.transformForLink=function(e){return e},t.prototype.identify=function(e){},t.prototype.gc=function(){return[]},t.prototype.modify=function(e){return!1},t.prototype.readQuery=function(e,r){return r===void 0&&(r=!!e.optimistic),this.read(ge(ge({},e),{rootId:e.id||"ROOT_QUERY",optimistic:r}))},t.prototype.watchFragment=function(e){var r=this,n=e.fragment,i=e.fragmentName,o=e.from,a=e.optimistic,s=a===void 0?!0:a,l=this.getFragmentDoc(n,i),c={returnPartialData:!0,id:typeof o=="string"?o:this.identify(o),query:l,optimistic:s},d;return new Nr(function(p){return r.watch(ge(ge({},c),{immediate:!0,callback:function(g){if(!(d&&AH(l,{data:d==null?void 0:d.result},{data:g.result}))){var m={data:g.result,complete:!!g.complete};g.missing&&(m.missing=fP(g.missing.map(function(y){return y.missing}))),d=g,p.next(m)}}}))})},t.prototype.readFragment=function(e,r){return r===void 0&&(r=!!e.optimistic),this.read(ge(ge({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:r}))},t.prototype.writeQuery=function(e){var r=e.id,n=e.data,i=pc(e,["id","data"]);return this.write(Object.assign(i,{dataId:r||"ROOT_QUERY",result:n}))},t.prototype.writeFragment=function(e){var r=e.id,n=e.data,i=e.fragment,o=e.fragmentName,a=pc(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:r,result:n}))},t.prototype.updateQuery=function(e,r){return this.batch({update:function(n){var i=n.readQuery(e),o=r(i);return o==null?i:(n.writeQuery(ge(ge({},e),{data:o})),o)}})},t.prototype.updateFragment=function(e,r){return this.batch({update:function(n){var i=n.readFragment(e),o=r(i);return o==null?i:(n.writeFragment(ge(ge({},e),{data:o})),o)}})},t}();globalThis.__DEV__!==!1&&(MH.prototype.getMemoryInternals=sOe);var NH=function(t){Ts(e,t);function e(r,n,i,o){var a,s=t.call(this,r)||this;if(s.message=r,s.path=n,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var l=s.path.length-1;l>=0;--l)s.missing=(a={},a[s.path[l]]=s.missing,a)}else s.missing=s.path;return s.__proto__=e.prototype,s}return e}(Error),Oi=Object.prototype.hasOwnProperty;function $m(t){return t==null}function jH(t,e){var r=t.__typename,n=t.id,i=t._id;if(typeof r=="string"&&(e&&(e.keyObject=$m(n)?$m(i)?void 0:{_id:i}:{id:n}),$m(n)&&!$m(i)&&(n=i),!$m(n)))return"".concat(r,":").concat(typeof n=="number"||typeof n=="string"?n:JSON.stringify(n))}var DH={dataIdFromObject:jH,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Hwe(t){return Ip(DH,t)}function LH(t){var e=t.canonizeResults;return e===void 0?DH.canonizeResults:e}function Xwe(t,e){return kr(e)?t.get(e.__ref,"__typename"):e&&e.__typename}var QH=/^[_a-z][_0-9a-z]*/i;function Lu(t){var e=t.match(QH);return e?e[0]:t}function kR(t,e,r){return Nn(e)?jn(e)?e.every(function(n){return kR(t,n,r)}):t.selections.every(function(n){if(Nu(n)&&_b(n,r)){var i=Mu(n);return Oi.call(e,i)&&(!n.selectionSet||kR(n.selectionSet,e[i],r))}return!0}):!1}function ep(t){return Nn(t)&&!kr(t)&&!jn(t)}function Zwe(){return new Du}function VH(t,e){var r=oP(lP(t));return{fragmentMap:r,lookupFragment:function(n){var i=r[n];return!i&&e&&(i=e.lookup(n)),i||null}}}var O1=Object.create(null),IT=function(){return O1},NQ=Object.create(null),fy=function(){function t(e,r){var n=this;this.policies=e,this.group=r,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,o){return bR(kr(i)?n.get(i.__ref,o):i&&i[o])},this.canRead=function(i){return kr(i)?n.has(i.__ref):typeof i=="object"},this.toReference=function(i,o){if(typeof i=="string")return lp(i);if(kr(i))return i;var a=n.policies.identify(i)[0];if(a){var s=lp(a);return o&&n.merge(a,i),s}}}return t.prototype.toObject=function(){return ge({},this.data)},t.prototype.has=function(e){return this.lookup(e,!0)!==void 0},t.prototype.get=function(e,r){if(this.group.depend(e,r),Oi.call(this.data,e)){var n=this.data[e];if(n&&Oi.call(n,r))return n[r]}if(r==="__typename"&&Oi.call(this.policies.rootTypenamesById,e))return this.policies.rootTypenamesById[e];if(this instanceof iu)return this.parent.get(e,r)},t.prototype.lookup=function(e,r){if(r&&this.group.depend(e,"__exists"),Oi.call(this.data,e))return this.data[e];if(this instanceof iu)return this.parent.lookup(e,r);if(this.policies.rootTypenamesById[e])return Object.create(null)},t.prototype.merge=function(e,r){var n=this,i;kr(e)&&(e=e.__ref),kr(r)&&(r=r.__ref);var o=typeof e=="string"?this.lookup(i=e):e,a=typeof r=="string"?this.lookup(i=r):r;if(a){xt(typeof i=="string",1);var s=new Du(Ywe).merge(o,a);if(this.data[i]=s,s!==o&&(delete this.refs[i],this.group.caching)){var l=Object.create(null);o||(l.__exists=1),Object.keys(a).forEach(function(c){if(!o||o[c]!==s[c]){l[c]=1;var d=Lu(c);d!==c&&!n.policies.hasKeyArgs(s.__typename,d)&&(l[d]=1),s[c]===void 0&&!(n instanceof iu)&&delete s[c]}}),l.__typename&&!(o&&o.__typename)&&this.policies.rootTypenamesById[i]===s.__typename&&delete l.__typename,Object.keys(l).forEach(function(c){return n.group.dirty(i,c)})}}},t.prototype.modify=function(e,r){var n=this,i=this.lookup(e);if(i){var o=Object.create(null),a=!1,s=!0,l={DELETE:O1,INVALIDATE:NQ,isReference:kr,toReference:this.toReference,canRead:this.canRead,readField:function(c,d){return n.policies.readField(typeof c=="string"?{fieldName:c,from:d||lp(e)}:c,{store:n})}};if(Object.keys(i).forEach(function(c){var d=Lu(c),p=i[c];if(p!==void 0){var g=typeof r=="function"?r:r[c]||r[d];if(g){var m=g===IT?O1:g(bR(p),ge(ge({},l),{fieldName:d,storeFieldName:c,storage:n.getStorage(e,c)}));if(m===NQ)n.group.dirty(e,c);else if(m===O1&&(m=void 0),m!==p&&(o[c]=m,a=!0,p=m,globalThis.__DEV__!==!1)){var y=function(C){if(n.lookup(C.__ref)===void 0)return globalThis.__DEV__!==!1&&xt.warn(2,C),!0};if(kr(m))y(m);else if(Array.isArray(m))for(var b=!1,O=void 0,S=0,w=m;S<w.length;S++){var k=w[S];if(kr(k)){if(b=!0,y(k))break}else if(typeof k=="object"&&k){var T=n.policies.identify(k)[0];T&&(O=k)}if(b&&O!==void 0){globalThis.__DEV__!==!1&&xt.warn(3,O);break}}}}p!==void 0&&(s=!1)}}),a)return this.merge(e,o),s&&(this instanceof iu?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},t.prototype.delete=function(e,r,n){var i,o=this.lookup(e);if(o){var a=this.getFieldValue(o,"__typename"),s=r&&n?this.policies.getStoreFieldName({typename:a,fieldName:r,args:n}):r;return this.modify(e,s?(i={},i[s]=IT,i):IT)}return!1},t.prototype.evict=function(e,r){var n=!1;return e.id&&(Oi.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof iu&&this!==r&&(n=this.parent.evict(e,r)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},t.prototype.clear=function(){this.replace(null)},t.prototype.extract=function(){var e=this,r=this.toObject(),n=[];return this.getRootIdSet().forEach(function(i){Oi.call(e.policies.rootTypenamesById,i)||n.push(i)}),n.length&&(r.__META={extraRootIds:n.sort()}),r},t.prototype.replace=function(e){var r=this;if(Object.keys(this.data).forEach(function(o){e&&Oi.call(e,o)||r.delete(o)}),e){var n=e.__META,i=pc(e,["__META"]);Object.keys(i).forEach(function(o){r.merge(o,i[o])}),n&&n.extraRootIds.forEach(this.retain,this)}},t.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},t.prototype.release=function(e){if(this.rootIds[e]>0){var r=--this.rootIds[e];return r||delete this.rootIds[e],r}return 0},t.prototype.getRootIdSet=function(e){return e===void 0&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof iu?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},t.prototype.gc=function(){var e=this,r=this.getRootIdSet(),n=this.toObject();r.forEach(function(a){Oi.call(n,a)&&(Object.keys(e.findChildRefIds(a)).forEach(r.add,r),delete n[a])});var i=Object.keys(n);if(i.length){for(var o=this;o instanceof iu;)o=o.parent;i.forEach(function(a){return o.delete(a)})}return i},t.prototype.findChildRefIds=function(e){if(!Oi.call(this.refs,e)){var r=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return r;var i=new Set([n]);i.forEach(function(o){kr(o)&&(r[o.__ref]=!0),Nn(o)&&Object.keys(o).forEach(function(a){var s=o[a];Nn(s)&&i.add(s)})})}return this.refs[e]},t.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},t}(),FH=function(){function t(e,r){r===void 0&&(r=null),this.caching=e,this.parent=r,this.d=null,this.resetCaching()}return t.prototype.resetCaching=function(){this.d=this.caching?bH():null,this.keyMaker=new hg(pg)},t.prototype.depend=function(e,r){if(this.d){this.d($T(e,r));var n=Lu(r);n!==r&&this.d($T(e,n)),this.parent&&this.parent.depend(e,r)}},t.prototype.dirty=function(e,r){this.d&&this.d.dirty($T(e,r),r==="__exists"?"forget":"setDirty")},t}();function $T(t,e){return e+"#"+t}function jQ(t,e){Tv(t)&&t.group.depend(e,"__exists")}(function(t){var e=function(r){Ts(n,r);function n(i){var o=i.policies,a=i.resultCaching,s=a===void 0?!0:a,l=i.seed,c=r.call(this,o,new FH(s))||this;return c.stump=new Gwe(c),c.storageTrie=new hg(pg),l&&c.replace(l),c}return n.prototype.addLayer=function(i,o){return this.stump.addLayer(i,o)},n.prototype.removeLayer=function(){return this},n.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},n}(t);t.Root=e})(fy||(fy={}));var iu=function(t){Ts(e,t);function e(r,n,i,o){var a=t.call(this,n.policies,o)||this;return a.id=r,a.parent=n,a.replay=i,a.group=o,i(a),a}return e.prototype.addLayer=function(r,n){return new e(r,this,n,this.group)},e.prototype.removeLayer=function(r){var n=this,i=this.parent.removeLayer(r);return r===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(o){var a=n.data[o],s=i.lookup(o);s?a?a!==s&&Object.keys(a).forEach(function(l){hn(a[l],s[l])||n.group.dirty(o,l)}):(n.group.dirty(o,"__exists"),Object.keys(s).forEach(function(l){n.group.dirty(o,l)})):n.delete(o)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},e.prototype.toObject=function(){return ge(ge({},this.parent.toObject()),this.data)},e.prototype.findChildRefIds=function(r){var n=this.parent.findChildRefIds(r);return Oi.call(this.data,r)?ge(ge({},n),t.prototype.findChildRefIds.call(this,r)):n},e.prototype.getStorage=function(){for(var r=this.parent;r.parent;)r=r.parent;return r.getStorage.apply(r,arguments)},e}(fy),Gwe=function(t){Ts(e,t);function e(r){return t.call(this,"EntityStore.Stump",r,function(){},new FH(r.group.caching,r.group))||this}return e.prototype.removeLayer=function(){return this},e.prototype.merge=function(r,n){return this.parent.merge(r,n)},e}(iu);function Ywe(t,e,r){var n=t[r],i=e[r];return hn(n,i)?n:i}function Tv(t){return!!(t instanceof fy&&t.group.caching)}function Kwe(t){return Nn(t)?jn(t)?t.slice(0):ge({__proto__:Object.getPrototypeOf(t)},t):t}var DQ=function(){function t(){this.known=new(eH?WeakSet:Set),this.pool=new hg(pg),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return t.prototype.isKnown=function(e){return Nn(e)&&this.known.has(e)},t.prototype.pass=function(e){if(Nn(e)){var r=Kwe(e);return this.passes.set(r,e),r}return e},t.prototype.admit=function(e){var r=this;if(Nn(e)){var n=this.passes.get(e);if(n)return n;var i=Object.getPrototypeOf(e);switch(i){case Array.prototype:{if(this.known.has(e))return e;var o=e.map(this.admit,this),a=this.pool.lookupArray(o);return a.array||(this.known.add(a.array=o),globalThis.__DEV__!==!1&&Object.freeze(o)),a.array}case null:case Object.prototype:{if(this.known.has(e))return e;var s=Object.getPrototypeOf(e),l=[s],c=this.sortedKeys(e);l.push(c.json);var d=l.length;c.sorted.forEach(function(m){l.push(r.admit(e[m]))});var a=this.pool.lookupArray(l);if(!a.object){var p=a.object=Object.create(s);this.known.add(p),c.sorted.forEach(function(m,y){p[m]=l[d+y]}),globalThis.__DEV__!==!1&&Object.freeze(p)}return a.object}}}return e},t.prototype.sortedKeys=function(e){var r=Object.keys(e),n=this.pool.lookupArray(r);if(!n.keys){r.sort();var i=JSON.stringify(r);(n.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,n.keys={sorted:r,json:i})}return n.keys},t}();function LQ(t){return[t.selectionSet,t.objectOrReference,t.context,t.context.canonizeResults]}var Jwe=function(){function t(e){var r=this;this.knownResults=new(pg?WeakMap:Map),this.config=Ip(e,{addTypename:e.addTypename!==!1,canonizeResults:LH(e)}),this.canon=e.canon||new DQ,this.executeSelectionSet=dy(function(n){var i,o=n.context.canonizeResults,a=LQ(n);a[3]=!o;var s=(i=r.executeSelectionSet).peek.apply(i,a);return s?o?ge(ge({},s),{result:r.canon.admit(s.result)}):s:(jQ(n.context.store,n.enclosingRef.__ref),r.execSelectionSetImpl(n))},{max:this.config.resultCacheMaxSize||mc["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:LQ,makeCacheKey:function(n,i,o,a){if(Tv(o.store))return o.store.makeCacheKey(n,kr(i)?i.__ref:i,o.varString,a)}}),this.executeSubSelectedArray=dy(function(n){return jQ(n.context.store,n.enclosingRef.__ref),r.execSubSelectedArrayImpl(n)},{max:this.config.resultCacheMaxSize||mc["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(n){var i=n.field,o=n.array,a=n.context;if(Tv(a.store))return a.store.makeCacheKey(i,o,a.varString)}})}return t.prototype.resetCanon=function(){this.canon=new DQ},t.prototype.diffQueryAgainstStore=function(e){var r=e.store,n=e.query,i=e.rootId,o=i===void 0?"ROOT_QUERY":i,a=e.variables,s=e.returnPartialData,l=s===void 0?!0:s,c=e.canonizeResults,d=c===void 0?this.config.canonizeResults:c,p=this.config.cache.policies;a=ge(ge({},I2(lH(n))),a);var g=lp(o),m=this.executeSelectionSet({selectionSet:$b(n).selectionSet,objectOrReference:g,enclosingRef:g,context:ge({store:r,query:n,policies:p,variables:a,varString:Su(a),canonizeResults:d},VH(n,this.config.fragments))}),y;if(m.missing&&(y=[new NH(e1e(m.missing),m.missing,n,a)],!l))throw y[0];return{result:m.result,complete:!y,missing:y}},t.prototype.isFresh=function(e,r,n,i){if(Tv(i.store)&&this.knownResults.get(e)===n){var o=this.executeSelectionSet.peek(n,r,i,this.canon.isKnown(e));if(o&&e===o.result)return!0}return!1},t.prototype.execSelectionSetImpl=function(e){var r=this,n=e.selectionSet,i=e.objectOrReference,o=e.enclosingRef,a=e.context;if(kr(i)&&!a.policies.rootTypenamesById[i.__ref]&&!a.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=a.variables,l=a.policies,c=a.store,d=c.getFieldValue(i,"__typename"),p=[],g,m=new Du;this.config.addTypename&&typeof d=="string"&&!l.rootIdsByTypename[d]&&p.push({__typename:d});function y(k,T){var C;return k.missing&&(g=m.merge(g,(C={},C[T]=k.missing,C))),k.result}var b=new Set(n.selections);b.forEach(function(k){var T,C;if(_b(k,s))if(Nu(k)){var E=l.readField({fieldName:k.name.value,field:k,variables:a.variables,from:i},a),_=Mu(k);E===void 0?D2.added(k)||(g=m.merge(g,(T={},T[_]="Can't find field '".concat(k.name.value,"' on ").concat(kr(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),T))):jn(E)?E.length>0&&(E=y(r.executeSubSelectedArray({field:k,array:E,enclosingRef:o,context:a}),_)):k.selectionSet?E!=null&&(E=y(r.executeSelectionSet({selectionSet:k.selectionSet,objectOrReference:E,enclosingRef:kr(E)?E:o,context:a}),_)):a.canonizeResults&&(E=r.canon.pass(E)),E!==void 0&&p.push((C={},C[_]=E,C))}else{var $=aP(k,a.lookupFragment);if(!$&&k.kind===Ye.FRAGMENT_SPREAD)throw fo(9,k.name.value);$&&l.fragmentMatches($,d)&&$.selectionSet.selections.forEach(b.add,b)}});var O=fP(p),S={result:O,missing:g},w=a.canonizeResults?this.canon.admit(S):bR(S);return w.result&&this.knownResults.set(w.result,n),w},t.prototype.execSubSelectedArrayImpl=function(e){var r=this,n=e.field,i=e.array,o=e.enclosingRef,a=e.context,s,l=new Du;function c(d,p){var g;return d.missing&&(s=l.merge(s,(g={},g[p]=d.missing,g))),d.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(d,p){return d===null?null:jn(d)?c(r.executeSubSelectedArray({field:n,array:d,enclosingRef:o,context:a}),p):n.selectionSet?c(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:d,enclosingRef:kr(d)?d:o,context:a}),p):(globalThis.__DEV__!==!1&&t1e(a.store,n,d),d)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:s}},t}();function e1e(t){try{JSON.stringify(t,function(e,r){if(typeof r=="string")throw r;return r})}catch(e){return e}}function t1e(t,e,r){if(!e.selectionSet){var n=new Set([r]);n.forEach(function(i){Nn(i)&&(xt(!kr(i),10,Xwe(t,i),e.name.value),Object.values(i).forEach(n.add,n))})}}var z2=new A2,QQ=new WeakMap;function Ev(t){var e=QQ.get(t);return e||QQ.set(t,e={vars:new Set,dep:bH()}),e}function VQ(t){Ev(t).vars.forEach(function(e){return e.forgetCache(t)})}function r1e(t){Ev(t).vars.forEach(function(e){return e.attachCache(t)})}function n1e(t){var e=new Set,r=new Set,n=function(o){if(arguments.length>0){if(t!==o){t=o,e.forEach(function(l){Ev(l).dep.dirty(n),i1e(l)});var a=Array.from(r);r.clear(),a.forEach(function(l){return l(t)})}}else{var s=z2.getValue();s&&(i(s),Ev(s).dep(n))}return t};n.onNextChange=function(o){return r.add(o),function(){r.delete(o)}};var i=n.attachCache=function(o){return e.add(o),Ev(o).vars.add(n),n};return n.forgetCache=function(o){return e.delete(o)},n}function i1e(t){t.broadcastWatches&&t.broadcastWatches()}var FQ=Object.create(null);function q2(t){var e=JSON.stringify(t);return FQ[e]||(FQ[e]=Object.create(null))}function BQ(t){var e=q2(t);return e.keyFieldsFn||(e.keyFieldsFn=function(r,n){var i=function(a,s){return n.readField(s,a)},o=n.keyObject=W2(t,function(a){var s=up(n.storeObject,a,i);return s===void 0&&r!==n.storeObject&&Oi.call(r,a[0])&&(s=up(r,a,zH)),xt(s!==void 0,4,a.join("."),r),s});return"".concat(n.typename,":").concat(JSON.stringify(o))})}function zQ(t){var e=q2(t);return e.keyArgsFn||(e.keyArgsFn=function(r,n){var i=n.field,o=n.variables,a=n.fieldName,s=W2(t,function(c){var d=c[0],p=d.charAt(0);if(p==="@"){if(i&&fl(i.directives)){var g=d.slice(1),m=i.directives.find(function(S){return S.name.value===g}),y=m&&sP(m,o);return y&&up(y,c.slice(1))}return}if(p==="$"){var b=d.slice(1);if(o&&Oi.call(o,b)){var O=c.slice(0);return O[0]=b,up(o,O)}return}if(r)return up(r,c)}),l=JSON.stringify(s);return(r||l!=="{}")&&(a+=":"+l),a})}function W2(t,e){var r=new Du;return BH(t).reduce(function(n,i){var o,a=e(i);if(a!==void 0){for(var s=i.length-1;s>=0;--s)a=(o={},o[i[s]]=a,o);n=r.merge(n,a)}return n},Object.create(null))}function BH(t){var e=q2(t);if(!e.paths){var r=e.paths=[],n=[];t.forEach(function(i,o){jn(i)?(BH(i).forEach(function(a){return r.push(n.concat(a))}),n.length=0):(n.push(i),jn(t[o+1])||(r.push(n.slice(0)),n.length=0))})}return e.paths}function zH(t,e){return t[e]}function up(t,e,r){return r=r||zH,qH(e.reduce(function n(i,o){return jn(i)?i.map(function(a){return n(a,o)}):i&&r(i,o)},t))}function qH(t){return Nn(t)?jn(t)?t.map(qH):W2(Object.keys(t).sort(),function(e){return up(t,e)}):t}function CR(t){return t.args!==void 0?t.args:t.field?sP(t.field,t.variables):null}var o1e=function(){},qQ=function(t,e){return e.fieldName},WQ=function(t,e,r){var n=r.mergeObjects;return n(t,e)},UQ=function(t,e){return e},a1e=function(){function t(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=ge({dataIdFromObject:jH},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return t.prototype.identify=function(e,r){var n,i=this,o=r&&(r.typename||((n=r.storeObject)===null||n===void 0?void 0:n.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a=r&&r.storeObject||e,s=ge(ge({},r),{typename:o,storeObject:a,readField:r&&r.readField||function(){var g=U2(arguments,a);return i.readField(g,{store:i.cache.data,variables:g.variables})}}),l,c=o&&this.getTypePolicy(o),d=c&&c.keyFn||this.config.dataIdFromObject;d;){var p=d(ge(ge({},e),a),s);if(jn(p))d=BQ(p);else{l=p;break}}return l=l?String(l):void 0,s.keyObject?[l,s.keyObject]:[l]},t.prototype.addTypePolicies=function(e){var r=this;Object.keys(e).forEach(function(n){var i=e[n],o=i.queryType,a=i.mutationType,s=i.subscriptionType,l=pc(i,["queryType","mutationType","subscriptionType"]);o&&r.setRootTypename("Query",n),a&&r.setRootTypename("Mutation",n),s&&r.setRootTypename("Subscription",n),Oi.call(r.toBeAdded,n)?r.toBeAdded[n].push(l):r.toBeAdded[n]=[l]})},t.prototype.updateTypePolicy=function(e,r){var n=this,i=this.getTypePolicy(e),o=r.keyFields,a=r.fields;function s(l,c){l.merge=typeof c=="function"?c:c===!0?WQ:c===!1?UQ:l.merge}s(i,r.merge),i.keyFn=o===!1?o1e:jn(o)?BQ(o):typeof o=="function"?o:i.keyFn,a&&Object.keys(a).forEach(function(l){var c=n.getFieldPolicy(e,l,!0),d=a[l];if(typeof d=="function")c.read=d;else{var p=d.keyArgs,g=d.read,m=d.merge;c.keyFn=p===!1?qQ:jn(p)?zQ(p):typeof p=="function"?p:c.keyFn,typeof g=="function"&&(c.read=g),s(c,m)}c.read&&c.merge&&(c.keyFn=c.keyFn||qQ)})},t.prototype.setRootTypename=function(e,r){r===void 0&&(r=e);var n="ROOT_"+e.toUpperCase(),i=this.rootTypenamesById[n];r!==i&&(xt(!i||i===e,5,e),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[r]=n,this.rootTypenamesById[n]=r)},t.prototype.addPossibleTypes=function(e){var r=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(n){r.getSupertypeSet(n,!0),e[n].forEach(function(i){r.getSupertypeSet(i,!0).add(n);var o=i.match(QH);(!o||o[0]!==i)&&r.fuzzySubtypes.set(i,new RegExp(i))})})},t.prototype.getTypePolicy=function(e){var r=this;if(!Oi.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(e);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach(function(a,s){if(a.test(e)){var l=r.supertypeMap.get(s);l&&l.forEach(function(c){return i.add(c)})}})),i&&i.size&&i.forEach(function(a){var s=r.getTypePolicy(a),l=s.fields,c=pc(s,["fields"]);Object.assign(n,c),Object.assign(n.fields,l)})}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach(function(a){r.updateTypePolicy(e,a)}),this.typePolicies[e]},t.prototype.getFieldPolicy=function(e,r,n){if(e){var i=this.getTypePolicy(e).fields;return i[r]||n&&(i[r]=Object.create(null))}},t.prototype.getSupertypeSet=function(e,r){var n=this.supertypeMap.get(e);return!n&&r&&this.supertypeMap.set(e,n=new Set),n},t.prototype.fragmentMatches=function(e,r,n,i){var o=this;if(!e.typeCondition)return!0;if(!r)return!1;var a=e.typeCondition.name.value;if(r===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var s=this.getSupertypeSet(r,!0),l=[s],c=function(y){var b=o.getSupertypeSet(y,!1);b&&b.size&&l.indexOf(b)<0&&l.push(b)},d=!!(n&&this.fuzzySubtypes.size),p=!1,g=0;g<l.length;++g){var m=l[g];if(m.has(a))return s.has(a)||(p&&globalThis.__DEV__!==!1&&xt.warn(6,r,a),s.add(a)),!0;m.forEach(c),d&&g===l.length-1&&kR(e.selectionSet,n,i)&&(d=!1,p=!0,this.fuzzySubtypes.forEach(function(y,b){var O=r.match(y);O&&O[0]===r&&c(b)}))}return!1},t.prototype.hasKeyArgs=function(e,r){var n=this.getFieldPolicy(e,r,!1);return!!(n&&n.keyFn)},t.prototype.getStoreFieldName=function(e){var r=e.typename,n=e.fieldName,i=this.getFieldPolicy(r,n,!1),o,a=i&&i.keyFn;if(a&&r)for(var s={typename:r,fieldName:n,field:e.field||null,variables:e.variables},l=CR(e);a;){var c=a(l,s);if(jn(c))a=zQ(c);else{o=c||n;break}}return o===void 0&&(o=e.field?POe(e.field,e.variables):sH(n,CR(e))),o===!1?n:n===Lu(o)?o:n+":"+o},t.prototype.readField=function(e,r){var n=e.from;if(n){var i=e.field||e.fieldName;if(i){if(e.typename===void 0){var o=r.store.getFieldValue(n,"__typename");o&&(e.typename=o)}var a=this.getStoreFieldName(e),s=Lu(a),l=r.store.getFieldValue(n,a),c=this.getFieldPolicy(e.typename,s,!1),d=c&&c.read;if(d){var p=HQ(this,n,e,r,r.store.getStorage(kr(n)?n.__ref:n,a));return z2.withValue(this.cache,d,[l,p])}return l}}},t.prototype.getReadFunction=function(e,r){var n=this.getFieldPolicy(e,r,!1);return n&&n.read},t.prototype.getMergeFunction=function(e,r,n){var i=this.getFieldPolicy(e,r,!1),o=i&&i.merge;return!o&&n&&(i=this.getTypePolicy(n),o=i&&i.merge),o},t.prototype.runMergeFunction=function(e,r,n,i,o){var a=n.field,s=n.typename,l=n.merge;return l===WQ?WH(i.store)(e,r):l===UQ?r:(i.overwrite&&(e=void 0),l(e,r,HQ(this,void 0,{typename:s,fieldName:a.name.value,field:a,variables:i.variables},i,o||Object.create(null))))},t}();function HQ(t,e,r,n,i){var o=t.getStoreFieldName(r),a=Lu(o),s=r.variables||n.variables,l=n.store,c=l.toReference,d=l.canRead;return{args:CR(r),field:r.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:kr,toReference:c,storage:i,cache:t.cache,canRead:d,readField:function(){return t.readField(U2(arguments,e,s),n)},mergeObjects:WH(n.store)}}function U2(t,e,r){var n=t[0],i=t[1],o=t.length,a;return typeof n=="string"?a={fieldName:n,from:o>1?i:e}:(a=ge({},n),Oi.call(a,"from")||(a.from=e)),globalThis.__DEV__!==!1&&a.from===void 0&&globalThis.__DEV__!==!1&&xt.warn(7,VU(Array.from(t))),a.variables===void 0&&(a.variables=r),a}function WH(t){return function(r,n){if(jn(r)||jn(n))throw fo(8);if(Nn(r)&&Nn(n)){var i=t.getFieldValue(r,"__typename"),o=t.getFieldValue(n,"__typename"),a=i&&o&&i!==o;if(a)return n;if(kr(r)&&ep(n))return t.merge(r.__ref,n),r;if(ep(r)&&kr(n))return t.merge(r,n.__ref),n;if(ep(r)&&ep(n))return ge(ge({},r),n)}return n}}function AT(t,e,r){var n="".concat(e).concat(r),i=t.flavors.get(n);return i||t.flavors.set(n,i=t.clientOnly===e&&t.deferred===r?t:ge(ge({},t),{clientOnly:e,deferred:r})),i}var s1e=function(){function t(e,r,n){this.cache=e,this.reader=r,this.fragments=n}return t.prototype.writeToStore=function(e,r){var n=this,i=r.query,o=r.result,a=r.dataId,s=r.variables,l=r.overwrite,c=Ib(i),d=Zwe();s=ge(ge({},I2(c)),s);var p=ge(ge({store:e,written:Object.create(null),merge:function(m,y){return d.merge(m,y)},variables:s,varString:Su(s)},VH(i,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),g=this.processSelectionSet({result:o||Object.create(null),dataId:a,selectionSet:c.selectionSet,mergeTree:{map:new Map},context:p});if(!kr(g))throw fo(11,o);return p.incomingById.forEach(function(m,y){var b=m.storeObject,O=m.mergeTree,S=m.fieldNodeSet,w=lp(y);if(O&&O.map.size){var k=n.applyMerges(O,w,b,p);if(kr(k))return;b=k}if(globalThis.__DEV__!==!1&&!p.overwrite){var T=Object.create(null);S.forEach(function(_){_.selectionSet&&(T[_.name.value]=!0)});var C=function(_){return T[Lu(_)]===!0},E=function(_){var $=O&&O.map.get(_);return!!($&&$.info&&$.info.merge)};Object.keys(b).forEach(function(_){C(_)&&!E(_)&&l1e(w,b,_,p.store)})}e.merge(y,b)}),e.retain(g.__ref),g},t.prototype.processSelectionSet=function(e){var r=this,n=e.dataId,i=e.result,o=e.selectionSet,a=e.context,s=e.mergeTree,l=this.cache.policies,c=Object.create(null),d=n&&l.rootTypenamesById[n]||pR(i,o,a.fragmentMap)||n&&a.store.get(n,"__typename");typeof d=="string"&&(c.__typename=d);var p=function(){var k=U2(arguments,c,a.variables);if(kr(k.from)){var T=a.incomingById.get(k.from.__ref);if(T){var C=l.readField(ge(ge({},k),{from:T.storeObject}),a);if(C!==void 0)return C}}return l.readField(k,a)},g=new Set;this.flattenFields(o,i,a,d).forEach(function(k,T){var C,E=Mu(T),_=i[E];if(g.add(T),_!==void 0){var $=l.getStoreFieldName({typename:d,fieldName:T.name.value,field:T,variables:k.variables}),M=XQ(s,$),j=r.processFieldValue(_,T,T.selectionSet?AT(k,!1,!1):k,M),B=void 0;T.selectionSet&&(kr(j)||ep(j))&&(B=p("__typename",j));var V=l.getMergeFunction(d,T.name.value,B);V?M.info={field:T,typename:d,merge:V}:ZQ(s,$),c=k.merge(c,(C={},C[$]=j,C))}else globalThis.__DEV__!==!1&&!k.clientOnly&&!k.deferred&&!D2.added(T)&&!l.getReadFunction(d,T.name.value)&&globalThis.__DEV__!==!1&&xt.error(12,Mu(T),i)});try{var m=l.identify(i,{typename:d,selectionSet:o,fragmentMap:a.fragmentMap,storeObject:c,readField:p}),y=m[0],b=m[1];n=n||y,b&&(c=a.merge(c,b))}catch(k){if(!n)throw k}if(typeof n=="string"){var O=lp(n),S=a.written[n]||(a.written[n]=[]);if(S.indexOf(o)>=0||(S.push(o),this.reader&&this.reader.isFresh(i,O,o,a)))return O;var w=a.incomingById.get(n);return w?(w.storeObject=a.merge(w.storeObject,c),w.mergeTree=TR(w.mergeTree,s),g.forEach(function(k){return w.fieldNodeSet.add(k)})):a.incomingById.set(n,{storeObject:c,mergeTree:pS(s)?void 0:s,fieldNodeSet:g}),O}return c},t.prototype.processFieldValue=function(e,r,n,i){var o=this;return!r.selectionSet||e===null?globalThis.__DEV__!==!1?TH(e):e:jn(e)?e.map(function(a,s){var l=o.processFieldValue(a,r,n,XQ(i,s));return ZQ(i,s),l}):this.processSelectionSet({result:e,selectionSet:r.selectionSet,context:n,mergeTree:i})},t.prototype.flattenFields=function(e,r,n,i){i===void 0&&(i=pR(r,e,n.fragmentMap));var o=new Map,a=this.cache.policies,s=new hg(!1);return function l(c,d){var p=s.lookup(c,d.clientOnly,d.deferred);p.visited||(p.visited=!0,c.selections.forEach(function(g){if(_b(g,n.variables)){var m=d.clientOnly,y=d.deferred;if(!(m&&y)&&fl(g.directives)&&g.directives.forEach(function(S){var w=S.name.value;if(w==="client"&&(m=!0),w==="defer"){var k=sP(S,n.variables);(!k||k.if!==!1)&&(y=!0)}}),Nu(g)){var b=o.get(g);b&&(m=m&&b.clientOnly,y=y&&b.deferred),o.set(g,AT(n,m,y))}else{var O=aP(g,n.lookupFragment);if(!O&&g.kind===Ye.FRAGMENT_SPREAD)throw fo(13,g.name.value);O&&a.fragmentMatches(O,i,r,n.variables)&&l(O.selectionSet,AT(n,m,y))}}}))}(e,n),o},t.prototype.applyMerges=function(e,r,n,i,o){var a,s=this;if(e.map.size&&!kr(n)){var l=!jn(n)&&(kr(r)||ep(r))?r:void 0,c=n;l&&!o&&(o=[kr(l)?l.__ref:l]);var d,p=function(g,m){return jn(g)?typeof m=="number"?g[m]:void 0:i.store.getFieldValue(g,String(m))};e.map.forEach(function(g,m){var y=p(l,m),b=p(c,m);if(b!==void 0){o&&o.push(m);var O=s.applyMerges(g,y,b,i,o);O!==b&&(d=d||new Map,d.set(m,O)),o&&xt(o.pop()===m)}}),d&&(n=jn(c)?c.slice(0):ge({},c),d.forEach(function(g,m){n[m]=g}))}return e.info?this.cache.policies.runMergeFunction(r,n,e.info,i,o&&(a=i.store).getStorage.apply(a,o)):n},t}(),UH=[];function XQ(t,e){var r=t.map;return r.has(e)||r.set(e,UH.pop()||{map:new Map}),r.get(e)}function TR(t,e){if(t===e||!e||pS(e))return t;if(!t||pS(t))return e;var r=t.info&&e.info?ge(ge({},t.info),e.info):t.info||e.info,n=t.map.size&&e.map.size,i=n?new Map:t.map.size?t.map:e.map,o={info:r,map:i};if(n){var a=new Set(e.map.keys());t.map.forEach(function(s,l){o.map.set(l,TR(s,e.map.get(l))),a.delete(l)}),a.forEach(function(s){o.map.set(s,TR(e.map.get(s),t.map.get(s)))})}return o}function pS(t){return!t||!(t.info||t.map.size)}function ZQ(t,e){var r=t.map,n=r.get(e);n&&pS(n)&&(UH.push(n),r.delete(e))}var GQ=new Set;function l1e(t,e,r,n){var i=function(p){var g=n.getFieldValue(p,r);return typeof g=="object"&&g},o=i(t);if(o){var a=i(e);if(a&&!kr(o)&&!hn(o,a)&&!Object.keys(o).every(function(p){return n.getFieldValue(a,p)!==void 0})){var s=n.getFieldValue(t,"__typename")||n.getFieldValue(e,"__typename"),l=Lu(r),c="".concat(s,".").concat(l);if(!GQ.has(c)){GQ.add(c);var d=[];!jn(o)&&!jn(a)&&[o,a].forEach(function(p){var g=n.getFieldValue(p,"__typename");typeof g=="string"&&!d.includes(g)&&d.push(g)}),globalThis.__DEV__!==!1&&xt.warn(14,l,s,d.length?"either ensure all objects of type "+d.join(" and ")+" have an ID or a custom merge function, or ":"",c,ge({},o),ge({},a))}}}}var HH=function(t){Ts(e,t);function e(r){r===void 0&&(r={});var n=t.call(this)||this;return n.watches=new Set,n.addTypenameTransform=new OH(D2),n.assumeImmutableResults=!0,n.makeVar=n1e,n.txCount=0,n.config=Hwe(r),n.addTypename=!!n.config.addTypename,n.policies=new a1e({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return e.prototype.init=function(){var r=this.data=new fy.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=r.stump,this.resetResultCache()},e.prototype.resetResultCache=function(r){var n=this,i=this.storeReader,o=this.config.fragments;this.storeWriter=new s1e(this,this.storeReader=new Jwe({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:LH(this.config),canon:r?void 0:i&&i.canon,fragments:o}),o),this.maybeBroadcastWatch=dy(function(a,s){return n.broadcastWatch(a,s)},{max:this.config.resultCacheMaxSize||mc["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(a){var s=a.optimistic?n.optimisticData:n.data;if(Tv(s)){var l=a.optimistic,c=a.id,d=a.variables;return s.makeCacheKey(a.query,a.callback,Su({optimistic:l,id:c,variables:d}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(a){return a.resetCaching()})},e.prototype.restore=function(r){return this.init(),r&&this.data.replace(r),this},e.prototype.extract=function(r){return r===void 0&&(r=!1),(r?this.optimisticData:this.data).extract()},e.prototype.read=function(r){var n=r.returnPartialData,i=n===void 0?!1:n;try{return this.storeReader.diffQueryAgainstStore(ge(ge({},r),{store:r.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(o){if(o instanceof NH)return null;throw o}},e.prototype.write=function(r){try{return++this.txCount,this.storeWriter.writeToStore(this.data,r)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},e.prototype.modify=function(r){if(Oi.call(r,"id")&&!r.id)return!1;var n=r.optimistic?this.optimisticData:this.data;try{return++this.txCount,n.modify(r.id||"ROOT_QUERY",r.fields)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},e.prototype.diff=function(r){return this.storeReader.diffQueryAgainstStore(ge(ge({},r),{store:r.optimistic?this.optimisticData:this.data,rootId:r.id||"ROOT_QUERY",config:this.config}))},e.prototype.watch=function(r){var n=this;return this.watches.size||r1e(this),this.watches.add(r),r.immediate&&this.maybeBroadcastWatch(r),function(){n.watches.delete(r)&&!n.watches.size&&VQ(n),n.maybeBroadcastWatch.forget(r)}},e.prototype.gc=function(r){var n;Su.reset(),dP.reset(),this.addTypenameTransform.resetCache(),(n=this.config.fragments)===null||n===void 0||n.resetCaches();var i=this.optimisticData.gc();return r&&!this.txCount&&(r.resetResultCache?this.resetResultCache(r.resetResultIdentities):r.resetResultIdentities&&this.storeReader.resetCanon()),i},e.prototype.retain=function(r,n){return(n?this.optimisticData:this.data).retain(r)},e.prototype.release=function(r,n){return(n?this.optimisticData:this.data).release(r)},e.prototype.identify=function(r){if(kr(r))return r.__ref;try{return this.policies.identify(r)[0]}catch(n){globalThis.__DEV__!==!1&&xt.warn(n)}},e.prototype.evict=function(r){if(!r.id){if(Oi.call(r,"id"))return!1;r=ge(ge({},r),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(r,this.data)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},e.prototype.reset=function(r){var n=this;return this.init(),Su.reset(),r&&r.discardWatches?(this.watches.forEach(function(i){return n.maybeBroadcastWatch.forget(i)}),this.watches.clear(),VQ(this)):this.broadcastWatches(),Promise.resolve()},e.prototype.removeOptimistic=function(r){var n=this.optimisticData.removeLayer(r);n!==this.optimisticData&&(this.optimisticData=n,this.broadcastWatches())},e.prototype.batch=function(r){var n=this,i=r.update,o=r.optimistic,a=o===void 0?!0:o,s=r.removeOptimistic,l=r.onWatchUpdated,c,d=function(g){var m=n,y=m.data,b=m.optimisticData;++n.txCount,g&&(n.data=n.optimisticData=g);try{return c=i(n)}finally{--n.txCount,n.data=y,n.optimisticData=b}},p=new Set;return l&&!this.txCount&&this.broadcastWatches(ge(ge({},r),{onWatchUpdated:function(g){return p.add(g),!1}})),typeof a=="string"?this.optimisticData=this.optimisticData.addLayer(a,d):a===!1?d(this.data):d(),typeof s=="string"&&(this.optimisticData=this.optimisticData.removeLayer(s)),l&&p.size?(this.broadcastWatches(ge(ge({},r),{onWatchUpdated:function(g,m){var y=l.call(this,g,m);return y!==!1&&p.delete(g),y}})),p.size&&p.forEach(function(g){return n.maybeBroadcastWatch.dirty(g)})):this.broadcastWatches(r),c},e.prototype.performTransaction=function(r,n){return this.batch({update:r,optimistic:n||n!==null})},e.prototype.transformDocument=function(r){return this.addTypenameToDocument(this.addFragmentsToDocument(r))},e.prototype.broadcastWatches=function(r){var n=this;this.txCount||this.watches.forEach(function(i){return n.maybeBroadcastWatch(i,r)})},e.prototype.addFragmentsToDocument=function(r){var n=this.config.fragments;return n?n.transform(r):r},e.prototype.addTypenameToDocument=function(r){return this.addTypename?this.addTypenameTransform.transformDocument(r):r},e.prototype.broadcastWatch=function(r,n){var i=r.lastDiff,o=this.diff(r);n&&(r.optimistic&&typeof n.optimistic=="string"&&(o.fromOptimisticTransaction=!0),n.onWatchUpdated&&n.onWatchUpdated.call(this,r,o,i)===!1)||(!i||!hn(i.result,o.result))&&r.callback(r.lastDiff=o,i)},e}(MH);globalThis.__DEV__!==!1&&(HH.prototype.getMemoryInternals=aOe);var Dr;(function(t){t[t.loading=1]="loading",t[t.setVariables=2]="setVariables",t[t.fetchMore=3]="fetchMore",t[t.refetch=4]="refetch",t[t.poll=6]="poll",t[t.ready=7]="ready",t[t.error=8]="error"})(Dr||(Dr={}));function hy(t){return t?t<7:!1}var YQ=Object.assign,c1e=Object.hasOwnProperty,ER=function(t){Ts(e,t);function e(r){var n=r.queryManager,i=r.queryInfo,o=r.options,a=t.call(this,function(O){try{var S=O._subscription._observer;S&&!S.error&&(S.error=u1e)}catch{}var w=!a.observers.size;a.observers.add(O);var k=a.last;return k&&k.error?O.error&&O.error(k.error):k&&k.result&&O.next&&O.next(k.result),w&&a.reobserve().catch(function(){}),function(){a.observers.delete(O)&&!a.observers.size&&a.tearDownQuery()}})||this;a.observers=new Set,a.subscriptions=new Set,a.queryInfo=i,a.queryManager=n,a.waitForOwnResult=MT(o.fetchPolicy),a.isTornDown=!1;var s=n.defaultOptions.watchQuery,l=s===void 0?{}:s,c=l.fetchPolicy,d=c===void 0?"cache-first":c,p=o.fetchPolicy,g=p===void 0?d:p,m=o.initialFetchPolicy,y=m===void 0?g==="standby"?d:g:m;a.options=ge(ge({},o),{initialFetchPolicy:y,fetchPolicy:g}),a.queryId=i.queryId||n.generateQueryId();var b=Ib(a.query);return a.queryName=b&&b.name&&b.name.value,a}return Object.defineProperty(e.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),e.prototype.result=function(){var r=this;return new Promise(function(n,i){var o={next:function(s){n(s),r.observers.delete(o),r.observers.size||r.queryManager.removeQuery(r.queryId),setTimeout(function(){a.unsubscribe()},0)},error:i},a=r.subscribe(o)})},e.prototype.resetDiff=function(){this.queryInfo.resetDiff()},e.prototype.getCurrentResult=function(r){r===void 0&&(r=!0);var n=this.getLastResult(!0),i=this.queryInfo.networkStatus||n&&n.networkStatus||Dr.ready,o=ge(ge({},n),{loading:hy(i),networkStatus:i}),a=this.options.fetchPolicy,s=a===void 0?"cache-first":a;if(!(MT(s)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var l=this.queryInfo.getDiff();(l.complete||this.options.returnPartialData)&&(o.data=l.result),hn(o.data,{})&&(o.data=void 0),l.complete?(delete o.partial,l.complete&&o.networkStatus===Dr.loading&&(s==="cache-first"||s==="cache-only")&&(o.networkStatus=Dr.ready,o.loading=!1)):o.partial=!0,globalThis.__DEV__!==!1&&!l.complete&&!this.options.partialRefetch&&!o.loading&&!o.data&&!o.error&&ZH(l.missing)}return r&&this.updateLastResult(o),o},e.prototype.isDifferentFromLastResult=function(r,n){if(!this.last)return!0;var i=this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective?!AH(this.query,this.last.result,r,this.variables):!hn(this.last.result,r);return i||n&&!hn(this.last.variables,n)},e.prototype.getLast=function(r,n){var i=this.last;if(i&&i[r]&&(!n||hn(i.variables,this.variables)))return i[r]},e.prototype.getLastResult=function(r){return this.getLast("result",r)},e.prototype.getLastError=function(r){return this.getLast("error",r)},e.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},e.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},e.prototype.refetch=function(r){var n,i={pollInterval:0},o=this.options.fetchPolicy;if(o==="cache-and-network"?i.fetchPolicy=o:o==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",globalThis.__DEV__!==!1&&r&&c1e.call(r,"variables")){var a=lH(this.query),s=a.variableDefinitions;(!s||!s.some(function(l){return l.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&xt.warn(20,r,((n=a.name)===null||n===void 0?void 0:n.value)||a)}return r&&!hn(this.options.variables,r)&&(i.variables=this.options.variables=ge(ge({},this.options.variables),r)),this.queryInfo.resetLastWrite(),this.reobserve(i,Dr.refetch)},e.prototype.fetchMore=function(r){var n=this,i=ge(ge({},r.query?r:ge(ge(ge(ge({},this.options),{query:this.options.query}),r),{variables:ge(ge({},this.options.variables),r.variables)})),{fetchPolicy:"no-cache"});i.query=this.transformDocument(i.query);var o=this.queryManager.generateQueryId();this.lastQuery=r.query?this.transformDocument(this.options.query):i.query;var a=this.queryInfo,s=a.networkStatus;a.networkStatus=Dr.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var l=new Set;return this.queryManager.fetchQuery(o,i,Dr.fetchMore).then(function(c){return n.queryManager.removeQuery(o),a.networkStatus===Dr.fetchMore&&(a.networkStatus=s),n.queryManager.cache.batch({update:function(d){var p=r.updateQuery;p?d.updateQuery({query:n.query,variables:n.variables,returnPartialData:!0,optimistic:!1},function(g){return p(g,{fetchMoreResult:c.data,variables:i.variables})}):d.writeQuery({query:i.query,variables:i.variables,data:c.data})},onWatchUpdated:function(d){l.add(d.query)}}),c}).finally(function(){l.has(n.query)||XH(n)})},e.prototype.subscribeToMore=function(r){var n=this,i=this.queryManager.startGraphQLSubscription({query:r.document,variables:r.variables,context:r.context}).subscribe({next:function(o){var a=r.updateQuery;a&&n.updateQuery(function(s,l){var c=l.variables;return a(s,{subscriptionData:o,variables:c})})},error:function(o){if(r.onError){r.onError(o);return}globalThis.__DEV__!==!1&&xt.error(21,o)}});return this.subscriptions.add(i),function(){n.subscriptions.delete(i)&&i.unsubscribe()}},e.prototype.setOptions=function(r){return this.reobserve(r)},e.prototype.silentSetOptions=function(r){var n=Ip(this.options,r||{});YQ(this.options,n)},e.prototype.setVariables=function(r){return hn(this.variables,r)?this.observers.size?this.result():Promise.resolve():(this.options.variables=r,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:r},Dr.setVariables):Promise.resolve())},e.prototype.updateQuery=function(r){var n=this.queryManager,i=n.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,o=r(i,{variables:this.variables});o&&(n.cache.writeQuery({query:this.options.query,data:o,variables:this.variables}),n.broadcastQueries())},e.prototype.startPolling=function(r){this.options.pollInterval=r,this.updatePolling()},e.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},e.prototype.applyNextFetchPolicy=function(r,n){if(n.nextFetchPolicy){var i=n.fetchPolicy,o=i===void 0?"cache-first":i,a=n.initialFetchPolicy,s=a===void 0?o:a;o==="standby"||(typeof n.nextFetchPolicy=="function"?n.fetchPolicy=n.nextFetchPolicy(o,{reason:r,options:n,observable:this,initialFetchPolicy:s}):r==="variables-changed"?n.fetchPolicy=s:n.fetchPolicy=n.nextFetchPolicy)}return n.fetchPolicy},e.prototype.fetch=function(r,n,i){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,r,n,i)},e.prototype.updatePolling=function(){var r=this;if(!this.queryManager.ssrMode){var n=this,i=n.pollingInfo,o=n.options.pollInterval;if(!o||!this.hasObservers()){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===o)){xt(o,22);var a=i||(this.pollingInfo={});a.interval=o;var s=function(){var c,d;r.pollingInfo&&(!hy(r.queryInfo.networkStatus)&&!(!((d=(c=r.options).skipPollAttempt)===null||d===void 0)&&d.call(c))?r.reobserve({fetchPolicy:r.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},Dr.poll).then(l,l):l())},l=function(){var c=r.pollingInfo;c&&(clearTimeout(c.timeout),c.timeout=setTimeout(s,c.interval))};l()}}},e.prototype.updateLastResult=function(r,n){n===void 0&&(n=this.variables);var i=this.getLastError();return i&&this.last&&!hn(n,this.last.variables)&&(i=void 0),this.last=ge({result:this.queryManager.assumeImmutableResults?r:TH(r),variables:n},i?{error:i}:null)},e.prototype.reobserveAsConcast=function(r,n){var i=this;this.isTornDown=!1;var o=n===Dr.refetch||n===Dr.fetchMore||n===Dr.poll,a=this.options.variables,s=this.options.fetchPolicy,l=Ip(this.options,r||{}),c=o?l:YQ(this.options,l),d=this.transformDocument(c.query);this.lastQuery=d,o||(this.updatePolling(),r&&r.variables&&!hn(r.variables,a)&&c.fetchPolicy!=="standby"&&c.fetchPolicy===s&&(this.applyNextFetchPolicy("variables-changed",c),n===void 0&&(n=Dr.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=MT(c.fetchPolicy));var p=function(){i.concast===y&&(i.waitForOwnResult=!1)},g=c.variables&&ge({},c.variables),m=this.fetch(c,n,d),y=m.concast,b=m.fromLink,O={next:function(S){hn(i.variables,g)&&(p(),i.reportResult(S,g))},error:function(S){hn(i.variables,g)&&(p(),i.reportError(S,g))}};return!o&&(b||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=y,this.observer=O),y.addObserver(O),y},e.prototype.reobserve=function(r,n){return this.reobserveAsConcast(r,n).promise},e.prototype.resubscribeAfterError=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=this.last;this.resetLastResults();var o=this.subscribe.apply(this,r);return this.last=i,o},e.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},e.prototype.reportResult=function(r,n){var i=this.getLastError(),o=this.isDifferentFromLastResult(r,n);(i||!r.partial||this.options.returnPartialData)&&this.updateLastResult(r,n),(i||o)&&Cv(this.observers,"next",r)},e.prototype.reportError=function(r,n){var i=ge(ge({},this.getLastResult()),{error:r,errors:r.graphQLErrors,networkStatus:Dr.error,loading:!1});this.updateLastResult(i,n),Cv(this.observers,"error",this.last.error=r)},e.prototype.hasObservers=function(){return this.observers.size>0},e.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(r){return r.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},e.prototype.transformDocument=function(r){return this.queryManager.transform(r)},e}(Nr);EH(ER);function XH(t){var e=t.options,r=e.fetchPolicy,n=e.nextFetchPolicy;return r==="cache-and-network"||r==="network-only"?t.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(i,o){return this.nextFetchPolicy=n,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(i,o):r}}):t.reobserve()}function u1e(t){globalThis.__DEV__!==!1&&xt.error(23,t.message,t.stack)}function ZH(t){globalThis.__DEV__!==!1&&t&&globalThis.__DEV__!==!1&&xt.debug(24,t)}function MT(t){return t==="network-only"||t==="no-cache"||t==="standby"}var GH=function(){function t(e){var r=e.cache,n=e.client,i=e.resolvers,o=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=r,n&&(this.client=n),i&&this.addResolvers(i),o&&this.setFragmentMatcher(o)}return t.prototype.addResolvers=function(e){var r=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(n){r.resolvers=OQ(r.resolvers,n)}):this.resolvers=OQ(this.resolvers,e)},t.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},t.prototype.getResolvers=function(){return this.resolvers||{}},t.prototype.runResolvers=function(e){return au(this,arguments,void 0,function(r){var n=r.document,i=r.remoteResult,o=r.context,a=r.variables,s=r.onlyRunForcedResolvers,l=s===void 0?!1:s;return su(this,function(c){return n?[2,this.resolveDocument(n,i.data,o,a,this.fragmentMatcher,l).then(function(d){return ge(ge({},i),{data:d.result})})]:[2,i]})})},t.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},t.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},t.prototype.clientQuery=function(e){return cy(["client"],e)&&this.resolvers?e:null},t.prototype.serverQuery=function(e){return xH(e)},t.prototype.prepareContext=function(e){var r=this.cache;return ge(ge({},e),{cache:r,getCacheKey:function(n){return r.identify(n)}})},t.prototype.addExportedVariables=function(e){return au(this,arguments,void 0,function(r,n,i){return n===void 0&&(n={}),i===void 0&&(i={}),su(this,function(o){return r?[2,this.resolveDocument(r,this.buildRootValueFromCache(r,n)||{},this.prepareContext(i),n).then(function(a){return ge(ge({},n),a.exportedVariables)})]:[2,ge({},n)]})})},t.prototype.shouldForceResolvers=function(e){var r=!1;return gc(e,{Directive:{enter:function(n){if(n.name.value==="client"&&n.arguments&&(r=n.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),r))return E2}}}),r},t.prototype.buildRootValueFromCache=function(e,r){return this.cache.diff({query:UOe(e),variables:r,returnPartialData:!0,optimistic:!1}).result},t.prototype.resolveDocument=function(e,r){return au(this,arguments,void 0,function(n,i,o,a,s,l){var c,d,p,g,m,y,b,O,S,w,k;return o===void 0&&(o={}),a===void 0&&(a={}),s===void 0&&(s=function(){return!0}),l===void 0&&(l=!1),su(this,function(T){return c=$b(n),d=lP(n),p=oP(d),g=this.collectSelectionsToResolve(c,p),m=c.operation,y=m?m.charAt(0).toUpperCase()+m.slice(1):"Query",b=this,O=b.cache,S=b.client,w={fragmentMap:p,context:ge(ge({},o),{cache:O,client:S}),variables:a,fragmentMatcher:s,defaultOperationType:y,exportedVariables:{},selectionsToResolve:g,onlyRunForcedResolvers:l},k=!1,[2,this.resolveSelectionSet(c.selectionSet,k,i,w).then(function(C){return{result:C,exportedVariables:w.exportedVariables}})]})})},t.prototype.resolveSelectionSet=function(e,r,n,i){return au(this,void 0,void 0,function(){var o,a,s,l,c,d=this;return su(this,function(p){return o=i.fragmentMap,a=i.context,s=i.variables,l=[n],c=function(g){return au(d,void 0,void 0,function(){var m,y;return su(this,function(b){return!r&&!i.selectionsToResolve.has(g)?[2]:_b(g,s)?Nu(g)?[2,this.resolveField(g,r,n,i).then(function(O){var S;typeof O<"u"&&l.push((S={},S[Mu(g)]=O,S))})]:(COe(g)?m=g:(m=o[g.name.value],xt(m,18,g.name.value)),m&&m.typeCondition&&(y=m.typeCondition.name.value,i.fragmentMatcher(n,y,a))?[2,this.resolveSelectionSet(m.selectionSet,r,n,i).then(function(O){l.push(O)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(c)).then(function(){return fP(l)})]})})},t.prototype.resolveField=function(e,r,n,i){return au(this,void 0,void 0,function(){var o,a,s,l,c,d,p,g,m,y=this;return su(this,function(b){return n?(o=i.variables,a=e.name.value,s=Mu(e),l=a!==s,c=n[s]||n[a],d=Promise.resolve(c),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(p=n.__typename||i.defaultOperationType,g=this.resolvers&&this.resolvers[p],g&&(m=g[l?a:s],m&&(d=Promise.resolve(z2.withValue(this.cache,m,[n,sP(e,o),i.context,{field:e,fragmentMap:i.fragmentMap}]))))),[2,d.then(function(O){var S,w;if(O===void 0&&(O=c),e.directives&&e.directives.forEach(function(T){T.name.value==="export"&&T.arguments&&T.arguments.forEach(function(C){C.name.value==="as"&&C.value.kind==="StringValue"&&(i.exportedVariables[C.value.value]=O)})}),!e.selectionSet||O==null)return O;var k=(w=(S=e.directives)===null||S===void 0?void 0:S.some(function(T){return T.name.value==="client"}))!==null&&w!==void 0?w:!1;if(Array.isArray(O))return y.resolveSubSelectedArray(e,r||k,O,i);if(e.selectionSet)return y.resolveSelectionSet(e.selectionSet,r||k,O,i)})]):[2,null]})})},t.prototype.resolveSubSelectedArray=function(e,r,n,i){var o=this;return Promise.all(n.map(function(a){if(a===null)return null;if(Array.isArray(a))return o.resolveSubSelectedArray(e,r,a,i);if(e.selectionSet)return o.resolveSelectionSet(e.selectionSet,r,a,i)}))},t.prototype.collectSelectionsToResolve=function(e,r){var n=function(a){return!Array.isArray(a)},i=this.selectionsToResolveCache;function o(a){if(!i.has(a)){var s=new Set;i.set(a,s),gc(a,{Directive:function(l,c,d,p,g){l.name.value==="client"&&g.forEach(function(m){n(m)&&uQ(m)&&s.add(m)})},FragmentSpread:function(l,c,d,p,g){var m=r[l.name.value];xt(m,19,l.name.value);var y=o(m);y.size>0&&(g.forEach(function(b){n(b)&&uQ(b)&&s.add(b)}),s.add(l),y.forEach(function(b){s.add(b)}))}})}return i.get(a)}return o(e)},t}(),tp=new(pg?WeakMap:Map);function NT(t,e){var r=t[e];typeof r=="function"&&(t[e]=function(){return tp.set(t,(tp.get(t)+1)%1e15),r.apply(this,arguments)})}function KQ(t){t.notifyTimeout&&(clearTimeout(t.notifyTimeout),t.notifyTimeout=void 0)}var jT=function(){function t(e,r){r===void 0&&(r=e.generateQueryId()),this.queryId=r,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;tp.has(n)||(tp.set(n,0),NT(n,"evict"),NT(n,"modify"),NT(n,"reset"))}return t.prototype.init=function(e){var r=e.networkStatus||Dr.loading;return this.variables&&this.networkStatus!==Dr.loading&&!hn(this.variables,e.variables)&&(r=Dr.setVariables),hn(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:r}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},t.prototype.reset=function(){KQ(this),this.dirty=!1},t.prototype.resetDiff=function(){this.lastDiff=void 0},t.prototype.getDiff=function(){var e=this.getDiffOptions();if(this.lastDiff&&hn(e,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var r=this.observableQuery;if(r&&r.options.fetchPolicy==="no-cache")return{complete:!1};var n=this.cache.diff(e);return this.updateLastDiff(n,e),n},t.prototype.updateLastDiff=function(e,r){this.lastDiff=e?{diff:e,options:r||this.getDiffOptions()}:void 0},t.prototype.getDiffOptions=function(e){var r;return e===void 0&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:(r=this.observableQuery)===null||r===void 0?void 0:r.options.canonizeResults}},t.prototype.setDiff=function(e){var r=this,n,i=this.lastDiff&&this.lastDiff.diff;e&&!e.complete&&(!((n=this.observableQuery)===null||n===void 0)&&n.getLastError())||(this.updateLastDiff(e),!this.dirty&&!hn(i&&i.result,e&&e.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return r.notify()},0))))},t.prototype.setObservableQuery=function(e){var r=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){var n=r.getDiff();n.fromOptimisticTransaction?e.observe():XH(e)})):delete this.oqListener)},t.prototype.notify=function(){var e=this;KQ(this),this.shouldNotify()&&this.listeners.forEach(function(r){return r(e)}),this.dirty=!1},t.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(hy(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if(e!=="cache-only"&&e!=="cache-and-network")return!1}return!0},t.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=t.prototype.cancel;var e=this.observableQuery;e&&e.stopPolling()}},t.prototype.cancel=function(){},t.prototype.updateWatch=function(e){var r=this;e===void 0&&(e=this.variables);var n=this.observableQuery;if(!(n&&n.options.fetchPolicy==="no-cache")){var i=ge(ge({},this.getDiffOptions(e)),{watcher:this,callback:function(o){return r.setDiff(o)}});(!this.lastWatch||!hn(i,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},t.prototype.resetLastWrite=function(){this.lastWrite=void 0},t.prototype.shouldWrite=function(e,r){var n=this.lastWrite;return!(n&&n.dmCount===tp.get(this.cache)&&hn(r,n.variables)&&hn(e.data,n.result.data))},t.prototype.markResult=function(e,r,n,i){var o=this,a=new Du,s=fl(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&fl(e.incremental)){var l=_H(this.getDiff().result,e);e.data=l}else if("hasNext"in e&&e.hasNext){var c=this.getDiff();e.data=a.merge(c.result,e.data)}this.graphQLErrors=s,n.fetchPolicy==="no-cache"?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):i!==0&&(_R(e,n.errorPolicy)?this.cache.performTransaction(function(d){if(o.shouldWrite(e,n.variables))d.writeQuery({query:r,data:e.data,variables:n.variables,overwrite:i===1}),o.lastWrite={result:e,variables:n.variables,dmCount:tp.get(o.cache)};else if(o.lastDiff&&o.lastDiff.diff.complete){e.data=o.lastDiff.diff.result;return}var p=o.getDiffOptions(n.variables),g=d.diff(p);!o.stopped&&hn(o.variables,n.variables)&&o.updateWatch(n.variables),o.updateLastDiff(g,p),g.complete&&(e.data=g.result)}):this.lastWrite=void 0)},t.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Dr.ready},t.prototype.markError=function(e){return this.networkStatus=Dr.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},t}();function _R(t,e){e===void 0&&(e="none");var r=e==="ignore"||e==="all",n=!y1(t);return!n&&r&&t.data&&(n=!0),n}var d1e=Object.prototype.hasOwnProperty,JQ=Object.create(null),f1e=function(){function t(e){var r=e.cache,n=e.link,i=e.defaultOptions,o=e.documentTransform,a=e.queryDeduplication,s=a===void 0?!1:a,l=e.onBroadcast,c=e.ssrMode,d=c===void 0?!1:c,p=e.clientAwareness,g=p===void 0?{}:p,m=e.localState,y=e.assumeImmutableResults,b=y===void 0?!!r.assumeImmutableResults:y,O=e.defaultContext,S=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new rH(mc["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new hg(!1);var w=new OH(function(k){return S.cache.transformDocument(k)},{cache:!1});this.cache=r,this.link=n,this.defaultOptions=i||Object.create(null),this.queryDeduplication=s,this.clientAwareness=g,this.localState=m||new GH({cache:r}),this.ssrMode=d,this.assumeImmutableResults=b,this.documentTransform=o?w.concat(o).concat(w):w,this.defaultContext=O||Object.create(null),(this.onBroadcast=l)&&(this.mutationStore=Object.create(null))}return t.prototype.stop=function(){var e=this;this.queries.forEach(function(r,n){e.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(fo(25))},t.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(r){return r(e)}),this.fetchCancelFns.clear()},t.prototype.mutate=function(e){return au(this,arguments,void 0,function(r){var n,i,o,a,s,l,c,d=r.mutation,p=r.variables,g=r.optimisticResponse,m=r.updateQueries,y=r.refetchQueries,b=y===void 0?[]:y,O=r.awaitRefetchQueries,S=O===void 0?!1:O,w=r.update,k=r.onQueryUpdated,T=r.fetchPolicy,C=T===void 0?((l=this.defaultOptions.mutate)===null||l===void 0?void 0:l.fetchPolicy)||"network-only":T,E=r.errorPolicy,_=E===void 0?((c=this.defaultOptions.mutate)===null||c===void 0?void 0:c.errorPolicy)||"none":E,$=r.keepRootFields,M=r.context;return su(this,function(j){switch(j.label){case 0:return xt(d,26),xt(C==="network-only"||C==="no-cache",27),n=this.generateMutationId(),d=this.cache.transformForLink(this.transform(d)),i=this.getDocumentInfo(d).hasClientExports,p=this.getVariables(d,p),i?[4,this.localState.addExportedVariables(d,p,M)]:[3,2];case 1:p=j.sent(),j.label=2;case 2:return o=this.mutationStore&&(this.mutationStore[n]={mutation:d,variables:p,loading:!0,error:null}),a=g&&this.markMutationOptimistic(g,{mutationId:n,document:d,variables:p,fetchPolicy:C,errorPolicy:_,context:M,updateQueries:m,update:w,keepRootFields:$}),this.broadcastQueries(),s=this,[2,new Promise(function(B,V){return ET(s.getObservableFromLink(d,ge(ge({},M),{optimisticResponse:a?g:void 0}),p,!1),function(X){if(y1(X)&&_==="none")throw new xh({graphQLErrors:OR(X)});o&&(o.loading=!1,o.error=null);var D=ge({},X);return typeof b=="function"&&(b=b(D)),_==="ignore"&&y1(D)&&delete D.errors,s.markMutationResult({mutationId:n,result:D,document:d,variables:p,fetchPolicy:C,errorPolicy:_,context:M,update:w,updateQueries:m,awaitRefetchQueries:S,refetchQueries:b,removeOptimistic:a?n:void 0,onQueryUpdated:k,keepRootFields:$})}).subscribe({next:function(X){s.broadcastQueries(),(!("hasNext"in X)||X.hasNext===!1)&&B(X)},error:function(X){o&&(o.loading=!1,o.error=X),a&&s.cache.removeOptimistic(n),s.broadcastQueries(),V(X instanceof xh?X:new xh({networkError:X}))}})})]}})})},t.prototype.markMutationResult=function(e,r){var n=this;r===void 0&&(r=this.cache);var i=e.result,o=[],a=e.fetchPolicy==="no-cache";if(!a&&_R(i,e.errorPolicy)){if(cp(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),cp(i)&&fl(i.incremental)){var s=r.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),l=void 0;s.result&&(l=_H(s.result,i)),typeof l<"u"&&(i.data=l,o.push({result:l,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var c=e.updateQueries;c&&this.queries.forEach(function(p,g){var m=p.observableQuery,y=m&&m.queryName;if(!(!y||!d1e.call(c,y))){var b=c[y],O=n.queries.get(g),S=O.document,w=O.variables,k=r.diff({query:S,variables:w,returnPartialData:!0,optimistic:!1}),T=k.result,C=k.complete;if(C&&T){var E=b(T,{mutationResult:i,queryName:S&&gR(S)||void 0,queryVariables:w});E&&o.push({result:E,dataId:"ROOT_QUERY",query:S,variables:w})}}})}if(o.length>0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var d=[];if(this.refetchQueries({updateCache:function(p){a||o.forEach(function(b){return p.write(b)});var g=e.update,m=!swe(i)||cp(i)&&!i.hasNext;if(g){if(!a){var y=p.diff({id:"ROOT_MUTATION",query:n.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});y.complete&&(i=ge(ge({},i),{data:y.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}m&&g(p,i,{context:e.context,variables:e.variables})}!a&&!e.keepRootFields&&m&&p.modify({id:"ROOT_MUTATION",fields:function(b,O){var S=O.fieldName,w=O.DELETE;return S==="__typename"?b:w}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(p){return d.push(p)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(d).then(function(){return i})}return Promise.resolve(i)},t.prototype.markMutationOptimistic=function(e,r){var n=this,i=typeof e=="function"?e(r.variables,{IGNORE:JQ}):e;return i===JQ?!1:(this.cache.recordOptimisticTransaction(function(o){try{n.markMutationResult(ge(ge({},r),{result:{data:i}}),o)}catch(a){globalThis.__DEV__!==!1&&xt.error(a)}},r.mutationId),!0)},t.prototype.fetchQuery=function(e,r,n){return this.fetchConcastWithInfo(e,r,n).concast.promise},t.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(r,n){e[n]={variables:r.variables,networkStatus:r.networkStatus,networkError:r.networkError,graphQLErrors:r.graphQLErrors}}),e},t.prototype.resetErrors=function(e){var r=this.queries.get(e);r&&(r.networkError=void 0,r.graphQLErrors=[])},t.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},t.prototype.getDocumentInfo=function(e){var r=this.transformCache;if(!r.has(e)){var n={hasClientExports:z0e(e),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:cy(["nonreactive"],e),clientQuery:this.localState.clientQuery(e),serverQuery:SH([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],e),defaultVars:I2(Ib(e)),asQuery:ge(ge({},e),{definitions:e.definitions.map(function(i){return i.kind==="OperationDefinition"&&i.operation!=="query"?ge(ge({},i),{operation:"query"}):i})})};r.set(e,n)}return r.get(e)},t.prototype.getVariables=function(e,r){return ge(ge({},this.getDocumentInfo(e).defaultVars),r)},t.prototype.watchQuery=function(e){var r=this.transform(e.query);e=ge(ge({},e),{variables:this.getVariables(r,e.variables)}),typeof e.notifyOnNetworkStatusChange>"u"&&(e.notifyOnNetworkStatusChange=!1);var n=new jT(this),i=new ER({queryManager:this,queryInfo:n,options:e});return i.lastQuery=r,this.queries.set(i.queryId,n),n.init({document:r,observableQuery:i,variables:i.variables}),i},t.prototype.query=function(e,r){var n=this;return r===void 0&&(r=this.generateQueryId()),xt(e.query,28),xt(e.query.kind==="Document",29),xt(!e.returnPartialData,30),xt(!e.pollInterval,31),this.fetchQuery(r,ge(ge({},e),{query:this.transform(e.query)})).finally(function(){return n.stopQuery(r)})},t.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},t.prototype.generateRequestId=function(){return this.requestIdCounter++},t.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},t.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},t.prototype.stopQueryInStoreNoBroadcast=function(e){var r=this.queries.get(e);r&&r.stop()},t.prototype.clearStore=function(e){return e===void 0&&(e={discardWatches:!0}),this.cancelPendingFetches(fo(32)),this.queries.forEach(function(r){r.observableQuery?r.networkStatus=Dr.loading:r.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},t.prototype.getObservableQueries=function(e){var r=this;e===void 0&&(e="active");var n=new Map,i=new Map,o=new Set;return Array.isArray(e)&&e.forEach(function(a){typeof a=="string"?i.set(a,!1):pOe(a)?i.set(r.transform(a),!1):Nn(a)&&a.query&&o.add(a)}),this.queries.forEach(function(a,s){var l=a.observableQuery,c=a.document;if(l){if(e==="all"){n.set(s,l);return}var d=l.queryName,p=l.options.fetchPolicy;if(p==="standby"||e==="active"&&!l.hasObservers())return;(e==="active"||d&&i.has(d)||c&&i.has(c))&&(n.set(s,l),d&&i.set(d,!0),c&&i.set(c,!0))}}),o.size&&o.forEach(function(a){var s=aR("legacyOneTimeQuery"),l=r.getQuery(s).init({document:a.query,variables:a.variables}),c=new ER({queryManager:r,queryInfo:l,options:ge(ge({},a),{fetchPolicy:"network-only"})});xt(c.queryId===s),l.setObservableQuery(c),n.set(s,c)}),globalThis.__DEV__!==!1&&i.size&&i.forEach(function(a,s){a||globalThis.__DEV__!==!1&&xt.warn(typeof s=="string"?33:34,s)}),n},t.prototype.reFetchObservableQueries=function(e){var r=this;e===void 0&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach(function(i,o){var a=i.options.fetchPolicy;i.resetLastResults(),(e||a!=="standby"&&a!=="cache-only")&&n.push(i.refetch()),r.getQuery(o).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},t.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},t.prototype.startGraphQLSubscription=function(e){var r=this,n=e.query,i=e.fetchPolicy,o=e.errorPolicy,a=o===void 0?"none":o,s=e.variables,l=e.context,c=l===void 0?{}:l;n=this.transform(n),s=this.getVariables(n,s);var d=function(g){return r.getObservableFromLink(n,c,g).map(function(m){i!=="no-cache"&&(_R(m,a)&&r.cache.write({query:n,result:m.data,dataId:"ROOT_SUBSCRIPTION",variables:g}),r.broadcastQueries());var y=y1(m),b=Pwe(m);if(y||b){var O={};if(y&&(O.graphQLErrors=m.errors),b&&(O.protocolErrors=m.extensions[B2]),a==="none"||b)throw new xh(O)}return a==="ignore"&&delete m.errors,m})};if(this.getDocumentInfo(n).hasClientExports){var p=this.localState.addExportedVariables(n,s,c).then(d);return new Nr(function(g){var m=null;return p.then(function(y){return m=y.subscribe(g)},g.error),function(){return m&&m.unsubscribe()}})}return d(s)},t.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},t.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},t.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},t.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},t.prototype.getLocalState=function(){return this.localState},t.prototype.getObservableFromLink=function(e,r,n,i){var o=this,a;i===void 0&&(i=(a=r==null?void 0:r.queryDeduplication)!==null&&a!==void 0?a:this.queryDeduplication);var s,l=this.getDocumentInfo(e),c=l.serverQuery,d=l.clientQuery;if(c){var p=this,g=p.inFlightLinkObservables,m=p.link,y={query:c,variables:n,operationName:gR(c)||void 0,context:this.prepareContext(ge(ge({},r),{forceFetch:!i}))};if(r=y.context,i){var b=dP(c),O=Su(n),S=g.lookup(b,O);if(s=S.observable,!s){var w=new Qh([wR(m,y)]);s=S.observable=w,w.beforeNext(function(){g.remove(b,O)})}}else s=new Qh([wR(m,y)])}else s=new Qh([Nr.of({data:{}})]),r=this.prepareContext(r);return d&&(s=ET(s,function(k){return o.localState.runResolvers({document:d,remoteResult:k,context:r,variables:n})})),s},t.prototype.getResultsFromLink=function(e,r,n){var i=e.lastRequestId=this.generateRequestId(),o=this.cache.transformForLink(n.query);return ET(this.getObservableFromLink(o,n.context,n.variables),function(a){var s=OR(a),l=s.length>0;if(i>=e.lastRequestId){if(l&&n.errorPolicy==="none")throw e.markError(new xh({graphQLErrors:s}));e.markResult(a,o,n,r),e.markReady()}var c={data:a.data,loading:!1,networkStatus:Dr.ready};return l&&n.errorPolicy!=="ignore"&&(c.errors=s,c.networkStatus=Dr.error),c},function(a){var s=kwe(a)?a:new xh({networkError:a});throw i>=e.lastRequestId&&e.markError(s),s})},t.prototype.fetchConcastWithInfo=function(e,r,n,i){var o=this;n===void 0&&(n=Dr.loading),i===void 0&&(i=r.query);var a=this.getVariables(i,r.variables),s=this.getQuery(e),l=this.defaultOptions.watchQuery,c=r.fetchPolicy,d=c===void 0?l&&l.fetchPolicy||"cache-first":c,p=r.errorPolicy,g=p===void 0?l&&l.errorPolicy||"none":p,m=r.returnPartialData,y=m===void 0?!1:m,b=r.notifyOnNetworkStatusChange,O=b===void 0?!1:b,S=r.context,w=S===void 0?{}:S,k=Object.assign({},r,{query:i,variables:a,fetchPolicy:d,errorPolicy:g,returnPartialData:y,notifyOnNetworkStatusChange:O,context:w}),T=function(M){k.variables=M;var j=o.fetchQueryByPolicy(s,k,n);return k.fetchPolicy!=="standby"&&j.sources.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",r),j},C=function(){return o.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,function(M){C(),setTimeout(function(){return E.cancel(M)})});var E,_;if(this.getDocumentInfo(k.query).hasClientExports)E=new Qh(this.localState.addExportedVariables(k.query,k.variables,k.context).then(T).then(function(M){return M.sources})),_=!0;else{var $=T(k.variables);_=$.fromLink,E=new Qh($.sources)}return E.promise.then(C,C),{concast:E,fromLink:_}},t.prototype.refetchQueries=function(e){var r=this,n=e.updateCache,i=e.include,o=e.optimistic,a=o===void 0?!1:o,s=e.removeOptimistic,l=s===void 0?a?aR("refetchQueries"):void 0:s,c=e.onQueryUpdated,d=new Map;i&&this.getObservableQueries(i).forEach(function(g,m){d.set(m,{oq:g,lastDiff:r.getQuery(m).getDiff()})});var p=new Map;return n&&this.cache.batch({update:n,optimistic:a&&l||!1,removeOptimistic:l,onWatchUpdated:function(g,m,y){var b=g.watcher instanceof jT&&g.watcher.observableQuery;if(b){if(c){d.delete(b.queryId);var O=c(b,m,y);return O===!0&&(O=b.refetch()),O!==!1&&p.set(b,O),O}c!==null&&d.set(b.queryId,{oq:b,lastDiff:y,diff:m})}}}),d.size&&d.forEach(function(g,m){var y=g.oq,b=g.lastDiff,O=g.diff,S;if(c){if(!O){var w=y.queryInfo;w.reset(),O=w.getDiff()}S=c(y,O,b)}(!c||S===!0)&&(S=y.refetch()),S!==!1&&p.set(y,S),m.indexOf("legacyOneTimeQuery")>=0&&r.stopQueryNoBroadcast(m)}),l&&this.cache.removeOptimistic(l),p},t.prototype.fetchQueryByPolicy=function(e,r,n){var i=this,o=r.query,a=r.variables,s=r.fetchPolicy,l=r.refetchWritePolicy,c=r.errorPolicy,d=r.returnPartialData,p=r.context,g=r.notifyOnNetworkStatusChange,m=e.networkStatus;e.init({document:o,variables:a,networkStatus:n});var y=function(){return e.getDiff()},b=function(T,C){C===void 0&&(C=e.networkStatus||Dr.loading);var E=T.result;globalThis.__DEV__!==!1&&!d&&!hn(E,{})&&ZH(T.missing);var _=function($){return Nr.of(ge({data:$,loading:hy(C),networkStatus:C},T.complete?null:{partial:!0}))};return E&&i.getDocumentInfo(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:E},context:p,variables:a,onlyRunForcedResolvers:!0}).then(function($){return _($.data||void 0)}):c==="none"&&C===Dr.refetch&&Array.isArray(T.missing)?_(void 0):_(E)},O=s==="no-cache"?0:n===Dr.refetch&&l!=="merge"?1:2,S=function(){return i.getResultsFromLink(e,O,{query:o,variables:a,context:p,fetchPolicy:s,errorPolicy:c})},w=g&&typeof m=="number"&&m!==n&&hy(n);switch(s){default:case"cache-first":{var k=y();return k.complete?{fromLink:!1,sources:[b(k,e.markReady())]}:d||w?{fromLink:!0,sources:[b(k),S()]}:{fromLink:!0,sources:[S()]}}case"cache-and-network":{var k=y();return k.complete||d||w?{fromLink:!0,sources:[b(k),S()]}:{fromLink:!0,sources:[S()]}}case"cache-only":return{fromLink:!1,sources:[b(y(),e.markReady())]};case"network-only":return w?{fromLink:!0,sources:[b(y()),S()]}:{fromLink:!0,sources:[S()]};case"no-cache":return w?{fromLink:!0,sources:[b(e.getDiff()),S()]}:{fromLink:!0,sources:[S()]};case"standby":return{fromLink:!1,sources:[]}}},t.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new jT(this,e)),this.queries.get(e)},t.prototype.prepareContext=function(e){e===void 0&&(e={});var r=this.localState.prepareContext(e);return ge(ge(ge({},this.defaultContext),r),{clientAwareness:this.clientAwareness})},t}(),e4=!1,YH=function(){function t(e){var r=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw fo(15);var n=e.uri,i=e.credentials,o=e.headers,a=e.cache,s=e.documentTransform,l=e.ssrMode,c=l===void 0?!1:l,d=e.ssrForceFetchDelay,p=d===void 0?0:d,g=e.connectToDevTools,m=g===void 0?typeof window=="object"&&!window.__APOLLO_CLIENT__&&globalThis.__DEV__!==!1:g,y=e.queryDeduplication,b=y===void 0?!0:y,O=e.defaultOptions,S=e.defaultContext,w=e.assumeImmutableResults,k=w===void 0?a.assumeImmutableResults:w,T=e.resolvers,C=e.typeDefs,E=e.fragmentMatcher,_=e.name,$=e.version,M=e.link;M||(M=n?new Fwe({uri:n,credentials:i,headers:o}):Cc.empty()),this.link=M,this.cache=a,this.disableNetworkFetches=c||p>0,this.queryDeduplication=b,this.defaultOptions=O||Object.create(null),this.typeDefs=C,p&&setTimeout(function(){return r.disableNetworkFetches=!1},p),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=x2,this.localState=new GH({cache:a,client:this,resolvers:T,fragmentMatcher:E}),this.queryManager=new f1e({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:S,documentTransform:s,queryDeduplication:b,ssrMode:c,clientAwareness:{name:_,version:$},localState:this.localState,assumeImmutableResults:k,onBroadcast:m?function(){r.devToolsHookCb&&r.devToolsHookCb({action:{},state:{queries:r.queryManager.getQueryStore(),mutations:r.queryManager.mutationStore||{}},dataWithOptimisticResults:r.cache.extract(!0)})}:void 0}),m&&this.connectToDevTools()}return t.prototype.connectToDevTools=function(){if(typeof window=="object"){var e=window,r=Symbol.for("apollo.devtools");(e[r]=e[r]||[]).push(this),e.__APOLLO_CLIENT__=this}!e4&&globalThis.__DEV__!==!1&&(e4=!0,setTimeout(function(){if(typeof window<"u"&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__&&/^(https?|file):$/.test(window.location.protocol)){var n=window.navigator,i=n&&n.userAgent,o=void 0;typeof i=="string"&&(i.indexOf("Chrome/")>-1?o="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":i.indexOf("Firefox/")>-1&&(o="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),o&&globalThis.__DEV__!==!1&&xt.log("Download the Apollo DevTools for a better development experience: %s",o)}},1e4))},Object.defineProperty(t.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),t.prototype.stop=function(){this.queryManager.stop()},t.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=_T(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&(e.fetchPolicy==="network-only"||e.fetchPolicy==="cache-and-network")&&(e=ge(ge({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},t.prototype.query=function(e){return this.defaultOptions.query&&(e=_T(this.defaultOptions.query,e)),xt(e.fetchPolicy!=="cache-and-network",16),this.disableNetworkFetches&&e.fetchPolicy==="network-only"&&(e=ge(ge({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},t.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=_T(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},t.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},t.prototype.readQuery=function(e,r){return r===void 0&&(r=!1),this.cache.readQuery(e,r)},t.prototype.watchFragment=function(e){return this.cache.watchFragment(e)},t.prototype.readFragment=function(e,r){return r===void 0&&(r=!1),this.cache.readFragment(e,r)},t.prototype.writeQuery=function(e){var r=this.cache.writeQuery(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),r},t.prototype.writeFragment=function(e){var r=this.cache.writeFragment(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),r},t.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},t.prototype.__requestRaw=function(e){return wR(this.link,e)},t.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(r){return r()}))}).then(function(){return e.reFetchObservableQueries()})},t.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(r){return r()}))})},t.prototype.onResetStore=function(e){var r=this;return this.resetStoreCallbacks.push(e),function(){r.resetStoreCallbacks=r.resetStoreCallbacks.filter(function(n){return n!==e})}},t.prototype.onClearStore=function(e){var r=this;return this.clearStoreCallbacks.push(e),function(){r.clearStoreCallbacks=r.clearStoreCallbacks.filter(function(n){return n!==e})}},t.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},t.prototype.refetchQueries=function(e){var r=this.queryManager.refetchQueries(e),n=[],i=[];r.forEach(function(a,s){n.push(s),i.push(a)});var o=Promise.all(i);return o.queries=n,o.results=i,o.catch(function(a){globalThis.__DEV__!==!1&&xt.debug(17,a)}),o},t.prototype.getObservableQueries=function(e){return e===void 0&&(e="active"),this.queryManager.getObservableQueries(e)},t.prototype.extract=function(e){return this.cache.extract(e)},t.prototype.restore=function(e){return this.cache.restore(e)},t.prototype.addResolvers=function(e){this.localState.addResolvers(e)},t.prototype.setResolvers=function(e){this.localState.setResolvers(e)},t.prototype.getResolvers=function(){return this.localState.getResolvers()},t.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},t.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(t.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),t}();globalThis.__DEV__!==!1&&(YH.prototype.getMemoryInternals=oOe);var w1=new Map,RR=new Map,KH=!0,gS=!1;function JH(t){return t.replace(/[\s,]+/g," ").trim()}function h1e(t){return JH(t.source.body.substring(t.start,t.end))}function p1e(t){var e=new Set,r=[];return t.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,o=h1e(n.loc),a=RR.get(i);a&&!a.has(o)?KH&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
148
148
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
149
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||RR.set(i,a=new Set),a.add(o),e.has(o)||(e.add(o),r.push(n))}else r.push(n)}),ge(ge({},t),{definitions:r})}function g1e(t){var e=new Set(t.definitions);e.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var o=n[i];o&&typeof o=="object"&&e.add(o)})});var r=t.loc;return r&&(delete r.startToken,delete r.endToken),t}function m1e(t){var e=JH(t);if(!w1.has(e)){var r=YU(t,{experimentalFragmentVariables:gS,allowLegacyFragmentVariables:gS});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");w1.set(e,g1e(p1e(r)))}return w1.get(e)}function Ae(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];typeof t=="string"&&(t=[t]);var n=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=t[o+1]}),m1e(n)}function v1e(){w1.clear(),RR.clear()}function y1e(){KH=!1}function b1e(){gS=!0}function O1e(){gS=!1}var Am={gql:Ae,resetCaches:v1e,disableFragmentWarnings:y1e,enableExperimentalFragmentVariables:b1e,disableExperimentalFragmentVariables:O1e};(function(t){t.gql=Am.gql,t.resetCaches=Am.resetCaches,t.disableFragmentWarnings=Am.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Am.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Am.disableExperimentalFragmentVariables})(Ae||(Ae={}));Ae.default=Ae;var DT={exports:{}},t4;function w1e(){return t4||(t4=1,function(t){t.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,t.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,t.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(t.exports,ob())}(DT)),DT.exports}var xu=w1e();const S1e=Uu(xu),x1e=yx({__proto__:null,default:S1e},[xu]);var r4=R2?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function P1e(){xt("createContext"in x1e,45);var t=xu.createContext[r4];return t||(Object.defineProperty(xu.createContext,r4,{value:t=xu.createContext({}),enumerable:!1,writable:!1,configurable:!0}),t.displayName="ApolloContext"),t}var k1e=function(t){var e=t.client,r=t.children,n=P1e(),i=xu.useContext(n),o=xu.useMemo(function(){return ge(ge({},i),{client:e||i.client})},[i,e]);return xt(o.client,46),xu.createElement(n.Provider,{value:o},r)};function C1e(t){return new Cc(function(e,r){var n=pc(e,[]);return new Nr(function(i){var o,a=!1;return Promise.resolve(n).then(function(s){return t(s,e.getContext())}).then(e.setContext).then(function(){a||(o=r(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){a=!0,o&&o.unsubscribe()}})})}function eX(t){return new Cc(function(e,r){return new Nr(function(n){var i,o,a;try{i=r(e).subscribe({next:function(s){if(s.errors&&(a=t({graphQLErrors:s.errors,response:s,operation:e,forward:r}),a)){o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.next(s)},error:function(s){if(a=t({operation:e,networkError:s,graphQLErrors:s&&s.result&&s.result.errors,forward:r}),a){o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.error(s)},complete:function(){a||n.complete.bind(n)()}})}catch(s){t({networkError:s,operation:e,forward:r}),n.error(s)}return function(){i&&i.unsubscribe(),o&&i.unsubscribe()}})})}(function(t){Ts(e,t);function e(r){var n=t.call(this)||this;return n.link=eX(r),n}return e.prototype.request=function(r,n){return this.link.request(r,n)},e})(Cc);const T1e={BASE_URL:"/",DEV:!1,GIT_BRANCH_NAME:"HEAD",GIT_COMMIT_HASH:"58754ca",MODE:"production",PACKAGE_VERSION:"1.7.1",PROD:!0,REACT_APP_ENDPOINT_HOST:"",REACT_APP_ENDPOINT_PORT:"",REACT_APP_ENDPOINT_SERVER_URL:"/endpoint",REACT_APP_GRAPHQL_SERVER_URL:"/graphql",REACT_APP_SWAGGER_SERVER_URL:"/api",SSR:!1},E1e=t=>{var n;const e=(n=window.__env__)==null?void 0:n[t],r=T1e[t];return e||r},H2="/",tX="sandbox",Nf="login",rX="logout",hP="signup",nX="username",iX="github",oX="google",aX="completed",_1e="confirm",Pu="app",ku=":organizationId",Cu=":projectName",Tu=":branchName",pP="-/draft",sX="-/:revisionId",_v=":tableId",lX=":rowId";var dn=(t=>(t.Organization="organization",t.Project="project",t.Branch="branch",t.DraftRevision="draftRevision",t.HeadRevision="headRevision",t.SpecificRevision="specificRevision",t.DraftTable="draftTable",t.HeadTable="headTable",t.SpecificTable="specificTable",t.DraftRow="draftRow",t.HeadRow="headRow",t.SpecificRow="specificRow",t))(dn||{});const gg=({hideSidebar:t,sidebar:e,title:r,actions:n,children:i})=>P.jsxs(Te,{minHeight:"100vh",children:[!t&&P.jsxs(Te,{backgroundColor:"gray.50",borderRight:"1px solid",borderRightColor:"gray.200",flexDirection:"column",justifyContent:e?"space-between":"flex-end",padding:"1rem",width:"250px",height:"100vh",top:0,position:"sticky",children:[P.jsx(ze,{children:e}),P.jsx(ze,{alignSelf:"center",children:P.jsx(Ua,{to:`/${rX}`,children:P.jsx(gb,{color:"gray.400",alignSelf:"center",children:"Logout"})})})]}),P.jsxs(Te,{alignItems:"center",flex:1,flexDirection:"column",width:"100%",children:[(r||n)&&P.jsxs(Te,{alignItems:"center",backgroundColor:"white",borderBottom:"1px solid",borderBottomColor:"gray.50",justifyContent:"space-between",maxWidth:"900px",padding:"8px",width:"100%",position:"sticky",zIndex:1,top:0,children:[r,n]}),P.jsx(Te,{flex:1,flexDirection:"column",maxWidth:"900px",padding:"1rem 1rem 0rem 1rem",width:"100%",children:i})]})]});var cX={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},n4=Qe.createContext&&Qe.createContext(cX),R1e=["attr","size","title"];function I1e(t,e){if(t==null)return{};var r=$1e(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function $1e(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function mS(){return mS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},mS.apply(this,arguments)}function i4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vS(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?i4(Object(r),!0).forEach(function(n){A1e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i4(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function A1e(t,e,r){return e=M1e(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function M1e(t){var e=N1e(t,"string");return typeof e=="symbol"?e:e+""}function N1e(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function uX(t){return t&&t.map((e,r)=>Qe.createElement(e.tag,vS({key:r},e.attr),uX(e.child)))}function er(t){return e=>Qe.createElement(j1e,mS({attr:vS({},t.attr)},e),uX(t.child))}function j1e(t){var e=r=>{var{attr:n,size:i,title:o}=t,a=I1e(t,R1e),s=i||r.size||"1em",l;return r.className&&(l=r.className),t.className&&(l=(l?l+" ":"")+t.className),Qe.createElement("svg",mS({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:l,style:vS(vS({color:t.color||r.color},r.style),t.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&Qe.createElement("title",null,o),t.children)};return n4!==void 0?Qe.createElement(n4.Consumer,null,r=>e(r)):e(cX)}function dX(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"},child:[]}]})(t)}function fX(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"},child:[]}]})(t)}function D1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M108,60A16,16,0,1,1,92,44,16,16,0,0,1,108,60Zm56,16a16,16,0,1,0-16-16A16,16,0,0,0,164,76ZM92,112a16,16,0,1,0,16,16A16,16,0,0,0,92,112Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,112ZM92,180a16,16,0,1,0,16,16A16,16,0,0,0,92,180Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,180Z"},child:[]}]})(t)}function L1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M112,60a16,16,0,1,1,16,16A16,16,0,0,1,112,60Zm16,52a16,16,0,1,0,16,16A16,16,0,0,0,128,112Zm0,68a16,16,0,1,0,16,16A16,16,0,0,0,128,180Z"},child:[]}]})(t)}function Q1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"},child:[]}]})(t)}function X2(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"},child:[]}]})(t)}function hX(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M216,104v8a56.06,56.06,0,0,1-48.44,55.47A39.8,39.8,0,0,1,176,192v40a8,8,0,0,1-8,8H104a8,8,0,0,1-8-8V216H72a40,40,0,0,1-40-40A24,24,0,0,0,8,152a8,8,0,0,1,0-16,40,40,0,0,1,40,40,24,24,0,0,0,24,24H96v-8a39.8,39.8,0,0,1,8.44-24.53A56.06,56.06,0,0,1,56,112v-8a58.14,58.14,0,0,1,7.69-28.32A59.78,59.78,0,0,1,69.07,28,8,8,0,0,1,76,24a59.75,59.75,0,0,1,48,24h24a59.75,59.75,0,0,1,48-24,8,8,0,0,1,6.93,4,59.74,59.74,0,0,1,5.37,47.68A58,58,0,0,1,216,104Z"},child:[]}]})(t)}function pX(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,24A104,104,0,1,0,232,128,104,104,0,0,0,128,24Zm0,184A80,80,0,1,1,181.34,68.37a8,8,0,0,1-10.67,11.92A64,64,0,1,0,191.5,136H128a8,8,0,0,1,0-16h72a8,8,0,0,1,8,8A80.09,80.09,0,0,1,128,208Z"},child:[]}]})(t)}function V1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"},child:[]}]})(t)}function Z2(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"},child:[]}]})(t)}function o4(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"},child:[]}]})(t)}function F1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"},child:[]}]})(t)}function gP(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"},child:[]}]})(t)}function B1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"},child:[]}]})(t)}function Ab(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"},child:[]}]})(t)}function z1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"},child:[]}]})(t)}function q1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm34.83-86.83a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L124,158.34V88a4,4,0,0,1,8,0v70.34l25.17-25.17A4,4,0,0,1,162.83,133.17Z"},child:[]}]})(t)}function W1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm42.83-94.83a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L158.34,132H88a4,4,0,0,1,0-8h70.34L133.17,98.83a4,4,0,0,1,5.66-5.66Z"},child:[]}]})(t)}function U1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z"},child:[]}]})(t)}function H1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z"},child:[]}]})(t)}function X1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M35.89,128C52,136.23,52,155.64,52,172c0,24.8,1.35,40,28,40a4,4,0,0,1,0,8c-36,0-36-26.61-36-48,0-24.8-1.35-40-28-40a4,4,0,0,1,0-8c26.65,0,28-15.2,28-40,0-21.39,0-48,36-48a4,4,0,0,1,0,8C53.35,44,52,59.2,52,84,52,100.36,52,119.77,35.89,128ZM240,124c-26.65,0-28-15.2-28-40,0-21.39,0-48-36-48a4,4,0,0,0,0,8c26.65,0,28,15.2,28,40,0,16.36,0,35.77,16.11,44C204,136.23,204,155.64,204,172c0,24.8-1.35,40-28,40a4,4,0,0,0,0,8c36,0,36-26.61,36-48,0-24.8,1.35-40,28-40a4,4,0,0,0,0-8Z"},child:[]}]})(t)}function Z1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"},child:[]}]})(t)}function G1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M155.87,36.06a4,4,0,0,1-3.87,3,4.29,4.29,0,0,1-1-.13,92,92,0,0,0-46,0,4,4,0,0,1-2-7.74,100.09,100.09,0,0,1,50,0A4,4,0,0,1,155.87,36.06ZM56.65,57.94a100.18,100.18,0,0,0-25,43.29,4,4,0,0,0,7.71,2.14,92.06,92.06,0,0,1,23-39.82,4,4,0,1,0-5.7-5.61ZM39.36,152.62a4,4,0,0,0-7.71,2.14,100.08,100.08,0,0,0,25,43.31,4,4,0,1,0,5.71-5.61A91.91,91.91,0,0,1,39.36,152.62ZM151,217.09a92,92,0,0,1-46,0,4,4,0,0,0-2,7.75,100,100,0,0,0,50,0,4,4,0,1,0-2-7.74Zm70.58-67.25a4,4,0,0,0-4.92,2.79,92.12,92.12,0,0,1-23,39.82,4,4,0,1,0,5.7,5.61,100.18,100.18,0,0,0,25-43.29A4,4,0,0,0,221.58,149.84Zm-4.94-46.46a4,4,0,0,0,7.71-2.14,100.08,100.08,0,0,0-25-43.31,4,4,0,1,0-5.71,5.61A91.91,91.91,0,0,1,216.64,103.38Z"},child:[]}]})(t)}function a4(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z"},child:[]}]})(t)}function Y1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M192.14,42.55C174.94,33.17,152.16,28,128,28S81.06,33.17,63.86,42.55C45.89,52.35,36,65.65,36,80v96c0,14.35,9.89,27.65,27.86,37.45,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c18-9.8,27.86-23.1,27.86-37.45V80C220,65.65,210.11,52.35,192.14,42.55ZM212,176c0,11.29-8.41,22.1-23.69,30.43C172.27,215.18,150.85,220,128,220s-44.27-4.82-60.31-13.57C52.41,198.1,44,187.29,44,176V149.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm0-48c0,11.29-8.41,22.1-23.69,30.43C172.27,167.18,150.85,172,128,172s-44.27-4.82-60.31-13.57C52.41,150.1,44,139.29,44,128V101.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm-23.69-17.57C172.27,119.18,150.85,124,128,124s-44.27-4.82-60.31-13.57C52.41,102.1,44,91.29,44,80s8.41-22.1,23.69-30.43C83.73,40.82,105.15,36,128,36s44.27,4.82,60.31,13.57C203.59,57.9,212,68.71,212,80S203.59,102.1,188.31,110.43Z"},child:[]}]})(t)}function K1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,100a28,28,0,1,0,28,28A28,28,0,0,0,128,100Zm0,48a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"},child:[]}]})(t)}function J1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"},child:[]}]})(t)}function gX(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M236,88.12a50.44,50.44,0,0,1-14.81,34.31l-34.75,34.74A50.33,50.33,0,0,1,150.62,172h-.05A50.63,50.63,0,0,1,100,120a4,4,0,0,1,4-3.89h.11a4,4,0,0,1,3.89,4.11A42.64,42.64,0,0,0,150.58,164h0a42.32,42.32,0,0,0,30.14-12.49l34.75-34.74a42.63,42.63,0,1,0-60.29-60.28l-11,11a4,4,0,0,1-5.66-5.65l11-11A50.64,50.64,0,0,1,236,88.12ZM111.78,188.49l-11,11A42.33,42.33,0,0,1,70.6,212h0a42.63,42.63,0,0,1-30.11-72.77l34.75-34.74A42.63,42.63,0,0,1,148,135.82a4,4,0,0,0,8,.23A50.64,50.64,0,0,0,69.55,98.83L34.8,133.57A50.63,50.63,0,0,0,70.56,220h0a50.33,50.33,0,0,0,35.81-14.83l11-11a4,4,0,1,0-5.65-5.66Z"},child:[]}]})(t)}function eSe(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M234.83,21.17a4,4,0,0,0-5.66,0L173.94,76.4l-8.2-8.2a28,28,0,0,0-39.6,0L100,94.34l-9.17-9.17a4,4,0,0,0-5.66,5.66L94.34,100,68.2,126.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L82.06,179.6l8.2,8.2a28,28,0,0,0,39.6,0L156,161.66l9.17,9.17a4,4,0,0,0,5.66-5.66L161.66,156l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,55.23-55.23A4,4,0,0,0,234.83,21.17Zm-110.63,161a20,20,0,0,1-28.28,0L73.86,160.08a20,20,0,0,1,0-28.28L100,105.66,150.34,156Zm57.94-57.94L156,150.34,105.66,100,131.8,73.86a20,20,0,0,1,28.28,0l22.06,22.06A20,20,0,0,1,182.14,124.2ZM92.29,33.49a4,4,0,1,1,7.42-3l8,20a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,104,56a4,4,0,0,1-3.71-2.51Zm-64,61a4,4,0,0,1,5.2-2.22l20,8A4,4,0,0,1,52,108a3.91,3.91,0,0,1-1.49-.29l-20-8A4,4,0,0,1,28.29,94.51Zm199.42,67A4,4,0,0,1,224,164a3.91,3.91,0,0,1-1.49-.29l-20-8a4,4,0,1,1,3-7.42l20,8A4,4,0,0,1,227.71,161.49Zm-64,61a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,160,228a4,4,0,0,1-3.71-2.51l-8-20a4,4,0,0,1,7.42-3Z"},child:[]}]})(t)}function tSe(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M146.83,141.17a4,4,0,0,0-5.66,0L120,162.34,93.66,136l21.17-21.17a4,4,0,0,0-5.66-5.66L88,130.34,66.83,109.17a4,4,0,0,0-5.66,5.66L70.34,124,44.2,150.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L58.06,203.6l8.2,8.2a28,28,0,0,0,39.6,0L132,185.66l9.17,9.17a4,4,0,0,0,5.66-5.66L125.66,168l21.17-21.17A4,4,0,0,0,146.83,141.17Zm-46.63,65a20,20,0,0,1-28.28,0L49.86,184.08a20,20,0,0,1,0-28.28L76,129.66,126.34,180Zm134.63-185a4,4,0,0,0-5.66,0L197.94,52.4l-8.2-8.2a28,28,0,0,0-39.6,0L124,70.34l-9.17-9.17a4,4,0,0,0-5.66,5.66l80,80a4,4,0,0,0,5.66-5.66L185.66,132l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,31.23-31.23A4,4,0,0,0,234.83,21.17ZM212,86.06a19.86,19.86,0,0,1-5.86,14.14L180,126.34,129.66,76,155.8,49.86a20,20,0,0,1,28.28,0l22.06,22.06A19.85,19.85,0,0,1,212,86.06Z"},child:[]}]})(t)}function rSe(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M234.83,109.17l-80-80A4,4,0,0,0,148,32V76.09c-54,2.44-120.43,53.55-127.94,119a7.87,7.87,0,0,0,4.58,8.16,8,8,0,0,0,3.41.77,7.9,7.9,0,0,0,5.79-2.55h0c11.53-12.27,53.29-51.73,114.16-53.4V192a4,4,0,0,0,6.83,2.83l80-80A4,4,0,0,0,234.83,109.17ZM156,182.33V144a4,4,0,0,0-4-4c-27.39,0-54.08,7.17-79.34,21.3A189.91,189.91,0,0,0,28,196l2.92,2.74L28,196c3.36-29.21,19.55-57.48,45.6-79.57C97.53,96.11,126.83,84,152,84a4,4,0,0,0,4-4V41.66L226.34,112Z"},child:[]}]})(t)}function nSe(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M176,148h32a12,12,0,0,0,12-12V104a12,12,0,0,0-12-12H176a12,12,0,0,0-12,12v12H84V76H96a12,12,0,0,0,12-12V32A12,12,0,0,0,96,20H64A12,12,0,0,0,52,32V64A12,12,0,0,0,64,76H76V192a20,20,0,0,0,20,20h68v12a12,12,0,0,0,12,12h32a12,12,0,0,0,12-12V192a12,12,0,0,0-12-12H176a12,12,0,0,0-12,12v12H96a12,12,0,0,1-12-12V124h80v12A12,12,0,0,0,176,148ZM60,64V32a4,4,0,0,1,4-4H96a4,4,0,0,1,4,4V64a4,4,0,0,1-4,4H64A4,4,0,0,1,60,64ZM172,192a4,4,0,0,1,4-4h32a4,4,0,0,1,4,4v32a4,4,0,0,1-4,4H176a4,4,0,0,1-4-4Zm0-88a4,4,0,0,1,4-4h32a4,4,0,0,1,4,4v32a4,4,0,0,1-4,4H176a4,4,0,0,1-4-4Z"},child:[]}]})(t)}function iSe(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H80a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H176a4,4,0,0,1,0-8h48A12,12,0,0,1,236,136ZM82.83,74.83,124,33.66V128a4,4,0,0,0,8,0V33.66l41.17,41.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z"},child:[]}]})(t)}function G2(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"},child:[]}]})(t)}const sl=({height:t="2.5rem",title:e,onClick:r,disabled:n,isSelected:i,isLoading:o,icon:a,dataTestId:s})=>P.jsx(ag,{"data-testid":s,_hover:{color:"gray.400",backgroundColor:"white"},_disabled:i?{backgroundColor:"gray.50",cursor:"not-allowed"}:void 0,alignSelf:"flex-start",color:"gray.300",fontWeight:"500",fontSize:16,height:t,disabled:n||i,loading:o,variant:"ghost",onClick:r,children:P.jsxs(Te,{alignItems:"center",gap:"0.5rem",children:[a&&P.jsx(sg,{size:"sm",children:a}),P.jsx(dt,{children:e})]})}),mg=t=>P.jsx(sl,{...t,icon:P.jsx(Q1e,{})}),Mb=({height:t="2.5rem",loading:e,isDisabled:r,onClick:n,title:i,dataTestId:o})=>P.jsxs(ag,{"data-testid":o,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",color:"gray.400",height:t,loading:e,disabled:r,variant:"ghost",onClick:n,width:"48px",children:[P.jsx(sg,{size:"sm",mr:i?8:0,children:P.jsx(fX,{})}),i]}),Nb=({height:t="2.5rem",onClick:e,disabled:r,dataTestId:n})=>P.jsx(ag,{"data-testid":n,disabled:r,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",color:"gray.400",height:t,variant:"ghost",onClick:e,width:"48px",children:P.jsx(sg,{size:"md",children:P.jsx(z1e,{})})}),mX=({dataTestId:t,...e})=>P.jsx(Ti,{"data-testid":t,_hover:{backgroundColor:"gray.100"},color:"gray.400",variant:"ghost",size:"lg",width:"40px",height:"40px",...e,children:P.jsx(L1e,{})}),oSe=({dataTestId:t,...e})=>P.jsx(Ti,{"data-testid":t,_hover:{backgroundColor:"gray.50"},color:"gray.400",variant:"ghost",size:"sm",...e,children:P.jsx(gP,{})}),nc=({value:t,placeholder:e,autoFocus:r,onChange:n,onBlur:i,onEnter:o,width:a,height:s,type:l,dataTestId:c,autoComplete:d})=>{const p=yX();return P.jsx(tW,{autoComplete:d,"data-testid":c,borderColor:"gray.100",padding:"0 9px",placeholder:e,ref:r?p:void 0,value:t,variant:"outline",onChange:n,onBlur:i,width:a,height:s,type:l,onKeyDown:o?g=>{g.key==="Enter"&&o()}:void 0})},ef=rde({placement:"top",pauseOnPageIdle:!0}),s4=()=>P.jsx(Ku,{children:P.jsx(Jge,{toaster:ef,insetInline:{mdDown:"4"},children:t=>P.jsxs(eme,{width:{md:"sm"},children:[t.type==="loading"?P.jsx(Bx,{size:"sm",color:"blue.solid"}):P.jsx(ame,{}),P.jsxs(K9,{gap:"1",flex:"1",maxWidth:"100%",children:[t.title&&P.jsx(rme,{children:t.title}),t.description&&P.jsx(nme,{children:t.description})]}),t.action&&P.jsx(ime,{children:t.action.label}),t.closable&&P.jsx(tme,{})]})})}),vX=A.forwardRef(function(e,r){const{showArrow:n,children:i,disabled:o,portalled:a=!0,content:s,contentProps:l,portalRef:c,...d}=e;return o?i:P.jsxs(dW,{...d,children:[P.jsx(fW,{asChild:!0,children:i}),P.jsx(Ku,{disabled:!a,container:c,children:P.jsx(hW,{children:P.jsxs(pW,{ref:r,...l,children:[n&&P.jsx(sme,{children:P.jsx(gW,{})}),s]})})})]})}),aSe=$H({uri:E1e("REACT_APP_GRAPHQL_SERVER_URL")}),sSe=C1e(async()=>({headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})),lSe=eX(({graphQLErrors:t})=>{if(t)for(const e of t)ef.info({duration:3e3,description:e.message})}),_r=new YH({connectToDevTools:!0,link:hwe([sSe,lSe,aSe]),cache:new HH({typePolicies:{TableModel:{keyFields:["versionId"]},RowModel:{keyFields:["versionId"]}}}),defaultOptions:{watchQuery:{fetchPolicy:"cache-and-network"}}});_r.cache;const yX=()=>A.useCallback(t=>{t&&t.focus()},[]),jf=(t,...e)=>{const r=A.useRef(null),[n,i]=A.useState(e),o=A.useMemo(()=>n.length!==e.length||n.some((a,s)=>a!==e[s])?(i(e),e):n,[e,n]);return r.current||(r.current=ft.get(t)),A.useEffect(()=>{var s;const a=r.current;return(s=a==null?void 0:a.init)==null||s.call(a,...o),()=>{var l;(l=a==null?void 0:a.dispose)==null||l.call(a)}},[o]),r.current};class cSe{constructor(){de(this,"registrations",new Map)}register(e,r,n){this.registrations.set(e,{factory:r,scope:n.scope})}get(e){const r=this.registrations.get(e);if(!r)throw new Error(`No provider found for ${e.name}`);return r.scope==="singleton"?(r.instance||(r.instance=r.factory()),r.instance):r.factory()}}const ft=new cSe;class Y2{constructor(e){de(this,"values");this.values=e,lt(this,{},{autoBind:!0})}setValue(e,r){this.values[e]=r}get isValid(){return Object.values(this.values).every(e=>!!e)}}const K2=JSON,uSe=t=>t.toUpperCase(),dSe=t=>{const e={};return t.forEach((r,n)=>{e[n]=r}),e},fSe=(t,e,r)=>t.document?t:{document:t,variables:e,requestHeaders:r,signal:void 0},hSe=(t,e,r)=>t.query?t:{query:t,variables:e,requestHeaders:r,signal:void 0},pSe=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},l4=t=>{var n,i;let e;const r=t.definitions.filter(o=>o.kind==="OperationDefinition");return r.length===1&&(e=(i=(n=r[0])==null?void 0:n.name)==null?void 0:i.value),e},LT=t=>{if(typeof t=="string"){let r;try{const n=YU(t);r=l4(n)}catch{}return{query:t,operationName:r}}const e=l4(t);return{query:_2(t),operationName:e}};class Rv extends Error{constructor(e,r){const n=`${Rv.extractMessage(e)}: ${JSON.stringify({response:e,request:r})}`;super(n),Object.setPrototypeOf(this,Rv.prototype),this.response=e,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Rv)}static extractMessage(e){var r,n;return((n=(r=e.errors)==null?void 0:r[0])==null?void 0:n.message)??`GraphQL Error (Code: ${e.status})`}}var av={exports:{}},gSe=av.exports,c4;function mSe(){return c4||(c4=1,function(t,e){var r=typeof self<"u"?self:gSe,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(a){var s={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function l(D){return D&&DataView.prototype.isPrototypeOf(D)}if(s.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(D){return D&&c.indexOf(Object.prototype.toString.call(D))>-1};function p(D){if(typeof D!="string"&&(D=String(D)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(D))throw new TypeError("Invalid character in header field name");return D.toLowerCase()}function g(D){return typeof D!="string"&&(D=String(D)),D}function m(D){var F={next:function(){var Y=D.shift();return{done:Y===void 0,value:Y}}};return s.iterable&&(F[Symbol.iterator]=function(){return F}),F}function y(D){this.map={},D instanceof y?D.forEach(function(F,Y){this.append(Y,F)},this):Array.isArray(D)?D.forEach(function(F){this.append(F[0],F[1])},this):D&&Object.getOwnPropertyNames(D).forEach(function(F){this.append(F,D[F])},this)}y.prototype.append=function(D,F){D=p(D),F=g(F);var Y=this.map[D];this.map[D]=Y?Y+", "+F:F},y.prototype.delete=function(D){delete this.map[p(D)]},y.prototype.get=function(D){return D=p(D),this.has(D)?this.map[D]:null},y.prototype.has=function(D){return this.map.hasOwnProperty(p(D))},y.prototype.set=function(D,F){this.map[p(D)]=g(F)},y.prototype.forEach=function(D,F){for(var Y in this.map)this.map.hasOwnProperty(Y)&&D.call(F,this.map[Y],Y,this)},y.prototype.keys=function(){var D=[];return this.forEach(function(F,Y){D.push(Y)}),m(D)},y.prototype.values=function(){var D=[];return this.forEach(function(F){D.push(F)}),m(D)},y.prototype.entries=function(){var D=[];return this.forEach(function(F,Y){D.push([Y,F])}),m(D)},s.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function b(D){if(D.bodyUsed)return Promise.reject(new TypeError("Already read"));D.bodyUsed=!0}function O(D){return new Promise(function(F,Y){D.onload=function(){F(D.result)},D.onerror=function(){Y(D.error)}})}function S(D){var F=new FileReader,Y=O(F);return F.readAsArrayBuffer(D),Y}function w(D){var F=new FileReader,Y=O(F);return F.readAsText(D),Y}function k(D){for(var F=new Uint8Array(D),Y=new Array(F.length),ie=0;ie<F.length;ie++)Y[ie]=String.fromCharCode(F[ie]);return Y.join("")}function T(D){if(D.slice)return D.slice(0);var F=new Uint8Array(D.byteLength);return F.set(new Uint8Array(D)),F.buffer}function C(){return this.bodyUsed=!1,this._initBody=function(D){this._bodyInit=D,D?typeof D=="string"?this._bodyText=D:s.blob&&Blob.prototype.isPrototypeOf(D)?this._bodyBlob=D:s.formData&&FormData.prototype.isPrototypeOf(D)?this._bodyFormData=D:s.searchParams&&URLSearchParams.prototype.isPrototypeOf(D)?this._bodyText=D.toString():s.arrayBuffer&&s.blob&&l(D)?(this._bodyArrayBuffer=T(D.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(D)||d(D))?this._bodyArrayBuffer=T(D):this._bodyText=D=Object.prototype.toString.call(D):this._bodyText="",this.headers.get("content-type")||(typeof D=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s.searchParams&&URLSearchParams.prototype.isPrototypeOf(D)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s.blob&&(this.blob=function(){var D=b(this);if(D)return D;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?b(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(S)}),this.text=function(){var D=b(this);if(D)return D;if(this._bodyBlob)return w(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(k(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(M)}),this.json=function(){return this.text().then(JSON.parse)},this}var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(D){var F=D.toUpperCase();return E.indexOf(F)>-1?F:D}function $(D,F){F=F||{};var Y=F.body;if(D instanceof $){if(D.bodyUsed)throw new TypeError("Already read");this.url=D.url,this.credentials=D.credentials,F.headers||(this.headers=new y(D.headers)),this.method=D.method,this.mode=D.mode,this.signal=D.signal,!Y&&D._bodyInit!=null&&(Y=D._bodyInit,D.bodyUsed=!0)}else this.url=String(D);if(this.credentials=F.credentials||this.credentials||"same-origin",(F.headers||!this.headers)&&(this.headers=new y(F.headers)),this.method=_(F.method||this.method||"GET"),this.mode=F.mode||this.mode||null,this.signal=F.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Y)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(Y)}$.prototype.clone=function(){return new $(this,{body:this._bodyInit})};function M(D){var F=new FormData;return D.trim().split("&").forEach(function(Y){if(Y){var ie=Y.split("="),H=ie.shift().replace(/\+/g," "),ne=ie.join("=").replace(/\+/g," ");F.append(decodeURIComponent(H),decodeURIComponent(ne))}}),F}function j(D){var F=new y,Y=D.replace(/\r?\n[\t ]+/g," ");return Y.split(/\r?\n/).forEach(function(ie){var H=ie.split(":"),ne=H.shift().trim();if(ne){var z=H.join(":").trim();F.append(ne,z)}}),F}C.call($.prototype);function B(D,F){F||(F={}),this.type="default",this.status=F.status===void 0?200:F.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in F?F.statusText:"OK",this.headers=new y(F.headers),this.url=F.url||"",this._initBody(D)}C.call(B.prototype),B.prototype.clone=function(){return new B(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},B.error=function(){var D=new B(null,{status:0,statusText:""});return D.type="error",D};var V=[301,302,303,307,308];B.redirect=function(D,F){if(V.indexOf(F)===-1)throw new RangeError("Invalid status code");return new B(null,{status:F,headers:{location:D}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(F,Y){this.message=F,this.name=Y;var ie=Error(F);this.stack=ie.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function X(D,F){return new Promise(function(Y,ie){var H=new $(D,F);if(H.signal&&H.signal.aborted)return ie(new a.DOMException("Aborted","AbortError"));var ne=new XMLHttpRequest;function z(){ne.abort()}ne.onload=function(){var N={status:ne.status,statusText:ne.statusText,headers:j(ne.getAllResponseHeaders()||"")};N.url="responseURL"in ne?ne.responseURL:N.headers.get("X-Request-URL");var U="response"in ne?ne.response:ne.responseText;Y(new B(U,N))},ne.onerror=function(){ie(new TypeError("Network request failed"))},ne.ontimeout=function(){ie(new TypeError("Network request failed"))},ne.onabort=function(){ie(new a.DOMException("Aborted","AbortError"))},ne.open(H.method,H.url,!0),H.credentials==="include"?ne.withCredentials=!0:H.credentials==="omit"&&(ne.withCredentials=!1),"responseType"in ne&&s.blob&&(ne.responseType="blob"),H.headers.forEach(function(N,U){ne.setRequestHeader(U,N)}),H.signal&&(H.signal.addEventListener("abort",z),ne.onreadystatechange=function(){ne.readyState===4&&H.signal.removeEventListener("abort",z)}),ne.send(typeof H._bodyInit>"u"?null:H._bodyInit)})}return X.polyfill=!0,o.fetch||(o.fetch=X,o.Headers=y,o.Request=$,o.Response=B),a.Headers=y,a.Request=$,a.Response=B,a.fetch=X,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e}(av,av.exports)),av.exports}var yS=mSe();const S1=Uu(yS),vSe=yx({__proto__:null,default:S1},[yS]),Ph=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||vSe&&yS.Headers&&t instanceof yS.Headers?e=dSe(t):Array.isArray(t)?t.forEach(([r,n])=>{r&&n!==void 0&&(e[r]=n)}):e=t),e},u4=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),ySe=t=>{if(!Array.isArray(t.query)){const n=t,i=[`query=${encodeURIComponent(u4(n.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,r=t.query.reduce((n,i,o)=>(n.push({query:u4(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),n),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(r))}`},bSe=t=>async e=>{const{url:r,query:n,variables:i,operationName:o,fetch:a,fetchOptions:s,middleware:l}=e,c={...e.headers};let d="",p;t==="POST"?(p=wSe(n,i,o,s.jsonSerializer),typeof p=="string"&&(c["Content-Type"]="application/json")):d=ySe({query:n,variables:i,operationName:o,jsonSerializer:s.jsonSerializer??K2});const g={method:t,headers:c,body:p,...s};let m=r,y=g;if(l){const b=await Promise.resolve(l({...g,url:r,operationName:o,variables:i})),{url:O,...S}=b;m=O,y=S}return d&&(m=`${m}?${d}`),await a(m,y)};class OSe{constructor(e,r={}){this.url=e,this.requestConfig=r,this.rawRequest=async(...n)=>{const[i,o,a]=n,s=hSe(i,o,a),{headers:l,fetch:c=S1,method:d="POST",requestMiddleware:p,responseMiddleware:g,...m}=this.requestConfig,{url:y}=this;s.signal!==void 0&&(m.signal=s.signal);const{operationName:b}=LT(s.query);return QT({url:y,query:s.query,variables:s.variables,headers:{...Ph(VT(l)),...Ph(s.requestHeaders)},operationName:b,fetch:c,method:d,fetchOptions:m,middleware:p}).then(O=>(g&&g(O),O)).catch(O=>{throw g&&g(O),O})}}async request(e,...r){const[n,i]=r,o=fSe(e,n,i),{headers:a,fetch:s=S1,method:l="POST",requestMiddleware:c,responseMiddleware:d,...p}=this.requestConfig,{url:g}=this;o.signal!==void 0&&(p.signal=o.signal);const{query:m,operationName:y}=LT(o.document);return QT({url:g,query:m,variables:o.variables,headers:{...Ph(VT(a)),...Ph(o.requestHeaders)},operationName:y,fetch:s,method:l,fetchOptions:p,middleware:c}).then(b=>(d&&d(b),b.data)).catch(b=>{throw d&&d(b),b})}batchRequests(e,r){const n=pSe(e,r),{headers:i,...o}=this.requestConfig;n.signal!==void 0&&(o.signal=n.signal);const a=n.documents.map(({document:l})=>LT(l).query),s=n.documents.map(({variables:l})=>l);return QT({url:this.url,query:a,variables:s,headers:{...Ph(VT(i)),...Ph(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??S1,method:this.requestConfig.method||"POST",fetchOptions:o,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,r){const{headers:n}=this.requestConfig;return n?n[e]=r:this.requestConfig.headers={[e]:r},this}setEndpoint(e){return this.url=e,this}}const QT=async t=>{const{query:e,variables:r,fetchOptions:n}=t,i=bSe(uSe(t.method??"post")),o=Array.isArray(t.query),a=await i(t),s=await SSe(a,n.jsonSerializer??K2),l=Array.isArray(s)?!s.some(({data:d})=>!d):!!s.data,c=Array.isArray(s)||!s.errors||Array.isArray(s.errors)&&!s.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(a.ok&&c&&l){const{errors:d,...p}=(Array.isArray(s),s),g=n.errorPolicy==="ignore"?p:s;return{...o?{data:g}:g,headers:a.headers,status:a.status}}else{const d=typeof s=="string"?{error:s}:s;throw new Rv({...d,status:a.status,headers:a.headers},{query:e,variables:r})}},wSe=(t,e,r,n)=>{const i=n??K2;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:r});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const o=t.reduce((a,s,l)=>(a.push({query:s,variables:e?e[l]:void 0}),a),[]);return i.stringify(o)},SSe=async(t,e)=>{let r;return t.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(r=n)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await t.text()):t.text()},VT=t=>typeof t=="function"?t():t;Ae`
|
|
149
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||RR.set(i,a=new Set),a.add(o),e.has(o)||(e.add(o),r.push(n))}else r.push(n)}),ge(ge({},t),{definitions:r})}function g1e(t){var e=new Set(t.definitions);e.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var o=n[i];o&&typeof o=="object"&&e.add(o)})});var r=t.loc;return r&&(delete r.startToken,delete r.endToken),t}function m1e(t){var e=JH(t);if(!w1.has(e)){var r=YU(t,{experimentalFragmentVariables:gS,allowLegacyFragmentVariables:gS});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");w1.set(e,g1e(p1e(r)))}return w1.get(e)}function Ae(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];typeof t=="string"&&(t=[t]);var n=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=t[o+1]}),m1e(n)}function v1e(){w1.clear(),RR.clear()}function y1e(){KH=!1}function b1e(){gS=!0}function O1e(){gS=!1}var Am={gql:Ae,resetCaches:v1e,disableFragmentWarnings:y1e,enableExperimentalFragmentVariables:b1e,disableExperimentalFragmentVariables:O1e};(function(t){t.gql=Am.gql,t.resetCaches=Am.resetCaches,t.disableFragmentWarnings=Am.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Am.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Am.disableExperimentalFragmentVariables})(Ae||(Ae={}));Ae.default=Ae;var DT={exports:{}},t4;function w1e(){return t4||(t4=1,function(t){t.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,t.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,t.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(t.exports,ob())}(DT)),DT.exports}var xu=w1e();const S1e=Uu(xu),x1e=yx({__proto__:null,default:S1e},[xu]);var r4=R2?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function P1e(){xt("createContext"in x1e,45);var t=xu.createContext[r4];return t||(Object.defineProperty(xu.createContext,r4,{value:t=xu.createContext({}),enumerable:!1,writable:!1,configurable:!0}),t.displayName="ApolloContext"),t}var k1e=function(t){var e=t.client,r=t.children,n=P1e(),i=xu.useContext(n),o=xu.useMemo(function(){return ge(ge({},i),{client:e||i.client})},[i,e]);return xt(o.client,46),xu.createElement(n.Provider,{value:o},r)};function C1e(t){return new Cc(function(e,r){var n=pc(e,[]);return new Nr(function(i){var o,a=!1;return Promise.resolve(n).then(function(s){return t(s,e.getContext())}).then(e.setContext).then(function(){a||(o=r(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){a=!0,o&&o.unsubscribe()}})})}function eX(t){return new Cc(function(e,r){return new Nr(function(n){var i,o,a;try{i=r(e).subscribe({next:function(s){if(s.errors&&(a=t({graphQLErrors:s.errors,response:s,operation:e,forward:r}),a)){o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.next(s)},error:function(s){if(a=t({operation:e,networkError:s,graphQLErrors:s&&s.result&&s.result.errors,forward:r}),a){o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.error(s)},complete:function(){a||n.complete.bind(n)()}})}catch(s){t({networkError:s,operation:e,forward:r}),n.error(s)}return function(){i&&i.unsubscribe(),o&&i.unsubscribe()}})})}(function(t){Ts(e,t);function e(r){var n=t.call(this)||this;return n.link=eX(r),n}return e.prototype.request=function(r,n){return this.link.request(r,n)},e})(Cc);const T1e={BASE_URL:"/",DEV:!1,GIT_BRANCH_NAME:"HEAD",GIT_COMMIT_HASH:"f1f9aa5",MODE:"production",PACKAGE_VERSION:"2.0.0",PROD:!0,REACT_APP_ENDPOINT_HOST:"",REACT_APP_ENDPOINT_PORT:"",REACT_APP_ENDPOINT_SERVER_URL:"/endpoint",REACT_APP_GRAPHQL_SERVER_URL:"/graphql",REACT_APP_SWAGGER_SERVER_URL:"/api",SSR:!1},E1e=t=>{var n;const e=(n=window.__env__)==null?void 0:n[t],r=T1e[t];return e||r},H2="/",tX="sandbox",Nf="login",rX="logout",hP="signup",nX="username",iX="github",oX="google",aX="completed",_1e="confirm",Pu="app",ku=":organizationId",Cu=":projectName",Tu=":branchName",pP="-/draft",sX="-/:revisionId",_v=":tableId",lX=":rowId";var dn=(t=>(t.Organization="organization",t.Project="project",t.Branch="branch",t.DraftRevision="draftRevision",t.HeadRevision="headRevision",t.SpecificRevision="specificRevision",t.DraftTable="draftTable",t.HeadTable="headTable",t.SpecificTable="specificTable",t.DraftRow="draftRow",t.HeadRow="headRow",t.SpecificRow="specificRow",t))(dn||{});const gg=({hideSidebar:t,sidebar:e,title:r,actions:n,children:i})=>P.jsxs(Te,{minHeight:"100vh",children:[!t&&P.jsxs(Te,{backgroundColor:"gray.50",borderRight:"1px solid",borderRightColor:"gray.200",flexDirection:"column",justifyContent:e?"space-between":"flex-end",padding:"1rem",width:"250px",height:"100vh",top:0,position:"sticky",children:[P.jsx(ze,{children:e}),P.jsx(ze,{alignSelf:"center",children:P.jsx(Ua,{to:`/${rX}`,children:P.jsx(gb,{color:"gray.400",alignSelf:"center",children:"Logout"})})})]}),P.jsxs(Te,{alignItems:"center",flex:1,flexDirection:"column",width:"100%",children:[(r||n)&&P.jsxs(Te,{alignItems:"center",backgroundColor:"white",borderBottom:"1px solid",borderBottomColor:"gray.50",justifyContent:"space-between",maxWidth:"900px",padding:"8px",width:"100%",position:"sticky",zIndex:1,top:0,children:[r,n]}),P.jsx(Te,{flex:1,flexDirection:"column",maxWidth:"900px",padding:"1rem 1rem 0rem 1rem",width:"100%",children:i})]})]});var cX={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},n4=Qe.createContext&&Qe.createContext(cX),R1e=["attr","size","title"];function I1e(t,e){if(t==null)return{};var r=$1e(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function $1e(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function mS(){return mS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},mS.apply(this,arguments)}function i4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vS(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?i4(Object(r),!0).forEach(function(n){A1e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i4(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function A1e(t,e,r){return e=M1e(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function M1e(t){var e=N1e(t,"string");return typeof e=="symbol"?e:e+""}function N1e(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function uX(t){return t&&t.map((e,r)=>Qe.createElement(e.tag,vS({key:r},e.attr),uX(e.child)))}function er(t){return e=>Qe.createElement(j1e,mS({attr:vS({},t.attr)},e),uX(t.child))}function j1e(t){var e=r=>{var{attr:n,size:i,title:o}=t,a=I1e(t,R1e),s=i||r.size||"1em",l;return r.className&&(l=r.className),t.className&&(l=(l?l+" ":"")+t.className),Qe.createElement("svg",mS({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:l,style:vS(vS({color:t.color||r.color},r.style),t.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&Qe.createElement("title",null,o),t.children)};return n4!==void 0?Qe.createElement(n4.Consumer,null,r=>e(r)):e(cX)}function dX(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"},child:[]}]})(t)}function fX(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"},child:[]}]})(t)}function D1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M108,60A16,16,0,1,1,92,44,16,16,0,0,1,108,60Zm56,16a16,16,0,1,0-16-16A16,16,0,0,0,164,76ZM92,112a16,16,0,1,0,16,16A16,16,0,0,0,92,112Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,112ZM92,180a16,16,0,1,0,16,16A16,16,0,0,0,92,180Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,180Z"},child:[]}]})(t)}function L1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M112,60a16,16,0,1,1,16,16A16,16,0,0,1,112,60Zm16,52a16,16,0,1,0,16,16A16,16,0,0,0,128,112Zm0,68a16,16,0,1,0,16,16A16,16,0,0,0,128,180Z"},child:[]}]})(t)}function Q1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"},child:[]}]})(t)}function X2(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"},child:[]}]})(t)}function hX(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M216,104v8a56.06,56.06,0,0,1-48.44,55.47A39.8,39.8,0,0,1,176,192v40a8,8,0,0,1-8,8H104a8,8,0,0,1-8-8V216H72a40,40,0,0,1-40-40A24,24,0,0,0,8,152a8,8,0,0,1,0-16,40,40,0,0,1,40,40,24,24,0,0,0,24,24H96v-8a39.8,39.8,0,0,1,8.44-24.53A56.06,56.06,0,0,1,56,112v-8a58.14,58.14,0,0,1,7.69-28.32A59.78,59.78,0,0,1,69.07,28,8,8,0,0,1,76,24a59.75,59.75,0,0,1,48,24h24a59.75,59.75,0,0,1,48-24,8,8,0,0,1,6.93,4,59.74,59.74,0,0,1,5.37,47.68A58,58,0,0,1,216,104Z"},child:[]}]})(t)}function pX(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,24A104,104,0,1,0,232,128,104,104,0,0,0,128,24Zm0,184A80,80,0,1,1,181.34,68.37a8,8,0,0,1-10.67,11.92A64,64,0,1,0,191.5,136H128a8,8,0,0,1,0-16h72a8,8,0,0,1,8,8A80.09,80.09,0,0,1,128,208Z"},child:[]}]})(t)}function V1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"},child:[]}]})(t)}function Z2(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"},child:[]}]})(t)}function o4(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"},child:[]}]})(t)}function F1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"},child:[]}]})(t)}function gP(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"},child:[]}]})(t)}function B1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"},child:[]}]})(t)}function Ab(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"},child:[]}]})(t)}function z1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"},child:[]}]})(t)}function q1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm34.83-86.83a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L124,158.34V88a4,4,0,0,1,8,0v70.34l25.17-25.17A4,4,0,0,1,162.83,133.17Z"},child:[]}]})(t)}function W1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm42.83-94.83a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L158.34,132H88a4,4,0,0,1,0-8h70.34L133.17,98.83a4,4,0,0,1,5.66-5.66Z"},child:[]}]})(t)}function U1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z"},child:[]}]})(t)}function H1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z"},child:[]}]})(t)}function X1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M35.89,128C52,136.23,52,155.64,52,172c0,24.8,1.35,40,28,40a4,4,0,0,1,0,8c-36,0-36-26.61-36-48,0-24.8-1.35-40-28-40a4,4,0,0,1,0-8c26.65,0,28-15.2,28-40,0-21.39,0-48,36-48a4,4,0,0,1,0,8C53.35,44,52,59.2,52,84,52,100.36,52,119.77,35.89,128ZM240,124c-26.65,0-28-15.2-28-40,0-21.39,0-48-36-48a4,4,0,0,0,0,8c26.65,0,28,15.2,28,40,0,16.36,0,35.77,16.11,44C204,136.23,204,155.64,204,172c0,24.8-1.35,40-28,40a4,4,0,0,0,0,8c36,0,36-26.61,36-48,0-24.8,1.35-40,28-40a4,4,0,0,0,0-8Z"},child:[]}]})(t)}function Z1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"},child:[]}]})(t)}function G1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M155.87,36.06a4,4,0,0,1-3.87,3,4.29,4.29,0,0,1-1-.13,92,92,0,0,0-46,0,4,4,0,0,1-2-7.74,100.09,100.09,0,0,1,50,0A4,4,0,0,1,155.87,36.06ZM56.65,57.94a100.18,100.18,0,0,0-25,43.29,4,4,0,0,0,7.71,2.14,92.06,92.06,0,0,1,23-39.82,4,4,0,1,0-5.7-5.61ZM39.36,152.62a4,4,0,0,0-7.71,2.14,100.08,100.08,0,0,0,25,43.31,4,4,0,1,0,5.71-5.61A91.91,91.91,0,0,1,39.36,152.62ZM151,217.09a92,92,0,0,1-46,0,4,4,0,0,0-2,7.75,100,100,0,0,0,50,0,4,4,0,1,0-2-7.74Zm70.58-67.25a4,4,0,0,0-4.92,2.79,92.12,92.12,0,0,1-23,39.82,4,4,0,1,0,5.7,5.61,100.18,100.18,0,0,0,25-43.29A4,4,0,0,0,221.58,149.84Zm-4.94-46.46a4,4,0,0,0,7.71-2.14,100.08,100.08,0,0,0-25-43.31,4,4,0,1,0-5.71,5.61A91.91,91.91,0,0,1,216.64,103.38Z"},child:[]}]})(t)}function a4(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z"},child:[]}]})(t)}function Y1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M192.14,42.55C174.94,33.17,152.16,28,128,28S81.06,33.17,63.86,42.55C45.89,52.35,36,65.65,36,80v96c0,14.35,9.89,27.65,27.86,37.45,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c18-9.8,27.86-23.1,27.86-37.45V80C220,65.65,210.11,52.35,192.14,42.55ZM212,176c0,11.29-8.41,22.1-23.69,30.43C172.27,215.18,150.85,220,128,220s-44.27-4.82-60.31-13.57C52.41,198.1,44,187.29,44,176V149.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm0-48c0,11.29-8.41,22.1-23.69,30.43C172.27,167.18,150.85,172,128,172s-44.27-4.82-60.31-13.57C52.41,150.1,44,139.29,44,128V101.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm-23.69-17.57C172.27,119.18,150.85,124,128,124s-44.27-4.82-60.31-13.57C52.41,102.1,44,91.29,44,80s8.41-22.1,23.69-30.43C83.73,40.82,105.15,36,128,36s44.27,4.82,60.31,13.57C203.59,57.9,212,68.71,212,80S203.59,102.1,188.31,110.43Z"},child:[]}]})(t)}function K1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,100a28,28,0,1,0,28,28A28,28,0,0,0,128,100Zm0,48a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"},child:[]}]})(t)}function J1e(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"},child:[]}]})(t)}function gX(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M236,88.12a50.44,50.44,0,0,1-14.81,34.31l-34.75,34.74A50.33,50.33,0,0,1,150.62,172h-.05A50.63,50.63,0,0,1,100,120a4,4,0,0,1,4-3.89h.11a4,4,0,0,1,3.89,4.11A42.64,42.64,0,0,0,150.58,164h0a42.32,42.32,0,0,0,30.14-12.49l34.75-34.74a42.63,42.63,0,1,0-60.29-60.28l-11,11a4,4,0,0,1-5.66-5.65l11-11A50.64,50.64,0,0,1,236,88.12ZM111.78,188.49l-11,11A42.33,42.33,0,0,1,70.6,212h0a42.63,42.63,0,0,1-30.11-72.77l34.75-34.74A42.63,42.63,0,0,1,148,135.82a4,4,0,0,0,8,.23A50.64,50.64,0,0,0,69.55,98.83L34.8,133.57A50.63,50.63,0,0,0,70.56,220h0a50.33,50.33,0,0,0,35.81-14.83l11-11a4,4,0,1,0-5.65-5.66Z"},child:[]}]})(t)}function eSe(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M234.83,21.17a4,4,0,0,0-5.66,0L173.94,76.4l-8.2-8.2a28,28,0,0,0-39.6,0L100,94.34l-9.17-9.17a4,4,0,0,0-5.66,5.66L94.34,100,68.2,126.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L82.06,179.6l8.2,8.2a28,28,0,0,0,39.6,0L156,161.66l9.17,9.17a4,4,0,0,0,5.66-5.66L161.66,156l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,55.23-55.23A4,4,0,0,0,234.83,21.17Zm-110.63,161a20,20,0,0,1-28.28,0L73.86,160.08a20,20,0,0,1,0-28.28L100,105.66,150.34,156Zm57.94-57.94L156,150.34,105.66,100,131.8,73.86a20,20,0,0,1,28.28,0l22.06,22.06A20,20,0,0,1,182.14,124.2ZM92.29,33.49a4,4,0,1,1,7.42-3l8,20a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,104,56a4,4,0,0,1-3.71-2.51Zm-64,61a4,4,0,0,1,5.2-2.22l20,8A4,4,0,0,1,52,108a3.91,3.91,0,0,1-1.49-.29l-20-8A4,4,0,0,1,28.29,94.51Zm199.42,67A4,4,0,0,1,224,164a3.91,3.91,0,0,1-1.49-.29l-20-8a4,4,0,1,1,3-7.42l20,8A4,4,0,0,1,227.71,161.49Zm-64,61a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,160,228a4,4,0,0,1-3.71-2.51l-8-20a4,4,0,0,1,7.42-3Z"},child:[]}]})(t)}function tSe(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M146.83,141.17a4,4,0,0,0-5.66,0L120,162.34,93.66,136l21.17-21.17a4,4,0,0,0-5.66-5.66L88,130.34,66.83,109.17a4,4,0,0,0-5.66,5.66L70.34,124,44.2,150.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L58.06,203.6l8.2,8.2a28,28,0,0,0,39.6,0L132,185.66l9.17,9.17a4,4,0,0,0,5.66-5.66L125.66,168l21.17-21.17A4,4,0,0,0,146.83,141.17Zm-46.63,65a20,20,0,0,1-28.28,0L49.86,184.08a20,20,0,0,1,0-28.28L76,129.66,126.34,180Zm134.63-185a4,4,0,0,0-5.66,0L197.94,52.4l-8.2-8.2a28,28,0,0,0-39.6,0L124,70.34l-9.17-9.17a4,4,0,0,0-5.66,5.66l80,80a4,4,0,0,0,5.66-5.66L185.66,132l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,31.23-31.23A4,4,0,0,0,234.83,21.17ZM212,86.06a19.86,19.86,0,0,1-5.86,14.14L180,126.34,129.66,76,155.8,49.86a20,20,0,0,1,28.28,0l22.06,22.06A19.85,19.85,0,0,1,212,86.06Z"},child:[]}]})(t)}function rSe(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M234.83,109.17l-80-80A4,4,0,0,0,148,32V76.09c-54,2.44-120.43,53.55-127.94,119a7.87,7.87,0,0,0,4.58,8.16,8,8,0,0,0,3.41.77,7.9,7.9,0,0,0,5.79-2.55h0c11.53-12.27,53.29-51.73,114.16-53.4V192a4,4,0,0,0,6.83,2.83l80-80A4,4,0,0,0,234.83,109.17ZM156,182.33V144a4,4,0,0,0-4-4c-27.39,0-54.08,7.17-79.34,21.3A189.91,189.91,0,0,0,28,196l2.92,2.74L28,196c3.36-29.21,19.55-57.48,45.6-79.57C97.53,96.11,126.83,84,152,84a4,4,0,0,0,4-4V41.66L226.34,112Z"},child:[]}]})(t)}function nSe(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M176,148h32a12,12,0,0,0,12-12V104a12,12,0,0,0-12-12H176a12,12,0,0,0-12,12v12H84V76H96a12,12,0,0,0,12-12V32A12,12,0,0,0,96,20H64A12,12,0,0,0,52,32V64A12,12,0,0,0,64,76H76V192a20,20,0,0,0,20,20h68v12a12,12,0,0,0,12,12h32a12,12,0,0,0,12-12V192a12,12,0,0,0-12-12H176a12,12,0,0,0-12,12v12H96a12,12,0,0,1-12-12V124h80v12A12,12,0,0,0,176,148ZM60,64V32a4,4,0,0,1,4-4H96a4,4,0,0,1,4,4V64a4,4,0,0,1-4,4H64A4,4,0,0,1,60,64ZM172,192a4,4,0,0,1,4-4h32a4,4,0,0,1,4,4v32a4,4,0,0,1-4,4H176a4,4,0,0,1-4-4Zm0-88a4,4,0,0,1,4-4h32a4,4,0,0,1,4,4v32a4,4,0,0,1-4,4H176a4,4,0,0,1-4-4Z"},child:[]}]})(t)}function iSe(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H80a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H176a4,4,0,0,1,0-8h48A12,12,0,0,1,236,136ZM82.83,74.83,124,33.66V128a4,4,0,0,0,8,0V33.66l41.17,41.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z"},child:[]}]})(t)}function G2(t){return er({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"},child:[]}]})(t)}const sl=({height:t="2.5rem",title:e,onClick:r,disabled:n,isSelected:i,isLoading:o,icon:a,dataTestId:s})=>P.jsx(ag,{"data-testid":s,_hover:{color:"gray.400",backgroundColor:"white"},_disabled:i?{backgroundColor:"gray.50",cursor:"not-allowed"}:void 0,alignSelf:"flex-start",color:"gray.300",fontWeight:"500",fontSize:16,height:t,disabled:n||i,loading:o,variant:"ghost",onClick:r,children:P.jsxs(Te,{alignItems:"center",gap:"0.5rem",children:[a&&P.jsx(sg,{size:"sm",children:a}),P.jsx(dt,{children:e})]})}),mg=t=>P.jsx(sl,{...t,icon:P.jsx(Q1e,{})}),Mb=({height:t="2.5rem",loading:e,isDisabled:r,onClick:n,title:i,dataTestId:o})=>P.jsxs(ag,{"data-testid":o,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",color:"gray.400",height:t,loading:e,disabled:r,variant:"ghost",onClick:n,width:"48px",children:[P.jsx(sg,{size:"sm",mr:i?8:0,children:P.jsx(fX,{})}),i]}),Nb=({height:t="2.5rem",onClick:e,disabled:r,dataTestId:n})=>P.jsx(ag,{"data-testid":n,disabled:r,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",color:"gray.400",height:t,variant:"ghost",onClick:e,width:"48px",children:P.jsx(sg,{size:"md",children:P.jsx(z1e,{})})}),mX=({dataTestId:t,...e})=>P.jsx(Ti,{"data-testid":t,_hover:{backgroundColor:"gray.100"},color:"gray.400",variant:"ghost",size:"lg",width:"40px",height:"40px",...e,children:P.jsx(L1e,{})}),oSe=({dataTestId:t,...e})=>P.jsx(Ti,{"data-testid":t,_hover:{backgroundColor:"gray.50"},color:"gray.400",variant:"ghost",size:"sm",...e,children:P.jsx(gP,{})}),nc=({value:t,placeholder:e,autoFocus:r,onChange:n,onBlur:i,onEnter:o,width:a,height:s,type:l,dataTestId:c,autoComplete:d})=>{const p=yX();return P.jsx(tW,{autoComplete:d,"data-testid":c,borderColor:"gray.100",padding:"0 9px",placeholder:e,ref:r?p:void 0,value:t,variant:"outline",onChange:n,onBlur:i,width:a,height:s,type:l,onKeyDown:o?g=>{g.key==="Enter"&&o()}:void 0})},ef=rde({placement:"top",pauseOnPageIdle:!0}),s4=()=>P.jsx(Ku,{children:P.jsx(Jge,{toaster:ef,insetInline:{mdDown:"4"},children:t=>P.jsxs(eme,{width:{md:"sm"},children:[t.type==="loading"?P.jsx(Bx,{size:"sm",color:"blue.solid"}):P.jsx(ame,{}),P.jsxs(K9,{gap:"1",flex:"1",maxWidth:"100%",children:[t.title&&P.jsx(rme,{children:t.title}),t.description&&P.jsx(nme,{children:t.description})]}),t.action&&P.jsx(ime,{children:t.action.label}),t.closable&&P.jsx(tme,{})]})})}),vX=A.forwardRef(function(e,r){const{showArrow:n,children:i,disabled:o,portalled:a=!0,content:s,contentProps:l,portalRef:c,...d}=e;return o?i:P.jsxs(dW,{...d,children:[P.jsx(fW,{asChild:!0,children:i}),P.jsx(Ku,{disabled:!a,container:c,children:P.jsx(hW,{children:P.jsxs(pW,{ref:r,...l,children:[n&&P.jsx(sme,{children:P.jsx(gW,{})}),s]})})})]})}),aSe=$H({uri:E1e("REACT_APP_GRAPHQL_SERVER_URL")}),sSe=C1e(async()=>({headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})),lSe=eX(({graphQLErrors:t})=>{if(t)for(const e of t)ef.info({duration:3e3,description:e.message})}),_r=new YH({connectToDevTools:!0,link:hwe([sSe,lSe,aSe]),cache:new HH({typePolicies:{TableModel:{keyFields:["versionId"]},RowModel:{keyFields:["versionId"]}}}),defaultOptions:{watchQuery:{fetchPolicy:"cache-and-network"}}});_r.cache;const yX=()=>A.useCallback(t=>{t&&t.focus()},[]),jf=(t,...e)=>{const r=A.useRef(null),[n,i]=A.useState(e),o=A.useMemo(()=>n.length!==e.length||n.some((a,s)=>a!==e[s])?(i(e),e):n,[e,n]);return r.current||(r.current=ft.get(t)),A.useEffect(()=>{var s;const a=r.current;return(s=a==null?void 0:a.init)==null||s.call(a,...o),()=>{var l;(l=a==null?void 0:a.dispose)==null||l.call(a)}},[o]),r.current};class cSe{constructor(){fe(this,"registrations",new Map)}register(e,r,n){this.registrations.set(e,{factory:r,scope:n.scope})}get(e){const r=this.registrations.get(e);if(!r)throw new Error(`No provider found for ${e.name}`);return r.scope==="singleton"?(r.instance||(r.instance=r.factory()),r.instance):r.factory()}}const ft=new cSe;class Y2{constructor(e){fe(this,"values");this.values=e,lt(this,{},{autoBind:!0})}setValue(e,r){this.values[e]=r}get isValid(){return Object.values(this.values).every(e=>!!e)}}const K2=JSON,uSe=t=>t.toUpperCase(),dSe=t=>{const e={};return t.forEach((r,n)=>{e[n]=r}),e},fSe=(t,e,r)=>t.document?t:{document:t,variables:e,requestHeaders:r,signal:void 0},hSe=(t,e,r)=>t.query?t:{query:t,variables:e,requestHeaders:r,signal:void 0},pSe=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},l4=t=>{var n,i;let e;const r=t.definitions.filter(o=>o.kind==="OperationDefinition");return r.length===1&&(e=(i=(n=r[0])==null?void 0:n.name)==null?void 0:i.value),e},LT=t=>{if(typeof t=="string"){let r;try{const n=YU(t);r=l4(n)}catch{}return{query:t,operationName:r}}const e=l4(t);return{query:_2(t),operationName:e}};class Rv extends Error{constructor(e,r){const n=`${Rv.extractMessage(e)}: ${JSON.stringify({response:e,request:r})}`;super(n),Object.setPrototypeOf(this,Rv.prototype),this.response=e,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Rv)}static extractMessage(e){var r,n;return((n=(r=e.errors)==null?void 0:r[0])==null?void 0:n.message)??`GraphQL Error (Code: ${e.status})`}}var av={exports:{}},gSe=av.exports,c4;function mSe(){return c4||(c4=1,function(t,e){var r=typeof self<"u"?self:gSe,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(a){var s={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function l(D){return D&&DataView.prototype.isPrototypeOf(D)}if(s.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(D){return D&&c.indexOf(Object.prototype.toString.call(D))>-1};function p(D){if(typeof D!="string"&&(D=String(D)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(D))throw new TypeError("Invalid character in header field name");return D.toLowerCase()}function g(D){return typeof D!="string"&&(D=String(D)),D}function m(D){var F={next:function(){var Y=D.shift();return{done:Y===void 0,value:Y}}};return s.iterable&&(F[Symbol.iterator]=function(){return F}),F}function y(D){this.map={},D instanceof y?D.forEach(function(F,Y){this.append(Y,F)},this):Array.isArray(D)?D.forEach(function(F){this.append(F[0],F[1])},this):D&&Object.getOwnPropertyNames(D).forEach(function(F){this.append(F,D[F])},this)}y.prototype.append=function(D,F){D=p(D),F=g(F);var Y=this.map[D];this.map[D]=Y?Y+", "+F:F},y.prototype.delete=function(D){delete this.map[p(D)]},y.prototype.get=function(D){return D=p(D),this.has(D)?this.map[D]:null},y.prototype.has=function(D){return this.map.hasOwnProperty(p(D))},y.prototype.set=function(D,F){this.map[p(D)]=g(F)},y.prototype.forEach=function(D,F){for(var Y in this.map)this.map.hasOwnProperty(Y)&&D.call(F,this.map[Y],Y,this)},y.prototype.keys=function(){var D=[];return this.forEach(function(F,Y){D.push(Y)}),m(D)},y.prototype.values=function(){var D=[];return this.forEach(function(F){D.push(F)}),m(D)},y.prototype.entries=function(){var D=[];return this.forEach(function(F,Y){D.push([Y,F])}),m(D)},s.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function b(D){if(D.bodyUsed)return Promise.reject(new TypeError("Already read"));D.bodyUsed=!0}function O(D){return new Promise(function(F,Y){D.onload=function(){F(D.result)},D.onerror=function(){Y(D.error)}})}function S(D){var F=new FileReader,Y=O(F);return F.readAsArrayBuffer(D),Y}function w(D){var F=new FileReader,Y=O(F);return F.readAsText(D),Y}function k(D){for(var F=new Uint8Array(D),Y=new Array(F.length),ie=0;ie<F.length;ie++)Y[ie]=String.fromCharCode(F[ie]);return Y.join("")}function T(D){if(D.slice)return D.slice(0);var F=new Uint8Array(D.byteLength);return F.set(new Uint8Array(D)),F.buffer}function C(){return this.bodyUsed=!1,this._initBody=function(D){this._bodyInit=D,D?typeof D=="string"?this._bodyText=D:s.blob&&Blob.prototype.isPrototypeOf(D)?this._bodyBlob=D:s.formData&&FormData.prototype.isPrototypeOf(D)?this._bodyFormData=D:s.searchParams&&URLSearchParams.prototype.isPrototypeOf(D)?this._bodyText=D.toString():s.arrayBuffer&&s.blob&&l(D)?(this._bodyArrayBuffer=T(D.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(D)||d(D))?this._bodyArrayBuffer=T(D):this._bodyText=D=Object.prototype.toString.call(D):this._bodyText="",this.headers.get("content-type")||(typeof D=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s.searchParams&&URLSearchParams.prototype.isPrototypeOf(D)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s.blob&&(this.blob=function(){var D=b(this);if(D)return D;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?b(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(S)}),this.text=function(){var D=b(this);if(D)return D;if(this._bodyBlob)return w(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(k(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(M)}),this.json=function(){return this.text().then(JSON.parse)},this}var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(D){var F=D.toUpperCase();return E.indexOf(F)>-1?F:D}function $(D,F){F=F||{};var Y=F.body;if(D instanceof $){if(D.bodyUsed)throw new TypeError("Already read");this.url=D.url,this.credentials=D.credentials,F.headers||(this.headers=new y(D.headers)),this.method=D.method,this.mode=D.mode,this.signal=D.signal,!Y&&D._bodyInit!=null&&(Y=D._bodyInit,D.bodyUsed=!0)}else this.url=String(D);if(this.credentials=F.credentials||this.credentials||"same-origin",(F.headers||!this.headers)&&(this.headers=new y(F.headers)),this.method=_(F.method||this.method||"GET"),this.mode=F.mode||this.mode||null,this.signal=F.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Y)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(Y)}$.prototype.clone=function(){return new $(this,{body:this._bodyInit})};function M(D){var F=new FormData;return D.trim().split("&").forEach(function(Y){if(Y){var ie=Y.split("="),H=ie.shift().replace(/\+/g," "),ne=ie.join("=").replace(/\+/g," ");F.append(decodeURIComponent(H),decodeURIComponent(ne))}}),F}function j(D){var F=new y,Y=D.replace(/\r?\n[\t ]+/g," ");return Y.split(/\r?\n/).forEach(function(ie){var H=ie.split(":"),ne=H.shift().trim();if(ne){var z=H.join(":").trim();F.append(ne,z)}}),F}C.call($.prototype);function B(D,F){F||(F={}),this.type="default",this.status=F.status===void 0?200:F.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in F?F.statusText:"OK",this.headers=new y(F.headers),this.url=F.url||"",this._initBody(D)}C.call(B.prototype),B.prototype.clone=function(){return new B(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},B.error=function(){var D=new B(null,{status:0,statusText:""});return D.type="error",D};var V=[301,302,303,307,308];B.redirect=function(D,F){if(V.indexOf(F)===-1)throw new RangeError("Invalid status code");return new B(null,{status:F,headers:{location:D}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(F,Y){this.message=F,this.name=Y;var ie=Error(F);this.stack=ie.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function X(D,F){return new Promise(function(Y,ie){var H=new $(D,F);if(H.signal&&H.signal.aborted)return ie(new a.DOMException("Aborted","AbortError"));var ne=new XMLHttpRequest;function z(){ne.abort()}ne.onload=function(){var N={status:ne.status,statusText:ne.statusText,headers:j(ne.getAllResponseHeaders()||"")};N.url="responseURL"in ne?ne.responseURL:N.headers.get("X-Request-URL");var U="response"in ne?ne.response:ne.responseText;Y(new B(U,N))},ne.onerror=function(){ie(new TypeError("Network request failed"))},ne.ontimeout=function(){ie(new TypeError("Network request failed"))},ne.onabort=function(){ie(new a.DOMException("Aborted","AbortError"))},ne.open(H.method,H.url,!0),H.credentials==="include"?ne.withCredentials=!0:H.credentials==="omit"&&(ne.withCredentials=!1),"responseType"in ne&&s.blob&&(ne.responseType="blob"),H.headers.forEach(function(N,U){ne.setRequestHeader(U,N)}),H.signal&&(H.signal.addEventListener("abort",z),ne.onreadystatechange=function(){ne.readyState===4&&H.signal.removeEventListener("abort",z)}),ne.send(typeof H._bodyInit>"u"?null:H._bodyInit)})}return X.polyfill=!0,o.fetch||(o.fetch=X,o.Headers=y,o.Request=$,o.Response=B),a.Headers=y,a.Request=$,a.Response=B,a.fetch=X,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e}(av,av.exports)),av.exports}var yS=mSe();const S1=Uu(yS),vSe=yx({__proto__:null,default:S1},[yS]),Ph=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||vSe&&yS.Headers&&t instanceof yS.Headers?e=dSe(t):Array.isArray(t)?t.forEach(([r,n])=>{r&&n!==void 0&&(e[r]=n)}):e=t),e},u4=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),ySe=t=>{if(!Array.isArray(t.query)){const n=t,i=[`query=${encodeURIComponent(u4(n.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,r=t.query.reduce((n,i,o)=>(n.push({query:u4(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),n),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(r))}`},bSe=t=>async e=>{const{url:r,query:n,variables:i,operationName:o,fetch:a,fetchOptions:s,middleware:l}=e,c={...e.headers};let d="",p;t==="POST"?(p=wSe(n,i,o,s.jsonSerializer),typeof p=="string"&&(c["Content-Type"]="application/json")):d=ySe({query:n,variables:i,operationName:o,jsonSerializer:s.jsonSerializer??K2});const g={method:t,headers:c,body:p,...s};let m=r,y=g;if(l){const b=await Promise.resolve(l({...g,url:r,operationName:o,variables:i})),{url:O,...S}=b;m=O,y=S}return d&&(m=`${m}?${d}`),await a(m,y)};class OSe{constructor(e,r={}){this.url=e,this.requestConfig=r,this.rawRequest=async(...n)=>{const[i,o,a]=n,s=hSe(i,o,a),{headers:l,fetch:c=S1,method:d="POST",requestMiddleware:p,responseMiddleware:g,...m}=this.requestConfig,{url:y}=this;s.signal!==void 0&&(m.signal=s.signal);const{operationName:b}=LT(s.query);return QT({url:y,query:s.query,variables:s.variables,headers:{...Ph(VT(l)),...Ph(s.requestHeaders)},operationName:b,fetch:c,method:d,fetchOptions:m,middleware:p}).then(O=>(g&&g(O),O)).catch(O=>{throw g&&g(O),O})}}async request(e,...r){const[n,i]=r,o=fSe(e,n,i),{headers:a,fetch:s=S1,method:l="POST",requestMiddleware:c,responseMiddleware:d,...p}=this.requestConfig,{url:g}=this;o.signal!==void 0&&(p.signal=o.signal);const{query:m,operationName:y}=LT(o.document);return QT({url:g,query:m,variables:o.variables,headers:{...Ph(VT(a)),...Ph(o.requestHeaders)},operationName:y,fetch:s,method:l,fetchOptions:p,middleware:c}).then(b=>(d&&d(b),b.data)).catch(b=>{throw d&&d(b),b})}batchRequests(e,r){const n=pSe(e,r),{headers:i,...o}=this.requestConfig;n.signal!==void 0&&(o.signal=n.signal);const a=n.documents.map(({document:l})=>LT(l).query),s=n.documents.map(({variables:l})=>l);return QT({url:this.url,query:a,variables:s,headers:{...Ph(VT(i)),...Ph(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??S1,method:this.requestConfig.method||"POST",fetchOptions:o,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,r){const{headers:n}=this.requestConfig;return n?n[e]=r:this.requestConfig.headers={[e]:r},this}setEndpoint(e){return this.url=e,this}}const QT=async t=>{const{query:e,variables:r,fetchOptions:n}=t,i=bSe(uSe(t.method??"post")),o=Array.isArray(t.query),a=await i(t),s=await SSe(a,n.jsonSerializer??K2),l=Array.isArray(s)?!s.some(({data:d})=>!d):!!s.data,c=Array.isArray(s)||!s.errors||Array.isArray(s.errors)&&!s.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(a.ok&&c&&l){const{errors:d,...p}=(Array.isArray(s),s),g=n.errorPolicy==="ignore"?p:s;return{...o?{data:g}:g,headers:a.headers,status:a.status}}else{const d=typeof s=="string"?{error:s}:s;throw new Rv({...d,status:a.status,headers:a.headers},{query:e,variables:r})}},wSe=(t,e,r,n)=>{const i=n??K2;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:r});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const o=t.reduce((a,s,l)=>(a.push({query:s,variables:e?e[l]:void 0}),a),[]);return i.stringify(o)},SSe=async(t,e)=>{let r;return t.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(r=n)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await t.text()):t.text()},VT=t=>typeof t=="function"?t():t;Ae`
|
|
150
150
|
fragment PageInfo on PageInfo {
|
|
151
151
|
startCursor
|
|
152
152
|
hasNextPage
|
|
@@ -694,7 +694,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
694
694
|
}
|
|
695
695
|
${nd}
|
|
696
696
|
${xl}
|
|
697
|
-
`,uxe=(t,e,r,n)=>t();function dxe(t,e=uxe){return{confirmEmailCode(r,n){return e(i=>t.request(TSe,r,{...n,...i}),"confirmEmailCode","mutation",r)},loginGithub(r,n){return e(i=>t.request(ESe,r,{...n,...i}),"loginGithub","mutation",r)},loginGoogle(r,n){return e(i=>t.request(_Se,r,{...n,...i}),"loginGoogle","mutation",r)},login(r,n){return e(i=>t.request(RSe,r,{...n,...i}),"login","mutation",r)},signUp(r,n){return e(i=>t.request(ISe,r,{...n,...i}),"signUp","mutation",r)},setUsername(r,n){return e(i=>t.request($Se,r,{...n,...i}),"setUsername","mutation",r)},configuration(r,n){return e(i=>t.request(ASe,r,{...n,...i}),"configuration","query",r)},getMe(r,n){return e(i=>t.request(MSe,r,{...n,...i}),"getMe","query",r)},CreateBranchByRevisionIdMst(r,n){return e(i=>t.request(NSe,r,{...n,...i}),"CreateBranchByRevisionIdMst","mutation",r)},CreateEndpointMst(r,n){return e(i=>t.request(jSe,r,{...n,...i}),"CreateEndpointMst","mutation",r)},CreateProjectMst(r,n){return e(i=>t.request(DSe,r,{...n,...i}),"CreateProjectMst","mutation",r)},CreateRevisionMst(r,n){return e(i=>t.request(LSe,r,{...n,...i}),"CreateRevisionMst","mutation",r)},CreateRowMst(r,n){return e(i=>t.request(QSe,r,{...n,...i}),"CreateRowMst","mutation",r)},CreateTableMst(r,n){return e(i=>t.request(VSe,r,{...n,...i}),"CreateTableMst","mutation",r)},DeleteEndpointMst(r,n){return e(i=>t.request(FSe,r,{...n,...i}),"DeleteEndpointMst","mutation",r)},DeleteProjectMst(r,n){return e(i=>t.request(BSe,r,{...n,...i}),"DeleteProjectMst","mutation",r)},DeleteRowMst(r,n){return e(i=>t.request(zSe,r,{...n,...i}),"DeleteRowMst","mutation",r)},DeleteTableMst(r,n){return e(i=>t.request(qSe,r,{...n,...i}),"DeleteTableMst","mutation",r)},RenameRowMst(r,n){return e(i=>t.request(WSe,r,{...n,...i}),"RenameRowMst","mutation",r)},RenameTableMst(r,n){return e(i=>t.request(USe,r,{...n,...i}),"RenameTableMst","mutation",r)},RevertChangesMst(r,n){return e(i=>t.request(HSe,r,{...n,...i}),"RevertChangesMst","mutation",r)},UpdateRowMst(r,n){return e(i=>t.request(XSe,r,{...n,...i}),"UpdateRowMst","mutation",r)},UpdateTableMst(r,n){return e(i=>t.request(ZSe,r,{...n,...i}),"UpdateTableMst","mutation",r)},BranchMst(r,n){return e(i=>t.request(GSe,r,{...n,...i}),"BranchMst","query",r)},BranchesMst(r,n){return e(i=>t.request(YSe,r,{...n,...i}),"BranchesMst","query",r)},GetRowCountForeignKeysTo(r,n){return e(i=>t.request(KSe,r,{...n,...i}),"GetRowCountForeignKeysTo","query",r)},meProjectsMst(r,n){return e(i=>t.request(JSe,r,{...n,...i}),"meProjectsMst","query",r)},ProjectMst(r,n){return e(i=>t.request(exe,r,{...n,...i}),"ProjectMst","query",r)},ProjectsMst(r,n){return e(i=>t.request(txe,r,{...n,...i}),"ProjectsMst","query",r)},RevisionMst(r,n){return e(i=>t.request(rxe,r,{...n,...i}),"RevisionMst","query",r)},RevisionsMst(r,n){return e(i=>t.request(nxe,r,{...n,...i}),"RevisionsMst","query",r)},RowForeignKeysBy(r,n){return e(i=>t.request(ixe,r,{...n,...i}),"RowForeignKeysBy","query",r)},RowMst(r,n){return e(i=>t.request(oxe,r,{...n,...i}),"RowMst","query",r)},RowsMst(r,n){return e(i=>t.request(axe,r,{...n,...i}),"RowsMst","query",r)},TableForeignKeysBy(r,n){return e(i=>t.request(sxe,r,{...n,...i}),"TableForeignKeysBy","query",r)},TableMst(r,n){return e(i=>t.request(lxe,r,{...n,...i}),"TableMst","query",r)},TablesMst(r,n){return e(i=>t.request(cxe,r,{...n,...i}),"TablesMst","query",r)}}}const fxe={BASE_URL:"/",DEV:!1,GIT_BRANCH_NAME:"HEAD",GIT_COMMIT_HASH:"
|
|
697
|
+
`,uxe=(t,e,r,n)=>t();function dxe(t,e=uxe){return{confirmEmailCode(r,n){return e(i=>t.request(TSe,r,{...n,...i}),"confirmEmailCode","mutation",r)},loginGithub(r,n){return e(i=>t.request(ESe,r,{...n,...i}),"loginGithub","mutation",r)},loginGoogle(r,n){return e(i=>t.request(_Se,r,{...n,...i}),"loginGoogle","mutation",r)},login(r,n){return e(i=>t.request(RSe,r,{...n,...i}),"login","mutation",r)},signUp(r,n){return e(i=>t.request(ISe,r,{...n,...i}),"signUp","mutation",r)},setUsername(r,n){return e(i=>t.request($Se,r,{...n,...i}),"setUsername","mutation",r)},configuration(r,n){return e(i=>t.request(ASe,r,{...n,...i}),"configuration","query",r)},getMe(r,n){return e(i=>t.request(MSe,r,{...n,...i}),"getMe","query",r)},CreateBranchByRevisionIdMst(r,n){return e(i=>t.request(NSe,r,{...n,...i}),"CreateBranchByRevisionIdMst","mutation",r)},CreateEndpointMst(r,n){return e(i=>t.request(jSe,r,{...n,...i}),"CreateEndpointMst","mutation",r)},CreateProjectMst(r,n){return e(i=>t.request(DSe,r,{...n,...i}),"CreateProjectMst","mutation",r)},CreateRevisionMst(r,n){return e(i=>t.request(LSe,r,{...n,...i}),"CreateRevisionMst","mutation",r)},CreateRowMst(r,n){return e(i=>t.request(QSe,r,{...n,...i}),"CreateRowMst","mutation",r)},CreateTableMst(r,n){return e(i=>t.request(VSe,r,{...n,...i}),"CreateTableMst","mutation",r)},DeleteEndpointMst(r,n){return e(i=>t.request(FSe,r,{...n,...i}),"DeleteEndpointMst","mutation",r)},DeleteProjectMst(r,n){return e(i=>t.request(BSe,r,{...n,...i}),"DeleteProjectMst","mutation",r)},DeleteRowMst(r,n){return e(i=>t.request(zSe,r,{...n,...i}),"DeleteRowMst","mutation",r)},DeleteTableMst(r,n){return e(i=>t.request(qSe,r,{...n,...i}),"DeleteTableMst","mutation",r)},RenameRowMst(r,n){return e(i=>t.request(WSe,r,{...n,...i}),"RenameRowMst","mutation",r)},RenameTableMst(r,n){return e(i=>t.request(USe,r,{...n,...i}),"RenameTableMst","mutation",r)},RevertChangesMst(r,n){return e(i=>t.request(HSe,r,{...n,...i}),"RevertChangesMst","mutation",r)},UpdateRowMst(r,n){return e(i=>t.request(XSe,r,{...n,...i}),"UpdateRowMst","mutation",r)},UpdateTableMst(r,n){return e(i=>t.request(ZSe,r,{...n,...i}),"UpdateTableMst","mutation",r)},BranchMst(r,n){return e(i=>t.request(GSe,r,{...n,...i}),"BranchMst","query",r)},BranchesMst(r,n){return e(i=>t.request(YSe,r,{...n,...i}),"BranchesMst","query",r)},GetRowCountForeignKeysTo(r,n){return e(i=>t.request(KSe,r,{...n,...i}),"GetRowCountForeignKeysTo","query",r)},meProjectsMst(r,n){return e(i=>t.request(JSe,r,{...n,...i}),"meProjectsMst","query",r)},ProjectMst(r,n){return e(i=>t.request(exe,r,{...n,...i}),"ProjectMst","query",r)},ProjectsMst(r,n){return e(i=>t.request(txe,r,{...n,...i}),"ProjectsMst","query",r)},RevisionMst(r,n){return e(i=>t.request(rxe,r,{...n,...i}),"RevisionMst","query",r)},RevisionsMst(r,n){return e(i=>t.request(nxe,r,{...n,...i}),"RevisionsMst","query",r)},RowForeignKeysBy(r,n){return e(i=>t.request(ixe,r,{...n,...i}),"RowForeignKeysBy","query",r)},RowMst(r,n){return e(i=>t.request(oxe,r,{...n,...i}),"RowMst","query",r)},RowsMst(r,n){return e(i=>t.request(axe,r,{...n,...i}),"RowsMst","query",r)},TableForeignKeysBy(r,n){return e(i=>t.request(sxe,r,{...n,...i}),"TableForeignKeysBy","query",r)},TableMst(r,n){return e(i=>t.request(lxe,r,{...n,...i}),"TableMst","query",r)},TablesMst(r,n){return e(i=>t.request(cxe,r,{...n,...i}),"TablesMst","query",r)}}}const fxe={BASE_URL:"/",DEV:!1,GIT_BRANCH_NAME:"HEAD",GIT_COMMIT_HASH:"f1f9aa5",MODE:"production",PACKAGE_VERSION:"2.0.0",PROD:!0,REACT_APP_ENDPOINT_HOST:"",REACT_APP_ENDPOINT_PORT:"",REACT_APP_ENDPOINT_SERVER_URL:"/endpoint",REACT_APP_GRAPHQL_SERVER_URL:"/graphql",REACT_APP_SWAGGER_SERVER_URL:"/api",SSR:!1};class bS{constructor(){}get(e){var i;const r=(i=window.__env__)==null?void 0:i[e],n=fxe[e];return r||n}}ft.register(bS,()=>new bS,{scope:"singleton"});class hl{constructor(e){fe(this,"graphQLClient");fe(this,"client");this.environmentService=e;const r=this.environmentService.get("REACT_APP_GRAPHQL_SERVER_URL");if(!r)throw new Error("Invalid REACT_APP_GRAPHQL_SERVER_URL");this.graphQLClient=new OSe(r,{responseMiddleware:n=>{var o;const i=(o=n.response)==null?void 0:o.errors[0].message;return i&&ef.info({duration:3e3,description:i}),n}}),this.client=dxe(this.graphQLClient)}setToken(e){this.graphQLClient.setHeaders(e?{Authorization:`Bearer ${e}`}:{})}}ft.register(hl,()=>{const t=ft.get(bS);return new hl(t)},{scope:"singleton"});const FT="token";class ho{constructor(e,r){fe(this,"isLoaded",!1);fe(this,"user",null);fe(this,"token",null);this.storage=e,this.apiService=r,lt(this),this.init()}async setToken(e){this.token=e,this.apiService.setToken(this.token),this.token&&await this.fetchMe()}async init(){await this.setToken(this.loadToken()),this.signToToken(),this.setIsChecked(!0)}loadToken(){return this.storage.getItem(FT)}async fetchMe(){try{const e=await this.apiService.client.getMe();this.user=e.me}catch(e){console.error(e),ry(()=>{this.token=null})}}setIsChecked(e){this.isLoaded=e}signToToken(){ol(()=>this.token,e=>{e?this.storage.setItem(FT,e):this.storage.removeItem(FT)})}logout(){this.token=null,this.user=null,this.apiService.setToken(null)}}ft.register(ho,()=>{const t=ft.get(hl);return new ho(localStorage,t)},{scope:"singleton"});class yf{constructor(e){fe(this,"isLoaded",!1);fe(this,"error",null);fe(this,"data",null);this.apiService=e,lt(this),this.init()}get availableSignUp(){return this.availableEmailSignUp||this.availableGoogleOauth||this.availableGithubOauth}get availableEmailSignUp(){var e;return(e=this.data)==null?void 0:e.availableEmailSignUp}get availableGoogleOauth(){var e;return!!((e=this.data)!=null&&e.google.available)}get googleOauthClientId(){var e,r;if(!((e=this.data)!=null&&e.google.clientId))throw new Error("Invalid Google client id");return(r=this.data)==null?void 0:r.google.clientId}get availableGithubOauth(){var e;return!!((e=this.data)!=null&&e.github.available)}get githubOauthClientId(){var e,r;if(!((e=this.data)!=null&&e.github.clientId))throw new Error("Invalid Github client id");return(r=this.data)==null?void 0:r.github.clientId}async init(){await this.request()}async request(){try{const e=await this.apiService.client.configuration();this.setData(e.configuration)}catch(e){this.setError(e),console.error(e)}finally{this.setIsLoaded(!0)}}setData(e){this.data=e}setError(e){this.error=e}setIsLoaded(e){this.isLoaded=e}}ft.register(yf,()=>{const t=ft.get(hl);return new yf(t)},{scope:"singleton"});class OS{constructor(e,r){this.authService=e,this.configurationService=r,lt(this)}get isLoaded(){return this.authService.isLoaded&&this.configurationService.isLoaded}}ft.register(OS,()=>{const t=ft.get(ho),e=ft.get(yf);return new OS(t,e)},{scope:"singleton"});var d4={},hxe="warn";function pxe(){return hxe}var ui;(function(t){t.afterCreate="afterCreate",t.afterAttach="afterAttach",t.afterCreationFinalization="afterCreationFinalization",t.beforeDetach="beforeDetach",t.beforeDestroy="beforeDestroy"})(ui||(ui={}));/*! *****************************************************************************
|
|
698
698
|
Copyright (c) Microsoft Corporation.
|
|
699
699
|
|
|
700
700
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -1028,7 +1028,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
1028
1028
|
table {
|
|
1029
1029
|
id
|
|
1030
1030
|
}
|
|
1031
|
-
}`}get baseUrl(){const e=gv("REACT_APP_ENDPOINT_SERVER_URL");return`${window.location.origin}${e}/graphql`}dispose(){}init(){}}ft.register(MR,()=>{const t=ft.get(ho);return new MR(t)},{scope:"request"});const sTe=()=>{const{"*":t=""}=$U(),e=jf(MR),r=`${e.baseUrl}/${t}`;return P.jsx(Te,{w:"100%",h:"100vh",flexDirection:"column",css:{"& > div":{flex:1,minHeight:0}},children:P.jsx(aTe,{initialEndpoint:r,initialState:{document:e.document,headers:{...e.token?{Authorization:`Bearer ${e.token}`}:{}}}})})};class lTe{constructor(e){this.projectPageModel=e,lt(this)}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}get currentBaseLink(){return L4(this.organization.id,this.project.name,this.branch.name,this.getCurrentOptions())}get parentForTableOrRow(){const e=this.currentBaseLink,r=this.projectPageModel.routeTableId,n=this.projectPageModel.routeRowId;if(r&&n)return fa(`${e}/${_v}`,{tableId:r});if(r)return fa(`${e}`)}getCurrentOptions(){return this.projectPageModel.isDraftRevision?{isDraft:!0}:this.projectPageModel.isHeadRevision?{isHead:!0}:{id:this.revision.id}}make(e){const r=e.tableId||this.projectPageModel.routeTableId,n=e.rowId||this.projectPageModel.routeRowId,i=L4(this.organization.id,this.project.name,this.branch.name,e);return r&&n?fa(`${i}/${_v}/${lX}`,{tableId:r,rowId:n}):r?fa(`${i}/${_v}`,{tableId:r}):i}init(){}dispose(){}}const L4=(t,e,r,n)=>n.isHead?fa(`/${Pu}/${ku}/${Cu}/${Tu}`,{organizationId:t,projectName:e,branchName:r}):n.isDraft?fa(`/${Pu}/${ku}/${Cu}/${Tu}/${pP}`,{organizationId:t,projectName:e,branchName:r}):fa(`/${Pu}/${ku}/${Cu}/${Tu}/${sX}`,{organizationId:t,projectName:e,branchName:r,revisionId:n.id}),cTe=()=>Za(dn.DraftRow)||null,uTe=()=>Za(dn.HeadRow)||null,dTe=()=>Za(dn.SpecificRow)||null,fTe=()=>{const t=cTe(),e=uTe(),r=dTe();return t||e||r},hTe=()=>Za(dn.Branch)||null,pTe=()=>{const t=Za(dn.Organization);if(!t)throw new Error("Not found organization from route loader");return t},gTe=()=>{const t=Za(dn.Project);if(!t)throw new Error("Not found project from route loader");return t},mTe=()=>Za(dn.DraftRevision)||null,vTe=()=>Za(dn.HeadRevision)||null,yTe=()=>Za(dn.SpecificRevision)||null,bTe=()=>{const t=mTe(),e=vTe(),r=yTe();return t||e||r},OTe=()=>Za(dn.DraftTable)||null,wTe=()=>Za(dn.HeadTable)||null,STe=()=>Za(dn.SpecificTable)||null,xTe=()=>{const t=OTe(),e=wTe(),r=STe();return t||e||r};class PTe{constructor(e,r,n,i,o,a,s,l,c){this.cache=e,this.revalidateLoaders=r,this.params=n,this.organization=i,this.project=o,this.branch=a,this.revision=s,this.table=l,this.row=c,lt(this)}get branchOrThrow(){if(!this.branch)throw new Error("Not found branch from route loader");return this.branch}get revisionOrThrow(){if(!this.revision)throw new Error("Not found revision from route loader");return this.revision}get tableOrThrow(){if(!this.table)throw new Error("Not found table from route loader");return this.table}get isStartRevision(){return this.branchOrThrow.start.id===this.revisionOrThrow.id}get isHeadRevision(){return this.branchOrThrow.head.id===this.revisionOrThrow.id}get isDraftRevision(){return this.branchOrThrow.draft.id===this.revisionOrThrow.id}get isStartAndHeadSameRevision(){return this.branchOrThrow.head.id===this.branchOrThrow.start.id}get isEditableRevision(){return this.isDraftRevision||!this.branchOrThrow.touched&&this.isHeadRevision}get rowOrThrow(){if(!this.row)throw new Error("Not found row from route loader");return this.row}get rowRefsBy(){if(this.revision&&this.table&&this.row)return this.cache.getRowForeignKeysByVariables({revisionId:this.revision.id,tableId:this.table.id,rowId:this.row.id})}get routeOrganizationId(){return this.params.organizationId}get routeProjectName(){return this.params.projectName}get routeBranchName(){return this.params.branchName}get routeRevisionId(){return this.params.revisionId}get routeTableId(){return this.params.tableId}get routeRowId(){return this.params.rowId}update(e){for(const[r,n]of Object.entries(e))this[r]!==n&&(this[r]=n)}init(){}dispose(){}}const Ui=()=>{const t=Ebe(),e=$U(),r=pTe(),n=gTe(),i=hTe(),o=bTe(),a=xTe(),s=fTe(),[l]=A.useState(()=>new PTe(gt.cache,t.revalidate,e,r,n,i,o,a,s));return A.useEffect(()=>(l.init(),()=>l.dispose()),[l]),A.useEffect(()=>{l.update({params:e,organization:r,project:n,branch:i,revision:o,table:a,row:s})},[l,e,r,n,i,o,a,s]),l},Vf=()=>{const t=Ui(),[e]=A.useState(()=>new lTe(t));return A.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e};class kTe{constructor(e,r,n){
|
|
1031
|
+
}`}get baseUrl(){const e=gv("REACT_APP_ENDPOINT_SERVER_URL");return`${window.location.origin}${e}/graphql`}dispose(){}init(){}}ft.register(MR,()=>{const t=ft.get(ho);return new MR(t)},{scope:"request"});const sTe=()=>{const{"*":t=""}=$U(),e=jf(MR),r=`${e.baseUrl}/${t}`;return P.jsx(Te,{w:"100%",h:"100vh",flexDirection:"column",css:{"& > div":{flex:1,minHeight:0}},children:P.jsx(aTe,{initialEndpoint:r,initialState:{document:e.document,headers:{...e.token?{Authorization:`Bearer ${e.token}`}:{}}}})})};class lTe{constructor(e){this.projectPageModel=e,lt(this)}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}get currentBaseLink(){return L4(this.organization.id,this.project.name,this.branch.name,this.getCurrentOptions())}get parentForTableOrRow(){const e=this.currentBaseLink,r=this.projectPageModel.routeTableId,n=this.projectPageModel.routeRowId;if(r&&n)return fa(`${e}/${_v}`,{tableId:r});if(r)return fa(`${e}`)}getCurrentOptions(){return this.projectPageModel.isDraftRevision?{isDraft:!0}:this.projectPageModel.isHeadRevision?{isHead:!0}:{id:this.revision.id}}make(e){const r=e.tableId||this.projectPageModel.routeTableId,n=e.rowId||this.projectPageModel.routeRowId,i=L4(this.organization.id,this.project.name,this.branch.name,e);return r&&n?fa(`${i}/${_v}/${lX}`,{tableId:r,rowId:n}):r?fa(`${i}/${_v}`,{tableId:r}):i}init(){}dispose(){}}const L4=(t,e,r,n)=>n.isHead?fa(`/${Pu}/${ku}/${Cu}/${Tu}`,{organizationId:t,projectName:e,branchName:r}):n.isDraft?fa(`/${Pu}/${ku}/${Cu}/${Tu}/${pP}`,{organizationId:t,projectName:e,branchName:r}):fa(`/${Pu}/${ku}/${Cu}/${Tu}/${sX}`,{organizationId:t,projectName:e,branchName:r,revisionId:n.id}),cTe=()=>Za(dn.DraftRow)||null,uTe=()=>Za(dn.HeadRow)||null,dTe=()=>Za(dn.SpecificRow)||null,fTe=()=>{const t=cTe(),e=uTe(),r=dTe();return t||e||r},hTe=()=>Za(dn.Branch)||null,pTe=()=>{const t=Za(dn.Organization);if(!t)throw new Error("Not found organization from route loader");return t},gTe=()=>{const t=Za(dn.Project);if(!t)throw new Error("Not found project from route loader");return t},mTe=()=>Za(dn.DraftRevision)||null,vTe=()=>Za(dn.HeadRevision)||null,yTe=()=>Za(dn.SpecificRevision)||null,bTe=()=>{const t=mTe(),e=vTe(),r=yTe();return t||e||r},OTe=()=>Za(dn.DraftTable)||null,wTe=()=>Za(dn.HeadTable)||null,STe=()=>Za(dn.SpecificTable)||null,xTe=()=>{const t=OTe(),e=wTe(),r=STe();return t||e||r};class PTe{constructor(e,r,n,i,o,a,s,l,c){this.cache=e,this.revalidateLoaders=r,this.params=n,this.organization=i,this.project=o,this.branch=a,this.revision=s,this.table=l,this.row=c,lt(this)}get branchOrThrow(){if(!this.branch)throw new Error("Not found branch from route loader");return this.branch}get revisionOrThrow(){if(!this.revision)throw new Error("Not found revision from route loader");return this.revision}get tableOrThrow(){if(!this.table)throw new Error("Not found table from route loader");return this.table}get isStartRevision(){return this.branchOrThrow.start.id===this.revisionOrThrow.id}get isHeadRevision(){return this.branchOrThrow.head.id===this.revisionOrThrow.id}get isDraftRevision(){return this.branchOrThrow.draft.id===this.revisionOrThrow.id}get isStartAndHeadSameRevision(){return this.branchOrThrow.head.id===this.branchOrThrow.start.id}get isEditableRevision(){return this.isDraftRevision||!this.branchOrThrow.touched&&this.isHeadRevision}get rowOrThrow(){if(!this.row)throw new Error("Not found row from route loader");return this.row}get rowRefsBy(){if(this.revision&&this.table&&this.row)return this.cache.getRowForeignKeysByVariables({revisionId:this.revision.id,tableId:this.table.id,rowId:this.row.id})}get routeOrganizationId(){return this.params.organizationId}get routeProjectName(){return this.params.projectName}get routeBranchName(){return this.params.branchName}get routeRevisionId(){return this.params.revisionId}get routeTableId(){return this.params.tableId}get routeRowId(){return this.params.rowId}update(e){for(const[r,n]of Object.entries(e))this[r]!==n&&(this[r]=n)}init(){}dispose(){}}const Ui=()=>{const t=Ebe(),e=$U(),r=pTe(),n=gTe(),i=hTe(),o=bTe(),a=xTe(),s=fTe(),[l]=A.useState(()=>new PTe(gt.cache,t.revalidate,e,r,n,i,o,a,s));return A.useEffect(()=>(l.init(),()=>l.dispose()),[l]),A.useEffect(()=>{l.update({params:e,organization:r,project:n,branch:i,revision:o,table:a,row:s})},[l,e,r,n,i,o,a,s]),l},Vf=()=>{const t=Ui(),[e]=A.useState(()=>new lTe(t));return A.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e};class kTe{constructor(e,r,n){fe(this,"disposer",null);this.navigateFunction=e,this.linkMaker=r,this.projectPageModel=n,lt(this)}toDraftRoute(){var e;(e=this.navigateFunction)==null||e.call(this,this.linkMaker.make({isDraft:!0}))}toHeadRoute(){var e;(e=this.navigateFunction)==null||e.call(this,this.linkMaker.make({isHead:!0}))}init(){this.listenToBranch()}dispose(){var e;(e=this.disposer)==null||e.call(this),this.disposer=null}listenToBranch(){this.disposer=ol(()=>({branch:this.branch,touched:this.branch.touched}),(e,r)=>{e.branch&&r.branch&&e.branch.id===r.branch.id&&(e.branch.touched?this.toDraftRoute():this.toHeadRoute())})}get branch(){return this.projectPageModel.branchOrThrow}}const CTe=()=>{const t=Vf(),e=rd(),r=Ui(),[n]=A.useState(()=>new kTe(e,t,r));return A.useEffect(()=>(n.init(),()=>n.dispose()),[n]),n},TTe=({onClick:t})=>{const[e,r]=A.useState(""),{onOpen:n,onClose:i,open:o}=cb(),[a,s]=A.useState(!1),l=A.useCallback(async()=>{s(!0),await(t==null?void 0:t(e)),s(!1)},[e,t]),c=A.useCallback(d=>{r(d.currentTarget.value)},[]);return P.jsxs(K$,{open:o,onOpenChange:({open:d})=>d?n():i(),children:[P.jsx(J$,{asChild:!0,children:P.jsx(Ti,{"data-testid":"create-revision-button",_hover:{backgroundColor:"gray.50"},loading:a,"aria-label":"",variant:"ghost",color:"gray.300",size:"sm",children:P.jsx(fX,{})})}),P.jsx(e2,{children:P.jsxs(t2,{children:[P.jsx(r2,{}),P.jsx(oW,{color:"gray.400"}),P.jsx(sW,{p:"1rem 2rem 1rem 1rem",children:P.jsxs(Te,{flexDirection:"column",alignItems:"end",justifyContent:"flex-start",gap:"0.5rem",children:[P.jsx(Gge,{_placeholder:{color:"gray.300"},placeholder:"Comment (optional)",onChange:c}),P.jsx("div",{children:P.jsx(sl,{onClick:l,title:"Commit"})})]})})]})})]})},ETe=({onClick:t})=>{const[e,r]=A.useState(!1),{onOpen:n,onClose:i,open:o}=cb(),a=A.useCallback(async()=>{r(!0),i(),await(t==null?void 0:t()),r(!1)},[t,i]);return P.jsxs(K$,{open:o,onOpenChange:({open:s})=>s?n():i(),children:[P.jsx(J$,{asChild:!0,children:P.jsx(Ti,{"data-testid":"revert-revision-button",_hover:{backgroundColor:"gray.50"},loading:e,"aria-label":"",variant:"ghost",color:"gray.300",size:"sm",children:P.jsx(dX,{})})}),P.jsx(e2,{children:P.jsxs(t2,{width:"200px",children:[P.jsx(r2,{}),P.jsx(oW,{color:"gray.400"}),P.jsx(qge,{color:"gray.500",children:"Revert all changes?"}),P.jsx(aW,{width:"100%",border:"0",display:"flex",justifyContent:"flex-end",children:P.jsx(Tge,{children:P.jsx(sl,{onClick:a,title:"Revert"})})})]})})]})},_Te=Ae`
|
|
1032
1032
|
mutation CreateBranchByRevisionIdMst($data: CreateBranchByRevisionIdInput!) {
|
|
1033
1033
|
createBranchByRevisionId(data: $data) {
|
|
1034
1034
|
...BranchMst
|
|
@@ -1064,27 +1064,28 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
1064
1064
|
mutation DeleteEndpointMst($data: DeleteEndpointInput!) {
|
|
1065
1065
|
deleteEndpoint(data: $data)
|
|
1066
1066
|
}
|
|
1067
|
-
`,lEe=async t=>{const e=await _r.mutate({mutation:sEe,variables:t});if(!e.data)throw e.errors;return e.data};class cEe{constructor(e,r){this.projectPageModel=e,this.endpointId=r}get revision(){return this.projectPageModel.revisionOrThrow}async execute(){const e=await this.deleteEndpointRequest();return this.updateRevision(),e}async deleteEndpointRequest(){return(await lEe({data:{endpointId:this.endpointId}})).deleteEndpoint}updateRevision(){this.revision.removeEndpoint(this.endpointId)}}const uEe=gv("REACT_APP_ENDPOINT_SERVER_URL"),dEe={[pl.GRAPHQL]:"graphql",[pl.REST_API]:"swagger"};class fEe{constructor(e,r){this.projectPageModel=e,this.endpointType=r,lt(this,{},{autoBind:!0})}get href(){if(!this.endpoint)return;const e=`${this.baseUrl}/${this.organization.id}/${this.project.name}/${this.branch.name}`;return this.projectPageModel.isDraftRevision?`${e}/draft`:this.projectPageModel.isHeadRevision?`${e}/head`:`${e}/${this.revision.id}`}async switch(){try{return this.endpoint?await new cEe(this.projectPageModel,this.endpoint.id).execute():new aEe(gt,this.projectPageModel,this.endpointType).execute()}catch(e){console.log(e)}}init(){}dispose(){}get endpoint(){return this.revision.endpoints.find(e=>e.type===this.endpointType)}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}get baseUrl(){return this.endpointType===pl.GRAPHQL?`/${tX}`:`${uEe}/${dEe[this.endpointType]}`}}const hEe=t=>{const e=Ui(),[r]=A.useState(()=>new fEe(e,t));return A.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},pEe={[pl.GRAPHQL]:P.jsx(tEe,{size:20}),[pl.REST_API]:P.jsx(rEe,{size:20})},V4=mt(({type:t})=>{const e=hEe(t);return P.jsxs(Te,{alignItems:"center",gap:"0.5rem",minWidth:"90px",height:"25px",children:[P.jsx(ze,{color:e.href?"gray.400":"gray.300",children:pEe[t]}),P.jsx(dt,{width:"140px",color:"gray.400",children:wZ(t)}),P.jsxs(Te,{width:"120px",gap:"0.5rem",alignItems:"center",children:[P.jsxs(Uge,{"data-testid":`endpoint-switch-${t}`,colorPalette:"gray",checked:!!e.href,onCheckedChange:e.switch,children:[P.jsx(Xge,{}),P.jsx(Hge,{children:P.jsx(cW,{})})]}),e.href&&P.jsx(gb,{href:e.href,target:"_blank",rel:"noopener noreferrer",children:P.jsx(ag,{"data-testid":`endpoint-button-${t}`,size:"sm","aria-label":"removeRow",color:"gray.500",disabled:!e.href,variant:"ghost",padding:0,minWidth:"20px",minHeight:"20px",height:"20px",paddingBottom:"3px",children:P.jsx(rSe,{size:"20px"})})})]})]})}),gEe="_Root_t8kot_1",mEe="_Action_t8kot_1",SZ={Root:gEe,Action:mEe},vEe=mt(()=>{const{onOpen:t,onClose:e,open:r}=cb(),n=eEe();return P.jsxs(K$,{open:r,onOpenChange:({open:i})=>i?t():e(),children:[P.jsx(J$,{asChild:!0,children:P.jsx(Ti,{"data-testid":"revision-endpoint-button",className:r?void 0:SZ.Action,"aria-label":"",opacity:.5,_hover:{opacity:1},variant:"plain",size:"xl",children:P.jsx(sg,{size:"lg",children:n.isThereEndpoint?P.jsx(eSe,{}):P.jsx(tSe,{})})})}),P.jsx(e2,{children:P.jsxs(t2,{maxWidth:"240px",children:[P.jsx(r2,{}),P.jsx(sW,{children:P.jsxs(Te,{flexDirection:"column",gap:"1rem",children:[P.jsx(V4,{type:pl.GRAPHQL}),P.jsx(V4,{type:pl.REST_API})]})}),P.jsx(aW,{justifyContent:"center",children:P.jsx(dt,{color:"gray.400",opacity:"0.7",fontSize:"xs",as:"samp",children:n.branchTitle})})]})})]})});var si=(t=>(t.Revision="Revision",t.Parent="Parent",t.Draft="Draft",t.Start="Start",t.Head="Head",t.Child="Child",t.PreviousPage="PreviousPage",t.NextPage="NextPage",t))(si||{});const NR=["PreviousPage","NextPage"];class yEe{constructor(e){this.projectPageModel=e,lt(this)}async queryNextPage(e){e.getChildrenDetails(Da).isAllLoaded||await gt.queryRevisions({branch:this.branchVariables,revisions:{first:Da,after:e.id}})}async queryPreviousPage(e){e.getParentsDetails(Da).isAllLoaded||await gt.queryRevisions({branch:this.branchVariables,revisions:{first:Da,before:e.id}})}get branchVariables(){return{organizationId:this.projectPageModel.organization.id,projectName:this.projectPageModel.project.name,branchName:this.projectPageModel.branchOrThrow.name}}}var fu=(t=>(t.None="None",t.Left="Left",t.Right="Right",t))(fu||{});class bEe{constructor(e,r,n,i,o){de(this,"disposers",[]);this.cache=e,this.projectPageModel=r,this.revisionsCardItemsModel=n,this.middleRevisions=i,this.revisionsPageQueries=o,lt(this,{},{autoBind:!0}),this.updateWithDesiredCurrentRevision()}get items(){return this.revisionsCardItemsModel.items}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}init(){this.middleRevisions.resetDefaultMaxItems(),this.disposers.push(ol(()=>this.projectPageModel.branch,this.onSelectBranch)),this.disposers.push(ol(()=>{var e;return(e=this.projectPageModel.branch)==null?void 0:e.head},this.onCreatedNewRevision)),this.disposers.push(ol(()=>this.projectPageModel.revision,this.onSelectRevision))}dispose(){for(const e of this.disposers)e();this.disposers=[]}async previousPage(e){var n;const r=(n=this.cache.revision.get(e))==null?void 0:n.child;if(!r)throw new Error(`Not found revision ${e}`);await this.revisionsPageQueries.queryPreviousPage(r),this.middleRevisions.select({desiredRevision:r,priority:fu.Left})}async nextPage(e){var n;const r=(n=this.cache.revision.get(e))==null?void 0:n.parent;if(!r)throw new Error(`Not found revision ${e}`);await this.revisionsPageQueries.queryNextPage(r),this.middleRevisions.select({desiredRevision:r,priority:fu.Right})}updateWithDesiredCurrentRevision(){this.middleRevisions.select({desiredRevision:this.revision,priority:fu.None})}onSelectBranch(){this.dispose(),this.init(),this.updateWithDesiredCurrentRevision()}onCreatedNewRevision(){this.middleRevisions.increaseMaxItemsForNewRevision(),this.middleRevisions.select({desiredRevision:this.branch.head,priority:fu.None})}onSelectRevision(e){(e===this.branch.start||e===this.branch.head||e===this.branch.draft)&&this.middleRevisions.select({desiredRevision:e,priority:fu.None})}}class OEe{constructor(e){this.projectPageModel=e}get branch(){return this.projectPageModel.branchOrThrow}find({targetRevision:e,priority:r,maxItems:n}){const i=[],{rawRightPartRevisions:o,rawLeftPartRevisions:a}=this.getParts({targetRevision:e,priority:r,maxItems:n});return i.push(...a),i.push(e),i.push(...o),i}getParts({targetRevision:e,priority:r,maxItems:n}){const i=this.getLeftPartRevisions({targetRevision:e,maxLength:n+1}),o=this.getRightPartRevisions({targetRevision:e,maxLength:n+1}),a=[],s=[],l=i.slice(),c=o.slice().reverse();let d=0;for(;d<n;){const p=r===fu.Right&&c.length&&a.length>0?void 0:l.pop();if(p&&(a.unshift(p),d+=1),d>=n)break;const g=r===fu.Left&&l.length&&s.length>0?void 0:c.pop();if(g&&(s.push(g),d+=1),!l.length&&!c.length)break}return{rawLeftPartRevisions:a,rawRightPartRevisions:s}}getLeftPartRevisions({targetRevision:e,maxLength:r}){const n=[];if(e!==this.branch.start&&e.parent!==this.branch.start){let i=e.parent;for(;i&&(i!==this.branch.head&&n.push(i),i=i.parent,!(this.branch.start===i||n.length>=r)););}return n.reverse()}getRightPartRevisions({targetRevision:e,maxLength:r}){const n=[];if(e!==this.branch.head&&e!==this.branch.draft&&e.child!==this.branch.head){let i=e.child;for(;i&&(n.push(i),i=i.child,!(this.branch.head===i||n.length>=r)););}return n}}const wEe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},SEe=(t,e,r)=>{let n;const i=wEe[t];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function eE(t){return(e={})=>{const r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}const xEe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},PEe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},kEe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},CEe={date:eE({formats:xEe,defaultWidth:"full"}),time:eE({formats:PEe,defaultWidth:"full"}),dateTime:eE({formats:kEe,defaultWidth:"full"})},TEe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},EEe=(t,e,r,n)=>TEe[t];function Dm(t){return(e,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let i;if(n==="formatting"&&t.formattingValues){const a=t.defaultFormattingWidth||t.defaultWidth,s=r!=null&&r.width?String(r.width):a;i=t.formattingValues[s]||t.formattingValues[a]}else{const a=t.defaultWidth,s=r!=null&&r.width?String(r.width):t.defaultWidth;i=t.values[s]||t.values[a]}const o=t.argumentCallback?t.argumentCallback(e):e;return i[o]}}const _Ee={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},REe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},IEe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$Ee={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},AEe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},MEe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},NEe=(t,e)=>{const r=Number(t),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},jEe={ordinalNumber:NEe,era:Dm({values:_Ee,defaultWidth:"wide"}),quarter:Dm({values:REe,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Dm({values:IEe,defaultWidth:"wide"}),day:Dm({values:$Ee,defaultWidth:"wide"}),dayPeriod:Dm({values:AEe,defaultWidth:"wide",formattingValues:MEe,defaultFormattingWidth:"wide"})};function Lm(t){return(e,r={})=>{const n=r.width,i=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;const a=o[0],s=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(s)?LEe(s,p=>p.test(a)):DEe(s,p=>p.test(a));let c;c=t.valueCallback?t.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;const d=e.slice(a.length);return{value:c,rest:d}}}function DEe(t,e){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}function LEe(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}function QEe(t){return(e,r={})=>{const n=e.match(t.matchPattern);if(!n)return null;const i=n[0],o=e.match(t.parsePattern);if(!o)return null;let a=t.valueCallback?t.valueCallback(o[0]):o[0];a=r.valueCallback?r.valueCallback(a):a;const s=e.slice(i.length);return{value:a,rest:s}}}const VEe=/^(\d+)(th|st|nd|rd)?/i,FEe=/\d+/i,BEe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zEe={any:[/^b/i,/^(a|c)/i]},qEe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WEe={any:[/1/i,/2/i,/3/i,/4/i]},UEe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},HEe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},XEe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ZEe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},GEe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},YEe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},KEe={ordinalNumber:QEe({matchPattern:VEe,parsePattern:FEe,valueCallback:t=>parseInt(t,10)}),era:Lm({matchPatterns:BEe,defaultMatchWidth:"wide",parsePatterns:zEe,defaultParseWidth:"any"}),quarter:Lm({matchPatterns:qEe,defaultMatchWidth:"wide",parsePatterns:WEe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Lm({matchPatterns:UEe,defaultMatchWidth:"wide",parsePatterns:HEe,defaultParseWidth:"any"}),day:Lm({matchPatterns:XEe,defaultMatchWidth:"wide",parsePatterns:ZEe,defaultParseWidth:"any"}),dayPeriod:Lm({matchPatterns:GEe,defaultMatchWidth:"any",parsePatterns:YEe,defaultParseWidth:"any"})},JEe={code:"en-US",formatDistance:SEe,formatLong:CEe,formatRelative:EEe,localize:jEe,match:KEe,options:{weekStartsOn:0,firstWeekContainsDate:1}};let e_e={};function kP(){return e_e}const xZ=6048e5,t_e=864e5;function Es(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function F4(t){const e=Es(t);return e.setHours(0,0,0,0),e}function B4(t){const e=Es(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function r_e(t,e){const r=F4(t),n=F4(e),i=+r-B4(r),o=+n-B4(n);return Math.round((i-o)/t_e)}function bf(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function n_e(t){const e=Es(t),r=bf(t,0);return r.setFullYear(e.getFullYear(),0,1),r.setHours(0,0,0,0),r}function i_e(t){const e=Es(t);return r_e(e,n_e(e))+1}function xy(t,e){var s,l,c,d;const r=kP(),n=(e==null?void 0:e.weekStartsOn)??((l=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((d=(c=r.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,i=Es(t),o=i.getDay(),a=(o<n?7:0)+o-n;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function PS(t){return xy(t,{weekStartsOn:1})}function PZ(t){const e=Es(t),r=e.getFullYear(),n=bf(t,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const i=PS(n),o=bf(t,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=PS(o);return e.getTime()>=i.getTime()?r+1:e.getTime()>=a.getTime()?r:r-1}function o_e(t){const e=PZ(t),r=bf(t,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),PS(r)}function a_e(t){const e=Es(t),r=+PS(e)-+o_e(e);return Math.round(r/xZ)+1}function kZ(t,e){var d,p,g,m;const r=Es(t),n=r.getFullYear(),i=kP(),o=(e==null?void 0:e.firstWeekContainsDate)??((p=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??i.firstWeekContainsDate??((m=(g=i.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,a=bf(t,0);a.setFullYear(n+1,0,o),a.setHours(0,0,0,0);const s=xy(a,e),l=bf(t,0);l.setFullYear(n,0,o),l.setHours(0,0,0,0);const c=xy(l,e);return r.getTime()>=s.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function s_e(t,e){var s,l,c,d;const r=kP(),n=(e==null?void 0:e.firstWeekContainsDate)??((l=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((d=(c=r.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,i=kZ(t,e),o=bf(t,0);return o.setFullYear(i,0,n),o.setHours(0,0,0,0),xy(o,e)}function l_e(t,e){const r=Es(t),n=+xy(r,e)-+s_e(r,e);return Math.round(n/xZ)+1}function Mr(t,e){const r=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return r+n}const Jc={y(t,e){const r=t.getFullYear(),n=r>0?r:1-r;return Mr(e==="yy"?n%100:n,e.length)},M(t,e){const r=t.getMonth();return e==="M"?String(r+1):Mr(r+1,2)},d(t,e){return Mr(t.getDate(),e.length)},a(t,e){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(t,e){return Mr(t.getHours()%12||12,e.length)},H(t,e){return Mr(t.getHours(),e.length)},m(t,e){return Mr(t.getMinutes(),e.length)},s(t,e){return Mr(t.getSeconds(),e.length)},S(t,e){const r=e.length,n=t.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return Mr(i,e.length)}},kh={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},z4={G:function(t,e,r){const n=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(t,e,r){if(e==="yo"){const n=t.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return Jc.y(t,e)},Y:function(t,e,r,n){const i=kZ(t,n),o=i>0?i:1-i;if(e==="YY"){const a=o%100;return Mr(a,2)}return e==="Yo"?r.ordinalNumber(o,{unit:"year"}):Mr(o,e.length)},R:function(t,e){const r=PZ(t);return Mr(r,e.length)},u:function(t,e){const r=t.getFullYear();return Mr(r,e.length)},Q:function(t,e,r){const n=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Mr(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,r){const n=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Mr(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,r){const n=t.getMonth();switch(e){case"M":case"MM":return Jc.M(t,e);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,r){const n=t.getMonth();switch(e){case"L":return String(n+1);case"LL":return Mr(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,r,n){const i=l_e(t,n);return e==="wo"?r.ordinalNumber(i,{unit:"week"}):Mr(i,e.length)},I:function(t,e,r){const n=a_e(t);return e==="Io"?r.ordinalNumber(n,{unit:"week"}):Mr(n,e.length)},d:function(t,e,r){return e==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):Jc.d(t,e)},D:function(t,e,r){const n=i_e(t);return e==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Mr(n,e.length)},E:function(t,e,r){const n=t.getDay();switch(e){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,r,n){const i=t.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Mr(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,r,n){const i=t.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Mr(o,e.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,r){const n=t.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return Mr(i,e.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,r){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,r){const n=t.getHours();let i;switch(n===12?i=kh.noon:n===0?i=kh.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,r){const n=t.getHours();let i;switch(n>=17?i=kh.evening:n>=12?i=kh.afternoon:n>=4?i=kh.morning:i=kh.night,e){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,r){if(e==="ho"){let n=t.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Jc.h(t,e)},H:function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):Jc.H(t,e)},K:function(t,e,r){const n=t.getHours()%12;return e==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Mr(n,e.length)},k:function(t,e,r){let n=t.getHours();return n===0&&(n=24),e==="ko"?r.ordinalNumber(n,{unit:"hour"}):Mr(n,e.length)},m:function(t,e,r){return e==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):Jc.m(t,e)},s:function(t,e,r){return e==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):Jc.s(t,e)},S:function(t,e){return Jc.S(t,e)},X:function(t,e,r){const n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return W4(n);case"XXXX":case"XX":return Fd(n);case"XXXXX":case"XXX":default:return Fd(n,":")}},x:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"x":return W4(n);case"xxxx":case"xx":return Fd(n);case"xxxxx":case"xxx":default:return Fd(n,":")}},O:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q4(n,":");case"OOOO":default:return"GMT"+Fd(n,":")}},z:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q4(n,":");case"zzzz":default:return"GMT"+Fd(n,":")}},t:function(t,e,r){const n=Math.trunc(t.getTime()/1e3);return Mr(n,e.length)},T:function(t,e,r){const n=t.getTime();return Mr(n,e.length)}};function q4(t,e=""){const r=t>0?"-":"+",n=Math.abs(t),i=Math.trunc(n/60),o=n%60;return o===0?r+String(i):r+String(i)+e+Mr(o,2)}function W4(t,e){return t%60===0?(t>0?"-":"+")+Mr(Math.abs(t)/60,2):Fd(t,e)}function Fd(t,e=""){const r=t>0?"-":"+",n=Math.abs(t),i=Mr(Math.trunc(n/60),2),o=Mr(n%60,2);return r+i+e+o}const U4=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},CZ=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},c_e=(t,e)=>{const r=t.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return U4(t,e);let o;switch(n){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",U4(n,e)).replace("{{time}}",CZ(i,e))},u_e={p:CZ,P:c_e},d_e=/^D+$/,f_e=/^Y+$/,h_e=["D","DD","YY","YYYY"];function p_e(t){return d_e.test(t)}function g_e(t){return f_e.test(t)}function m_e(t,e,r){const n=v_e(t,e,r);if(console.warn(n),h_e.includes(t))throw new RangeError(n)}function v_e(t,e,r){const n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function y_e(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function b_e(t){if(!y_e(t)&&typeof t!="number")return!1;const e=Es(t);return!isNaN(Number(e))}const O_e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,w_e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,S_e=/^'([^]*?)'?$/,x_e=/''/g,P_e=/[a-zA-Z]/;function TZ(t,e,r){var d,p,g,m,y,b,O,S;const n=kP(),i=(r==null?void 0:r.locale)??n.locale??JEe,o=(r==null?void 0:r.firstWeekContainsDate)??((p=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(g=n.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,a=(r==null?void 0:r.weekStartsOn)??((b=(y=r==null?void 0:r.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??n.weekStartsOn??((S=(O=n.locale)==null?void 0:O.options)==null?void 0:S.weekStartsOn)??0,s=Es(t);if(!b_e(s))throw new RangeError("Invalid time value");let l=e.match(w_e).map(w=>{const k=w[0];if(k==="p"||k==="P"){const T=u_e[k];return T(w,i.formatLong)}return w}).join("").match(O_e).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const k=w[0];if(k==="'")return{isToken:!1,value:k_e(w)};if(z4[k])return{isToken:!0,value:w};if(k.match(P_e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return{isToken:!1,value:w}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(w=>{if(!w.isToken)return w.value;const k=w.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&g_e(k)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&p_e(k))&&m_e(k,e,String(t));const T=z4[k[0]];return T(s,k,i.localize,c)}).join("")}function k_e(t){const e=t.match(S_e);return e?e[1].replace(x_e,"'"):t}class C_e{constructor(e,r){de(this,"index",0);this.projectPageModel=e,this.childBranch=r,lt(this)}get id(){return this.childBranch.branchName}get children(){return[]}get disabled(){return!1}get icon(){return si.Child}get dataTestId(){return`revision-child-branch-${this.childBranch.branchName}`}get link(){return fa(`/${Pu}/${ku}/${Cu}/${Tu}/-/${this.childBranch.revisionStartId}`,{organizationId:this.projectPageModel.organization.id,projectName:this.projectPageModel.project.name,branchName:this.childBranch.branchName})}get tooltip(){return[`Branch: ${this.childBranch.branchName}`]}get hidden(){return!1}}class Ch{constructor(e,r,n){de(this,"index",0);this.projectPageModel=e,this.linkMaker=r,this.revision=n,lt(this)}get id(){return this.revision.id}get isThereEndpoint(){return!!this.revision.endpoints.length}get children(){return this.revision.childBranches.map(e=>new C_e(this.projectPageModel,e))}get disabled(){return this.revision.id===this.projectPageModel.revisionOrThrow.id}get icon(){return this.checkIsHeadRevision()?si.Head:this.checkIsStartRevision()?si.Start:this.checkIsDraftRevision()?si.Draft:si.Revision}get dataTestId(){return this.checkIsHeadRevision()?"revision-head":this.checkIsStartRevision()?"revision-start":this.checkIsDraftRevision()?"revision-draft":`revision_index_${this.index}`}get link(){return this.linkMaker.make(this.revisionLinkOption)}get tooltip(){if(this.checkIsDraftRevision())return["Draft revision"];const e=this.revision.comment?[this.revision.comment]:[],r=TZ(new Date(this.revision.createdAt),"dd MMM yyyy, HH:mm:ss"),n=[...e,this.revision.id,r],i=this.revision.endpoints.map(o=>`${wZ(o.type)}`);return i.length&&(n.push("".padEnd(25,"-")),n.push("Active endpoints:"),n.push(i.join(", "))),this.checkIsHeadRevision()&&n.unshift("Head revision:"),this.checkIsStartRevision()&&n.unshift("Init revision:"),n}get hidden(){return!1}get revisionLinkOption(){return this.checkIsHeadRevision()?{isHead:!0}:this.checkIsDraftRevision()?{isDraft:!0}:{id:this.revision.id}}checkIsStartRevision(){return this.projectPageModel.branchOrThrow.start.id===this.revision.id}checkIsDraftRevision(){return this.projectPageModel.branchOrThrow.draft.id===this.revision.id}checkIsHeadRevision(){return this.projectPageModel.branchOrThrow.head.id===this.revision.id}}class T_e{constructor(e){de(this,"index",0);this.revision=e,lt(this)}get id(){return this.revision.id}get children(){return[]}get disabled(){return!1}get icon(){return si.NextPage}get dataTestId(){return"revision-next-page"}get link(){return""}get tooltip(){return["Next page"]}get hidden(){return!1}}class E_e{constructor(e,r){de(this,"index",0);this.projectPageModel=e,this.parentBranch=r,lt(this)}get id(){return this.parentBranch.branchName}get children(){return[]}get disabled(){return!1}get icon(){return si.Parent}get dataTestId(){return`revision-parent-branch-${this.parentBranch.branchName}`}get link(){return fa(`/${Pu}/${ku}/${Cu}/${Tu}/-/${this.parentBranch.fromRevisionId}`,{organizationId:this.projectPageModel.organization.id,projectName:this.projectPageModel.project.name,branchName:this.parentBranch.branchName})}get tooltip(){return[`Branch: ${this.parentBranch.branchName}`]}get hidden(){return!1}}class __e{constructor(e){de(this,"index",0);this.revision=e,lt(this)}get id(){return this.revision.id}get children(){return[]}get disabled(){return!1}get icon(){return si.PreviousPage}get dataTestId(){return"revision-previous-page"}get link(){return""}get tooltip(){return["Previous page"]}get hidden(){return!1}}class R_e{constructor(e,r,n){this.projectPageModel=e,this.linkMaker=r,this.middleRevisions=n,lt(this,{},{autoBind:!0})}get items(){const e=[];this.branch.parentBranch&&e.push(this.createParentBranchItem(this.branch.parentBranch)),this.shouldAddStartRevision()&&e.push(this.createStartItem());const r=this.middleRevisions.data.slice(),n=r.shift(),i=r.pop();n&&e.push(this.createFirstMiddleItem(n));for(const o of r)e.push(this.createMiddleItem(o));return i&&e.push(this.createLastMiddleItem(i)),e.push(this.createHeadItem()),this.branch.touched&&e.push(this.createDraftItem()),e.length===1&&!this.branch.head.tablesConnection.totalCount?[]:(e.forEach((o,a)=>{o.index=a}),e)}get branch(){return this.projectPageModel.branchOrThrow}createParentBranchItem(e){return new E_e(this.projectPageModel,e)}createStartItem(){return new Ch(this.projectPageModel,this.linkMaker,this.branch.start)}createFirstMiddleItem(e){return e.parent===this.branch.start?new Ch(this.projectPageModel,this.linkMaker,e):new __e(e)}createMiddleItem(e){return new Ch(this.projectPageModel,this.linkMaker,e)}createLastMiddleItem(e){return e.child===this.branch.head?new Ch(this.projectPageModel,this.linkMaker,e):new T_e(e)}createHeadItem(){return new Ch(this.projectPageModel,this.linkMaker,this.branch.head)}createDraftItem(){return new Ch(this.projectPageModel,this.linkMaker,this.branch.draft)}shouldAddStartRevision(){return this.branch.start!==this.branch.head}}const tE=8;class I_e{constructor(e,r){de(this,"data",[]);de(this,"currentDefaultMaxItems",tE);this.projectPageModel=e,this.middleRevisionsFinder=r,lt(this)}get branch(){return this.projectPageModel.branchOrThrow}select({desiredRevision:e,priority:r}){this.shouldResetDefaultMaxItems(e)&&this.resetDefaultMaxItems(),this.isNoChangesForDefaultBranch()&&(this.data=[]);const n=[];if(this.shouldAddMiddleRevisions()){const i=this.middleRevisionsFinder.find({targetRevision:this.getTargetRevision(e),priority:r,maxItems:this.currentDefaultMaxItems});n.push(...i)}this.data=n}resetDefaultMaxItems(){this.currentDefaultMaxItems=tE}increaseMaxItemsForNewRevision(){this.currentDefaultMaxItems=tE+1}isNoChangesForDefaultBranch(){return!this.branch.parentBranch&&this.branch.start===this.branch.head&&!this.branch.touched}shouldAddMiddleRevisions(){return this.branch.start!==this.branch.head&&this.branch.start.child!==this.branch.head}getTargetRevision(e){return e===this.branch.start?this.branch.start.child:e===this.branch.head||e===this.branch.draft?this.branch.head.parent:e}shouldResetDefaultMaxItems(e){return e!==this.branch.head}}const $_e=()=>{const t=Vf(),e=Ui(),[r]=A.useState(()=>{const n=new OEe(e),i=new I_e(e,n),o=new R_e(e,t,i),a=new yEe(e);return new bEe(gt.cache,e,o,i,a)});return A.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},A_e=t=>{switch(t){case si.Child:return P.jsx(q1e,{size:"24"});case si.Draft:return P.jsx(G1e,{});case si.Start:return P.jsx(a4,{});case si.Head:return P.jsx(Y1e,{});case si.Revision:return P.jsx(a4,{});case si.Parent:return P.jsx(W1e,{});case si.PreviousPage:return P.jsx(o4,{});case si.NextPage:return P.jsx(o4,{})}},EZ=mt(({data:t,onClick:e})=>{const[r,n]=A.useState(!1),i=A.useCallback(async()=>{NR.includes(t.icon)?(n(!0),await(e==null?void 0:e()),n(!1)):e==null||e()},[t.icon,e]);return P.jsxs(dW,{openDelay:750,children:[P.jsx(fW,{asChild:!0,children:P.jsxs(ze,{position:"relative",children:[P.jsx(Ti,{"data-testid":t.dataTestId,loading:r,onClick:i,_disabled:r?{opacity:.2}:{opacity:1},_hover:t.disabled?{opacity:1}:{opacity:.4},"aria-label":"",disabled:t.disabled,opacity:NR.includes(t.icon)?.7:.2,variant:"ghost",children:A_e(t.icon)}),t.isThereEndpoint&&P.jsx(ze,{position:"absolute",right:"0px",top:"0px",opacity:"0.4",children:P.jsx(K1e,{})})]})}),P.jsx(hW,{children:P.jsx(pW,{textAlign:"center",children:P.jsx(tS,{children:t.tooltip.map((o,a)=>P.jsx("span",{children:o},a))})})})]})}),H4=mt(({data:t})=>P.jsx(Ua,{to:t.link,children:P.jsx(EZ,{data:t})})),X4=({data:t,onSelect:e})=>{const r=A.useCallback(async()=>{await e(t.id)},[t.id,e]);return P.jsx(EZ,{data:t,onClick:r})},M_e=mt(({endpointSlot:t})=>{const e=$_e();return e.items.length?P.jsxs(Te,{alignItems:"flex-start",justifyContent:"space-between",paddingBottom:"1rem",children:[P.jsx(Te,{flexDirection:"column",flex:1,gap:"1rem",children:P.jsx(Te,{"data-testid":"revision-endpoint-widget",children:e.items.map((r,n)=>P.jsxs(Qe.Fragment,{children:[P.jsxs(Te,{alignItems:"center",flexDirection:"column",children:[r.icon===si.PreviousPage&&P.jsx(X4,{data:r,onSelect:e.previousPage}),r.icon===si.NextPage&&P.jsx(X4,{data:r,onSelect:e.nextPage}),!NR.includes(r.icon)&&P.jsx(H4,{data:r}),r.children.length?P.jsx(U1e,{opacity:"0.15"}):null,r.children.map(i=>P.jsx(H4,{data:i},i.id))]}),n!==e.items.length-1&&P.jsx(Te,{alignItems:"center",height:"40px",children:P.jsx(H1e,{opacity:"0.15"})})]},r.id))})}),P.jsx(Te,{children:t})]}):null}),N_e=()=>P.jsx(ze,{className:SZ.Root,children:P.jsx(M_e,{endpointSlot:P.jsx(vEe,{})})});class j_e{constructor(e){this.projectPageModel=e,lt(this)}get hasNextPage(){return this.project.branchesConnection.availableNextPage}get organizationId(){return this.organization.id}get projectName(){return this.project.name}get items(){return this.project.branchesConnection.edges.map(({node:e})=>{var n;const r=e.name===((n=this.branch)==null?void 0:n.name);return{id:e.id,name:e.name,link:r?"":`${L_e(this.organizationId,this.projectName,e.name)}${D_e(e)}`,title:`${e.name}`,isActive:r,touched:e.touched}})}init(){}dispose(){}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branch}}const D_e=t=>t.touched?fa(`/${pP}`):"",L_e=(t,e,r)=>fa(`/${Pu}/${ku}/${Cu}/${Tu}`,{organizationId:t,projectName:e,branchName:r}),Q_e=()=>{const t=Ui(),[e]=A.useState(()=>new j_e(t));return A.useEffect(()=>(e.init(),()=>{e.dispose()}),[e]),e},V_e=mt(()=>{const t=Q_e();return P.jsxs(tS,{alignItems:"flex-start",gap:"1rem",children:[P.jsx(Ua,{to:"/",children:P.jsx(cme,{color:"gray",size:"xl","data-testid":"sidebar-back-to-projects-button",children:P.jsx("b",{children:t.projectName})})}),P.jsxs(tS,{alignItems:"flex-start",borderTop:"1px solid",borderTopColor:"gray.100",gap:"0.25rem",pb:"1rem",pt:"1rem",width:"100%",children:[P.jsx(dt,{color:"gray",fontSize:"sm",mb:"0.5rem",children:"Branches:"}),t.items.map(e=>P.jsxs(Te,{_hover:e.isActive?{}:{backgroundColor:"gray.200"},alignItems:"center",backgroundColor:e.isActive?"gray.100":void 0,borderRadius:"0.25rem",height:"32px",paddingLeft:"0.5rem",width:"100%",children:[e.isActive?P.jsx(dt,{color:"gray.500",fontWeight:"600",children:e.title}):P.jsx(dt,{color:"gray.500",fontWeight:"600",children:P.jsx(Ua,{to:e.link,"data-testid":`sidebar-branch-${e.name}`,children:e.title},e.id)}),e.touched&&P.jsx(dt,{color:"gray.600",children:"*"})]},e.id))]})]})});class F_e{constructor(e,r){this.projectPageModel=e,this.linkMaker=r,lt(this)}get hasNextPage(){return this.project.branchesConnection.availableNextPage}get items(){return this.revision.tablesConnection.edges.map(({node:e})=>{var n;const r=e.id===((n=this.table)==null?void 0:n.id);return{id:e.id,versionId:e.versionId,link:r?"":`${this.linkMaker.currentBaseLink}/${e.id}`,isActive:r,touched:!e.readonly}})}get project(){return this.projectPageModel.project}get revision(){return this.projectPageModel.revisionOrThrow}get table(){return this.projectPageModel.table}init(){}dispose(){}}const B_e=()=>{const t=Ui(),e=Vf(),[r]=A.useState(()=>new F_e(t,e));return A.useEffect(()=>(r.init(),()=>{r.dispose()}),[r]),r},z_e=mt(()=>{const t=B_e();return P.jsxs(tS,{alignItems:"flex-start",gap:"0.25rem",width:"100%",children:[P.jsx(dt,{color:"gray",fontSize:"sm",mb:"0.5rem",children:"Tables:"}),t.items.map(e=>P.jsxs(Te,{_hover:{backgroundColor:"gray.200"},alignItems:"center",backgroundColor:e.isActive?"gray.100":void 0,borderRadius:"0.25rem",height:"32px",paddingLeft:"0.5rem",paddingRight:"0.5rem",width:"100%",children:[e.isActive?P.jsx(dt,{color:"gray.500",fontWeight:"600",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:e.id}):P.jsx(dt,{color:"gray.500",fontWeight:"600",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:P.jsx(Ua,{to:e.link,"data-testid":`sidebar-table-${e.id}`,children:e.id},e.id)}),e.touched&&P.jsx(dt,{color:"gray.600",children:"*"})]},e.versionId))]})}),q_e=mt(()=>{const t=Ui();return P.jsxs(P.Fragment,{children:[P.jsx(ze,{minHeight:"120px",children:P.jsx(V_e,{})}),t.table&&P.jsx(ze,{borderTop:"1px solid",borderTopColor:"gray.100",paddingTop:"1rem",children:P.jsx(z_e,{})})]})}),W_e=mt(()=>(CTe(),P.jsx(gg,{actions:P.jsx(HTe,{}),sidebar:P.jsx(q_e,{}),title:P.jsx(KTe,{}),children:P.jsxs(Te,{flex:1,flexDirection:"column",gap:"1rem",children:[P.jsx(N_e,{}),P.jsx(Te,{flexDirection:"column",gap:"0.5rem",flex:1,children:P.jsx(dS,{})})]})})));class jR{constructor(e,r,n){de(this,"isLoading",!1);this.authService=e,this.routerService=r,this.apiService=n,lt(this)}async confirmEmailCode(e){e?(await this.request(e),await this.routerService.navigate(H2)):console.error("Invalid code")}init(){}dispose(){}async request(e){this.setIsLoading(!0);try{const r=await this.apiService.client.confirmEmailCode({data:{code:e}});return await this.authService.setToken(r.confirmEmailCode.accessToken),!0}catch(r){console.error(r)}finally{this.setIsLoading(!1)}}setIsLoading(e){this.isLoading=e}}ft.register(jR,()=>{const t=ft.get(ho),e=ft.get(Sc),r=ft.get(hl);return new jR(t,e,r)},{scope:"request"});const U_e=mt(()=>{const[t]=Jbe({code:""}),e=jf(jR);return A.useEffect(()=>{e.confirmEmailCode(t.get("code"))},[e,t]),e.isLoading?P.jsx(Y$,{w:"100%",h:"100%",children:P.jsx(Bx,{})}):null}),H_e=()=>null;class DR{constructor(e,r,n){de(this,"isLoading",!1);this.routerService=e,this.apiService=r,this.authService=n,lt(this)}async login(e){e?(await this.loginRequest(e),await this.routerService.navigate("/")):console.error("Invalid code")}dispose(){}init(){}async loginRequest(e){this.setIsLoading(!0);try{const r=await this.apiService.client.loginGithub({data:{code:e}});return await this.authService.setToken(r.loginGithub.accessToken),!0}catch(r){console.error(r)}finally{this.setIsLoading(!1)}}setIsLoading(e){this.isLoading=e}}ft.register(DR,()=>{const t=ft.get(Sc),e=ft.get(hl),r=ft.get(ho);return new DR(t,e,r)},{scope:"request"});const X_e=async({request:t})=>{const n=new URL(t.url).searchParams.get("code");if(!n)throw new Error("Invalid code");return await ft.get(DR).login(n),Tp("/")},Z_e=Ae`
|
|
1067
|
+
`,lEe=async t=>{const e=await _r.mutate({mutation:sEe,variables:t});if(!e.data)throw e.errors;return e.data};class cEe{constructor(e,r){this.projectPageModel=e,this.endpointId=r}get revision(){return this.projectPageModel.revisionOrThrow}async execute(){const e=await this.deleteEndpointRequest();return this.updateRevision(),e}async deleteEndpointRequest(){return(await lEe({data:{endpointId:this.endpointId}})).deleteEndpoint}updateRevision(){this.revision.removeEndpoint(this.endpointId)}}const uEe=gv("REACT_APP_ENDPOINT_SERVER_URL"),dEe={[pl.GRAPHQL]:"graphql",[pl.REST_API]:"swagger"};class fEe{constructor(e,r){this.projectPageModel=e,this.endpointType=r,lt(this,{},{autoBind:!0})}get href(){if(!this.endpoint)return;const e=`${this.baseUrl}/${this.organization.id}/${this.project.name}/${this.branch.name}`;return this.projectPageModel.isDraftRevision?`${e}/draft`:this.projectPageModel.isHeadRevision?`${e}/head`:`${e}/${this.revision.id}`}async switch(){try{return this.endpoint?await new cEe(this.projectPageModel,this.endpoint.id).execute():new aEe(gt,this.projectPageModel,this.endpointType).execute()}catch(e){console.log(e)}}init(){}dispose(){}get endpoint(){return this.revision.endpoints.find(e=>e.type===this.endpointType)}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}get baseUrl(){return this.endpointType===pl.GRAPHQL?`/${tX}`:`${uEe}/${dEe[this.endpointType]}`}}const hEe=t=>{const e=Ui(),[r]=A.useState(()=>new fEe(e,t));return A.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},pEe={[pl.GRAPHQL]:P.jsx(tEe,{size:20}),[pl.REST_API]:P.jsx(rEe,{size:20})},V4=mt(({type:t})=>{const e=hEe(t);return P.jsxs(Te,{alignItems:"center",gap:"0.5rem",minWidth:"90px",height:"25px",children:[P.jsx(ze,{color:e.href?"gray.400":"gray.300",children:pEe[t]}),P.jsx(dt,{width:"140px",color:"gray.400",children:wZ(t)}),P.jsxs(Te,{width:"120px",gap:"0.5rem",alignItems:"center",children:[P.jsxs(Uge,{"data-testid":`endpoint-switch-${t}`,colorPalette:"gray",checked:!!e.href,onCheckedChange:e.switch,children:[P.jsx(Xge,{}),P.jsx(Hge,{children:P.jsx(cW,{})})]}),e.href&&P.jsx(gb,{href:e.href,target:"_blank",rel:"noopener noreferrer",children:P.jsx(ag,{"data-testid":`endpoint-button-${t}`,size:"sm","aria-label":"removeRow",color:"gray.500",disabled:!e.href,variant:"ghost",padding:0,minWidth:"20px",minHeight:"20px",height:"20px",paddingBottom:"3px",children:P.jsx(rSe,{size:"20px"})})})]})]})}),gEe="_Root_t8kot_1",mEe="_Action_t8kot_1",SZ={Root:gEe,Action:mEe},vEe=mt(()=>{const{onOpen:t,onClose:e,open:r}=cb(),n=eEe();return P.jsxs(K$,{open:r,onOpenChange:({open:i})=>i?t():e(),children:[P.jsx(J$,{asChild:!0,children:P.jsx(Ti,{"data-testid":"revision-endpoint-button",className:r?void 0:SZ.Action,"aria-label":"",opacity:.5,_hover:{opacity:1},variant:"plain",size:"xl",children:P.jsx(sg,{size:"lg",children:n.isThereEndpoint?P.jsx(eSe,{}):P.jsx(tSe,{})})})}),P.jsx(e2,{children:P.jsxs(t2,{maxWidth:"240px",children:[P.jsx(r2,{}),P.jsx(sW,{children:P.jsxs(Te,{flexDirection:"column",gap:"1rem",children:[P.jsx(V4,{type:pl.GRAPHQL}),P.jsx(V4,{type:pl.REST_API})]})}),P.jsx(aW,{justifyContent:"center",children:P.jsx(dt,{color:"gray.400",opacity:"0.7",fontSize:"xs",as:"samp",children:n.branchTitle})})]})})]})});var si=(t=>(t.Revision="Revision",t.Parent="Parent",t.Draft="Draft",t.Start="Start",t.Head="Head",t.Child="Child",t.PreviousPage="PreviousPage",t.NextPage="NextPage",t))(si||{});const NR=["PreviousPage","NextPage"];class yEe{constructor(e){this.projectPageModel=e,lt(this)}async queryNextPage(e){e.getChildrenDetails(Da).isAllLoaded||await gt.queryRevisions({branch:this.branchVariables,revisions:{first:Da,after:e.id}})}async queryPreviousPage(e){e.getParentsDetails(Da).isAllLoaded||await gt.queryRevisions({branch:this.branchVariables,revisions:{first:Da,before:e.id}})}get branchVariables(){return{organizationId:this.projectPageModel.organization.id,projectName:this.projectPageModel.project.name,branchName:this.projectPageModel.branchOrThrow.name}}}var fu=(t=>(t.None="None",t.Left="Left",t.Right="Right",t))(fu||{});class bEe{constructor(e,r,n,i,o){fe(this,"disposers",[]);this.cache=e,this.projectPageModel=r,this.revisionsCardItemsModel=n,this.middleRevisions=i,this.revisionsPageQueries=o,lt(this,{},{autoBind:!0}),this.updateWithDesiredCurrentRevision()}get items(){return this.revisionsCardItemsModel.items}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}init(){this.middleRevisions.resetDefaultMaxItems(),this.disposers.push(ol(()=>this.projectPageModel.branch,this.onSelectBranch)),this.disposers.push(ol(()=>{var e;return(e=this.projectPageModel.branch)==null?void 0:e.head},this.onCreatedNewRevision)),this.disposers.push(ol(()=>this.projectPageModel.revision,this.onSelectRevision))}dispose(){for(const e of this.disposers)e();this.disposers=[]}async previousPage(e){var n;const r=(n=this.cache.revision.get(e))==null?void 0:n.child;if(!r)throw new Error(`Not found revision ${e}`);await this.revisionsPageQueries.queryPreviousPage(r),this.middleRevisions.select({desiredRevision:r,priority:fu.Left})}async nextPage(e){var n;const r=(n=this.cache.revision.get(e))==null?void 0:n.parent;if(!r)throw new Error(`Not found revision ${e}`);await this.revisionsPageQueries.queryNextPage(r),this.middleRevisions.select({desiredRevision:r,priority:fu.Right})}updateWithDesiredCurrentRevision(){this.middleRevisions.select({desiredRevision:this.revision,priority:fu.None})}onSelectBranch(){this.dispose(),this.init(),this.updateWithDesiredCurrentRevision()}onCreatedNewRevision(){this.middleRevisions.increaseMaxItemsForNewRevision(),this.middleRevisions.select({desiredRevision:this.branch.head,priority:fu.None})}onSelectRevision(e){(e===this.branch.start||e===this.branch.head||e===this.branch.draft)&&this.middleRevisions.select({desiredRevision:e,priority:fu.None})}}class OEe{constructor(e){this.projectPageModel=e}get branch(){return this.projectPageModel.branchOrThrow}find({targetRevision:e,priority:r,maxItems:n}){const i=[],{rawRightPartRevisions:o,rawLeftPartRevisions:a}=this.getParts({targetRevision:e,priority:r,maxItems:n});return i.push(...a),i.push(e),i.push(...o),i}getParts({targetRevision:e,priority:r,maxItems:n}){const i=this.getLeftPartRevisions({targetRevision:e,maxLength:n+1}),o=this.getRightPartRevisions({targetRevision:e,maxLength:n+1}),a=[],s=[],l=i.slice(),c=o.slice().reverse();let d=0;for(;d<n;){const p=r===fu.Right&&c.length&&a.length>0?void 0:l.pop();if(p&&(a.unshift(p),d+=1),d>=n)break;const g=r===fu.Left&&l.length&&s.length>0?void 0:c.pop();if(g&&(s.push(g),d+=1),!l.length&&!c.length)break}return{rawLeftPartRevisions:a,rawRightPartRevisions:s}}getLeftPartRevisions({targetRevision:e,maxLength:r}){const n=[];if(e!==this.branch.start&&e.parent!==this.branch.start){let i=e.parent;for(;i&&(i!==this.branch.head&&n.push(i),i=i.parent,!(this.branch.start===i||n.length>=r)););}return n.reverse()}getRightPartRevisions({targetRevision:e,maxLength:r}){const n=[];if(e!==this.branch.head&&e!==this.branch.draft&&e.child!==this.branch.head){let i=e.child;for(;i&&(n.push(i),i=i.child,!(this.branch.head===i||n.length>=r)););}return n}}const wEe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},SEe=(t,e,r)=>{let n;const i=wEe[t];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function eE(t){return(e={})=>{const r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}const xEe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},PEe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},kEe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},CEe={date:eE({formats:xEe,defaultWidth:"full"}),time:eE({formats:PEe,defaultWidth:"full"}),dateTime:eE({formats:kEe,defaultWidth:"full"})},TEe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},EEe=(t,e,r,n)=>TEe[t];function Dm(t){return(e,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let i;if(n==="formatting"&&t.formattingValues){const a=t.defaultFormattingWidth||t.defaultWidth,s=r!=null&&r.width?String(r.width):a;i=t.formattingValues[s]||t.formattingValues[a]}else{const a=t.defaultWidth,s=r!=null&&r.width?String(r.width):t.defaultWidth;i=t.values[s]||t.values[a]}const o=t.argumentCallback?t.argumentCallback(e):e;return i[o]}}const _Ee={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},REe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},IEe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$Ee={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},AEe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},MEe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},NEe=(t,e)=>{const r=Number(t),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},jEe={ordinalNumber:NEe,era:Dm({values:_Ee,defaultWidth:"wide"}),quarter:Dm({values:REe,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Dm({values:IEe,defaultWidth:"wide"}),day:Dm({values:$Ee,defaultWidth:"wide"}),dayPeriod:Dm({values:AEe,defaultWidth:"wide",formattingValues:MEe,defaultFormattingWidth:"wide"})};function Lm(t){return(e,r={})=>{const n=r.width,i=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;const a=o[0],s=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(s)?LEe(s,p=>p.test(a)):DEe(s,p=>p.test(a));let c;c=t.valueCallback?t.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;const d=e.slice(a.length);return{value:c,rest:d}}}function DEe(t,e){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}function LEe(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}function QEe(t){return(e,r={})=>{const n=e.match(t.matchPattern);if(!n)return null;const i=n[0],o=e.match(t.parsePattern);if(!o)return null;let a=t.valueCallback?t.valueCallback(o[0]):o[0];a=r.valueCallback?r.valueCallback(a):a;const s=e.slice(i.length);return{value:a,rest:s}}}const VEe=/^(\d+)(th|st|nd|rd)?/i,FEe=/\d+/i,BEe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zEe={any:[/^b/i,/^(a|c)/i]},qEe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WEe={any:[/1/i,/2/i,/3/i,/4/i]},UEe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},HEe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},XEe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ZEe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},GEe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},YEe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},KEe={ordinalNumber:QEe({matchPattern:VEe,parsePattern:FEe,valueCallback:t=>parseInt(t,10)}),era:Lm({matchPatterns:BEe,defaultMatchWidth:"wide",parsePatterns:zEe,defaultParseWidth:"any"}),quarter:Lm({matchPatterns:qEe,defaultMatchWidth:"wide",parsePatterns:WEe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Lm({matchPatterns:UEe,defaultMatchWidth:"wide",parsePatterns:HEe,defaultParseWidth:"any"}),day:Lm({matchPatterns:XEe,defaultMatchWidth:"wide",parsePatterns:ZEe,defaultParseWidth:"any"}),dayPeriod:Lm({matchPatterns:GEe,defaultMatchWidth:"any",parsePatterns:YEe,defaultParseWidth:"any"})},JEe={code:"en-US",formatDistance:SEe,formatLong:CEe,formatRelative:EEe,localize:jEe,match:KEe,options:{weekStartsOn:0,firstWeekContainsDate:1}};let e_e={};function kP(){return e_e}const xZ=6048e5,t_e=864e5;function Es(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function F4(t){const e=Es(t);return e.setHours(0,0,0,0),e}function B4(t){const e=Es(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function r_e(t,e){const r=F4(t),n=F4(e),i=+r-B4(r),o=+n-B4(n);return Math.round((i-o)/t_e)}function bf(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function n_e(t){const e=Es(t),r=bf(t,0);return r.setFullYear(e.getFullYear(),0,1),r.setHours(0,0,0,0),r}function i_e(t){const e=Es(t);return r_e(e,n_e(e))+1}function xy(t,e){var s,l,c,d;const r=kP(),n=(e==null?void 0:e.weekStartsOn)??((l=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((d=(c=r.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,i=Es(t),o=i.getDay(),a=(o<n?7:0)+o-n;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function PS(t){return xy(t,{weekStartsOn:1})}function PZ(t){const e=Es(t),r=e.getFullYear(),n=bf(t,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const i=PS(n),o=bf(t,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=PS(o);return e.getTime()>=i.getTime()?r+1:e.getTime()>=a.getTime()?r:r-1}function o_e(t){const e=PZ(t),r=bf(t,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),PS(r)}function a_e(t){const e=Es(t),r=+PS(e)-+o_e(e);return Math.round(r/xZ)+1}function kZ(t,e){var d,p,g,m;const r=Es(t),n=r.getFullYear(),i=kP(),o=(e==null?void 0:e.firstWeekContainsDate)??((p=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??i.firstWeekContainsDate??((m=(g=i.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,a=bf(t,0);a.setFullYear(n+1,0,o),a.setHours(0,0,0,0);const s=xy(a,e),l=bf(t,0);l.setFullYear(n,0,o),l.setHours(0,0,0,0);const c=xy(l,e);return r.getTime()>=s.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function s_e(t,e){var s,l,c,d;const r=kP(),n=(e==null?void 0:e.firstWeekContainsDate)??((l=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((d=(c=r.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,i=kZ(t,e),o=bf(t,0);return o.setFullYear(i,0,n),o.setHours(0,0,0,0),xy(o,e)}function l_e(t,e){const r=Es(t),n=+xy(r,e)-+s_e(r,e);return Math.round(n/xZ)+1}function Mr(t,e){const r=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return r+n}const Jc={y(t,e){const r=t.getFullYear(),n=r>0?r:1-r;return Mr(e==="yy"?n%100:n,e.length)},M(t,e){const r=t.getMonth();return e==="M"?String(r+1):Mr(r+1,2)},d(t,e){return Mr(t.getDate(),e.length)},a(t,e){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(t,e){return Mr(t.getHours()%12||12,e.length)},H(t,e){return Mr(t.getHours(),e.length)},m(t,e){return Mr(t.getMinutes(),e.length)},s(t,e){return Mr(t.getSeconds(),e.length)},S(t,e){const r=e.length,n=t.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return Mr(i,e.length)}},kh={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},z4={G:function(t,e,r){const n=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(t,e,r){if(e==="yo"){const n=t.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return Jc.y(t,e)},Y:function(t,e,r,n){const i=kZ(t,n),o=i>0?i:1-i;if(e==="YY"){const a=o%100;return Mr(a,2)}return e==="Yo"?r.ordinalNumber(o,{unit:"year"}):Mr(o,e.length)},R:function(t,e){const r=PZ(t);return Mr(r,e.length)},u:function(t,e){const r=t.getFullYear();return Mr(r,e.length)},Q:function(t,e,r){const n=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Mr(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,r){const n=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Mr(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,r){const n=t.getMonth();switch(e){case"M":case"MM":return Jc.M(t,e);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,r){const n=t.getMonth();switch(e){case"L":return String(n+1);case"LL":return Mr(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,r,n){const i=l_e(t,n);return e==="wo"?r.ordinalNumber(i,{unit:"week"}):Mr(i,e.length)},I:function(t,e,r){const n=a_e(t);return e==="Io"?r.ordinalNumber(n,{unit:"week"}):Mr(n,e.length)},d:function(t,e,r){return e==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):Jc.d(t,e)},D:function(t,e,r){const n=i_e(t);return e==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Mr(n,e.length)},E:function(t,e,r){const n=t.getDay();switch(e){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,r,n){const i=t.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Mr(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,r,n){const i=t.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Mr(o,e.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,r){const n=t.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return Mr(i,e.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,r){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,r){const n=t.getHours();let i;switch(n===12?i=kh.noon:n===0?i=kh.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,r){const n=t.getHours();let i;switch(n>=17?i=kh.evening:n>=12?i=kh.afternoon:n>=4?i=kh.morning:i=kh.night,e){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,r){if(e==="ho"){let n=t.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Jc.h(t,e)},H:function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):Jc.H(t,e)},K:function(t,e,r){const n=t.getHours()%12;return e==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Mr(n,e.length)},k:function(t,e,r){let n=t.getHours();return n===0&&(n=24),e==="ko"?r.ordinalNumber(n,{unit:"hour"}):Mr(n,e.length)},m:function(t,e,r){return e==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):Jc.m(t,e)},s:function(t,e,r){return e==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):Jc.s(t,e)},S:function(t,e){return Jc.S(t,e)},X:function(t,e,r){const n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return W4(n);case"XXXX":case"XX":return Fd(n);case"XXXXX":case"XXX":default:return Fd(n,":")}},x:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"x":return W4(n);case"xxxx":case"xx":return Fd(n);case"xxxxx":case"xxx":default:return Fd(n,":")}},O:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q4(n,":");case"OOOO":default:return"GMT"+Fd(n,":")}},z:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q4(n,":");case"zzzz":default:return"GMT"+Fd(n,":")}},t:function(t,e,r){const n=Math.trunc(t.getTime()/1e3);return Mr(n,e.length)},T:function(t,e,r){const n=t.getTime();return Mr(n,e.length)}};function q4(t,e=""){const r=t>0?"-":"+",n=Math.abs(t),i=Math.trunc(n/60),o=n%60;return o===0?r+String(i):r+String(i)+e+Mr(o,2)}function W4(t,e){return t%60===0?(t>0?"-":"+")+Mr(Math.abs(t)/60,2):Fd(t,e)}function Fd(t,e=""){const r=t>0?"-":"+",n=Math.abs(t),i=Mr(Math.trunc(n/60),2),o=Mr(n%60,2);return r+i+e+o}const U4=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},CZ=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},c_e=(t,e)=>{const r=t.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return U4(t,e);let o;switch(n){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",U4(n,e)).replace("{{time}}",CZ(i,e))},u_e={p:CZ,P:c_e},d_e=/^D+$/,f_e=/^Y+$/,h_e=["D","DD","YY","YYYY"];function p_e(t){return d_e.test(t)}function g_e(t){return f_e.test(t)}function m_e(t,e,r){const n=v_e(t,e,r);if(console.warn(n),h_e.includes(t))throw new RangeError(n)}function v_e(t,e,r){const n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function y_e(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function b_e(t){if(!y_e(t)&&typeof t!="number")return!1;const e=Es(t);return!isNaN(Number(e))}const O_e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,w_e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,S_e=/^'([^]*?)'?$/,x_e=/''/g,P_e=/[a-zA-Z]/;function TZ(t,e,r){var d,p,g,m,y,b,O,S;const n=kP(),i=(r==null?void 0:r.locale)??n.locale??JEe,o=(r==null?void 0:r.firstWeekContainsDate)??((p=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(g=n.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,a=(r==null?void 0:r.weekStartsOn)??((b=(y=r==null?void 0:r.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??n.weekStartsOn??((S=(O=n.locale)==null?void 0:O.options)==null?void 0:S.weekStartsOn)??0,s=Es(t);if(!b_e(s))throw new RangeError("Invalid time value");let l=e.match(w_e).map(w=>{const k=w[0];if(k==="p"||k==="P"){const T=u_e[k];return T(w,i.formatLong)}return w}).join("").match(O_e).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const k=w[0];if(k==="'")return{isToken:!1,value:k_e(w)};if(z4[k])return{isToken:!0,value:w};if(k.match(P_e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return{isToken:!1,value:w}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(w=>{if(!w.isToken)return w.value;const k=w.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&g_e(k)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&p_e(k))&&m_e(k,e,String(t));const T=z4[k[0]];return T(s,k,i.localize,c)}).join("")}function k_e(t){const e=t.match(S_e);return e?e[1].replace(x_e,"'"):t}class C_e{constructor(e,r){fe(this,"index",0);this.projectPageModel=e,this.childBranch=r,lt(this)}get id(){return this.childBranch.branchName}get children(){return[]}get disabled(){return!1}get icon(){return si.Child}get dataTestId(){return`revision-child-branch-${this.childBranch.branchName}`}get link(){return fa(`/${Pu}/${ku}/${Cu}/${Tu}/-/${this.childBranch.revisionStartId}`,{organizationId:this.projectPageModel.organization.id,projectName:this.projectPageModel.project.name,branchName:this.childBranch.branchName})}get tooltip(){return[`Branch: ${this.childBranch.branchName}`]}get hidden(){return!1}}class Ch{constructor(e,r,n){fe(this,"index",0);this.projectPageModel=e,this.linkMaker=r,this.revision=n,lt(this)}get id(){return this.revision.id}get isThereEndpoint(){return!!this.revision.endpoints.length}get children(){return this.revision.childBranches.map(e=>new C_e(this.projectPageModel,e))}get disabled(){return this.revision.id===this.projectPageModel.revisionOrThrow.id}get icon(){return this.checkIsHeadRevision()?si.Head:this.checkIsStartRevision()?si.Start:this.checkIsDraftRevision()?si.Draft:si.Revision}get dataTestId(){return this.checkIsHeadRevision()?"revision-head":this.checkIsStartRevision()?"revision-start":this.checkIsDraftRevision()?"revision-draft":`revision_index_${this.index}`}get link(){return this.linkMaker.make(this.revisionLinkOption)}get tooltip(){if(this.checkIsDraftRevision())return["Draft revision"];const e=this.revision.comment?[this.revision.comment]:[],r=TZ(new Date(this.revision.createdAt),"dd MMM yyyy, HH:mm:ss"),n=[...e,this.revision.id,r],i=this.revision.endpoints.map(o=>`${wZ(o.type)}`);return i.length&&(n.push("".padEnd(25,"-")),n.push("Active endpoints:"),n.push(i.join(", "))),this.checkIsHeadRevision()&&n.unshift("Head revision:"),this.checkIsStartRevision()&&n.unshift("Init revision:"),n}get hidden(){return!1}get revisionLinkOption(){return this.checkIsHeadRevision()?{isHead:!0}:this.checkIsDraftRevision()?{isDraft:!0}:{id:this.revision.id}}checkIsStartRevision(){return this.projectPageModel.branchOrThrow.start.id===this.revision.id}checkIsDraftRevision(){return this.projectPageModel.branchOrThrow.draft.id===this.revision.id}checkIsHeadRevision(){return this.projectPageModel.branchOrThrow.head.id===this.revision.id}}class T_e{constructor(e){fe(this,"index",0);this.revision=e,lt(this)}get id(){return this.revision.id}get children(){return[]}get disabled(){return!1}get icon(){return si.NextPage}get dataTestId(){return"revision-next-page"}get link(){return""}get tooltip(){return["Next page"]}get hidden(){return!1}}class E_e{constructor(e,r){fe(this,"index",0);this.projectPageModel=e,this.parentBranch=r,lt(this)}get id(){return this.parentBranch.branchName}get children(){return[]}get disabled(){return!1}get icon(){return si.Parent}get dataTestId(){return`revision-parent-branch-${this.parentBranch.branchName}`}get link(){return fa(`/${Pu}/${ku}/${Cu}/${Tu}/-/${this.parentBranch.fromRevisionId}`,{organizationId:this.projectPageModel.organization.id,projectName:this.projectPageModel.project.name,branchName:this.parentBranch.branchName})}get tooltip(){return[`Branch: ${this.parentBranch.branchName}`]}get hidden(){return!1}}class __e{constructor(e){fe(this,"index",0);this.revision=e,lt(this)}get id(){return this.revision.id}get children(){return[]}get disabled(){return!1}get icon(){return si.PreviousPage}get dataTestId(){return"revision-previous-page"}get link(){return""}get tooltip(){return["Previous page"]}get hidden(){return!1}}class R_e{constructor(e,r,n){this.projectPageModel=e,this.linkMaker=r,this.middleRevisions=n,lt(this,{},{autoBind:!0})}get items(){const e=[];this.branch.parentBranch&&e.push(this.createParentBranchItem(this.branch.parentBranch)),this.shouldAddStartRevision()&&e.push(this.createStartItem());const r=this.middleRevisions.data.slice(),n=r.shift(),i=r.pop();n&&e.push(this.createFirstMiddleItem(n));for(const o of r)e.push(this.createMiddleItem(o));return i&&e.push(this.createLastMiddleItem(i)),e.push(this.createHeadItem()),this.branch.touched&&e.push(this.createDraftItem()),e.length===1&&!this.branch.head.tablesConnection.totalCount?[]:(e.forEach((o,a)=>{o.index=a}),e)}get branch(){return this.projectPageModel.branchOrThrow}createParentBranchItem(e){return new E_e(this.projectPageModel,e)}createStartItem(){return new Ch(this.projectPageModel,this.linkMaker,this.branch.start)}createFirstMiddleItem(e){return e.parent===this.branch.start?new Ch(this.projectPageModel,this.linkMaker,e):new __e(e)}createMiddleItem(e){return new Ch(this.projectPageModel,this.linkMaker,e)}createLastMiddleItem(e){return e.child===this.branch.head?new Ch(this.projectPageModel,this.linkMaker,e):new T_e(e)}createHeadItem(){return new Ch(this.projectPageModel,this.linkMaker,this.branch.head)}createDraftItem(){return new Ch(this.projectPageModel,this.linkMaker,this.branch.draft)}shouldAddStartRevision(){return this.branch.start!==this.branch.head}}const tE=8;class I_e{constructor(e,r){fe(this,"data",[]);fe(this,"currentDefaultMaxItems",tE);this.projectPageModel=e,this.middleRevisionsFinder=r,lt(this)}get branch(){return this.projectPageModel.branchOrThrow}select({desiredRevision:e,priority:r}){this.shouldResetDefaultMaxItems(e)&&this.resetDefaultMaxItems(),this.isNoChangesForDefaultBranch()&&(this.data=[]);const n=[];if(this.shouldAddMiddleRevisions()){const i=this.middleRevisionsFinder.find({targetRevision:this.getTargetRevision(e),priority:r,maxItems:this.currentDefaultMaxItems});n.push(...i)}this.data=n}resetDefaultMaxItems(){this.currentDefaultMaxItems=tE}increaseMaxItemsForNewRevision(){this.currentDefaultMaxItems=tE+1}isNoChangesForDefaultBranch(){return!this.branch.parentBranch&&this.branch.start===this.branch.head&&!this.branch.touched}shouldAddMiddleRevisions(){return this.branch.start!==this.branch.head&&this.branch.start.child!==this.branch.head}getTargetRevision(e){return e===this.branch.start?this.branch.start.child:e===this.branch.head||e===this.branch.draft?this.branch.head.parent:e}shouldResetDefaultMaxItems(e){return e!==this.branch.head}}const $_e=()=>{const t=Vf(),e=Ui(),[r]=A.useState(()=>{const n=new OEe(e),i=new I_e(e,n),o=new R_e(e,t,i),a=new yEe(e);return new bEe(gt.cache,e,o,i,a)});return A.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},A_e=t=>{switch(t){case si.Child:return P.jsx(q1e,{size:"24"});case si.Draft:return P.jsx(G1e,{});case si.Start:return P.jsx(a4,{});case si.Head:return P.jsx(Y1e,{});case si.Revision:return P.jsx(a4,{});case si.Parent:return P.jsx(W1e,{});case si.PreviousPage:return P.jsx(o4,{});case si.NextPage:return P.jsx(o4,{})}},EZ=mt(({data:t,onClick:e})=>{const[r,n]=A.useState(!1),i=A.useCallback(async()=>{NR.includes(t.icon)?(n(!0),await(e==null?void 0:e()),n(!1)):e==null||e()},[t.icon,e]);return P.jsxs(dW,{openDelay:750,children:[P.jsx(fW,{asChild:!0,children:P.jsxs(ze,{position:"relative",children:[P.jsx(Ti,{"data-testid":t.dataTestId,loading:r,onClick:i,_disabled:r?{opacity:.2}:{opacity:1},_hover:t.disabled?{opacity:1}:{opacity:.4},"aria-label":"",disabled:t.disabled,opacity:NR.includes(t.icon)?.7:.2,variant:"ghost",children:A_e(t.icon)}),t.isThereEndpoint&&P.jsx(ze,{position:"absolute",right:"0px",top:"0px",opacity:"0.4",children:P.jsx(K1e,{})})]})}),P.jsx(hW,{children:P.jsx(pW,{textAlign:"center",children:P.jsx(tS,{children:t.tooltip.map((o,a)=>P.jsx("span",{children:o},a))})})})]})}),H4=mt(({data:t})=>P.jsx(Ua,{to:t.link,children:P.jsx(EZ,{data:t})})),X4=({data:t,onSelect:e})=>{const r=A.useCallback(async()=>{await e(t.id)},[t.id,e]);return P.jsx(EZ,{data:t,onClick:r})},M_e=mt(({endpointSlot:t})=>{const e=$_e();return e.items.length?P.jsxs(Te,{alignItems:"flex-start",justifyContent:"space-between",paddingBottom:"1rem",children:[P.jsx(Te,{flexDirection:"column",flex:1,gap:"1rem",children:P.jsx(Te,{"data-testid":"revision-endpoint-widget",children:e.items.map((r,n)=>P.jsxs(Qe.Fragment,{children:[P.jsxs(Te,{alignItems:"center",flexDirection:"column",children:[r.icon===si.PreviousPage&&P.jsx(X4,{data:r,onSelect:e.previousPage}),r.icon===si.NextPage&&P.jsx(X4,{data:r,onSelect:e.nextPage}),!NR.includes(r.icon)&&P.jsx(H4,{data:r}),r.children.length?P.jsx(U1e,{opacity:"0.15"}):null,r.children.map(i=>P.jsx(H4,{data:i},i.id))]}),n!==e.items.length-1&&P.jsx(Te,{alignItems:"center",height:"40px",children:P.jsx(H1e,{opacity:"0.15"})})]},r.id))})}),P.jsx(Te,{children:t})]}):null}),N_e=()=>P.jsx(ze,{className:SZ.Root,children:P.jsx(M_e,{endpointSlot:P.jsx(vEe,{})})});class j_e{constructor(e){this.projectPageModel=e,lt(this)}get hasNextPage(){return this.project.branchesConnection.availableNextPage}get organizationId(){return this.organization.id}get projectName(){return this.project.name}get items(){return this.project.branchesConnection.edges.map(({node:e})=>{var n;const r=e.name===((n=this.branch)==null?void 0:n.name);return{id:e.id,name:e.name,link:r?"":`${L_e(this.organizationId,this.projectName,e.name)}${D_e(e)}`,title:`${e.name}`,isActive:r,touched:e.touched}})}init(){}dispose(){}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branch}}const D_e=t=>t.touched?fa(`/${pP}`):"",L_e=(t,e,r)=>fa(`/${Pu}/${ku}/${Cu}/${Tu}`,{organizationId:t,projectName:e,branchName:r}),Q_e=()=>{const t=Ui(),[e]=A.useState(()=>new j_e(t));return A.useEffect(()=>(e.init(),()=>{e.dispose()}),[e]),e},V_e=mt(()=>{const t=Q_e();return P.jsxs(tS,{alignItems:"flex-start",gap:"1rem",children:[P.jsx(Ua,{to:"/",children:P.jsx(cme,{color:"gray",size:"xl","data-testid":"sidebar-back-to-projects-button",children:P.jsx("b",{children:t.projectName})})}),P.jsxs(tS,{alignItems:"flex-start",borderTop:"1px solid",borderTopColor:"gray.100",gap:"0.25rem",pb:"1rem",pt:"1rem",width:"100%",children:[P.jsx(dt,{color:"gray",fontSize:"sm",mb:"0.5rem",children:"Branches:"}),t.items.map(e=>P.jsxs(Te,{_hover:e.isActive?{}:{backgroundColor:"gray.200"},alignItems:"center",backgroundColor:e.isActive?"gray.100":void 0,borderRadius:"0.25rem",height:"32px",paddingLeft:"0.5rem",width:"100%",children:[e.isActive?P.jsx(dt,{color:"gray.500",fontWeight:"600",children:e.title}):P.jsx(dt,{color:"gray.500",fontWeight:"600",children:P.jsx(Ua,{to:e.link,"data-testid":`sidebar-branch-${e.name}`,children:e.title},e.id)}),e.touched&&P.jsx(dt,{color:"gray.600",children:"*"})]},e.id))]})]})});class F_e{constructor(e,r){this.projectPageModel=e,this.linkMaker=r,lt(this)}get hasNextPage(){return this.project.branchesConnection.availableNextPage}get items(){return this.revision.tablesConnection.edges.map(({node:e})=>{var n;const r=e.id===((n=this.table)==null?void 0:n.id);return{id:e.id,versionId:e.versionId,link:r?"":`${this.linkMaker.currentBaseLink}/${e.id}`,isActive:r,touched:!e.readonly}})}get project(){return this.projectPageModel.project}get revision(){return this.projectPageModel.revisionOrThrow}get table(){return this.projectPageModel.table}init(){}dispose(){}}const B_e=()=>{const t=Ui(),e=Vf(),[r]=A.useState(()=>new F_e(t,e));return A.useEffect(()=>(r.init(),()=>{r.dispose()}),[r]),r},z_e=mt(()=>{const t=B_e();return P.jsxs(tS,{alignItems:"flex-start",gap:"0.25rem",width:"100%",children:[P.jsx(dt,{color:"gray",fontSize:"sm",mb:"0.5rem",children:"Tables:"}),t.items.map(e=>P.jsxs(Te,{_hover:{backgroundColor:"gray.200"},alignItems:"center",backgroundColor:e.isActive?"gray.100":void 0,borderRadius:"0.25rem",height:"32px",paddingLeft:"0.5rem",paddingRight:"0.5rem",width:"100%",children:[e.isActive?P.jsx(dt,{color:"gray.500",fontWeight:"600",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:e.id}):P.jsx(dt,{color:"gray.500",fontWeight:"600",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:P.jsx(Ua,{to:e.link,"data-testid":`sidebar-table-${e.id}`,children:e.id},e.id)}),e.touched&&P.jsx(dt,{color:"gray.600",children:"*"})]},e.versionId))]})}),q_e=mt(()=>{const t=Ui();return P.jsxs(P.Fragment,{children:[P.jsx(ze,{minHeight:"120px",children:P.jsx(V_e,{})}),t.table&&P.jsx(ze,{borderTop:"1px solid",borderTopColor:"gray.100",paddingTop:"1rem",children:P.jsx(z_e,{})})]})}),W_e=mt(()=>(CTe(),P.jsx(gg,{actions:P.jsx(HTe,{}),sidebar:P.jsx(q_e,{}),title:P.jsx(KTe,{}),children:P.jsxs(Te,{flex:1,flexDirection:"column",gap:"1rem",children:[P.jsx(N_e,{}),P.jsx(Te,{flexDirection:"column",gap:"0.5rem",flex:1,children:P.jsx(dS,{})})]})})));class jR{constructor(e,r,n){fe(this,"isLoading",!1);this.authService=e,this.routerService=r,this.apiService=n,lt(this)}async confirmEmailCode(e){e?(await this.request(e),await this.routerService.navigate(H2)):console.error("Invalid code")}init(){}dispose(){}async request(e){this.setIsLoading(!0);try{const r=await this.apiService.client.confirmEmailCode({data:{code:e}});return await this.authService.setToken(r.confirmEmailCode.accessToken),!0}catch(r){console.error(r)}finally{this.setIsLoading(!1)}}setIsLoading(e){this.isLoading=e}}ft.register(jR,()=>{const t=ft.get(ho),e=ft.get(Sc),r=ft.get(hl);return new jR(t,e,r)},{scope:"request"});const U_e=mt(()=>{const[t]=Jbe({code:""}),e=jf(jR);return A.useEffect(()=>{e.confirmEmailCode(t.get("code"))},[e,t]),e.isLoading?P.jsx(Y$,{w:"100%",h:"100%",children:P.jsx(Bx,{})}):null}),H_e=()=>null;class DR{constructor(e,r,n){fe(this,"isLoading",!1);this.routerService=e,this.apiService=r,this.authService=n,lt(this)}async login(e){e?(await this.loginRequest(e),await this.routerService.navigate("/")):console.error("Invalid code")}dispose(){}init(){}async loginRequest(e){this.setIsLoading(!0);try{const r=await this.apiService.client.loginGithub({data:{code:e}});return await this.authService.setToken(r.loginGithub.accessToken),!0}catch(r){console.error(r)}finally{this.setIsLoading(!1)}}setIsLoading(e){this.isLoading=e}}ft.register(DR,()=>{const t=ft.get(Sc),e=ft.get(hl),r=ft.get(ho);return new DR(t,e,r)},{scope:"request"});const X_e=async({request:t})=>{const n=new URL(t.url).searchParams.get("code");if(!n)throw new Error("Invalid code");return await ft.get(DR).login(n),Tp("/")},Z_e=Ae`
|
|
1068
1068
|
mutation login($data: LoginInput!) {
|
|
1069
1069
|
login(data: $data) {
|
|
1070
1070
|
accessToken
|
|
1071
1071
|
}
|
|
1072
1072
|
}
|
|
1073
|
-
`,G_e=async t=>{const e=await _r.mutate({mutation:Z_e,variables:t});if(!e.data)throw e.errors;return e.data},Y_e=()=>`${window.location.origin}/${Nf}/${iX}`,_Z=t=>{const e=Y_e();window.location.href=`https://github.com/login/oauth/authorize?client_id=${t}&redirect_uri=${e}&scope=user:email`},RZ=()=>`${window.location.origin}/${Nf}/${oX}`,IZ=t=>{const e=RZ();window.location.href=`https://accounts.google.com/o/oauth2/v2/auth?client_id=${t}&redirect_uri=${e}&response_type=code&scope=profile email`};class LR{constructor(e,r,n){
|
|
1073
|
+
`,G_e=async t=>{const e=await _r.mutate({mutation:Z_e,variables:t});if(!e.data)throw e.errors;return e.data},Y_e=()=>`${window.location.origin}/${Nf}/${iX}`,_Z=t=>{const e=Y_e();window.location.href=`https://github.com/login/oauth/authorize?client_id=${t}&redirect_uri=${e}&scope=user:email`},RZ=()=>`${window.location.origin}/${Nf}/${oX}`,IZ=t=>{const e=RZ();window.location.href=`https://accounts.google.com/o/oauth2/v2/auth?client_id=${t}&redirect_uri=${e}&response_type=code&scope=profile email`};class LR{constructor(e,r,n){fe(this,"isLoading",!1);fe(this,"form",new Y2({emailOrUsername:"",password:""}));this.authService=e,this.configurationService=r,this.routerService=n,lt(this)}get availableSignUp(){return this.configurationService.availableSignUp}get disableSubmitButton(){return!this.form.isValid}get availableOauth(){return this.configurationService.availableGoogleOauth}get availableGoogleOauth(){return this.configurationService.availableGoogleOauth}get availableGithubOauth(){return this.configurationService.availableGithubOauth}toGoogleOauth(){IZ(this.configurationService.googleOauthClientId)}toGithubOauth(){_Z(this.configurationService.githubOauthClientId)}async submit(){await this.login()&&await this.routerService.navigate(H2)}dispose(){}init(){}async login(){this.setIsLoading(!0);try{const e=await G_e({data:this.form.values});return await this.authService.setToken(e.login.accessToken),!0}catch(e){console.error(e)}finally{this.setIsLoading(!1)}}setIsLoading(e){this.isLoading=e}}ft.register(LR,()=>{const t=ft.get(ho),e=ft.get(yf),r=ft.get(Sc);return new LR(t,e,r)},{scope:"request"});const K_e=mt(()=>{const t=jf(LR),e=A.useCallback(a=>{t.form.setValue("emailOrUsername",a.currentTarget.value)},[t.form]),r=A.useCallback(a=>{t.form.setValue("password",a.currentTarget.value)},[t.form]),n=A.useCallback(async()=>{await t.submit()},[t]),i=A.useCallback(()=>{t.toGithubOauth()},[t]),o=A.useCallback(()=>{t.toGoogleOauth()},[t]);return P.jsxs(gg,{hideSidebar:!0,children:[t.availableSignUp&&P.jsxs(Te,{width:"100%",gap:"8px",justifyContent:"flex-end",children:[P.jsx(dt,{color:"gray.300",children:"New to Revisium?"}),P.jsx(Ua,{to:`/${hP}`,children:P.jsx(gb,{color:"gray.300",alignSelf:"center",children:"Sign up"})})]}),P.jsx(Te,{alignItems:"center",justifyContent:"center",flex:1,children:P.jsxs(Te,{flexDirection:"column",width:"16rem",gap:"1rem",alignItems:"center",children:[t.availableOauth&&P.jsxs(P.Fragment,{children:[P.jsxs(Te,{flexDirection:"column",gap:"2px",children:[t.availableGithubOauth&&P.jsx(sl,{icon:P.jsx(hX,{}),onClick:i,title:"Continue with Github"}),t.availableGoogleOauth&&P.jsx(sl,{icon:P.jsx(pX,{}),onClick:o,title:"Continue with Google"})]}),P.jsxs(Te,{width:"100%",alignItems:"center",gap:"16px",children:[P.jsx(ze,{backgroundColor:"gray.100",flex:1,height:"1px"}),P.jsx(dt,{color:"gray.300",fontSize:"12px",children:"OR"}),P.jsx(ze,{backgroundColor:"gray.100",flex:1,height:"1px"})]})]}),P.jsx(nc,{dataTestId:"login-emailOrUsername-input",autoFocus:!0,height:"40px",placeholder:"username or email",value:t.form.values.emailOrUsername,onChange:e,onEnter:n}),P.jsx(nc,{dataTestId:"login-password-input",height:"40px",placeholder:"password",type:"password",value:t.form.values.password,onChange:r,onEnter:n}),P.jsx(ze,{visibility:t.disableSubmitButton?"hidden":"visible",children:P.jsx(sl,{onClick:n,isLoading:t.isLoading,title:"Login"})})]})})]})});class QR{constructor(e){this.authService=e,lt(this)}logout(){this.authService.logout(),Qke()}dispose(){}init(){}}ft.register(QR,()=>{const t=ft.get(ho);return new QR(t)},{scope:"request"});const J_e=mt(()=>{const t=jf(QR),e=rd();return A.useEffect(()=>{t.logout(),e(`/${Nf}`)},[t,e]),null}),eRe=({onClick:t})=>P.jsx(mg,{dataTestId:"create-project-button",title:"Project",onClick:t}),tRe=Ae`
|
|
1074
1074
|
mutation CreateProjectMst($data: CreateProjectInput!) {
|
|
1075
1075
|
createProject(data: $data) {
|
|
1076
1076
|
...ProjectMst
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
1079
|
${iZ}
|
|
1080
|
-
`,rRe=async t=>{const e=await _r.mutate({mutation:tRe,variables:t});if(!e.data)throw e.errors;return e.data};class nRe{constructor(e,r,n,i,o){this.rootStore=e,this.organizationId=r,this.projectName=n,this.branchName=i,this.fromRevisionId=o}get projectVariables(){return{organizationId:this.organizationId,projectName:this.projectName,branchName:this.branchName,fromRevisionId:this.fromRevisionId}}async execute(){const e=await this.createProjectRequest();return await this.refetchProjectsConnection(),e}async createProjectRequest(){const{createProject:e}=await rRe({data:this.projectVariables});return this.addProjectToCache(e)}addProjectToCache(e){const r=this.rootStore.cache.addProject(eZ(e));return this.rootStore.cache.addProjectByVariables(this.projectVariables,r.id),r}async refetchProjectsConnection(){await this.rootStore.backend.queryMeProjects({first:100})}}class iRe{constructor(e,r){de(this,"projectName","");de(this,"branchName","");de(this,"fromRevisionId","");de(this,"showingSettings",!1);this.rootStore=e,this.authService=r,lt(this)}get organizationId(){var r;const e=(r=this.authService.user)==null?void 0:r.organizationId;if(!e)throw new Error("Not found organizationId");return e}setProjectName(e){this.projectName=e}setBranchName(e){this.branchName=e}setFromRevisionId(e){this.fromRevisionId=e}setShowingSettings(e){this.showingSettings=e}async create(){try{await new nRe(this.rootStore,this.organizationId,this.projectName,this.branchName,this.fromRevisionId).execute()}catch(e){console.error(e)}}init(){}dispose(){}}const oRe=()=>{const[t]=A.useState(()=>{const e=ft.get(ho);return new iRe(gt,e)});return A.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t},aRe=({onClick:t,color:e,dataTestId:r})=>P.jsx(Ti,{_hover:{backgroundColor:"gray.100"},"data-testid":r,"aria-label":"",color:e||"gray.400",variant:"ghost",onClick:t,children:P.jsx(gP,{})}),sRe=mt(({onCancel:t,onAdd:e})=>{const r=oRe(),[n,i]=A.useState(!1),o=A.useCallback(async()=>{i(!0),await r.create(),i(!1),e==null||e()},[e,r]),a=A.useCallback(d=>{r.setProjectName(d.currentTarget.value)},[r]),s=A.useCallback(d=>{r.setBranchName(d.currentTarget.value)},[r]),l=A.useCallback(d=>{r.setFromRevisionId(d.currentTarget.value)},[r]),c=A.useCallback(()=>{r.setShowingSettings(!r.showingSettings)},[r]);return P.jsxs(Te,{alignSelf:"flex-start",gap:"0.5rem",children:[P.jsx(Nb,{onClick:t}),P.jsxs(Te,{flexDirection:"column",gap:"0.5rem",children:[P.jsx(nc,{dataTestId:"create-project-name-input",autoFocus:!0,height:"40px",placeholder:"project name",value:r.projectName,onChange:a,onEnter:o}),r.projectName&&r.showingSettings&&P.jsxs(P.Fragment,{children:[P.jsx(nc,{dataTestId:"create-project-branch-name-input",height:"40px",placeholder:"branch name",value:r.branchName,onChange:s,onEnter:o}),P.jsx(nc,{dataTestId:"create-project-from-revision-id-input",height:"40px",placeholder:"from revisionId",value:r.fromRevisionId,onChange:l,onEnter:o})]})]}),r.projectName&&P.jsxs(P.Fragment,{children:[P.jsx(Mb,{dataTestId:"create-project-approve-button",loading:n,onClick:o}),P.jsx(aRe,{dataTestId:"create-project-settings-button",color:r.showingSettings?"gray.400":"gray.200",onClick:c})]})]})}),CP=0,od=1,Sg=2,$Z=4;function Z4(t){return()=>t}function lRe(t){t()}function Py(t,e){return r=>t(e(r))}function G4(t,e){return()=>t(e)}function cRe(t,e){return r=>t(e,r)}function cA(t){return t!==void 0}function uRe(...t){return()=>{t.map(lRe)}}function xg(){}function TP(t,e){return e(t),t}function dRe(t,e){return e(t)}function On(...t){return t}function jr(t,e){return t(od,e)}function Xt(t,e){t(CP,e)}function uA(t){t(Sg)}function xi(t){return t($Z)}function ht(t,e){return jr(t,cRe(e,CP))}function gl(t,e){const r=t(od,n=>{r(),e(n)});return r}function Y4(t){let e,r;return n=>i=>{e=i,r&&clearTimeout(r),r=setTimeout(()=>{n(e)},t)}}function AZ(t,e){return t===e}function pn(t=AZ){let e;return r=>n=>{t(e,n)||(e=n,r(n))}}function Tt(t){return e=>r=>{t(r)&&e(r)}}function Ke(t){return e=>Py(e,t)}function Us(t){return e=>()=>{e(t)}}function Ie(t,...e){const r=fRe(...e);return(n,i)=>{switch(n){case Sg:uA(t);return;case od:return jr(t,r(i))}}}function Ys(t,e){return r=>n=>{r(e=t(e,n))}}function Np(t){return e=>r=>{t>0?t--:e(r)}}function mu(t){let e=null,r;return n=>i=>{e=i,!r&&(r=setTimeout(()=>{r=void 0,n(e)},t))}}function Kt(...t){const e=new Array(t.length);let r=0,n=null;const i=Math.pow(2,t.length)-1;return t.forEach((o,a)=>{const s=Math.pow(2,a);jr(o,l=>{const c=r;r=r|s,e[a]=l,c!==i&&r===i&&n&&(n(),n=null)})}),o=>a=>{const s=()=>{o([a].concat(e))};r===i?s():n=s}}function fRe(...t){return e=>t.reduceRight(dRe,e)}function hRe(t){let e,r;const n=()=>e==null?void 0:e();return function(i,o){switch(i){case od:return o?r===o?void 0:(n(),r=o,e=jr(t,o),e):(n(),xg);case Sg:n(),r=null;return}}}function Le(t){let e=t;const r=sr();return(n,i)=>{switch(n){case CP:e=i;break;case od:{i(e);break}case $Z:return e}return r(n,i)}}function to(t,e){return TP(Le(e),r=>ht(t,r))}function sr(){const t=[];return(e,r)=>{switch(e){case CP:t.slice().forEach(n=>{n(r)});return;case Sg:t.splice(0,t.length);return;case od:return t.push(r),()=>{const n=t.indexOf(r);n>-1&&t.splice(n,1)}}}}function ma(t){return TP(sr(),e=>ht(t,e))}function Sr(t,e=[],{singleton:r}={singleton:!0}){return{constructor:t,dependencies:e,id:pRe(),singleton:r}}const pRe=()=>Symbol();function gRe(t){const e=new Map,r=({constructor:n,dependencies:i,id:o,singleton:a})=>{if(a&&e.has(o))return e.get(o);const s=n(i.map(l=>r(l)));return a&&e.set(o,s),s};return r(t)}function di(...t){const e=sr(),r=new Array(t.length);let n=0;const i=Math.pow(2,t.length)-1;return t.forEach((o,a)=>{const s=Math.pow(2,a);jr(o,l=>{r[a]=l,n=n|s,n===i&&Xt(e,r)})}),function(o,a){switch(o){case Sg:{uA(e);return}case od:return n===i&&a(r),jr(e,a)}}}function $t(t,e=AZ){return Ie(t,pn(e))}function K4(...t){return function(e,r){switch(e){case Sg:return;case od:return uRe(...t.map(n=>jr(n,r)))}}}var Qo=(t=>(t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR",t))(Qo||{});const mRe={0:"debug",3:"error",1:"log",2:"warn"},vRe=()=>typeof globalThis>"u"?window:globalThis,ad=Sr(()=>{const t=Le(3);return{log:Le((e,r,n=1)=>{var i;const o=(i=vRe().VIRTUOSO_LOG_LEVEL)!=null?i:xi(t);n>=o&&console[mRe[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",e,r)}),logLevel:t}},[],{singleton:!0});function ml(t,e,r){return dA(t,e,r).callbackRef}function dA(t,e,r){const n=Qe.useRef(null);let i=a=>{};const o=Qe.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&t(l)};r?s():requestAnimationFrame(s)}):null,[t,r]);return i=a=>{a&&e?(o==null||o.observe(a),n.current=a):(n.current&&(o==null||o.unobserve(n.current)),n.current=null)},{callbackRef:i,ref:n}}function MZ(t,e,r,n,i,o,a,s,l){const c=Qe.useCallback(d=>{const p=yRe(d.children,e,s?"offsetWidth":"offsetHeight",i);let g=d.parentElement;for(;!g.dataset.virtuosoScroller;)g=g.parentElement;const m=g.lastElementChild.dataset.viewportType==="window";let y;m&&(y=g.ownerDocument.defaultView);const b=a?s?a.scrollLeft:a.scrollTop:m?s?y.scrollX||y.document.documentElement.scrollLeft:y.scrollY||y.document.documentElement.scrollTop:s?g.scrollLeft:g.scrollTop,O=a?s?a.scrollWidth:a.scrollHeight:m?s?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight:s?g.scrollWidth:g.scrollHeight,S=a?s?a.offsetWidth:a.offsetHeight:m?s?y.innerWidth:y.innerHeight:s?g.offsetWidth:g.offsetHeight;n({scrollHeight:O,scrollTop:Math.max(b,0),viewportHeight:S}),o==null||o(s?J4("column-gap",getComputedStyle(d).columnGap,i):J4("row-gap",getComputedStyle(d).rowGap,i)),p!==null&&t(p)},[t,e,i,o,a,n,s]);return dA(c,r,l)}function yRe(t,e,r,n){const i=t.length;if(i===0)return null;const o=[];for(let a=0;a<i;a++){const s=t.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),d=e(s,r);if(d===0&&n("Zero-sized element, this should not happen",{child:s},Qo.ERROR),d===c)continue;const p=o[o.length-1];o.length===0||p.size!==d||p.endIndex!==l-1?o.push({endIndex:l,size:d,startIndex:l}):o[o.length-1].endIndex++}return o}function J4(t,e,r){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&r(`${t} was not resolved to pixel value correctly`,e,Qo.WARN),e==="normal"?0:parseInt(e??"0",10)}function fA(t,e,r){const n=Qe.useRef(null),i=Qe.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),d=c.width;let p,g;if(e){const m=e.getBoundingClientRect(),y=c.top-m.top;g=m.height-Math.max(0,y),p=y+e.scrollTop}else{const m=a.current.ownerDocument.defaultView;g=m.innerHeight-Math.max(0,c.top),p=c.top+m.scrollY}n.current={offsetTop:p,visibleHeight:g,visibleWidth:d},t(n.current)},[t,e]),{callbackRef:o,ref:a}=dA(i,!0,r),s=Qe.useCallback(()=>{i(a.current)},[i,a]);return Qe.useEffect(()=>{var l;if(e){e.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(e),()=>{e.removeEventListener("scroll",s),c.unobserve(e)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,e,a]),o}const go=Sr(()=>{const t=sr(),e=sr(),r=Le(0),n=sr(),i=Le(0),o=sr(),a=sr(),s=Le(0),l=Le(0),c=Le(0),d=Le(0),p=sr(),g=sr(),m=Le(!1),y=Le(!1),b=Le(!1);return ht(Ie(t,Ke(({scrollTop:O})=>O)),e),ht(Ie(t,Ke(({scrollHeight:O})=>O)),a),ht(e,i),{deviation:r,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:d,headerHeight:s,horizontalDirection:y,scrollBy:g,scrollContainerState:t,scrollHeight:a,scrollingInProgress:m,scrollTo:p,scrollTop:e,skipAnimationFrameInResizeObserver:b,smoothScrollTargetReached:n,statefulScrollTop:i,viewportHeight:o}},[],{singleton:!0}),ky={lvl:0};function NZ(t,e){const r=t.length;if(r===0)return[];let{index:n,value:i}=e(t[0]);const o=[];for(let a=1;a<r;a++){const{index:s,value:l}=e(t[a]);o.push({end:s-1,start:n,value:i}),n=s,i=l}return o.push({end:1/0,start:n,value:i}),o}function Wr(t){return t===ky}function Cy(t,e){if(!Wr(t))return e===t.k?t.v:e<t.k?Cy(t.l,e):Cy(t.r,e)}function ws(t,e,r="k"){if(Wr(t))return[-1/0,void 0];if(Number(t[r])===e)return[t.k,t.v];if(Number(t[r])<e){const n=ws(t.r,e,r);return n[0]===-1/0?[t.k,t.v]:n}return ws(t.l,e,r)}function da(t,e,r){return Wr(t)?LZ(e,r,1):e===t.k?li(t,{k:e,v:r}):e<t.k?eV(li(t,{l:da(t.l,e,r)})):eV(li(t,{r:da(t.r,e,r)}))}function fp(){return ky}function EP(t,e,r){if(Wr(t))return[];const n=ws(t,e)[0];return bRe(FR(t,n,r))}function VR(t,e){if(Wr(t))return ky;const{k:r,l:n,r:i}=t;if(e===r){if(Wr(n))return i;if(Wr(i))return n;{const[o,a]=DZ(n);return x1(li(t,{k:o,l:jZ(n),v:a}))}}else return e<r?x1(li(t,{l:VR(n,e)})):x1(li(t,{r:VR(i,e)}))}function Gd(t){return Wr(t)?[]:[...Gd(t.l),{k:t.k,v:t.v},...Gd(t.r)]}function FR(t,e,r){if(Wr(t))return[];const{k:n,l:i,r:o,v:a}=t;let s=[];return n>e&&(s=s.concat(FR(i,e,r))),n>=e&&n<=r&&s.push({k:n,v:a}),n<=r&&(s=s.concat(FR(o,e,r))),s}function x1(t){const{l:e,lvl:r,r:n}=t;if(n.lvl>=r-1&&e.lvl>=r-1)return t;if(r>n.lvl+1){if(rE(e))return QZ(li(t,{lvl:r-1}));if(!Wr(e)&&!Wr(e.r))return li(e.r,{l:li(e,{r:e.r.l}),lvl:r,r:li(t,{l:e.r.r,lvl:r-1})});throw new Error("Unexpected empty nodes")}else{if(rE(t))return BR(li(t,{lvl:r-1}));if(!Wr(n)&&!Wr(n.l)){const i=n.l,o=rE(i)?n.lvl-1:n.lvl;return li(i,{l:li(t,{lvl:r-1,r:i.l}),lvl:i.lvl+1,r:BR(li(n,{l:i.r,lvl:o}))})}else throw new Error("Unexpected empty nodes")}}function li(t,e){return LZ(e.k!==void 0?e.k:t.k,e.v!==void 0?e.v:t.v,e.lvl!==void 0?e.lvl:t.lvl,e.l!==void 0?e.l:t.l,e.r!==void 0?e.r:t.r)}function jZ(t){return Wr(t.r)?t.l:x1(li(t,{r:jZ(t.r)}))}function rE(t){return Wr(t)||t.lvl>t.r.lvl}function DZ(t){return Wr(t.r)?[t.k,t.v]:DZ(t.r)}function LZ(t,e,r,n=ky,i=ky){return{k:t,l:n,lvl:r,r:i,v:e}}function eV(t){return BR(QZ(t))}function QZ(t){const{l:e}=t;return!Wr(e)&&e.lvl===t.lvl?li(e,{r:li(t,{l:e.r})}):t}function BR(t){const{lvl:e,r}=t;return!Wr(r)&&!Wr(r.r)&&r.lvl===e&&r.r.lvl===e?li(r,{l:li(t,{r:r.l}),lvl:e+1}):t}function bRe(t){return NZ(t,({k:e,v:r})=>({index:e,value:r}))}function VZ(t,e){return!!(t&&t.startIndex===e.startIndex&&t.endIndex===e.endIndex)}function Ty(t,e){return!!(t&&t[0]===e[0]&&t[1]===e[1])}const hA=Sr(()=>({recalcInProgress:Le(!1)}),[],{singleton:!0});function FZ(t,e,r){return t[kS(t,e,r)]}function kS(t,e,r,n=0){let i=t.length-1;for(;n<=i;){const o=Math.floor((n+i)/2),a=t[o],s=r(a,e);if(s===0)return o;if(s===-1){if(i-n<2)return o-1;i=o-1}else{if(i===n)return o;n=o+1}}throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`)}function ORe(t,e,r,n){const i=kS(t,e,n),o=kS(t,r,n,i);return t.slice(i,o+1)}function Ss(t,e){return Math.round(t.getBoundingClientRect()[e])}function _P(t){return!Wr(t.groupOffsetTree)}function pA({index:t},e){return e===t?0:e<t?-1:1}function wRe(){return{groupIndices:[],groupOffsetTree:fp(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:fp()}}function SRe(t,e){let r=Wr(t)?0:1/0;for(const n of e){const{endIndex:i,size:o,startIndex:a}=n;if(r=Math.min(r,a),Wr(t)){t=da(t,0,o);continue}const s=EP(t,a-1,i+1);if(s.some(_Re(n)))continue;let l=!1,c=!1;for(const{end:d,start:p,value:g}of s)l?(i>=p||o===g)&&(t=VR(t,p)):(c=g!==o,l=!0),d>i&&i>=p&&g!==o&&(t=da(t,i+1,g));c&&(t=da(t,a,o))}return[t,r]}function xRe(t){return typeof t.groupIndex<"u"}function PRe({offset:t},e){return e===t?0:e<t?-1:1}function Ey(t,e,r){if(e.length===0)return 0;const{index:n,offset:i,size:o}=FZ(e,t,pA),a=t-n,s=o*a+(a-1)*r+i;return s>0?s+r:s}function BZ(t,e){if(!_P(e))return t;let r=0;for(;e.groupIndices[r]<=t+r;)r++;return t+r}function zZ(t,e,r){if(xRe(t))return e.groupIndices[t.groupIndex]+1;{const n=t.index==="LAST"?r:t.index;let i=BZ(n,e);return i=Math.max(0,i,Math.min(r,i)),i}}function kRe(t,e,r,n=0){return n>0&&(e=Math.max(e,FZ(t,n,pA).offset)),NZ(ORe(t,e,r,PRe),ERe)}function CRe(t,[e,r,n,i]){e.length>0&&n("received item sizes",e,Qo.DEBUG);const o=t.sizeTree;let a=o,s=0;if(r.length>0&&Wr(o)&&e.length===2){const g=e[0].size,m=e[1].size;a=r.reduce((y,b)=>da(da(y,b,g),b+1,m),a)}else[a,s]=SRe(a,e);if(a===o)return t;const{lastIndex:l,lastOffset:c,lastSize:d,offsetTree:p}=zR(t.offsetTree,s,a,i);return{groupIndices:r,groupOffsetTree:r.reduce((g,m)=>da(g,m,Ey(m,p,i)),fp()),lastIndex:l,lastOffset:c,lastSize:d,offsetTree:p,sizeTree:a}}function TRe(t){return Gd(t).map(({k:e,v:r},n,i)=>{const o=i[n+1];return{endIndex:o?o.k-1:1/0,size:r,startIndex:e}})}function tV(t,e){let r=0,n=0;for(;r<t;)r+=e[n+1]-e[n]-1,n++;return n-(r===t?0:1)}function zR(t,e,r,n){let i=t,o=0,a=0,s=0,l=0;if(e!==0){l=kS(i,e-1,pA),s=i[l].offset;const c=ws(r,e-1);o=c[0],a=c[1],i.length&&i[l].size===ws(r,e)[1]&&(l-=1),i=i.slice(0,l+1)}else i=[];for(const{start:c,value:d}of EP(r,e,1/0)){const p=c-o,g=p*a+s+p*n;i.push({index:c,offset:g,size:d}),o=c,s=g,a=d}return{lastIndex:o,lastOffset:s,lastSize:a,offsetTree:i}}function ERe(t){return{index:t.index,value:t}}function _Re(t){const{endIndex:e,size:r,startIndex:n}=t;return i=>i.start===n&&(i.end===e||i.end===1/0)&&i.value===r}const RRe={offsetHeight:"height",offsetWidth:"width"},kl=Sr(([{log:t},{recalcInProgress:e}])=>{const r=sr(),n=sr(),i=to(n,0),o=sr(),a=sr(),s=Le(0),l=Le([]),c=Le(void 0),d=Le(void 0),p=Le((C,E)=>Ss(C,RRe[E])),g=Le(void 0),m=Le(0),y=wRe(),b=to(Ie(r,Kt(l,t,m),Ys(CRe,y),pn()),y),O=to(Ie(l,pn(),Ys((C,E)=>({current:E,prev:C.current}),{current:[],prev:[]}),Ke(({prev:C})=>C)),[]);ht(Ie(l,Tt(C=>C.length>0),Kt(b,m),Ke(([C,E,_])=>{const $=C.reduce((M,j,B)=>da(M,j,Ey(j,E.offsetTree,_)||B),fp());return{...E,groupIndices:C,groupOffsetTree:$}})),b),ht(Ie(n,Kt(b),Tt(([C,{lastIndex:E}])=>C<E),Ke(([C,{lastIndex:E,lastSize:_}])=>[{endIndex:E,size:_,startIndex:C}])),r),ht(c,d);const S=to(Ie(c,Ke(C=>C===void 0)),!0);ht(Ie(d,Tt(C=>C!==void 0&&Wr(xi(b).sizeTree)),Ke(C=>[{endIndex:0,size:C,startIndex:0}])),r);const w=ma(Ie(r,Kt(b),Ys(({sizes:C},[E,_])=>({changed:_!==C,sizes:_}),{changed:!1,sizes:y}),Ke(C=>C.changed)));jr(Ie(s,Ys((C,E)=>({diff:C.prev-E,prev:E}),{diff:0,prev:0}),Ke(C=>C.diff)),C=>{const{groupIndices:E}=xi(b);if(C>0)Xt(e,!0),Xt(o,C+tV(C,E));else if(C<0){const _=xi(O);_.length>0&&(C-=tV(-C,_)),Xt(a,C)}}),jr(Ie(s,Kt(t)),([C,E])=>{C<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},Qo.ERROR)});const k=ma(o);ht(Ie(o,Kt(b),Ke(([C,E])=>{const _=E.groupIndices.length>0,$=[],M=E.lastSize;if(_){const j=Cy(E.sizeTree,0);let B=0,V=0;for(;B<C;){const D=E.groupIndices[V],F=E.groupIndices.length===V+1?1/0:E.groupIndices[V+1]-D-1;$.push({endIndex:D,size:j,startIndex:D}),$.push({endIndex:D+1+F-1,size:M,startIndex:D+1}),V++,B+=F+1}const X=Gd(E.sizeTree);return B!==C&&X.shift(),X.reduce((D,{k:F,v:Y})=>{let ie=D.ranges;return D.prevSize!==0&&(ie=[...D.ranges,{endIndex:F+C-1,size:D.prevSize,startIndex:D.prevIndex}]),{prevIndex:F+C,prevSize:Y,ranges:ie}},{prevIndex:C,prevSize:0,ranges:$}).ranges}return Gd(E.sizeTree).reduce((j,{k:B,v:V})=>({prevIndex:B+C,prevSize:V,ranges:[...j.ranges,{endIndex:B+C-1,size:j.prevSize,startIndex:j.prevIndex}]}),{prevIndex:0,prevSize:M,ranges:[]}).ranges})),r);const T=ma(Ie(a,Kt(b,m),Ke(([C,{offsetTree:E},_])=>{const $=-C;return Ey($,E,_)})));return ht(Ie(a,Kt(b,m),Ke(([C,E,_])=>{if(E.groupIndices.length>0){if(Wr(E.sizeTree))return E;let $=fp();const M=xi(O);let j=0,B=0,V=0;for(;j<-C;){V=M[B];const X=M[B+1]-V-1;B++,j+=X+1}if($=Gd(E.sizeTree).reduce((X,{k:D,v:F})=>da(X,Math.max(0,D+C),F),$),j!==-C){const X=Cy(E.sizeTree,V);$=da($,0,X);const D=ws(E.sizeTree,-C+1)[1];$=da($,1,D)}return{...E,sizeTree:$,...zR(E.offsetTree,0,$,_)}}else{const $=Gd(E.sizeTree).reduce((M,{k:j,v:B})=>da(M,Math.max(0,j+C),B),fp());return{...E,sizeTree:$,...zR(E.offsetTree,0,$,_)}}})),b),{beforeUnshiftWith:k,data:g,defaultItemSize:d,firstItemIndex:s,fixedItemSize:c,gap:m,groupIndices:l,itemSize:p,listRefresh:w,shiftWith:a,shiftWithOffset:T,sizeRanges:r,sizes:b,statefulTotalCount:i,totalCount:n,trackItemSizes:S,unshiftWith:o}},On(ad,hA),{singleton:!0});function IRe(t){return t.reduce((e,r)=>(e.groupIndices.push(e.totalCount),e.totalCount+=r+1,e),{groupIndices:[],totalCount:0})}const qZ=Sr(([{groupIndices:t,sizes:e,totalCount:r},{headerHeight:n,scrollTop:i}])=>{const o=sr(),a=sr(),s=ma(Ie(o,Ke(IRe)));return ht(Ie(s,Ke(l=>l.totalCount)),r),ht(Ie(s,Ke(l=>l.groupIndices)),t),ht(Ie(di(i,e,n),Tt(([l,c])=>_P(c)),Ke(([l,c,d])=>ws(c.groupOffsetTree,Math.max(l-d,0),"v")[0]),pn(),Ke(l=>[l])),a),{groupCounts:o,topItemsIndexes:a}},On(kl,go)),sd=Sr(([{log:t}])=>{const e=Le(!1),r=ma(Ie(e,Tt(n=>n),pn()));return jr(e,n=>{n&&xi(t)("props updated",{},Qo.DEBUG)}),{didMount:r,propsReady:e}},On(ad),{singleton:!0}),$Re=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function WZ(t){const e=typeof t=="number"?{index:t}:t;return e.align||(e.align="start"),(!e.behavior||!$Re)&&(e.behavior="auto"),e.offset||(e.offset=0),e}const Vb=Sr(([{gap:t,listRefresh:e,sizes:r,totalCount:n},{fixedFooterHeight:i,fixedHeaderHeight:o,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:d,viewportHeight:p},{log:g}])=>{const m=sr(),y=sr(),b=Le(0);let O=null,S=null,w=null;function k(){O&&(O(),O=null),w&&(w(),w=null),S&&(clearTimeout(S),S=null),Xt(l,!1)}return ht(Ie(m,Kt(r,p,n,b,s,a,g),Kt(t,o,i),Ke(([[T,C,E,_,$,M,j,B],V,X,D])=>{const F=WZ(T),{align:Y,behavior:ie,offset:H}=F,ne=_-1,z=zZ(F,C,ne);let N=Ey(z,C.offsetTree,V)+M;Y==="end"?(N+=X+ws(C.sizeTree,z)[1]-E+D,z===ne&&(N+=j)):Y==="center"?N+=(X+ws(C.sizeTree,z)[1]-E+D)/2:N-=$,H&&(N+=H);const U=J=>{k(),J?(B("retrying to scroll to",{location:T},Qo.DEBUG),Xt(m,T)):(Xt(y,!0),B("list did not change, scroll successful",{},Qo.DEBUG))};if(k(),ie==="smooth"){let J=!1;w=jr(e,Q=>{J=J||Q}),O=gl(d,()=>{U(J)})}else O=gl(Ie(e,ARe(150)),U);return S=setTimeout(()=>{k()},1200),Xt(l,!0),B("scrolling from index to",{behavior:ie,index:z,top:N},Qo.DEBUG),{behavior:ie,top:N}})),c),{scrollTargetReached:y,scrollToIndex:m,topListHeight:b}},On(kl,go,ad),{singleton:!0});function ARe(t){return e=>{const r=setTimeout(()=>{e(!1)},t);return n=>{n&&(e(!0),clearTimeout(r))}}}function gA(t,e){t==0?e():requestAnimationFrame(()=>{gA(t-1,e)})}function mA(t,e){const r=e-1;return typeof t=="number"?t:t.index==="LAST"?r:t.index}const Fb=Sr(([{defaultItemSize:t,listRefresh:e,sizes:r},{scrollTop:n},{scrollTargetReached:i,scrollToIndex:o},{didMount:a}])=>{const s=Le(!0),l=Le(0),c=Le(!0);return ht(Ie(a,Kt(l),Tt(([d,p])=>!!p),Us(!1)),s),ht(Ie(a,Kt(l),Tt(([d,p])=>!!p),Us(!1)),c),jr(Ie(di(e,a),Kt(s,r,t,c),Tt(([[,d],p,{sizeTree:g},m,y])=>d&&(!Wr(g)||cA(m))&&!p&&!y),Kt(l)),([,d])=>{gl(i,()=>{Xt(c,!0)}),gA(4,()=>{gl(n,()=>{Xt(s,!0)}),Xt(o,d)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},On(kl,go,Vb,sd),{singleton:!0});function UZ(t,e){return Math.abs(t-e)<1.01}const _y="up",Mv="down",MRe="none",NRe={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},jRe=0,Bb=Sr(([{footerHeight:t,headerHeight:e,scrollBy:r,scrollContainerState:n,scrollTop:i,viewportHeight:o}])=>{const a=Le(!1),s=Le(!0),l=sr(),c=sr(),d=Le(4),p=Le(jRe),g=to(Ie(K4(Ie($t(i),Np(1),Us(!0)),Ie($t(i),Np(1),Us(!1),Y4(100))),pn()),!1),m=to(Ie(K4(Ie(r,Us(!0)),Ie(r,Us(!1),Y4(200))),pn()),!1);ht(Ie(di($t(i),$t(p)),Ke(([w,k])=>w<=k),pn()),s),ht(Ie(s,mu(50)),c);const y=ma(Ie(di(n,$t(o),$t(e),$t(t),$t(d)),Ys((w,[{scrollHeight:k,scrollTop:T},C,E,_,$])=>{const M=T+C-k>-$,j={scrollHeight:k,scrollTop:T,viewportHeight:C};if(M){let V,X;return T>w.state.scrollTop?(V="SCROLLED_DOWN",X=w.state.scrollTop-T):(V="SIZE_DECREASED",X=w.state.scrollTop-T||w.scrollTopDelta),{atBottom:!0,atBottomBecause:V,scrollTopDelta:X,state:j}}let B;return j.scrollHeight>w.state.scrollHeight?B="SIZE_INCREASED":C<w.state.viewportHeight?B="VIEWPORT_HEIGHT_DECREASING":T<w.state.scrollTop?B="SCROLLING_UPWARDS":B="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:B,state:j}},NRe),pn((w,k)=>w&&w.atBottom===k.atBottom))),b=to(Ie(n,Ys((w,{scrollHeight:k,scrollTop:T,viewportHeight:C})=>{if(UZ(w.scrollHeight,k))return{changed:!1,jump:0,scrollHeight:k,scrollTop:T};{const E=k-(T+C)<1;return w.scrollTop!==T&&E?{changed:!0,jump:w.scrollTop-T,scrollHeight:k,scrollTop:T}:{changed:!0,jump:0,scrollHeight:k,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Tt(w=>w.changed),Ke(w=>w.jump)),0);ht(Ie(y,Ke(w=>w.atBottom)),a),ht(Ie(a,mu(50)),l);const O=Le(Mv);ht(Ie(n,Ke(({scrollTop:w})=>w),pn(),Ys((w,k)=>xi(m)?{direction:w.direction,prevScrollTop:k}:{direction:k<w.prevScrollTop?_y:Mv,prevScrollTop:k},{direction:Mv,prevScrollTop:0}),Ke(w=>w.direction)),O),ht(Ie(n,mu(50),Us(MRe)),O);const S=Le(0);return ht(Ie(g,Tt(w=>!w),Us(0)),S),ht(Ie(i,mu(100),Kt(g),Tt(([w,k])=>!!k),Ys(([w,k],[T])=>[k,T],[0,0]),Ke(([w,k])=>k-w)),S),{atBottomState:y,atBottomStateChange:l,atBottomThreshold:d,atTopStateChange:c,atTopThreshold:p,isAtBottom:a,isAtTop:s,isScrolling:g,lastJumpDueToItemResize:b,scrollDirection:O,scrollVelocity:S}},On(go)),CS="top",TS="bottom",rV="none";function nV(t,e,r){return typeof t=="number"?r===_y&&e===CS||r===Mv&&e===TS?t:0:r===_y?e===CS?t.main:t.reverse:e===TS?t.main:t.reverse}function iV(t,e){var r;return typeof t=="number"?t:(r=t[e])!=null?r:0}const vA=Sr(([{deviation:t,fixedHeaderHeight:e,headerHeight:r,scrollTop:n,viewportHeight:i}])=>{const o=sr(),a=Le(0),s=Le(0),l=Le(0),c=to(Ie(di($t(n),$t(i),$t(r),$t(o,Ty),$t(l),$t(a),$t(e),$t(t),$t(s)),Ke(([d,p,g,[m,y],b,O,S,w,k])=>{const T=d-w,C=O+S,E=Math.max(g-T,0);let _=rV;const $=iV(k,CS),M=iV(k,TS);return m-=w,m+=g+S,y+=g+S,y-=w,m>d+C-$&&(_=_y),y<d-E+p+M&&(_=Mv),_!==rV?[Math.max(T-g-nV(b,CS,_)-$,0),T-E-S+p+nV(b,TS,_)+M]:null}),Tt(d=>d!=null),pn(Ty)),[0,0]);return{increaseViewportBy:s,listBoundary:o,overscan:l,topListHeight:a,visibleRange:c}},On(go),{singleton:!0});function DRe(t,e,r){if(_P(e)){const n=BZ(t,e);return[{index:ws(e.groupOffsetTree,n)[0],offset:0,size:0},{data:r==null?void 0:r[0],index:n,offset:0,size:0}]}return[{data:r==null?void 0:r[0],index:t,offset:0,size:0}]}const nE={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function P1(t,e,r,n,i,o){const{lastIndex:a,lastOffset:s,lastSize:l}=i;let c=0,d=0;if(t.length>0){c=t[0].offset;const b=t[t.length-1];d=b.offset+b.size}const p=r-a,g=s+p*l+(p-1)*n,m=c,y=g-d;return{bottom:d,firstItemIndex:o,items:oV(t,i,o),offsetBottom:y,offsetTop:c,top:m,topItems:oV(e,i,o),topListHeight:e.reduce((b,O)=>O.size+b,0),totalCount:r}}function HZ(t,e,r,n,i,o){let a=0;if(r.groupIndices.length>0)for(const d of r.groupIndices){if(d-a>=t)break;a++}const s=t+a,l=mA(e,s),c=Array.from({length:s}).map((d,p)=>({data:o[p+l],index:p+l,offset:0,size:0}));return P1(c,[],s,i,r,n)}function oV(t,e,r){if(t.length===0)return[];if(!_P(e))return t.map(c=>({...c,index:c.index+r,originalIndex:c.index}));const n=t[0].index,i=t[t.length-1].index,o=[],a=EP(e.groupOffsetTree,n,i);let s,l=0;for(const c of t){(!s||s.end<c.index)&&(s=a.shift(),l=e.groupIndices.indexOf(s.start));let d;c.index===s.start?d={index:l,type:"group"}:d={groupIndex:l,index:c.index-(l+1)+r},o.push({...d,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return o}const Ff=Sr(([{data:t,firstItemIndex:e,gap:r,sizes:n,totalCount:i},o,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:d},{topListHeight:p},g,{didMount:m},{recalcInProgress:y}])=>{const b=Le([]),O=Le(0),S=sr();ht(o.topItemsIndexes,b);const w=to(Ie(di(m,y,$t(l,Ty),$t(i),$t(n),$t(c),d,$t(b),$t(e),$t(r),t),Tt(([E,_,,$,,,,,,,M])=>{const j=M&&M.length!==$;return E&&!_&&!j}),Ke(([,,[E,_],$,M,j,B,V,X,D,F])=>{const Y=M,{offsetTree:ie,sizeTree:H}=Y,ne=xi(O);if($===0)return{...nE,totalCount:$};if(E===0&&_===0)return ne===0?{...nE,totalCount:$}:HZ(ne,j,M,X,D,F||[]);if(Wr(H))return ne>0?null:P1(DRe(mA(j,$),Y,F),[],$,D,Y,X);const z=[];if(V.length>0){const q=V[0],oe=V[V.length-1];let Oe=0;for(const Z of EP(H,q,oe)){const le=Z.value,Pe=Math.max(Z.start,q),ee=Math.min(Z.end,oe);for(let re=Pe;re<=ee;re++)z.push({data:F==null?void 0:F[re],index:re,offset:Oe,size:le}),Oe+=le}}if(!B)return P1([],z,$,D,Y,X);const N=V.length>0?V[V.length-1]+1:0,U=kRe(ie,E,_,N);if(U.length===0)return null;const J=$-1,Q=TP([],q=>{for(const oe of U){const Oe=oe.value;let Z=Oe.offset,le=oe.start;const Pe=Oe.size;if(Oe.offset<E){le+=Math.floor((E-Oe.offset+D)/(Pe+D));const re=le-oe.start;Z+=re*Pe+re*D}le<N&&(Z+=(N-le)*Pe,le=N);const ee=Math.min(oe.end,J);for(let re=le;re<=ee&&!(Z>=_);re++)q.push({data:F==null?void 0:F[re],index:re,offset:Z,size:Pe}),Z+=Pe+D}});return P1(Q,z,$,D,Y,X)}),Tt(E=>E!==null),pn()),nE);ht(Ie(t,Tt(cA),Ke(E=>E==null?void 0:E.length)),i),ht(Ie(w,Ke(E=>E.topListHeight)),p),ht(p,s),ht(Ie(w,Ke(E=>[E.top,E.bottom])),a),ht(Ie(w,Ke(E=>E.items)),S);const k=ma(Ie(w,Tt(({items:E})=>E.length>0),Kt(i,t),Tt(([{items:E},_])=>E[E.length-1].originalIndex===_-1),Ke(([,E,_])=>[E-1,_]),pn(Ty),Ke(([E])=>E))),T=ma(Ie(w,mu(200),Tt(({items:E,topItems:_})=>E.length>0&&E[0].originalIndex===_.length),Ke(({items:E})=>E[0].index),pn())),C=ma(Ie(w,Tt(({items:E})=>E.length>0),Ke(({items:E})=>{let _=0,$=E.length-1;for(;E[_].type==="group"&&_<$;)_++;for(;E[$].type==="group"&&$>_;)$--;return{endIndex:E[$].index,startIndex:E[_].index}}),pn(VZ)));return{endReached:k,initialItemCount:O,itemsRendered:S,listState:w,rangeChanged:C,startReached:T,topItemsIndexes:b,...g}},On(kl,qZ,vA,Fb,Vb,Bb,sd,hA),{singleton:!0}),XZ=Sr(([{fixedFooterHeight:t,fixedHeaderHeight:e,footerHeight:r,headerHeight:n},{listState:i}])=>{const o=sr(),a=to(Ie(di(r,t,n,e,i),Ke(([s,l,c,d,p])=>s+l+c+d+p.offsetBottom+p.bottom)),0);return ht($t(a),o),{totalListHeight:a,totalListHeightChanged:o}},On(go,Ff),{singleton:!0}),LRe=Sr(([{viewportHeight:t},{totalListHeight:e}])=>{const r=Le(!1),n=to(Ie(di(r,t,e),Tt(([i])=>i),Ke(([,i,o])=>Math.max(0,i-o)),mu(0),pn()),0);return{alignToBottom:r,paddingTopAddition:n}},On(go,XZ),{singleton:!0});function aV(t){return t?t==="smooth"?"smooth":"auto":!1}const QRe=(t,e)=>typeof t=="function"?aV(t(e)):e&&aV(t),VRe=Sr(([{listRefresh:t,totalCount:e,fixedItemSize:r},{atBottomState:n,isAtBottom:i},{scrollToIndex:o},{scrolledToInitialItem:a},{didMount:s,propsReady:l},{log:c},{scrollingInProgress:d}])=>{const p=Le(!1),g=sr();let m=null;function y(O){Xt(o,{align:"end",behavior:O,index:"LAST"})}jr(Ie(di(Ie($t(e),Np(1)),s),Kt($t(p),i,a,d),Ke(([[O,S],w,k,T,C])=>{let E=S&&T,_="auto";return E&&(_=QRe(w,k||C),E=E&&!!_),{followOutputBehavior:_,shouldFollow:E,totalCount:O}}),Tt(({shouldFollow:O})=>O)),({followOutputBehavior:O,totalCount:S})=>{m&&(m(),m=null),xi(r)?requestAnimationFrame(()=>{xi(c)("following output to ",{totalCount:S},Qo.DEBUG),y(O)}):m=gl(t,()=>{xi(c)("following output to ",{totalCount:S},Qo.DEBUG),y(O),m=null})});function b(O){const S=gl(n,w=>{O&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(xi(c)("scrolling to bottom due to increased size",{},Qo.DEBUG),y("auto"))});setTimeout(S,100)}return jr(Ie(di($t(p),e,l),Tt(([O,,S])=>O&&S),Ys(({value:O},[,S])=>({refreshed:O===S,value:S}),{refreshed:!1,value:0}),Tt(({refreshed:O})=>O),Kt(p,e)),([,O])=>{xi(a)&&b(O!==!1)}),jr(g,()=>{b(xi(p)!==!1)}),jr(di($t(p),n),([O,S])=>{O&&!S.atBottom&&S.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&y("auto")}),{autoscrollToBottom:g,followOutput:p}},On(kl,Bb,Vb,Fb,sd,ad,go)),FRe=Sr(([{data:t,firstItemIndex:e,gap:r,sizes:n},{initialTopMostItemIndex:i},{initialItemCount:o,listState:a},{didMount:s}])=>(ht(Ie(s,Kt(o),Tt(([,l])=>l!==0),Kt(i,n,e,r,t),Ke(([[,l],c,d,p,g,m=[]])=>HZ(l,c,d,p,g,m))),a),{}),On(kl,Fb,Ff,sd),{singleton:!0}),BRe=Sr(([{didMount:t},{scrollTo:e},{listState:r}])=>{const n=Le(0);return jr(Ie(t,Kt(n),Tt(([,i])=>i!==0),Ke(([,i])=>({top:i}))),i=>{gl(Ie(r,Np(1),Tt(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{Xt(e,i)})})}),{initialScrollTop:n}},On(sd,go,Ff),{singleton:!0}),zRe=({itemBottom:t,itemTop:e,locationParams:{align:r,behavior:n,...i},viewportBottom:o,viewportTop:a})=>e<a?{...i,align:r??"start",behavior:n}:t>o?{...i,align:r??"end",behavior:n}:null,qRe=Sr(([{gap:t,sizes:e,totalCount:r},{fixedFooterHeight:n,fixedHeaderHeight:i,headerHeight:o,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const d=sr();return ht(Ie(d,Kt(e,l,r,o,i,n,s),Kt(t),Ke(([[p,g,m,y,b,O,S,w],k])=>{const{align:T,behavior:C,calculateViewLocation:E=zRe,done:_,...$}=p,M=zZ(p,g,y-1),j=Ey(M,g.offsetTree,k)+b+O,B=j+ws(g.sizeTree,M)[1],V=w+O,X=w+m-S,D=E({itemBottom:B,itemTop:j,locationParams:{align:T,behavior:C,...$},viewportBottom:X,viewportTop:V});return D?_&&gl(Ie(a,Tt(F=>!F),Np(xi(a)?1:2)),_):_&&_(),D}),Tt(p=>p!==null)),c),{scrollIntoView:d}},On(kl,go,Vb,Ff,ad),{singleton:!0}),ZZ=Sr(([{scrollVelocity:t}])=>{const e=Le(!1),r=sr(),n=Le(!1);return ht(Ie(t,Kt(n,e,r),Tt(([i,o])=>!!o),Ke(([i,o,a,s])=>{const{enter:l,exit:c}=o;if(a){if(c(i,s))return!1}else if(l(i,s))return!0;return a}),pn()),e),jr(Ie(di(e,t,r),Kt(n)),([[i,o,a],s])=>{i&&s&&s.change&&s.change(o,a)}),{isSeeking:e,scrollSeekConfiguration:n,scrollSeekRangeChanged:r,scrollVelocity:t}},On(Bb),{singleton:!0}),yA=Sr(([{scrollContainerState:t,scrollTo:e}])=>{const r=sr(),n=sr(),i=sr(),o=Le(!1),a=Le(void 0);return ht(Ie(di(r,n),Ke(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:d}])=>({scrollHeight:s,scrollTop:Math.max(0,l-d),viewportHeight:c}))),t),ht(Ie(e,Kt(n),Ke(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),i),{customScrollParent:a,useWindowScroll:o,windowScrollContainerState:r,windowScrollTo:i,windowViewportRect:n}},On(go)),WRe=Sr(([{sizeRanges:t,sizes:e},{headerHeight:r,scrollTop:n},{initialTopMostItemIndex:i},{didMount:o},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=sr(),d=Le(void 0),p=Le(null),g=Le(null);return ht(s,p),ht(l,g),jr(Ie(c,Kt(e,n,a,p,g,r)),([m,y,b,O,S,w,k])=>{const T=TRe(y.sizeTree);O&&S!==null&&w!==null&&(b=S.scrollTop-w.offsetTop),b-=k,m({ranges:T,scrollTop:b})}),ht(Ie(d,Tt(cA),Ke(URe)),i),ht(Ie(o,Kt(d),Tt(([,m])=>m!==void 0),pn(),Ke(([,m])=>m.ranges)),t),{getState:c,restoreStateFrom:d}},On(kl,go,Fb,sd,yA));function URe(t){return{align:"start",index:0,offset:t.scrollTop}}const HRe=Sr(([{topItemsIndexes:t}])=>{const e=Le(0);return ht(Ie(e,Tt(r=>r>=0),Ke(r=>Array.from({length:r}).map((n,i)=>i))),t),{topItemCount:e}},On(Ff));function GZ(t){let e=!1,r;return()=>(e||(e=!0,r=t()),r)}const XRe=GZ(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),ZRe=Sr(([{deviation:t,scrollBy:e,scrollingInProgress:r,scrollTop:n},{isAtBottom:i,isScrolling:o,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:d,shiftWithOffset:p,sizes:g},{log:m},{recalcInProgress:y}])=>{const b=ma(Ie(l,Kt(a),Ys(([,S,w,k],[{bottom:T,items:C,offsetBottom:E,totalCount:_},$])=>{const M=T+E;let j=0;return w===_&&S.length>0&&C.length>0&&(C[0].originalIndex===0&&S[0].originalIndex===0||(j=M-k,j!==0&&(j+=$))),[j,C,_,M]},[0,[],0,0]),Tt(([S])=>S!==0),Kt(n,s,r,i,m,y),Tt(([,S,w,k,,,T])=>!T&&!k&&S!==0&&w===_y),Ke(([[S],,,,,w])=>(w("Upward scrolling compensation",{amount:S},Qo.DEBUG),S))));function O(S){S>0?(Xt(e,{behavior:"auto",top:-S}),Xt(t,0)):(Xt(t,0),Xt(e,{behavior:"auto",top:-S}))}return jr(Ie(b,Kt(t,o)),([S,w,k])=>{k&&XRe()?Xt(t,w-S):O(-S)}),jr(Ie(di(to(o,!1),t,y),Tt(([S,w,k])=>!S&&!k&&w!==0),Ke(([S,w])=>w),mu(1)),O),ht(Ie(p,Ke(S=>({top:-S}))),e),jr(Ie(c,Kt(g,d),Ke(([S,{groupIndices:w,lastSize:k,sizeTree:T},C])=>{function E(_){return _*(k+C)}if(w.length===0)return E(S);{let _=0;const $=Cy(T,0);let M=0,j=0;for(;M<S;){M++,_+=$;let B=w.length===j+1?1/0:w[j+1]-w[j]-1;M+B>S&&(_-=$,B=S-M+1),M+=B,_+=E(B),j++}return _}})),S=>{Xt(t,S),requestAnimationFrame(()=>{Xt(e,{top:S}),requestAnimationFrame(()=>{Xt(t,0),Xt(y,!1)})})}),{deviation:t}},On(go,Bb,Ff,kl,ad,hA)),GRe=Sr(([t,e,r,n,i,o,a,s,l,c])=>({...t,...e,...r,...n,...i,...o,...a,...s,...l,...c}),On(vA,FRe,sd,ZZ,XZ,BRe,LRe,yA,qRe,ad)),YZ=Sr(([{data:t,defaultItemSize:e,firstItemIndex:r,fixedItemSize:n,gap:i,groupIndices:o,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:d,trackItemSizes:p},{initialItemFinalLocationReached:g,initialTopMostItemIndex:m,scrolledToInitialItem:y},b,O,S,{listState:w,topItemsIndexes:k,...T},{scrollToIndex:C},E,{topItemCount:_},{groupCounts:$},M])=>(ht(T.rangeChanged,M.scrollSeekRangeChanged),ht(Ie(M.windowViewportRect,Ke(j=>j.visibleHeight)),b.viewportHeight),{data:t,defaultItemHeight:e,firstItemIndex:r,fixedItemHeight:n,gap:i,groupCounts:$,initialItemFinalLocationReached:g,initialTopMostItemIndex:m,scrolledToInitialItem:y,sizeRanges:s,topItemCount:_,topItemsIndexes:k,totalCount:d,...S,groupIndices:o,itemSize:a,listState:w,scrollToIndex:C,statefulTotalCount:c,trackItemSizes:p,...T,...M,...b,sizes:l,...O}),On(kl,Fb,go,WRe,VRe,Ff,Vb,ZRe,HRe,qZ,GRe));function YRe(t,e){const r={},n={};let i=0;const o=t.length;for(;i<o;)n[t[i]]=1,i+=1;for(const a in e)Object.hasOwn(n,a)||(r[a]=e[a]);return r}const EO=typeof document<"u"?Qe.useLayoutEffect:Qe.useEffect;function bA(t,e,r){const n=Object.keys(e.required||{}),i=Object.keys(e.optional||{}),o=Object.keys(e.methods||{}),a=Object.keys(e.events||{}),s=Qe.createContext({});function l(O,S){O.propsReady&&Xt(O.propsReady,!1);for(const w of n){const k=O[e.required[w]];Xt(k,S[w])}for(const w of i)if(w in S){const k=O[e.optional[w]];Xt(k,S[w])}O.propsReady&&Xt(O.propsReady,!0)}function c(O){return o.reduce((S,w)=>(S[w]=k=>{const T=O[e.methods[w]];Xt(T,k)},S),{})}function d(O){return a.reduce((S,w)=>(S[w]=hRe(O[e.events[w]]),S),{})}const p=Qe.forwardRef((O,S)=>{const{children:w,...k}=O,[T]=Qe.useState(()=>TP(gRe(t),_=>{l(_,k)})),[C]=Qe.useState(G4(d,T));EO(()=>{for(const _ of a)_ in k&&jr(C[_],k[_]);return()=>{Object.values(C).map(uA)}},[k,C,T]),EO(()=>{l(T,k)}),Qe.useImperativeHandle(S,Z4(c(T)));const E=r;return P.jsx(s.Provider,{value:T,children:r?P.jsx(E,{...YRe([...n,...i,...a],k),children:w}):w})}),g=O=>{const S=Qe.useContext(s);return Qe.useCallback(w=>{Xt(S[O],w)},[S,O])},m=O=>{const S=Qe.useContext(s)[O],w=Qe.useCallback(k=>jr(S,k),[S]);return Qe.useSyncExternalStore(w,()=>xi(S),()=>xi(S))},y=O=>{const S=Qe.useContext(s)[O],[w,k]=Qe.useState(G4(xi,S));return EO(()=>jr(S,T=>{T!==w&&k(Z4(T))}),[S,w]),w},b=Qe.version.startsWith("18")?m:y;return{Component:p,useEmitter:(O,S)=>{const w=Qe.useContext(s)[O];EO(()=>jr(w,S),[S,w])},useEmitterValue:b,usePublisher:g}}const RP=Qe.createContext(void 0),KZ=Qe.createContext(void 0),JZ=typeof document<"u"?Qe.useLayoutEffect:Qe.useEffect;function iE(t){return"self"in t}function KRe(t){return"body"in t}function eG(t,e,r,n=xg,i,o){const a=Qe.useRef(null),s=Qe.useRef(null),l=Qe.useRef(null),c=Qe.useCallback(g=>{let m,y,b;const O=g.target;if(KRe(O)||iE(O)){const w=iE(O)?O:O.defaultView;b=o?w.scrollX:w.scrollY,m=o?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight,y=o?w.innerWidth:w.innerHeight}else b=o?O.scrollLeft:O.scrollTop,m=o?O.scrollWidth:O.scrollHeight,y=o?O.offsetWidth:O.offsetHeight;const S=()=>{t({scrollHeight:m,scrollTop:Math.max(b,0),viewportHeight:y})};g.suppressFlushSync?S():Zz.flushSync(S),s.current!==null&&(b===s.current||b<=0||b===m-y)&&(s.current=null,e(!0),l.current&&(clearTimeout(l.current),l.current=null))},[t,e,o]);Qe.useEffect(()=>{const g=i||a.current;return n(i||a.current),c({suppressFlushSync:!0,target:g}),g.addEventListener("scroll",c,{passive:!0}),()=>{n(null),g.removeEventListener("scroll",c)}},[a,c,r,n,i]);function d(g){const m=a.current;if(!m||(o?"offsetWidth"in m&&m.offsetWidth===0:"offsetHeight"in m&&m.offsetHeight===0))return;const y=g.behavior==="smooth";let b,O,S;iE(m)?(O=Math.max(Ss(m.document.documentElement,o?"width":"height"),o?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight),b=o?m.innerWidth:m.innerHeight,S=o?window.scrollX:window.scrollY):(O=m[o?"scrollWidth":"scrollHeight"],b=Ss(m,o?"width":"height"),S=m[o?"scrollLeft":"scrollTop"]);const w=O-b;if(g.top=Math.ceil(Math.max(Math.min(w,g.top),0)),UZ(b,O)||g.top===S){t({scrollHeight:O,scrollTop:S,viewportHeight:b}),y&&e(!0);return}y?(s.current=g.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,e(!0)},1e3)):s.current=null,o&&(g={behavior:g.behavior,left:g.top}),m.scrollTo(g)}function p(g){o&&(g={behavior:g.behavior,left:g.top}),a.current.scrollBy(g)}return{scrollByCallback:p,scrollerRef:a,scrollToCallback:d}}const oE="-webkit-sticky",sV="sticky",tG=GZ(()=>{if(typeof document>"u")return sV;const t=document.createElement("div");return t.style.position=oE,t.style.position===oE?oE:sV});function OA(t){return t}const JRe=Sr(()=>{const t=Le(l=>`Item ${l}`),e=Le(null),r=Le(l=>`Group ${l}`),n=Le({}),i=Le(OA),o=Le("div"),a=Le(xg),s=(l,c=null)=>to(Ie(n,Ke(d=>d[l]),pn()),c);return{components:n,computeItemKey:i,context:e,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:r,HeaderComponent:s("Header"),HeaderFooterTag:o,ItemComponent:s("Item","div"),itemContent:t,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),eIe=Sr(([t,e])=>({...t,...e}),On(YZ,JRe)),tIe=({height:t})=>P.jsx("div",{style:{height:t}}),rIe={overflowAnchor:"none",position:tG(),zIndex:1},rG={overflowAnchor:"none"},nIe={...rG,display:"inline-block",height:"100%"},lV=Qe.memo(function({showTopList:t=!1}){const e=Nt("listState"),r=La("sizeRanges"),n=Nt("useWindowScroll"),i=Nt("customScrollParent"),o=La("windowScrollContainerState"),a=La("scrollContainerState"),s=i||n?o:a,l=Nt("itemContent"),c=Nt("context"),d=Nt("groupContent"),p=Nt("trackItemSizes"),g=Nt("itemSize"),m=Nt("log"),y=La("gap"),b=Nt("horizontalDirection"),{callbackRef:O}=MZ(r,g,p,t?xg:s,m,y,i,b,Nt("skipAnimationFrameInResizeObserver")),[S,w]=Qe.useState(0);xA("deviation",D=>{S!==D&&w(D)});const k=Nt("EmptyPlaceholder"),T=Nt("ScrollSeekPlaceholder")||tIe,C=Nt("ListComponent"),E=Nt("ItemComponent"),_=Nt("GroupComponent"),$=Nt("computeItemKey"),M=Nt("isSeeking"),j=Nt("groupIndices").length>0,B=Nt("alignToBottom"),V=Nt("initialItemFinalLocationReached"),X=t?{}:{boxSizing:"border-box",...b?{display:"inline-block",height:"100%",marginLeft:S!==0?S:B?"auto":0,paddingLeft:e.offsetTop,paddingRight:e.offsetBottom,whiteSpace:"nowrap"}:{marginTop:S!==0?S:B?"auto":0,paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},...V?{}:{visibility:"hidden"}};return!t&&e.totalCount===0&&k?P.jsx(k,{...gn(k,c)}):P.jsx(C,{...gn(C,c),"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list",ref:O,style:X,children:(t?e.topItems:e.items).map(D=>{const F=D.originalIndex,Y=$(F+e.firstItemIndex,D.data,c);return M?A.createElement(T,{...gn(T,c),height:D.size,index:D.index,key:Y,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?A.createElement(_,{...gn(_,c),"data-index":F,"data-item-index":D.index,"data-known-size":D.size,key:Y,style:rIe},d(D.index,c)):A.createElement(E,{...gn(E,c),...nG(E,D.data),"data-index":F,"data-item-group-index":D.groupIndex,"data-item-index":D.index,"data-known-size":D.size,key:Y,style:b?nIe:rG},j?l(D.index,D.groupIndex,D.data,c):l(D.index,D.data,c))})})}),iIe={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},oIe={outline:"none",overflowX:"auto",position:"relative"},Pg=t=>({height:"100%",position:"absolute",top:0,width:"100%",...t?{display:"flex",flexDirection:"column"}:{}}),aIe={position:tG(),top:0,width:"100%",zIndex:1};function gn(t,e){if(typeof t!="string")return{context:e}}function nG(t,e){return{item:typeof t=="string"?void 0:e}}const sIe=Qe.memo(function(){const t=Nt("HeaderComponent"),e=La("headerHeight"),r=Nt("HeaderFooterTag"),n=ml(Qe.useMemo(()=>o=>{e(Ss(o,"height"))},[e]),!0,Nt("skipAnimationFrameInResizeObserver")),i=Nt("context");return t?P.jsx(r,{ref:n,children:P.jsx(t,{...gn(t,i)})}):null}),lIe=Qe.memo(function(){const t=Nt("FooterComponent"),e=La("footerHeight"),r=Nt("HeaderFooterTag"),n=ml(Qe.useMemo(()=>o=>{e(Ss(o,"height"))},[e]),!0,Nt("skipAnimationFrameInResizeObserver")),i=Nt("context");return t?P.jsx(r,{ref:n,children:P.jsx(t,{...gn(t,i)})}):null});function wA({useEmitter:t,useEmitterValue:e,usePublisher:r}){return Qe.memo(function({children:n,style:i,...o}){const a=r("scrollContainerState"),s=e("ScrollerComponent"),l=r("smoothScrollTargetReached"),c=e("scrollerRef"),d=e("context"),p=e("horizontalDirection")||!1,{scrollByCallback:g,scrollerRef:m,scrollToCallback:y}=eG(a,l,s,c,void 0,p);return t("scrollTo",y),t("scrollBy",g),P.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:m,style:{...p?oIe:iIe,...i},tabIndex:0,...o,...gn(s,d),children:n})})}function SA({useEmitter:t,useEmitterValue:e,usePublisher:r}){return Qe.memo(function({children:n,style:i,...o}){const a=r("windowScrollContainerState"),s=e("ScrollerComponent"),l=r("smoothScrollTargetReached"),c=e("totalListHeight"),d=e("deviation"),p=e("customScrollParent"),g=e("context"),m=Qe.useRef(null),y=e("scrollerRef"),{scrollByCallback:b,scrollerRef:O,scrollToCallback:S}=eG(a,l,s,y,p);return JZ(()=>{var w;return O.current=p||((w=m.current)==null?void 0:w.ownerDocument.defaultView),()=>{O.current=null}},[O,p]),t("windowScrollTo",S),t("scrollBy",b),P.jsx(s,{ref:m,"data-virtuoso-scroller":!0,style:{position:"relative",...i,...c!==0?{height:c+d}:{}},...o,...gn(s,g),children:n})})}const cIe=({children:t})=>{const e=Qe.useContext(RP),r=La("viewportHeight"),n=La("fixedItemHeight"),i=Nt("alignToBottom"),o=Nt("horizontalDirection"),a=Qe.useMemo(()=>Py(r,l=>Ss(l,o?"width":"height")),[r,o]),s=ml(a,!0,Nt("skipAnimationFrameInResizeObserver"));return Qe.useEffect(()=>{e&&(r(e.viewportHeight),n(e.itemHeight))},[e,r,n]),P.jsx("div",{"data-viewport-type":"element",ref:s,style:Pg(i),children:t})},uIe=({children:t})=>{const e=Qe.useContext(RP),r=La("windowViewportRect"),n=La("fixedItemHeight"),i=Nt("customScrollParent"),o=fA(r,i,Nt("skipAnimationFrameInResizeObserver")),a=Nt("alignToBottom");return Qe.useEffect(()=>{e&&(n(e.itemHeight),r({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,r,n]),P.jsx("div",{"data-viewport-type":"window",ref:o,style:Pg(a),children:t})},dIe=({children:t})=>{const e=Nt("TopItemListComponent")||"div",r=Nt("headerHeight"),n={...aIe,marginTop:`${r}px`},i=Nt("context");return P.jsx(e,{style:n,...gn(e,i),children:t})},fIe=Qe.memo(function(t){const e=Nt("useWindowScroll"),r=Nt("topItemsIndexes").length>0,n=Nt("customScrollParent"),i=Nt("context"),o=n||e?gIe:pIe,a=n||e?uIe:cIe;return P.jsxs(o,{...t,...gn(o,i),children:[r&&P.jsx(dIe,{children:P.jsx(lV,{showTopList:!0})}),P.jsxs(a,{children:[P.jsx(sIe,{}),P.jsx(lV,{}),P.jsx(lIe,{})]})]})}),{Component:hIe,useEmitter:xA,useEmitterValue:Nt,usePublisher:La}=bA(eIe,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},fIe),pIe=wA({useEmitter:xA,useEmitterValue:Nt,usePublisher:La}),gIe=SA({useEmitter:xA,useEmitterValue:Nt,usePublisher:La}),PA=hIe,mIe=Sr(()=>{const t=Le(l=>P.jsxs("td",{children:["Item $",l]})),e=Le(null),r=Le(null),n=Le(null),i=Le({}),o=Le(OA),a=Le(xg),s=(l,c=null)=>to(Ie(i,Ke(d=>d[l]),pn()),c);return{components:i,computeItemKey:o,context:e,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:n,fixedHeaderContent:r,itemContent:t,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),vIe=Sr(([t,e])=>({...t,...e}),On(YZ,mIe)),yIe=({height:t})=>P.jsx("tr",{children:P.jsx("td",{style:{height:t}})}),bIe=({height:t})=>P.jsx("tr",{children:P.jsx("td",{style:{border:0,height:t,padding:0}})}),OIe={overflowAnchor:"none"},cV=Qe.memo(function({showTopList:t=!1}){const e=Gt("listState"),r=Gt("computeItemKey"),n=Gt("firstItemIndex"),i=Gt("isSeeking"),o=Gt("ScrollSeekPlaceholder")||yIe,a=Gt("context"),s=Gt("TableRowComponent"),l=Gt("fixedHeaderHeight"),c=Gt("itemContent"),d=(t?e.topItems:[]).reduce((g,m,y)=>(y===0?g.push(m.size):g.push(g[y-1]+m.size),g),[]),p=(t?e.topItems:e.items).map(g=>{const m=g.originalIndex,y=r(m+n,g.data,a),b=t?m===0?0:d[m-1]:0;return i?A.createElement(o,{...gn(o,a),height:g.size,index:g.index,key:y,type:g.type||"item"}):A.createElement(s,{...gn(s,a),...nG(s,g.data),"data-index":m,"data-item-index":g.index,"data-known-size":g.size,key:y,style:t?{overflowAnchor:"none",position:"sticky",top:l+b,zIndex:2}:OIe},c(g.index,g.data,a))});return P.jsx(P.Fragment,{children:p})}),wIe=Qe.memo(function(){const t=Gt("listState"),e=Gt("topItemsIndexes").length>0,r=vs("sizeRanges"),n=Gt("useWindowScroll"),i=Gt("customScrollParent"),o=vs("windowScrollContainerState"),a=vs("scrollContainerState"),s=i||n?o:a,l=Gt("trackItemSizes"),c=Gt("itemSize"),d=Gt("log"),{callbackRef:p,ref:g}=MZ(r,c,l,s,d,void 0,i,!1,Gt("skipAnimationFrameInResizeObserver")),[m,y]=Qe.useState(0);kA("deviation",j=>{m!==j&&(g.current.style.marginTop=`${j}px`,y(j))});const b=Gt("EmptyPlaceholder"),O=Gt("FillerRow")||bIe,S=Gt("TableBodyComponent"),w=Gt("paddingTopAddition"),k=Gt("statefulTotalCount"),T=Gt("context");if(k===0&&b)return P.jsx(b,{...gn(b,T)});const C=(e?t.topItems:[]).reduce((j,B)=>j+B.size,0),E=t.offsetTop+w+m-C,_=t.offsetBottom,$=E>0?P.jsx(O,{context:T,height:E},"padding-top"):null,M=_>0?P.jsx(O,{context:T,height:_},"padding-bottom"):null;return P.jsxs(S,{"data-testid":"virtuoso-item-list",ref:p,...gn(S,T),children:[$,e&&P.jsx(cV,{showTopList:!0}),P.jsx(cV,{}),M]})}),SIe=({children:t})=>{const e=Qe.useContext(RP),r=vs("viewportHeight"),n=vs("fixedItemHeight"),i=ml(Qe.useMemo(()=>Py(r,o=>Ss(o,"height")),[r]),!0,Gt("skipAnimationFrameInResizeObserver"));return Qe.useEffect(()=>{e&&(r(e.viewportHeight),n(e.itemHeight))},[e,r,n]),P.jsx("div",{"data-viewport-type":"element",ref:i,style:Pg(!1),children:t})},xIe=({children:t})=>{const e=Qe.useContext(RP),r=vs("windowViewportRect"),n=vs("fixedItemHeight"),i=Gt("customScrollParent"),o=fA(r,i,Gt("skipAnimationFrameInResizeObserver"));return Qe.useEffect(()=>{e&&(n(e.itemHeight),r({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,r,n]),P.jsx("div",{"data-viewport-type":"window",ref:o,style:Pg(!1),children:t})},PIe=Qe.memo(function(t){const e=Gt("useWindowScroll"),r=Gt("customScrollParent"),n=vs("fixedHeaderHeight"),i=vs("fixedFooterHeight"),o=Gt("fixedHeaderContent"),a=Gt("fixedFooterContent"),s=Gt("context"),l=ml(Qe.useMemo(()=>Py(n,S=>Ss(S,"height")),[n]),!0,Gt("skipAnimationFrameInResizeObserver")),c=ml(Qe.useMemo(()=>Py(i,S=>Ss(S,"height")),[i]),!0,Gt("skipAnimationFrameInResizeObserver")),d=r||e?TIe:CIe,p=r||e?xIe:SIe,g=Gt("TableComponent"),m=Gt("TableHeadComponent"),y=Gt("TableFooterComponent"),b=o?P.jsx(m,{ref:l,style:{position:"sticky",top:0,zIndex:2},...gn(m,s),children:o()},"TableHead"):null,O=a?P.jsx(y,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...gn(y,s),children:a()},"TableFoot"):null;return P.jsx(d,{...t,...gn(d,s),children:P.jsx(p,{children:P.jsxs(g,{style:{borderSpacing:0,overflowAnchor:"none"},...gn(g,s),children:[b,P.jsx(wIe,{},"TableBody"),O]})})})}),{Component:kIe,useEmitter:kA,useEmitterValue:Gt,usePublisher:vs}=bA(vIe,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},PIe),CIe=wA({useEmitter:kA,useEmitterValue:Gt,usePublisher:vs}),TIe=SA({useEmitter:kA,useEmitterValue:Gt,usePublisher:vs}),EIe=kIe,uV={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},_Ie={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:dV,floor:ES,max:Nv,min:aE,round:fV}=Math;function hV(t,e,r){return Array.from({length:e-t+1}).map((n,i)=>({data:r===null?null:r[i+t],index:i+t}))}function RIe(t){return{..._Ie,items:t}}function _O(t,e){return t&&t.width===e.width&&t.height===e.height}function IIe(t,e){return t&&t.column===e.column&&t.row===e.row}const $Ie=Sr(([{increaseViewportBy:t,listBoundary:e,overscan:r,visibleRange:n},{footerHeight:i,headerHeight:o,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:d,viewportHeight:p},g,m,{didMount:y,propsReady:b},{customScrollParent:O,useWindowScroll:S,windowScrollContainerState:w,windowScrollTo:k,windowViewportRect:T},C])=>{const E=Le(0),_=Le(0),$=Le(uV),M=Le({height:0,width:0}),j=Le({height:0,width:0}),B=sr(),V=sr(),X=Le(0),D=Le(null),F=Le({column:0,row:0}),Y=sr(),ie=sr(),H=Le(!1),ne=Le(0),z=Le(!0),N=Le(!1),U=Le(!1);jr(Ie(y,Kt(ne),Tt(([Z,le])=>!!le)),()=>{Xt(z,!1)}),jr(Ie(di(y,z,j,M,ne,N),Tt(([Z,le,Pe,ee,,re])=>Z&&!le&&Pe.height!==0&&ee.height!==0&&!re)),([,,,,Z])=>{Xt(N,!0),gA(1,()=>{Xt(B,Z)}),gl(Ie(c),()=>{Xt(e,[0,0]),Xt(z,!0)})}),ht(Ie(ie,Tt(Z=>Z!=null&&Z.scrollTop>0),Us(0)),_),jr(Ie(y,Kt(ie),Tt(([,Z])=>Z!=null)),([,Z])=>{Z&&(Xt(M,Z.viewport),Xt(j,Z.item),Xt(F,Z.gap),Z.scrollTop>0&&(Xt(H,!0),gl(Ie(c,Np(1)),le=>{Xt(H,!1)}),Xt(l,{top:Z.scrollTop})))}),ht(Ie(M,Ke(({height:Z})=>Z)),p),ht(Ie(di($t(M,_O),$t(j,_O),$t(F,(Z,le)=>Z&&Z.column===le.column&&Z.row===le.row),$t(c)),Ke(([Z,le,Pe,ee])=>({gap:Pe,item:le,scrollTop:ee,viewport:Z}))),Y),ht(Ie(di($t(E),n,$t(F,IIe),$t(j,_O),$t(M,_O),$t(D),$t(_),$t(H),$t(z),$t(ne)),Tt(([,,,,,,,Z])=>!Z),Ke(([Z,[le,Pe],ee,re,ye,ke,Me,,De,Vt])=>{const{column:vr,row:yr}=ee,{height:ur,width:or}=re,{width:Rr}=ye;if(Me===0&&(Z===0||Rr===0))return uV;if(or===0){const qn=mA(Vt,Z),Rl=qn+Math.max(Me-1,0);return RIe(hV(qn,Rl,ke))}const zt=iG(Rr,or,vr);let Tn,zn;De?le===0&&Pe===0&&Me>0?(Tn=0,zn=Me-1):(Tn=zt*ES((le+yr)/(ur+yr)),zn=zt*dV((Pe+yr)/(ur+yr))-1,zn=aE(Z-1,Nv(zn,zt-1)),Tn=aE(zn,Nv(0,Tn))):(Tn=0,zn=-1);const $n=hV(Tn,zn,ke),{bottom:pi,top:io}=pV(ye,ee,re,$n),En=dV(Z/zt),Ii=En*ur+(En-1)*yr-pi;return{bottom:pi,itemHeight:ur,items:$n,itemWidth:or,offsetBottom:Ii,offsetTop:io,top:io}})),$),ht(Ie(D,Tt(Z=>Z!==null),Ke(Z=>Z.length)),E),ht(Ie(di(M,j,$,F),Tt(([Z,le,{items:Pe}])=>Pe.length>0&&le.height!==0&&Z.height!==0),Ke(([Z,le,{items:Pe},ee])=>{const{bottom:re,top:ye}=pV(Z,ee,le,Pe);return[ye,re]}),pn(Ty)),e);const J=Le(!1);ht(Ie(c,Kt(J),Ke(([Z,le])=>le||Z!==0)),J);const Q=ma(Ie(di($,E),Tt(([{items:Z}])=>Z.length>0),Kt(J),Tt(([[Z,le],Pe])=>{const ee=Z.items[Z.items.length-1].index===le-1;return(Pe||Z.bottom>0&&Z.itemHeight>0&&Z.offsetBottom===0&&Z.items.length===le)&&ee}),Ke(([[,Z]])=>Z-1),pn())),q=ma(Ie($t($),Tt(({items:Z})=>Z.length>0&&Z[0].index===0),Us(0),pn())),oe=ma(Ie($t($),Kt(H),Tt(([{items:Z},le])=>Z.length>0&&!le),Ke(([{items:Z}])=>({endIndex:Z[Z.length-1].index,startIndex:Z[0].index})),pn(VZ),mu(0)));ht(oe,m.scrollSeekRangeChanged),ht(Ie(B,Kt(M,j,E,F),Ke(([Z,le,Pe,ee,re])=>{const ye=WZ(Z),{align:ke,behavior:Me,offset:De}=ye;let Vt=ye.index;Vt==="LAST"&&(Vt=ee-1),Vt=Nv(0,Vt,aE(ee-1,Vt));let vr=qR(le,re,Pe,Vt);return ke==="end"?vr=fV(vr-le.height+Pe.height):ke==="center"&&(vr=fV(vr-le.height/2+Pe.height/2)),De&&(vr+=De),{behavior:Me,top:vr}})),l);const Oe=to(Ie($,Ke(Z=>Z.offsetBottom+Z.bottom)),0);return ht(Ie(T,Ke(Z=>({height:Z.visibleHeight,width:Z.visibleWidth}))),M),{customScrollParent:O,data:D,deviation:X,footerHeight:i,gap:F,headerHeight:o,increaseViewportBy:t,initialItemCount:_,itemDimensions:j,overscan:r,restoreStateFrom:ie,scrollBy:a,scrollContainerState:s,scrollHeight:V,scrollTo:l,scrollToIndex:B,scrollTop:c,smoothScrollTargetReached:d,totalCount:E,useWindowScroll:S,viewportDimensions:M,windowScrollContainerState:w,windowScrollTo:k,windowViewportRect:T,...m,gridState:$,horizontalDirection:U,initialTopMostItemIndex:ne,totalListHeight:Oe,...g,endReached:Q,propsReady:b,rangeChanged:oe,startReached:q,stateChanged:Y,stateRestoreInProgress:H,...C}},On(vA,go,Bb,ZZ,sd,yA,ad));function iG(t,e,r){return Nv(1,ES((t+r)/(ES(e)+r)))}function pV(t,e,r,n){const{height:i}=r;if(i===void 0||n.length===0)return{bottom:0,top:0};const o=qR(t,e,r,n[0].index);return{bottom:qR(t,e,r,n[n.length-1].index)+i,top:o}}function qR(t,e,r,n){const i=iG(t.width,r.width,e.column),o=ES(n/i),a=o*r.height+Nv(0,o-1)*e.row;return a>0?a+e.row:a}const AIe=Sr(()=>{const t=Le(p=>`Item ${p}`),e=Le({}),r=Le(null),n=Le("virtuoso-grid-item"),i=Le("virtuoso-grid-list"),o=Le(OA),a=Le("div"),s=Le(xg),l=(p,g=null)=>to(Ie(e,Ke(m=>m[p]),pn()),g),c=Le(!1),d=Le(!1);return ht($t(d),c),{components:e,computeItemKey:o,context:r,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:n,ItemComponent:l("Item","div"),itemContent:t,listClassName:i,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:d,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),MIe=Sr(([t,e])=>({...t,...e}),On($Ie,AIe)),NIe=Qe.memo(function(){const t=Sn("gridState"),e=Sn("listClassName"),r=Sn("itemClassName"),n=Sn("itemContent"),i=Sn("computeItemKey"),o=Sn("isSeeking"),a=Qa("scrollHeight"),s=Sn("ItemComponent"),l=Sn("ListComponent"),c=Sn("ScrollSeekPlaceholder"),d=Sn("context"),p=Qa("itemDimensions"),g=Qa("gap"),m=Sn("log"),y=Sn("stateRestoreInProgress"),b=Qa("reportReadyState"),O=ml(Qe.useMemo(()=>S=>{const w=S.parentElement.parentElement.scrollHeight;a(w);const k=S.firstChild;if(k){const{height:T,width:C}=k.getBoundingClientRect();p({height:T,width:C})}g({column:gV("column-gap",getComputedStyle(S).columnGap,m),row:gV("row-gap",getComputedStyle(S).rowGap,m)})},[a,p,g,m]),!0,!1);return JZ(()=>{t.itemHeight>0&&t.itemWidth>0&&b(!0)},[t]),y?null:P.jsx(l,{className:e,ref:O,...gn(l,d),"data-testid":"virtuoso-item-list",style:{paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},children:t.items.map(S=>{const w=i(S.index,S.data,d);return o?P.jsx(c,{...gn(c,d),height:t.itemHeight,index:S.index,width:t.itemWidth},w):A.createElement(s,{...gn(s,d),className:r,"data-index":S.index,key:w},n(S.index,S.data,d))})})}),jIe=Qe.memo(function(){const t=Sn("HeaderComponent"),e=Qa("headerHeight"),r=Sn("headerFooterTag"),n=ml(Qe.useMemo(()=>o=>{e(Ss(o,"height"))},[e]),!0,!1),i=Sn("context");return t?P.jsx(r,{ref:n,children:P.jsx(t,{...gn(t,i)})}):null}),DIe=Qe.memo(function(){const t=Sn("FooterComponent"),e=Qa("footerHeight"),r=Sn("headerFooterTag"),n=ml(Qe.useMemo(()=>o=>{e(Ss(o,"height"))},[e]),!0,!1),i=Sn("context");return t?P.jsx(r,{ref:n,children:P.jsx(t,{...gn(t,i)})}):null}),LIe=({children:t})=>{const e=Qe.useContext(KZ),r=Qa("itemDimensions"),n=Qa("viewportDimensions"),i=ml(Qe.useMemo(()=>o=>{n(o.getBoundingClientRect())},[n]),!0,!1);return Qe.useEffect(()=>{e&&(n({height:e.viewportHeight,width:e.viewportWidth}),r({height:e.itemHeight,width:e.itemWidth}))},[e,n,r]),P.jsx("div",{ref:i,style:Pg(!1),children:t})},QIe=({children:t})=>{const e=Qe.useContext(KZ),r=Qa("windowViewportRect"),n=Qa("itemDimensions"),i=Sn("customScrollParent"),o=fA(r,i,!1);return Qe.useEffect(()=>{e&&(n({height:e.itemHeight,width:e.itemWidth}),r({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:e.viewportWidth}))},[e,r,n]),P.jsx("div",{ref:o,style:Pg(!1),children:t})},VIe=Qe.memo(function({...t}){const e=Sn("useWindowScroll"),r=Sn("customScrollParent"),n=r||e?BIe:FIe,i=r||e?QIe:LIe,o=Sn("context");return P.jsx(n,{...t,...gn(n,o),children:P.jsxs(i,{children:[P.jsx(jIe,{}),P.jsx(NIe,{}),P.jsx(DIe,{})]})})}),{useEmitter:oG,useEmitterValue:Sn,usePublisher:Qa}=bA(MIe,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},VIe),FIe=wA({useEmitter:oG,useEmitterValue:Sn,usePublisher:Qa}),BIe=SA({useEmitter:oG,useEmitterValue:Sn,usePublisher:Qa});function gV(t,e,r){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&r(`${t} was not resolved to pixel value correctly`,e,Qo.WARN),e==="normal"?0:parseInt(e??"0",10)}const zIe=Ae`
|
|
1080
|
+
`,rRe=async t=>{const e=await _r.mutate({mutation:tRe,variables:t});if(!e.data)throw e.errors;return e.data};class nRe{constructor(e,r,n,i,o){this.rootStore=e,this.organizationId=r,this.projectName=n,this.branchName=i,this.fromRevisionId=o}get projectVariables(){return{organizationId:this.organizationId,projectName:this.projectName,branchName:this.branchName,fromRevisionId:this.fromRevisionId}}async execute(){const e=await this.createProjectRequest();return await this.refetchProjectsConnection(),e}async createProjectRequest(){const{createProject:e}=await rRe({data:this.projectVariables});return this.addProjectToCache(e)}addProjectToCache(e){const r=this.rootStore.cache.addProject(eZ(e));return this.rootStore.cache.addProjectByVariables(this.projectVariables,r.id),r}async refetchProjectsConnection(){await this.rootStore.backend.queryMeProjects({first:100})}}class iRe{constructor(e,r){fe(this,"projectName","");fe(this,"branchName","");fe(this,"fromRevisionId","");fe(this,"showingSettings",!1);this.rootStore=e,this.authService=r,lt(this)}get organizationId(){var r;const e=(r=this.authService.user)==null?void 0:r.organizationId;if(!e)throw new Error("Not found organizationId");return e}setProjectName(e){this.projectName=e}setBranchName(e){this.branchName=e}setFromRevisionId(e){this.fromRevisionId=e}setShowingSettings(e){this.showingSettings=e}async create(){try{await new nRe(this.rootStore,this.organizationId,this.projectName,this.branchName,this.fromRevisionId).execute()}catch(e){console.error(e)}}init(){}dispose(){}}const oRe=()=>{const[t]=A.useState(()=>{const e=ft.get(ho);return new iRe(gt,e)});return A.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t},aRe=({onClick:t,color:e,dataTestId:r})=>P.jsx(Ti,{_hover:{backgroundColor:"gray.100"},"data-testid":r,"aria-label":"",color:e||"gray.400",variant:"ghost",onClick:t,children:P.jsx(gP,{})}),sRe=mt(({onCancel:t,onAdd:e})=>{const r=oRe(),[n,i]=A.useState(!1),o=A.useCallback(async()=>{i(!0),await r.create(),i(!1),e==null||e()},[e,r]),a=A.useCallback(d=>{r.setProjectName(d.currentTarget.value)},[r]),s=A.useCallback(d=>{r.setBranchName(d.currentTarget.value)},[r]),l=A.useCallback(d=>{r.setFromRevisionId(d.currentTarget.value)},[r]),c=A.useCallback(()=>{r.setShowingSettings(!r.showingSettings)},[r]);return P.jsxs(Te,{alignSelf:"flex-start",gap:"0.5rem",children:[P.jsx(Nb,{onClick:t}),P.jsxs(Te,{flexDirection:"column",gap:"0.5rem",children:[P.jsx(nc,{dataTestId:"create-project-name-input",autoFocus:!0,height:"40px",placeholder:"project name",value:r.projectName,onChange:a,onEnter:o}),r.projectName&&r.showingSettings&&P.jsxs(P.Fragment,{children:[P.jsx(nc,{dataTestId:"create-project-branch-name-input",height:"40px",placeholder:"branch name",value:r.branchName,onChange:s,onEnter:o}),P.jsx(nc,{dataTestId:"create-project-from-revision-id-input",height:"40px",placeholder:"from revisionId",value:r.fromRevisionId,onChange:l,onEnter:o})]})]}),r.projectName&&P.jsxs(P.Fragment,{children:[P.jsx(Mb,{dataTestId:"create-project-approve-button",loading:n,onClick:o}),P.jsx(aRe,{dataTestId:"create-project-settings-button",color:r.showingSettings?"gray.400":"gray.200",onClick:c})]})]})}),CP=0,od=1,Sg=2,$Z=4;function Z4(t){return()=>t}function lRe(t){t()}function Py(t,e){return r=>t(e(r))}function G4(t,e){return()=>t(e)}function cRe(t,e){return r=>t(e,r)}function cA(t){return t!==void 0}function uRe(...t){return()=>{t.map(lRe)}}function xg(){}function TP(t,e){return e(t),t}function dRe(t,e){return e(t)}function On(...t){return t}function jr(t,e){return t(od,e)}function Xt(t,e){t(CP,e)}function uA(t){t(Sg)}function xi(t){return t($Z)}function ht(t,e){return jr(t,cRe(e,CP))}function gl(t,e){const r=t(od,n=>{r(),e(n)});return r}function Y4(t){let e,r;return n=>i=>{e=i,r&&clearTimeout(r),r=setTimeout(()=>{n(e)},t)}}function AZ(t,e){return t===e}function pn(t=AZ){let e;return r=>n=>{t(e,n)||(e=n,r(n))}}function Tt(t){return e=>r=>{t(r)&&e(r)}}function Ke(t){return e=>Py(e,t)}function Us(t){return e=>()=>{e(t)}}function Ie(t,...e){const r=fRe(...e);return(n,i)=>{switch(n){case Sg:uA(t);return;case od:return jr(t,r(i))}}}function Ys(t,e){return r=>n=>{r(e=t(e,n))}}function Np(t){return e=>r=>{t>0?t--:e(r)}}function mu(t){let e=null,r;return n=>i=>{e=i,!r&&(r=setTimeout(()=>{r=void 0,n(e)},t))}}function Kt(...t){const e=new Array(t.length);let r=0,n=null;const i=Math.pow(2,t.length)-1;return t.forEach((o,a)=>{const s=Math.pow(2,a);jr(o,l=>{const c=r;r=r|s,e[a]=l,c!==i&&r===i&&n&&(n(),n=null)})}),o=>a=>{const s=()=>{o([a].concat(e))};r===i?s():n=s}}function fRe(...t){return e=>t.reduceRight(dRe,e)}function hRe(t){let e,r;const n=()=>e==null?void 0:e();return function(i,o){switch(i){case od:return o?r===o?void 0:(n(),r=o,e=jr(t,o),e):(n(),xg);case Sg:n(),r=null;return}}}function Le(t){let e=t;const r=sr();return(n,i)=>{switch(n){case CP:e=i;break;case od:{i(e);break}case $Z:return e}return r(n,i)}}function to(t,e){return TP(Le(e),r=>ht(t,r))}function sr(){const t=[];return(e,r)=>{switch(e){case CP:t.slice().forEach(n=>{n(r)});return;case Sg:t.splice(0,t.length);return;case od:return t.push(r),()=>{const n=t.indexOf(r);n>-1&&t.splice(n,1)}}}}function ma(t){return TP(sr(),e=>ht(t,e))}function Sr(t,e=[],{singleton:r}={singleton:!0}){return{constructor:t,dependencies:e,id:pRe(),singleton:r}}const pRe=()=>Symbol();function gRe(t){const e=new Map,r=({constructor:n,dependencies:i,id:o,singleton:a})=>{if(a&&e.has(o))return e.get(o);const s=n(i.map(l=>r(l)));return a&&e.set(o,s),s};return r(t)}function di(...t){const e=sr(),r=new Array(t.length);let n=0;const i=Math.pow(2,t.length)-1;return t.forEach((o,a)=>{const s=Math.pow(2,a);jr(o,l=>{r[a]=l,n=n|s,n===i&&Xt(e,r)})}),function(o,a){switch(o){case Sg:{uA(e);return}case od:return n===i&&a(r),jr(e,a)}}}function $t(t,e=AZ){return Ie(t,pn(e))}function K4(...t){return function(e,r){switch(e){case Sg:return;case od:return uRe(...t.map(n=>jr(n,r)))}}}var Qo=(t=>(t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR",t))(Qo||{});const mRe={0:"debug",3:"error",1:"log",2:"warn"},vRe=()=>typeof globalThis>"u"?window:globalThis,ad=Sr(()=>{const t=Le(3);return{log:Le((e,r,n=1)=>{var i;const o=(i=vRe().VIRTUOSO_LOG_LEVEL)!=null?i:xi(t);n>=o&&console[mRe[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",e,r)}),logLevel:t}},[],{singleton:!0});function ml(t,e,r){return dA(t,e,r).callbackRef}function dA(t,e,r){const n=Qe.useRef(null);let i=a=>{};const o=Qe.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&t(l)};r?s():requestAnimationFrame(s)}):null,[t,r]);return i=a=>{a&&e?(o==null||o.observe(a),n.current=a):(n.current&&(o==null||o.unobserve(n.current)),n.current=null)},{callbackRef:i,ref:n}}function MZ(t,e,r,n,i,o,a,s,l){const c=Qe.useCallback(d=>{const p=yRe(d.children,e,s?"offsetWidth":"offsetHeight",i);let g=d.parentElement;for(;!g.dataset.virtuosoScroller;)g=g.parentElement;const m=g.lastElementChild.dataset.viewportType==="window";let y;m&&(y=g.ownerDocument.defaultView);const b=a?s?a.scrollLeft:a.scrollTop:m?s?y.scrollX||y.document.documentElement.scrollLeft:y.scrollY||y.document.documentElement.scrollTop:s?g.scrollLeft:g.scrollTop,O=a?s?a.scrollWidth:a.scrollHeight:m?s?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight:s?g.scrollWidth:g.scrollHeight,S=a?s?a.offsetWidth:a.offsetHeight:m?s?y.innerWidth:y.innerHeight:s?g.offsetWidth:g.offsetHeight;n({scrollHeight:O,scrollTop:Math.max(b,0),viewportHeight:S}),o==null||o(s?J4("column-gap",getComputedStyle(d).columnGap,i):J4("row-gap",getComputedStyle(d).rowGap,i)),p!==null&&t(p)},[t,e,i,o,a,n,s]);return dA(c,r,l)}function yRe(t,e,r,n){const i=t.length;if(i===0)return null;const o=[];for(let a=0;a<i;a++){const s=t.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),d=e(s,r);if(d===0&&n("Zero-sized element, this should not happen",{child:s},Qo.ERROR),d===c)continue;const p=o[o.length-1];o.length===0||p.size!==d||p.endIndex!==l-1?o.push({endIndex:l,size:d,startIndex:l}):o[o.length-1].endIndex++}return o}function J4(t,e,r){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&r(`${t} was not resolved to pixel value correctly`,e,Qo.WARN),e==="normal"?0:parseInt(e??"0",10)}function fA(t,e,r){const n=Qe.useRef(null),i=Qe.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),d=c.width;let p,g;if(e){const m=e.getBoundingClientRect(),y=c.top-m.top;g=m.height-Math.max(0,y),p=y+e.scrollTop}else{const m=a.current.ownerDocument.defaultView;g=m.innerHeight-Math.max(0,c.top),p=c.top+m.scrollY}n.current={offsetTop:p,visibleHeight:g,visibleWidth:d},t(n.current)},[t,e]),{callbackRef:o,ref:a}=dA(i,!0,r),s=Qe.useCallback(()=>{i(a.current)},[i,a]);return Qe.useEffect(()=>{var l;if(e){e.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(e),()=>{e.removeEventListener("scroll",s),c.unobserve(e)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,e,a]),o}const go=Sr(()=>{const t=sr(),e=sr(),r=Le(0),n=sr(),i=Le(0),o=sr(),a=sr(),s=Le(0),l=Le(0),c=Le(0),d=Le(0),p=sr(),g=sr(),m=Le(!1),y=Le(!1),b=Le(!1);return ht(Ie(t,Ke(({scrollTop:O})=>O)),e),ht(Ie(t,Ke(({scrollHeight:O})=>O)),a),ht(e,i),{deviation:r,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:d,headerHeight:s,horizontalDirection:y,scrollBy:g,scrollContainerState:t,scrollHeight:a,scrollingInProgress:m,scrollTo:p,scrollTop:e,skipAnimationFrameInResizeObserver:b,smoothScrollTargetReached:n,statefulScrollTop:i,viewportHeight:o}},[],{singleton:!0}),ky={lvl:0};function NZ(t,e){const r=t.length;if(r===0)return[];let{index:n,value:i}=e(t[0]);const o=[];for(let a=1;a<r;a++){const{index:s,value:l}=e(t[a]);o.push({end:s-1,start:n,value:i}),n=s,i=l}return o.push({end:1/0,start:n,value:i}),o}function Wr(t){return t===ky}function Cy(t,e){if(!Wr(t))return e===t.k?t.v:e<t.k?Cy(t.l,e):Cy(t.r,e)}function ws(t,e,r="k"){if(Wr(t))return[-1/0,void 0];if(Number(t[r])===e)return[t.k,t.v];if(Number(t[r])<e){const n=ws(t.r,e,r);return n[0]===-1/0?[t.k,t.v]:n}return ws(t.l,e,r)}function da(t,e,r){return Wr(t)?LZ(e,r,1):e===t.k?li(t,{k:e,v:r}):e<t.k?eV(li(t,{l:da(t.l,e,r)})):eV(li(t,{r:da(t.r,e,r)}))}function fp(){return ky}function EP(t,e,r){if(Wr(t))return[];const n=ws(t,e)[0];return bRe(FR(t,n,r))}function VR(t,e){if(Wr(t))return ky;const{k:r,l:n,r:i}=t;if(e===r){if(Wr(n))return i;if(Wr(i))return n;{const[o,a]=DZ(n);return x1(li(t,{k:o,l:jZ(n),v:a}))}}else return e<r?x1(li(t,{l:VR(n,e)})):x1(li(t,{r:VR(i,e)}))}function Gd(t){return Wr(t)?[]:[...Gd(t.l),{k:t.k,v:t.v},...Gd(t.r)]}function FR(t,e,r){if(Wr(t))return[];const{k:n,l:i,r:o,v:a}=t;let s=[];return n>e&&(s=s.concat(FR(i,e,r))),n>=e&&n<=r&&s.push({k:n,v:a}),n<=r&&(s=s.concat(FR(o,e,r))),s}function x1(t){const{l:e,lvl:r,r:n}=t;if(n.lvl>=r-1&&e.lvl>=r-1)return t;if(r>n.lvl+1){if(rE(e))return QZ(li(t,{lvl:r-1}));if(!Wr(e)&&!Wr(e.r))return li(e.r,{l:li(e,{r:e.r.l}),lvl:r,r:li(t,{l:e.r.r,lvl:r-1})});throw new Error("Unexpected empty nodes")}else{if(rE(t))return BR(li(t,{lvl:r-1}));if(!Wr(n)&&!Wr(n.l)){const i=n.l,o=rE(i)?n.lvl-1:n.lvl;return li(i,{l:li(t,{lvl:r-1,r:i.l}),lvl:i.lvl+1,r:BR(li(n,{l:i.r,lvl:o}))})}else throw new Error("Unexpected empty nodes")}}function li(t,e){return LZ(e.k!==void 0?e.k:t.k,e.v!==void 0?e.v:t.v,e.lvl!==void 0?e.lvl:t.lvl,e.l!==void 0?e.l:t.l,e.r!==void 0?e.r:t.r)}function jZ(t){return Wr(t.r)?t.l:x1(li(t,{r:jZ(t.r)}))}function rE(t){return Wr(t)||t.lvl>t.r.lvl}function DZ(t){return Wr(t.r)?[t.k,t.v]:DZ(t.r)}function LZ(t,e,r,n=ky,i=ky){return{k:t,l:n,lvl:r,r:i,v:e}}function eV(t){return BR(QZ(t))}function QZ(t){const{l:e}=t;return!Wr(e)&&e.lvl===t.lvl?li(e,{r:li(t,{l:e.r})}):t}function BR(t){const{lvl:e,r}=t;return!Wr(r)&&!Wr(r.r)&&r.lvl===e&&r.r.lvl===e?li(r,{l:li(t,{r:r.l}),lvl:e+1}):t}function bRe(t){return NZ(t,({k:e,v:r})=>({index:e,value:r}))}function VZ(t,e){return!!(t&&t.startIndex===e.startIndex&&t.endIndex===e.endIndex)}function Ty(t,e){return!!(t&&t[0]===e[0]&&t[1]===e[1])}const hA=Sr(()=>({recalcInProgress:Le(!1)}),[],{singleton:!0});function FZ(t,e,r){return t[kS(t,e,r)]}function kS(t,e,r,n=0){let i=t.length-1;for(;n<=i;){const o=Math.floor((n+i)/2),a=t[o],s=r(a,e);if(s===0)return o;if(s===-1){if(i-n<2)return o-1;i=o-1}else{if(i===n)return o;n=o+1}}throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`)}function ORe(t,e,r,n){const i=kS(t,e,n),o=kS(t,r,n,i);return t.slice(i,o+1)}function Ss(t,e){return Math.round(t.getBoundingClientRect()[e])}function _P(t){return!Wr(t.groupOffsetTree)}function pA({index:t},e){return e===t?0:e<t?-1:1}function wRe(){return{groupIndices:[],groupOffsetTree:fp(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:fp()}}function SRe(t,e){let r=Wr(t)?0:1/0;for(const n of e){const{endIndex:i,size:o,startIndex:a}=n;if(r=Math.min(r,a),Wr(t)){t=da(t,0,o);continue}const s=EP(t,a-1,i+1);if(s.some(_Re(n)))continue;let l=!1,c=!1;for(const{end:d,start:p,value:g}of s)l?(i>=p||o===g)&&(t=VR(t,p)):(c=g!==o,l=!0),d>i&&i>=p&&g!==o&&(t=da(t,i+1,g));c&&(t=da(t,a,o))}return[t,r]}function xRe(t){return typeof t.groupIndex<"u"}function PRe({offset:t},e){return e===t?0:e<t?-1:1}function Ey(t,e,r){if(e.length===0)return 0;const{index:n,offset:i,size:o}=FZ(e,t,pA),a=t-n,s=o*a+(a-1)*r+i;return s>0?s+r:s}function BZ(t,e){if(!_P(e))return t;let r=0;for(;e.groupIndices[r]<=t+r;)r++;return t+r}function zZ(t,e,r){if(xRe(t))return e.groupIndices[t.groupIndex]+1;{const n=t.index==="LAST"?r:t.index;let i=BZ(n,e);return i=Math.max(0,i,Math.min(r,i)),i}}function kRe(t,e,r,n=0){return n>0&&(e=Math.max(e,FZ(t,n,pA).offset)),NZ(ORe(t,e,r,PRe),ERe)}function CRe(t,[e,r,n,i]){e.length>0&&n("received item sizes",e,Qo.DEBUG);const o=t.sizeTree;let a=o,s=0;if(r.length>0&&Wr(o)&&e.length===2){const g=e[0].size,m=e[1].size;a=r.reduce((y,b)=>da(da(y,b,g),b+1,m),a)}else[a,s]=SRe(a,e);if(a===o)return t;const{lastIndex:l,lastOffset:c,lastSize:d,offsetTree:p}=zR(t.offsetTree,s,a,i);return{groupIndices:r,groupOffsetTree:r.reduce((g,m)=>da(g,m,Ey(m,p,i)),fp()),lastIndex:l,lastOffset:c,lastSize:d,offsetTree:p,sizeTree:a}}function TRe(t){return Gd(t).map(({k:e,v:r},n,i)=>{const o=i[n+1];return{endIndex:o?o.k-1:1/0,size:r,startIndex:e}})}function tV(t,e){let r=0,n=0;for(;r<t;)r+=e[n+1]-e[n]-1,n++;return n-(r===t?0:1)}function zR(t,e,r,n){let i=t,o=0,a=0,s=0,l=0;if(e!==0){l=kS(i,e-1,pA),s=i[l].offset;const c=ws(r,e-1);o=c[0],a=c[1],i.length&&i[l].size===ws(r,e)[1]&&(l-=1),i=i.slice(0,l+1)}else i=[];for(const{start:c,value:d}of EP(r,e,1/0)){const p=c-o,g=p*a+s+p*n;i.push({index:c,offset:g,size:d}),o=c,s=g,a=d}return{lastIndex:o,lastOffset:s,lastSize:a,offsetTree:i}}function ERe(t){return{index:t.index,value:t}}function _Re(t){const{endIndex:e,size:r,startIndex:n}=t;return i=>i.start===n&&(i.end===e||i.end===1/0)&&i.value===r}const RRe={offsetHeight:"height",offsetWidth:"width"},kl=Sr(([{log:t},{recalcInProgress:e}])=>{const r=sr(),n=sr(),i=to(n,0),o=sr(),a=sr(),s=Le(0),l=Le([]),c=Le(void 0),d=Le(void 0),p=Le((C,E)=>Ss(C,RRe[E])),g=Le(void 0),m=Le(0),y=wRe(),b=to(Ie(r,Kt(l,t,m),Ys(CRe,y),pn()),y),O=to(Ie(l,pn(),Ys((C,E)=>({current:E,prev:C.current}),{current:[],prev:[]}),Ke(({prev:C})=>C)),[]);ht(Ie(l,Tt(C=>C.length>0),Kt(b,m),Ke(([C,E,_])=>{const $=C.reduce((M,j,B)=>da(M,j,Ey(j,E.offsetTree,_)||B),fp());return{...E,groupIndices:C,groupOffsetTree:$}})),b),ht(Ie(n,Kt(b),Tt(([C,{lastIndex:E}])=>C<E),Ke(([C,{lastIndex:E,lastSize:_}])=>[{endIndex:E,size:_,startIndex:C}])),r),ht(c,d);const S=to(Ie(c,Ke(C=>C===void 0)),!0);ht(Ie(d,Tt(C=>C!==void 0&&Wr(xi(b).sizeTree)),Ke(C=>[{endIndex:0,size:C,startIndex:0}])),r);const w=ma(Ie(r,Kt(b),Ys(({sizes:C},[E,_])=>({changed:_!==C,sizes:_}),{changed:!1,sizes:y}),Ke(C=>C.changed)));jr(Ie(s,Ys((C,E)=>({diff:C.prev-E,prev:E}),{diff:0,prev:0}),Ke(C=>C.diff)),C=>{const{groupIndices:E}=xi(b);if(C>0)Xt(e,!0),Xt(o,C+tV(C,E));else if(C<0){const _=xi(O);_.length>0&&(C-=tV(-C,_)),Xt(a,C)}}),jr(Ie(s,Kt(t)),([C,E])=>{C<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},Qo.ERROR)});const k=ma(o);ht(Ie(o,Kt(b),Ke(([C,E])=>{const _=E.groupIndices.length>0,$=[],M=E.lastSize;if(_){const j=Cy(E.sizeTree,0);let B=0,V=0;for(;B<C;){const D=E.groupIndices[V],F=E.groupIndices.length===V+1?1/0:E.groupIndices[V+1]-D-1;$.push({endIndex:D,size:j,startIndex:D}),$.push({endIndex:D+1+F-1,size:M,startIndex:D+1}),V++,B+=F+1}const X=Gd(E.sizeTree);return B!==C&&X.shift(),X.reduce((D,{k:F,v:Y})=>{let ie=D.ranges;return D.prevSize!==0&&(ie=[...D.ranges,{endIndex:F+C-1,size:D.prevSize,startIndex:D.prevIndex}]),{prevIndex:F+C,prevSize:Y,ranges:ie}},{prevIndex:C,prevSize:0,ranges:$}).ranges}return Gd(E.sizeTree).reduce((j,{k:B,v:V})=>({prevIndex:B+C,prevSize:V,ranges:[...j.ranges,{endIndex:B+C-1,size:j.prevSize,startIndex:j.prevIndex}]}),{prevIndex:0,prevSize:M,ranges:[]}).ranges})),r);const T=ma(Ie(a,Kt(b,m),Ke(([C,{offsetTree:E},_])=>{const $=-C;return Ey($,E,_)})));return ht(Ie(a,Kt(b,m),Ke(([C,E,_])=>{if(E.groupIndices.length>0){if(Wr(E.sizeTree))return E;let $=fp();const M=xi(O);let j=0,B=0,V=0;for(;j<-C;){V=M[B];const X=M[B+1]-V-1;B++,j+=X+1}if($=Gd(E.sizeTree).reduce((X,{k:D,v:F})=>da(X,Math.max(0,D+C),F),$),j!==-C){const X=Cy(E.sizeTree,V);$=da($,0,X);const D=ws(E.sizeTree,-C+1)[1];$=da($,1,D)}return{...E,sizeTree:$,...zR(E.offsetTree,0,$,_)}}else{const $=Gd(E.sizeTree).reduce((M,{k:j,v:B})=>da(M,Math.max(0,j+C),B),fp());return{...E,sizeTree:$,...zR(E.offsetTree,0,$,_)}}})),b),{beforeUnshiftWith:k,data:g,defaultItemSize:d,firstItemIndex:s,fixedItemSize:c,gap:m,groupIndices:l,itemSize:p,listRefresh:w,shiftWith:a,shiftWithOffset:T,sizeRanges:r,sizes:b,statefulTotalCount:i,totalCount:n,trackItemSizes:S,unshiftWith:o}},On(ad,hA),{singleton:!0});function IRe(t){return t.reduce((e,r)=>(e.groupIndices.push(e.totalCount),e.totalCount+=r+1,e),{groupIndices:[],totalCount:0})}const qZ=Sr(([{groupIndices:t,sizes:e,totalCount:r},{headerHeight:n,scrollTop:i}])=>{const o=sr(),a=sr(),s=ma(Ie(o,Ke(IRe)));return ht(Ie(s,Ke(l=>l.totalCount)),r),ht(Ie(s,Ke(l=>l.groupIndices)),t),ht(Ie(di(i,e,n),Tt(([l,c])=>_P(c)),Ke(([l,c,d])=>ws(c.groupOffsetTree,Math.max(l-d,0),"v")[0]),pn(),Ke(l=>[l])),a),{groupCounts:o,topItemsIndexes:a}},On(kl,go)),sd=Sr(([{log:t}])=>{const e=Le(!1),r=ma(Ie(e,Tt(n=>n),pn()));return jr(e,n=>{n&&xi(t)("props updated",{},Qo.DEBUG)}),{didMount:r,propsReady:e}},On(ad),{singleton:!0}),$Re=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function WZ(t){const e=typeof t=="number"?{index:t}:t;return e.align||(e.align="start"),(!e.behavior||!$Re)&&(e.behavior="auto"),e.offset||(e.offset=0),e}const Vb=Sr(([{gap:t,listRefresh:e,sizes:r,totalCount:n},{fixedFooterHeight:i,fixedHeaderHeight:o,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:d,viewportHeight:p},{log:g}])=>{const m=sr(),y=sr(),b=Le(0);let O=null,S=null,w=null;function k(){O&&(O(),O=null),w&&(w(),w=null),S&&(clearTimeout(S),S=null),Xt(l,!1)}return ht(Ie(m,Kt(r,p,n,b,s,a,g),Kt(t,o,i),Ke(([[T,C,E,_,$,M,j,B],V,X,D])=>{const F=WZ(T),{align:Y,behavior:ie,offset:H}=F,ne=_-1,z=zZ(F,C,ne);let N=Ey(z,C.offsetTree,V)+M;Y==="end"?(N+=X+ws(C.sizeTree,z)[1]-E+D,z===ne&&(N+=j)):Y==="center"?N+=(X+ws(C.sizeTree,z)[1]-E+D)/2:N-=$,H&&(N+=H);const U=J=>{k(),J?(B("retrying to scroll to",{location:T},Qo.DEBUG),Xt(m,T)):(Xt(y,!0),B("list did not change, scroll successful",{},Qo.DEBUG))};if(k(),ie==="smooth"){let J=!1;w=jr(e,Q=>{J=J||Q}),O=gl(d,()=>{U(J)})}else O=gl(Ie(e,ARe(150)),U);return S=setTimeout(()=>{k()},1200),Xt(l,!0),B("scrolling from index to",{behavior:ie,index:z,top:N},Qo.DEBUG),{behavior:ie,top:N}})),c),{scrollTargetReached:y,scrollToIndex:m,topListHeight:b}},On(kl,go,ad),{singleton:!0});function ARe(t){return e=>{const r=setTimeout(()=>{e(!1)},t);return n=>{n&&(e(!0),clearTimeout(r))}}}function gA(t,e){t==0?e():requestAnimationFrame(()=>{gA(t-1,e)})}function mA(t,e){const r=e-1;return typeof t=="number"?t:t.index==="LAST"?r:t.index}const Fb=Sr(([{defaultItemSize:t,listRefresh:e,sizes:r},{scrollTop:n},{scrollTargetReached:i,scrollToIndex:o},{didMount:a}])=>{const s=Le(!0),l=Le(0),c=Le(!0);return ht(Ie(a,Kt(l),Tt(([d,p])=>!!p),Us(!1)),s),ht(Ie(a,Kt(l),Tt(([d,p])=>!!p),Us(!1)),c),jr(Ie(di(e,a),Kt(s,r,t,c),Tt(([[,d],p,{sizeTree:g},m,y])=>d&&(!Wr(g)||cA(m))&&!p&&!y),Kt(l)),([,d])=>{gl(i,()=>{Xt(c,!0)}),gA(4,()=>{gl(n,()=>{Xt(s,!0)}),Xt(o,d)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},On(kl,go,Vb,sd),{singleton:!0});function UZ(t,e){return Math.abs(t-e)<1.01}const _y="up",Mv="down",MRe="none",NRe={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},jRe=0,Bb=Sr(([{footerHeight:t,headerHeight:e,scrollBy:r,scrollContainerState:n,scrollTop:i,viewportHeight:o}])=>{const a=Le(!1),s=Le(!0),l=sr(),c=sr(),d=Le(4),p=Le(jRe),g=to(Ie(K4(Ie($t(i),Np(1),Us(!0)),Ie($t(i),Np(1),Us(!1),Y4(100))),pn()),!1),m=to(Ie(K4(Ie(r,Us(!0)),Ie(r,Us(!1),Y4(200))),pn()),!1);ht(Ie(di($t(i),$t(p)),Ke(([w,k])=>w<=k),pn()),s),ht(Ie(s,mu(50)),c);const y=ma(Ie(di(n,$t(o),$t(e),$t(t),$t(d)),Ys((w,[{scrollHeight:k,scrollTop:T},C,E,_,$])=>{const M=T+C-k>-$,j={scrollHeight:k,scrollTop:T,viewportHeight:C};if(M){let V,X;return T>w.state.scrollTop?(V="SCROLLED_DOWN",X=w.state.scrollTop-T):(V="SIZE_DECREASED",X=w.state.scrollTop-T||w.scrollTopDelta),{atBottom:!0,atBottomBecause:V,scrollTopDelta:X,state:j}}let B;return j.scrollHeight>w.state.scrollHeight?B="SIZE_INCREASED":C<w.state.viewportHeight?B="VIEWPORT_HEIGHT_DECREASING":T<w.state.scrollTop?B="SCROLLING_UPWARDS":B="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:B,state:j}},NRe),pn((w,k)=>w&&w.atBottom===k.atBottom))),b=to(Ie(n,Ys((w,{scrollHeight:k,scrollTop:T,viewportHeight:C})=>{if(UZ(w.scrollHeight,k))return{changed:!1,jump:0,scrollHeight:k,scrollTop:T};{const E=k-(T+C)<1;return w.scrollTop!==T&&E?{changed:!0,jump:w.scrollTop-T,scrollHeight:k,scrollTop:T}:{changed:!0,jump:0,scrollHeight:k,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Tt(w=>w.changed),Ke(w=>w.jump)),0);ht(Ie(y,Ke(w=>w.atBottom)),a),ht(Ie(a,mu(50)),l);const O=Le(Mv);ht(Ie(n,Ke(({scrollTop:w})=>w),pn(),Ys((w,k)=>xi(m)?{direction:w.direction,prevScrollTop:k}:{direction:k<w.prevScrollTop?_y:Mv,prevScrollTop:k},{direction:Mv,prevScrollTop:0}),Ke(w=>w.direction)),O),ht(Ie(n,mu(50),Us(MRe)),O);const S=Le(0);return ht(Ie(g,Tt(w=>!w),Us(0)),S),ht(Ie(i,mu(100),Kt(g),Tt(([w,k])=>!!k),Ys(([w,k],[T])=>[k,T],[0,0]),Ke(([w,k])=>k-w)),S),{atBottomState:y,atBottomStateChange:l,atBottomThreshold:d,atTopStateChange:c,atTopThreshold:p,isAtBottom:a,isAtTop:s,isScrolling:g,lastJumpDueToItemResize:b,scrollDirection:O,scrollVelocity:S}},On(go)),CS="top",TS="bottom",rV="none";function nV(t,e,r){return typeof t=="number"?r===_y&&e===CS||r===Mv&&e===TS?t:0:r===_y?e===CS?t.main:t.reverse:e===TS?t.main:t.reverse}function iV(t,e){var r;return typeof t=="number"?t:(r=t[e])!=null?r:0}const vA=Sr(([{deviation:t,fixedHeaderHeight:e,headerHeight:r,scrollTop:n,viewportHeight:i}])=>{const o=sr(),a=Le(0),s=Le(0),l=Le(0),c=to(Ie(di($t(n),$t(i),$t(r),$t(o,Ty),$t(l),$t(a),$t(e),$t(t),$t(s)),Ke(([d,p,g,[m,y],b,O,S,w,k])=>{const T=d-w,C=O+S,E=Math.max(g-T,0);let _=rV;const $=iV(k,CS),M=iV(k,TS);return m-=w,m+=g+S,y+=g+S,y-=w,m>d+C-$&&(_=_y),y<d-E+p+M&&(_=Mv),_!==rV?[Math.max(T-g-nV(b,CS,_)-$,0),T-E-S+p+nV(b,TS,_)+M]:null}),Tt(d=>d!=null),pn(Ty)),[0,0]);return{increaseViewportBy:s,listBoundary:o,overscan:l,topListHeight:a,visibleRange:c}},On(go),{singleton:!0});function DRe(t,e,r){if(_P(e)){const n=BZ(t,e);return[{index:ws(e.groupOffsetTree,n)[0],offset:0,size:0},{data:r==null?void 0:r[0],index:n,offset:0,size:0}]}return[{data:r==null?void 0:r[0],index:t,offset:0,size:0}]}const nE={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function P1(t,e,r,n,i,o){const{lastIndex:a,lastOffset:s,lastSize:l}=i;let c=0,d=0;if(t.length>0){c=t[0].offset;const b=t[t.length-1];d=b.offset+b.size}const p=r-a,g=s+p*l+(p-1)*n,m=c,y=g-d;return{bottom:d,firstItemIndex:o,items:oV(t,i,o),offsetBottom:y,offsetTop:c,top:m,topItems:oV(e,i,o),topListHeight:e.reduce((b,O)=>O.size+b,0),totalCount:r}}function HZ(t,e,r,n,i,o){let a=0;if(r.groupIndices.length>0)for(const d of r.groupIndices){if(d-a>=t)break;a++}const s=t+a,l=mA(e,s),c=Array.from({length:s}).map((d,p)=>({data:o[p+l],index:p+l,offset:0,size:0}));return P1(c,[],s,i,r,n)}function oV(t,e,r){if(t.length===0)return[];if(!_P(e))return t.map(c=>({...c,index:c.index+r,originalIndex:c.index}));const n=t[0].index,i=t[t.length-1].index,o=[],a=EP(e.groupOffsetTree,n,i);let s,l=0;for(const c of t){(!s||s.end<c.index)&&(s=a.shift(),l=e.groupIndices.indexOf(s.start));let d;c.index===s.start?d={index:l,type:"group"}:d={groupIndex:l,index:c.index-(l+1)+r},o.push({...d,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return o}const Ff=Sr(([{data:t,firstItemIndex:e,gap:r,sizes:n,totalCount:i},o,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:d},{topListHeight:p},g,{didMount:m},{recalcInProgress:y}])=>{const b=Le([]),O=Le(0),S=sr();ht(o.topItemsIndexes,b);const w=to(Ie(di(m,y,$t(l,Ty),$t(i),$t(n),$t(c),d,$t(b),$t(e),$t(r),t),Tt(([E,_,,$,,,,,,,M])=>{const j=M&&M.length!==$;return E&&!_&&!j}),Ke(([,,[E,_],$,M,j,B,V,X,D,F])=>{const Y=M,{offsetTree:ie,sizeTree:H}=Y,ne=xi(O);if($===0)return{...nE,totalCount:$};if(E===0&&_===0)return ne===0?{...nE,totalCount:$}:HZ(ne,j,M,X,D,F||[]);if(Wr(H))return ne>0?null:P1(DRe(mA(j,$),Y,F),[],$,D,Y,X);const z=[];if(V.length>0){const q=V[0],oe=V[V.length-1];let Oe=0;for(const Z of EP(H,q,oe)){const le=Z.value,Pe=Math.max(Z.start,q),ee=Math.min(Z.end,oe);for(let re=Pe;re<=ee;re++)z.push({data:F==null?void 0:F[re],index:re,offset:Oe,size:le}),Oe+=le}}if(!B)return P1([],z,$,D,Y,X);const N=V.length>0?V[V.length-1]+1:0,U=kRe(ie,E,_,N);if(U.length===0)return null;const J=$-1,Q=TP([],q=>{for(const oe of U){const Oe=oe.value;let Z=Oe.offset,le=oe.start;const Pe=Oe.size;if(Oe.offset<E){le+=Math.floor((E-Oe.offset+D)/(Pe+D));const re=le-oe.start;Z+=re*Pe+re*D}le<N&&(Z+=(N-le)*Pe,le=N);const ee=Math.min(oe.end,J);for(let re=le;re<=ee&&!(Z>=_);re++)q.push({data:F==null?void 0:F[re],index:re,offset:Z,size:Pe}),Z+=Pe+D}});return P1(Q,z,$,D,Y,X)}),Tt(E=>E!==null),pn()),nE);ht(Ie(t,Tt(cA),Ke(E=>E==null?void 0:E.length)),i),ht(Ie(w,Ke(E=>E.topListHeight)),p),ht(p,s),ht(Ie(w,Ke(E=>[E.top,E.bottom])),a),ht(Ie(w,Ke(E=>E.items)),S);const k=ma(Ie(w,Tt(({items:E})=>E.length>0),Kt(i,t),Tt(([{items:E},_])=>E[E.length-1].originalIndex===_-1),Ke(([,E,_])=>[E-1,_]),pn(Ty),Ke(([E])=>E))),T=ma(Ie(w,mu(200),Tt(({items:E,topItems:_})=>E.length>0&&E[0].originalIndex===_.length),Ke(({items:E})=>E[0].index),pn())),C=ma(Ie(w,Tt(({items:E})=>E.length>0),Ke(({items:E})=>{let _=0,$=E.length-1;for(;E[_].type==="group"&&_<$;)_++;for(;E[$].type==="group"&&$>_;)$--;return{endIndex:E[$].index,startIndex:E[_].index}}),pn(VZ)));return{endReached:k,initialItemCount:O,itemsRendered:S,listState:w,rangeChanged:C,startReached:T,topItemsIndexes:b,...g}},On(kl,qZ,vA,Fb,Vb,Bb,sd,hA),{singleton:!0}),XZ=Sr(([{fixedFooterHeight:t,fixedHeaderHeight:e,footerHeight:r,headerHeight:n},{listState:i}])=>{const o=sr(),a=to(Ie(di(r,t,n,e,i),Ke(([s,l,c,d,p])=>s+l+c+d+p.offsetBottom+p.bottom)),0);return ht($t(a),o),{totalListHeight:a,totalListHeightChanged:o}},On(go,Ff),{singleton:!0}),LRe=Sr(([{viewportHeight:t},{totalListHeight:e}])=>{const r=Le(!1),n=to(Ie(di(r,t,e),Tt(([i])=>i),Ke(([,i,o])=>Math.max(0,i-o)),mu(0),pn()),0);return{alignToBottom:r,paddingTopAddition:n}},On(go,XZ),{singleton:!0});function aV(t){return t?t==="smooth"?"smooth":"auto":!1}const QRe=(t,e)=>typeof t=="function"?aV(t(e)):e&&aV(t),VRe=Sr(([{listRefresh:t,totalCount:e,fixedItemSize:r},{atBottomState:n,isAtBottom:i},{scrollToIndex:o},{scrolledToInitialItem:a},{didMount:s,propsReady:l},{log:c},{scrollingInProgress:d}])=>{const p=Le(!1),g=sr();let m=null;function y(O){Xt(o,{align:"end",behavior:O,index:"LAST"})}jr(Ie(di(Ie($t(e),Np(1)),s),Kt($t(p),i,a,d),Ke(([[O,S],w,k,T,C])=>{let E=S&&T,_="auto";return E&&(_=QRe(w,k||C),E=E&&!!_),{followOutputBehavior:_,shouldFollow:E,totalCount:O}}),Tt(({shouldFollow:O})=>O)),({followOutputBehavior:O,totalCount:S})=>{m&&(m(),m=null),xi(r)?requestAnimationFrame(()=>{xi(c)("following output to ",{totalCount:S},Qo.DEBUG),y(O)}):m=gl(t,()=>{xi(c)("following output to ",{totalCount:S},Qo.DEBUG),y(O),m=null})});function b(O){const S=gl(n,w=>{O&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(xi(c)("scrolling to bottom due to increased size",{},Qo.DEBUG),y("auto"))});setTimeout(S,100)}return jr(Ie(di($t(p),e,l),Tt(([O,,S])=>O&&S),Ys(({value:O},[,S])=>({refreshed:O===S,value:S}),{refreshed:!1,value:0}),Tt(({refreshed:O})=>O),Kt(p,e)),([,O])=>{xi(a)&&b(O!==!1)}),jr(g,()=>{b(xi(p)!==!1)}),jr(di($t(p),n),([O,S])=>{O&&!S.atBottom&&S.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&y("auto")}),{autoscrollToBottom:g,followOutput:p}},On(kl,Bb,Vb,Fb,sd,ad,go)),FRe=Sr(([{data:t,firstItemIndex:e,gap:r,sizes:n},{initialTopMostItemIndex:i},{initialItemCount:o,listState:a},{didMount:s}])=>(ht(Ie(s,Kt(o),Tt(([,l])=>l!==0),Kt(i,n,e,r,t),Ke(([[,l],c,d,p,g,m=[]])=>HZ(l,c,d,p,g,m))),a),{}),On(kl,Fb,Ff,sd),{singleton:!0}),BRe=Sr(([{didMount:t},{scrollTo:e},{listState:r}])=>{const n=Le(0);return jr(Ie(t,Kt(n),Tt(([,i])=>i!==0),Ke(([,i])=>({top:i}))),i=>{gl(Ie(r,Np(1),Tt(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{Xt(e,i)})})}),{initialScrollTop:n}},On(sd,go,Ff),{singleton:!0}),zRe=({itemBottom:t,itemTop:e,locationParams:{align:r,behavior:n,...i},viewportBottom:o,viewportTop:a})=>e<a?{...i,align:r??"start",behavior:n}:t>o?{...i,align:r??"end",behavior:n}:null,qRe=Sr(([{gap:t,sizes:e,totalCount:r},{fixedFooterHeight:n,fixedHeaderHeight:i,headerHeight:o,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const d=sr();return ht(Ie(d,Kt(e,l,r,o,i,n,s),Kt(t),Ke(([[p,g,m,y,b,O,S,w],k])=>{const{align:T,behavior:C,calculateViewLocation:E=zRe,done:_,...$}=p,M=zZ(p,g,y-1),j=Ey(M,g.offsetTree,k)+b+O,B=j+ws(g.sizeTree,M)[1],V=w+O,X=w+m-S,D=E({itemBottom:B,itemTop:j,locationParams:{align:T,behavior:C,...$},viewportBottom:X,viewportTop:V});return D?_&&gl(Ie(a,Tt(F=>!F),Np(xi(a)?1:2)),_):_&&_(),D}),Tt(p=>p!==null)),c),{scrollIntoView:d}},On(kl,go,Vb,Ff,ad),{singleton:!0}),ZZ=Sr(([{scrollVelocity:t}])=>{const e=Le(!1),r=sr(),n=Le(!1);return ht(Ie(t,Kt(n,e,r),Tt(([i,o])=>!!o),Ke(([i,o,a,s])=>{const{enter:l,exit:c}=o;if(a){if(c(i,s))return!1}else if(l(i,s))return!0;return a}),pn()),e),jr(Ie(di(e,t,r),Kt(n)),([[i,o,a],s])=>{i&&s&&s.change&&s.change(o,a)}),{isSeeking:e,scrollSeekConfiguration:n,scrollSeekRangeChanged:r,scrollVelocity:t}},On(Bb),{singleton:!0}),yA=Sr(([{scrollContainerState:t,scrollTo:e}])=>{const r=sr(),n=sr(),i=sr(),o=Le(!1),a=Le(void 0);return ht(Ie(di(r,n),Ke(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:d}])=>({scrollHeight:s,scrollTop:Math.max(0,l-d),viewportHeight:c}))),t),ht(Ie(e,Kt(n),Ke(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),i),{customScrollParent:a,useWindowScroll:o,windowScrollContainerState:r,windowScrollTo:i,windowViewportRect:n}},On(go)),WRe=Sr(([{sizeRanges:t,sizes:e},{headerHeight:r,scrollTop:n},{initialTopMostItemIndex:i},{didMount:o},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=sr(),d=Le(void 0),p=Le(null),g=Le(null);return ht(s,p),ht(l,g),jr(Ie(c,Kt(e,n,a,p,g,r)),([m,y,b,O,S,w,k])=>{const T=TRe(y.sizeTree);O&&S!==null&&w!==null&&(b=S.scrollTop-w.offsetTop),b-=k,m({ranges:T,scrollTop:b})}),ht(Ie(d,Tt(cA),Ke(URe)),i),ht(Ie(o,Kt(d),Tt(([,m])=>m!==void 0),pn(),Ke(([,m])=>m.ranges)),t),{getState:c,restoreStateFrom:d}},On(kl,go,Fb,sd,yA));function URe(t){return{align:"start",index:0,offset:t.scrollTop}}const HRe=Sr(([{topItemsIndexes:t}])=>{const e=Le(0);return ht(Ie(e,Tt(r=>r>=0),Ke(r=>Array.from({length:r}).map((n,i)=>i))),t),{topItemCount:e}},On(Ff));function GZ(t){let e=!1,r;return()=>(e||(e=!0,r=t()),r)}const XRe=GZ(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),ZRe=Sr(([{deviation:t,scrollBy:e,scrollingInProgress:r,scrollTop:n},{isAtBottom:i,isScrolling:o,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:d,shiftWithOffset:p,sizes:g},{log:m},{recalcInProgress:y}])=>{const b=ma(Ie(l,Kt(a),Ys(([,S,w,k],[{bottom:T,items:C,offsetBottom:E,totalCount:_},$])=>{const M=T+E;let j=0;return w===_&&S.length>0&&C.length>0&&(C[0].originalIndex===0&&S[0].originalIndex===0||(j=M-k,j!==0&&(j+=$))),[j,C,_,M]},[0,[],0,0]),Tt(([S])=>S!==0),Kt(n,s,r,i,m,y),Tt(([,S,w,k,,,T])=>!T&&!k&&S!==0&&w===_y),Ke(([[S],,,,,w])=>(w("Upward scrolling compensation",{amount:S},Qo.DEBUG),S))));function O(S){S>0?(Xt(e,{behavior:"auto",top:-S}),Xt(t,0)):(Xt(t,0),Xt(e,{behavior:"auto",top:-S}))}return jr(Ie(b,Kt(t,o)),([S,w,k])=>{k&&XRe()?Xt(t,w-S):O(-S)}),jr(Ie(di(to(o,!1),t,y),Tt(([S,w,k])=>!S&&!k&&w!==0),Ke(([S,w])=>w),mu(1)),O),ht(Ie(p,Ke(S=>({top:-S}))),e),jr(Ie(c,Kt(g,d),Ke(([S,{groupIndices:w,lastSize:k,sizeTree:T},C])=>{function E(_){return _*(k+C)}if(w.length===0)return E(S);{let _=0;const $=Cy(T,0);let M=0,j=0;for(;M<S;){M++,_+=$;let B=w.length===j+1?1/0:w[j+1]-w[j]-1;M+B>S&&(_-=$,B=S-M+1),M+=B,_+=E(B),j++}return _}})),S=>{Xt(t,S),requestAnimationFrame(()=>{Xt(e,{top:S}),requestAnimationFrame(()=>{Xt(t,0),Xt(y,!1)})})}),{deviation:t}},On(go,Bb,Ff,kl,ad,hA)),GRe=Sr(([t,e,r,n,i,o,a,s,l,c])=>({...t,...e,...r,...n,...i,...o,...a,...s,...l,...c}),On(vA,FRe,sd,ZZ,XZ,BRe,LRe,yA,qRe,ad)),YZ=Sr(([{data:t,defaultItemSize:e,firstItemIndex:r,fixedItemSize:n,gap:i,groupIndices:o,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:d,trackItemSizes:p},{initialItemFinalLocationReached:g,initialTopMostItemIndex:m,scrolledToInitialItem:y},b,O,S,{listState:w,topItemsIndexes:k,...T},{scrollToIndex:C},E,{topItemCount:_},{groupCounts:$},M])=>(ht(T.rangeChanged,M.scrollSeekRangeChanged),ht(Ie(M.windowViewportRect,Ke(j=>j.visibleHeight)),b.viewportHeight),{data:t,defaultItemHeight:e,firstItemIndex:r,fixedItemHeight:n,gap:i,groupCounts:$,initialItemFinalLocationReached:g,initialTopMostItemIndex:m,scrolledToInitialItem:y,sizeRanges:s,topItemCount:_,topItemsIndexes:k,totalCount:d,...S,groupIndices:o,itemSize:a,listState:w,scrollToIndex:C,statefulTotalCount:c,trackItemSizes:p,...T,...M,...b,sizes:l,...O}),On(kl,Fb,go,WRe,VRe,Ff,Vb,ZRe,HRe,qZ,GRe));function YRe(t,e){const r={},n={};let i=0;const o=t.length;for(;i<o;)n[t[i]]=1,i+=1;for(const a in e)Object.hasOwn(n,a)||(r[a]=e[a]);return r}const EO=typeof document<"u"?Qe.useLayoutEffect:Qe.useEffect;function bA(t,e,r){const n=Object.keys(e.required||{}),i=Object.keys(e.optional||{}),o=Object.keys(e.methods||{}),a=Object.keys(e.events||{}),s=Qe.createContext({});function l(O,S){O.propsReady&&Xt(O.propsReady,!1);for(const w of n){const k=O[e.required[w]];Xt(k,S[w])}for(const w of i)if(w in S){const k=O[e.optional[w]];Xt(k,S[w])}O.propsReady&&Xt(O.propsReady,!0)}function c(O){return o.reduce((S,w)=>(S[w]=k=>{const T=O[e.methods[w]];Xt(T,k)},S),{})}function d(O){return a.reduce((S,w)=>(S[w]=hRe(O[e.events[w]]),S),{})}const p=Qe.forwardRef((O,S)=>{const{children:w,...k}=O,[T]=Qe.useState(()=>TP(gRe(t),_=>{l(_,k)})),[C]=Qe.useState(G4(d,T));EO(()=>{for(const _ of a)_ in k&&jr(C[_],k[_]);return()=>{Object.values(C).map(uA)}},[k,C,T]),EO(()=>{l(T,k)}),Qe.useImperativeHandle(S,Z4(c(T)));const E=r;return P.jsx(s.Provider,{value:T,children:r?P.jsx(E,{...YRe([...n,...i,...a],k),children:w}):w})}),g=O=>{const S=Qe.useContext(s);return Qe.useCallback(w=>{Xt(S[O],w)},[S,O])},m=O=>{const S=Qe.useContext(s)[O],w=Qe.useCallback(k=>jr(S,k),[S]);return Qe.useSyncExternalStore(w,()=>xi(S),()=>xi(S))},y=O=>{const S=Qe.useContext(s)[O],[w,k]=Qe.useState(G4(xi,S));return EO(()=>jr(S,T=>{T!==w&&k(Z4(T))}),[S,w]),w},b=Qe.version.startsWith("18")?m:y;return{Component:p,useEmitter:(O,S)=>{const w=Qe.useContext(s)[O];EO(()=>jr(w,S),[S,w])},useEmitterValue:b,usePublisher:g}}const RP=Qe.createContext(void 0),KZ=Qe.createContext(void 0),JZ=typeof document<"u"?Qe.useLayoutEffect:Qe.useEffect;function iE(t){return"self"in t}function KRe(t){return"body"in t}function eG(t,e,r,n=xg,i,o){const a=Qe.useRef(null),s=Qe.useRef(null),l=Qe.useRef(null),c=Qe.useCallback(g=>{let m,y,b;const O=g.target;if(KRe(O)||iE(O)){const w=iE(O)?O:O.defaultView;b=o?w.scrollX:w.scrollY,m=o?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight,y=o?w.innerWidth:w.innerHeight}else b=o?O.scrollLeft:O.scrollTop,m=o?O.scrollWidth:O.scrollHeight,y=o?O.offsetWidth:O.offsetHeight;const S=()=>{t({scrollHeight:m,scrollTop:Math.max(b,0),viewportHeight:y})};g.suppressFlushSync?S():Zz.flushSync(S),s.current!==null&&(b===s.current||b<=0||b===m-y)&&(s.current=null,e(!0),l.current&&(clearTimeout(l.current),l.current=null))},[t,e,o]);Qe.useEffect(()=>{const g=i||a.current;return n(i||a.current),c({suppressFlushSync:!0,target:g}),g.addEventListener("scroll",c,{passive:!0}),()=>{n(null),g.removeEventListener("scroll",c)}},[a,c,r,n,i]);function d(g){const m=a.current;if(!m||(o?"offsetWidth"in m&&m.offsetWidth===0:"offsetHeight"in m&&m.offsetHeight===0))return;const y=g.behavior==="smooth";let b,O,S;iE(m)?(O=Math.max(Ss(m.document.documentElement,o?"width":"height"),o?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight),b=o?m.innerWidth:m.innerHeight,S=o?window.scrollX:window.scrollY):(O=m[o?"scrollWidth":"scrollHeight"],b=Ss(m,o?"width":"height"),S=m[o?"scrollLeft":"scrollTop"]);const w=O-b;if(g.top=Math.ceil(Math.max(Math.min(w,g.top),0)),UZ(b,O)||g.top===S){t({scrollHeight:O,scrollTop:S,viewportHeight:b}),y&&e(!0);return}y?(s.current=g.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,e(!0)},1e3)):s.current=null,o&&(g={behavior:g.behavior,left:g.top}),m.scrollTo(g)}function p(g){o&&(g={behavior:g.behavior,left:g.top}),a.current.scrollBy(g)}return{scrollByCallback:p,scrollerRef:a,scrollToCallback:d}}const oE="-webkit-sticky",sV="sticky",tG=GZ(()=>{if(typeof document>"u")return sV;const t=document.createElement("div");return t.style.position=oE,t.style.position===oE?oE:sV});function OA(t){return t}const JRe=Sr(()=>{const t=Le(l=>`Item ${l}`),e=Le(null),r=Le(l=>`Group ${l}`),n=Le({}),i=Le(OA),o=Le("div"),a=Le(xg),s=(l,c=null)=>to(Ie(n,Ke(d=>d[l]),pn()),c);return{components:n,computeItemKey:i,context:e,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:r,HeaderComponent:s("Header"),HeaderFooterTag:o,ItemComponent:s("Item","div"),itemContent:t,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),eIe=Sr(([t,e])=>({...t,...e}),On(YZ,JRe)),tIe=({height:t})=>P.jsx("div",{style:{height:t}}),rIe={overflowAnchor:"none",position:tG(),zIndex:1},rG={overflowAnchor:"none"},nIe={...rG,display:"inline-block",height:"100%"},lV=Qe.memo(function({showTopList:t=!1}){const e=Nt("listState"),r=La("sizeRanges"),n=Nt("useWindowScroll"),i=Nt("customScrollParent"),o=La("windowScrollContainerState"),a=La("scrollContainerState"),s=i||n?o:a,l=Nt("itemContent"),c=Nt("context"),d=Nt("groupContent"),p=Nt("trackItemSizes"),g=Nt("itemSize"),m=Nt("log"),y=La("gap"),b=Nt("horizontalDirection"),{callbackRef:O}=MZ(r,g,p,t?xg:s,m,y,i,b,Nt("skipAnimationFrameInResizeObserver")),[S,w]=Qe.useState(0);xA("deviation",D=>{S!==D&&w(D)});const k=Nt("EmptyPlaceholder"),T=Nt("ScrollSeekPlaceholder")||tIe,C=Nt("ListComponent"),E=Nt("ItemComponent"),_=Nt("GroupComponent"),$=Nt("computeItemKey"),M=Nt("isSeeking"),j=Nt("groupIndices").length>0,B=Nt("alignToBottom"),V=Nt("initialItemFinalLocationReached"),X=t?{}:{boxSizing:"border-box",...b?{display:"inline-block",height:"100%",marginLeft:S!==0?S:B?"auto":0,paddingLeft:e.offsetTop,paddingRight:e.offsetBottom,whiteSpace:"nowrap"}:{marginTop:S!==0?S:B?"auto":0,paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},...V?{}:{visibility:"hidden"}};return!t&&e.totalCount===0&&k?P.jsx(k,{...gn(k,c)}):P.jsx(C,{...gn(C,c),"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list",ref:O,style:X,children:(t?e.topItems:e.items).map(D=>{const F=D.originalIndex,Y=$(F+e.firstItemIndex,D.data,c);return M?A.createElement(T,{...gn(T,c),height:D.size,index:D.index,key:Y,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?A.createElement(_,{...gn(_,c),"data-index":F,"data-item-index":D.index,"data-known-size":D.size,key:Y,style:rIe},d(D.index,c)):A.createElement(E,{...gn(E,c),...nG(E,D.data),"data-index":F,"data-item-group-index":D.groupIndex,"data-item-index":D.index,"data-known-size":D.size,key:Y,style:b?nIe:rG},j?l(D.index,D.groupIndex,D.data,c):l(D.index,D.data,c))})})}),iIe={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},oIe={outline:"none",overflowX:"auto",position:"relative"},Pg=t=>({height:"100%",position:"absolute",top:0,width:"100%",...t?{display:"flex",flexDirection:"column"}:{}}),aIe={position:tG(),top:0,width:"100%",zIndex:1};function gn(t,e){if(typeof t!="string")return{context:e}}function nG(t,e){return{item:typeof t=="string"?void 0:e}}const sIe=Qe.memo(function(){const t=Nt("HeaderComponent"),e=La("headerHeight"),r=Nt("HeaderFooterTag"),n=ml(Qe.useMemo(()=>o=>{e(Ss(o,"height"))},[e]),!0,Nt("skipAnimationFrameInResizeObserver")),i=Nt("context");return t?P.jsx(r,{ref:n,children:P.jsx(t,{...gn(t,i)})}):null}),lIe=Qe.memo(function(){const t=Nt("FooterComponent"),e=La("footerHeight"),r=Nt("HeaderFooterTag"),n=ml(Qe.useMemo(()=>o=>{e(Ss(o,"height"))},[e]),!0,Nt("skipAnimationFrameInResizeObserver")),i=Nt("context");return t?P.jsx(r,{ref:n,children:P.jsx(t,{...gn(t,i)})}):null});function wA({useEmitter:t,useEmitterValue:e,usePublisher:r}){return Qe.memo(function({children:n,style:i,...o}){const a=r("scrollContainerState"),s=e("ScrollerComponent"),l=r("smoothScrollTargetReached"),c=e("scrollerRef"),d=e("context"),p=e("horizontalDirection")||!1,{scrollByCallback:g,scrollerRef:m,scrollToCallback:y}=eG(a,l,s,c,void 0,p);return t("scrollTo",y),t("scrollBy",g),P.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:m,style:{...p?oIe:iIe,...i},tabIndex:0,...o,...gn(s,d),children:n})})}function SA({useEmitter:t,useEmitterValue:e,usePublisher:r}){return Qe.memo(function({children:n,style:i,...o}){const a=r("windowScrollContainerState"),s=e("ScrollerComponent"),l=r("smoothScrollTargetReached"),c=e("totalListHeight"),d=e("deviation"),p=e("customScrollParent"),g=e("context"),m=Qe.useRef(null),y=e("scrollerRef"),{scrollByCallback:b,scrollerRef:O,scrollToCallback:S}=eG(a,l,s,y,p);return JZ(()=>{var w;return O.current=p||((w=m.current)==null?void 0:w.ownerDocument.defaultView),()=>{O.current=null}},[O,p]),t("windowScrollTo",S),t("scrollBy",b),P.jsx(s,{ref:m,"data-virtuoso-scroller":!0,style:{position:"relative",...i,...c!==0?{height:c+d}:{}},...o,...gn(s,g),children:n})})}const cIe=({children:t})=>{const e=Qe.useContext(RP),r=La("viewportHeight"),n=La("fixedItemHeight"),i=Nt("alignToBottom"),o=Nt("horizontalDirection"),a=Qe.useMemo(()=>Py(r,l=>Ss(l,o?"width":"height")),[r,o]),s=ml(a,!0,Nt("skipAnimationFrameInResizeObserver"));return Qe.useEffect(()=>{e&&(r(e.viewportHeight),n(e.itemHeight))},[e,r,n]),P.jsx("div",{"data-viewport-type":"element",ref:s,style:Pg(i),children:t})},uIe=({children:t})=>{const e=Qe.useContext(RP),r=La("windowViewportRect"),n=La("fixedItemHeight"),i=Nt("customScrollParent"),o=fA(r,i,Nt("skipAnimationFrameInResizeObserver")),a=Nt("alignToBottom");return Qe.useEffect(()=>{e&&(n(e.itemHeight),r({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,r,n]),P.jsx("div",{"data-viewport-type":"window",ref:o,style:Pg(a),children:t})},dIe=({children:t})=>{const e=Nt("TopItemListComponent")||"div",r=Nt("headerHeight"),n={...aIe,marginTop:`${r}px`},i=Nt("context");return P.jsx(e,{style:n,...gn(e,i),children:t})},fIe=Qe.memo(function(t){const e=Nt("useWindowScroll"),r=Nt("topItemsIndexes").length>0,n=Nt("customScrollParent"),i=Nt("context"),o=n||e?gIe:pIe,a=n||e?uIe:cIe;return P.jsxs(o,{...t,...gn(o,i),children:[r&&P.jsx(dIe,{children:P.jsx(lV,{showTopList:!0})}),P.jsxs(a,{children:[P.jsx(sIe,{}),P.jsx(lV,{}),P.jsx(lIe,{})]})]})}),{Component:hIe,useEmitter:xA,useEmitterValue:Nt,usePublisher:La}=bA(eIe,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},fIe),pIe=wA({useEmitter:xA,useEmitterValue:Nt,usePublisher:La}),gIe=SA({useEmitter:xA,useEmitterValue:Nt,usePublisher:La}),PA=hIe,mIe=Sr(()=>{const t=Le(l=>P.jsxs("td",{children:["Item $",l]})),e=Le(null),r=Le(null),n=Le(null),i=Le({}),o=Le(OA),a=Le(xg),s=(l,c=null)=>to(Ie(i,Ke(d=>d[l]),pn()),c);return{components:i,computeItemKey:o,context:e,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:n,fixedHeaderContent:r,itemContent:t,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),vIe=Sr(([t,e])=>({...t,...e}),On(YZ,mIe)),yIe=({height:t})=>P.jsx("tr",{children:P.jsx("td",{style:{height:t}})}),bIe=({height:t})=>P.jsx("tr",{children:P.jsx("td",{style:{border:0,height:t,padding:0}})}),OIe={overflowAnchor:"none"},cV=Qe.memo(function({showTopList:t=!1}){const e=Gt("listState"),r=Gt("computeItemKey"),n=Gt("firstItemIndex"),i=Gt("isSeeking"),o=Gt("ScrollSeekPlaceholder")||yIe,a=Gt("context"),s=Gt("TableRowComponent"),l=Gt("fixedHeaderHeight"),c=Gt("itemContent"),d=(t?e.topItems:[]).reduce((g,m,y)=>(y===0?g.push(m.size):g.push(g[y-1]+m.size),g),[]),p=(t?e.topItems:e.items).map(g=>{const m=g.originalIndex,y=r(m+n,g.data,a),b=t?m===0?0:d[m-1]:0;return i?A.createElement(o,{...gn(o,a),height:g.size,index:g.index,key:y,type:g.type||"item"}):A.createElement(s,{...gn(s,a),...nG(s,g.data),"data-index":m,"data-item-index":g.index,"data-known-size":g.size,key:y,style:t?{overflowAnchor:"none",position:"sticky",top:l+b,zIndex:2}:OIe},c(g.index,g.data,a))});return P.jsx(P.Fragment,{children:p})}),wIe=Qe.memo(function(){const t=Gt("listState"),e=Gt("topItemsIndexes").length>0,r=vs("sizeRanges"),n=Gt("useWindowScroll"),i=Gt("customScrollParent"),o=vs("windowScrollContainerState"),a=vs("scrollContainerState"),s=i||n?o:a,l=Gt("trackItemSizes"),c=Gt("itemSize"),d=Gt("log"),{callbackRef:p,ref:g}=MZ(r,c,l,s,d,void 0,i,!1,Gt("skipAnimationFrameInResizeObserver")),[m,y]=Qe.useState(0);kA("deviation",j=>{m!==j&&(g.current.style.marginTop=`${j}px`,y(j))});const b=Gt("EmptyPlaceholder"),O=Gt("FillerRow")||bIe,S=Gt("TableBodyComponent"),w=Gt("paddingTopAddition"),k=Gt("statefulTotalCount"),T=Gt("context");if(k===0&&b)return P.jsx(b,{...gn(b,T)});const C=(e?t.topItems:[]).reduce((j,B)=>j+B.size,0),E=t.offsetTop+w+m-C,_=t.offsetBottom,$=E>0?P.jsx(O,{context:T,height:E},"padding-top"):null,M=_>0?P.jsx(O,{context:T,height:_},"padding-bottom"):null;return P.jsxs(S,{"data-testid":"virtuoso-item-list",ref:p,...gn(S,T),children:[$,e&&P.jsx(cV,{showTopList:!0}),P.jsx(cV,{}),M]})}),SIe=({children:t})=>{const e=Qe.useContext(RP),r=vs("viewportHeight"),n=vs("fixedItemHeight"),i=ml(Qe.useMemo(()=>Py(r,o=>Ss(o,"height")),[r]),!0,Gt("skipAnimationFrameInResizeObserver"));return Qe.useEffect(()=>{e&&(r(e.viewportHeight),n(e.itemHeight))},[e,r,n]),P.jsx("div",{"data-viewport-type":"element",ref:i,style:Pg(!1),children:t})},xIe=({children:t})=>{const e=Qe.useContext(RP),r=vs("windowViewportRect"),n=vs("fixedItemHeight"),i=Gt("customScrollParent"),o=fA(r,i,Gt("skipAnimationFrameInResizeObserver"));return Qe.useEffect(()=>{e&&(n(e.itemHeight),r({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,r,n]),P.jsx("div",{"data-viewport-type":"window",ref:o,style:Pg(!1),children:t})},PIe=Qe.memo(function(t){const e=Gt("useWindowScroll"),r=Gt("customScrollParent"),n=vs("fixedHeaderHeight"),i=vs("fixedFooterHeight"),o=Gt("fixedHeaderContent"),a=Gt("fixedFooterContent"),s=Gt("context"),l=ml(Qe.useMemo(()=>Py(n,S=>Ss(S,"height")),[n]),!0,Gt("skipAnimationFrameInResizeObserver")),c=ml(Qe.useMemo(()=>Py(i,S=>Ss(S,"height")),[i]),!0,Gt("skipAnimationFrameInResizeObserver")),d=r||e?TIe:CIe,p=r||e?xIe:SIe,g=Gt("TableComponent"),m=Gt("TableHeadComponent"),y=Gt("TableFooterComponent"),b=o?P.jsx(m,{ref:l,style:{position:"sticky",top:0,zIndex:2},...gn(m,s),children:o()},"TableHead"):null,O=a?P.jsx(y,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...gn(y,s),children:a()},"TableFoot"):null;return P.jsx(d,{...t,...gn(d,s),children:P.jsx(p,{children:P.jsxs(g,{style:{borderSpacing:0,overflowAnchor:"none"},...gn(g,s),children:[b,P.jsx(wIe,{},"TableBody"),O]})})})}),{Component:kIe,useEmitter:kA,useEmitterValue:Gt,usePublisher:vs}=bA(vIe,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},PIe),CIe=wA({useEmitter:kA,useEmitterValue:Gt,usePublisher:vs}),TIe=SA({useEmitter:kA,useEmitterValue:Gt,usePublisher:vs}),EIe=kIe,uV={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},_Ie={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:dV,floor:ES,max:Nv,min:aE,round:fV}=Math;function hV(t,e,r){return Array.from({length:e-t+1}).map((n,i)=>({data:r===null?null:r[i+t],index:i+t}))}function RIe(t){return{..._Ie,items:t}}function _O(t,e){return t&&t.width===e.width&&t.height===e.height}function IIe(t,e){return t&&t.column===e.column&&t.row===e.row}const $Ie=Sr(([{increaseViewportBy:t,listBoundary:e,overscan:r,visibleRange:n},{footerHeight:i,headerHeight:o,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:d,viewportHeight:p},g,m,{didMount:y,propsReady:b},{customScrollParent:O,useWindowScroll:S,windowScrollContainerState:w,windowScrollTo:k,windowViewportRect:T},C])=>{const E=Le(0),_=Le(0),$=Le(uV),M=Le({height:0,width:0}),j=Le({height:0,width:0}),B=sr(),V=sr(),X=Le(0),D=Le(null),F=Le({column:0,row:0}),Y=sr(),ie=sr(),H=Le(!1),ne=Le(0),z=Le(!0),N=Le(!1),U=Le(!1);jr(Ie(y,Kt(ne),Tt(([Z,le])=>!!le)),()=>{Xt(z,!1)}),jr(Ie(di(y,z,j,M,ne,N),Tt(([Z,le,Pe,ee,,re])=>Z&&!le&&Pe.height!==0&&ee.height!==0&&!re)),([,,,,Z])=>{Xt(N,!0),gA(1,()=>{Xt(B,Z)}),gl(Ie(c),()=>{Xt(e,[0,0]),Xt(z,!0)})}),ht(Ie(ie,Tt(Z=>Z!=null&&Z.scrollTop>0),Us(0)),_),jr(Ie(y,Kt(ie),Tt(([,Z])=>Z!=null)),([,Z])=>{Z&&(Xt(M,Z.viewport),Xt(j,Z.item),Xt(F,Z.gap),Z.scrollTop>0&&(Xt(H,!0),gl(Ie(c,Np(1)),le=>{Xt(H,!1)}),Xt(l,{top:Z.scrollTop})))}),ht(Ie(M,Ke(({height:Z})=>Z)),p),ht(Ie(di($t(M,_O),$t(j,_O),$t(F,(Z,le)=>Z&&Z.column===le.column&&Z.row===le.row),$t(c)),Ke(([Z,le,Pe,ee])=>({gap:Pe,item:le,scrollTop:ee,viewport:Z}))),Y),ht(Ie(di($t(E),n,$t(F,IIe),$t(j,_O),$t(M,_O),$t(D),$t(_),$t(H),$t(z),$t(ne)),Tt(([,,,,,,,Z])=>!Z),Ke(([Z,[le,Pe],ee,re,ye,ke,Me,,De,Vt])=>{const{column:vr,row:yr}=ee,{height:ur,width:or}=re,{width:Rr}=ye;if(Me===0&&(Z===0||Rr===0))return uV;if(or===0){const qn=mA(Vt,Z),Rl=qn+Math.max(Me-1,0);return RIe(hV(qn,Rl,ke))}const zt=iG(Rr,or,vr);let Tn,zn;De?le===0&&Pe===0&&Me>0?(Tn=0,zn=Me-1):(Tn=zt*ES((le+yr)/(ur+yr)),zn=zt*dV((Pe+yr)/(ur+yr))-1,zn=aE(Z-1,Nv(zn,zt-1)),Tn=aE(zn,Nv(0,Tn))):(Tn=0,zn=-1);const $n=hV(Tn,zn,ke),{bottom:pi,top:io}=pV(ye,ee,re,$n),En=dV(Z/zt),Ii=En*ur+(En-1)*yr-pi;return{bottom:pi,itemHeight:ur,items:$n,itemWidth:or,offsetBottom:Ii,offsetTop:io,top:io}})),$),ht(Ie(D,Tt(Z=>Z!==null),Ke(Z=>Z.length)),E),ht(Ie(di(M,j,$,F),Tt(([Z,le,{items:Pe}])=>Pe.length>0&&le.height!==0&&Z.height!==0),Ke(([Z,le,{items:Pe},ee])=>{const{bottom:re,top:ye}=pV(Z,ee,le,Pe);return[ye,re]}),pn(Ty)),e);const J=Le(!1);ht(Ie(c,Kt(J),Ke(([Z,le])=>le||Z!==0)),J);const Q=ma(Ie(di($,E),Tt(([{items:Z}])=>Z.length>0),Kt(J),Tt(([[Z,le],Pe])=>{const ee=Z.items[Z.items.length-1].index===le-1;return(Pe||Z.bottom>0&&Z.itemHeight>0&&Z.offsetBottom===0&&Z.items.length===le)&&ee}),Ke(([[,Z]])=>Z-1),pn())),q=ma(Ie($t($),Tt(({items:Z})=>Z.length>0&&Z[0].index===0),Us(0),pn())),oe=ma(Ie($t($),Kt(H),Tt(([{items:Z},le])=>Z.length>0&&!le),Ke(([{items:Z}])=>({endIndex:Z[Z.length-1].index,startIndex:Z[0].index})),pn(VZ),mu(0)));ht(oe,m.scrollSeekRangeChanged),ht(Ie(B,Kt(M,j,E,F),Ke(([Z,le,Pe,ee,re])=>{const ye=WZ(Z),{align:ke,behavior:Me,offset:De}=ye;let Vt=ye.index;Vt==="LAST"&&(Vt=ee-1),Vt=Nv(0,Vt,aE(ee-1,Vt));let vr=qR(le,re,Pe,Vt);return ke==="end"?vr=fV(vr-le.height+Pe.height):ke==="center"&&(vr=fV(vr-le.height/2+Pe.height/2)),De&&(vr+=De),{behavior:Me,top:vr}})),l);const Oe=to(Ie($,Ke(Z=>Z.offsetBottom+Z.bottom)),0);return ht(Ie(T,Ke(Z=>({height:Z.visibleHeight,width:Z.visibleWidth}))),M),{customScrollParent:O,data:D,deviation:X,footerHeight:i,gap:F,headerHeight:o,increaseViewportBy:t,initialItemCount:_,itemDimensions:j,overscan:r,restoreStateFrom:ie,scrollBy:a,scrollContainerState:s,scrollHeight:V,scrollTo:l,scrollToIndex:B,scrollTop:c,smoothScrollTargetReached:d,totalCount:E,useWindowScroll:S,viewportDimensions:M,windowScrollContainerState:w,windowScrollTo:k,windowViewportRect:T,...m,gridState:$,horizontalDirection:U,initialTopMostItemIndex:ne,totalListHeight:Oe,...g,endReached:Q,propsReady:b,rangeChanged:oe,startReached:q,stateChanged:Y,stateRestoreInProgress:H,...C}},On(vA,go,Bb,ZZ,sd,yA,ad));function iG(t,e,r){return Nv(1,ES((t+r)/(ES(e)+r)))}function pV(t,e,r,n){const{height:i}=r;if(i===void 0||n.length===0)return{bottom:0,top:0};const o=qR(t,e,r,n[0].index);return{bottom:qR(t,e,r,n[n.length-1].index)+i,top:o}}function qR(t,e,r,n){const i=iG(t.width,r.width,e.column),o=ES(n/i),a=o*r.height+Nv(0,o-1)*e.row;return a>0?a+e.row:a}const AIe=Sr(()=>{const t=Le(p=>`Item ${p}`),e=Le({}),r=Le(null),n=Le("virtuoso-grid-item"),i=Le("virtuoso-grid-list"),o=Le(OA),a=Le("div"),s=Le(xg),l=(p,g=null)=>to(Ie(e,Ke(m=>m[p]),pn()),g),c=Le(!1),d=Le(!1);return ht($t(d),c),{components:e,computeItemKey:o,context:r,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:n,ItemComponent:l("Item","div"),itemContent:t,listClassName:i,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:d,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),MIe=Sr(([t,e])=>({...t,...e}),On($Ie,AIe)),NIe=Qe.memo(function(){const t=Sn("gridState"),e=Sn("listClassName"),r=Sn("itemClassName"),n=Sn("itemContent"),i=Sn("computeItemKey"),o=Sn("isSeeking"),a=Qa("scrollHeight"),s=Sn("ItemComponent"),l=Sn("ListComponent"),c=Sn("ScrollSeekPlaceholder"),d=Sn("context"),p=Qa("itemDimensions"),g=Qa("gap"),m=Sn("log"),y=Sn("stateRestoreInProgress"),b=Qa("reportReadyState"),O=ml(Qe.useMemo(()=>S=>{const w=S.parentElement.parentElement.scrollHeight;a(w);const k=S.firstChild;if(k){const{height:T,width:C}=k.getBoundingClientRect();p({height:T,width:C})}g({column:gV("column-gap",getComputedStyle(S).columnGap,m),row:gV("row-gap",getComputedStyle(S).rowGap,m)})},[a,p,g,m]),!0,!1);return JZ(()=>{t.itemHeight>0&&t.itemWidth>0&&b(!0)},[t]),y?null:P.jsx(l,{className:e,ref:O,...gn(l,d),"data-testid":"virtuoso-item-list",style:{paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},children:t.items.map(S=>{const w=i(S.index,S.data,d);return o?P.jsx(c,{...gn(c,d),height:t.itemHeight,index:S.index,width:t.itemWidth},w):A.createElement(s,{...gn(s,d),className:r,"data-index":S.index,key:w},n(S.index,S.data,d))})})}),jIe=Qe.memo(function(){const t=Sn("HeaderComponent"),e=Qa("headerHeight"),r=Sn("headerFooterTag"),n=ml(Qe.useMemo(()=>o=>{e(Ss(o,"height"))},[e]),!0,!1),i=Sn("context");return t?P.jsx(r,{ref:n,children:P.jsx(t,{...gn(t,i)})}):null}),DIe=Qe.memo(function(){const t=Sn("FooterComponent"),e=Qa("footerHeight"),r=Sn("headerFooterTag"),n=ml(Qe.useMemo(()=>o=>{e(Ss(o,"height"))},[e]),!0,!1),i=Sn("context");return t?P.jsx(r,{ref:n,children:P.jsx(t,{...gn(t,i)})}):null}),LIe=({children:t})=>{const e=Qe.useContext(KZ),r=Qa("itemDimensions"),n=Qa("viewportDimensions"),i=ml(Qe.useMemo(()=>o=>{n(o.getBoundingClientRect())},[n]),!0,!1);return Qe.useEffect(()=>{e&&(n({height:e.viewportHeight,width:e.viewportWidth}),r({height:e.itemHeight,width:e.itemWidth}))},[e,n,r]),P.jsx("div",{ref:i,style:Pg(!1),children:t})},QIe=({children:t})=>{const e=Qe.useContext(KZ),r=Qa("windowViewportRect"),n=Qa("itemDimensions"),i=Sn("customScrollParent"),o=fA(r,i,!1);return Qe.useEffect(()=>{e&&(n({height:e.itemHeight,width:e.itemWidth}),r({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:e.viewportWidth}))},[e,r,n]),P.jsx("div",{ref:o,style:Pg(!1),children:t})},VIe=Qe.memo(function({...t}){const e=Sn("useWindowScroll"),r=Sn("customScrollParent"),n=r||e?BIe:FIe,i=r||e?QIe:LIe,o=Sn("context");return P.jsx(n,{...t,...gn(n,o),children:P.jsxs(i,{children:[P.jsx(jIe,{}),P.jsx(NIe,{}),P.jsx(DIe,{})]})})}),{useEmitter:oG,useEmitterValue:Sn,usePublisher:Qa}=bA(MIe,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},VIe),FIe=wA({useEmitter:oG,useEmitterValue:Sn,usePublisher:Qa}),BIe=SA({useEmitter:oG,useEmitterValue:Sn,usePublisher:Qa});function gV(t,e,r){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&r(`${t} was not resolved to pixel value correctly`,e,Qo.WARN),e==="normal"?0:parseInt(e??"0",10)}const zIe=Ae`
|
|
1081
1081
|
mutation DeleteProjectMst($data: DeleteProjectInput!) {
|
|
1082
1082
|
deleteProject(data: $data)
|
|
1083
1083
|
}
|
|
1084
|
-
`,qIe=async t=>{const e=await _r.mutate({mutation:zIe,variables:t});if(!e.data)throw e.errors;return e.data};class WIe{constructor(e,r,n){this.rootStore=e,this.organizationId=r,this.projectName=n}async execute(){const e=await this.deleteProjectRequest();return await this.updateProjectsConnection(),await this.updateMeProjectsConnection(),e}async deleteProjectRequest(){const{deleteProject:e}=await qIe({data:{organizationId:this.organizationId,projectName:this.projectName}});return e}async updateProjectsConnection(){const e=this.rootStore.cache.organization.get(this.organizationId),r=e==null?void 0:e.projectsConnection.edges.find(n=>n.node.name===this.projectName);e==null||e.projectsConnection.removeEdge(r==null?void 0:r.cursor)}async updateMeProjectsConnection(){const e=this.rootStore.cache.meProjectsConnection.edges.find(r=>r.node.name===this.projectName);this.rootStore.cache.meProjectsConnection.removeEdge(e==null?void 0:e.cursor)}}class UIe{constructor(e){this.rootStore=e}async delete(e,r){try{return await new WIe(this.rootStore,e,r).execute()}catch(n){return console.error(n),!1}}init(){}dispose(){}}const HIe=()=>{const[t]=A.useState(()=>new UIe(gt));return A.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t},XIe=mt(({organizationId:t,projectName:e})=>{const r=HIe(),[n,i]=A.useState(!1),o=A.useCallback(async()=>{i(!0),await r.delete(t,e),i(!1)},[r,t,e]);return P.jsx(Ti,{"data-testid":`remove-project-${e}-button`,_hover:{backgroundColor:"gray.100"},"aria-label":"removeTable",color:"gray.400",loading:n,variant:"ghost",onClick:o,children:P.jsx(Ab,{})})});class ZIe{constructor(e){this.rootStore=e,lt(this,{},{autoBind:!0}),this.init()}get totalCount(){return this.meProjects.edges.length}get hasNextPage(){return this.meProjects.availableNextPage}get items(){return this.meProjects.edges.map(({node:e})=>({id:e.id,name:e.name,organizationId:e.organization.id,touched:e.rootBranch.touched,link:GIe(e)}))}get meProjects(){return this.rootStore.cache.meProjectsConnection}tryToFetchNextPage(){this.hasNextPage&&this.rootStore.backend.queryMeProjects({first:100})}init(){}dispose(){}}const GIe=t=>fa(`/${Pu}/${ku}/${Cu}/${Tu}${t.rootBranch.touched?`/${pP}`:""}`,{organizationId:t.organization.id,projectName:t.name,branchName:t.rootBranch.name}),YIe=()=>{const[t]=A.useState(()=>new ZIe(gt));return A.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t},KIe="_Row_1lkxi_1",JIe="_RemoveRowButton_1lkxi_1",mV={Row:KIe,RemoveRowButton:JIe},e$e=mt(()=>{const t=YIe();return P.jsx(PA,{useWindowScroll:!0,totalCount:t.totalCount,defaultItemHeight:40,endReached:t.hasNextPage?t.tryToFetchNextPage:void 0,itemContent:e=>{const r=t.items[e];return P.jsx(ze,{height:"2.5rem",width:"100%",children:P.jsx(Te,{_hover:{backgroundColor:"gray.50"},alignItems:"center",className:mV.Row,gap:"4px",paddingLeft:"1rem","data-testid":`project-${r.name}`,children:P.jsxs(Te,{alignItems:"center",flex:1,justifyContent:"space-between",minHeight:"40px",children:[P.jsxs(Te,{minWidth:"150px",children:[P.jsxs(Te,{gap:"4px",children:[P.jsx(dt,{color:"gray.300",children:r.organizationId}),P.jsx(dt,{color:"gray.300",children:"/"}),P.jsx(dt,{_hover:{textDecoration:"underline"},children:P.jsx(Ua,{to:r.link,"data-testid":`project-${r.organizationId}-${r.name}-link`,children:r.name})})]}),r.touched?"*":""]}),P.jsx(ze,{className:mV.RemoveRowButton,children:P.jsx(XIe,{organizationId:r.organizationId,projectName:r.name})})]})})},r.id)}})}),t$e=()=>{const[t,e]=bZ(!1),r=A.useCallback(()=>{e()},[e]);return P.jsx(gg,{title:P.jsx(ze,{height:"40px"}),children:P.jsx(Te,{flexDirection:"column",gap:"0.5rem",paddingBottom:"1rem",children:t?P.jsx(sRe,{onAdd:r,onCancel:e}):P.jsxs(P.Fragment,{children:[P.jsx(eRe,{onClick:e}),P.jsx(e$e,{})]})})})};var xe=(t=>(t.String="string",t.Number="number",t.Boolean="boolean",t.Object="object",t.Array="array",t))(xe||{}),ki=(t=>(t.Tree="Tree",t.Json="Json",t.RefBy="RefBy",t))(ki||{}),Jt=(t=>(t.RowId="urn:jsonschema:io:revisium:row-id-schema:1.0.0",t.RowCreatedId="urn:jsonschema:io:revisium:row-created-id-schema:1.0.0",t.RowVersionId="urn:jsonschema:io:revisium:row-version-id-schema:1.0.0",t.RowCreatedAt="urn:jsonschema:io:revisium:row-created-at-schema:1.0.0",t.RowPublishedAt="urn:jsonschema:io:revisium:row-published-at-schema:1.0.0",t.RowUpdatedAt="urn:jsonschema:io:revisium:row-updated-at-schema:1.0.0",t.RowHash="urn:jsonschema:io:revisium:row-hash-schema:1.0.0",t.RowSchemaHash="urn:jsonschema:io:revisium:row-schema-hash-schema:1.0.0",t.File="urn:jsonschema:io:revisium:file-schema:1.0.0",t))(Jt||{});const r$e={"urn:jsonschema:io:revisium:row-id-schema:1.0.0":"id","urn:jsonschema:io:revisium:row-version-id-schema:1.0.0":"versionId","urn:jsonschema:io:revisium:row-created-id-schema:1.0.0":"createdId","urn:jsonschema:io:revisium:row-created-at-schema:1.0.0":"createdAt","urn:jsonschema:io:revisium:row-published-at-schema:1.0.0":"publishedAt","urn:jsonschema:io:revisium:row-updated-at-schema:1.0.0":"updatedAt","urn:jsonschema:io:revisium:row-hash-schema:1.0.0":"hash","urn:jsonschema:io:revisium:row-schema-hash-schema:1.0.0":"schemaHash","urn:jsonschema:io:revisium:file-schema:1.0.0":"File"},To=t=>r$e[t],n$e={type:xe.String,default:"",readOnly:!0},i$e={type:xe.String,default:"",readOnly:!0},o$e={type:xe.String,default:"",readOnly:!0},a$e={type:xe.String,default:"",readOnly:!0},s$e={type:xe.String,default:""},l$e={type:xe.String,default:"",readOnly:!0},c$e={type:xe.String,default:"",readOnly:!0},u$e={type:xe.String,default:"",readOnly:!0},d$e={type:xe.Object,properties:{status:{type:xe.String,default:"",readOnly:!0},fileId:{type:xe.String,default:"",readOnly:!0},url:{type:xe.String,default:"",readOnly:!0},fileName:{type:xe.String,default:""},hash:{type:xe.String,default:"",readOnly:!0},extension:{type:xe.String,default:"",readOnly:!0},mimeType:{type:xe.String,default:"",readOnly:!0},size:{type:xe.Number,default:0,readOnly:!0},width:{type:xe.Number,default:0,readOnly:!0},height:{type:xe.Number,default:0,readOnly:!0}},required:["status","fileId","url","fileName","hash","extension","mimeType","size","width","height"],additionalProperties:!1},CA={[Jt.RowId]:n$e,[Jt.RowVersionId]:i$e,[Jt.RowCreatedId]:o$e,[Jt.RowCreatedAt]:a$e,[Jt.RowPublishedAt]:s$e,[Jt.RowUpdatedAt]:l$e,[Jt.RowHash]:c$e,[Jt.RowSchemaHash]:u$e,[Jt.File]:d$e},f$e=({isSelected:t,onClick:e,icon:r,dataTestId:n})=>P.jsx(Ti,{"data-testid":n,_disabled:t?{backgroundColor:"gray.100",cursor:"not-allowed"}:void 0,_hover:{backgroundColor:"gray.50"},disabled:t,alignSelf:"flex-start",variant:"ghost",onClick:e,width:"48px",size:"sm",children:r}),h$e=[{mode:ki.Tree,icon:P.jsx(nSe,{}),dataTestId:"row-editor-mode-tree"},{mode:ki.Json,icon:P.jsx(X1e,{}),dataTestId:"row-editor-mode-json"},{mode:ki.RefBy,icon:P.jsx(gX,{}),dataTestId:"row-editor-mode-refs"}],TA=({mode:t,onChange:e,availableRefByMode:r})=>{const n=A.useMemo(()=>h$e.filter(i=>!(i.mode===ki.RefBy&&!r)),[r]);return P.jsx(Te,{gap:"4px",children:n.map(i=>P.jsx(f$e,{dataTestId:i.dataTestId,isSelected:i.mode===t,onClick:()=>{e==null||e(i.mode)},icon:i.icon},i.mode))})};var Of=(t=>(t.Creating="Creating",t.Updating="Updating",t.Reading="Reading",t))(Of||{});const aG=A.createContext(null),zb=()=>{const t=A.useContext(aG);if(!t)throw new Error("Invalid SchemaEditorActions context");return t};function p$e(t){throw new Error("[mobx-utils] "+t)}function _S(t,e){e===void 0&&(e="Illegal state"),t||p$e(e)}var sG=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(sG(Object.getPrototypeOf(t))||[])},g$e=function(t){var e=sG(t),r=e.filter(function(n,i){return e.indexOf(n)===i});return r},vV=function(t){return g$e(t).filter(function(e){return e!=="constructor"&&!~e.indexOf("__")})},WR="pending",RS="fulfilled",EA="rejected";function m$e(t){switch(this.state){case WR:return t.pending&&t.pending(this.value);case EA:return t.rejected&&t.rejected(this.value);case RS:return t.fulfilled?t.fulfilled(this.value):this.value}}function yV(t,e){if(_S(arguments.length<=2,"fromPromise expects up to two arguments"),_S(typeof t=="function"||typeof t=="object"&&t&&typeof t.then=="function","Please pass a promise or function to fromPromise"),t.isPromiseBasedObservable===!0)return t;typeof t=="function"&&(t=new Promise(t));var r=t;t.then(Cr("observableFromPromise-resolve",function(i){r.value=i,r.state=RS}),Cr("observableFromPromise-reject",function(i){r.value=i,r.state=EA})),r.isPromiseBasedObservable=!0,r.case=m$e;var n=e&&(e.state===RS||e.state===WR)?e.value:void 0;return u2(r,{value:n,state:WR},{},{deep:!1}),r}(function(t){t.reject=Cr("fromPromise.reject",function(r){var n=t(Promise.reject(r));return n.state=EA,n.value=r,n});function e(r){r===void 0&&(r=void 0);var n=t(Promise.resolve(r));return n.state=RS,n.value=r,n}t.resolve=Cr("fromPromise.resolve",e)})(yV||(yV={}));var RO=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,r,o):a(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o};(function(){function t(e,r){var n=this;Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"subscription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Kx(this),ry(function(){n.current=r,n.subscription=e.subscribe(n)})}return Object.defineProperty(t.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.subscription&&this.subscription.unsubscribe()}}),Object.defineProperty(t.prototype,"next",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.current=e}}),Object.defineProperty(t.prototype,"complete",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.dispose()}}),Object.defineProperty(t.prototype,"error",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.current=e,this.dispose()}}),RO([Ut.ref],t.prototype,"current",void 0),RO([Cr.bound],t.prototype,"next",null),RO([Cr.bound],t.prototype,"complete",null),RO([Cr.bound],t.prototype,"error",null),t})();var IS=function(){return IS=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},IS.apply(this,arguments)},Qm=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,r,o):a(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},v$e=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"],y$e=function(){function t(e){var r=this;Object.defineProperty(this,"model",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"localValues",{enumerable:!0,configurable:!0,writable:!0,value:Ut.map({})}),Object.defineProperty(this,"localComputedValues",{enumerable:!0,configurable:!0,writable:!0,value:Ut.map({})}),Object.defineProperty(this,"isPropertyDirty",{enumerable:!0,configurable:!0,writable:!0,value:function(i){return r.localValues.has(i)}}),Kx(this),_S(Wo(e),"createViewModel expects an observable object");var n=vV(this);vV(e).forEach(function(i){var o;if(!n.includes(i)&&!(i===pt||i==="__mobxDidRunLazyInitializers")){if(_S(v$e.indexOf(i)===-1,"The propertyname "+i+" is reserved and cannot be used with viewModels"),dT(e,i)){var a=Os(e,i),s=a.derivation.bind(r),l=(o=a.setter_)===null||o===void 0?void 0:o.bind(r);r.localComputedValues.set(i,Mn(s,{set:l}))}var c=Object.getOwnPropertyDescriptor(e,i),d=c?{enumerable:c.enumerable}:{};Object.defineProperty(r,i,IS(IS({},d),{configurable:!0,get:function(){return dT(e,i)?r.localComputedValues.get(i).get():r.isPropertyDirty(i)?r.localValues.get(i):r.model[i]},set:Cr(function(p){dT(e,i)?r.localComputedValues.get(i).set(p):p!==r.model[i]?r.localValues.set(i,p):r.localValues.delete(i)})}))}})}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return new Map(this.localValues)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"submit",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;iy(this.localValues).forEach(function(r){var n=e.localValues.get(r),i=e.model[r];Xa(i)?i.replace(n):qo(i)?(i.clear(),i.merge(n)):Lve(n)||(e.model[r]=n)}),this.localValues.clear()}}),Object.defineProperty(t.prototype,"reset",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.localValues.clear()}}),Object.defineProperty(t.prototype,"resetProperty",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.localValues.delete(e)}}),Qm([Mn],t.prototype,"isDirty",null),Qm([Mn],t.prototype,"changedValues",null),Qm([Cr.bound],t.prototype,"submit",null),Qm([Cr.bound],t.prototype,"reset",null),Qm([Cr.bound],t.prototype,"resetProperty",null),t}();function Bf(t){return new y$e(t)}var b$e=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){b$e(e,t);function e(r,n,i){var o=i===void 0?{}:i,a=o.name,s=a===void 0?"ogm"+(Math.random()*1e3|0):a,l=o.keyToName,c=l===void 0?function(g){return""+g}:l,d=t.call(this)||this;Object.defineProperty(d,"_base",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_ogmInfoKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_groupBy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_keyToName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_disposeBaseObserver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),d._keyToName=c,d._groupBy=n,d._ogmInfoKey=Symbol("ogmInfo"+s),d._base=r;for(var p=0;p<r.length;p++)d._addItem(r[p]);return d._disposeBaseObserver=Yx(d._base,function(g){if(g.type==="splice")fs(function(){for(var m=0,y=g.removed;m<y.length;m++){var b=y[m];d._removeItem(b)}for(var O=0,S=g.added;O<S.length;O++){var w=S[O];d._addItem(w)}});else if(g.type==="update")fs(function(){d._removeItem(g.oldValue),d._addItem(g.newValue)});else throw new Error("illegal state")}),d}return Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){throw new Error("not supported")}}),Object.defineProperty(e.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(r){throw new Error("not supported")}}),Object.defineProperty(e.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){throw new Error("not supported")}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._disposeBaseObserver();for(var r=0;r<this._base.length;r++){var n=this._base[r],i=n[this._ogmInfoKey];i.reaction(),delete n[this._ogmInfoKey]}}}),Object.defineProperty(e.prototype,"_getGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=t.prototype.get.call(this,r);return n===void 0&&(n=Ut([],{name:"GroupArray["+this._keyToName(r)+"]",deep:!1}),t.prototype.set.call(this,r,n)),n}}),Object.defineProperty(e.prototype,"_removeFromGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=t.prototype.get.call(this,r);i.length===1?t.prototype.delete.call(this,r):(n===i.length-1||(i[n]=i[i.length-1],i[n][this._ogmInfoKey].groupArrIndex=n),i.length--)}}),Object.defineProperty(e.prototype,"_addItem",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=this._groupBy(r),o=this._getGroupArr(i),a={groupByValue:i,groupArrIndex:o.length,reaction:ol(function(){return n._groupBy(r)},function(s,l){var c=r[n._ogmInfoKey];n._removeFromGroupArr(c.groupByValue,c.groupArrIndex);var d=n._getGroupArr(s),p=d.length;d.push(r),c.groupByValue=s,c.groupArrIndex=p})};Object.defineProperty(r,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:a}),o.push(r)}}),Object.defineProperty(e.prototype,"_removeItem",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r[this._ogmInfoKey];this._removeFromGroupArr(n.groupByValue,n.groupArrIndex),n.reaction(),delete r[this._ogmInfoKey]}}),e})(Jx);const vl=(t,e)=>(e.title&&(t.title=e.title),e.description&&(t.description=e.description),e.deprecated&&(t.deprecated=e.deprecated),t);var yc=(t=>(t.Object="object",t.Array="array",t.String="string",t.StringForeignKey="stringForeignKey",t.Number="number",t.Boolean="boolean",t))(yc||{});class ti{constructor(e){de(this,"nodeId",vn());de(this,"type",yc.Array);de(this,"isCollapsible",!0);de(this,"isCollapsed",!1);de(this,"showSettings",!1);de(this,"$ref","");de(this,"state");lt(this,{},{autoBind:!0}),e.setParent(this),e.submitChanges(),this.state=Bf(Ut({id:"",items:e,parent:null,connectedToParent:!1,title:"",description:"",deprecated:!1}))}get isDisabled(){var e;return!!((e=this.draftParent)!=null&&e.$ref)}get label(){return To(this.$ref)??this.type}setNodeId(e){this.nodeId=e}get id(){return this.state.model.id}get draftId(){return this.state.id}get title(){return this.state.model.title}get draftTitle(){return this.state.title}get description(){return this.state.model.description}get draftDescription(){return this.state.description}get deprecated(){return this.state.model.deprecated}get draftDeprecated(){return this.state.deprecated}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}get items(){return this.state.model.items}get draftItems(){return this.state.items}getSchema(e){if(this.$ref)return vl({$ref:this.$ref},this.state);const r={type:xe.Array,items:this.getItemsSchema(e)};return vl(r,this.state)}getItemsSchema(e){return this.state.items instanceof ti?this.state.items.getSchema(e):this.state.items instanceof yn?this.state.items.getSchema(e):this.state.items.getSchema()}get isValid(){return this.state.items.isValid}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself||this.state.items.isDirty}setId(e){this.state.id=e}setTitle(e){this.state.title=e}setDescription(e){this.state.description=e}setDeprecated(e){this.state.deprecated=e}setParent(e){this.state.parent=e,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}replaceItems(e){e.draftParent instanceof yn&&e.draftParent.removeProperty(e.nodeId),e.setNodeId(this.state.items.nodeId),e.setParent(this),this.state.items=e}submitChanges(){this.state.submit(),this.state.items.submitChanges()}toggleCollapsed(){this.isCollapsed=!this.isCollapsed}resetChanges(){this.state.reset(),this.state.items.resetChanges()}toggleSettings(){this.showSettings=!this.showSettings,this.showSettings&&this.isCollapsible&&this.isCollapsed&&(this.isCollapsed=!1)}}class yn{constructor(){de(this,"nodeId",vn());de(this,"type",yc.Object);de(this,"isCollapsible",!0);de(this,"isCollapsed",!1);de(this,"showSettings",!1);de(this,"$ref","");de(this,"state");lt(this,{},{autoBind:!0}),this.state=Bf(Ut({id:"",properties:[],parent:null,connectedToParent:!1,title:"",description:"",deprecated:!1}))}get isDisabled(){var e;return!!((e=this.draftParent)!=null&&e.$ref)}get label(){return To(this.$ref)??this.type}setNodeId(e){this.nodeId=e}get id(){return this.state.model.id}get draftId(){return this.state.id}get title(){return this.state.model.title}get draftTitle(){return this.state.title}get description(){return this.state.model.description}get draftDescription(){return this.state.description}get deprecated(){return this.state.model.deprecated}get draftDeprecated(){return this.state.deprecated}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}get properties(){return this.state.model.properties}get draftProperties(){return this.state.properties}get addedProperties(){return this.draftProperties.filter(e=>!e.parent&&!this.properties.find(r=>r.nodeId===e.nodeId))}get removedProperties(){return this.properties.filter(e=>{const r=!this.draftProperties.find(n=>n.nodeId===e.nodeId);return!e.draftConnectedToParent&&r})}get notChangedProperties(){return this.properties.filter(e=>this.draftProperties.find(r=>r===e))}get replacedProperties(){return this.properties.filter(e=>this.draftProperties.find(r=>r.nodeId===e.nodeId&&r!==e)).map(e=>{const r=this.draftProperties.find(n=>n.nodeId===e.nodeId);if(!r)throw new Error("Invalid replacedProperties");return{previousProperty:e,currentProperty:r}})}get movedProperties(){return this.draftProperties.filter(e=>e.parent&&e.parent!==this)}get changedIdProperties(){return this.draftProperties.filter(e=>{const r=this.properties.find(n=>n.nodeId===e.nodeId);return r&&e.draftId!==r.id}).map(e=>{const r=this.properties.find(n=>n.nodeId===e.nodeId);if(!r)throw new Error("Invalid replacedProperties");return{previousProperty:r,currentProperty:e}})}getSchema(e){if(this.$ref)return vl({$ref:this.$ref},this.state);const r={},n=[];e!=null&&e.skipObjectProperties||this.state.properties.forEach(a=>{e!=null&&e.skipMovedBetweenParentsNodes&&a.parent!==a.draftParent||(a instanceof ti||a instanceof yn?r[a.draftId]=a.getSchema(e):r[a.draftId]=a.getSchema(),n.push(a.draftId))});const i=n.sort((a,s)=>a.localeCompare(s)),o={type:xe.Object,additionalProperties:!1,required:i,properties:r};return vl(o,this.state)}get isValid(){const e=new Set(this.state.properties.map(n=>n.draftId)).size===this.state.properties.length,r=this.state.properties.every(n=>n.isValid&&!!n.draftId);return e&&r}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself||this.state.properties.some(e=>e.isDirty)}get showingCreateField(){return this.$ref?!1:!!this.state.id||!!this.state.parent}get isDisabledCreateField(){var n;const e=!!this.state.id||!this.state.id&&((n=this.state.parent)==null?void 0:n.type)===yc.Array,r=this.state.properties.every(i=>!!i.draftId);return!e||!r}setId(e){this.state.id=e}setTitle(e){this.state.title=e}setDescription(e){this.state.description=e}setDeprecated(e){this.state.deprecated=e}setParent(e){this.state.parent=e,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}removeProperty(e){const r=this.state.properties.findIndex(n=>n.nodeId===e);r!==-1&&(this.state.properties[r].onRemoveFromParent(),this.createIfNeededNextProperties(),this.state.properties.splice(r,1),this.resetIfNeededProperties())}addProperty(e,r=null){if(e.draftParent instanceof yn)e.draftParent.removeProperty(e.nodeId);else if(e.draftParent instanceof ti)throw new Error("Invalid parent");e.setParent(this),this.createIfNeededNextProperties();const n=this.state.properties.findIndex(o=>o===(r==null?void 0:r.beforeNode)),i=this.state.properties.findIndex(o=>o===(r==null?void 0:r.afterNode));n!==-1?this.state.properties.splice(n,0,e):i!==-1?this.state.properties.splice(i+1,0,e):this.state.properties.push(e)}getProperty(e){const r=this.properties.find(n=>n.id===e);if(!r)throw new Error("Invalid id");return r}getDraftProperty(e){const r=this.draftProperties.find(n=>n.id===e);if(!r)throw new Error("Invalid id");return r}hasProperty(e){return!!this.state.properties.find(n=>n===e)}replaceProperty(e,r){const n=this.state.properties.findIndex(i=>i.nodeId===e.nodeId);n!==-1&&(e.onRemoveFromParent(),e.parent&&(r.setId(e.id),r.setParent(e.parent),r.submitChanges()),r.setId(e.draftId),r.setNodeId(e.nodeId),r.setParent(this),this.createIfNeededNextProperties(),this.state.properties.splice(n,1,r))}toggleCollapsed(){this.isCollapsed=!this.isCollapsed}submitChanges(){this.state.submit();for(const e of this.state.properties)e.submitChanges()}resetChanges(){this.state.reset();for(const e of this.state.properties)e.resetChanges()}createIfNeededNextProperties(){this.state.isPropertyDirty("properties")||(this.state.properties=this.state.properties.slice())}resetIfNeededProperties(){const e=this.state.model.properties.map(n=>n.nodeId),r=this.state.properties.map(n=>n.nodeId);if(e.length===r.length){for(let n=0;n<e.length;n++)if(e[n]!==r[n])return;this.state.resetProperty("properties")}}toggleSettings(){this.showSettings=!this.showSettings,this.showSettings&&this.isCollapsible&&this.isCollapsed&&(this.isCollapsed=!1)}}class af{constructor(){de(this,"nodeId",vn());de(this,"type",yc.String);de(this,"isCollapsible",!1);de(this,"isCollapsed",!1);de(this,"showSettings",!1);de(this,"$ref","");de(this,"state");lt(this,{},{autoBind:!0}),this.state=Bf(Ut({id:"",foreignKey:null,contentMediaType:null,parent:null,connectedToParent:!1,title:"",description:"",deprecated:!1}))}get isDisabled(){var e;return!!((e=this.draftParent)!=null&&e.$ref)}get label(){return this.draftForeignKey?"foreign key":this.state.contentMediaType?this.state.contentMediaType:To(this.$ref)??this.type}setNodeId(e){this.nodeId=e}get id(){return this.state.model.id}get draftId(){return this.state.id}get title(){return this.state.model.title}get draftTitle(){return this.state.title}get description(){return this.state.model.description}get draftDescription(){return this.state.description}get deprecated(){return this.state.model.deprecated}get draftDeprecated(){return this.state.deprecated}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}get foreignKey(){return this.state.model.foreignKey}get draftForeignKey(){return this.state.foreignKey}getSchema(){var r,n;if(this.$ref)return vl({$ref:this.$ref},this.state);const e={type:xe.String,default:""};return(r=this.state.foreignKey)!=null&&r.draftForeignKey&&(e.foreignKey=(n=this.state.foreignKey)==null?void 0:n.draftForeignKey),this.state.contentMediaType&&(e.contentMediaType=this.state.contentMediaType),vl(e,this.state)}get isValid(){return!(this.state.foreignKey&&!this.state.foreignKey.draftForeignKey)}get isDirtyItself(){return this.state.isDirty||!!(this.state.foreignKey&&this.state.foreignKey.isDirtyItself)}get isDirty(){return this.isDirtyItself}setId(e){this.state.id=e}setTitle(e){this.state.title=e}setDescription(e){this.state.description=e}setDeprecated(e){this.state.deprecated=e}setParent(e){this.state.parent=e,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}setForeignKey(e){this.state.foreignKey=e,e&&e.setParent(this)}setContentMediaType(e){this.state.contentMediaType=e}submitChanges(){this.state.submit(),this.state.foreignKey&&this.state.foreignKey.submitChanges()}resetChanges(){this.state.reset(),this.state.foreignKey&&this.state.foreignKey.resetChanges()}toggleSettings(){this.showSettings=!this.showSettings}}var sE={},Vm={},bV;function lG(){if(bV)return Vm;bV=1,Object.defineProperty(Vm,"__esModule",{value:!0}),Vm.bind=void 0;function t(e,r){var n=r.type,i=r.listener,o=r.options;return e.addEventListener(n,i,o),function(){e.removeEventListener(n,i,o)}}return Vm.bind=t,Vm}var $d={},OV;function O$e(){if(OV)return $d;OV=1;var t=$d&&$d.__assign||function(){return t=Object.assign||function(o){for(var a,s=1,l=arguments.length;s<l;s++){a=arguments[s];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])}return o},t.apply(this,arguments)};Object.defineProperty($d,"__esModule",{value:!0}),$d.bindAll=void 0;var e=lG();function r(o){if(!(typeof o>"u"))return typeof o=="boolean"?{capture:o}:o}function n(o,a){if(a==null)return o;var s=t(t({},o),{options:t(t({},r(a)),r(o.options))});return s}function i(o,a,s){var l=a.map(function(c){var d=n(c,s);return(0,e.bind)(o,d)});return function(){l.forEach(function(d){return d()})}}return $d.bindAll=i,$d}var wV;function w$e(){return wV||(wV=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=t.bind=void 0;var e=lG();Object.defineProperty(t,"bind",{enumerable:!0,get:function(){return e.bind}});var r=O$e();Object.defineProperty(t,"bindAll",{enumerable:!0,get:function(){return r.bindAll}})}(sE)),sE}var IP=w$e(),jv={isSafari:!1,leavingWindow:Symbol("leaving"),enteringWindow:Symbol("entering")};function S$e(t){var e=t.dragLeave;return e.type!=="dragleave"?!1:jv.isSafari?e.hasOwnProperty(jv.leavingWindow):e.relatedTarget==null}(function(){if(typeof window>"u")return;var e=navigator,r=e.userAgent,n=r.includes("AppleWebKit")&&!r.includes("Chrome");if(!n)return;jv.isSafari=!0;function i(){return{enterCount:0,isOverWindow:!1}}var o=i();function a(){o=i()}IP.bindAll(window,[{type:"dragstart",listener:function(){o.enterCount=0,o.isOverWindow=!0}},{type:"drop",listener:a},{type:"dragend",listener:a},{type:"dragenter",listener:function(l){!o.isOverWindow&&o.enterCount===0&&(l[jv.enteringWindow]=!0),o.isOverWindow=!0,o.enterCount++}},{type:"dragleave",listener:function(l){o.enterCount--,o.isOverWindow&&o.enterCount===0&&(l[jv.leavingWindow]=!0,o.isOverWindow=!1)}}],{capture:!0})})();function x$e(t,e){var r=e.property,n=e.rule,i=e.priority,o=i===void 0?"":i,a=t.style.getPropertyValue(r),s=t.style.getPropertyPriority(r);return t.style.setProperty(r,n,o),function(){t.style.setProperty(r,a,s)}}function P$e(t){var e=t.current,r=document.elementFromPoint(e.input.clientX,e.input.clientY);return r instanceof HTMLElement?x$e(r,{property:"pointer-events",rule:"auto",priority:"important"}):null}function k$e(){var t,e=document.createElement("style");return e.setAttribute("pdnd-post-drag-fix","true"),document.head.appendChild(e),(t=e.sheet)===null||t===void 0||t.insertRule("* { pointer-events: none !important; }"),function(){document.head.removeChild(e)}}function SV(t){var e=t.current;queueMicrotask(function(){var r=P$e({current:e}),n=k$e();function i(){o(),r==null||r(),n()}var o=IP.bindAll(window,[{type:"pointerdown",listener:i},{type:"pointermove",listener:i},{type:"focusin",listener:i},{type:"focusout",listener:i},{type:"dragstart",listener:i}],{capture:!0})})}function _A(t){return{altKey:t.altKey,button:t.button,buttons:t.buttons,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY}}var C$e=function(e){var r=[],n=null,i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];r=s,!n&&(n=requestAnimationFrame(function(){n=null,e.apply(void 0,r)}))};return i.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},i},lE=C$e(function(t){return t()}),IO=function(){var t=null;function e(n){var i=requestAnimationFrame(function(){t=null,n()});t={frameId:i,fn:n}}function r(){t&&(cancelAnimationFrame(t.frameId),t.fn(),t=null)}return{schedule:e,flush:r}}();function T$e(t){var e=t.source,r=t.initial,n=t.dispatchEvent,i={dropTargets:[]};function o(s){n(s),i={dropTargets:s.payload.location.current.dropTargets}}var a={start:function(l){var c=l.nativeSetDragImage,d={current:r,previous:i,initial:r};o({eventName:"onGenerateDragPreview",payload:{source:e,location:d,nativeSetDragImage:c}}),IO.schedule(function(){o({eventName:"onDragStart",payload:{source:e,location:d}})})},dragUpdate:function(l){var c=l.current;IO.flush(),lE.cancel(),o({eventName:"onDropTargetChange",payload:{source:e,location:{initial:r,previous:i,current:c}}})},drag:function(l){var c=l.current;lE(function(){IO.flush();var d={initial:r,previous:i,current:c};o({eventName:"onDrag",payload:{source:e,location:d}})})},drop:function(l){var c=l.current,d=l.updatedExternalPayload;IO.flush(),lE.cancel(),o({eventName:"onDrop",payload:{source:d??e,location:{current:c,previous:i,initial:r}}})}};return a}var UR=!1;function cG(){return!UR}function E$e(t){return t.dataTransfer?t.dataTransfer.setDragImage.bind(t.dataTransfer):null}function _$e(t){var e=t.current,r=t.next;if(e.length!==r.length)return!0;for(var n=0;n<e.length;n++)if(e[n].element!==r[n].element)return!0;return!1}function R$e(t){var e=t.event,r=t.dragInterface,n=t.getDropTargetsOver,i=t.dispatchEvent;if(!cG())return;UR=!0;var o=I$e({event:e,dragInterface:r,getDropTargetsOver:n}),a=o;cE({event:e,current:o.dropTargets});var s=T$e({source:r.payload,dispatchEvent:i,initial:o});function l(y){var b=_$e({current:a.dropTargets,next:y.dropTargets});a=y,b&&s.dragUpdate({current:a})}function c(y){var b=_A(y),O=n({target:y.target,input:b,source:r.payload,current:a.dropTargets});O.length&&(y.preventDefault(),cE({event:y,current:O})),l({dropTargets:O,input:b})}function d(y){var b=y.updatedExternalPayload;s.drop({current:a,updatedExternalPayload:b})}function p(){a.dropTargets.length&&l({dropTargets:[],input:a.input}),d({updatedExternalPayload:null}),g()}function g(){UR=!1,m()}var m=IP.bindAll(window,[{type:"dragover",listener:function(b){c(b),s.drag({current:a})}},{type:"dragenter",listener:c},{type:"dragleave",listener:function(b){S$e({dragLeave:b})&&(l({input:a.input,dropTargets:[]}),r.startedFrom==="external"&&p())}},{type:"drop",listener:function(b){var O;b.preventDefault(),cE({event:b,current:a.dropTargets}),d({updatedExternalPayload:r.startedFrom==="external"&&((O=r.getDropPayload)===null||O===void 0?void 0:O.call(r,b))||null}),g(),r.startedFrom==="internal"&&SV({current:a})}},{type:"dragend",listener:function(){p(),r.startedFrom==="internal"&&SV({current:a})}},{type:"pointermove",listener:function(){var y=0;return function(){if(y<20){y++;return}p()}}()},{type:"pointerdown",listener:p}],{capture:!0});s.start({nativeSetDragImage:E$e(e)})}function cE(t){var e,r=t.event,n=t.current,i=(e=n[0])===null||e===void 0?void 0:e.dropEffect;i!=null&&r.dataTransfer&&(r.dataTransfer.dropEffect=i)}function I$e(t){var e=t.event,r=t.dragInterface,n=t.getDropTargetsOver,i=_A(e);if(r.startedFrom==="external")return{input:i,dropTargets:[]};var o=n({input:i,source:r.payload,target:e.target,current:[]});return{input:i,dropTargets:o}}var xV={canStart:cG,start:R$e},HR=new Map;function $$e(t){var e=t.typeKey,r=t.mount,n=HR.get(e);if(n)return n.usageCount++,n;var i={typeKey:e,unmount:r(),usageCount:1};return HR.set(e,i),i}function A$e(t){var e=$$e(t);return function(){e.usageCount--,!(e.usageCount>0)&&(e.unmount(),HR.delete(t.typeKey))}}function Ry(t){"@babel/helpers - typeof";return Ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ry(t)}function M$e(t,e){if(Ry(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ry(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function N$e(t){var e=M$e(t,"string");return Ry(e)=="symbol"?e:e+""}function uG(t,e,r){return(e=N$e(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function XR(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function j$e(t){if(Array.isArray(t))return XR(t)}function D$e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function L$e(t,e){if(t){if(typeof t=="string")return XR(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?XR(t,e):void 0}}function Q$e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1084
|
+
`,qIe=async t=>{const e=await _r.mutate({mutation:zIe,variables:t});if(!e.data)throw e.errors;return e.data};class WIe{constructor(e,r,n){this.rootStore=e,this.organizationId=r,this.projectName=n}async execute(){const e=await this.deleteProjectRequest();return await this.updateProjectsConnection(),await this.updateMeProjectsConnection(),e}async deleteProjectRequest(){const{deleteProject:e}=await qIe({data:{organizationId:this.organizationId,projectName:this.projectName}});return e}async updateProjectsConnection(){const e=this.rootStore.cache.organization.get(this.organizationId),r=e==null?void 0:e.projectsConnection.edges.find(n=>n.node.name===this.projectName);e==null||e.projectsConnection.removeEdge(r==null?void 0:r.cursor)}async updateMeProjectsConnection(){const e=this.rootStore.cache.meProjectsConnection.edges.find(r=>r.node.name===this.projectName);this.rootStore.cache.meProjectsConnection.removeEdge(e==null?void 0:e.cursor)}}class UIe{constructor(e){this.rootStore=e}async delete(e,r){try{return await new WIe(this.rootStore,e,r).execute()}catch(n){return console.error(n),!1}}init(){}dispose(){}}const HIe=()=>{const[t]=A.useState(()=>new UIe(gt));return A.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t},XIe=mt(({organizationId:t,projectName:e})=>{const r=HIe(),[n,i]=A.useState(!1),o=A.useCallback(async()=>{i(!0),await r.delete(t,e),i(!1)},[r,t,e]);return P.jsx(Ti,{"data-testid":`remove-project-${e}-button`,_hover:{backgroundColor:"gray.100"},"aria-label":"removeTable",color:"gray.400",loading:n,variant:"ghost",onClick:o,children:P.jsx(Ab,{})})});class ZIe{constructor(e){this.rootStore=e,lt(this,{},{autoBind:!0}),this.init()}get totalCount(){return this.meProjects.edges.length}get hasNextPage(){return this.meProjects.availableNextPage}get items(){return this.meProjects.edges.map(({node:e})=>({id:e.id,name:e.name,organizationId:e.organization.id,touched:e.rootBranch.touched,link:GIe(e)}))}get meProjects(){return this.rootStore.cache.meProjectsConnection}tryToFetchNextPage(){this.hasNextPage&&this.rootStore.backend.queryMeProjects({first:100})}init(){}dispose(){}}const GIe=t=>fa(`/${Pu}/${ku}/${Cu}/${Tu}${t.rootBranch.touched?`/${pP}`:""}`,{organizationId:t.organization.id,projectName:t.name,branchName:t.rootBranch.name}),YIe=()=>{const[t]=A.useState(()=>new ZIe(gt));return A.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t},KIe="_Row_1lkxi_1",JIe="_RemoveRowButton_1lkxi_1",mV={Row:KIe,RemoveRowButton:JIe},e$e=mt(()=>{const t=YIe();return P.jsx(PA,{useWindowScroll:!0,totalCount:t.totalCount,defaultItemHeight:40,endReached:t.hasNextPage?t.tryToFetchNextPage:void 0,itemContent:e=>{const r=t.items[e];return P.jsx(ze,{height:"2.5rem",width:"100%",children:P.jsx(Te,{_hover:{backgroundColor:"gray.50"},alignItems:"center",className:mV.Row,gap:"4px",paddingLeft:"1rem","data-testid":`project-${r.name}`,children:P.jsxs(Te,{alignItems:"center",flex:1,justifyContent:"space-between",minHeight:"40px",children:[P.jsxs(Te,{minWidth:"150px",children:[P.jsxs(Te,{gap:"4px",children:[P.jsx(dt,{color:"gray.300",children:r.organizationId}),P.jsx(dt,{color:"gray.300",children:"/"}),P.jsx(dt,{_hover:{textDecoration:"underline"},children:P.jsx(Ua,{to:r.link,"data-testid":`project-${r.organizationId}-${r.name}-link`,children:r.name})})]}),r.touched?"*":""]}),P.jsx(ze,{className:mV.RemoveRowButton,children:P.jsx(XIe,{organizationId:r.organizationId,projectName:r.name})})]})})},r.id)}})}),t$e=()=>{const[t,e]=bZ(!1),r=A.useCallback(()=>{e()},[e]);return P.jsx(gg,{title:P.jsx(ze,{height:"40px"}),children:P.jsx(Te,{flexDirection:"column",gap:"0.5rem",paddingBottom:"1rem",children:t?P.jsx(sRe,{onAdd:r,onCancel:e}):P.jsxs(P.Fragment,{children:[P.jsx(eRe,{onClick:e}),P.jsx(e$e,{})]})})})};var xe=(t=>(t.String="string",t.Number="number",t.Boolean="boolean",t.Object="object",t.Array="array",t))(xe||{}),ki=(t=>(t.Tree="Tree",t.Json="Json",t.RefBy="RefBy",t))(ki||{}),Jt=(t=>(t.RowId="urn:jsonschema:io:revisium:row-id-schema:1.0.0",t.RowCreatedId="urn:jsonschema:io:revisium:row-created-id-schema:1.0.0",t.RowVersionId="urn:jsonschema:io:revisium:row-version-id-schema:1.0.0",t.RowCreatedAt="urn:jsonschema:io:revisium:row-created-at-schema:1.0.0",t.RowPublishedAt="urn:jsonschema:io:revisium:row-published-at-schema:1.0.0",t.RowUpdatedAt="urn:jsonschema:io:revisium:row-updated-at-schema:1.0.0",t.RowHash="urn:jsonschema:io:revisium:row-hash-schema:1.0.0",t.RowSchemaHash="urn:jsonschema:io:revisium:row-schema-hash-schema:1.0.0",t.File="urn:jsonschema:io:revisium:file-schema:1.0.0",t))(Jt||{});const r$e={"urn:jsonschema:io:revisium:row-id-schema:1.0.0":"id","urn:jsonschema:io:revisium:row-version-id-schema:1.0.0":"versionId","urn:jsonschema:io:revisium:row-created-id-schema:1.0.0":"createdId","urn:jsonschema:io:revisium:row-created-at-schema:1.0.0":"createdAt","urn:jsonschema:io:revisium:row-published-at-schema:1.0.0":"publishedAt","urn:jsonschema:io:revisium:row-updated-at-schema:1.0.0":"updatedAt","urn:jsonschema:io:revisium:row-hash-schema:1.0.0":"hash","urn:jsonschema:io:revisium:row-schema-hash-schema:1.0.0":"schemaHash","urn:jsonschema:io:revisium:file-schema:1.0.0":"File"},To=t=>r$e[t],n$e={type:xe.String,default:"",readOnly:!0},i$e={type:xe.String,default:"",readOnly:!0},o$e={type:xe.String,default:"",readOnly:!0},a$e={type:xe.String,default:"",readOnly:!0},s$e={type:xe.String,default:""},l$e={type:xe.String,default:"",readOnly:!0},c$e={type:xe.String,default:"",readOnly:!0},u$e={type:xe.String,default:"",readOnly:!0},d$e={type:xe.Object,properties:{status:{type:xe.String,default:"",readOnly:!0},fileId:{type:xe.String,default:"",readOnly:!0},url:{type:xe.String,default:"",readOnly:!0},fileName:{type:xe.String,default:""},hash:{type:xe.String,default:"",readOnly:!0},extension:{type:xe.String,default:"",readOnly:!0},mimeType:{type:xe.String,default:"",readOnly:!0},size:{type:xe.Number,default:0,readOnly:!0},width:{type:xe.Number,default:0,readOnly:!0},height:{type:xe.Number,default:0,readOnly:!0}},required:["status","fileId","url","fileName","hash","extension","mimeType","size","width","height"],additionalProperties:!1},CA={[Jt.RowId]:n$e,[Jt.RowVersionId]:i$e,[Jt.RowCreatedId]:o$e,[Jt.RowCreatedAt]:a$e,[Jt.RowPublishedAt]:s$e,[Jt.RowUpdatedAt]:l$e,[Jt.RowHash]:c$e,[Jt.RowSchemaHash]:u$e,[Jt.File]:d$e},f$e=({isSelected:t,onClick:e,icon:r,dataTestId:n})=>P.jsx(Ti,{"data-testid":n,_disabled:t?{backgroundColor:"gray.100",cursor:"not-allowed"}:void 0,_hover:{backgroundColor:"gray.50"},disabled:t,alignSelf:"flex-start",variant:"ghost",onClick:e,width:"48px",size:"sm",children:r}),h$e=[{mode:ki.Tree,icon:P.jsx(nSe,{}),dataTestId:"row-editor-mode-tree"},{mode:ki.Json,icon:P.jsx(X1e,{}),dataTestId:"row-editor-mode-json"},{mode:ki.RefBy,icon:P.jsx(gX,{}),dataTestId:"row-editor-mode-refs"}],TA=({mode:t,onChange:e,availableRefByMode:r})=>{const n=A.useMemo(()=>h$e.filter(i=>!(i.mode===ki.RefBy&&!r)),[r]);return P.jsx(Te,{gap:"4px",children:n.map(i=>P.jsx(f$e,{dataTestId:i.dataTestId,isSelected:i.mode===t,onClick:()=>{e==null||e(i.mode)},icon:i.icon},i.mode))})};var Of=(t=>(t.Creating="Creating",t.Updating="Updating",t.Reading="Reading",t))(Of||{});const aG=A.createContext(null),zb=()=>{const t=A.useContext(aG);if(!t)throw new Error("Invalid SchemaEditorActions context");return t};function p$e(t){throw new Error("[mobx-utils] "+t)}function _S(t,e){e===void 0&&(e="Illegal state"),t||p$e(e)}var sG=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(sG(Object.getPrototypeOf(t))||[])},g$e=function(t){var e=sG(t),r=e.filter(function(n,i){return e.indexOf(n)===i});return r},vV=function(t){return g$e(t).filter(function(e){return e!=="constructor"&&!~e.indexOf("__")})},WR="pending",RS="fulfilled",EA="rejected";function m$e(t){switch(this.state){case WR:return t.pending&&t.pending(this.value);case EA:return t.rejected&&t.rejected(this.value);case RS:return t.fulfilled?t.fulfilled(this.value):this.value}}function yV(t,e){if(_S(arguments.length<=2,"fromPromise expects up to two arguments"),_S(typeof t=="function"||typeof t=="object"&&t&&typeof t.then=="function","Please pass a promise or function to fromPromise"),t.isPromiseBasedObservable===!0)return t;typeof t=="function"&&(t=new Promise(t));var r=t;t.then(Cr("observableFromPromise-resolve",function(i){r.value=i,r.state=RS}),Cr("observableFromPromise-reject",function(i){r.value=i,r.state=EA})),r.isPromiseBasedObservable=!0,r.case=m$e;var n=e&&(e.state===RS||e.state===WR)?e.value:void 0;return u2(r,{value:n,state:WR},{},{deep:!1}),r}(function(t){t.reject=Cr("fromPromise.reject",function(r){var n=t(Promise.reject(r));return n.state=EA,n.value=r,n});function e(r){r===void 0&&(r=void 0);var n=t(Promise.resolve(r));return n.state=RS,n.value=r,n}t.resolve=Cr("fromPromise.resolve",e)})(yV||(yV={}));var RO=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,r,o):a(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o};(function(){function t(e,r){var n=this;Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"subscription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Kx(this),ry(function(){n.current=r,n.subscription=e.subscribe(n)})}return Object.defineProperty(t.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.subscription&&this.subscription.unsubscribe()}}),Object.defineProperty(t.prototype,"next",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.current=e}}),Object.defineProperty(t.prototype,"complete",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.dispose()}}),Object.defineProperty(t.prototype,"error",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.current=e,this.dispose()}}),RO([Ut.ref],t.prototype,"current",void 0),RO([Cr.bound],t.prototype,"next",null),RO([Cr.bound],t.prototype,"complete",null),RO([Cr.bound],t.prototype,"error",null),t})();var IS=function(){return IS=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},IS.apply(this,arguments)},Qm=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,r,o):a(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},v$e=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"],y$e=function(){function t(e){var r=this;Object.defineProperty(this,"model",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"localValues",{enumerable:!0,configurable:!0,writable:!0,value:Ut.map({})}),Object.defineProperty(this,"localComputedValues",{enumerable:!0,configurable:!0,writable:!0,value:Ut.map({})}),Object.defineProperty(this,"isPropertyDirty",{enumerable:!0,configurable:!0,writable:!0,value:function(i){return r.localValues.has(i)}}),Kx(this),_S(Wo(e),"createViewModel expects an observable object");var n=vV(this);vV(e).forEach(function(i){var o;if(!n.includes(i)&&!(i===pt||i==="__mobxDidRunLazyInitializers")){if(_S(v$e.indexOf(i)===-1,"The propertyname "+i+" is reserved and cannot be used with viewModels"),dT(e,i)){var a=Os(e,i),s=a.derivation.bind(r),l=(o=a.setter_)===null||o===void 0?void 0:o.bind(r);r.localComputedValues.set(i,Mn(s,{set:l}))}var c=Object.getOwnPropertyDescriptor(e,i),d=c?{enumerable:c.enumerable}:{};Object.defineProperty(r,i,IS(IS({},d),{configurable:!0,get:function(){return dT(e,i)?r.localComputedValues.get(i).get():r.isPropertyDirty(i)?r.localValues.get(i):r.model[i]},set:Cr(function(p){dT(e,i)?r.localComputedValues.get(i).set(p):p!==r.model[i]?r.localValues.set(i,p):r.localValues.delete(i)})}))}})}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return new Map(this.localValues)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"submit",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;iy(this.localValues).forEach(function(r){var n=e.localValues.get(r),i=e.model[r];Xa(i)?i.replace(n):qo(i)?(i.clear(),i.merge(n)):Lve(n)||(e.model[r]=n)}),this.localValues.clear()}}),Object.defineProperty(t.prototype,"reset",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.localValues.clear()}}),Object.defineProperty(t.prototype,"resetProperty",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.localValues.delete(e)}}),Qm([Mn],t.prototype,"isDirty",null),Qm([Mn],t.prototype,"changedValues",null),Qm([Cr.bound],t.prototype,"submit",null),Qm([Cr.bound],t.prototype,"reset",null),Qm([Cr.bound],t.prototype,"resetProperty",null),t}();function Bf(t){return new y$e(t)}var b$e=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){b$e(e,t);function e(r,n,i){var o=i===void 0?{}:i,a=o.name,s=a===void 0?"ogm"+(Math.random()*1e3|0):a,l=o.keyToName,c=l===void 0?function(g){return""+g}:l,d=t.call(this)||this;Object.defineProperty(d,"_base",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_ogmInfoKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_groupBy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_keyToName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_disposeBaseObserver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),d._keyToName=c,d._groupBy=n,d._ogmInfoKey=Symbol("ogmInfo"+s),d._base=r;for(var p=0;p<r.length;p++)d._addItem(r[p]);return d._disposeBaseObserver=Yx(d._base,function(g){if(g.type==="splice")fs(function(){for(var m=0,y=g.removed;m<y.length;m++){var b=y[m];d._removeItem(b)}for(var O=0,S=g.added;O<S.length;O++){var w=S[O];d._addItem(w)}});else if(g.type==="update")fs(function(){d._removeItem(g.oldValue),d._addItem(g.newValue)});else throw new Error("illegal state")}),d}return Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){throw new Error("not supported")}}),Object.defineProperty(e.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(r){throw new Error("not supported")}}),Object.defineProperty(e.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){throw new Error("not supported")}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._disposeBaseObserver();for(var r=0;r<this._base.length;r++){var n=this._base[r],i=n[this._ogmInfoKey];i.reaction(),delete n[this._ogmInfoKey]}}}),Object.defineProperty(e.prototype,"_getGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=t.prototype.get.call(this,r);return n===void 0&&(n=Ut([],{name:"GroupArray["+this._keyToName(r)+"]",deep:!1}),t.prototype.set.call(this,r,n)),n}}),Object.defineProperty(e.prototype,"_removeFromGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=t.prototype.get.call(this,r);i.length===1?t.prototype.delete.call(this,r):(n===i.length-1||(i[n]=i[i.length-1],i[n][this._ogmInfoKey].groupArrIndex=n),i.length--)}}),Object.defineProperty(e.prototype,"_addItem",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=this._groupBy(r),o=this._getGroupArr(i),a={groupByValue:i,groupArrIndex:o.length,reaction:ol(function(){return n._groupBy(r)},function(s,l){var c=r[n._ogmInfoKey];n._removeFromGroupArr(c.groupByValue,c.groupArrIndex);var d=n._getGroupArr(s),p=d.length;d.push(r),c.groupByValue=s,c.groupArrIndex=p})};Object.defineProperty(r,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:a}),o.push(r)}}),Object.defineProperty(e.prototype,"_removeItem",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r[this._ogmInfoKey];this._removeFromGroupArr(n.groupByValue,n.groupArrIndex),n.reaction(),delete r[this._ogmInfoKey]}}),e})(Jx);const vl=(t,e)=>(e.title&&(t.title=e.title),e.description&&(t.description=e.description),e.deprecated&&(t.deprecated=e.deprecated),t);var yc=(t=>(t.Object="object",t.Array="array",t.String="string",t.StringForeignKey="stringForeignKey",t.Number="number",t.Boolean="boolean",t))(yc||{});class ti{constructor(e){fe(this,"nodeId",vn());fe(this,"type",yc.Array);fe(this,"isCollapsible",!0);fe(this,"isCollapsed",!1);fe(this,"showSettings",!1);fe(this,"$ref","");fe(this,"state");lt(this,{},{autoBind:!0}),e.setParent(this),e.submitChanges(),this.state=Bf(Ut({id:"",isReplaced:!1,items:e,parent:null,connectedToParent:!1,title:"",description:"",deprecated:!1}))}get isDisabled(){var e;return!!((e=this.draftParent)!=null&&e.$ref)}get label(){return To(this.$ref)??this.type}setNodeId(e){this.nodeId=e}get id(){return this.state.model.id}get draftId(){return this.state.id}get title(){return this.state.model.title}get draftTitle(){return this.state.title}get description(){return this.state.model.description}get draftDescription(){return this.state.description}get deprecated(){return this.state.model.deprecated}get draftDeprecated(){return this.state.deprecated}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}get items(){return this.state.model.items}get draftItems(){return this.state.items}getSchema(e){if(this.$ref)return vl({$ref:this.$ref},this.state);const r={type:xe.Array,items:this.getItemsSchema(e)};return vl(r,this.state)}getItemsSchema(e){return this.state.items instanceof ti?this.state.items.getSchema(e):this.state.items instanceof yn?this.state.items.getSchema(e):this.state.items.getSchema()}get isValid(){return this.state.items.isValid}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself||this.state.items.isDirty}setId(e){this.state.id=e}setIsReplaced(e){this.state.isReplaced=e}setTitle(e){this.state.title=e}setDescription(e){this.state.description=e}setDeprecated(e){this.state.deprecated=e}setParent(e){this.state.parent=e,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}replaceItems(e){e.draftParent instanceof yn&&e.draftParent.removeProperty(e.nodeId),e.setNodeId(this.state.items.nodeId),e.setParent(this),this.state.items=e}submitChanges(){this.state.submit(),this.state.items.submitChanges()}toggleCollapsed(){this.isCollapsed=!this.isCollapsed}resetChanges(){this.state.reset(),this.state.items.resetChanges()}toggleSettings(){this.showSettings=!this.showSettings,this.showSettings&&this.isCollapsible&&this.isCollapsed&&(this.isCollapsed=!1)}}class yn{constructor(){fe(this,"nodeId",vn());fe(this,"type",yc.Object);fe(this,"isCollapsible",!0);fe(this,"isCollapsed",!1);fe(this,"showSettings",!1);fe(this,"$ref","");fe(this,"state");lt(this,{},{autoBind:!0}),this.state=Bf(Ut({id:"",isReplaced:!1,properties:[],parent:null,connectedToParent:!1,title:"",description:"",deprecated:!1}))}get isDisabled(){var e;return!!((e=this.draftParent)!=null&&e.$ref)}get label(){return To(this.$ref)??this.type}setNodeId(e){this.nodeId=e}get id(){return this.state.model.id}get draftId(){return this.state.id}get title(){return this.state.model.title}get draftTitle(){return this.state.title}get description(){return this.state.model.description}get draftDescription(){return this.state.description}get deprecated(){return this.state.model.deprecated}get draftDeprecated(){return this.state.deprecated}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}get properties(){return this.state.model.properties}get draftProperties(){return this.state.properties}get addedProperties(){return this.draftProperties.filter(e=>!e.parent&&!this.properties.find(r=>r.nodeId===e.nodeId))}get removedProperties(){return this.properties.filter(e=>{const r=!this.draftProperties.find(n=>n.nodeId===e.nodeId);return!e.draftConnectedToParent&&r})}get notChangedProperties(){return this.properties.filter(e=>this.draftProperties.find(r=>r===e))}get replacedProperties(){return this.properties.filter(e=>this.draftProperties.find(r=>r.nodeId===e.nodeId&&r!==e)).map(e=>{const r=this.draftProperties.find(n=>n.nodeId===e.nodeId);if(!r)throw new Error("Invalid replacedProperties");return{previousProperty:e,currentProperty:r}})}get movedProperties(){return this.draftProperties.filter(e=>e.parent&&e.parent!==this)}get changedIdProperties(){return this.draftProperties.filter(e=>{const r=this.properties.find(n=>n.nodeId===e.nodeId);return r&&e.draftId!==r.id}).map(e=>{const r=this.properties.find(n=>n.nodeId===e.nodeId);if(!r)throw new Error("Invalid replacedProperties");return{previousProperty:r,currentProperty:e}})}getSchema(e){if(this.$ref)return vl({$ref:this.$ref},this.state);const r={},n=[];e!=null&&e.skipObjectProperties||this.state.properties.forEach(a=>{e!=null&&e.skipMovedBetweenParentsNodes&&a.parent!==a.draftParent||(a instanceof ti||a instanceof yn?r[a.draftId]=a.getSchema(e):r[a.draftId]=a.getSchema(),n.push(a.draftId))});const i=n.sort((a,s)=>a.localeCompare(s)),o={type:xe.Object,additionalProperties:!1,required:i,properties:r};return vl(o,this.state)}get isValid(){const e=new Set(this.state.properties.map(n=>n.draftId)).size===this.state.properties.length,r=this.state.properties.every(n=>n.isValid&&!!n.draftId);return e&&r}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself||this.state.properties.some(e=>e.isDirty)}get showingCreateField(){return this.$ref?!1:!!this.state.id||!!this.state.parent}get isDisabledCreateField(){var n;const e=!!this.state.id||!this.state.id&&((n=this.state.parent)==null?void 0:n.type)===yc.Array,r=this.state.properties.every(i=>!!i.draftId);return!e||!r}setId(e){this.state.id=e}setIsReplaced(e){this.state.isReplaced=e}setTitle(e){this.state.title=e}setDescription(e){this.state.description=e}setDeprecated(e){this.state.deprecated=e}setParent(e){this.state.parent=e,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}removeProperty(e){const r=this.state.properties.findIndex(n=>n.nodeId===e);r!==-1&&(this.state.properties[r].onRemoveFromParent(),this.createIfNeededNextProperties(),this.state.properties.splice(r,1),this.resetIfNeededProperties())}addProperty(e,r=null){if(e.draftParent instanceof yn)e.draftParent.removeProperty(e.nodeId);else if(e.draftParent instanceof ti)throw new Error("Invalid parent");e.setParent(this),this.createIfNeededNextProperties();const n=this.state.properties.findIndex(o=>o===(r==null?void 0:r.beforeNode)),i=this.state.properties.findIndex(o=>o===(r==null?void 0:r.afterNode));n!==-1?this.state.properties.splice(n,0,e):i!==-1?this.state.properties.splice(i+1,0,e):this.state.properties.push(e)}getProperty(e){const r=this.properties.find(n=>n.id===e);if(!r)throw new Error("Invalid id");return r}getDraftProperty(e){const r=this.draftProperties.find(n=>n.id===e);if(!r)throw new Error("Invalid id");return r}hasProperty(e){return!!this.state.properties.find(n=>n===e)}replaceProperty(e,r){const n=this.state.properties.findIndex(i=>i.nodeId===e.nodeId);n!==-1&&(e.onRemoveFromParent(),e.parent&&(r.setId(e.id),r.setParent(e.parent),r.submitChanges()),r.setId(e.draftId),r.setNodeId(e.nodeId),r.setParent(this),r.setIsReplaced(!0),this.createIfNeededNextProperties(),this.state.properties.splice(n,1,r))}toggleCollapsed(){this.isCollapsed=!this.isCollapsed}submitChanges(){this.state.submit();for(const e of this.state.properties)e.submitChanges()}resetChanges(){this.state.reset();for(const e of this.state.properties)e.resetChanges()}createIfNeededNextProperties(){this.state.isPropertyDirty("properties")||(this.state.properties=this.state.properties.slice())}resetIfNeededProperties(){const e=this.state.model.properties.map(n=>n.nodeId),r=this.state.properties.map(n=>n.nodeId);if(e.length===r.length){for(let n=0;n<e.length;n++)if(e[n]!==r[n])return;this.state.resetProperty("properties")}}toggleSettings(){this.showSettings=!this.showSettings,this.showSettings&&this.isCollapsible&&this.isCollapsed&&(this.isCollapsed=!1)}}class af{constructor(){fe(this,"nodeId",vn());fe(this,"type",yc.String);fe(this,"isCollapsible",!1);fe(this,"isCollapsed",!1);fe(this,"showSettings",!1);fe(this,"$ref","");fe(this,"state");lt(this,{},{autoBind:!0}),this.state=Bf(Ut({id:"",isReplaced:!1,foreignKey:null,contentMediaType:null,parent:null,connectedToParent:!1,title:"",description:"",deprecated:!1}))}get isDisabled(){var e;return!!((e=this.draftParent)!=null&&e.$ref)}get label(){return this.draftForeignKey?"foreign key":this.state.contentMediaType?this.state.contentMediaType:To(this.$ref)??this.type}setNodeId(e){this.nodeId=e}get id(){return this.state.model.id}get draftId(){return this.state.id}get title(){return this.state.model.title}get draftTitle(){return this.state.title}get description(){return this.state.model.description}get draftDescription(){return this.state.description}get deprecated(){return this.state.model.deprecated}get draftDeprecated(){return this.state.deprecated}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}get foreignKey(){return this.state.model.foreignKey}get draftForeignKey(){return this.state.foreignKey}getSchema(){var r,n;if(this.$ref)return vl({$ref:this.$ref},this.state);const e={type:xe.String,default:""};return(r=this.state.foreignKey)!=null&&r.draftForeignKey&&(e.foreignKey=(n=this.state.foreignKey)==null?void 0:n.draftForeignKey),this.state.contentMediaType&&(e.contentMediaType=this.state.contentMediaType),vl(e,this.state)}get isValid(){return!(this.state.foreignKey&&!this.state.foreignKey.draftForeignKey)}get isDirtyItself(){return this.state.isDirty||!!(this.state.foreignKey&&this.state.foreignKey.isDirtyItself)}get isDirty(){return this.isDirtyItself}setId(e){this.state.id=e}setIsReplaced(e){this.state.isReplaced=e}setTitle(e){this.state.title=e}setDescription(e){this.state.description=e}setDeprecated(e){this.state.deprecated=e}setParent(e){this.state.parent=e,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}setForeignKey(e){this.state.foreignKey=e,e&&e.setParent(this)}setContentMediaType(e){this.state.contentMediaType=e}submitChanges(){this.state.submit(),this.state.foreignKey&&this.state.foreignKey.submitChanges()}resetChanges(){this.state.reset(),this.state.foreignKey&&this.state.foreignKey.resetChanges()}toggleSettings(){this.showSettings=!this.showSettings}}var sE={},Vm={},bV;function lG(){if(bV)return Vm;bV=1,Object.defineProperty(Vm,"__esModule",{value:!0}),Vm.bind=void 0;function t(e,r){var n=r.type,i=r.listener,o=r.options;return e.addEventListener(n,i,o),function(){e.removeEventListener(n,i,o)}}return Vm.bind=t,Vm}var $d={},OV;function O$e(){if(OV)return $d;OV=1;var t=$d&&$d.__assign||function(){return t=Object.assign||function(o){for(var a,s=1,l=arguments.length;s<l;s++){a=arguments[s];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])}return o},t.apply(this,arguments)};Object.defineProperty($d,"__esModule",{value:!0}),$d.bindAll=void 0;var e=lG();function r(o){if(!(typeof o>"u"))return typeof o=="boolean"?{capture:o}:o}function n(o,a){if(a==null)return o;var s=t(t({},o),{options:t(t({},r(a)),r(o.options))});return s}function i(o,a,s){var l=a.map(function(c){var d=n(c,s);return(0,e.bind)(o,d)});return function(){l.forEach(function(d){return d()})}}return $d.bindAll=i,$d}var wV;function w$e(){return wV||(wV=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=t.bind=void 0;var e=lG();Object.defineProperty(t,"bind",{enumerable:!0,get:function(){return e.bind}});var r=O$e();Object.defineProperty(t,"bindAll",{enumerable:!0,get:function(){return r.bindAll}})}(sE)),sE}var IP=w$e(),jv={isSafari:!1,leavingWindow:Symbol("leaving"),enteringWindow:Symbol("entering")};function S$e(t){var e=t.dragLeave;return e.type!=="dragleave"?!1:jv.isSafari?e.hasOwnProperty(jv.leavingWindow):e.relatedTarget==null}(function(){if(typeof window>"u")return;var e=navigator,r=e.userAgent,n=r.includes("AppleWebKit")&&!r.includes("Chrome");if(!n)return;jv.isSafari=!0;function i(){return{enterCount:0,isOverWindow:!1}}var o=i();function a(){o=i()}IP.bindAll(window,[{type:"dragstart",listener:function(){o.enterCount=0,o.isOverWindow=!0}},{type:"drop",listener:a},{type:"dragend",listener:a},{type:"dragenter",listener:function(l){!o.isOverWindow&&o.enterCount===0&&(l[jv.enteringWindow]=!0),o.isOverWindow=!0,o.enterCount++}},{type:"dragleave",listener:function(l){o.enterCount--,o.isOverWindow&&o.enterCount===0&&(l[jv.leavingWindow]=!0,o.isOverWindow=!1)}}],{capture:!0})})();function x$e(t,e){var r=e.property,n=e.rule,i=e.priority,o=i===void 0?"":i,a=t.style.getPropertyValue(r),s=t.style.getPropertyPriority(r);return t.style.setProperty(r,n,o),function(){t.style.setProperty(r,a,s)}}function P$e(t){var e=t.current,r=document.elementFromPoint(e.input.clientX,e.input.clientY);return r instanceof HTMLElement?x$e(r,{property:"pointer-events",rule:"auto",priority:"important"}):null}function k$e(){var t,e=document.createElement("style");return e.setAttribute("pdnd-post-drag-fix","true"),document.head.appendChild(e),(t=e.sheet)===null||t===void 0||t.insertRule("* { pointer-events: none !important; }"),function(){document.head.removeChild(e)}}function SV(t){var e=t.current;queueMicrotask(function(){var r=P$e({current:e}),n=k$e();function i(){o(),r==null||r(),n()}var o=IP.bindAll(window,[{type:"pointerdown",listener:i},{type:"pointermove",listener:i},{type:"focusin",listener:i},{type:"focusout",listener:i},{type:"dragstart",listener:i}],{capture:!0})})}function _A(t){return{altKey:t.altKey,button:t.button,buttons:t.buttons,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY}}var C$e=function(e){var r=[],n=null,i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];r=s,!n&&(n=requestAnimationFrame(function(){n=null,e.apply(void 0,r)}))};return i.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},i},lE=C$e(function(t){return t()}),IO=function(){var t=null;function e(n){var i=requestAnimationFrame(function(){t=null,n()});t={frameId:i,fn:n}}function r(){t&&(cancelAnimationFrame(t.frameId),t.fn(),t=null)}return{schedule:e,flush:r}}();function T$e(t){var e=t.source,r=t.initial,n=t.dispatchEvent,i={dropTargets:[]};function o(s){n(s),i={dropTargets:s.payload.location.current.dropTargets}}var a={start:function(l){var c=l.nativeSetDragImage,d={current:r,previous:i,initial:r};o({eventName:"onGenerateDragPreview",payload:{source:e,location:d,nativeSetDragImage:c}}),IO.schedule(function(){o({eventName:"onDragStart",payload:{source:e,location:d}})})},dragUpdate:function(l){var c=l.current;IO.flush(),lE.cancel(),o({eventName:"onDropTargetChange",payload:{source:e,location:{initial:r,previous:i,current:c}}})},drag:function(l){var c=l.current;lE(function(){IO.flush();var d={initial:r,previous:i,current:c};o({eventName:"onDrag",payload:{source:e,location:d}})})},drop:function(l){var c=l.current,d=l.updatedExternalPayload;IO.flush(),lE.cancel(),o({eventName:"onDrop",payload:{source:d??e,location:{current:c,previous:i,initial:r}}})}};return a}var UR=!1;function cG(){return!UR}function E$e(t){return t.dataTransfer?t.dataTransfer.setDragImage.bind(t.dataTransfer):null}function _$e(t){var e=t.current,r=t.next;if(e.length!==r.length)return!0;for(var n=0;n<e.length;n++)if(e[n].element!==r[n].element)return!0;return!1}function R$e(t){var e=t.event,r=t.dragInterface,n=t.getDropTargetsOver,i=t.dispatchEvent;if(!cG())return;UR=!0;var o=I$e({event:e,dragInterface:r,getDropTargetsOver:n}),a=o;cE({event:e,current:o.dropTargets});var s=T$e({source:r.payload,dispatchEvent:i,initial:o});function l(y){var b=_$e({current:a.dropTargets,next:y.dropTargets});a=y,b&&s.dragUpdate({current:a})}function c(y){var b=_A(y),O=n({target:y.target,input:b,source:r.payload,current:a.dropTargets});O.length&&(y.preventDefault(),cE({event:y,current:O})),l({dropTargets:O,input:b})}function d(y){var b=y.updatedExternalPayload;s.drop({current:a,updatedExternalPayload:b})}function p(){a.dropTargets.length&&l({dropTargets:[],input:a.input}),d({updatedExternalPayload:null}),g()}function g(){UR=!1,m()}var m=IP.bindAll(window,[{type:"dragover",listener:function(b){c(b),s.drag({current:a})}},{type:"dragenter",listener:c},{type:"dragleave",listener:function(b){S$e({dragLeave:b})&&(l({input:a.input,dropTargets:[]}),r.startedFrom==="external"&&p())}},{type:"drop",listener:function(b){var O;b.preventDefault(),cE({event:b,current:a.dropTargets}),d({updatedExternalPayload:r.startedFrom==="external"&&((O=r.getDropPayload)===null||O===void 0?void 0:O.call(r,b))||null}),g(),r.startedFrom==="internal"&&SV({current:a})}},{type:"dragend",listener:function(){p(),r.startedFrom==="internal"&&SV({current:a})}},{type:"pointermove",listener:function(){var y=0;return function(){if(y<20){y++;return}p()}}()},{type:"pointerdown",listener:p}],{capture:!0});s.start({nativeSetDragImage:E$e(e)})}function cE(t){var e,r=t.event,n=t.current,i=(e=n[0])===null||e===void 0?void 0:e.dropEffect;i!=null&&r.dataTransfer&&(r.dataTransfer.dropEffect=i)}function I$e(t){var e=t.event,r=t.dragInterface,n=t.getDropTargetsOver,i=_A(e);if(r.startedFrom==="external")return{input:i,dropTargets:[]};var o=n({input:i,source:r.payload,target:e.target,current:[]});return{input:i,dropTargets:o}}var xV={canStart:cG,start:R$e},HR=new Map;function $$e(t){var e=t.typeKey,r=t.mount,n=HR.get(e);if(n)return n.usageCount++,n;var i={typeKey:e,unmount:r(),usageCount:1};return HR.set(e,i),i}function A$e(t){var e=$$e(t);return function(){e.usageCount--,!(e.usageCount>0)&&(e.unmount(),HR.delete(t.typeKey))}}function Ry(t){"@babel/helpers - typeof";return Ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ry(t)}function M$e(t,e){if(Ry(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ry(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function N$e(t){var e=M$e(t,"string");return Ry(e)=="symbol"?e:e+""}function uG(t,e,r){return(e=N$e(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function XR(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function j$e(t){if(Array.isArray(t))return XR(t)}function D$e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function L$e(t,e){if(t){if(typeof t=="string")return XR(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?XR(t,e):void 0}}function Q$e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1085
1085
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V$e(t){return j$e(t)||D$e(t)||L$e(t)||Q$e()}function dG(t,e){var r=e.attribute,n=e.value;return t.setAttribute(r,n),function(){return t.removeAttribute(r)}}function fG(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(){e.forEach(function(i){return i()})}}function PV(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Th(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?PV(Object(r),!0).forEach(function(n){uG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):PV(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function uE(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=F$e(t))||e){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1086
1086
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return o=c.done,c},e:function(c){a=!0,s=c},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function F$e(t,e){if(t){if(typeof t=="string")return kV(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kV(t,e)}}function kV(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function dE(t){return t.slice(0).reverse()}function B$e(t){var e=t.typeKey,r=t.defaultDropEffect,n=new WeakMap,i="data-drop-target-for-".concat(e),o="[".concat(i,"]");function a(m){return n.set(m.element,m),function(){return n.delete(m.element)}}function s(m){return fG(dG(m.element,{attribute:i,value:"true"}),a(m))}function l(m){var y,b,O,S,w,k=m.source,T=m.target,C=m.input,E=m.result,_=E===void 0?[]:E;if(!(T instanceof Element))return _;var $=T.closest(o);if($==null)return _;var M=n.get($);if(M==null)return _;var j={input:C,source:k,element:M.element};if(M.canDrop&&!M.canDrop(j))return l({source:k,target:M.element.parentElement,input:C,result:_});var B=(y=(b=M.getData)===null||b===void 0?void 0:b.call(M,j))!==null&&y!==void 0?y:{},V=(O=(S=M.getDropEffect)===null||S===void 0?void 0:S.call(M,j))!==null&&O!==void 0?O:r,X=!!(!((w=M.getIsSticky)===null||w===void 0)&&w.call(M,j)),D={data:B,element:M.element,dropEffect:V,sticky:X};return l({source:k,target:M.element.parentElement,input:C,result:[].concat(V$e(_),[D])})}function c(m){var y=m.eventName,b=m.payload,O=uE(b.location.current.dropTargets),S;try{for(O.s();!(S=O.n()).done;){var w,k=S.value,T=n.get(k.element),C=Th(Th({},b),{},{self:k});T==null||(w=T[y])===null||w===void 0||w.call(T,C)}}catch(E){O.e(E)}finally{O.f()}}var d={onGenerateDragPreview:c,onDrag:c,onDragStart:c,onDrop:c,onDropTargetChange:function(y){var b=y.payload,O=new Set(b.location.current.dropTargets.map(function(ie){return ie.element})),S=new Set,w=uE(b.location.previous.dropTargets),k;try{for(w.s();!(k=w.n()).done;){var T,C=k.value;S.add(C.element);var E=n.get(C.element),_=O.has(C.element),$=Th(Th({},b),{},{self:C});if(E==null||(T=E.onDropTargetChange)===null||T===void 0||T.call(E,$),!_){var M;E==null||(M=E.onDragLeave)===null||M===void 0||M.call(E,$)}}}catch(ie){w.e(ie)}finally{w.f()}var j=uE(b.location.current.dropTargets),B;try{for(j.s();!(B=j.n()).done;){var V,X,D=B.value;if(!S.has(D.element)){var F=Th(Th({},b),{},{self:D}),Y=n.get(D.element);Y==null||(V=Y.onDropTargetChange)===null||V===void 0||V.call(Y,F),Y==null||(X=Y.onDragEnter)===null||X===void 0||X.call(Y,F)}}}catch(ie){j.e(ie)}finally{j.f()}}};function p(m){d[m.eventName](m)}function g(m){var y=m.source,b=m.target,O=m.input,S=m.current,w=l({source:y,target:b,input:O});if(w.length>=S.length)return w;for(var k=dE(S),T=dE(w),C=[],E=0;E<k.length;E++){var _=k[E],$=T[E];if($!=null){C.push($);continue}if(!_.sticky)break;var M=C[E-1],j=k[E-1];if((M==null?void 0:M.element)===(j==null?void 0:j.element)){C.push(_);continue}break}return dE(C)}return{dropTargetForConsumers:s,getIsOver:g,dispatchEvent:p}}function z$e(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=q$e(t))||e){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1087
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return o=c.done,c},e:function(c){a=!0,s=c},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function q$e(t,e){if(t){if(typeof t=="string")return CV(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return CV(t,e)}}function CV(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function TV(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function W$e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?TV(Object(r),!0).forEach(function(n){uG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):TV(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function U$e(){var t=new Set,e=null;function r(o){e&&(!o.canMonitor||o.canMonitor(e.canMonitorArgs))&&e.active.add(o)}function n(o){var a=W$e({},o);return t.add(a),r(a),function(){t.delete(a),e&&e.active.delete(a)}}function i(o){var a=o.eventName,s=o.payload;if(a==="onGenerateDragPreview"){e={canMonitorArgs:{initial:s.location.initial,source:s.source},active:new Set};var l=z$e(t),c;try{for(l.s();!(c=l.n()).done;){var d=c.value;r(d)}}catch(O){l.e(O)}finally{l.f()}}if(e){for(var p=Array.from(e.active),g=0,m=p;g<m.length;g++){var y=m[g];if(e.active.has(y)){var b;(b=y[a])===null||b===void 0||b.call(y,s)}}a==="onDrop"&&(e.active.clear(),e=null)}}return{dispatchEvent:i,monitorForConsumers:n}}function H$e(t){var e=t.typeKey,r=t.mount,n=t.dispatchEventToSource,i=t.defaultDropEffect,o=U$e(),a=B$e({typeKey:e,defaultDropEffect:i});function s(d){n==null||n(d),a.dispatchEvent(d),o.dispatchEvent(d)}function l(d){var p=d.event,g=d.dragInterface;xV.start({event:p,dragInterface:g,getDropTargetsOver:a.getIsOver,dispatchEvent:s})}function c(){function d(){var p={canStart:xV.canStart,start:l};return r(p)}return A$e({typeKey:e,mount:d})}return{registerUsage:c,dropTarget:a.dropTargetForConsumers,monitor:o.monitorForConsumers}}var $S=new WeakMap;function X$e(t){return $S.set(t.element,t),function(){$S.delete(t.element)}}var RA=H$e({typeKey:"element",defaultDropEffect:"move",mount:function(e){return IP.bind(window,{type:"dragstart",listener:function(n){var i,o,a,s;if(e.canStart(n)){var l=n.target;if(!(l instanceof HTMLElement))return null;var c=$S.get(l);if(!c)return null;var d=_A(n),p={element:c.element,dragHandle:(i=c.dragHandle)!==null&&i!==void 0?i:null,input:d};if(c.canDrag&&!c.canDrag(p))return n.preventDefault(),null;if(c.dragHandle){var g=document.elementFromPoint(d.clientX,d.clientY);if(!c.dragHandle.contains(g))return n.preventDefault(),null}try{var m;(m=n.dataTransfer)===null||m===void 0||m.setData("application/vnd.pdnd","")}catch{}var y={element:c.element,dragHandle:(o=c.dragHandle)!==null&&o!==void 0?o:null,data:(a=(s=c.getInitialData)===null||s===void 0?void 0:s.call(c,p))!==null&&a!==void 0?a:{}},b={key:"element",startedFrom:"internal",payload:y};e.start({event:n,dragInterface:b})}}})},dispatchEventToSource:function(e){var r,n,i=e.eventName,o=e.payload;(r=$S.get(o.source.element))===null||r===void 0||(n=r[i])===null||n===void 0||n.call(r,o)}}),Z$e=RA.dropTarget,G$e=RA.monitor;function Y$e(t){return fG(RA.registerUsage(),X$e(t),dG(t.element,{attribute:"draggable",value:"true"}))}const hG=(t,e)=>t.draftParent?t===e?!0:hG(t.draftParent,e):!1,EV=t=>{const e=[];let r=t.draftParent;for(;r;)e.push(r),r=r.draftParent;return e},K$e=(t,e)=>{const r=EV(e),n=EV(t),i=r.find(a=>a instanceof ti);return i?!n.find(a=>a===i):!1},sv=(t,e)=>!(t.$ref||!e.draftParent||t===e||t===e.draftParent||hG(t,e)||K$e(t,e)),pG=(t,e,r)=>{const n=A.useRef(null),[i,o]=A.useState(!1),[a,s]=A.useState(!1),[l,c]=A.useState(!1);return A.useEffect(()=>{let d=null;if(e){if(!n.current)return;d=Y$e({element:n.current,getInitialData:()=>({store:t})})}return()=>d==null?void 0:d()},[t,e]),A.useEffect(()=>{if(!n.current)return;let d=null;return(t instanceof yn||t instanceof ti)&&(d=Z$e({element:n.current,onDrop:p=>{const g=p.source.data.store;sv(t,g)&&r(g),c(!1),o(!1)},onDragEnter:p=>{const g=p.source.data.store;c(sv(t,g))},onDragLeave:()=>c(!1)})),()=>d==null?void 0:d()},[r,t]),A.useEffect(()=>G$e({onDragStart:d=>{const p=d.source.data.store;(t instanceof yn||t instanceof ti)&&sv(t,p)?o(sv(t,p)):s(!0)},onDrop:()=>{o(!1),s(!1)}}),[t]),{dragAndDropRef:n,isDrop:i,isDisabledDrop:a,isDraggedOver:l}};function*AS(t,e,r){if(yield*e(t),t instanceof yn)for(const n of t.draftProperties)yield*AS(n,e);else t instanceof ti&&(yield*AS(t.draftItems,e))}function jp(t,e,r){let n=!0;if(r||(n=e(t)),!n)return!1;if(t instanceof yn)for(const i of t.draftProperties)jp(i,e);else t instanceof ti&&jp(t.draftItems,e)}class J$e{constructor(){de(this,"nodeId",vn());de(this,"type",yc.Boolean);de(this,"isCollapsible",!1);de(this,"isCollapsed",!1);de(this,"showSettings",!1);de(this,"$ref","");de(this,"state");lt(this,{},{autoBind:!0}),this.state=Bf(Ut({id:"",parent:null,connectedToParent:!1,title:"",description:"",deprecated:!1}))}get isDisabled(){var e;return!!((e=this.draftParent)!=null&&e.$ref)}get label(){return To(this.$ref)??this.type}setNodeId(e){this.nodeId=e}get id(){return this.state.model.id}get draftId(){return this.state.id}get title(){return this.state.model.title}get draftTitle(){return this.state.title}get description(){return this.state.model.description}get draftDescription(){return this.state.description}get deprecated(){return this.state.model.deprecated}get draftDeprecated(){return this.state.deprecated}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}getSchema(){if(this.$ref)return vl({$ref:this.$ref},this.state);const e={type:xe.Boolean,default:!1};return vl(e,this.state)}get isValid(){return!0}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself}setId(e){this.state.id=e}setTitle(e){this.state.title=e}setDescription(e){this.state.description=e}setDeprecated(e){this.state.deprecated=e}setParent(e){this.state.parent=e,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}submitChanges(){this.state.submit()}resetChanges(){this.state.reset()}toggleSettings(){this.showSettings=!this.showSettings}}class e2e{constructor(){de(this,"nodeId",vn());de(this,"type",yc.Number);de(this,"isCollapsible",!1);de(this,"isCollapsed",!1);de(this,"showSettings",!1);de(this,"$ref","");de(this,"state");lt(this,{},{autoBind:!0}),this.state=Bf(Ut({id:"",parent:null,connectedToParent:!1,title:"",description:"",deprecated:!1}))}get isDisabled(){var e;return!!((e=this.draftParent)!=null&&e.$ref)}get label(){return To(this.$ref)??this.type}setNodeId(e){this.nodeId=e}get id(){return this.state.model.id}get draftId(){return this.state.id}get title(){return this.state.model.title}get draftTitle(){return this.state.title}get description(){return this.state.model.description}get draftDescription(){return this.state.description}get deprecated(){return this.state.model.deprecated}get draftDeprecated(){return this.state.deprecated}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}getSchema(){if(this.$ref)return vl({$ref:this.$ref},this.state);const e={type:xe.Number,default:0};return vl(e,this.state)}get isValid(){return!0}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself}setId(e){this.state.id=e}setTitle(e){this.state.title=e}setDescription(e){this.state.description=e}setDeprecated(e){this.state.deprecated=e}setParent(e){this.state.parent=e,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}submitChanges(){this.state.submit()}resetChanges(){this.state.reset()}toggleSettings(){this.showSettings=!this.showSettings}}class t2e{constructor(){de(this,"nodeId",vn());de(this,"type",yc.StringForeignKey);de(this,"state");lt(this,{},{autoBind:!0}),this.state=Bf(Ut({foreignKey:null,parent:null,connectedToParent:!1}))}get isDisabled(){var e;return!!((e=this.draftParent)!=null&&e.$ref)}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}setNodeId(e){this.nodeId=e}get foreignKey(){return this.state.model.foreignKey}get draftForeignKey(){return this.state.foreignKey}get isDirtyItself(){return this.state.isDirty}setForeignKey(e){this.state.foreignKey=e}setParent(e){this.state.parent=e,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}submitChanges(){this.state.submit()}resetChanges(){this.state.reset()}}const r2e=14,gG=t=>{if("$ref"in t){const e=CA[t.$ref];if(!e)throw new Error(`Schema refs must be defined ref$=${t.$ref}`);const r=gG(e);return r.$ref=t.$ref,r}switch(t.type){case xe.Object:{const e=new yn;return Fm(e,t),Object.entries(t.properties).forEach(([r,n])=>{const i=Kn(n);i.setId(r),e.addProperty(i)}),e}case xe.Array:{const e=Kn(t.items),r=new ti(e);return Fm(r,t),r}case xe.String:{const e=new af;if(t.foreignKey!==void 0){const r=new t2e;r.setForeignKey(t.foreignKey),e.setForeignKey(r)}return e.setContentMediaType(t.contentMediaType??null),Fm(e,t),e}case xe.Number:{const e=new e2e;return Fm(e,t),e}case xe.Boolean:{const e=new J$e;return Fm(e,t),e}}},Fm=(t,e)=>{e.title&&t.setTitle(e.title),e.description&&t.setDescription(e.description),e.deprecated&&t.setDeprecated(e.deprecated)},Kn=(t,e)=>{const r=gG(t);if(n2e(r),e!=null&&e.collapse){const n=o2e(r),i=e.collapseComplexity??r2e;n>=i&&i2e(r)}return r},n2e=t=>{jp(t,e=>(e.isCollapsible&&e.$ref&&(e.isCollapsed=!0),!0))},i2e=t=>{jp(t,e=>(e.isCollapsible&&(e.isCollapsed=!0),!0))},o2e=t=>{let e=1;return jp(t,()=>(e+=1,!0)),e},a2e=[{id:"String",label:xe.String,getSchemaNode:()=>Kn({type:xe.String,default:""})},{id:"Number",label:xe.Number,getSchemaNode:()=>Kn({type:xe.Number,default:0})},{id:"Boolean",label:xe.Boolean,getSchemaNode:()=>Kn({type:xe.Boolean,default:!1})},{id:"Object",label:xe.Object,getSchemaNode:()=>Kn({type:xe.Object,properties:{},required:[],additionalProperties:!1})},{id:"Array",label:xe.Array,getSchemaNode:t=>{let e={type:xe.String,default:""};return"$ref"in t||(t.type===xe.Number||t.type===xe.Boolean||t.type===xe.String)&&(e=t),Kn({type:xe.Array,items:e})}},{id:"ForeignKeyString",label:"foreign key",getSchemaNode:t=>{let e={type:xe.String,default:"",foreignKey:""};return!("$ref"in t)&&t.type===xe.Array&&!("$ref"in t.items)&&t.items.type===xe.String&&t.items.foreignKey!==void 0&&(e=t.items),Kn(e)}}],s2e=[{id:"schemas-submenu",label:"Schemas",type:"submenu",items:[{id:"File",label:To(Jt.File),getSchemaNode:()=>{const t={$ref:Jt.File};return Kn(t)}},{id:"Markdown",label:"Markdown",getSchemaNode:t=>{const e={type:xe.String,default:"",contentMediaType:"text/markdown"};return!("$ref"in t)&&t.type===xe.String&&(e.default=t.default),Kn(e)}}]}],l2e=[{id:"system-fields-submenu",label:"System fields",type:"submenu",items:[{id:"RowId",label:To(Jt.RowId),getSchemaNode:()=>Kn({$ref:Jt.RowId})},{id:"RowVersionId",label:To(Jt.RowVersionId),getSchemaNode:()=>Kn({$ref:Jt.RowVersionId})},{id:"RowCreatedId",label:To(Jt.RowCreatedId),getSchemaNode:()=>Kn({$ref:Jt.RowCreatedId}),addDividerAfter:!0},{id:"RowCreatedAt",label:To(Jt.RowCreatedAt),getSchemaNode:()=>Kn({$ref:Jt.RowCreatedAt})},{id:"RowPublishedAt",label:To(Jt.RowPublishedAt),getSchemaNode:()=>Kn({$ref:Jt.RowPublishedAt})},{id:"RowUpdatedAt",label:To(Jt.RowUpdatedAt),getSchemaNode:()=>Kn({$ref:Jt.RowUpdatedAt}),addDividerAfter:!0},{id:"RowHash",label:To(Jt.RowHash),getSchemaNode:()=>Kn({$ref:Jt.RowHash})},{id:"RowSchemaHash",label:To(Jt.RowSchemaHash),getSchemaNode:()=>Kn({$ref:Jt.RowSchemaHash})}]}],mG=[{id:vn(),label:"Types",options:a2e,addDividerAfter:!0},{id:vn(),label:"Schemas",options:s2e,addDividerAfter:!0},{id:vn(),label:"System fields",options:l2e}],_V=(t,e)=>{const r=n=>{for(const i of n)if(i.type==="submenu"){const o=r(i.items);if(o)return o}else if(i.id===t)return i.getSchemaNode(e)};for(const n of mG){const i=r(n.options);if(i)return i}},c2e=({label:t,options:e,onSelect:r,dataTestIdPrefix:n})=>P.jsxs(mb,{positioning:{placement:"right-start",gutter:-8},children:[P.jsxs(Bge,{justifyContent:"space-between",children:[t,P.jsx(Z1e,{})]}),P.jsx(Ku,{children:P.jsx(vb,{children:P.jsx(yb,{children:e.map(i=>P.jsxs(Qe.Fragment,{children:[P.jsx(Jl,{value:i.id,"data-testid":`${n}-submenu-${i.id}`,onClick:()=>r(i.id),children:i.label}),i.addDividerAfter&&P.jsx(nW,{})]},i.id))})})})]}),vG=mt(({currentSchema:t,menuButton:e,onSelect:r,dataTestId:n})=>{const i=A.useCallback(a=>{if(!Array.isArray(a)){const s=_V(a,t);s&&r(s)}},[t,r]),o=A.useCallback(a=>{const s=_V(a,t);s&&r(s)},[t,r]);return P.jsxs(mb,{children:[P.jsx(zx,{asChild:!0,children:e}),P.jsx(Ku,{children:P.jsx(vb,{children:P.jsx(yb,{children:mG.map(a=>P.jsxs(Qe.Fragment,{children:[a.options.map(s=>s.type==="submenu"?P.jsx(c2e,{label:s.label,options:s.items,onSelect:o,dataTestIdPrefix:`${n}-menu-sub`},s.id):P.jsx(Jl,{value:s.id,"data-testid":`${n}-menu-type-${s.id}`,onClick:()=>i(s.id),children:s.label},s.id)),a.addDividerAfter&&P.jsx(nW,{})]},a.id))})})})]})}),u2e=["Backspace","Escape","Enter","ArrowRight","ArrowLeft","Delete"],sf=({initValue:t,placeholder:e,autoFocus:r,onBlur:n,onChange:i,onEscape:o,onEnter:a,onFocus:s,focusIfDependencyList:l,restrict:c,prefix:d,postfix:p,dataTestId:g,textDecoration:m})=>{const y=A.useRef(null),b=A.useRef(null);A.useEffect(()=>{var C;r&&((C=y.current)==null||C.focus())},[r]),A.useLayoutEffect(()=>{if(window.getSelection()&&b.current!==null&&y.current){const E=(y.current.textContent||"").length,_=Math.min(E,b.current),$=document.createRange(),M=window.getSelection(),j=y.current.childNodes.length?y.current.childNodes[0]:y.current;$.setStart(j,_),$.collapse(!0),M&&(M.removeAllRanges(),M.addRange($))}}),FTe(()=>{var C;if(l){(C=y.current)==null||C.focus();const E=window.getSelection();if(y.current&&E){const _=document.createRange();_.selectNodeContents(y.current),_.collapse(!1),E.removeAllRanges(),E.addRange(_)}}},[...l||[]]);const O=A.useCallback(C=>{const E=window.getSelection();E&&E.rangeCount>0&&(b.current=E.getRangeAt(0).startOffset),i==null||i(C.currentTarget.innerText)},[i]),S=A.useCallback(()=>{n==null||n(),b.current=null},[n]),w=A.useCallback(C=>{var E,_;C.key==="Enter"&&(C.preventDefault(),t&&((E=y.current)==null||E.blur(),a==null||a())),C.key==="Escape"&&(C.preventDefault(),t&&((_=y.current)==null||_.blur()),o==null||o()),c&&!u2e.includes(C.key)&&!c.test(C.key)&&C.preventDefault()},[t,a,o,c]),k=A.useCallback(()=>{var C;(C=y.current)==null||C.focus()},[]),T=!t&&e;return P.jsxs(Te,{minWidth:0,width:T?"100%":void 0,position:"relative",onClick:k,children:[!T&&d,P.jsx(ze,{textDecoration:m,"data-testid":g,autoFocus:!0,ref:y,contentEditable:!0,spellCheck:"false",dangerouslySetInnerHTML:{__html:t},outline:0,width:"100%",onBlur:S,onFocus:s,onChange:O,onInput:O,onKeyDown:w}),!T&&p,T&&P.jsx(dt,{cursor:"text",userSelect:"none",pointerEvents:"none",whiteSpace:"nowrap",color:"gray.400",position:"absolute",children:e})]})},d2e=({open:t,setOpen:e,dataTestId:r,className:n,onRemove:i,onSettings:o})=>!i&&!o?null:P.jsxs(mb,{open:t,onOpenChange:a=>e(a.open),positioning:{placement:"bottom-start"},children:[P.jsx(zx,{asChild:!0,children:P.jsx(oSe,{height:"26px",color:"gray.300",_hover:{color:"gray.400"},className:n,dataTestId:r})}),P.jsx(Ku,{children:P.jsx(vb,{children:P.jsxs(yb,{children:[o&&P.jsxs(Jl,{color:"gray.600",value:"settings","data-restid":`${r}-settings-button`,onClick:o,children:[P.jsx(gP,{}),P.jsx(ze,{flex:1,children:"Settings"})]}),i&&P.jsxs(Jl,{color:"gray.600",value:"delete","data-restid":`${r}-remove-button`,onClick:i,children:[P.jsx(Ab,{}),P.jsx(ze,{flex:1,children:"Delete"})]})]})})})]}),yG=mt(({store:t,typeClassName:e,onBlur:r,onEnter:n,onRemove:i,onSelect:o,dataTestId:a})=>{const{root:s,mode:l}=zb(),[c,d]=A.useState(!1),[p,g]=A.useState(!1),m=A.useCallback(j=>{t instanceof yn?s.addProperty(t,j,{beforeNode:t.draftProperties[0]}):t instanceof ti&&s.replaceItems(t,j)},[s,t]),y=!!(s.areThereDropTargets(t)&&t.draftId),{dragAndDropRef:b,isDrop:O,isDraggedOver:S,isDisabledDrop:w}=pG(t,y,m),k=A.useCallback(()=>{d(!1),r==null||r(t)},[r,t]),T=A.useCallback(()=>{d(!0)},[]),C=A.useCallback(()=>{n==null||n(t)},[n,t]),E=A.useCallback(()=>{i==null||i(t)},[i,t]),_=A.useCallback(j=>{s.setId(t,j)},[s,t]),$=A.useCallback(j=>{o(t,j)},[o,t]),M=!c&&!p;return t.isDisabled?P.jsxs(Te,{gap:"0.5rem",width:"100%",justifyContent:"flex-start",outline:0,children:[P.jsx(Te,{flex:0,position:"relative",borderWidth:1,borderStyle:"dashed",borderColor:"#00000000",color:"gray.400",whiteSpace:"nowrap",children:P.jsx(ze,{userSelect:"none",children:t.draftId})}),P.jsx(dt,{color:"gray.400",className:e,children:t.label})]}):P.jsxs(Te,{gap:"0.5rem",width:"100%",justifyContent:"flex-start",outline:0,children:[P.jsxs(Te,{"data-testid":O&&`${a}-drop`,flex:t.draftId?0:1,ref:b,position:"relative",borderWidth:1,borderStyle:"dashed",borderColor:O?"gray.400":"#00000000",backgroundColor:S?"gray.200":void 0,color:w?"gray.300":void 0,whiteSpace:"nowrap",children:[t.isDisabled?P.jsx(ze,{userSelect:"none",children:t.draftId}):P.jsxs(P.Fragment,{children:[y&&P.jsx(Te,{"data-testid":`${a}-drag-button`,position:"absolute",left:"-34px",className:M?e:void 0,cursor:"grab",_hover:{backgroundColor:"gray.50"},height:"100%",alignItems:"center",justifyContent:"center",borderRadius:"4px",marginLeft:"-6px",children:P.jsx(sg,{size:"md",color:"gray.300",children:P.jsx(D1e,{})})}),P.jsx(sf,{textDecoration:t.draftDeprecated?"line-through":void 0,dataTestId:a,autoFocus:!t.draftId,initValue:t.draftId,placeholder:t.draftParent?"Enter the name of the field":"Enter the name of the table",onBlur:k,onFocus:T,onChange:_,onEnter:C,focusIfDependencyList:[t.type]})]}),l===Of.Updating&&t.draftId&&t.isDirtyItself&&P.jsx(ze,{cursor:"default",children:"*"})]}),t.draftId&&P.jsx(vG,{dataTestId:a,currentSchema:t.getSchema({skipObjectProperties:!0}),onSelect:$,menuButton:P.jsx(dt,{"data-testid":`${a}-select-type-button`,color:"gray.400",textDecoration:"underline",cursor:"pointer",className:M?e:void 0,children:t.label})}),t.draftId&&P.jsx(d2e,{open:p,setOpen:g,onRemove:i?E:void 0,onSettings:t.toggleSettings,dataTestId:`${a}-setting-button`,className:M?e:void 0})]})});function bG(t){return er({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"},child:[]}]})(t)}const f2e="_NodeSettingsRoot_qoqi9_1",h2e="_Actions_qoqi9_1",RV={NodeSettingsRoot:f2e,Actions:h2e},p2e=mt(({node:t,dataTestId:e})=>{const{root:r}=zb(),[n,i]=A.useState((!!t.draftDeprecated).toString()),o=A.useCallback(c=>{t.setTitle(c.replace(`
|
|
1087
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return o=c.done,c},e:function(c){a=!0,s=c},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function q$e(t,e){if(t){if(typeof t=="string")return CV(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return CV(t,e)}}function CV(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function TV(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function W$e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?TV(Object(r),!0).forEach(function(n){uG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):TV(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function U$e(){var t=new Set,e=null;function r(o){e&&(!o.canMonitor||o.canMonitor(e.canMonitorArgs))&&e.active.add(o)}function n(o){var a=W$e({},o);return t.add(a),r(a),function(){t.delete(a),e&&e.active.delete(a)}}function i(o){var a=o.eventName,s=o.payload;if(a==="onGenerateDragPreview"){e={canMonitorArgs:{initial:s.location.initial,source:s.source},active:new Set};var l=z$e(t),c;try{for(l.s();!(c=l.n()).done;){var d=c.value;r(d)}}catch(O){l.e(O)}finally{l.f()}}if(e){for(var p=Array.from(e.active),g=0,m=p;g<m.length;g++){var y=m[g];if(e.active.has(y)){var b;(b=y[a])===null||b===void 0||b.call(y,s)}}a==="onDrop"&&(e.active.clear(),e=null)}}return{dispatchEvent:i,monitorForConsumers:n}}function H$e(t){var e=t.typeKey,r=t.mount,n=t.dispatchEventToSource,i=t.defaultDropEffect,o=U$e(),a=B$e({typeKey:e,defaultDropEffect:i});function s(d){n==null||n(d),a.dispatchEvent(d),o.dispatchEvent(d)}function l(d){var p=d.event,g=d.dragInterface;xV.start({event:p,dragInterface:g,getDropTargetsOver:a.getIsOver,dispatchEvent:s})}function c(){function d(){var p={canStart:xV.canStart,start:l};return r(p)}return A$e({typeKey:e,mount:d})}return{registerUsage:c,dropTarget:a.dropTargetForConsumers,monitor:o.monitorForConsumers}}var $S=new WeakMap;function X$e(t){return $S.set(t.element,t),function(){$S.delete(t.element)}}var RA=H$e({typeKey:"element",defaultDropEffect:"move",mount:function(e){return IP.bind(window,{type:"dragstart",listener:function(n){var i,o,a,s;if(e.canStart(n)){var l=n.target;if(!(l instanceof HTMLElement))return null;var c=$S.get(l);if(!c)return null;var d=_A(n),p={element:c.element,dragHandle:(i=c.dragHandle)!==null&&i!==void 0?i:null,input:d};if(c.canDrag&&!c.canDrag(p))return n.preventDefault(),null;if(c.dragHandle){var g=document.elementFromPoint(d.clientX,d.clientY);if(!c.dragHandle.contains(g))return n.preventDefault(),null}try{var m;(m=n.dataTransfer)===null||m===void 0||m.setData("application/vnd.pdnd","")}catch{}var y={element:c.element,dragHandle:(o=c.dragHandle)!==null&&o!==void 0?o:null,data:(a=(s=c.getInitialData)===null||s===void 0?void 0:s.call(c,p))!==null&&a!==void 0?a:{}},b={key:"element",startedFrom:"internal",payload:y};e.start({event:n,dragInterface:b})}}})},dispatchEventToSource:function(e){var r,n,i=e.eventName,o=e.payload;(r=$S.get(o.source.element))===null||r===void 0||(n=r[i])===null||n===void 0||n.call(r,o)}}),Z$e=RA.dropTarget,G$e=RA.monitor;function Y$e(t){return fG(RA.registerUsage(),X$e(t),dG(t.element,{attribute:"draggable",value:"true"}))}const hG=(t,e)=>t.draftParent?t===e?!0:hG(t.draftParent,e):!1,EV=t=>{const e=[];let r=t.draftParent;for(;r;)e.push(r),r=r.draftParent;return e},K$e=(t,e)=>{const r=EV(e),n=EV(t),i=r.find(a=>a instanceof ti);return i?!n.find(a=>a===i):!1},sv=(t,e)=>!(t.$ref||!e.draftParent||t===e||t===e.draftParent||hG(t,e)||K$e(t,e)),pG=(t,e,r)=>{const n=A.useRef(null),[i,o]=A.useState(!1),[a,s]=A.useState(!1),[l,c]=A.useState(!1);return A.useEffect(()=>{let d=null;if(e){if(!n.current)return;d=Y$e({element:n.current,getInitialData:()=>({store:t})})}return()=>d==null?void 0:d()},[t,e]),A.useEffect(()=>{if(!n.current)return;let d=null;return(t instanceof yn||t instanceof ti)&&(d=Z$e({element:n.current,onDrop:p=>{const g=p.source.data.store;sv(t,g)&&r(g),c(!1),o(!1)},onDragEnter:p=>{const g=p.source.data.store;c(sv(t,g))},onDragLeave:()=>c(!1)})),()=>d==null?void 0:d()},[r,t]),A.useEffect(()=>G$e({onDragStart:d=>{const p=d.source.data.store;(t instanceof yn||t instanceof ti)&&sv(t,p)?o(sv(t,p)):s(!0)},onDrop:()=>{o(!1),s(!1)}}),[t]),{dragAndDropRef:n,isDrop:i,isDisabledDrop:a,isDraggedOver:l}};function*AS(t,e,r){if(yield*e(t),t instanceof yn)for(const n of t.draftProperties)yield*AS(n,e);else t instanceof ti&&(yield*AS(t.draftItems,e))}function jp(t,e,r){let n=!0;if(r||(n=e(t)),!n)return!1;if(t instanceof yn)for(const i of t.draftProperties)jp(i,e);else t instanceof ti&&jp(t.draftItems,e)}class J$e{constructor(){fe(this,"nodeId",vn());fe(this,"type",yc.Boolean);fe(this,"isCollapsible",!1);fe(this,"isCollapsed",!1);fe(this,"showSettings",!1);fe(this,"$ref","");fe(this,"state");lt(this,{},{autoBind:!0}),this.state=Bf(Ut({id:"",isReplaced:!1,parent:null,connectedToParent:!1,title:"",description:"",deprecated:!1}))}get isDisabled(){var e;return!!((e=this.draftParent)!=null&&e.$ref)}get label(){return To(this.$ref)??this.type}setNodeId(e){this.nodeId=e}get id(){return this.state.model.id}get draftId(){return this.state.id}get title(){return this.state.model.title}get draftTitle(){return this.state.title}get description(){return this.state.model.description}get draftDescription(){return this.state.description}get deprecated(){return this.state.model.deprecated}get draftDeprecated(){return this.state.deprecated}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}getSchema(){if(this.$ref)return vl({$ref:this.$ref},this.state);const e={type:xe.Boolean,default:!1};return vl(e,this.state)}get isValid(){return!0}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself}setId(e){this.state.id=e}setIsReplaced(e){this.state.isReplaced=e}setTitle(e){this.state.title=e}setDescription(e){this.state.description=e}setDeprecated(e){this.state.deprecated=e}setParent(e){this.state.parent=e,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}submitChanges(){this.state.submit()}resetChanges(){this.state.reset()}toggleSettings(){this.showSettings=!this.showSettings}}class e2e{constructor(){fe(this,"nodeId",vn());fe(this,"type",yc.Number);fe(this,"isCollapsible",!1);fe(this,"isCollapsed",!1);fe(this,"showSettings",!1);fe(this,"$ref","");fe(this,"state");lt(this,{},{autoBind:!0}),this.state=Bf(Ut({id:"",isReplaced:!1,parent:null,connectedToParent:!1,title:"",description:"",deprecated:!1}))}get isDisabled(){var e;return!!((e=this.draftParent)!=null&&e.$ref)}get label(){return To(this.$ref)??this.type}setNodeId(e){this.nodeId=e}get id(){return this.state.model.id}get draftId(){return this.state.id}get title(){return this.state.model.title}get draftTitle(){return this.state.title}get description(){return this.state.model.description}get draftDescription(){return this.state.description}get deprecated(){return this.state.model.deprecated}get draftDeprecated(){return this.state.deprecated}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}getSchema(){if(this.$ref)return vl({$ref:this.$ref},this.state);const e={type:xe.Number,default:0};return vl(e,this.state)}get isValid(){return!0}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself}setId(e){this.state.id=e}setIsReplaced(e){this.state.isReplaced=e}setTitle(e){this.state.title=e}setDescription(e){this.state.description=e}setDeprecated(e){this.state.deprecated=e}setParent(e){this.state.parent=e,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}submitChanges(){this.state.submit()}resetChanges(){this.state.reset()}toggleSettings(){this.showSettings=!this.showSettings}}class t2e{constructor(){fe(this,"nodeId",vn());fe(this,"type",yc.StringForeignKey);fe(this,"state");lt(this,{},{autoBind:!0}),this.state=Bf(Ut({foreignKey:null,parent:null,connectedToParent:!1}))}get isDisabled(){var e;return!!((e=this.draftParent)!=null&&e.$ref)}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}setNodeId(e){this.nodeId=e}get foreignKey(){return this.state.model.foreignKey}get draftForeignKey(){return this.state.foreignKey}get isDirtyItself(){return this.state.isDirty}setForeignKey(e){this.state.foreignKey=e}setParent(e){this.state.parent=e,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}submitChanges(){this.state.submit()}resetChanges(){this.state.reset()}}const r2e=14,gG=t=>{if("$ref"in t){const e=CA[t.$ref];if(!e)throw new Error(`Schema refs must be defined ref$=${t.$ref}`);const r=gG(e);return r.$ref=t.$ref,r}switch(t.type){case xe.Object:{const e=new yn;return Fm(e,t),Object.entries(t.properties).forEach(([r,n])=>{const i=Kn(n);i.setId(r),e.addProperty(i)}),e}case xe.Array:{const e=Kn(t.items),r=new ti(e);return Fm(r,t),r}case xe.String:{const e=new af;if(t.foreignKey!==void 0){const r=new t2e;r.setForeignKey(t.foreignKey),e.setForeignKey(r)}return e.setContentMediaType(t.contentMediaType??null),Fm(e,t),e}case xe.Number:{const e=new e2e;return Fm(e,t),e}case xe.Boolean:{const e=new J$e;return Fm(e,t),e}}},Fm=(t,e)=>{e.title&&t.setTitle(e.title),e.description&&t.setDescription(e.description),e.deprecated&&t.setDeprecated(e.deprecated)},Kn=(t,e)=>{const r=gG(t);if(n2e(r),e!=null&&e.collapse){const n=o2e(r),i=e.collapseComplexity??r2e;n>=i&&i2e(r)}return r},n2e=t=>{jp(t,e=>(e.isCollapsible&&e.$ref&&(e.isCollapsed=!0),!0))},i2e=t=>{jp(t,e=>(e.isCollapsible&&(e.isCollapsed=!0),!0))},o2e=t=>{let e=1;return jp(t,()=>(e+=1,!0)),e},a2e=[{id:"String",label:xe.String,getSchemaNode:()=>Kn({type:xe.String,default:""})},{id:"Number",label:xe.Number,getSchemaNode:()=>Kn({type:xe.Number,default:0})},{id:"Boolean",label:xe.Boolean,getSchemaNode:()=>Kn({type:xe.Boolean,default:!1})},{id:"Object",label:xe.Object,getSchemaNode:()=>Kn({type:xe.Object,properties:{},required:[],additionalProperties:!1})},{id:"Array",label:xe.Array,getSchemaNode:t=>{let e={type:xe.String,default:""};return"$ref"in t||(t.type===xe.Number||t.type===xe.Boolean||t.type===xe.String)&&(e=t),Kn({type:xe.Array,items:e})}},{id:"ForeignKeyString",label:"foreign key",getSchemaNode:t=>{let e={type:xe.String,default:"",foreignKey:""};return!("$ref"in t)&&t.type===xe.Array&&!("$ref"in t.items)&&t.items.type===xe.String&&t.items.foreignKey!==void 0&&(e=t.items),Kn(e)}}],s2e=[{id:"schemas-submenu",label:"Schemas",type:"submenu",items:[{id:"File",label:To(Jt.File),getSchemaNode:()=>{const t={$ref:Jt.File};return Kn(t)}},{id:"Markdown",label:"Markdown",getSchemaNode:t=>{const e={type:xe.String,default:"",contentMediaType:"text/markdown"};return!("$ref"in t)&&t.type===xe.String&&(e.default=t.default),Kn(e)}}]}],l2e=[{id:"system-fields-submenu",label:"System fields",type:"submenu",items:[{id:"RowId",label:To(Jt.RowId),getSchemaNode:()=>Kn({$ref:Jt.RowId})},{id:"RowVersionId",label:To(Jt.RowVersionId),getSchemaNode:()=>Kn({$ref:Jt.RowVersionId})},{id:"RowCreatedId",label:To(Jt.RowCreatedId),getSchemaNode:()=>Kn({$ref:Jt.RowCreatedId}),addDividerAfter:!0},{id:"RowCreatedAt",label:To(Jt.RowCreatedAt),getSchemaNode:()=>Kn({$ref:Jt.RowCreatedAt})},{id:"RowPublishedAt",label:To(Jt.RowPublishedAt),getSchemaNode:()=>Kn({$ref:Jt.RowPublishedAt})},{id:"RowUpdatedAt",label:To(Jt.RowUpdatedAt),getSchemaNode:()=>Kn({$ref:Jt.RowUpdatedAt}),addDividerAfter:!0},{id:"RowHash",label:To(Jt.RowHash),getSchemaNode:()=>Kn({$ref:Jt.RowHash})},{id:"RowSchemaHash",label:To(Jt.RowSchemaHash),getSchemaNode:()=>Kn({$ref:Jt.RowSchemaHash})}]}],mG=[{id:vn(),label:"Types",options:a2e,addDividerAfter:!0},{id:vn(),label:"Schemas",options:s2e,addDividerAfter:!0},{id:vn(),label:"System fields",options:l2e}],_V=(t,e)=>{const r=n=>{for(const i of n)if(i.type==="submenu"){const o=r(i.items);if(o)return o}else if(i.id===t)return i.getSchemaNode(e)};for(const n of mG){const i=r(n.options);if(i)return i}},c2e=({label:t,options:e,onSelect:r,dataTestIdPrefix:n})=>P.jsxs(mb,{positioning:{placement:"right-start",gutter:-8},children:[P.jsxs(Bge,{justifyContent:"space-between",children:[t,P.jsx(Z1e,{})]}),P.jsx(Ku,{children:P.jsx(vb,{children:P.jsx(yb,{children:e.map(i=>P.jsxs(Qe.Fragment,{children:[P.jsx(Jl,{value:i.id,"data-testid":`${n}-submenu-${i.id}`,onClick:()=>r(i.id),children:i.label}),i.addDividerAfter&&P.jsx(nW,{})]},i.id))})})})]}),vG=mt(({currentSchema:t,menuButton:e,onSelect:r,dataTestId:n})=>{const i=A.useCallback(a=>{if(!Array.isArray(a)){const s=_V(a,t);s&&r(s)}},[t,r]),o=A.useCallback(a=>{const s=_V(a,t);s&&r(s)},[t,r]);return P.jsxs(mb,{children:[P.jsx(zx,{asChild:!0,children:e}),P.jsx(Ku,{children:P.jsx(vb,{children:P.jsx(yb,{children:mG.map(a=>P.jsxs(Qe.Fragment,{children:[a.options.map(s=>s.type==="submenu"?P.jsx(c2e,{label:s.label,options:s.items,onSelect:o,dataTestIdPrefix:`${n}-menu-sub`},s.id):P.jsx(Jl,{value:s.id,"data-testid":`${n}-menu-type-${s.id}`,onClick:()=>i(s.id),children:s.label},s.id)),a.addDividerAfter&&P.jsx(nW,{})]},a.id))})})})]})}),u2e=["Backspace","Escape","Enter","ArrowRight","ArrowLeft","Delete"],sf=({initValue:t,placeholder:e,autoFocus:r,onBlur:n,onChange:i,onEscape:o,onEnter:a,onFocus:s,focusIfDependencyList:l,restrict:c,prefix:d,postfix:p,dataTestId:g,textDecoration:m})=>{const y=A.useRef(null),b=A.useRef(null);A.useEffect(()=>{var C;r&&((C=y.current)==null||C.focus())},[r]),A.useLayoutEffect(()=>{if(window.getSelection()&&b.current!==null&&y.current){const E=(y.current.textContent||"").length,_=Math.min(E,b.current),$=document.createRange(),M=window.getSelection(),j=y.current.childNodes.length?y.current.childNodes[0]:y.current;$.setStart(j,_),$.collapse(!0),M&&(M.removeAllRanges(),M.addRange($))}}),FTe(()=>{var C;if(l){(C=y.current)==null||C.focus();const E=window.getSelection();if(y.current&&E){const _=document.createRange();_.selectNodeContents(y.current),_.collapse(!1),E.removeAllRanges(),E.addRange(_)}}},[...l||[]]);const O=A.useCallback(C=>{const E=window.getSelection();E&&E.rangeCount>0&&(b.current=E.getRangeAt(0).startOffset);const _=C.currentTarget.innerText;i==null||i(_===`
|
|
1088
|
+
`?"":_)},[i]),S=A.useCallback(()=>{n==null||n(),b.current=null},[n]),w=A.useCallback(C=>{var E,_;C.key==="Enter"&&(C.preventDefault(),t&&((E=y.current)==null||E.blur(),a==null||a())),C.key==="Escape"&&(C.preventDefault(),t&&((_=y.current)==null||_.blur()),o==null||o()),c&&!u2e.includes(C.key)&&!c.test(C.key)&&C.preventDefault()},[t,a,o,c]),k=A.useCallback(()=>{var C;(C=y.current)==null||C.focus()},[]),T=!t&&e;return P.jsxs(Te,{minWidth:0,width:T?"100%":void 0,position:"relative",onClick:k,children:[!T&&d,P.jsx(ze,{textDecoration:m,"data-testid":g,autoFocus:!0,ref:y,contentEditable:!0,spellCheck:"false",dangerouslySetInnerHTML:{__html:t},outline:0,width:"100%",onBlur:S,onFocus:s,onChange:O,onInput:O,onKeyDown:w}),!T&&p,T&&P.jsx(dt,{cursor:"text",userSelect:"none",pointerEvents:"none",whiteSpace:"nowrap",color:"gray.400",position:"absolute",children:e})]})},d2e=({open:t,setOpen:e,dataTestId:r,className:n,onRemove:i,onSettings:o})=>!i&&!o?null:P.jsxs(mb,{open:t,onOpenChange:a=>e(a.open),positioning:{placement:"bottom-start"},children:[P.jsx(zx,{asChild:!0,children:P.jsx(oSe,{height:"26px",color:"gray.300",_hover:{color:"gray.400"},className:n,dataTestId:r})}),P.jsx(Ku,{children:P.jsx(vb,{children:P.jsxs(yb,{children:[o&&P.jsxs(Jl,{color:"gray.600",value:"settings","data-restid":`${r}-settings-button`,onClick:o,children:[P.jsx(gP,{}),P.jsx(ze,{flex:1,children:"Settings"})]}),i&&P.jsxs(Jl,{color:"gray.600",value:"delete","data-restid":`${r}-remove-button`,onClick:i,children:[P.jsx(Ab,{}),P.jsx(ze,{flex:1,children:"Delete"})]})]})})})]}),yG=mt(({store:t,typeClassName:e,onBlur:r,onEnter:n,onRemove:i,onSelect:o,dataTestId:a})=>{const{root:s,mode:l}=zb(),[c,d]=A.useState(!1),[p,g]=A.useState(!1),m=A.useCallback(j=>{t instanceof yn?s.addProperty(t,j,{beforeNode:t.draftProperties[0]}):t instanceof ti&&s.replaceItems(t,j)},[s,t]),y=!!(s.areThereDropTargets(t)&&t.draftId),{dragAndDropRef:b,isDrop:O,isDraggedOver:S,isDisabledDrop:w}=pG(t,y,m),k=A.useCallback(()=>{d(!1),r==null||r(t)},[r,t]),T=A.useCallback(()=>{d(!0)},[]),C=A.useCallback(()=>{n==null||n(t)},[n,t]),E=A.useCallback(()=>{i==null||i(t)},[i,t]),_=A.useCallback(j=>{s.setId(t,j)},[s,t]),$=A.useCallback(j=>{o(t,j)},[o,t]),M=!c&&!p;return t.isDisabled?P.jsxs(Te,{gap:"0.5rem",width:"100%",justifyContent:"flex-start",outline:0,children:[P.jsx(Te,{flex:0,position:"relative",borderWidth:1,borderStyle:"dashed",borderColor:"#00000000",color:"gray.400",whiteSpace:"nowrap",children:P.jsx(ze,{userSelect:"none",children:t.draftId})}),P.jsx(dt,{color:"gray.400",className:e,children:t.label})]}):P.jsxs(Te,{gap:"0.5rem",width:"100%",justifyContent:"flex-start",outline:0,children:[P.jsxs(Te,{"data-testid":O&&`${a}-drop`,flex:t.draftId?0:1,ref:b,position:"relative",borderWidth:1,borderStyle:"dashed",borderColor:O?"gray.400":"#00000000",backgroundColor:S?"gray.200":void 0,color:w?"gray.300":void 0,whiteSpace:"nowrap",children:[t.isDisabled?P.jsx(ze,{userSelect:"none",children:t.draftId}):P.jsxs(P.Fragment,{children:[y&&P.jsx(Te,{"data-testid":`${a}-drag-button`,position:"absolute",left:"-34px",className:M?e:void 0,cursor:"grab",_hover:{backgroundColor:"gray.50"},height:"100%",alignItems:"center",justifyContent:"center",borderRadius:"4px",marginLeft:"-6px",children:P.jsx(sg,{size:"md",color:"gray.300",children:P.jsx(D1e,{})})}),P.jsx(sf,{textDecoration:t.draftDeprecated?"line-through":void 0,dataTestId:a,autoFocus:!t.draftId,initValue:t.draftId,placeholder:t.draftParent?"Enter the name of the field":"Enter the name of the table",onBlur:k,onFocus:T,onChange:_,onEnter:C,focusIfDependencyList:[t.type]})]}),l===Of.Updating&&t.draftId&&t.isDirtyItself&&P.jsx(ze,{cursor:"default",children:"*"})]}),t.draftId&&P.jsx(vG,{dataTestId:a,currentSchema:t.getSchema({skipObjectProperties:!0}),onSelect:$,menuButton:P.jsx(dt,{"data-testid":`${a}-select-type-button`,color:"gray.400",textDecoration:"underline",cursor:"pointer",className:M?e:void 0,children:t.label})}),t.draftId&&P.jsx(d2e,{open:p,setOpen:g,onRemove:i?E:void 0,onSettings:t.toggleSettings,dataTestId:`${a}-setting-button`,className:M?e:void 0})]})});function bG(t){return er({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"},child:[]}]})(t)}const f2e="_NodeSettingsRoot_qoqi9_1",h2e="_Actions_qoqi9_1",RV={NodeSettingsRoot:f2e,Actions:h2e},p2e=mt(({node:t,dataTestId:e})=>{const{root:r}=zb(),[n,i]=A.useState((!!t.draftDeprecated).toString()),o=A.useCallback(c=>{t.setTitle(c.replace(`
|
|
1088
1089
|
`,"")),t.parent instanceof yn?r.replaceProperty(t.parent,t,t):t.parent instanceof ti&&r.replaceItems(t.parent,t)},[t,r]),a=A.useCallback(c=>{t.setDescription(c.replace(`
|
|
1089
1090
|
`,"")),t.parent instanceof yn?r.replaceProperty(t.parent,t,t):t.parent instanceof ti&&r.replaceItems(t.parent,t)},[t,r]),s=A.useCallback(c=>{i(c),t.parent instanceof yn?r.replaceProperty(t.parent,t,t):t.parent instanceof ti&&r.replaceItems(t.parent,t)},[t,r]),l=A.useCallback(()=>{const c=n.toLowerCase()==="false"||n==="0"?!1:!!n;i(c.toString()),t.setDeprecated(c)},[n,t]);return P.jsx(Te,{className:RV.NodeSettingsRoot,direction:"column",borderWidth:1,m:"4px 4px 16px 20px",borderColor:"gray.200",borderStyle:"dashed",borderRadius:"2px",p:"8px",width:"100%",children:P.jsxs(Te,{children:[P.jsxs(Te,{width:"100%",direction:"column",children:[P.jsxs(Te,{gap:"8px",children:[P.jsx(dt,{color:"gray.400",children:"description:"}),P.jsx(sf,{dataTestId:`${e}-description`,prefix:'"',postfix:'"',initValue:t.draftDescription??"",onChange:a})]}),P.jsxs(Te,{gap:"8px",display:"none",children:[P.jsx(dt,{color:"gray.400",children:"title:"}),P.jsx(sf,{dataTestId:`${e}-title`,prefix:'"',postfix:'"',initValue:t.draftTitle??"",onChange:o})]}),P.jsxs(Te,{gap:"8px",children:[P.jsx(dt,{color:"gray.400",children:"deprecated:"}),P.jsx(sf,{dataTestId:`${e}-deprecated`,prefix:"",postfix:"",initValue:n,onChange:s,onBlur:l})]})]}),P.jsx(ze,{className:RV.Actions,children:P.jsx(Nb,{height:"24px",onClick:t.toggleSettings})})]})})}),IA=mt(({dataTestId:t,field:e,fieldClassName:r,children:n,node:i})=>{const o=i==null?void 0:i.isCollapsible,a=i==null?void 0:i.isCollapsed,s=i==null?void 0:i.nodeId,l=i&&"toggleCollapsed"in i?i.toggleCollapsed:void 0,c=`dot-outline-${s}`,d=`collapse-button-${s}`,p=o&&!a?{[`& .${c}`]:{visibility:"hidden"},[`& .${d}`]:{visibility:"visible"}}:{};return P.jsxs(Te,{flexDirection:"column",alignSelf:"flex-start",width:"100%",_hover:p,children:[P.jsxs(Te,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",className:r,position:"relative",children:[P.jsx(ze,{position:"absolute",ml:"-60px",height:"100%",width:"60px"}),P.jsx(ze,{className:c,color:"gray.300",visibility:a?"hidden":"visible",children:P.jsx(X2,{})}),o&&P.jsx(Ti,{className:d,visibility:a?"visible":"hidden",_hover:{backgroundColor:"transparent"},ml:"-8px",position:"absolute",size:"xs",color:"gray.400",variant:"ghost",onClick:l,width:"26px",height:"26px",children:P.jsx(ze,{rotate:a?"0":"90deg",children:P.jsx(bG,{})})}),e]}),i&&i.showSettings&&!a&&P.jsx(p2e,{dataTestId:`${t}-settings`,node:i}),n&&!a&&P.jsx(Te,{ml:"7px",pl:"18px",borderLeftWidth:1,borderLeftStyle:"solid",borderLeftColor:"white",_hover:{borderLeftColor:"blackAlpha.200"},children:n})]})}),g2e=mt(({node:t,dataTestId:e})=>{const{mode:r,root:n}=zb(),i=A.useCallback(d=>{const p=t.draftItems;p instanceof yn?n.addProperty(p,d,{beforeNode:p.draftProperties[0]}):p instanceof ti&&n.replaceItems(p,d)},[t.draftItems,n]),{dragAndDropRef:o,isDrop:a,isDraggedOver:s,isDisabledDrop:l}=pG(t.draftItems,!0,i),c=A.useCallback(d=>{n.replaceItems(t,d),d instanceof yn&&!d.$ref&&n.addProperty(d,new af)},[t,n]);return P.jsx(Te,{flexDirection:"column",width:"100%",children:P.jsx(IA,{dataTestId:e,field:P.jsx(vG,{dataTestId:e,currentSchema:t.draftItems.getSchema({skipObjectProperties:!0}),onSelect:c,menuButton:P.jsx(ze,{"data-testid":a&&`${e}-drop`,ref:o,borderWidth:1,borderStyle:"dashed",borderColor:a?"gray.400":"#00000000",backgroundColor:s?"gray.200":void 0,color:l?"gray.300":void 0,children:P.jsxs(dt,{"data-testid":`${e}-select-type-button`,color:a?void 0:"gray.400",cursor:"pointer",outline:0,_hover:{textDecoration:"underline",textDecorationColor:"gray.400"},children:[t.draftItems.label,r===Of.Updating&&t.draftItems.isDirtyItself&&P.jsx("span",{children:"*"})]})})}),children:P.jsx($A,{dataTestId:`${e}-0`,node:t.draftItems})})})}),m2e="_Root_1ypkj_1",v2e="_Field_1ypkj_1",MS={Root:m2e,Field:v2e},y2e=mt(({node:t,dataTestId:e})=>{const{root:r}=zb(),n=A.useCallback(()=>{r.addProperty(t,new af)},[t,r]),i=A.useCallback(l=>{l.draftId||r.removeProperty(t,l)},[t,r]),o=A.useCallback(l=>{r.removeProperty(t,l)},[t,r]),a=A.useCallback((l,c)=>{r.replaceProperty(t,l,c)},[t,r]),s=A.useCallback(l=>{l instanceof yn?r.addProperty(l,new af,{beforeNode:l.draftProperties[0]}):r.addProperty(t,new af,{afterNode:l})},[t,r]);return P.jsxs(Te,{flexDirection:"column",width:"100%",children:[t.draftProperties.map((l,c)=>P.jsx(IA,{dataTestId:`${e}-${c}`,node:l,fieldClassName:MS.Root,field:P.jsx(yG,{dataTestId:`${e}-${c}`,store:l,typeClassName:MS.Field,onSelect:a,onBlur:i,onRemove:o,onEnter:s}),children:P.jsx($A,{dataTestId:`${e}-${c}`,node:l})},l.nodeId)),t.showingCreateField&&P.jsx(ze,{ml:"-14px",children:P.jsx(mg,{dataTestId:`${e}-create-field-button`,title:"Field",disabled:t.isDisabledCreateField,onClick:n})})]})}),b2e=mt(({node:t,dataTestId:e})=>{const r=zb(),n=A.useCallback(()=>{r.onSelectForeignKey(t)},[r,t]);return P.jsxs(Te,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",children:[P.jsx(ze,{color:"gray.300",children:P.jsx(X2,{})}),P.jsx(Te,{gap:"0.5rem",width:"100%",justifyContent:"flex-start",outline:0,_hover:{textDecoration:"underline",textDecorationColor:"gray.400"},onClick:n,children:P.jsx(dt,{color:"gray.400",cursor:"pointer","data-testid":`${e}-connect-foreign-key`,children:t.draftForeignKey||"<Connect table>"})})]})}),O2e=mt(({node:t,dataTestId:e})=>t.draftForeignKey?P.jsx(Te,{flexDirection:"column",width:"100%",children:P.jsx(b2e,{dataTestId:`${e}-0`,node:t.draftForeignKey})}):null),$A=({node:t,dataTestId:e})=>{if(t instanceof yn)return P.jsx(y2e,{dataTestId:e,node:t});if(t instanceof ti)return P.jsx(g2e,{dataTestId:e,node:t});if(t instanceof af)return P.jsx(O2e,{dataTestId:e,node:t})},w2e=mt(({store:t})=>{const e=A.useCallback((n,i)=>{i.setId(n.draftId),t.replaceNode(i)},[t]),r=A.useCallback(n=>{n instanceof yn&&n.addProperty(new af,{beforeNode:n.draftProperties[0]})},[]);return P.jsx(IA,{dataTestId:"0",fieldClassName:MS.Root,field:P.jsx(yG,{dataTestId:"0",store:t.node,typeClassName:MS.Field,onSelect:e,onEnter:r}),children:P.jsx($A,{dataTestId:"0",node:t.node})})}),OG=({height:t="2.5rem",onClick:e,isDisabled:r,dataTestId:n})=>P.jsx(ag,{"data-testid":n,disabled:r,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",height:t,variant:"ghost",onClick:e,children:P.jsx(sg,{size:"sm",color:"gray.500",children:P.jsx(V1e,{})})}),wG=1024;let S2e=0,Va=class{constructor(e,r){this.from=e,this.to=r}};class _t{constructor(e={}){this.id=S2e++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=fi.match(e)),r=>{let n=e(r);return n===void 0?null:[this,n]}}}_t.closedBy=new _t({deserialize:t=>t.split(" ")});_t.openedBy=new _t({deserialize:t=>t.split(" ")});_t.group=new _t({deserialize:t=>t.split(" ")});_t.isolate=new _t({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});_t.contextHash=new _t({perNode:!0});_t.lookAhead=new _t({perNode:!0});_t.mounted=new _t({perNode:!0});class Iy{constructor(e,r,n){this.tree=e,this.overlay=r,this.parser=n}static get(e){return e&&e.props&&e.props[_t.mounted.id]}}const x2e=Object.create(null);class fi{constructor(e,r,n,i=0){this.name=e,this.props=r,this.id=n,this.flags=i}static define(e){let r=e.props&&e.props.length?Object.create(null):x2e,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new fi(e.name||"",r,e.id,n);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");r[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let r=this.prop(_t.group);return r?r.indexOf(e)>-1:!1}return this.id==e}static match(e){let r=Object.create(null);for(let n in e)for(let i of n.split(" "))r[i]=e[n];return n=>{for(let i=n.prop(_t.group),o=-1;o<(i?i.length:0);o++){let a=r[o<0?n.name:i[o]];if(a)return a}}}}fi.none=new fi("",Object.create(null),0,8);class qb{constructor(e){this.types=e;for(let r=0;r<e.length;r++)if(e[r].id!=r)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let r=[];for(let n of this.types){let i=null;for(let o of e){let a=o(n);a&&(i||(i=Object.assign({},n.props)),i[a[0].id]=a[1])}r.push(i?new fi(n.name,i,n.id,n.flags):n)}return new qb(r)}}const $O=new WeakMap,IV=new WeakMap;var nn;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(nn||(nn={}));class Tr{constructor(e,r,n,i,o){if(this.type=e,this.children=r,this.positions=n,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[a,s]of o)this.props[typeof a=="number"?a:a.id]=s}}toString(){let e=Iy.get(this);if(e&&!e.overlay)return e.tree.toString();let r="";for(let n of this.children){let i=n.toString();i&&(r&&(r+=","),r+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(r.length?"("+r+")":""):r}cursor(e=0){return new NS(this.topNode,e)}cursorAt(e,r=0,n=0){let i=$O.get(this)||this.topNode,o=new NS(i);return o.moveTo(e,r),$O.set(this,o._tree),o}get topNode(){return new ro(this,0,0,null)}resolve(e,r=0){let n=$y($O.get(this)||this.topNode,e,r,!1);return $O.set(this,n),n}resolveInner(e,r=0){let n=$y(IV.get(this)||this.topNode,e,r,!0);return IV.set(this,n),n}resolveStack(e,r=0){return C2e(this,e,r)}iterate(e){let{enter:r,leave:n,from:i=0,to:o=this.length}=e,a=e.mode||0,s=(a&nn.IncludeAnonymous)>0;for(let l=this.cursor(a|nn.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=i&&(!s&&l.type.isAnonymous||r(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&n&&(s||!l.type.isAnonymous)&&n(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let r in this.props)e.push([+r,this.props[r]]);return e}balance(e={}){return this.children.length<=8?this:NA(fi.none,this.children,this.positions,0,this.children.length,0,this.length,(r,n,i)=>new Tr(this.type,r,n,i,this.propValues),e.makeTree||((r,n,i)=>new Tr(fi.none,r,n,i)))}static build(e){return T2e(e)}}Tr.empty=new Tr(fi.none,[],[],0);class AA{constructor(e,r){this.buffer=e,this.index=r}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new AA(this.buffer,this.index)}}class Fu{constructor(e,r,n){this.buffer=e,this.length=r,this.set=n}get type(){return fi.none}toString(){let e=[];for(let r=0;r<this.buffer.length;)e.push(this.childString(r)),r=this.buffer[r+3];return e.join(",")}childString(e){let r=this.buffer[e],n=this.buffer[e+3],i=this.set.types[r],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,n==e)return o;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return o+"("+a.join(",")+")"}findChild(e,r,n,i,o){let{buffer:a}=this,s=-1;for(let l=e;l!=r&&!(SG(o,i,a[l+1],a[l+2])&&(s=l,n>0));l=a[l+3]);return s}slice(e,r,n){let i=this.buffer,o=new Uint16Array(r-e),a=0;for(let s=e,l=0;s<r;){o[l++]=i[s++],o[l++]=i[s++]-n;let c=o[l++]=i[s++]-n;o[l++]=i[s++]-e,a=Math.max(a,c)}return new Fu(o,a,this.set)}}function SG(t,e,r,n){switch(t){case-2:return r<e;case-1:return n>=e&&r<e;case 0:return r<e&&n>e;case 1:return r<=e&&n>e;case 2:return n>e;case 4:return!0}}function $y(t,e,r,n){for(var i;t.from==t.to||(r<1?t.from>=e:t.from>e)||(r>-1?t.to<=e:t.to<e);){let a=!n&&t instanceof ro&&t.index<0?null:t.parent;if(!a)return t;t=a}let o=n?0:nn.IgnoreOverlays;if(n)for(let a=t,s=a.parent;s;a=s,s=a.parent)a instanceof ro&&a.index<0&&((i=s.enter(e,r,o))===null||i===void 0?void 0:i.from)!=a.from&&(t=s);for(;;){let a=t.enter(e,r,o);if(!a)return t;t=a}}class xG{cursor(e=0){return new NS(this,e)}getChild(e,r=null,n=null){let i=$V(this,e,r,n);return i.length?i[0]:null}getChildren(e,r=null,n=null){return $V(this,e,r,n)}resolve(e,r=0){return $y(this,e,r,!1)}resolveInner(e,r=0){return $y(this,e,r,!0)}matchContext(e){return ZR(this.parent,e)}enterUnfinishedNodesBefore(e){let r=this.childBefore(e),n=this;for(;r;){let i=r.lastChild;if(!i||i.to!=r.to)break;i.type.isError&&i.from==i.to?(n=r,r=i.prevSibling):r=i}return n}get node(){return this}get next(){return this.parent}}class ro extends xG{constructor(e,r,n,i){super(),this._tree=e,this.from=r,this.index=n,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,r,n,i,o=0){for(let a=this;;){for(let{children:s,positions:l}=a._tree,c=r>0?s.length:-1;e!=c;e+=r){let d=s[e],p=l[e]+a.from;if(SG(i,n,p,p+d.length)){if(d instanceof Fu){if(o&nn.ExcludeBuffers)continue;let g=d.findChild(0,d.buffer.length,r,n-p,i);if(g>-1)return new Ks(new P2e(a,d,e,p),null,g)}else if(o&nn.IncludeAnonymous||!d.type.isAnonymous||MA(d)){let g;if(!(o&nn.IgnoreMounts)&&(g=Iy.get(d))&&!g.overlay)return new ro(g.tree,p,e,a);let m=new ro(d,p,e,a);return o&nn.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(r<0?d.children.length-1:0,r,n,i)}}}if(o&nn.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+r:e=r<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,r,n=0){let i;if(!(n&nn.IgnoreOverlays)&&(i=Iy.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:a,to:s}of i.overlay)if((r>0?a<=o:a<o)&&(r<0?s>=o:s>o))return new ro(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,r,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function $V(t,e,r,n){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(r!=null){for(let a=!1;!a;)if(a=i.type.is(r),!i.nextSibling())return o}for(;;){if(n!=null&&i.type.is(n))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return n==null?o:[]}}function ZR(t,e,r=e.length-1){for(let n=t;r>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[r]&&e[r]!=n.name)return!1;r--}}return!0}class P2e{constructor(e,r,n,i){this.parent=e,this.buffer=r,this.index=n,this.start=i}}class Ks extends xG{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,r,n){super(),this.context=e,this._parent=r,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,r,n){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,r-this.context.start,n);return o<0?null:new Ks(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,r,n=0){if(n&nn.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],r>0?1:-1,e-this.context.start,r);return o<0?null:new Ks(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,r=e.buffer[this.index+3];return r<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Ks(this.context,this._parent,r):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,r=this._parent?this._parent.index+4:0;return this.index==r?this.externalSibling(-1):new Ks(this.context,this._parent,e.findChild(r,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],r=[],{buffer:n}=this.context,i=this.index+4,o=n.buffer[this.index+3];if(o>i){let a=n.buffer[this.index+1];e.push(n.slice(i,o,a)),r.push(0)}return new Tr(this.type,e,r,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function PG(t){if(!t.length)return null;let e=0,r=t[0];for(let o=1;o<t.length;o++){let a=t[o];(a.from>r.from||a.to<r.to)&&(r=a,e=o)}let n=r instanceof ro&&r.index<0?null:r.parent,i=t.slice();return n?i[e]=n:i.splice(e,1),new k2e(i,r)}class k2e{constructor(e,r){this.heads=e,this.node=r}get next(){return PG(this.heads)}}function C2e(t,e,r){let n=t.resolveInner(e,r),i=null;for(let o=n instanceof ro?n:n.context.parent;o;o=o.parent)if(o.index<0){let a=o.parent;(i||(i=[n])).push(a.resolve(e,r)),o=a}else{let a=Iy.get(o.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let s=new ro(a.tree,a.overlay[0].from+o.from,-1,o);(i||(i=[n])).push($y(s,e,r,!1))}}return i?PG(i):n}class NS{get name(){return this.type.name}constructor(e,r=0){if(this.mode=r,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof ro)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,r){this.index=e;let{start:n,buffer:i}=this.buffer;return this.type=r||i.set.types[i.buffer[e]],this.from=n+i.buffer[e+1],this.to=n+i.buffer[e+2],!0}yield(e){return e?e instanceof ro?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,r,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,r,n,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,r-this.buffer.start,n);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,r,n=this.mode){return this.buffer?n&nn.ExcludeBuffers?!1:this.enterChild(1,e,r):this.yield(this._tree.enter(e,r,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&nn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&nn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:r}=this.buffer,n=this.stack.length-1;if(e<0){let i=n<0?0:this.stack[n]+4;if(this.index!=i)return this.yieldBuf(r.findChild(i,this.index,-1,0,4))}else{let i=r.buffer[this.index+3];if(i<(n<0?r.buffer.length:r.buffer[this.stack[n]+3]))return this.yieldBuf(i)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let r,n,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:r,parent:n}=i)}else({index:r,_parent:n}=this._tree);for(;n;{index:r,_parent:n}=n)if(r>-1)for(let o=r+e,a=e<0?-1:n._tree.children.length;o!=a;o+=e){let s=n._tree.children[o];if(this.mode&nn.IncludeAnonymous||s instanceof Fu||!s.type.isAnonymous||MA(s))return!1}return!0}move(e,r){if(r&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,r=0){for(;(this.from==this.to||(r<1?this.from>=e:this.from>e)||(r>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,r););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,r=null,n=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let a=e;a;a=a._parent)if(a.index==i){if(i==this.index)return a;r=a,n=o+1;break e}i=this.stack[--o]}for(let i=n;i<this.stack.length;i++)r=new Ks(this.buffer,r,this.stack[i]);return this.bufferNode=new Ks(this.buffer,r,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,r){for(let n=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&r&&r(this),i=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,i=!0}}}matchContext(e){if(!this.buffer)return ZR(this.node.parent,e);let{buffer:r}=this.buffer,{types:n}=r.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return ZR(this._tree,e,i);let a=n[r.buffer[this.stack[o]]];if(!a.isAnonymous){if(e[i]&&e[i]!=a.name)return!1;i--}}return!0}}function MA(t){return t.children.some(e=>e instanceof Fu||!e.type.isAnonymous||MA(e))}function T2e(t){var e;let{buffer:r,nodeSet:n,maxBufferLength:i=wG,reused:o=[],minRepeatType:a=n.types.length}=t,s=Array.isArray(r)?new AA(r,r.length):r,l=n.types,c=0,d=0;function p(C,E,_,$,M,j){let{id:B,start:V,end:X,size:D}=s,F=d,Y=c;for(;D<0;)if(s.next(),D==-1){let N=o[B];_.push(N),$.push(V-C);return}else if(D==-3){c=B;return}else if(D==-4){d=B;return}else throw new RangeError(`Unrecognized record size: ${D}`);let ie=l[B],H,ne,z=V-C;if(X-V<=i&&(ne=O(s.pos-E,M))){let N=new Uint16Array(ne.size-ne.skip),U=s.pos-ne.size,J=N.length;for(;s.pos>U;)J=S(ne.start,N,J);H=new Fu(N,X-ne.start,n),z=ne.start-C}else{let N=s.pos-D;s.next();let U=[],J=[],Q=B>=a?B:-1,q=0,oe=X;for(;s.pos>N;)Q>=0&&s.id==Q&&s.size>=0?(s.end<=oe-i&&(y(U,J,V,q,s.end,oe,Q,F,Y),q=U.length,oe=s.end),s.next()):j>2500?g(V,N,U,J):p(V,N,U,J,Q,j+1);if(Q>=0&&q>0&&q<U.length&&y(U,J,V,q,V,oe,Q,F,Y),U.reverse(),J.reverse(),Q>-1&&q>0){let Oe=m(ie,Y);H=NA(ie,U,J,0,U.length,0,X-V,Oe,Oe)}else H=b(ie,U,J,X-V,F-X,Y)}_.push(H),$.push(z)}function g(C,E,_,$){let M=[],j=0,B=-1;for(;s.pos>E;){let{id:V,start:X,end:D,size:F}=s;if(F>4)s.next();else{if(B>-1&&X<B)break;B<0&&(B=D-i),M.push(V,X,D),j++,s.next()}}if(j){let V=new Uint16Array(j*4),X=M[M.length-2];for(let D=M.length-3,F=0;D>=0;D-=3)V[F++]=M[D],V[F++]=M[D+1]-X,V[F++]=M[D+2]-X,V[F++]=F;_.push(new Fu(V,M[2]-X,n)),$.push(X-C)}}function m(C,E){return(_,$,M)=>{let j=0,B=_.length-1,V,X;if(B>=0&&(V=_[B])instanceof Tr){if(!B&&V.type==C&&V.length==M)return V;(X=V.prop(_t.lookAhead))&&(j=$[B]+V.length+X)}return b(C,_,$,M,j,E)}}function y(C,E,_,$,M,j,B,V,X){let D=[],F=[];for(;C.length>$;)D.push(C.pop()),F.push(E.pop()+_-M);C.push(b(n.types[B],D,F,j-M,V-j,X)),E.push(M-_)}function b(C,E,_,$,M,j,B){if(j){let V=[_t.contextHash,j];B=B?[V].concat(B):[V]}if(M>25){let V=[_t.lookAhead,M];B=B?[V].concat(B):[V]}return new Tr(C,E,_,$,B)}function O(C,E){let _=s.fork(),$=0,M=0,j=0,B=_.end-i,V={size:0,start:0,skip:0};e:for(let X=_.pos-C;_.pos>X;){let D=_.size;if(_.id==E&&D>=0){V.size=$,V.start=M,V.skip=j,j+=4,$+=4,_.next();continue}let F=_.pos-D;if(D<0||F<X||_.start<B)break;let Y=_.id>=a?4:0,ie=_.start;for(_.next();_.pos>F;){if(_.size<0)if(_.size==-3)Y+=4;else break e;else _.id>=a&&(Y+=4);_.next()}M=ie,$+=D,j+=Y}return(E<0||$==C)&&(V.size=$,V.start=M,V.skip=j),V.size>4?V:void 0}function S(C,E,_){let{id:$,start:M,end:j,size:B}=s;if(s.next(),B>=0&&$<a){let V=_;if(B>4){let X=s.pos-(B-4);for(;s.pos>X;)_=S(C,E,_)}E[--_]=V,E[--_]=j-C,E[--_]=M-C,E[--_]=$}else B==-3?c=$:B==-4&&(d=$);return _}let w=[],k=[];for(;s.pos>0;)p(t.start||0,t.bufferStart||0,w,k,-1,0);let T=(e=t.length)!==null&&e!==void 0?e:w.length?k[0]+w[0].length:0;return new Tr(l[t.topID],w.reverse(),k.reverse(),T)}const AV=new WeakMap;function k1(t,e){if(!t.isAnonymous||e instanceof Fu||e.type!=t)return 1;let r=AV.get(e);if(r==null){r=1;for(let n of e.children){if(n.type!=t||!(n instanceof Tr)){r=1;break}r+=k1(t,n)}AV.set(e,r)}return r}function NA(t,e,r,n,i,o,a,s,l){let c=0;for(let y=n;y<i;y++)c+=k1(t,e[y]);let d=Math.ceil(c*1.5/8),p=[],g=[];function m(y,b,O,S,w){for(let k=O;k<S;){let T=k,C=b[k],E=k1(t,y[k]);for(k++;k<S;k++){let _=k1(t,y[k]);if(E+_>=d)break;E+=_}if(k==T+1){if(E>d){let _=y[T];m(_.children,_.positions,0,_.children.length,b[T]+w);continue}p.push(y[T])}else{let _=b[k-1]+y[k-1].length-C;p.push(NA(t,y,b,T,k,C,_,null,l))}g.push(C+w-o)}}return m(e,r,n,i,0),(s||l)(p,g,a)}class kG{constructor(){this.map=new WeakMap}setBuffer(e,r,n){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(r,n)}getBuffer(e,r){let n=this.map.get(e);return n&&n.get(r)}set(e,r){e instanceof Ks?this.setBuffer(e.context.buffer,e.index,r):e instanceof ro&&this.map.set(e.tree,r)}get(e){return e instanceof Ks?this.getBuffer(e.context.buffer,e.index):e instanceof ro?this.map.get(e.tree):void 0}cursorSet(e,r){e.buffer?this.setBuffer(e.buffer.buffer,e.index,r):this.map.set(e.tree,r)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class oc{constructor(e,r,n,i,o=!1,a=!1){this.from=e,this.to=r,this.tree=n,this.offset=i,this.open=(o?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,r=[],n=!1){let i=[new oc(0,e.length,e,0,!1,n)];for(let o of r)o.to>e.length&&i.push(o);return i}static applyChanges(e,r,n=128){if(!r.length)return e;let i=[],o=1,a=e.length?e[0]:null;for(let s=0,l=0,c=0;;s++){let d=s<r.length?r[s]:null,p=d?d.fromA:1e9;if(p-l>=n)for(;a&&a.from<p;){let g=a;if(l>=g.from||p<=g.to||c){let m=Math.max(g.from,l)-c,y=Math.min(g.to,p)-c;g=m>=y?null:new oc(m,y,g.tree,g.offset+c,s>0,!!d)}if(g&&i.push(g),a.to>p)break;a=o<e.length?e[o++]:null}if(!d)break;l=d.toA,c=d.toA-d.toB}return i}}class jA{startParse(e,r,n){return typeof e=="string"&&(e=new E2e(e)),n=n?n.length?n.map(i=>new Va(i.from,i.to)):[new Va(0,0)]:[new Va(0,e.length)],this.createParse(e,r||[],n)}parse(e,r,n){let i=this.startParse(e,r,n);for(;;){let o=i.advance();if(o)return o}}}class E2e{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,r){return this.string.slice(e,r)}}function CG(t){return(e,r,n,i)=>new R2e(e,t,r,n,i)}class MV{constructor(e,r,n,i,o){this.parser=e,this.parse=r,this.overlay=n,this.target=i,this.from=o}}function NV(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class _2e{constructor(e,r,n,i,o,a,s){this.parser=e,this.predicate=r,this.mounts=n,this.index=i,this.start=o,this.target=a,this.prev=s,this.depth=0,this.ranges=[]}}const GR=new _t({perNode:!0});class R2e{constructor(e,r,n,i,o){this.nest=r,this.input=n,this.fragments=i,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new Tr(n.type,n.children,n.positions,n.length,n.propValues.concat([[GR,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],r=e.parse.advance();if(r){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[_t.mounted.id]=new Iy(r,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let r=this.innerDone;r<this.inner.length;r++)this.inner[r].from<e&&(e=Math.min(e,this.inner[r].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let r=this.innerDone;r<this.inner.length;r++)this.inner[r].parse.stopAt(e)}startInner(){let e=new A2e(this.fragments),r=null,n=null,i=new NS(new ro(this.baseTree,this.ranges[0].from,0,null),nn.IncludeAnonymous|nn.IgnoreMounts);e:for(let o,a;;){let s=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)s=!1;else if(e.hasNode(i)){if(r){let c=r.mounts.find(d=>d.frag.from<=i.from&&d.frag.to>=i.to&&d.mount.overlay);if(c)for(let d of c.mount.overlay){let p=d.from+c.pos,g=d.to+c.pos;p>=i.from&&g<=i.to&&!r.ranges.some(m=>m.from<g&&m.to>p)&&r.ranges.push({from:p,to:g})}}s=!1}else if(n&&(a=I2e(n.ranges,i.from,i.to)))s=a!=2;else if(!i.type.isAnonymous&&(o=this.nest(i,this.input))&&(i.from<i.to||!o.overlay)){i.tree||$2e(i);let c=e.findMounts(i.from,o.parser);if(typeof o.overlay=="function")r=new _2e(o.parser,o.overlay,c,this.inner.length,i.from,i.tree,r);else{let d=LV(this.ranges,o.overlay||(i.from<i.to?[new Va(i.from,i.to)]:[]));d.length&&NV(d),(d.length||!o.overlay)&&this.inner.push(new MV(o.parser,d.length?o.parser.startParse(this.input,QV(c,d),d):o.parser.startParse(""),o.overlay?o.overlay.map(p=>new Va(p.from-i.from,p.to-i.from)):null,i.tree,d.length?d[0].from:i.from)),o.overlay?d.length&&(n={ranges:d,depth:0,prev:n}):s=!1}}else if(r&&(l=r.predicate(i))&&(l===!0&&(l=new Va(i.from,i.to)),l.from<l.to)){let c=r.ranges.length-1;c>=0&&r.ranges[c].to==l.from?r.ranges[c]={from:r.ranges[c].from,to:l.to}:r.ranges.push(l)}if(s&&i.firstChild())r&&r.depth++,n&&n.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(r&&!--r.depth){let c=LV(this.ranges,r.ranges);c.length&&(NV(c),this.inner.splice(r.index,0,new MV(r.parser,r.parser.startParse(this.input,QV(r.mounts,c),c),r.ranges.map(d=>new Va(d.from-r.start,d.to-r.start)),r.target,c[0].from))),r=r.prev}n&&!--n.depth&&(n=n.prev)}}}}function I2e(t,e,r){for(let n of t){if(n.from>=r)break;if(n.to>e)return n.from<=e&&n.to>=r?2:1}return 0}function jV(t,e,r,n,i,o){if(e<r){let a=t.buffer[e+1];n.push(t.slice(e,r,a)),i.push(a-o)}}function $2e(t){let{node:e}=t,r=[],n=e.context.buffer;do r.push(t.index),t.parent();while(!t.tree);let i=t.tree,o=i.children.indexOf(n),a=i.children[o],s=a.buffer,l=[o];function c(d,p,g,m,y,b){let O=r[b],S=[],w=[];jV(a,d,O,S,w,m);let k=s[O+1],T=s[O+2];l.push(S.length);let C=b?c(O+4,s[O+3],a.set.types[s[O]],k,T-k,b-1):e.toTree();return S.push(C),w.push(k-m),jV(a,s[O+3],p,S,w,m),new Tr(g,S,w,y)}i.children[o]=c(0,s.length,fi.none,0,a.length,r.length-1);for(let d of l){let p=t.tree.children[d],g=t.tree.positions[d];t.yield(new ro(p,g+t.from,d,t._tree))}}class DV{constructor(e,r){this.offset=r,this.done=!1,this.cursor=e.cursor(nn.IncludeAnonymous|nn.IgnoreMounts)}moveTo(e){let{cursor:r}=this,n=e-this.offset;for(;!this.done&&r.from<n;)r.to>=e&&r.enter(n,1,nn.IgnoreOverlays|nn.ExcludeBuffers)||r.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let r=this.cursor.tree;;){if(r==e.tree)return!0;if(r.children.length&&r.positions[0]==0&&r.children[0]instanceof Tr)r=r.children[0];else break}return!1}}let A2e=class{constructor(e){var r;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(r=n.tree.prop(GR))!==null&&r!==void 0?r:n.to,this.inner=new DV(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let r=this.curFrag=this.fragments[this.fragI];this.curTo=(e=r.tree.prop(GR))!==null&&e!==void 0?e:r.to,this.inner=new DV(r.tree,-r.offset)}}findMounts(e,r){var n;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let a=(n=o.tree)===null||n===void 0?void 0:n.prop(_t.mounted);if(a&&a.parser==r)for(let s=this.fragI;s<this.fragments.length;s++){let l=this.fragments[s];if(l.from>=o.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:o.from-l.offset,mount:a})}}}return i}};function LV(t,e){let r=null,n=e;for(let i=1,o=0;i<t.length;i++){let a=t[i-1].to,s=t[i].from;for(;o<n.length;o++){let l=n[o];if(l.from>=s)break;l.to<=a||(r||(n=r=e.slice()),l.from<a?(r[o]=new Va(l.from,a),l.to>s&&r.splice(o+1,0,new Va(s,l.to))):l.to>s?r[o--]=new Va(s,l.to):r.splice(o--,1))}}return n}function M2e(t,e,r,n){let i=0,o=0,a=!1,s=!1,l=-1e9,c=[];for(;;){let d=i==t.length?1e9:a?t[i].to:t[i].from,p=o==e.length?1e9:s?e[o].to:e[o].from;if(a!=s){let g=Math.max(l,r),m=Math.min(d,p,n);g<m&&c.push(new Va(g,m))}if(l=Math.min(d,p),l==1e9)break;d==l&&(a?(a=!1,i++):a=!0),p==l&&(s?(s=!1,o++):s=!0)}return c}function QV(t,e){let r=[];for(let{pos:n,mount:i,frag:o}of t){let a=n+(i.overlay?i.overlay[0].from:0),s=a+i.tree.length,l=Math.max(o.from,a),c=Math.min(o.to,s);if(i.overlay){let d=i.overlay.map(g=>new Va(g.from+n,g.to+n)),p=M2e(e,d,l,c);for(let g=0,m=l;;g++){let y=g==p.length,b=y?c:p[g].from;if(b>m&&r.push(new oc(m,b,i.tree,-a,o.from>=m||o.openStart,o.to<=b||o.openEnd)),y)break;m=p[g].to}}else r.push(new oc(l,c,i.tree,-a,o.from>=a||o.openStart,o.to<=s||o.openEnd))}return r}let N2e=0;class ua{constructor(e,r,n,i){this.name=e,this.set=r,this.base=n,this.modified=i,this.id=N2e++}toString(){let{name:e}=this;for(let r of this.modified)r.name&&(e=`${r.name}(${e})`);return e}static define(e,r){let n=typeof e=="string"?e:"?";if(e instanceof ua&&(r=e),r!=null&&r.base)throw new Error("Can not derive from a modified tag");let i=new ua(n,[],null,[]);if(i.set.push(i),r)for(let o of r.set)i.set.push(o);return i}static defineModifier(e){let r=new jS(e);return n=>n.modified.indexOf(r)>-1?n:jS.get(n.base||n,n.modified.concat(r).sort((i,o)=>i.id-o.id))}}let j2e=0;class jS{constructor(e){this.name=e,this.instances=[],this.id=j2e++}static get(e,r){if(!r.length)return e;let n=r[0].instances.find(s=>s.base==e&&D2e(r,s.modified));if(n)return n;let i=[],o=new ua(e.name,i,e,r);for(let s of r)s.instances.push(o);let a=L2e(r);for(let s of e.set)if(!s.modified.length)for(let l of a)i.push(jS.get(s,l));return o}}function D2e(t,e){return t.length==e.length&&t.every((r,n)=>r==e[n])}function L2e(t){let e=[[]];for(let r=0;r<t.length;r++)for(let n=0,i=e.length;n<i;n++)e.push(e[n].concat(t[r]));return e.sort((r,n)=>n.length-r.length)}function zf(t){let e=Object.create(null);for(let r in t){let n=t[r];Array.isArray(n)||(n=[n]);for(let i of r.split(" "))if(i){let o=[],a=2,s=i;for(let p=0;;){if(s=="..."&&p>0&&p+3==i.length){a=1;break}let g=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!g)throw new RangeError("Invalid path: "+i);if(o.push(g[0]=="*"?"":g[0][0]=='"'?JSON.parse(g[0]):g[0]),p+=g[0].length,p==i.length)break;let m=i[p++];if(p==i.length&&m=="!"){a=0;break}if(m!="/")throw new RangeError("Invalid path: "+i);s=i.slice(p)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+i);let d=new DS(n,a,l>0?o.slice(0,l):null);e[c]=d.sort(e[c])}}return TG.add(e)}const TG=new _t;class DS{constructor(e,r,n,i){this.tags=e,this.mode=r,this.context=n,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}DS.empty=new DS([],2,null);function EG(t,e){let r=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))r[o.tag.id]=o.class;else for(let a of o.tag)r[a.id]=o.class;let{scope:n,all:i=null}=e||{};return{style:o=>{let a=i;for(let s of o)for(let l of s.set){let c=r[l.id];if(c){a=a?a+" "+c:c;break}}return a},scope:n}}function Q2e(t,e){let r=null;for(let n of t){let i=n.style(e);i&&(r=r?r+" "+i:i)}return r}function V2e(t,e,r,n=0,i=t.length){let o=new F2e(n,Array.isArray(e)?e:[e],r);o.highlightRange(t.cursor(),n,i,"",o.highlighters),o.flush(i)}class F2e{constructor(e,r,n){this.at=e,this.highlighters=r,this.span=n,this.class=""}startSpan(e,r){r!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=r)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,r,n,i,o){let{type:a,from:s,to:l}=e;if(s>=n||l<=r)return;a.isTop&&(o=this.highlighters.filter(m=>!m.scope||m.scope(a)));let c=i,d=B2e(e)||DS.empty,p=Q2e(o,d.tags);if(p&&(c&&(c+=" "),c+=p,d.mode==1&&(i+=(i?" ":"")+p)),this.startSpan(Math.max(r,s),c),d.opaque)return;let g=e.tree&&e.tree.prop(_t.mounted);if(g&&g.overlay){let m=e.node.enter(g.overlay[0].from+s,1),y=this.highlighters.filter(O=>!O.scope||O.scope(g.tree.type)),b=e.firstChild();for(let O=0,S=s;;O++){let w=O<g.overlay.length?g.overlay[O]:null,k=w?w.from+s:l,T=Math.max(r,S),C=Math.min(n,k);if(T<C&&b)for(;e.from<C&&(this.highlightRange(e,T,C,i,o),this.startSpan(Math.min(C,e.to),c),!(e.to>=k||!e.nextSibling())););if(!w||k>n)break;S=w.to+s,S>r&&(this.highlightRange(m.cursor(),Math.max(r,w.from+s),Math.min(n,S),"",y),this.startSpan(Math.min(n,S),c))}b&&e.parent()}else if(e.firstChild()){g&&(i="");do if(!(e.to<=r)){if(e.from>=n)break;this.highlightRange(e,r,n,i,o),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}}function B2e(t){let e=t.type.prop(TG);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Be=ua.define,AO=Be(),cu=Be(),VV=Be(cu),FV=Be(cu),uu=Be(),MO=Be(uu),fE=Be(uu),zs=Be(),Ad=Be(zs),Vs=Be(),Fs=Be(),YR=Be(),Bm=Be(YR),NO=Be(),h={comment:AO,lineComment:Be(AO),blockComment:Be(AO),docComment:Be(AO),name:cu,variableName:Be(cu),typeName:VV,tagName:Be(VV),propertyName:FV,attributeName:Be(FV),className:Be(cu),labelName:Be(cu),namespace:Be(cu),macroName:Be(cu),literal:uu,string:MO,docString:Be(MO),character:Be(MO),attributeValue:Be(MO),number:fE,integer:Be(fE),float:Be(fE),bool:Be(uu),regexp:Be(uu),escape:Be(uu),color:Be(uu),url:Be(uu),keyword:Vs,self:Be(Vs),null:Be(Vs),atom:Be(Vs),unit:Be(Vs),modifier:Be(Vs),operatorKeyword:Be(Vs),controlKeyword:Be(Vs),definitionKeyword:Be(Vs),moduleKeyword:Be(Vs),operator:Fs,derefOperator:Be(Fs),arithmeticOperator:Be(Fs),logicOperator:Be(Fs),bitwiseOperator:Be(Fs),compareOperator:Be(Fs),updateOperator:Be(Fs),definitionOperator:Be(Fs),typeOperator:Be(Fs),controlOperator:Be(Fs),punctuation:YR,separator:Be(YR),bracket:Bm,angleBracket:Be(Bm),squareBracket:Be(Bm),paren:Be(Bm),brace:Be(Bm),content:zs,heading:Ad,heading1:Be(Ad),heading2:Be(Ad),heading3:Be(Ad),heading4:Be(Ad),heading5:Be(Ad),heading6:Be(Ad),contentSeparator:Be(zs),list:Be(zs),quote:Be(zs),emphasis:Be(zs),strong:Be(zs),link:Be(zs),monospace:Be(zs),strikethrough:Be(zs),inserted:Be(),deleted:Be(),changed:Be(),invalid:Be(),meta:NO,documentMeta:Be(NO),annotation:Be(NO),processingInstruction:Be(NO),definition:ua.defineModifier("definition"),constant:ua.defineModifier("constant"),function:ua.defineModifier("function"),standard:ua.defineModifier("standard"),local:ua.defineModifier("local"),special:ua.defineModifier("special")};for(let t in h){let e=h[t];e instanceof ua&&(e.name=t)}EG([{tag:h.link,class:"tok-link"},{tag:h.heading,class:"tok-heading"},{tag:h.emphasis,class:"tok-emphasis"},{tag:h.strong,class:"tok-strong"},{tag:h.keyword,class:"tok-keyword"},{tag:h.atom,class:"tok-atom"},{tag:h.bool,class:"tok-bool"},{tag:h.url,class:"tok-url"},{tag:h.labelName,class:"tok-labelName"},{tag:h.inserted,class:"tok-inserted"},{tag:h.deleted,class:"tok-deleted"},{tag:h.literal,class:"tok-literal"},{tag:h.string,class:"tok-string"},{tag:h.number,class:"tok-number"},{tag:[h.regexp,h.escape,h.special(h.string)],class:"tok-string2"},{tag:h.variableName,class:"tok-variableName"},{tag:h.local(h.variableName),class:"tok-variableName tok-local"},{tag:h.definition(h.variableName),class:"tok-variableName tok-definition"},{tag:h.special(h.variableName),class:"tok-variableName2"},{tag:h.definition(h.propertyName),class:"tok-propertyName tok-definition"},{tag:h.typeName,class:"tok-typeName"},{tag:h.namespace,class:"tok-namespace"},{tag:h.className,class:"tok-className"},{tag:h.macroName,class:"tok-macroName"},{tag:h.propertyName,class:"tok-propertyName"},{tag:h.operator,class:"tok-operator"},{tag:h.comment,class:"tok-comment"},{tag:h.meta,class:"tok-meta"},{tag:h.invalid,class:"tok-invalid"},{tag:h.punctuation,class:"tok-punctuation"}]);let KR=[],_G=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,r=0;e<t.length;e++)(e%2?_G:KR).push(r=r+t[e])})();function z2e(t){if(t<768)return!1;for(let e=0,r=KR.length;;){let n=e+r>>1;if(t<KR[n])r=n;else if(t>=_G[n])e=n+1;else return!0;if(e==r)return!1}}function BV(t){return t>=127462&&t<=127487}const zV=8205;function q2e(t,e,r=!0,n=!0){return(r?RG:W2e)(t,e,n)}function RG(t,e,r){if(e==t.length)return e;e&&IG(t.charCodeAt(e))&&$G(t.charCodeAt(e-1))&&e--;let n=hE(t,e);for(e+=qV(n);e<t.length;){let i=hE(t,e);if(n==zV||i==zV||r&&z2e(i))e+=qV(i),n=i;else if(BV(i)){let o=0,a=e-2;for(;a>=0&&BV(hE(t,a));)o++,a-=2;if(o%2==0)break;e+=2}else break}return e}function W2e(t,e,r){for(;e>0;){let n=RG(t,e-2,r);if(n<e)return n;e--}return 0}function hE(t,e){let r=t.charCodeAt(e);if(!$G(r)||e+1==t.length)return r;let n=t.charCodeAt(e+1);return IG(n)?(r-55296<<10)+(n-56320)+65536:r}function IG(t){return t>=56320&&t<57344}function $G(t){return t>=55296&&t<56320}function qV(t){return t<65536?1:2}class lr{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,r,n){[e,r]=Dp(this,e,r);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(r,this.length,i,1),Hs.from(i,this.length-(r-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,r=this.length){[e,r]=Dp(this,e,r);let n=[];return this.decompose(e,r,n,0),Hs.from(n,r-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let r=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new Dv(this),o=new Dv(e);for(let a=r,s=r;;){if(i.next(a),o.next(a),a=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(s+=i.value.length,i.done||s>=n)return!0}}iter(e=1){return new Dv(this,e)}iterRange(e,r=this.length){return new AG(this,e,r)}iterLines(e,r){let n;if(e==null)n=this.iter();else{r==null&&(r=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,r==this.lines+1?this.length:r<=1?0:this.line(r-1).to))}return new MG(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?lr.empty:e.length<=32?new Vn(e):Hs.from(Vn.split(e,[]))}}class Vn extends lr{constructor(e,r=U2e(e)){super(),this.text=e,this.length=r}get lines(){return this.text.length}get children(){return null}lineInner(e,r,n,i){for(let o=0;;o++){let a=this.text[o],s=i+a.length;if((r?n:s)>=e)return new H2e(i,s,n,a);i=s+1,n++}}decompose(e,r,n,i){let o=e<=0&&r>=this.length?this:new Vn(WV(this.text,e,r),Math.min(r,this.length)-Math.max(0,e));if(i&1){let a=n.pop(),s=C1(o.text,a.text.slice(),0,o.length);if(s.length<=32)n.push(new Vn(s,a.length+o.length));else{let l=s.length>>1;n.push(new Vn(s.slice(0,l)),new Vn(s.slice(l)))}}else n.push(o)}replace(e,r,n){if(!(n instanceof Vn))return super.replace(e,r,n);[e,r]=Dp(this,e,r);let i=C1(this.text,C1(n.text,WV(this.text,0,e)),r),o=this.length+n.length-(r-e);return i.length<=32?new Vn(i,o):Hs.from(Vn.split(i,[]),o)}sliceString(e,r=this.length,n=`
|
|
1090
1091
|
`){[e,r]=Dp(this,e,r);let i="";for(let o=0,a=0;o<=r&&a<this.text.length;a++){let s=this.text[a],l=o+s.length;o>e&&a&&(i+=n),e<l&&r>o&&(i+=s.slice(Math.max(0,e-o),r-o)),o=l+1}return i}flatten(e){for(let r of this.text)e.push(r)}scanIdentical(){return 0}static split(e,r){let n=[],i=-1;for(let o of e)n.push(o),i+=o.length+1,n.length==32&&(r.push(new Vn(n,i)),n=[],i=-1);return i>-1&&r.push(new Vn(n,i)),r}}class Hs extends lr{constructor(e,r){super(),this.children=e,this.length=r,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,r,n,i){for(let o=0;;o++){let a=this.children[o],s=i+a.length,l=n+a.lines-1;if((r?l:s)>=e)return a.lineInner(e,r,n,i);i=s+1,n=l+1}}decompose(e,r,n,i){for(let o=0,a=0;a<=r&&o<this.children.length;o++){let s=this.children[o],l=a+s.length;if(e<=l&&r>=a){let c=i&((a<=e?1:0)|(l>=r?2:0));a>=e&&l<=r&&!c?n.push(s):s.decompose(e-a,r-a,n,c)}a=l+1}}replace(e,r,n){if([e,r]=Dp(this,e,r),n.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let a=this.children[i],s=o+a.length;if(e>=o&&r<=s){let l=a.replace(e-o,r-o,n),c=this.lines-a.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let d=this.children.slice();return d[i]=l,new Hs(d,this.length-(r-e)+n.length)}return super.replace(o,s,l)}o=s+1}return super.replace(e,r,n)}sliceString(e,r=this.length,n=`
|
|
@@ -1101,10 +1102,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1101
1102
|
`:""},this._extScope=Q,this._scope=new r.Scope({parent:Q}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(Q){return this._scope.name(Q)}scopeName(Q){return this._extScope.name(Q)}scopeValue(Q,q){const oe=this._extScope.value(Q,q);return(this._values[oe.prefix]||(this._values[oe.prefix]=new Set)).add(oe),oe}getScopeValue(Q,q){return this._extScope.getValue(Q,q)}scopeRefs(Q){return this._extScope.scopeRefs(Q,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(Q,q,oe,Oe){const Z=this._scope.toName(q);return oe!==void 0&&Oe&&(this._constants[Z.str]=oe),this._leafNode(new a(Q,Z,oe)),Z}const(Q,q,oe){return this._def(r.varKinds.const,Q,q,oe)}let(Q,q,oe){return this._def(r.varKinds.let,Q,q,oe)}var(Q,q,oe){return this._def(r.varKinds.var,Q,q,oe)}assign(Q,q,oe){return this._leafNode(new s(Q,q,oe))}add(Q,q){return this._leafNode(new l(Q,t.operators.ADD,q))}code(Q){return typeof Q=="function"?Q():Q!==e.nil&&this._leafNode(new g(Q)),this}object(...Q){const q=["{"];for(const[oe,Oe]of Q)q.length>1&&q.push(","),q.push(oe),(oe!==Oe||this.opts.es5)&&(q.push(":"),(0,e.addCodeArg)(q,Oe));return q.push("}"),new e._Code(q)}if(Q,q,oe){if(this._blockNode(new S(Q)),q&&oe)this.code(q).else().code(oe).endIf();else if(q)this.code(q).endIf();else if(oe)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(Q){return this._elseNode(new S(Q))}else(){return this._elseNode(new O)}endIf(){return this._endBlockNode(S,O)}_for(Q,q){return this._blockNode(Q),q&&this.code(q).endFor(),this}for(Q,q){return this._for(new k(Q),q)}forRange(Q,q,oe,Oe,Z=this.opts.es5?r.varKinds.var:r.varKinds.let){const le=this._scope.toName(Q);return this._for(new T(Z,le,q,oe),()=>Oe(le))}forOf(Q,q,oe,Oe=r.varKinds.const){const Z=this._scope.toName(Q);if(this.opts.es5){const le=q instanceof e.Name?q:this.var("_arr",q);return this.forRange("_i",0,(0,e._)`${le}.length`,Pe=>{this.var(Z,(0,e._)`${le}[${Pe}]`),oe(Z)})}return this._for(new C("of",Oe,Z,q),()=>oe(Z))}forIn(Q,q,oe,Oe=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(Q,(0,e._)`Object.keys(${q})`,oe);const Z=this._scope.toName(Q);return this._for(new C("in",Oe,Z,q),()=>oe(Z))}endFor(){return this._endBlockNode(w)}label(Q){return this._leafNode(new c(Q))}break(Q){return this._leafNode(new d(Q))}return(Q){const q=new _;if(this._blockNode(q),this.code(Q),q.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_)}try(Q,q,oe){if(!q&&!oe)throw new Error('CodeGen: "try" without "catch" and "finally"');const Oe=new $;if(this._blockNode(Oe),this.code(Q),q){const Z=this.name("e");this._currNode=Oe.catch=new M(Z),q(Z)}return oe&&(this._currNode=Oe.finally=new j,this.code(oe)),this._endBlockNode(M,j)}throw(Q){return this._leafNode(new p(Q))}block(Q,q){return this._blockStarts.push(this._nodes.length),Q&&this.code(Q).endBlock(q),this}endBlock(Q){const q=this._blockStarts.pop();if(q===void 0)throw new Error("CodeGen: not in self-balancing block");const oe=this._nodes.length-q;if(oe<0||Q!==void 0&&oe!==Q)throw new Error(`CodeGen: wrong number of nodes: ${oe} vs ${Q} expected`);return this._nodes.length=q,this}func(Q,q=e.nil,oe,Oe){return this._blockNode(new E(Q,q,oe)),Oe&&this.code(Oe).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(Q=1){for(;Q-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(Q){return this._currNode.nodes.push(Q),this}_blockNode(Q){this._currNode.nodes.push(Q),this._nodes.push(Q)}_endBlockNode(Q,q){const oe=this._currNode;if(oe instanceof Q||q&&oe instanceof q)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${q?`${Q.kind}/${q.kind}`:Q.kind}"`)}_elseNode(Q){const q=this._currNode;if(!(q instanceof S))throw new Error('CodeGen: "else" without "if"');return this._currNode=q.else=Q,this}get _root(){return this._nodes[0]}get _currNode(){const Q=this._nodes;return Q[Q.length-1]}set _currNode(Q){const q=this._nodes;q[q.length-1]=Q}}t.CodeGen=B;function V(J,Q){for(const q in Q)J[q]=(J[q]||0)+(Q[q]||0);return J}function X(J,Q){return Q instanceof e._CodeOrName?V(J,Q.names):J}function D(J,Q,q){if(J instanceof e.Name)return oe(J);if(!Oe(J))return J;return new e._Code(J._items.reduce((Z,le)=>(le instanceof e.Name&&(le=oe(le)),le instanceof e._Code?Z.push(...le._items):Z.push(le),Z),[]));function oe(Z){const le=q[Z.str];return le===void 0||Q[Z.str]!==1?Z:(delete Q[Z.str],le)}function Oe(Z){return Z instanceof e._Code&&Z._items.some(le=>le instanceof e.Name&&Q[le.str]===1&&q[le.str]!==void 0)}}function F(J,Q){for(const q in Q)J[q]=(J[q]||0)-(Q[q]||0)}function Y(J){return typeof J=="boolean"||typeof J=="number"||J===null?!J:(0,e._)`!${U(J)}`}t.not=Y;const ie=N(t.operators.AND);function H(...J){return J.reduce(ie)}t.and=H;const ne=N(t.operators.OR);function z(...J){return J.reduce(ne)}t.or=z;function N(J){return(Q,q)=>Q===e.nil?q:q===e.nil?Q:(0,e._)`${U(Q)} ${J} ${U(q)}`}function U(J){return J instanceof e.Name?J:(0,e._)`(${J})`}}(FE)),FE}var Ht={},V3;function nr(){if(V3)return Ht;V3=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.checkStrictMode=Ht.getErrorPath=Ht.Type=Ht.useFunc=Ht.setEvaluated=Ht.evaluatedPropsToName=Ht.mergeEvaluated=Ht.eachItem=Ht.unescapeJsonPointer=Ht.escapeJsonPointer=Ht.escapeFragment=Ht.unescapeFragment=Ht.schemaRefOrVal=Ht.schemaHasRulesButRef=Ht.schemaHasRules=Ht.checkUnknownRules=Ht.alwaysValidSchema=Ht.toHash=void 0;const t=Bt(),e=sx();function r(C){const E={};for(const _ of C)E[_]=!0;return E}Ht.toHash=r;function n(C,E){return typeof E=="boolean"?E:Object.keys(E).length===0?!0:(i(C,E),!o(E,C.self.RULES.all))}Ht.alwaysValidSchema=n;function i(C,E=C.schema){const{opts:_,self:$}=C;if(!_.strictSchema||typeof E=="boolean")return;const M=$.RULES.keywords;for(const j in E)M[j]||T(C,`unknown keyword: "${j}"`)}Ht.checkUnknownRules=i;function o(C,E){if(typeof C=="boolean")return!C;for(const _ in C)if(E[_])return!0;return!1}Ht.schemaHasRules=o;function a(C,E){if(typeof C=="boolean")return!C;for(const _ in C)if(_!=="$ref"&&E.all[_])return!0;return!1}Ht.schemaHasRulesButRef=a;function s({topSchemaRef:C,schemaPath:E},_,$,M){if(!M){if(typeof _=="number"||typeof _=="boolean")return _;if(typeof _=="string")return(0,t._)`${_}`}return(0,t._)`${C}${E}${(0,t.getProperty)($)}`}Ht.schemaRefOrVal=s;function l(C){return p(decodeURIComponent(C))}Ht.unescapeFragment=l;function c(C){return encodeURIComponent(d(C))}Ht.escapeFragment=c;function d(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}Ht.escapeJsonPointer=d;function p(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}Ht.unescapeJsonPointer=p;function g(C,E){if(Array.isArray(C))for(const _ of C)E(_);else E(C)}Ht.eachItem=g;function m({mergeNames:C,mergeToName:E,mergeValues:_,resultToName:$}){return(M,j,B,V)=>{const X=B===void 0?j:B instanceof t.Name?(j instanceof t.Name?C(M,j,B):E(M,j,B),B):j instanceof t.Name?(E(M,B,j),j):_(j,B);return V===t.Name&&!(X instanceof t.Name)?$(M,X):X}}Ht.mergeEvaluated={props:m({mergeNames:(C,E,_)=>C.if((0,t._)`${_} !== true && ${E} !== undefined`,()=>{C.if((0,t._)`${E} === true`,()=>C.assign(_,!0),()=>C.assign(_,(0,t._)`${_} || {}`).code((0,t._)`Object.assign(${_}, ${E})`))}),mergeToName:(C,E,_)=>C.if((0,t._)`${_} !== true`,()=>{E===!0?C.assign(_,!0):(C.assign(_,(0,t._)`${_} || {}`),b(C,_,E))}),mergeValues:(C,E)=>C===!0?!0:{...C,...E},resultToName:y}),items:m({mergeNames:(C,E,_)=>C.if((0,t._)`${_} !== true && ${E} !== undefined`,()=>C.assign(_,(0,t._)`${E} === true ? true : ${_} > ${E} ? ${_} : ${E}`)),mergeToName:(C,E,_)=>C.if((0,t._)`${_} !== true`,()=>C.assign(_,E===!0?!0:(0,t._)`${_} > ${E} ? ${_} : ${E}`)),mergeValues:(C,E)=>C===!0?!0:Math.max(C,E),resultToName:(C,E)=>C.var("items",E)})};function y(C,E){if(E===!0)return C.var("props",!0);const _=C.var("props",(0,t._)`{}`);return E!==void 0&&b(C,_,E),_}Ht.evaluatedPropsToName=y;function b(C,E,_){Object.keys(_).forEach($=>C.assign((0,t._)`${E}${(0,t.getProperty)($)}`,!0))}Ht.setEvaluated=b;const O={};function S(C,E){return C.scopeValue("func",{ref:E,code:O[E.code]||(O[E.code]=new e._Code(E.code))})}Ht.useFunc=S;var w;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(w||(Ht.Type=w={}));function k(C,E,_){if(C instanceof t.Name){const $=E===w.Num;return _?$?(0,t._)`"[" + ${C} + "]"`:(0,t._)`"['" + ${C} + "']"`:$?(0,t._)`"/" + ${C}`:(0,t._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return _?(0,t.getProperty)(C).toString():"/"+d(C)}Ht.getErrorPath=k;function T(C,E,_=C.opts.strictSchema){if(_){if(E=`strict mode: ${E}`,_===!0)throw new Error(E);C.self.logger.warn(E)}}return Ht.checkStrictMode=T,Ht}var rw={},F3;function Rs(){if(F3)return rw;F3=1,Object.defineProperty(rw,"__esModule",{value:!0});const t=Bt(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return rw.default=e,rw}var B3;function zP(){return B3||(B3=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=Bt(),r=nr(),n=Rs();t.keywordError={message:({keyword:O})=>(0,e.str)`must pass "${O}" keyword validation`},t.keyword$DataError={message:({keyword:O,schemaType:S})=>S?(0,e.str)`"${O}" keyword must be ${S} ($data)`:(0,e.str)`"${O}" keyword is invalid ($data)`};function i(O,S=t.keywordError,w,k){const{it:T}=O,{gen:C,compositeRule:E,allErrors:_}=T,$=p(O,S,w);k??(E||_)?l(C,$):c(T,(0,e._)`[${$}]`)}t.reportError=i;function o(O,S=t.keywordError,w){const{it:k}=O,{gen:T,compositeRule:C,allErrors:E}=k,_=p(O,S,w);l(T,_),C||E||c(k,n.default.vErrors)}t.reportExtraError=o;function a(O,S){O.assign(n.default.errors,S),O.if((0,e._)`${n.default.vErrors} !== null`,()=>O.if(S,()=>O.assign((0,e._)`${n.default.vErrors}.length`,S),()=>O.assign(n.default.vErrors,null)))}t.resetErrorsCount=a;function s({gen:O,keyword:S,schemaValue:w,data:k,errsCount:T,it:C}){if(T===void 0)throw new Error("ajv implementation error");const E=O.name("err");O.forRange("i",T,n.default.errors,_=>{O.const(E,(0,e._)`${n.default.vErrors}[${_}]`),O.if((0,e._)`${E}.instancePath === undefined`,()=>O.assign((0,e._)`${E}.instancePath`,(0,e.strConcat)(n.default.instancePath,C.errorPath))),O.assign((0,e._)`${E}.schemaPath`,(0,e.str)`${C.errSchemaPath}/${S}`),C.opts.verbose&&(O.assign((0,e._)`${E}.schema`,w),O.assign((0,e._)`${E}.data`,k))})}t.extendErrors=s;function l(O,S){const w=O.const("err",S);O.if((0,e._)`${n.default.vErrors} === null`,()=>O.assign(n.default.vErrors,(0,e._)`[${w}]`),(0,e._)`${n.default.vErrors}.push(${w})`),O.code((0,e._)`${n.default.errors}++`)}function c(O,S){const{gen:w,validateName:k,schemaEnv:T}=O;T.$async?w.throw((0,e._)`new ${O.ValidationError}(${S})`):(w.assign((0,e._)`${k}.errors`,S),w.return(!1))}const d={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function p(O,S,w){const{createErrors:k}=O.it;return k===!1?(0,e._)`{}`:g(O,S,w)}function g(O,S,w={}){const{gen:k,it:T}=O,C=[m(T,w),y(O,w)];return b(O,S,C),k.object(...C)}function m({errorPath:O},{instancePath:S}){const w=S?(0,e.str)`${O}${(0,r.getErrorPath)(S,r.Type.Str)}`:O;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,w)]}function y({keyword:O,it:{errSchemaPath:S}},{schemaPath:w,parentSchema:k}){let T=k?S:(0,e.str)`${S}/${O}`;return w&&(T=(0,e.str)`${T}${(0,r.getErrorPath)(w,r.Type.Str)}`),[d.schemaPath,T]}function b(O,{params:S,message:w},k){const{keyword:T,data:C,schemaValue:E,it:_}=O,{opts:$,propertyName:M,topSchemaRef:j,schemaPath:B}=_;k.push([d.keyword,T],[d.params,typeof S=="function"?S(O):S||(0,e._)`{}`]),$.messages&&k.push([d.message,typeof w=="function"?w(O):w]),$.verbose&&k.push([d.schema,E],[d.parentSchema,(0,e._)`${j}${B}`],[n.default.data,C]),M&&k.push([d.propertyName,M])}}(VE)),VE}var z3;function kVe(){if(z3)return Md;z3=1,Object.defineProperty(Md,"__esModule",{value:!0}),Md.boolOrEmptySchema=Md.topBoolOrEmptySchema=void 0;const t=zP(),e=Bt(),r=Rs(),n={message:"boolean schema is false"};function i(s){const{gen:l,schema:c,validateName:d}=s;c===!1?a(s,!1):typeof c=="object"&&c.$async===!0?l.return(r.default.data):(l.assign((0,e._)`${d}.errors`,null),l.return(!0))}Md.topBoolOrEmptySchema=i;function o(s,l){const{gen:c,schema:d}=s;d===!1?(c.var(l,!1),a(s)):c.var(l,!0)}Md.boolOrEmptySchema=o;function a(s,l){const{gen:c,data:d}=s,p={gen:c,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:s};(0,t.reportError)(p,n,void 0,l)}return Md}var Ni={},Nd={},q3;function SJ(){if(q3)return Nd;q3=1,Object.defineProperty(Nd,"__esModule",{value:!0}),Nd.getRules=Nd.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(i){return typeof i=="string"&&e.has(i)}Nd.isJSONType=r;function n(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return Nd.getRules=n,Nd}var Wl={},W3;function xJ(){if(W3)return Wl;W3=1,Object.defineProperty(Wl,"__esModule",{value:!0}),Wl.shouldUseRule=Wl.shouldUseGroup=Wl.schemaHasRulesForType=void 0;function t({schema:n,self:i},o){const a=i.RULES.types[o];return a&&a!==!0&&e(n,a)}Wl.schemaHasRulesForType=t;function e(n,i){return i.rules.some(o=>r(n,o))}Wl.shouldUseGroup=e;function r(n,i){var o;return n[i.keyword]!==void 0||((o=i.definition.implements)===null||o===void 0?void 0:o.some(a=>n[a]!==void 0))}return Wl.shouldUseRule=r,Wl}var U3;function lx(){if(U3)return Ni;U3=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.reportTypeError=Ni.checkDataTypes=Ni.checkDataType=Ni.coerceAndCheckDataType=Ni.getJSONTypes=Ni.getSchemaTypes=Ni.DataType=void 0;const t=SJ(),e=xJ(),r=zP(),n=Bt(),i=nr();var o;(function(w){w[w.Correct=0]="Correct",w[w.Wrong=1]="Wrong"})(o||(Ni.DataType=o={}));function a(w){const k=s(w.type);if(k.includes("null")){if(w.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!k.length&&w.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');w.nullable===!0&&k.push("null")}return k}Ni.getSchemaTypes=a;function s(w){const k=Array.isArray(w)?w:w?[w]:[];if(k.every(t.isJSONType))return k;throw new Error("type must be JSONType or JSONType[]: "+k.join(","))}Ni.getJSONTypes=s;function l(w,k){const{gen:T,data:C,opts:E}=w,_=d(k,E.coerceTypes),$=k.length>0&&!(_.length===0&&k.length===1&&(0,e.schemaHasRulesForType)(w,k[0]));if($){const M=y(k,C,E.strictNumbers,o.Wrong);T.if(M,()=>{_.length?p(w,k,_):O(w)})}return $}Ni.coerceAndCheckDataType=l;const c=new Set(["string","number","integer","boolean","null"]);function d(w,k){return k?w.filter(T=>c.has(T)||k==="array"&&T==="array"):[]}function p(w,k,T){const{gen:C,data:E,opts:_}=w,$=C.let("dataType",(0,n._)`typeof ${E}`),M=C.let("coerced",(0,n._)`undefined`);_.coerceTypes==="array"&&C.if((0,n._)`${$} == 'object' && Array.isArray(${E}) && ${E}.length == 1`,()=>C.assign(E,(0,n._)`${E}[0]`).assign($,(0,n._)`typeof ${E}`).if(y(k,E,_.strictNumbers),()=>C.assign(M,E))),C.if((0,n._)`${M} !== undefined`);for(const B of T)(c.has(B)||B==="array"&&_.coerceTypes==="array")&&j(B);C.else(),O(w),C.endIf(),C.if((0,n._)`${M} !== undefined`,()=>{C.assign(E,M),g(w,M)});function j(B){switch(B){case"string":C.elseIf((0,n._)`${$} == "number" || ${$} == "boolean"`).assign(M,(0,n._)`"" + ${E}`).elseIf((0,n._)`${E} === null`).assign(M,(0,n._)`""`);return;case"number":C.elseIf((0,n._)`${$} == "boolean" || ${E} === null
|
|
1102
1103
|
|| (${$} == "string" && ${E} && ${E} == +${E})`).assign(M,(0,n._)`+${E}`);return;case"integer":C.elseIf((0,n._)`${$} === "boolean" || ${E} === null
|
|
1103
1104
|
|| (${$} === "string" && ${E} && ${E} == +${E} && !(${E} % 1))`).assign(M,(0,n._)`+${E}`);return;case"boolean":C.elseIf((0,n._)`${E} === "false" || ${E} === 0 || ${E} === null`).assign(M,!1).elseIf((0,n._)`${E} === "true" || ${E} === 1`).assign(M,!0);return;case"null":C.elseIf((0,n._)`${E} === "" || ${E} === 0 || ${E} === false`),C.assign(M,null);return;case"array":C.elseIf((0,n._)`${$} === "string" || ${$} === "number"
|
|
1104
|
-
|| ${$} === "boolean" || ${E} === null`).assign(M,(0,n._)`[${E}]`)}}}function g({gen:w,parentData:k,parentDataProperty:T},C){w.if((0,n._)`${k} !== undefined`,()=>w.assign((0,n._)`${k}[${T}]`,C))}function m(w,k,T,C=o.Correct){const E=C===o.Correct?n.operators.EQ:n.operators.NEQ;let _;switch(w){case"null":return(0,n._)`${k} ${E} null`;case"array":_=(0,n._)`Array.isArray(${k})`;break;case"object":_=(0,n._)`${k} && typeof ${k} == "object" && !Array.isArray(${k})`;break;case"integer":_=$((0,n._)`!(${k} % 1) && !isNaN(${k})`);break;case"number":_=$();break;default:return(0,n._)`typeof ${k} ${E} ${w}`}return C===o.Correct?_:(0,n.not)(_);function $(M=n.nil){return(0,n.and)((0,n._)`typeof ${k} == "number"`,M,T?(0,n._)`isFinite(${k})`:n.nil)}}Ni.checkDataType=m;function y(w,k,T,C){if(w.length===1)return m(w[0],k,T,C);let E;const _=(0,i.toHash)(w);if(_.array&&_.object){const $=(0,n._)`typeof ${k} != "object"`;E=_.null?$:(0,n._)`!${k} || ${$}`,delete _.null,delete _.array,delete _.object}else E=n.nil;_.number&&delete _.integer;for(const $ in _)E=(0,n.and)(E,m($,k,T,C));return E}Ni.checkDataTypes=y;const b={message:({schema:w})=>`must be ${w}`,params:({schema:w,schemaValue:k})=>typeof w=="string"?(0,n._)`{type: ${w}}`:(0,n._)`{type: ${k}}`};function O(w){const k=S(w);(0,r.reportError)(k,b)}Ni.reportTypeError=O;function S(w){const{gen:k,data:T,schema:C}=w,E=(0,i.schemaRefOrVal)(w,C,"type");return{gen:k,keyword:"type",data:T,schema:C.type,schemaCode:E,schemaValue:E,parentSchema:C,params:{},it:w}}return Ni}var Xm={},H3;function CVe(){if(H3)return Xm;H3=1,Object.defineProperty(Xm,"__esModule",{value:!0}),Xm.assignDefaults=void 0;const t=Bt(),e=nr();function r(i,o){const{properties:a,items:s}=i.schema;if(o==="object"&&a)for(const l in a)n(i,l,a[l].default);else o==="array"&&Array.isArray(s)&&s.forEach((l,c)=>n(i,c,l.default))}Xm.assignDefaults=r;function n(i,o,a){const{gen:s,compositeRule:l,data:c,opts:d}=i;if(a===void 0)return;const p=(0,t._)`${c}${(0,t.getProperty)(o)}`;if(l){(0,e.checkStrictMode)(i,`default is ignored for: ${p}`);return}let g=(0,t._)`${p} === undefined`;d.useDefaults==="empty"&&(g=(0,t._)`${g} || ${p} === null || ${p} === ""`),s.if(g,(0,t._)`${p} = ${(0,t.stringify)(a)}`)}return Xm}var cs={},Ar={},X3;function Is(){if(X3)return Ar;X3=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.validateUnion=Ar.validateArray=Ar.usePattern=Ar.callValidateCode=Ar.schemaProperties=Ar.allSchemaProperties=Ar.noPropertyInData=Ar.propertyInData=Ar.isOwnProperty=Ar.hasPropFunc=Ar.reportMissingProp=Ar.checkMissingProp=Ar.checkReportMissingProp=void 0;const t=Bt(),e=nr(),r=Rs(),n=nr();function i(w,k){const{gen:T,data:C,it:E}=w;T.if(d(T,C,k,E.opts.ownProperties),()=>{w.setParams({missingProperty:(0,t._)`${k}`},!0),w.error()})}Ar.checkReportMissingProp=i;function o({gen:w,data:k,it:{opts:T}},C,E){return(0,t.or)(...C.map(_=>(0,t.and)(d(w,k,_,T.ownProperties),(0,t._)`${E} = ${_}`)))}Ar.checkMissingProp=o;function a(w,k){w.setParams({missingProperty:k},!0),w.error()}Ar.reportMissingProp=a;function s(w){return w.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}Ar.hasPropFunc=s;function l(w,k,T){return(0,t._)`${s(w)}.call(${k}, ${T})`}Ar.isOwnProperty=l;function c(w,k,T,C){const E=(0,t._)`${k}${(0,t.getProperty)(T)} !== undefined`;return C?(0,t._)`${E} && ${l(w,k,T)}`:E}Ar.propertyInData=c;function d(w,k,T,C){const E=(0,t._)`${k}${(0,t.getProperty)(T)} === undefined`;return C?(0,t.or)(E,(0,t.not)(l(w,k,T))):E}Ar.noPropertyInData=d;function p(w){return w?Object.keys(w).filter(k=>k!=="__proto__"):[]}Ar.allSchemaProperties=p;function g(w,k){return p(k).filter(T=>!(0,e.alwaysValidSchema)(w,k[T]))}Ar.schemaProperties=g;function m({schemaCode:w,data:k,it:{gen:T,topSchemaRef:C,schemaPath:E,errorPath:_},it:$},M,j,B){const V=B?(0,t._)`${w}, ${k}, ${C}${E}`:k,X=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,_)],[r.default.parentData,$.parentData],[r.default.parentDataProperty,$.parentDataProperty],[r.default.rootData,r.default.rootData]];$.opts.dynamicRef&&X.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const D=(0,t._)`${V}, ${T.object(...X)}`;return j!==t.nil?(0,t._)`${M}.call(${j}, ${D})`:(0,t._)`${M}(${D})`}Ar.callValidateCode=m;const y=(0,t._)`new RegExp`;function b({gen:w,it:{opts:k}},T){const C=k.unicodeRegExp?"u":"",{regExp:E}=k.code,_=E(T,C);return w.scopeValue("pattern",{key:_.toString(),ref:_,code:(0,t._)`${E.code==="new RegExp"?y:(0,n.useFunc)(w,E)}(${T}, ${C})`})}Ar.usePattern=b;function O(w){const{gen:k,data:T,keyword:C,it:E}=w,_=k.name("valid");if(E.allErrors){const M=k.let("valid",!0);return $(()=>k.assign(M,!1)),M}return k.var(_,!0),$(()=>k.break()),_;function $(M){const j=k.const("len",(0,t._)`${T}.length`);k.forRange("i",0,j,B=>{w.subschema({keyword:C,dataProp:B,dataPropType:e.Type.Num},_),k.if((0,t.not)(_),M)})}}Ar.validateArray=O;function S(w){const{gen:k,schema:T,keyword:C,it:E}=w;if(!Array.isArray(T))throw new Error("ajv implementation error");if(T.some(j=>(0,e.alwaysValidSchema)(E,j))&&!E.opts.unevaluated)return;const $=k.let("valid",!1),M=k.name("_valid");k.block(()=>T.forEach((j,B)=>{const V=w.subschema({keyword:C,schemaProp:B,compositeRule:!0},M);k.assign($,(0,t._)`${$} || ${M}`),w.mergeValidEvaluated(V,M)||k.if((0,t.not)($))})),w.result($,()=>w.reset(),()=>w.error(!0))}return Ar.validateUnion=S,Ar}var Z3;function TVe(){if(Z3)return cs;Z3=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.validateKeywordUsage=cs.validSchemaType=cs.funcKeywordCode=cs.macroKeywordCode=void 0;const t=Bt(),e=Rs(),r=Is(),n=zP();function i(g,m){const{gen:y,keyword:b,schema:O,parentSchema:S,it:w}=g,k=m.macro.call(w.self,O,S,w),T=c(y,b,k);w.opts.validateSchema!==!1&&w.self.validateSchema(k,!0);const C=y.name("valid");g.subschema({schema:k,schemaPath:t.nil,errSchemaPath:`${w.errSchemaPath}/${b}`,topSchemaRef:T,compositeRule:!0},C),g.pass(C,()=>g.error(!0))}cs.macroKeywordCode=i;function o(g,m){var y;const{gen:b,keyword:O,schema:S,parentSchema:w,$data:k,it:T}=g;l(T,m);const C=!k&&m.compile?m.compile.call(T.self,S,w,T):m.validate,E=c(b,O,C),_=b.let("valid");g.block$data(_,$),g.ok((y=m.valid)!==null&&y!==void 0?y:_);function $(){if(m.errors===!1)B(),m.modifying&&a(g),V(()=>g.error());else{const X=m.async?M():j();m.modifying&&a(g),V(()=>s(g,X))}}function M(){const X=b.let("ruleErrs",null);return b.try(()=>B((0,t._)`await `),D=>b.assign(_,!1).if((0,t._)`${D} instanceof ${T.ValidationError}`,()=>b.assign(X,(0,t._)`${D}.errors`),()=>b.throw(D))),X}function j(){const X=(0,t._)`${E}.errors`;return b.assign(X,null),B(t.nil),X}function B(X=m.async?(0,t._)`await `:t.nil){const D=T.opts.passContext?e.default.this:e.default.self,F=!("compile"in m&&!k||m.schema===!1);b.assign(_,(0,t._)`${X}${(0,r.callValidateCode)(g,E,D,F)}`,m.modifying)}function V(X){var D;b.if((0,t.not)((D=m.valid)!==null&&D!==void 0?D:_),X)}}cs.funcKeywordCode=o;function a(g){const{gen:m,data:y,it:b}=g;m.if(b.parentData,()=>m.assign(y,(0,t._)`${b.parentData}[${b.parentDataProperty}]`))}function s(g,m){const{gen:y}=g;y.if((0,t._)`Array.isArray(${m})`,()=>{y.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${m} : ${e.default.vErrors}.concat(${m})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(g)},()=>g.error())}function l({schemaEnv:g},m){if(m.async&&!g.$async)throw new Error("async keyword in sync schema")}function c(g,m,y){if(y===void 0)throw new Error(`keyword "${m}" failed to compile`);return g.scopeValue("keyword",typeof y=="function"?{ref:y}:{ref:y,code:(0,t.stringify)(y)})}function d(g,m,y=!1){return!m.length||m.some(b=>b==="array"?Array.isArray(g):b==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==b||y&&typeof g>"u")}cs.validSchemaType=d;function p({schema:g,opts:m,self:y,errSchemaPath:b},O,S){if(Array.isArray(O.keyword)?!O.keyword.includes(S):O.keyword!==S)throw new Error("ajv implementation error");const w=O.dependencies;if(w!=null&&w.some(k=>!Object.prototype.hasOwnProperty.call(g,k)))throw new Error(`parent schema must have dependencies of ${S}: ${w.join(",")}`);if(O.validateSchema&&!O.validateSchema(g[S])){const T=`keyword "${S}" value is invalid at path "${b}": `+y.errorsText(O.validateSchema.errors);if(m.validateSchema==="log")y.logger.error(T);else throw new Error(T)}}return cs.validateKeywordUsage=p,cs}var Ul={},G3;function EVe(){if(G3)return Ul;G3=1,Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.extendSubschemaMode=Ul.extendSubschemaData=Ul.getSubschema=void 0;const t=Bt(),e=nr();function r(o,{keyword:a,schemaProp:s,schema:l,schemaPath:c,errSchemaPath:d,topSchemaRef:p}){if(a!==void 0&&l!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const g=o.schema[a];return s===void 0?{schema:g,schemaPath:(0,t._)`${o.schemaPath}${(0,t.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:g[s],schemaPath:(0,t._)`${o.schemaPath}${(0,t.getProperty)(a)}${(0,t.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,e.escapeFragment)(s)}`}}if(l!==void 0){if(c===void 0||d===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:l,schemaPath:c,topSchemaRef:p,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}Ul.getSubschema=r;function n(o,a,{dataProp:s,dataPropType:l,data:c,dataTypes:d,propertyName:p}){if(c!==void 0&&s!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=a;if(s!==void 0){const{errorPath:y,dataPathArr:b,opts:O}=a,S=g.let("data",(0,t._)`${a.data}${(0,t.getProperty)(s)}`,!0);m(S),o.errorPath=(0,t.str)`${y}${(0,e.getErrorPath)(s,l,O.jsPropertySyntax)}`,o.parentDataProperty=(0,t._)`${s}`,o.dataPathArr=[...b,o.parentDataProperty]}if(c!==void 0){const y=c instanceof t.Name?c:g.let("data",c,!0);m(y),p!==void 0&&(o.propertyName=p)}d&&(o.dataTypes=d);function m(y){o.data=y,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,y]}}Ul.extendSubschemaData=n;function i(o,{jtdDiscriminator:a,jtdMetadata:s,compositeRule:l,createErrors:c,allErrors:d}){l!==void 0&&(o.compositeRule=l),c!==void 0&&(o.createErrors=c),d!==void 0&&(o.allErrors=d),o.jtdDiscriminator=a,o.jtdMetadata=s}return Ul.extendSubschemaMode=i,Ul}var lo={},qE,Y3;function PJ(){return Y3||(Y3=1,qE=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}),qE}var WE={exports:{}},K3;function _Ve(){if(K3)return WE.exports;K3=1;var t=WE.exports=function(n,i,o){typeof i=="function"&&(o=i,i={}),o=i.cb||o;var a=typeof o=="function"?o:o.pre||function(){},s=o.post||function(){};e(i,a,s,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e(n,i,o,a,s,l,c,d,p,g){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,s,l,c,d,p,g);for(var m in a){var y=a[m];if(Array.isArray(y)){if(m in t.arrayKeywords)for(var b=0;b<y.length;b++)e(n,i,o,y[b],s+"/"+m+"/"+b,l,s,m,a,b)}else if(m in t.propsKeywords){if(y&&typeof y=="object")for(var O in y)e(n,i,o,y[O],s+"/"+m+"/"+r(O),l,s,m,a,O)}else(m in t.keywords||n.allKeys&&!(m in t.skipKeywords))&&e(n,i,o,y,s+"/"+m,l,s,m,a)}o(a,s,l,c,d,p,g)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return WE.exports}var J3;function qP(){if(J3)return lo;J3=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.getSchemaRefs=lo.resolveUrl=lo.normalizeId=lo._getFullPath=lo.getFullPath=lo.inlineRef=void 0;const t=nr(),e=PJ(),r=_Ve(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(b,O=!0){return typeof b=="boolean"?!0:O===!0?!a(b):O?s(b)<=O:!1}lo.inlineRef=i;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(b){for(const O in b){if(o.has(O))return!0;const S=b[O];if(Array.isArray(S)&&S.some(a)||typeof S=="object"&&a(S))return!0}return!1}function s(b){let O=0;for(const S in b){if(S==="$ref")return 1/0;if(O++,!n.has(S)&&(typeof b[S]=="object"&&(0,t.eachItem)(b[S],w=>O+=s(w)),O===1/0))return 1/0}return O}function l(b,O="",S){S!==!1&&(O=p(O));const w=b.parse(O);return c(b,w)}lo.getFullPath=l;function c(b,O){return b.serialize(O).split("#")[0]+"#"}lo._getFullPath=c;const d=/#\/?$/;function p(b){return b?b.replace(d,""):""}lo.normalizeId=p;function g(b,O,S){return S=p(S),b.resolve(O,S)}lo.resolveUrl=g;const m=/^[a-z_][-a-z0-9._]*$/i;function y(b,O){if(typeof b=="boolean")return{};const{schemaId:S,uriResolver:w}=this.opts,k=p(b[S]||O),T={"":k},C=l(w,k,!1),E={},_=new Set;return r(b,{allKeys:!0},(j,B,V,X)=>{if(X===void 0)return;const D=C+B;let F=T[X];typeof j[S]=="string"&&(F=Y.call(this,j[S])),ie.call(this,j.$anchor),ie.call(this,j.$dynamicAnchor),T[B]=F;function Y(H){const ne=this.opts.uriResolver.resolve;if(H=p(F?ne(F,H):H),_.has(H))throw M(H);_.add(H);let z=this.refs[H];return typeof z=="string"&&(z=this.refs[z]),typeof z=="object"?$(j,z.schema,H):H!==p(D)&&(H[0]==="#"?($(j,E[H],H),E[H]=j):this.refs[H]=D),H}function ie(H){if(typeof H=="string"){if(!m.test(H))throw new Error(`invalid anchor "${H}"`);Y.call(this,`#${H}`)}}}),E;function $(j,B,V){if(B!==void 0&&!e(j,B))throw M(V)}function M(j){return new Error(`reference "${j}" resolves to more than one schema`)}}return lo.getSchemaRefs=y,lo}var eB;function WP(){if(eB)return ql;eB=1,Object.defineProperty(ql,"__esModule",{value:!0}),ql.getData=ql.KeywordCxt=ql.validateFunctionCode=void 0;const t=kVe(),e=lx(),r=xJ(),n=lx(),i=CVe(),o=TVe(),a=EVe(),s=Bt(),l=Rs(),c=qP(),d=nr(),p=zP();function g(ee){if(C(ee)&&(_(ee),T(ee))){O(ee);return}m(ee,()=>(0,t.topBoolOrEmptySchema)(ee))}ql.validateFunctionCode=g;function m({gen:ee,validateName:re,schema:ye,schemaEnv:ke,opts:Me},De){Me.code.es5?ee.func(re,(0,s._)`${l.default.data}, ${l.default.valCxt}`,ke.$async,()=>{ee.code((0,s._)`"use strict"; ${w(ye,Me)}`),b(ee,Me),ee.code(De)}):ee.func(re,(0,s._)`${l.default.data}, ${y(Me)}`,ke.$async,()=>ee.code(w(ye,Me)).code(De))}function y(ee){return(0,s._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${ee.dynamicRef?(0,s._)`, ${l.default.dynamicAnchors}={}`:s.nil}}={}`}function b(ee,re){ee.if(l.default.valCxt,()=>{ee.var(l.default.instancePath,(0,s._)`${l.default.valCxt}.${l.default.instancePath}`),ee.var(l.default.parentData,(0,s._)`${l.default.valCxt}.${l.default.parentData}`),ee.var(l.default.parentDataProperty,(0,s._)`${l.default.valCxt}.${l.default.parentDataProperty}`),ee.var(l.default.rootData,(0,s._)`${l.default.valCxt}.${l.default.rootData}`),re.dynamicRef&&ee.var(l.default.dynamicAnchors,(0,s._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{ee.var(l.default.instancePath,(0,s._)`""`),ee.var(l.default.parentData,(0,s._)`undefined`),ee.var(l.default.parentDataProperty,(0,s._)`undefined`),ee.var(l.default.rootData,l.default.data),re.dynamicRef&&ee.var(l.default.dynamicAnchors,(0,s._)`{}`)})}function O(ee){const{schema:re,opts:ye,gen:ke}=ee;m(ee,()=>{ye.$comment&&re.$comment&&X(ee),j(ee),ke.let(l.default.vErrors,null),ke.let(l.default.errors,0),ye.unevaluated&&S(ee),$(ee),D(ee)})}function S(ee){const{gen:re,validateName:ye}=ee;ee.evaluated=re.const("evaluated",(0,s._)`${ye}.evaluated`),re.if((0,s._)`${ee.evaluated}.dynamicProps`,()=>re.assign((0,s._)`${ee.evaluated}.props`,(0,s._)`undefined`)),re.if((0,s._)`${ee.evaluated}.dynamicItems`,()=>re.assign((0,s._)`${ee.evaluated}.items`,(0,s._)`undefined`))}function w(ee,re){const ye=typeof ee=="object"&&ee[re.schemaId];return ye&&(re.code.source||re.code.process)?(0,s._)`/*# sourceURL=${ye} */`:s.nil}function k(ee,re){if(C(ee)&&(_(ee),T(ee))){E(ee,re);return}(0,t.boolOrEmptySchema)(ee,re)}function T({schema:ee,self:re}){if(typeof ee=="boolean")return!ee;for(const ye in ee)if(re.RULES.all[ye])return!0;return!1}function C(ee){return typeof ee.schema!="boolean"}function E(ee,re){const{schema:ye,gen:ke,opts:Me}=ee;Me.$comment&&ye.$comment&&X(ee),B(ee),V(ee);const De=ke.const("_errs",l.default.errors);$(ee,De),ke.var(re,(0,s._)`${De} === ${l.default.errors}`)}function _(ee){(0,d.checkUnknownRules)(ee),M(ee)}function $(ee,re){if(ee.opts.jtd)return Y(ee,[],!1,re);const ye=(0,e.getSchemaTypes)(ee.schema),ke=(0,e.coerceAndCheckDataType)(ee,ye);Y(ee,ye,!ke,re)}function M(ee){const{schema:re,errSchemaPath:ye,opts:ke,self:Me}=ee;re.$ref&&ke.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(re,Me.RULES)&&Me.logger.warn(`$ref: keywords ignored in schema at path "${ye}"`)}function j(ee){const{schema:re,opts:ye}=ee;re.default!==void 0&&ye.useDefaults&&ye.strictSchema&&(0,d.checkStrictMode)(ee,"default is ignored in the schema root")}function B(ee){const re=ee.schema[ee.opts.schemaId];re&&(ee.baseId=(0,c.resolveUrl)(ee.opts.uriResolver,ee.baseId,re))}function V(ee){if(ee.schema.$async&&!ee.schemaEnv.$async)throw new Error("async schema in sync schema")}function X({gen:ee,schemaEnv:re,schema:ye,errSchemaPath:ke,opts:Me}){const De=ye.$comment;if(Me.$comment===!0)ee.code((0,s._)`${l.default.self}.logger.log(${De})`);else if(typeof Me.$comment=="function"){const Vt=(0,s.str)`${ke}/$comment`,vr=ee.scopeValue("root",{ref:re.root});ee.code((0,s._)`${l.default.self}.opts.$comment(${De}, ${Vt}, ${vr}.schema)`)}}function D(ee){const{gen:re,schemaEnv:ye,validateName:ke,ValidationError:Me,opts:De}=ee;ye.$async?re.if((0,s._)`${l.default.errors} === 0`,()=>re.return(l.default.data),()=>re.throw((0,s._)`new ${Me}(${l.default.vErrors})`)):(re.assign((0,s._)`${ke}.errors`,l.default.vErrors),De.unevaluated&&F(ee),re.return((0,s._)`${l.default.errors} === 0`))}function F({gen:ee,evaluated:re,props:ye,items:ke}){ye instanceof s.Name&&ee.assign((0,s._)`${re}.props`,ye),ke instanceof s.Name&&ee.assign((0,s._)`${re}.items`,ke)}function Y(ee,re,ye,ke){const{gen:Me,schema:De,data:Vt,allErrors:vr,opts:yr,self:ur}=ee,{RULES:or}=ur;if(De.$ref&&(yr.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(De,or))){Me.block(()=>Oe(ee,"$ref",or.all.$ref.definition));return}yr.jtd||H(ee,re),Me.block(()=>{for(const zt of or.rules)Rr(zt);Rr(or.post)});function Rr(zt){(0,r.shouldUseGroup)(De,zt)&&(zt.type?(Me.if((0,n.checkDataType)(zt.type,Vt,yr.strictNumbers)),ie(ee,zt),re.length===1&&re[0]===zt.type&&ye&&(Me.else(),(0,n.reportTypeError)(ee)),Me.endIf()):ie(ee,zt),vr||Me.if((0,s._)`${l.default.errors} === ${ke||0}`))}}function ie(ee,re){const{gen:ye,schema:ke,opts:{useDefaults:Me}}=ee;Me&&(0,i.assignDefaults)(ee,re.type),ye.block(()=>{for(const De of re.rules)(0,r.shouldUseRule)(ke,De)&&Oe(ee,De.keyword,De.definition,re.type)})}function H(ee,re){ee.schemaEnv.meta||!ee.opts.strictTypes||(ne(ee,re),ee.opts.allowUnionTypes||z(ee,re),N(ee,ee.dataTypes))}function ne(ee,re){if(re.length){if(!ee.dataTypes.length){ee.dataTypes=re;return}re.forEach(ye=>{J(ee.dataTypes,ye)||q(ee,`type "${ye}" not allowed by context "${ee.dataTypes.join(",")}"`)}),Q(ee,re)}}function z(ee,re){re.length>1&&!(re.length===2&&re.includes("null"))&&q(ee,"use allowUnionTypes to allow union type keyword")}function N(ee,re){const ye=ee.self.RULES.all;for(const ke in ye){const Me=ye[ke];if(typeof Me=="object"&&(0,r.shouldUseRule)(ee.schema,Me)){const{type:De}=Me.definition;De.length&&!De.some(Vt=>U(re,Vt))&&q(ee,`missing type "${De.join(",")}" for keyword "${ke}"`)}}}function U(ee,re){return ee.includes(re)||re==="number"&&ee.includes("integer")}function J(ee,re){return ee.includes(re)||re==="integer"&&ee.includes("number")}function Q(ee,re){const ye=[];for(const ke of ee.dataTypes)J(re,ke)?ye.push(ke):re.includes("integer")&&ke==="number"&&ye.push("integer");ee.dataTypes=ye}function q(ee,re){const ye=ee.schemaEnv.baseId+ee.errSchemaPath;re+=` at "${ye}" (strictTypes)`,(0,d.checkStrictMode)(ee,re,ee.opts.strictTypes)}class oe{constructor(re,ye,ke){if((0,o.validateKeywordUsage)(re,ye,ke),this.gen=re.gen,this.allErrors=re.allErrors,this.keyword=ke,this.data=re.data,this.schema=re.schema[ke],this.$data=ye.$data&&re.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(re,this.schema,ke,this.$data),this.schemaType=ye.schemaType,this.parentSchema=re.schema,this.params={},this.it=re,this.def=ye,this.$data)this.schemaCode=re.gen.const("vSchema",Pe(this.$data,re));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,ye.schemaType,ye.allowUndefined))throw new Error(`${ke} value must be ${JSON.stringify(ye.schemaType)}`);("code"in ye?ye.trackErrors:ye.errors!==!1)&&(this.errsCount=re.gen.const("_errs",l.default.errors))}result(re,ye,ke){this.failResult((0,s.not)(re),ye,ke)}failResult(re,ye,ke){this.gen.if(re),ke?ke():this.error(),ye?(this.gen.else(),ye(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(re,ye){this.failResult((0,s.not)(re),void 0,ye)}fail(re){if(re===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(re),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(re){if(!this.$data)return this.fail(re);const{schemaCode:ye}=this;this.fail((0,s._)`${ye} !== undefined && (${(0,s.or)(this.invalid$data(),re)})`)}error(re,ye,ke){if(ye){this.setParams(ye),this._error(re,ke),this.setParams({});return}this._error(re,ke)}_error(re,ye){(re?p.reportExtraError:p.reportError)(this,this.def.error,ye)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(re){this.allErrors||this.gen.if(re)}setParams(re,ye){ye?Object.assign(this.params,re):this.params=re}block$data(re,ye,ke=s.nil){this.gen.block(()=>{this.check$data(re,ke),ye()})}check$data(re=s.nil,ye=s.nil){if(!this.$data)return;const{gen:ke,schemaCode:Me,schemaType:De,def:Vt}=this;ke.if((0,s.or)((0,s._)`${Me} === undefined`,ye)),re!==s.nil&&ke.assign(re,!0),(De.length||Vt.validateSchema)&&(ke.elseIf(this.invalid$data()),this.$dataError(),re!==s.nil&&ke.assign(re,!1)),ke.else()}invalid$data(){const{gen:re,schemaCode:ye,schemaType:ke,def:Me,it:De}=this;return(0,s.or)(Vt(),vr());function Vt(){if(ke.length){if(!(ye instanceof s.Name))throw new Error("ajv implementation error");const yr=Array.isArray(ke)?ke:[ke];return(0,s._)`${(0,n.checkDataTypes)(yr,ye,De.opts.strictNumbers,n.DataType.Wrong)}`}return s.nil}function vr(){if(Me.validateSchema){const yr=re.scopeValue("validate$data",{ref:Me.validateSchema});return(0,s._)`!${yr}(${ye})`}return s.nil}}subschema(re,ye){const ke=(0,a.getSubschema)(this.it,re);(0,a.extendSubschemaData)(ke,this.it,re),(0,a.extendSubschemaMode)(ke,re);const Me={...this.it,...ke,items:void 0,props:void 0};return k(Me,ye),Me}mergeEvaluated(re,ye){const{it:ke,gen:Me}=this;ke.opts.unevaluated&&(ke.props!==!0&&re.props!==void 0&&(ke.props=d.mergeEvaluated.props(Me,re.props,ke.props,ye)),ke.items!==!0&&re.items!==void 0&&(ke.items=d.mergeEvaluated.items(Me,re.items,ke.items,ye)))}mergeValidEvaluated(re,ye){const{it:ke,gen:Me}=this;if(ke.opts.unevaluated&&(ke.props!==!0||ke.items!==!0))return Me.if(ye,()=>this.mergeEvaluated(re,s.Name)),!0}}ql.KeywordCxt=oe;function Oe(ee,re,ye,ke){const Me=new oe(ee,ye,re);"code"in ye?ye.code(Me,ke):Me.$data&&ye.validate?(0,o.funcKeywordCode)(Me,ye):"macro"in ye?(0,o.macroKeywordCode)(Me,ye):(ye.compile||ye.validate)&&(0,o.funcKeywordCode)(Me,ye)}const Z=/^\/(?:[^~]|~0|~1)*$/,le=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Pe(ee,{dataLevel:re,dataNames:ye,dataPathArr:ke}){let Me,De;if(ee==="")return l.default.rootData;if(ee[0]==="/"){if(!Z.test(ee))throw new Error(`Invalid JSON-pointer: ${ee}`);Me=ee,De=l.default.rootData}else{const ur=le.exec(ee);if(!ur)throw new Error(`Invalid JSON-pointer: ${ee}`);const or=+ur[1];if(Me=ur[2],Me==="#"){if(or>=re)throw new Error(yr("property/index",or));return ke[re-or]}if(or>re)throw new Error(yr("data",or));if(De=ye[re-or],!Me)return De}let Vt=De;const vr=Me.split("/");for(const ur of vr)ur&&(De=(0,s._)`${De}${(0,s.getProperty)((0,d.unescapeJsonPointer)(ur))}`,Vt=(0,s._)`${Vt} && ${De}`);return Vt;function yr(ur,or){return`Cannot access ${ur} ${or} levels up, current level is ${re}`}}return ql.getData=Pe,ql}var nw={},tB;function SM(){if(tB)return nw;tB=1,Object.defineProperty(nw,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return nw.default=t,nw}var iw={},rB;function UP(){if(rB)return iw;rB=1,Object.defineProperty(iw,"__esModule",{value:!0});const t=qP();class e extends Error{constructor(n,i,o,a){super(a||`can't resolve reference ${o} from id ${i}`),this.missingRef=(0,t.resolveUrl)(n,i,o),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return iw.default=e,iw}var ra={},nB;function HP(){if(nB)return ra;nB=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.resolveSchema=ra.getCompilingSchema=ra.resolveRef=ra.compileSchema=ra.SchemaEnv=void 0;const t=Bt(),e=SM(),r=Rs(),n=qP(),i=nr(),o=WP();class a{constructor(S){var w;this.refs={},this.dynamicAnchors={};let k;typeof S.schema=="object"&&(k=S.schema),this.schema=S.schema,this.schemaId=S.schemaId,this.root=S.root||this,this.baseId=(w=S.baseId)!==null&&w!==void 0?w:(0,n.normalizeId)(k==null?void 0:k[S.schemaId||"$id"]),this.schemaPath=S.schemaPath,this.localRefs=S.localRefs,this.meta=S.meta,this.$async=k==null?void 0:k.$async,this.refs={}}}ra.SchemaEnv=a;function s(O){const S=d.call(this,O);if(S)return S;const w=(0,n.getFullPath)(this.opts.uriResolver,O.root.baseId),{es5:k,lines:T}=this.opts.code,{ownProperties:C}=this.opts,E=new t.CodeGen(this.scope,{es5:k,lines:T,ownProperties:C});let _;O.$async&&(_=E.scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const $=E.scopeName("validate");O.validateName=$;const M={gen:E,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:E.scopeValue("schema",this.opts.code.source===!0?{ref:O.schema,code:(0,t.stringify)(O.schema)}:{ref:O.schema}),validateName:$,ValidationError:_,schema:O.schema,schemaEnv:O,rootId:w,baseId:O.baseId||w,schemaPath:t.nil,errSchemaPath:O.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let j;try{this._compilations.add(O),(0,o.validateFunctionCode)(M),E.optimize(this.opts.code.optimize);const B=E.toString();j=`${E.scopeRefs(r.default.scope)}return ${B}`,this.opts.code.process&&(j=this.opts.code.process(j,O));const X=new Function(`${r.default.self}`,`${r.default.scope}`,j)(this,this.scope.get());if(this.scope.value($,{ref:X}),X.errors=null,X.schema=O.schema,X.schemaEnv=O,O.$async&&(X.$async=!0),this.opts.code.source===!0&&(X.source={validateName:$,validateCode:B,scopeValues:E._values}),this.opts.unevaluated){const{props:D,items:F}=M;X.evaluated={props:D instanceof t.Name?void 0:D,items:F instanceof t.Name?void 0:F,dynamicProps:D instanceof t.Name,dynamicItems:F instanceof t.Name},X.source&&(X.source.evaluated=(0,t.stringify)(X.evaluated))}return O.validate=X,O}catch(B){throw delete O.validate,delete O.validateName,j&&this.logger.error("Error compiling schema, function code:",j),B}finally{this._compilations.delete(O)}}ra.compileSchema=s;function l(O,S,w){var k;w=(0,n.resolveUrl)(this.opts.uriResolver,S,w);const T=O.refs[w];if(T)return T;let C=g.call(this,O,w);if(C===void 0){const E=(k=O.localRefs)===null||k===void 0?void 0:k[w],{schemaId:_}=this.opts;E&&(C=new a({schema:E,schemaId:_,root:O,baseId:S}))}if(C!==void 0)return O.refs[w]=c.call(this,C)}ra.resolveRef=l;function c(O){return(0,n.inlineRef)(O.schema,this.opts.inlineRefs)?O.schema:O.validate?O:s.call(this,O)}function d(O){for(const S of this._compilations)if(p(S,O))return S}ra.getCompilingSchema=d;function p(O,S){return O.schema===S.schema&&O.root===S.root&&O.baseId===S.baseId}function g(O,S){let w;for(;typeof(w=this.refs[S])=="string";)S=w;return w||this.schemas[S]||m.call(this,O,S)}function m(O,S){const w=this.opts.uriResolver.parse(S),k=(0,n._getFullPath)(this.opts.uriResolver,w);let T=(0,n.getFullPath)(this.opts.uriResolver,O.baseId,void 0);if(Object.keys(O.schema).length>0&&k===T)return b.call(this,w,O);const C=(0,n.normalizeId)(k),E=this.refs[C]||this.schemas[C];if(typeof E=="string"){const _=m.call(this,O,E);return typeof(_==null?void 0:_.schema)!="object"?void 0:b.call(this,w,_)}if(typeof(E==null?void 0:E.schema)=="object"){if(E.validate||s.call(this,E),C===(0,n.normalizeId)(S)){const{schema:_}=E,{schemaId:$}=this.opts,M=_[$];return M&&(T=(0,n.resolveUrl)(this.opts.uriResolver,T,M)),new a({schema:_,schemaId:$,root:O,baseId:T})}return b.call(this,w,E)}}ra.resolveSchema=m;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function b(O,{baseId:S,schema:w,root:k}){var T;if(((T=O.fragment)===null||T===void 0?void 0:T[0])!=="/")return;for(const _ of O.fragment.slice(1).split("/")){if(typeof w=="boolean")return;const $=w[(0,i.unescapeFragment)(_)];if($===void 0)return;w=$;const M=typeof w=="object"&&w[this.opts.schemaId];!y.has(_)&&M&&(S=(0,n.resolveUrl)(this.opts.uriResolver,S,M))}let C;if(typeof w!="boolean"&&w.$ref&&!(0,i.schemaHasRulesButRef)(w,this.RULES)){const _=(0,n.resolveUrl)(this.opts.uriResolver,S,w.$ref);C=m.call(this,k,_)}const{schemaId:E}=this.opts;if(C=C||new a({schema:w,schemaId:E,root:k,baseId:S}),C.schema!==C.root.schema)return C}return ra}const RVe="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",IVe="Meta-schema for $data reference (JSON AnySchema extension proposal)",$Ve="object",AVe=["$data"],MVe={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},NVe=!1,jVe={$id:RVe,description:IVe,type:$Ve,required:AVe,properties:MVe,additionalProperties:NVe};var ow={},pv={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */var DVe=pv.exports,iB;function LVe(){return iB||(iB=1,function(t,e){(function(r,n){n(e)})(DVe,function(r){function n(){for(var G=arguments.length,W=Array(G),te=0;te<G;te++)W[te]=arguments[te];if(W.length>1){W[0]=W[0].slice(0,-1);for(var ce=W.length-1,fe=1;fe<ce;++fe)W[fe]=W[fe].slice(1,-1);return W[ce]=W[ce].slice(1),W.join("")}else return W[0]}function i(G){return"(?:"+G+")"}function o(G){return G===void 0?"undefined":G===null?"null":Object.prototype.toString.call(G).split(" ").pop().split("]").shift().toLowerCase()}function a(G){return G.toUpperCase()}function s(G){return G!=null?G instanceof Array?G:typeof G.length!="number"||G.split||G.setInterval||G.call?[G]:Array.prototype.slice.call(G):[]}function l(G,W){var te=G;if(W)for(var ce in W)te[ce]=W[ce];return te}function c(G){var W="[A-Za-z]",te="[0-9]",ce=n(te,"[A-Fa-f]"),fe=i(i("%[EFef]"+ce+"%"+ce+ce+"%"+ce+ce)+"|"+i("%[89A-Fa-f]"+ce+"%"+ce+ce)+"|"+i("%"+ce+ce)),qe="[\\:\\/\\?\\#\\[\\]\\@]",tt="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Ot=n(qe,tt),ir=G?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",br=G?"[\\uE000-\\uF8FF]":"[]",It=n(W,te,"[\\-\\.\\_\\~]",ir);i(W+n(W,te,"[\\+\\-\\.]")+"*"),i(i(fe+"|"+n(It,tt,"[\\:]"))+"*");var qt=i(i("25[0-5]")+"|"+i("2[0-4]"+te)+"|"+i("1"+te+te)+"|"+i("0?[1-9]"+te)+"|0?0?"+te),Ir=i(qt+"\\."+qt+"\\."+qt+"\\."+qt),vt=i(ce+"{1,4}"),pr=i(i(vt+"\\:"+vt)+"|"+Ir),ct=i(i(vt+"\\:")+"{6}"+pr),Qt=i("\\:\\:"+i(vt+"\\:")+"{5}"+pr),Dt=i(i(vt)+"?\\:\\:"+i(vt+"\\:")+"{4}"+pr),xr=i(i(i(vt+"\\:")+"{0,1}"+vt)+"?\\:\\:"+i(vt+"\\:")+"{3}"+pr),Wn=i(i(i(vt+"\\:")+"{0,2}"+vt)+"?\\:\\:"+i(vt+"\\:")+"{2}"+pr),wa=i(i(i(vt+"\\:")+"{0,3}"+vt)+"?\\:\\:"+vt+"\\:"+pr),mo=i(i(i(vt+"\\:")+"{0,4}"+vt)+"?\\:\\:"+pr),vo=i(i(i(vt+"\\:")+"{0,5}"+vt)+"?\\:\\:"+vt),Ho=i(i(i(vt+"\\:")+"{0,6}"+vt)+"?\\:\\:"),Sa=i([ct,Qt,Dt,xr,Wn,wa,mo,vo,Ho].join("|")),Un=i(i(It+"|"+fe)+"+");i("[vV]"+ce+"+\\."+n(It,tt,"[\\:]")+"+"),i(i(fe+"|"+n(It,tt))+"*");var dd=i(fe+"|"+n(It,tt,"[\\:\\@]"));return i(i(fe+"|"+n(It,tt,"[\\@]"))+"+"),i(i(dd+"|"+n("[\\/\\?]",br))+"*"),{NOT_SCHEME:new RegExp(n("[^]",W,te,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",It,tt),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",It,tt),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",It,tt),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",It,tt),"g"),NOT_QUERY:new RegExp(n("[^\\%]",It,tt,"[\\:\\@\\/\\?]",br),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",It,tt,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",It,tt),"g"),UNRESERVED:new RegExp(It,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",It,Ot),"g"),PCT_ENCODED:new RegExp(fe,"g"),IPV4ADDRESS:new RegExp("^("+Ir+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Sa+")"+i(i("\\%25|\\%(?!"+ce+"{2})")+"("+Un+")")+"?\\]?$")}}var d=c(!1),p=c(!0),g=function(){function G(W,te){var ce=[],fe=!0,qe=!1,tt=void 0;try{for(var Ot=W[Symbol.iterator](),ir;!(fe=(ir=Ot.next()).done)&&(ce.push(ir.value),!(te&&ce.length===te));fe=!0);}catch(br){qe=!0,tt=br}finally{try{!fe&&Ot.return&&Ot.return()}finally{if(qe)throw tt}}return ce}return function(W,te){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return G(W,te);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function(G){if(Array.isArray(G)){for(var W=0,te=Array(G.length);W<G.length;W++)te[W]=G[W];return te}else return Array.from(G)},y=2147483647,b=36,O=1,S=26,w=38,k=700,T=72,C=128,E="-",_=/^xn--/,$=/[^\0-\x7E]/,M=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=b-O,V=Math.floor,X=String.fromCharCode;function D(G){throw new RangeError(j[G])}function F(G,W){for(var te=[],ce=G.length;ce--;)te[ce]=W(G[ce]);return te}function Y(G,W){var te=G.split("@"),ce="";te.length>1&&(ce=te[0]+"@",G=te[1]),G=G.replace(M,".");var fe=G.split("."),qe=F(fe,W).join(".");return ce+qe}function ie(G){for(var W=[],te=0,ce=G.length;te<ce;){var fe=G.charCodeAt(te++);if(fe>=55296&&fe<=56319&&te<ce){var qe=G.charCodeAt(te++);(qe&64512)==56320?W.push(((fe&1023)<<10)+(qe&1023)+65536):(W.push(fe),te--)}else W.push(fe)}return W}var H=function(W){return String.fromCodePoint.apply(String,m(W))},ne=function(W){return W-48<10?W-22:W-65<26?W-65:W-97<26?W-97:b},z=function(W,te){return W+22+75*(W<26)-((te!=0)<<5)},N=function(W,te,ce){var fe=0;for(W=ce?V(W/k):W>>1,W+=V(W/te);W>B*S>>1;fe+=b)W=V(W/B);return V(fe+(B+1)*W/(W+w))},U=function(W){var te=[],ce=W.length,fe=0,qe=C,tt=T,Ot=W.lastIndexOf(E);Ot<0&&(Ot=0);for(var ir=0;ir<Ot;++ir)W.charCodeAt(ir)>=128&&D("not-basic"),te.push(W.charCodeAt(ir));for(var br=Ot>0?Ot+1:0;br<ce;){for(var It=fe,qt=1,Ir=b;;Ir+=b){br>=ce&&D("invalid-input");var vt=ne(W.charCodeAt(br++));(vt>=b||vt>V((y-fe)/qt))&&D("overflow"),fe+=vt*qt;var pr=Ir<=tt?O:Ir>=tt+S?S:Ir-tt;if(vt<pr)break;var ct=b-pr;qt>V(y/ct)&&D("overflow"),qt*=ct}var Qt=te.length+1;tt=N(fe-It,Qt,It==0),V(fe/Qt)>y-qe&&D("overflow"),qe+=V(fe/Qt),fe%=Qt,te.splice(fe++,0,qe)}return String.fromCodePoint.apply(String,te)},J=function(W){var te=[];W=ie(W);var ce=W.length,fe=C,qe=0,tt=T,Ot=!0,ir=!1,br=void 0;try{for(var It=W[Symbol.iterator](),qt;!(Ot=(qt=It.next()).done);Ot=!0){var Ir=qt.value;Ir<128&&te.push(X(Ir))}}catch(As){ir=!0,br=As}finally{try{!Ot&&It.return&&It.return()}finally{if(ir)throw br}}var vt=te.length,pr=vt;for(vt&&te.push(E);pr<ce;){var ct=y,Qt=!0,Dt=!1,xr=void 0;try{for(var Wn=W[Symbol.iterator](),wa;!(Qt=(wa=Wn.next()).done);Qt=!0){var mo=wa.value;mo>=fe&&mo<ct&&(ct=mo)}}catch(As){Dt=!0,xr=As}finally{try{!Qt&&Wn.return&&Wn.return()}finally{if(Dt)throw xr}}var vo=pr+1;ct-fe>V((y-qe)/vo)&&D("overflow"),qe+=(ct-fe)*vo,fe=ct;var Ho=!0,Sa=!1,Un=void 0;try{for(var dd=W[Symbol.iterator](),yo;!(Ho=(yo=dd.next()).done);Ho=!0){var Jb=yo.value;if(Jb<fe&&++qe>y&&D("overflow"),Jb==fe){for(var Wf=qe,Uf=b;;Uf+=b){var Al=Uf<=tt?O:Uf>=tt+S?S:Uf-tt;if(Wf<Al)break;var fd=Wf-Al,Ac=b-Al;te.push(X(z(Al+fd%Ac,0))),Wf=V(fd/Ac)}te.push(X(z(Wf,0))),tt=N(qe,vo,pr==vt),qe=0,++pr}}}catch(As){Sa=!0,Un=As}finally{try{!Ho&&dd.return&&dd.return()}finally{if(Sa)throw Un}}++qe,++fe}return te.join("")},Q=function(W){return Y(W,function(te){return _.test(te)?U(te.slice(4).toLowerCase()):te})},q=function(W){return Y(W,function(te){return $.test(te)?"xn--"+J(te):te})},oe={version:"2.1.0",ucs2:{decode:ie,encode:H},decode:U,encode:J,toASCII:q,toUnicode:Q},Oe={};function Z(G){var W=G.charCodeAt(0),te=void 0;return W<16?te="%0"+W.toString(16).toUpperCase():W<128?te="%"+W.toString(16).toUpperCase():W<2048?te="%"+(W>>6|192).toString(16).toUpperCase()+"%"+(W&63|128).toString(16).toUpperCase():te="%"+(W>>12|224).toString(16).toUpperCase()+"%"+(W>>6&63|128).toString(16).toUpperCase()+"%"+(W&63|128).toString(16).toUpperCase(),te}function le(G){for(var W="",te=0,ce=G.length;te<ce;){var fe=parseInt(G.substr(te+1,2),16);if(fe<128)W+=String.fromCharCode(fe),te+=3;else if(fe>=194&&fe<224){if(ce-te>=6){var qe=parseInt(G.substr(te+4,2),16);W+=String.fromCharCode((fe&31)<<6|qe&63)}else W+=G.substr(te,6);te+=6}else if(fe>=224){if(ce-te>=9){var tt=parseInt(G.substr(te+4,2),16),Ot=parseInt(G.substr(te+7,2),16);W+=String.fromCharCode((fe&15)<<12|(tt&63)<<6|Ot&63)}else W+=G.substr(te,9);te+=9}else W+=G.substr(te,3),te+=3}return W}function Pe(G,W){function te(ce){var fe=le(ce);return fe.match(W.UNRESERVED)?fe:ce}return G.scheme&&(G.scheme=String(G.scheme).replace(W.PCT_ENCODED,te).toLowerCase().replace(W.NOT_SCHEME,"")),G.userinfo!==void 0&&(G.userinfo=String(G.userinfo).replace(W.PCT_ENCODED,te).replace(W.NOT_USERINFO,Z).replace(W.PCT_ENCODED,a)),G.host!==void 0&&(G.host=String(G.host).replace(W.PCT_ENCODED,te).toLowerCase().replace(W.NOT_HOST,Z).replace(W.PCT_ENCODED,a)),G.path!==void 0&&(G.path=String(G.path).replace(W.PCT_ENCODED,te).replace(G.scheme?W.NOT_PATH:W.NOT_PATH_NOSCHEME,Z).replace(W.PCT_ENCODED,a)),G.query!==void 0&&(G.query=String(G.query).replace(W.PCT_ENCODED,te).replace(W.NOT_QUERY,Z).replace(W.PCT_ENCODED,a)),G.fragment!==void 0&&(G.fragment=String(G.fragment).replace(W.PCT_ENCODED,te).replace(W.NOT_FRAGMENT,Z).replace(W.PCT_ENCODED,a)),G}function ee(G){return G.replace(/^0*(.*)/,"$1")||"0"}function re(G,W){var te=G.match(W.IPV4ADDRESS)||[],ce=g(te,2),fe=ce[1];return fe?fe.split(".").map(ee).join("."):G}function ye(G,W){var te=G.match(W.IPV6ADDRESS)||[],ce=g(te,3),fe=ce[1],qe=ce[2];if(fe){for(var tt=fe.toLowerCase().split("::").reverse(),Ot=g(tt,2),ir=Ot[0],br=Ot[1],It=br?br.split(":").map(ee):[],qt=ir.split(":").map(ee),Ir=W.IPV4ADDRESS.test(qt[qt.length-1]),vt=Ir?7:8,pr=qt.length-vt,ct=Array(vt),Qt=0;Qt<vt;++Qt)ct[Qt]=It[Qt]||qt[pr+Qt]||"";Ir&&(ct[vt-1]=re(ct[vt-1],W));var Dt=ct.reduce(function(vo,Ho,Sa){if(!Ho||Ho==="0"){var Un=vo[vo.length-1];Un&&Un.index+Un.length===Sa?Un.length++:vo.push({index:Sa,length:1})}return vo},[]),xr=Dt.sort(function(vo,Ho){return Ho.length-vo.length})[0],Wn=void 0;if(xr&&xr.length>1){var wa=ct.slice(0,xr.index),mo=ct.slice(xr.index+xr.length);Wn=wa.join(":")+"::"+mo.join(":")}else Wn=ct.join(":");return qe&&(Wn+="%"+qe),Wn}else return G}var ke=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Me="".match(/(){0}/)[1]===void 0;function De(G){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te={},ce=W.iri!==!1?p:d;W.reference==="suffix"&&(G=(W.scheme?W.scheme+":":"")+"//"+G);var fe=G.match(ke);if(fe){Me?(te.scheme=fe[1],te.userinfo=fe[3],te.host=fe[4],te.port=parseInt(fe[5],10),te.path=fe[6]||"",te.query=fe[7],te.fragment=fe[8],isNaN(te.port)&&(te.port=fe[5])):(te.scheme=fe[1]||void 0,te.userinfo=G.indexOf("@")!==-1?fe[3]:void 0,te.host=G.indexOf("//")!==-1?fe[4]:void 0,te.port=parseInt(fe[5],10),te.path=fe[6]||"",te.query=G.indexOf("?")!==-1?fe[7]:void 0,te.fragment=G.indexOf("#")!==-1?fe[8]:void 0,isNaN(te.port)&&(te.port=G.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?fe[4]:void 0)),te.host&&(te.host=ye(re(te.host,ce),ce)),te.scheme===void 0&&te.userinfo===void 0&&te.host===void 0&&te.port===void 0&&!te.path&&te.query===void 0?te.reference="same-document":te.scheme===void 0?te.reference="relative":te.fragment===void 0?te.reference="absolute":te.reference="uri",W.reference&&W.reference!=="suffix"&&W.reference!==te.reference&&(te.error=te.error||"URI is not a "+W.reference+" reference.");var qe=Oe[(W.scheme||te.scheme||"").toLowerCase()];if(!W.unicodeSupport&&(!qe||!qe.unicodeSupport)){if(te.host&&(W.domainHost||qe&&qe.domainHost))try{te.host=oe.toASCII(te.host.replace(ce.PCT_ENCODED,le).toLowerCase())}catch(tt){te.error=te.error||"Host's domain name can not be converted to ASCII via punycode: "+tt}Pe(te,d)}else Pe(te,ce);qe&&qe.parse&&qe.parse(te,W)}else te.error=te.error||"URI can not be parsed.";return te}function Vt(G,W){var te=W.iri!==!1?p:d,ce=[];return G.userinfo!==void 0&&(ce.push(G.userinfo),ce.push("@")),G.host!==void 0&&ce.push(ye(re(String(G.host),te),te).replace(te.IPV6ADDRESS,function(fe,qe,tt){return"["+qe+(tt?"%25"+tt:"")+"]"})),(typeof G.port=="number"||typeof G.port=="string")&&(ce.push(":"),ce.push(String(G.port))),ce.length?ce.join(""):void 0}var vr=/^\.\.?\//,yr=/^\/\.(\/|$)/,ur=/^\/\.\.(\/|$)/,or=/^\/?(?:.|\n)*?(?=\/|$)/;function Rr(G){for(var W=[];G.length;)if(G.match(vr))G=G.replace(vr,"");else if(G.match(yr))G=G.replace(yr,"/");else if(G.match(ur))G=G.replace(ur,"/"),W.pop();else if(G==="."||G==="..")G="";else{var te=G.match(or);if(te){var ce=te[0];G=G.slice(ce.length),W.push(ce)}else throw new Error("Unexpected dot segment condition")}return W.join("")}function zt(G){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te=W.iri?p:d,ce=[],fe=Oe[(W.scheme||G.scheme||"").toLowerCase()];if(fe&&fe.serialize&&fe.serialize(G,W),G.host&&!te.IPV6ADDRESS.test(G.host)){if(W.domainHost||fe&&fe.domainHost)try{G.host=W.iri?oe.toUnicode(G.host):oe.toASCII(G.host.replace(te.PCT_ENCODED,le).toLowerCase())}catch(Ot){G.error=G.error||"Host's domain name can not be converted to "+(W.iri?"Unicode":"ASCII")+" via punycode: "+Ot}}Pe(G,te),W.reference!=="suffix"&&G.scheme&&(ce.push(G.scheme),ce.push(":"));var qe=Vt(G,W);if(qe!==void 0&&(W.reference!=="suffix"&&ce.push("//"),ce.push(qe),G.path&&G.path.charAt(0)!=="/"&&ce.push("/")),G.path!==void 0){var tt=G.path;!W.absolutePath&&(!fe||!fe.absolutePath)&&(tt=Rr(tt)),qe===void 0&&(tt=tt.replace(/^\/\//,"/%2F")),ce.push(tt)}return G.query!==void 0&&(ce.push("?"),ce.push(G.query)),G.fragment!==void 0&&(ce.push("#"),ce.push(G.fragment)),ce.join("")}function Tn(G,W){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ce=arguments[3],fe={};return ce||(G=De(zt(G,te),te),W=De(zt(W,te),te)),te=te||{},!te.tolerant&&W.scheme?(fe.scheme=W.scheme,fe.userinfo=W.userinfo,fe.host=W.host,fe.port=W.port,fe.path=Rr(W.path||""),fe.query=W.query):(W.userinfo!==void 0||W.host!==void 0||W.port!==void 0?(fe.userinfo=W.userinfo,fe.host=W.host,fe.port=W.port,fe.path=Rr(W.path||""),fe.query=W.query):(W.path?(W.path.charAt(0)==="/"?fe.path=Rr(W.path):((G.userinfo!==void 0||G.host!==void 0||G.port!==void 0)&&!G.path?fe.path="/"+W.path:G.path?fe.path=G.path.slice(0,G.path.lastIndexOf("/")+1)+W.path:fe.path=W.path,fe.path=Rr(fe.path)),fe.query=W.query):(fe.path=G.path,W.query!==void 0?fe.query=W.query:fe.query=G.query),fe.userinfo=G.userinfo,fe.host=G.host,fe.port=G.port),fe.scheme=G.scheme),fe.fragment=W.fragment,fe}function zn(G,W,te){var ce=l({scheme:"null"},te);return zt(Tn(De(G,ce),De(W,ce),ce,!0),ce)}function $n(G,W){return typeof G=="string"?G=zt(De(G,W),W):o(G)==="object"&&(G=De(zt(G,W),W)),G}function pi(G,W,te){return typeof G=="string"?G=zt(De(G,te),te):o(G)==="object"&&(G=zt(G,te)),typeof W=="string"?W=zt(De(W,te),te):o(W)==="object"&&(W=zt(W,te)),G===W}function io(G,W){return G&&G.toString().replace(!W||!W.iri?d.ESCAPE:p.ESCAPE,Z)}function En(G,W){return G&&G.toString().replace(!W||!W.iri?d.PCT_ENCODED:p.PCT_ENCODED,le)}var Ii={scheme:"http",domainHost:!0,parse:function(W,te){return W.host||(W.error=W.error||"HTTP URIs must have a host."),W},serialize:function(W,te){var ce=String(W.scheme).toLowerCase()==="https";return(W.port===(ce?443:80)||W.port==="")&&(W.port=void 0),W.path||(W.path="/"),W}},qn={scheme:"https",domainHost:Ii.domainHost,parse:Ii.parse,serialize:Ii.serialize};function Rl(G){return typeof G.secure=="boolean"?G.secure:String(G.scheme).toLowerCase()==="wss"}var Ja={scheme:"ws",domainHost:!0,parse:function(W,te){var ce=W;return ce.secure=Rl(ce),ce.resourceName=(ce.path||"/")+(ce.query?"?"+ce.query:""),ce.path=void 0,ce.query=void 0,ce},serialize:function(W,te){if((W.port===(Rl(W)?443:80)||W.port==="")&&(W.port=void 0),typeof W.secure=="boolean"&&(W.scheme=W.secure?"wss":"ws",W.secure=void 0),W.resourceName){var ce=W.resourceName.split("?"),fe=g(ce,2),qe=fe[0],tt=fe[1];W.path=qe&&qe!=="/"?qe:void 0,W.query=tt,W.resourceName=void 0}return W.fragment=void 0,W}},Ic={scheme:"wss",domainHost:Ja.domainHost,parse:Ja.parse,serialize:Ja.serialize},Mg={},Il="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ni="[0-9A-Fa-f]",$c=i(i("%[EFef]"+ni+"%"+ni+ni+"%"+ni+ni)+"|"+i("%[89A-Fa-f]"+ni+"%"+ni+ni)+"|"+i("%"+ni+ni)),$l="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",cd="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",es=n(cd,'[\\"\\\\]'),$s="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",ud=new RegExp(Il,"g"),ts=new RegExp($c,"g"),ue=new RegExp(n("[^]",$l,"[\\.]",'[\\"]',es),"g"),ve=new RegExp(n("[^]",Il,$s),"g"),we=ve;function $e(G){var W=le(G);return W.match(ud)?W:G}var We={scheme:"mailto",parse:function(W,te){var ce=W,fe=ce.to=ce.path?ce.path.split(","):[];if(ce.path=void 0,ce.query){for(var qe=!1,tt={},Ot=ce.query.split("&"),ir=0,br=Ot.length;ir<br;++ir){var It=Ot[ir].split("=");switch(It[0]){case"to":for(var qt=It[1].split(","),Ir=0,vt=qt.length;Ir<vt;++Ir)fe.push(qt[Ir]);break;case"subject":ce.subject=En(It[1],te);break;case"body":ce.body=En(It[1],te);break;default:qe=!0,tt[En(It[0],te)]=En(It[1],te);break}}qe&&(ce.headers=tt)}ce.query=void 0;for(var pr=0,ct=fe.length;pr<ct;++pr){var Qt=fe[pr].split("@");if(Qt[0]=En(Qt[0]),te.unicodeSupport)Qt[1]=En(Qt[1],te).toLowerCase();else try{Qt[1]=oe.toASCII(En(Qt[1],te).toLowerCase())}catch(Dt){ce.error=ce.error||"Email address's domain name can not be converted to ASCII via punycode: "+Dt}fe[pr]=Qt.join("@")}return ce},serialize:function(W,te){var ce=W,fe=s(W.to);if(fe){for(var qe=0,tt=fe.length;qe<tt;++qe){var Ot=String(fe[qe]),ir=Ot.lastIndexOf("@"),br=Ot.slice(0,ir).replace(ts,$e).replace(ts,a).replace(ue,Z),It=Ot.slice(ir+1);try{It=te.iri?oe.toUnicode(It):oe.toASCII(En(It,te).toLowerCase())}catch(pr){ce.error=ce.error||"Email address's domain name can not be converted to "+(te.iri?"Unicode":"ASCII")+" via punycode: "+pr}fe[qe]=br+"@"+It}ce.path=fe.join(",")}var qt=W.headers=W.headers||{};W.subject&&(qt.subject=W.subject),W.body&&(qt.body=W.body);var Ir=[];for(var vt in qt)qt[vt]!==Mg[vt]&&Ir.push(vt.replace(ts,$e).replace(ts,a).replace(ve,Z)+"="+qt[vt].replace(ts,$e).replace(ts,a).replace(we,Z));return Ir.length&&(ce.query=Ir.join("&")),ce}},wt=/^([^\:]+)\:(.*)/,at={scheme:"urn",parse:function(W,te){var ce=W.path&&W.path.match(wt),fe=W;if(ce){var qe=te.scheme||fe.scheme||"urn",tt=ce[1].toLowerCase(),Ot=ce[2],ir=qe+":"+(te.nid||tt),br=Oe[ir];fe.nid=tt,fe.nss=Ot,fe.path=void 0,br&&(fe=br.parse(fe,te))}else fe.error=fe.error||"URN can not be parsed.";return fe},serialize:function(W,te){var ce=te.scheme||W.scheme||"urn",fe=W.nid,qe=ce+":"+(te.nid||fe),tt=Oe[qe];tt&&(W=tt.serialize(W,te));var Ot=W,ir=W.nss;return Ot.path=(fe||te.nid)+":"+ir,Ot}},Ue=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Ct={scheme:"urn:uuid",parse:function(W,te){var ce=W;return ce.uuid=ce.nss,ce.nss=void 0,!te.tolerant&&(!ce.uuid||!ce.uuid.match(Ue))&&(ce.error=ce.error||"UUID is not valid."),ce},serialize:function(W,te){var ce=W;return ce.nss=(W.uuid||"").toLowerCase(),ce}};Oe[Ii.scheme]=Ii,Oe[qn.scheme]=qn,Oe[Ja.scheme]=Ja,Oe[Ic.scheme]=Ic,Oe[We.scheme]=We,Oe[at.scheme]=at,Oe[Ct.scheme]=Ct,r.SCHEMES=Oe,r.pctEncChar=Z,r.pctDecChars=le,r.parse=De,r.removeDotSegments=Rr,r.serialize=zt,r.resolveComponents=Tn,r.resolve=zn,r.normalize=$n,r.equal=pi,r.escapeComponent=io,r.unescapeComponent=En,Object.defineProperty(r,"__esModule",{value:!0})})}(pv,pv.exports)),pv.exports}var oB;function QVe(){if(oB)return ow;oB=1,Object.defineProperty(ow,"__esModule",{value:!0});const t=LVe();return t.code='require("ajv/dist/runtime/uri").default',ow.default=t,ow}var aB;function VVe(){return aB||(aB=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=WP();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Bt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=SM(),i=UP(),o=SJ(),a=HP(),s=Bt(),l=qP(),c=lx(),d=nr(),p=jVe,g=QVe(),m=(z,N)=>new RegExp(z,N);m.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),O={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},S={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},w=200;function k(z){var N,U,J,Q,q,oe,Oe,Z,le,Pe,ee,re,ye,ke,Me,De,Vt,vr,yr,ur,or,Rr,zt,Tn,zn;const $n=z.strict,pi=(N=z.code)===null||N===void 0?void 0:N.optimize,io=pi===!0||pi===void 0?1:pi||0,En=(J=(U=z.code)===null||U===void 0?void 0:U.regExp)!==null&&J!==void 0?J:m,Ii=(Q=z.uriResolver)!==null&&Q!==void 0?Q:g.default;return{strictSchema:(oe=(q=z.strictSchema)!==null&&q!==void 0?q:$n)!==null&&oe!==void 0?oe:!0,strictNumbers:(Z=(Oe=z.strictNumbers)!==null&&Oe!==void 0?Oe:$n)!==null&&Z!==void 0?Z:!0,strictTypes:(Pe=(le=z.strictTypes)!==null&&le!==void 0?le:$n)!==null&&Pe!==void 0?Pe:"log",strictTuples:(re=(ee=z.strictTuples)!==null&&ee!==void 0?ee:$n)!==null&&re!==void 0?re:"log",strictRequired:(ke=(ye=z.strictRequired)!==null&&ye!==void 0?ye:$n)!==null&&ke!==void 0?ke:!1,code:z.code?{...z.code,optimize:io,regExp:En}:{optimize:io,regExp:En},loopRequired:(Me=z.loopRequired)!==null&&Me!==void 0?Me:w,loopEnum:(De=z.loopEnum)!==null&&De!==void 0?De:w,meta:(Vt=z.meta)!==null&&Vt!==void 0?Vt:!0,messages:(vr=z.messages)!==null&&vr!==void 0?vr:!0,inlineRefs:(yr=z.inlineRefs)!==null&&yr!==void 0?yr:!0,schemaId:(ur=z.schemaId)!==null&&ur!==void 0?ur:"$id",addUsedSchema:(or=z.addUsedSchema)!==null&&or!==void 0?or:!0,validateSchema:(Rr=z.validateSchema)!==null&&Rr!==void 0?Rr:!0,validateFormats:(zt=z.validateFormats)!==null&&zt!==void 0?zt:!0,unicodeRegExp:(Tn=z.unicodeRegExp)!==null&&Tn!==void 0?Tn:!0,int32range:(zn=z.int32range)!==null&&zn!==void 0?zn:!0,uriResolver:Ii}}class T{constructor(N={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,N=this.opts={...N,...k(N)};const{es5:U,lines:J}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:b,es5:U,lines:J}),this.logger=V(N.logger);const Q=N.validateFormats;N.validateFormats=!1,this.RULES=(0,o.getRules)(),C.call(this,O,N,"NOT SUPPORTED"),C.call(this,S,N,"DEPRECATED","warn"),this._metaOpts=j.call(this),N.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),N.keywords&&M.call(this,N.keywords),typeof N.meta=="object"&&this.addMetaSchema(N.meta),_.call(this),N.validateFormats=Q}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:N,meta:U,schemaId:J}=this.opts;let Q=p;J==="id"&&(Q={...p},Q.id=Q.$id,delete Q.$id),U&&N&&this.addMetaSchema(Q,Q[J],!1)}defaultMeta(){const{meta:N,schemaId:U}=this.opts;return this.opts.defaultMeta=typeof N=="object"?N[U]||N:void 0}validate(N,U){let J;if(typeof N=="string"){if(J=this.getSchema(N),!J)throw new Error(`no schema with key or ref "${N}"`)}else J=this.compile(N);const Q=J(U);return"$async"in J||(this.errors=J.errors),Q}compile(N,U){const J=this._addSchema(N,U);return J.validate||this._compileSchemaEnv(J)}compileAsync(N,U){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:J}=this.opts;return Q.call(this,N,U);async function Q(Pe,ee){await q.call(this,Pe.$schema);const re=this._addSchema(Pe,ee);return re.validate||oe.call(this,re)}async function q(Pe){Pe&&!this.getSchema(Pe)&&await Q.call(this,{$ref:Pe},!0)}async function oe(Pe){try{return this._compileSchemaEnv(Pe)}catch(ee){if(!(ee instanceof i.default))throw ee;return Oe.call(this,ee),await Z.call(this,ee.missingSchema),oe.call(this,Pe)}}function Oe({missingSchema:Pe,missingRef:ee}){if(this.refs[Pe])throw new Error(`AnySchema ${Pe} is loaded but ${ee} cannot be resolved`)}async function Z(Pe){const ee=await le.call(this,Pe);this.refs[Pe]||await q.call(this,ee.$schema),this.refs[Pe]||this.addSchema(ee,Pe,U)}async function le(Pe){const ee=this._loading[Pe];if(ee)return ee;try{return await(this._loading[Pe]=J(Pe))}finally{delete this._loading[Pe]}}}addSchema(N,U,J,Q=this.opts.validateSchema){if(Array.isArray(N)){for(const oe of N)this.addSchema(oe,void 0,J,Q);return this}let q;if(typeof N=="object"){const{schemaId:oe}=this.opts;if(q=N[oe],q!==void 0&&typeof q!="string")throw new Error(`schema ${oe} must be string`)}return U=(0,l.normalizeId)(U||q),this._checkUnique(U),this.schemas[U]=this._addSchema(N,J,U,Q,!0),this}addMetaSchema(N,U,J=this.opts.validateSchema){return this.addSchema(N,U,!0,J),this}validateSchema(N,U){if(typeof N=="boolean")return!0;let J;if(J=N.$schema,J!==void 0&&typeof J!="string")throw new Error("$schema must be a string");if(J=J||this.opts.defaultMeta||this.defaultMeta(),!J)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const Q=this.validate(J,N);if(!Q&&U){const q="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(q);else throw new Error(q)}return Q}getSchema(N){let U;for(;typeof(U=E.call(this,N))=="string";)N=U;if(U===void 0){const{schemaId:J}=this.opts,Q=new a.SchemaEnv({schema:{},schemaId:J});if(U=a.resolveSchema.call(this,Q,N),!U)return;this.refs[N]=U}return U.validate||this._compileSchemaEnv(U)}removeSchema(N){if(N instanceof RegExp)return this._removeAllSchemas(this.schemas,N),this._removeAllSchemas(this.refs,N),this;switch(typeof N){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const U=E.call(this,N);return typeof U=="object"&&this._cache.delete(U.schema),delete this.schemas[N],delete this.refs[N],this}case"object":{const U=N;this._cache.delete(U);let J=N[this.opts.schemaId];return J&&(J=(0,l.normalizeId)(J),delete this.schemas[J],delete this.refs[J]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(N){for(const U of N)this.addKeyword(U);return this}addKeyword(N,U){let J;if(typeof N=="string")J=N,typeof U=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),U.keyword=J);else if(typeof N=="object"&&U===void 0){if(U=N,J=U.keyword,Array.isArray(J)&&!J.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(D.call(this,J,U),!U)return(0,d.eachItem)(J,q=>F.call(this,q)),this;ie.call(this,U);const Q={...U,type:(0,c.getJSONTypes)(U.type),schemaType:(0,c.getJSONTypes)(U.schemaType)};return(0,d.eachItem)(J,Q.type.length===0?q=>F.call(this,q,Q):q=>Q.type.forEach(oe=>F.call(this,q,Q,oe))),this}getKeyword(N){const U=this.RULES.all[N];return typeof U=="object"?U.definition:!!U}removeKeyword(N){const{RULES:U}=this;delete U.keywords[N],delete U.all[N];for(const J of U.rules){const Q=J.rules.findIndex(q=>q.keyword===N);Q>=0&&J.rules.splice(Q,1)}return this}addFormat(N,U){return typeof U=="string"&&(U=new RegExp(U)),this.formats[N]=U,this}errorsText(N=this.errors,{separator:U=", ",dataVar:J="data"}={}){return!N||N.length===0?"No errors":N.map(Q=>`${J}${Q.instancePath} ${Q.message}`).reduce((Q,q)=>Q+U+q)}$dataMetaSchema(N,U){const J=this.RULES.all;N=JSON.parse(JSON.stringify(N));for(const Q of U){const q=Q.split("/").slice(1);let oe=N;for(const Oe of q)oe=oe[Oe];for(const Oe in J){const Z=J[Oe];if(typeof Z!="object")continue;const{$data:le}=Z.definition,Pe=oe[Oe];le&&Pe&&(oe[Oe]=ne(Pe))}}return N}_removeAllSchemas(N,U){for(const J in N){const Q=N[J];(!U||U.test(J))&&(typeof Q=="string"?delete N[J]:Q&&!Q.meta&&(this._cache.delete(Q.schema),delete N[J]))}}_addSchema(N,U,J,Q=this.opts.validateSchema,q=this.opts.addUsedSchema){let oe;const{schemaId:Oe}=this.opts;if(typeof N=="object")oe=N[Oe];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof N!="boolean")throw new Error("schema must be object or boolean")}let Z=this._cache.get(N);if(Z!==void 0)return Z;J=(0,l.normalizeId)(oe||J);const le=l.getSchemaRefs.call(this,N,J);return Z=new a.SchemaEnv({schema:N,schemaId:Oe,meta:U,baseId:J,localRefs:le}),this._cache.set(Z.schema,Z),q&&!J.startsWith("#")&&(J&&this._checkUnique(J),this.refs[J]=Z),Q&&this.validateSchema(N,!0),Z}_checkUnique(N){if(this.schemas[N]||this.refs[N])throw new Error(`schema with key or id "${N}" already exists`)}_compileSchemaEnv(N){if(N.meta?this._compileMetaSchema(N):a.compileSchema.call(this,N),!N.validate)throw new Error("ajv implementation error");return N.validate}_compileMetaSchema(N){const U=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,N)}finally{this.opts=U}}}T.ValidationError=n.default,T.MissingRefError=i.default,t.default=T;function C(z,N,U,J="error"){for(const Q in z){const q=Q;q in N&&this.logger[J](`${U}: option ${Q}. ${z[q]}`)}}function E(z){return z=(0,l.normalizeId)(z),this.schemas[z]||this.refs[z]}function _(){const z=this.opts.schemas;if(z)if(Array.isArray(z))this.addSchema(z);else for(const N in z)this.addSchema(z[N],N)}function $(){for(const z in this.opts.formats){const N=this.opts.formats[z];N&&this.addFormat(z,N)}}function M(z){if(Array.isArray(z)){this.addVocabulary(z);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const N in z){const U=z[N];U.keyword||(U.keyword=N),this.addKeyword(U)}}function j(){const z={...this.opts};for(const N of y)delete z[N];return z}const B={log(){},warn(){},error(){}};function V(z){if(z===!1)return B;if(z===void 0)return console;if(z.log&&z.warn&&z.error)return z;throw new Error("logger must implement log, warn and error methods")}const X=/^[a-z_$][a-z0-9_$:-]*$/i;function D(z,N){const{RULES:U}=this;if((0,d.eachItem)(z,J=>{if(U.keywords[J])throw new Error(`Keyword ${J} is already defined`);if(!X.test(J))throw new Error(`Keyword ${J} has invalid name`)}),!!N&&N.$data&&!("code"in N||"validate"in N))throw new Error('$data keyword must have "code" or "validate" function')}function F(z,N,U){var J;const Q=N==null?void 0:N.post;if(U&&Q)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:q}=this;let oe=Q?q.post:q.rules.find(({type:Z})=>Z===U);if(oe||(oe={type:U,rules:[]},q.rules.push(oe)),q.keywords[z]=!0,!N)return;const Oe={keyword:z,definition:{...N,type:(0,c.getJSONTypes)(N.type),schemaType:(0,c.getJSONTypes)(N.schemaType)}};N.before?Y.call(this,oe,Oe,N.before):oe.rules.push(Oe),q.all[z]=Oe,(J=N.implements)===null||J===void 0||J.forEach(Z=>this.addKeyword(Z))}function Y(z,N,U){const J=z.rules.findIndex(Q=>Q.keyword===U);J>=0?z.rules.splice(J,0,N):(z.rules.push(N),this.logger.warn(`rule ${U} is not defined`))}function ie(z){let{metaSchema:N}=z;N!==void 0&&(z.$data&&this.opts.$data&&(N=ne(N)),z.validateSchema=this.compile(N,!0))}const H={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ne(z){return{anyOf:[z,H]}}}(QE)),QE}var aw={},sw={},lw={},sB;function FVe(){if(sB)return lw;sB=1,Object.defineProperty(lw,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return lw.default=t,lw}var eu={},lB;function xM(){if(lB)return eu;lB=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.callRef=eu.getValidate=void 0;const t=UP(),e=Is(),r=Bt(),n=Rs(),i=HP(),o=nr(),a={keyword:"$ref",schemaType:"string",code(c){const{gen:d,schema:p,it:g}=c,{baseId:m,schemaEnv:y,validateName:b,opts:O,self:S}=g,{root:w}=y;if((p==="#"||p==="#/")&&m===w.baseId)return T();const k=i.resolveRef.call(S,w,m,p);if(k===void 0)throw new t.default(g.opts.uriResolver,m,p);if(k instanceof i.SchemaEnv)return C(k);return E(k);function T(){if(y===w)return l(c,b,y,y.$async);const _=d.scopeValue("root",{ref:w});return l(c,(0,r._)`${_}.validate`,w,w.$async)}function C(_){const $=s(c,_);l(c,$,_,_.$async)}function E(_){const $=d.scopeValue("schema",O.code.source===!0?{ref:_,code:(0,r.stringify)(_)}:{ref:_}),M=d.name("valid"),j=c.subschema({schema:_,dataTypes:[],schemaPath:r.nil,topSchemaRef:$,errSchemaPath:p},M);c.mergeEvaluated(j),c.ok(M)}}};function s(c,d){const{gen:p}=c;return d.validate?p.scopeValue("validate",{ref:d.validate}):(0,r._)`${p.scopeValue("wrapper",{ref:d})}.validate`}eu.getValidate=s;function l(c,d,p,g){const{gen:m,it:y}=c,{allErrors:b,schemaEnv:O,opts:S}=y,w=S.passContext?n.default.this:r.nil;g?k():T();function k(){if(!O.$async)throw new Error("async schema referenced by sync schema");const _=m.let("valid");m.try(()=>{m.code((0,r._)`await ${(0,e.callValidateCode)(c,d,w)}`),E(d),b||m.assign(_,!0)},$=>{m.if((0,r._)`!(${$} instanceof ${y.ValidationError})`,()=>m.throw($)),C($),b||m.assign(_,!1)}),c.ok(_)}function T(){c.result((0,e.callValidateCode)(c,d,w),()=>E(d),()=>C(d))}function C(_){const $=(0,r._)`${_}.errors`;m.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${$} : ${n.default.vErrors}.concat(${$})`),m.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function E(_){var $;if(!y.opts.unevaluated)return;const M=($=p==null?void 0:p.validate)===null||$===void 0?void 0:$.evaluated;if(y.props!==!0)if(M&&!M.dynamicProps)M.props!==void 0&&(y.props=o.mergeEvaluated.props(m,M.props,y.props));else{const j=m.var("props",(0,r._)`${_}.evaluated.props`);y.props=o.mergeEvaluated.props(m,j,y.props,r.Name)}if(y.items!==!0)if(M&&!M.dynamicItems)M.items!==void 0&&(y.items=o.mergeEvaluated.items(m,M.items,y.items));else{const j=m.var("items",(0,r._)`${_}.evaluated.items`);y.items=o.mergeEvaluated.items(m,j,y.items,r.Name)}}}return eu.callRef=l,eu.default=a,eu}var cB;function BVe(){if(cB)return sw;cB=1,Object.defineProperty(sw,"__esModule",{value:!0});const t=FVe(),e=xM(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return sw.default=r,sw}var cw={},uw={},uB;function zVe(){if(uB)return uw;uB=1,Object.defineProperty(uw,"__esModule",{value:!0});const t=Bt(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:o,schemaCode:a})=>(0,t.str)`must be ${r[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,t._)`{comparison: ${r[o].okStr}, limit: ${a}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:a,data:s,schemaCode:l}=o;o.fail$data((0,t._)`${s} ${r[a].fail} ${l} || isNaN(${s})`)}};return uw.default=i,uw}var dw={},dB;function qVe(){if(dB)return dw;dB=1,Object.defineProperty(dw,"__esModule",{value:!0});const t=Bt(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:o,schemaCode:a,it:s}=n,l=s.opts.multipleOfPrecision,c=i.let("res"),d=l?(0,t._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${l}`:(0,t._)`${c} !== parseInt(${c})`;n.fail$data((0,t._)`(${a} === 0 || (${c} = ${o}/${a}, ${d}))`)}};return dw.default=r,dw}var fw={},hw={},fB;function WVe(){if(fB)return hw;fB=1,Object.defineProperty(hw,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,i=0,o;for(;i<r;)n++,o=e.charCodeAt(i++),o>=55296&&o<=56319&&i<r&&(o=e.charCodeAt(i),(o&64512)===56320&&i++);return n}return hw.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',hw}var hB;function UVe(){if(hB)return fw;hB=1,Object.defineProperty(fw,"__esModule",{value:!0});const t=Bt(),e=nr(),r=WVe(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){const s=o==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${a} characters`},params:({schemaCode:o})=>(0,t._)`{limit: ${o}}`},code(o){const{keyword:a,data:s,schemaCode:l,it:c}=o,d=a==="maxLength"?t.operators.GT:t.operators.LT,p=c.opts.unicode===!1?(0,t._)`${s}.length`:(0,t._)`${(0,e.useFunc)(o.gen,r.default)}(${s})`;o.fail$data((0,t._)`${p} ${d} ${l}`)}};return fw.default=i,fw}var pw={},pB;function HVe(){if(pB)return pw;pB=1,Object.defineProperty(pw,"__esModule",{value:!0});const t=Is(),e=Bt(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,e._)`{pattern: ${i}}`},code(i){const{data:o,$data:a,schema:s,schemaCode:l,it:c}=i,d=c.opts.unicodeRegExp?"u":"",p=a?(0,e._)`(new RegExp(${l}, ${d}))`:(0,t.usePattern)(i,s);i.fail$data((0,e._)`!${p}.test(${o})`)}};return pw.default=n,pw}var gw={},gB;function XVe(){if(gB)return gw;gB=1,Object.defineProperty(gw,"__esModule",{value:!0});const t=Bt(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${i} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:a}=n,s=i==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${o}).length ${s} ${a}`)}};return gw.default=r,gw}var mw={},mB;function ZVe(){if(mB)return mw;mB=1,Object.defineProperty(mw,"__esModule",{value:!0});const t=Is(),e=Bt(),r=nr(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,e.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,e._)`{missingProperty: ${o}}`},code(o){const{gen:a,schema:s,schemaCode:l,data:c,$data:d,it:p}=o,{opts:g}=p;if(!d&&s.length===0)return;const m=s.length>=g.loopRequired;if(p.allErrors?y():b(),g.strictRequired){const w=o.parentSchema.properties,{definedProperties:k}=o.it;for(const T of s)if((w==null?void 0:w[T])===void 0&&!k.has(T)){const C=p.schemaEnv.baseId+p.errSchemaPath,E=`required property "${T}" is not defined at "${C}" (strictRequired)`;(0,r.checkStrictMode)(p,E,p.opts.strictRequired)}}function y(){if(m||d)o.block$data(e.nil,O);else for(const w of s)(0,t.checkReportMissingProp)(o,w)}function b(){const w=a.let("missing");if(m||d){const k=a.let("valid",!0);o.block$data(k,()=>S(w,k)),o.ok(k)}else a.if((0,t.checkMissingProp)(o,s,w)),(0,t.reportMissingProp)(o,w),a.else()}function O(){a.forOf("prop",l,w=>{o.setParams({missingProperty:w}),a.if((0,t.noPropertyInData)(a,c,w,g.ownProperties),()=>o.error())})}function S(w,k){o.setParams({missingProperty:w}),a.forOf(w,l,()=>{a.assign(k,(0,t.propertyInData)(a,c,w,g.ownProperties)),a.if((0,e.not)(k),()=>{o.error(),a.break()})},e.nil)}}};return mw.default=i,mw}var vw={},vB;function GVe(){if(vB)return vw;vB=1,Object.defineProperty(vw,"__esModule",{value:!0});const t=Bt(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${i} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:a}=n,s=i==="maxItems"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`${o}.length ${s} ${a}`)}};return vw.default=r,vw}var yw={},bw={},yB;function PM(){if(yB)return bw;yB=1,Object.defineProperty(bw,"__esModule",{value:!0});const t=PJ();return t.code='require("ajv/dist/runtime/equal").default',bw.default=t,bw}var bB;function YVe(){if(bB)return yw;bB=1,Object.defineProperty(yw,"__esModule",{value:!0});const t=lx(),e=Bt(),r=nr(),n=PM(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:s}})=>(0,e.str)`must NOT have duplicate items (items ## ${s} and ${a} are identical)`,params:({params:{i:a,j:s}})=>(0,e._)`{i: ${a}, j: ${s}}`},code(a){const{gen:s,data:l,$data:c,schema:d,parentSchema:p,schemaCode:g,it:m}=a;if(!c&&!d)return;const y=s.let("valid"),b=p.items?(0,t.getSchemaTypes)(p.items):[];a.block$data(y,O,(0,e._)`${g} === false`),a.ok(y);function O(){const T=s.let("i",(0,e._)`${l}.length`),C=s.let("j");a.setParams({i:T,j:C}),s.assign(y,!0),s.if((0,e._)`${T} > 1`,()=>(S()?w:k)(T,C))}function S(){return b.length>0&&!b.some(T=>T==="object"||T==="array")}function w(T,C){const E=s.name("item"),_=(0,t.checkDataTypes)(b,E,m.opts.strictNumbers,t.DataType.Wrong),$=s.const("indices",(0,e._)`{}`);s.for((0,e._)`;${T}--;`,()=>{s.let(E,(0,e._)`${l}[${T}]`),s.if(_,(0,e._)`continue`),b.length>1&&s.if((0,e._)`typeof ${E} == "string"`,(0,e._)`${E} += "_"`),s.if((0,e._)`typeof ${$}[${E}] == "number"`,()=>{s.assign(C,(0,e._)`${$}[${E}]`),a.error(),s.assign(y,!1).break()}).code((0,e._)`${$}[${E}] = ${T}`)})}function k(T,C){const E=(0,r.useFunc)(s,n.default),_=s.name("outer");s.label(_).for((0,e._)`;${T}--;`,()=>s.for((0,e._)`${C} = ${T}; ${C}--;`,()=>s.if((0,e._)`${E}(${l}[${T}], ${l}[${C}])`,()=>{a.error(),s.assign(y,!1).break(_)})))}}};return yw.default=o,yw}var Ow={},OB;function KVe(){if(OB)return Ow;OB=1,Object.defineProperty(Ow,"__esModule",{value:!0});const t=Bt(),e=nr(),r=PM(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,t._)`{allowedValue: ${o}}`},code(o){const{gen:a,data:s,$data:l,schemaCode:c,schema:d}=o;l||d&&typeof d=="object"?o.fail$data((0,t._)`!${(0,e.useFunc)(a,r.default)}(${s}, ${c})`):o.fail((0,t._)`${d} !== ${s}`)}};return Ow.default=i,Ow}var ww={},wB;function JVe(){if(wB)return ww;wB=1,Object.defineProperty(ww,"__esModule",{value:!0});const t=Bt(),e=nr(),r=PM(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,t._)`{allowedValues: ${o}}`},code(o){const{gen:a,data:s,$data:l,schema:c,schemaCode:d,it:p}=o;if(!l&&c.length===0)throw new Error("enum must have non-empty array");const g=c.length>=p.opts.loopEnum;let m;const y=()=>m??(m=(0,e.useFunc)(a,r.default));let b;if(g||l)b=a.let("valid"),o.block$data(b,O);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const w=a.const("vSchema",d);b=(0,t.or)(...c.map((k,T)=>S(w,T)))}o.pass(b);function O(){a.assign(b,!1),a.forOf("v",d,w=>a.if((0,t._)`${y()}(${s}, ${w})`,()=>a.assign(b,!0).break()))}function S(w,k){const T=c[k];return typeof T=="object"&&T!==null?(0,t._)`${y()}(${s}, ${w}[${k}])`:(0,t._)`${s} === ${T}`}}};return ww.default=i,ww}var SB;function eFe(){if(SB)return cw;SB=1,Object.defineProperty(cw,"__esModule",{value:!0});const t=zVe(),e=qVe(),r=UVe(),n=HVe(),i=XVe(),o=ZVe(),a=GVe(),s=YVe(),l=KVe(),c=JVe(),d=[t.default,e.default,r.default,n.default,i.default,o.default,a.default,s.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,c.default];return cw.default=d,cw}var Sw={},_h={},xB;function kJ(){if(xB)return _h;xB=1,Object.defineProperty(_h,"__esModule",{value:!0}),_h.validateAdditionalItems=void 0;const t=Bt(),e=nr(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{parentSchema:a,it:s}=o,{items:l}=a;if(!Array.isArray(l)){(0,e.checkStrictMode)(s,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(o,l)}};function i(o,a){const{gen:s,schema:l,data:c,keyword:d,it:p}=o;p.items=!0;const g=s.const("len",(0,t._)`${c}.length`);if(l===!1)o.setParams({len:a.length}),o.pass((0,t._)`${g} <= ${a.length}`);else if(typeof l=="object"&&!(0,e.alwaysValidSchema)(p,l)){const y=s.var("valid",(0,t._)`${g} <= ${a.length}`);s.if((0,t.not)(y),()=>m(y)),o.ok(y)}function m(y){s.forRange("i",a.length,g,b=>{o.subschema({keyword:d,dataProp:b,dataPropType:e.Type.Num},y),p.allErrors||s.if((0,t.not)(y),()=>s.break())})}}return _h.validateAdditionalItems=i,_h.default=n,_h}var xw={},Rh={},PB;function CJ(){if(PB)return Rh;PB=1,Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.validateTuple=void 0;const t=Bt(),e=nr(),r=Is(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:a,it:s}=o;if(Array.isArray(a))return i(o,"additionalItems",a);s.items=!0,!(0,e.alwaysValidSchema)(s,a)&&o.ok((0,r.validateArray)(o))}};function i(o,a,s=o.schema){const{gen:l,parentSchema:c,data:d,keyword:p,it:g}=o;b(c),g.opts.unevaluated&&s.length&&g.items!==!0&&(g.items=e.mergeEvaluated.items(l,s.length,g.items));const m=l.name("valid"),y=l.const("len",(0,t._)`${d}.length`);s.forEach((O,S)=>{(0,e.alwaysValidSchema)(g,O)||(l.if((0,t._)`${y} > ${S}`,()=>o.subschema({keyword:p,schemaProp:S,dataProp:S},m)),o.ok(m))});function b(O){const{opts:S,errSchemaPath:w}=g,k=s.length,T=k===O.minItems&&(k===O.maxItems||O[a]===!1);if(S.strictTuples&&!T){const C=`"${p}" is ${k}-tuple, but minItems or maxItems/${a} are not specified or different at path "${w}"`;(0,e.checkStrictMode)(g,C,S.strictTuples)}}}return Rh.validateTuple=i,Rh.default=n,Rh}var kB;function tFe(){if(kB)return xw;kB=1,Object.defineProperty(xw,"__esModule",{value:!0});const t=CJ(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return xw.default=e,xw}var Pw={},CB;function rFe(){if(CB)return Pw;CB=1,Object.defineProperty(Pw,"__esModule",{value:!0});const t=Bt(),e=nr(),r=Is(),n=kJ(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,t.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,t._)`{limit: ${a}}`},code(a){const{schema:s,parentSchema:l,it:c}=a,{prefixItems:d}=l;c.items=!0,!(0,e.alwaysValidSchema)(c,s)&&(d?(0,n.validateAdditionalItems)(a,d):a.ok((0,r.validateArray)(a)))}};return Pw.default=o,Pw}var kw={},TB;function nFe(){if(TB)return kw;TB=1,Object.defineProperty(kw,"__esModule",{value:!0});const t=Bt(),e=nr(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:o}})=>o===void 0?(0,t.str)`must contain at least ${i} valid item(s)`:(0,t.str)`must contain at least ${i} and no more than ${o} valid item(s)`,params:({params:{min:i,max:o}})=>o===void 0?(0,t._)`{minContains: ${i}}`:(0,t._)`{minContains: ${i}, maxContains: ${o}}`},code(i){const{gen:o,schema:a,parentSchema:s,data:l,it:c}=i;let d,p;const{minContains:g,maxContains:m}=s;c.opts.next?(d=g===void 0?1:g,p=m):d=1;const y=o.const("len",(0,t._)`${l}.length`);if(i.setParams({min:d,max:p}),p===void 0&&d===0){(0,e.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&d>p){(0,e.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,e.alwaysValidSchema)(c,a)){let k=(0,t._)`${y} >= ${d}`;p!==void 0&&(k=(0,t._)`${k} && ${y} <= ${p}`),i.pass(k);return}c.items=!0;const b=o.name("valid");p===void 0&&d===1?S(b,()=>o.if(b,()=>o.break())):d===0?(o.let(b,!0),p!==void 0&&o.if((0,t._)`${l}.length > 0`,O)):(o.let(b,!1),O()),i.result(b,()=>i.reset());function O(){const k=o.name("_valid"),T=o.let("count",0);S(k,()=>o.if(k,()=>w(T)))}function S(k,T){o.forRange("i",0,y,C=>{i.subschema({keyword:"contains",dataProp:C,dataPropType:e.Type.Num,compositeRule:!0},k),T()})}function w(k){o.code((0,t._)`${k}++`),p===void 0?o.if((0,t._)`${k} >= ${d}`,()=>o.assign(b,!0).break()):(o.if((0,t._)`${k} > ${p}`,()=>o.assign(b,!1).break()),d===1?o.assign(b,!0):o.if((0,t._)`${k} >= ${d}`,()=>o.assign(b,!0)))}}};return kw.default=n,kw}var UE={},EB;function kM(){return EB||(EB=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=Bt(),r=nr(),n=Is();t.error={message:({params:{property:l,depsCount:c,deps:d}})=>{const p=c===1?"property":"properties";return(0,e.str)`must have ${p} ${d} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:d,missingProperty:p}})=>(0,e._)`{property: ${l},
|
|
1105
|
+
|| ${$} === "boolean" || ${E} === null`).assign(M,(0,n._)`[${E}]`)}}}function g({gen:w,parentData:k,parentDataProperty:T},C){w.if((0,n._)`${k} !== undefined`,()=>w.assign((0,n._)`${k}[${T}]`,C))}function m(w,k,T,C=o.Correct){const E=C===o.Correct?n.operators.EQ:n.operators.NEQ;let _;switch(w){case"null":return(0,n._)`${k} ${E} null`;case"array":_=(0,n._)`Array.isArray(${k})`;break;case"object":_=(0,n._)`${k} && typeof ${k} == "object" && !Array.isArray(${k})`;break;case"integer":_=$((0,n._)`!(${k} % 1) && !isNaN(${k})`);break;case"number":_=$();break;default:return(0,n._)`typeof ${k} ${E} ${w}`}return C===o.Correct?_:(0,n.not)(_);function $(M=n.nil){return(0,n.and)((0,n._)`typeof ${k} == "number"`,M,T?(0,n._)`isFinite(${k})`:n.nil)}}Ni.checkDataType=m;function y(w,k,T,C){if(w.length===1)return m(w[0],k,T,C);let E;const _=(0,i.toHash)(w);if(_.array&&_.object){const $=(0,n._)`typeof ${k} != "object"`;E=_.null?$:(0,n._)`!${k} || ${$}`,delete _.null,delete _.array,delete _.object}else E=n.nil;_.number&&delete _.integer;for(const $ in _)E=(0,n.and)(E,m($,k,T,C));return E}Ni.checkDataTypes=y;const b={message:({schema:w})=>`must be ${w}`,params:({schema:w,schemaValue:k})=>typeof w=="string"?(0,n._)`{type: ${w}}`:(0,n._)`{type: ${k}}`};function O(w){const k=S(w);(0,r.reportError)(k,b)}Ni.reportTypeError=O;function S(w){const{gen:k,data:T,schema:C}=w,E=(0,i.schemaRefOrVal)(w,C,"type");return{gen:k,keyword:"type",data:T,schema:C.type,schemaCode:E,schemaValue:E,parentSchema:C,params:{},it:w}}return Ni}var Xm={},H3;function CVe(){if(H3)return Xm;H3=1,Object.defineProperty(Xm,"__esModule",{value:!0}),Xm.assignDefaults=void 0;const t=Bt(),e=nr();function r(i,o){const{properties:a,items:s}=i.schema;if(o==="object"&&a)for(const l in a)n(i,l,a[l].default);else o==="array"&&Array.isArray(s)&&s.forEach((l,c)=>n(i,c,l.default))}Xm.assignDefaults=r;function n(i,o,a){const{gen:s,compositeRule:l,data:c,opts:d}=i;if(a===void 0)return;const p=(0,t._)`${c}${(0,t.getProperty)(o)}`;if(l){(0,e.checkStrictMode)(i,`default is ignored for: ${p}`);return}let g=(0,t._)`${p} === undefined`;d.useDefaults==="empty"&&(g=(0,t._)`${g} || ${p} === null || ${p} === ""`),s.if(g,(0,t._)`${p} = ${(0,t.stringify)(a)}`)}return Xm}var cs={},Ar={},X3;function Is(){if(X3)return Ar;X3=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.validateUnion=Ar.validateArray=Ar.usePattern=Ar.callValidateCode=Ar.schemaProperties=Ar.allSchemaProperties=Ar.noPropertyInData=Ar.propertyInData=Ar.isOwnProperty=Ar.hasPropFunc=Ar.reportMissingProp=Ar.checkMissingProp=Ar.checkReportMissingProp=void 0;const t=Bt(),e=nr(),r=Rs(),n=nr();function i(w,k){const{gen:T,data:C,it:E}=w;T.if(d(T,C,k,E.opts.ownProperties),()=>{w.setParams({missingProperty:(0,t._)`${k}`},!0),w.error()})}Ar.checkReportMissingProp=i;function o({gen:w,data:k,it:{opts:T}},C,E){return(0,t.or)(...C.map(_=>(0,t.and)(d(w,k,_,T.ownProperties),(0,t._)`${E} = ${_}`)))}Ar.checkMissingProp=o;function a(w,k){w.setParams({missingProperty:k},!0),w.error()}Ar.reportMissingProp=a;function s(w){return w.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}Ar.hasPropFunc=s;function l(w,k,T){return(0,t._)`${s(w)}.call(${k}, ${T})`}Ar.isOwnProperty=l;function c(w,k,T,C){const E=(0,t._)`${k}${(0,t.getProperty)(T)} !== undefined`;return C?(0,t._)`${E} && ${l(w,k,T)}`:E}Ar.propertyInData=c;function d(w,k,T,C){const E=(0,t._)`${k}${(0,t.getProperty)(T)} === undefined`;return C?(0,t.or)(E,(0,t.not)(l(w,k,T))):E}Ar.noPropertyInData=d;function p(w){return w?Object.keys(w).filter(k=>k!=="__proto__"):[]}Ar.allSchemaProperties=p;function g(w,k){return p(k).filter(T=>!(0,e.alwaysValidSchema)(w,k[T]))}Ar.schemaProperties=g;function m({schemaCode:w,data:k,it:{gen:T,topSchemaRef:C,schemaPath:E,errorPath:_},it:$},M,j,B){const V=B?(0,t._)`${w}, ${k}, ${C}${E}`:k,X=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,_)],[r.default.parentData,$.parentData],[r.default.parentDataProperty,$.parentDataProperty],[r.default.rootData,r.default.rootData]];$.opts.dynamicRef&&X.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const D=(0,t._)`${V}, ${T.object(...X)}`;return j!==t.nil?(0,t._)`${M}.call(${j}, ${D})`:(0,t._)`${M}(${D})`}Ar.callValidateCode=m;const y=(0,t._)`new RegExp`;function b({gen:w,it:{opts:k}},T){const C=k.unicodeRegExp?"u":"",{regExp:E}=k.code,_=E(T,C);return w.scopeValue("pattern",{key:_.toString(),ref:_,code:(0,t._)`${E.code==="new RegExp"?y:(0,n.useFunc)(w,E)}(${T}, ${C})`})}Ar.usePattern=b;function O(w){const{gen:k,data:T,keyword:C,it:E}=w,_=k.name("valid");if(E.allErrors){const M=k.let("valid",!0);return $(()=>k.assign(M,!1)),M}return k.var(_,!0),$(()=>k.break()),_;function $(M){const j=k.const("len",(0,t._)`${T}.length`);k.forRange("i",0,j,B=>{w.subschema({keyword:C,dataProp:B,dataPropType:e.Type.Num},_),k.if((0,t.not)(_),M)})}}Ar.validateArray=O;function S(w){const{gen:k,schema:T,keyword:C,it:E}=w;if(!Array.isArray(T))throw new Error("ajv implementation error");if(T.some(j=>(0,e.alwaysValidSchema)(E,j))&&!E.opts.unevaluated)return;const $=k.let("valid",!1),M=k.name("_valid");k.block(()=>T.forEach((j,B)=>{const V=w.subschema({keyword:C,schemaProp:B,compositeRule:!0},M);k.assign($,(0,t._)`${$} || ${M}`),w.mergeValidEvaluated(V,M)||k.if((0,t.not)($))})),w.result($,()=>w.reset(),()=>w.error(!0))}return Ar.validateUnion=S,Ar}var Z3;function TVe(){if(Z3)return cs;Z3=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.validateKeywordUsage=cs.validSchemaType=cs.funcKeywordCode=cs.macroKeywordCode=void 0;const t=Bt(),e=Rs(),r=Is(),n=zP();function i(g,m){const{gen:y,keyword:b,schema:O,parentSchema:S,it:w}=g,k=m.macro.call(w.self,O,S,w),T=c(y,b,k);w.opts.validateSchema!==!1&&w.self.validateSchema(k,!0);const C=y.name("valid");g.subschema({schema:k,schemaPath:t.nil,errSchemaPath:`${w.errSchemaPath}/${b}`,topSchemaRef:T,compositeRule:!0},C),g.pass(C,()=>g.error(!0))}cs.macroKeywordCode=i;function o(g,m){var y;const{gen:b,keyword:O,schema:S,parentSchema:w,$data:k,it:T}=g;l(T,m);const C=!k&&m.compile?m.compile.call(T.self,S,w,T):m.validate,E=c(b,O,C),_=b.let("valid");g.block$data(_,$),g.ok((y=m.valid)!==null&&y!==void 0?y:_);function $(){if(m.errors===!1)B(),m.modifying&&a(g),V(()=>g.error());else{const X=m.async?M():j();m.modifying&&a(g),V(()=>s(g,X))}}function M(){const X=b.let("ruleErrs",null);return b.try(()=>B((0,t._)`await `),D=>b.assign(_,!1).if((0,t._)`${D} instanceof ${T.ValidationError}`,()=>b.assign(X,(0,t._)`${D}.errors`),()=>b.throw(D))),X}function j(){const X=(0,t._)`${E}.errors`;return b.assign(X,null),B(t.nil),X}function B(X=m.async?(0,t._)`await `:t.nil){const D=T.opts.passContext?e.default.this:e.default.self,F=!("compile"in m&&!k||m.schema===!1);b.assign(_,(0,t._)`${X}${(0,r.callValidateCode)(g,E,D,F)}`,m.modifying)}function V(X){var D;b.if((0,t.not)((D=m.valid)!==null&&D!==void 0?D:_),X)}}cs.funcKeywordCode=o;function a(g){const{gen:m,data:y,it:b}=g;m.if(b.parentData,()=>m.assign(y,(0,t._)`${b.parentData}[${b.parentDataProperty}]`))}function s(g,m){const{gen:y}=g;y.if((0,t._)`Array.isArray(${m})`,()=>{y.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${m} : ${e.default.vErrors}.concat(${m})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(g)},()=>g.error())}function l({schemaEnv:g},m){if(m.async&&!g.$async)throw new Error("async keyword in sync schema")}function c(g,m,y){if(y===void 0)throw new Error(`keyword "${m}" failed to compile`);return g.scopeValue("keyword",typeof y=="function"?{ref:y}:{ref:y,code:(0,t.stringify)(y)})}function d(g,m,y=!1){return!m.length||m.some(b=>b==="array"?Array.isArray(g):b==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==b||y&&typeof g>"u")}cs.validSchemaType=d;function p({schema:g,opts:m,self:y,errSchemaPath:b},O,S){if(Array.isArray(O.keyword)?!O.keyword.includes(S):O.keyword!==S)throw new Error("ajv implementation error");const w=O.dependencies;if(w!=null&&w.some(k=>!Object.prototype.hasOwnProperty.call(g,k)))throw new Error(`parent schema must have dependencies of ${S}: ${w.join(",")}`);if(O.validateSchema&&!O.validateSchema(g[S])){const T=`keyword "${S}" value is invalid at path "${b}": `+y.errorsText(O.validateSchema.errors);if(m.validateSchema==="log")y.logger.error(T);else throw new Error(T)}}return cs.validateKeywordUsage=p,cs}var Ul={},G3;function EVe(){if(G3)return Ul;G3=1,Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.extendSubschemaMode=Ul.extendSubschemaData=Ul.getSubschema=void 0;const t=Bt(),e=nr();function r(o,{keyword:a,schemaProp:s,schema:l,schemaPath:c,errSchemaPath:d,topSchemaRef:p}){if(a!==void 0&&l!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const g=o.schema[a];return s===void 0?{schema:g,schemaPath:(0,t._)`${o.schemaPath}${(0,t.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:g[s],schemaPath:(0,t._)`${o.schemaPath}${(0,t.getProperty)(a)}${(0,t.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,e.escapeFragment)(s)}`}}if(l!==void 0){if(c===void 0||d===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:l,schemaPath:c,topSchemaRef:p,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}Ul.getSubschema=r;function n(o,a,{dataProp:s,dataPropType:l,data:c,dataTypes:d,propertyName:p}){if(c!==void 0&&s!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=a;if(s!==void 0){const{errorPath:y,dataPathArr:b,opts:O}=a,S=g.let("data",(0,t._)`${a.data}${(0,t.getProperty)(s)}`,!0);m(S),o.errorPath=(0,t.str)`${y}${(0,e.getErrorPath)(s,l,O.jsPropertySyntax)}`,o.parentDataProperty=(0,t._)`${s}`,o.dataPathArr=[...b,o.parentDataProperty]}if(c!==void 0){const y=c instanceof t.Name?c:g.let("data",c,!0);m(y),p!==void 0&&(o.propertyName=p)}d&&(o.dataTypes=d);function m(y){o.data=y,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,y]}}Ul.extendSubschemaData=n;function i(o,{jtdDiscriminator:a,jtdMetadata:s,compositeRule:l,createErrors:c,allErrors:d}){l!==void 0&&(o.compositeRule=l),c!==void 0&&(o.createErrors=c),d!==void 0&&(o.allErrors=d),o.jtdDiscriminator=a,o.jtdMetadata=s}return Ul.extendSubschemaMode=i,Ul}var lo={},qE,Y3;function PJ(){return Y3||(Y3=1,qE=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}),qE}var WE={exports:{}},K3;function _Ve(){if(K3)return WE.exports;K3=1;var t=WE.exports=function(n,i,o){typeof i=="function"&&(o=i,i={}),o=i.cb||o;var a=typeof o=="function"?o:o.pre||function(){},s=o.post||function(){};e(i,a,s,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e(n,i,o,a,s,l,c,d,p,g){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,s,l,c,d,p,g);for(var m in a){var y=a[m];if(Array.isArray(y)){if(m in t.arrayKeywords)for(var b=0;b<y.length;b++)e(n,i,o,y[b],s+"/"+m+"/"+b,l,s,m,a,b)}else if(m in t.propsKeywords){if(y&&typeof y=="object")for(var O in y)e(n,i,o,y[O],s+"/"+m+"/"+r(O),l,s,m,a,O)}else(m in t.keywords||n.allKeys&&!(m in t.skipKeywords))&&e(n,i,o,y,s+"/"+m,l,s,m,a)}o(a,s,l,c,d,p,g)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return WE.exports}var J3;function qP(){if(J3)return lo;J3=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.getSchemaRefs=lo.resolveUrl=lo.normalizeId=lo._getFullPath=lo.getFullPath=lo.inlineRef=void 0;const t=nr(),e=PJ(),r=_Ve(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(b,O=!0){return typeof b=="boolean"?!0:O===!0?!a(b):O?s(b)<=O:!1}lo.inlineRef=i;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(b){for(const O in b){if(o.has(O))return!0;const S=b[O];if(Array.isArray(S)&&S.some(a)||typeof S=="object"&&a(S))return!0}return!1}function s(b){let O=0;for(const S in b){if(S==="$ref")return 1/0;if(O++,!n.has(S)&&(typeof b[S]=="object"&&(0,t.eachItem)(b[S],w=>O+=s(w)),O===1/0))return 1/0}return O}function l(b,O="",S){S!==!1&&(O=p(O));const w=b.parse(O);return c(b,w)}lo.getFullPath=l;function c(b,O){return b.serialize(O).split("#")[0]+"#"}lo._getFullPath=c;const d=/#\/?$/;function p(b){return b?b.replace(d,""):""}lo.normalizeId=p;function g(b,O,S){return S=p(S),b.resolve(O,S)}lo.resolveUrl=g;const m=/^[a-z_][-a-z0-9._]*$/i;function y(b,O){if(typeof b=="boolean")return{};const{schemaId:S,uriResolver:w}=this.opts,k=p(b[S]||O),T={"":k},C=l(w,k,!1),E={},_=new Set;return r(b,{allKeys:!0},(j,B,V,X)=>{if(X===void 0)return;const D=C+B;let F=T[X];typeof j[S]=="string"&&(F=Y.call(this,j[S])),ie.call(this,j.$anchor),ie.call(this,j.$dynamicAnchor),T[B]=F;function Y(H){const ne=this.opts.uriResolver.resolve;if(H=p(F?ne(F,H):H),_.has(H))throw M(H);_.add(H);let z=this.refs[H];return typeof z=="string"&&(z=this.refs[z]),typeof z=="object"?$(j,z.schema,H):H!==p(D)&&(H[0]==="#"?($(j,E[H],H),E[H]=j):this.refs[H]=D),H}function ie(H){if(typeof H=="string"){if(!m.test(H))throw new Error(`invalid anchor "${H}"`);Y.call(this,`#${H}`)}}}),E;function $(j,B,V){if(B!==void 0&&!e(j,B))throw M(V)}function M(j){return new Error(`reference "${j}" resolves to more than one schema`)}}return lo.getSchemaRefs=y,lo}var eB;function WP(){if(eB)return ql;eB=1,Object.defineProperty(ql,"__esModule",{value:!0}),ql.getData=ql.KeywordCxt=ql.validateFunctionCode=void 0;const t=kVe(),e=lx(),r=xJ(),n=lx(),i=CVe(),o=TVe(),a=EVe(),s=Bt(),l=Rs(),c=qP(),d=nr(),p=zP();function g(ee){if(C(ee)&&(_(ee),T(ee))){O(ee);return}m(ee,()=>(0,t.topBoolOrEmptySchema)(ee))}ql.validateFunctionCode=g;function m({gen:ee,validateName:re,schema:ye,schemaEnv:ke,opts:Me},De){Me.code.es5?ee.func(re,(0,s._)`${l.default.data}, ${l.default.valCxt}`,ke.$async,()=>{ee.code((0,s._)`"use strict"; ${w(ye,Me)}`),b(ee,Me),ee.code(De)}):ee.func(re,(0,s._)`${l.default.data}, ${y(Me)}`,ke.$async,()=>ee.code(w(ye,Me)).code(De))}function y(ee){return(0,s._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${ee.dynamicRef?(0,s._)`, ${l.default.dynamicAnchors}={}`:s.nil}}={}`}function b(ee,re){ee.if(l.default.valCxt,()=>{ee.var(l.default.instancePath,(0,s._)`${l.default.valCxt}.${l.default.instancePath}`),ee.var(l.default.parentData,(0,s._)`${l.default.valCxt}.${l.default.parentData}`),ee.var(l.default.parentDataProperty,(0,s._)`${l.default.valCxt}.${l.default.parentDataProperty}`),ee.var(l.default.rootData,(0,s._)`${l.default.valCxt}.${l.default.rootData}`),re.dynamicRef&&ee.var(l.default.dynamicAnchors,(0,s._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{ee.var(l.default.instancePath,(0,s._)`""`),ee.var(l.default.parentData,(0,s._)`undefined`),ee.var(l.default.parentDataProperty,(0,s._)`undefined`),ee.var(l.default.rootData,l.default.data),re.dynamicRef&&ee.var(l.default.dynamicAnchors,(0,s._)`{}`)})}function O(ee){const{schema:re,opts:ye,gen:ke}=ee;m(ee,()=>{ye.$comment&&re.$comment&&X(ee),j(ee),ke.let(l.default.vErrors,null),ke.let(l.default.errors,0),ye.unevaluated&&S(ee),$(ee),D(ee)})}function S(ee){const{gen:re,validateName:ye}=ee;ee.evaluated=re.const("evaluated",(0,s._)`${ye}.evaluated`),re.if((0,s._)`${ee.evaluated}.dynamicProps`,()=>re.assign((0,s._)`${ee.evaluated}.props`,(0,s._)`undefined`)),re.if((0,s._)`${ee.evaluated}.dynamicItems`,()=>re.assign((0,s._)`${ee.evaluated}.items`,(0,s._)`undefined`))}function w(ee,re){const ye=typeof ee=="object"&&ee[re.schemaId];return ye&&(re.code.source||re.code.process)?(0,s._)`/*# sourceURL=${ye} */`:s.nil}function k(ee,re){if(C(ee)&&(_(ee),T(ee))){E(ee,re);return}(0,t.boolOrEmptySchema)(ee,re)}function T({schema:ee,self:re}){if(typeof ee=="boolean")return!ee;for(const ye in ee)if(re.RULES.all[ye])return!0;return!1}function C(ee){return typeof ee.schema!="boolean"}function E(ee,re){const{schema:ye,gen:ke,opts:Me}=ee;Me.$comment&&ye.$comment&&X(ee),B(ee),V(ee);const De=ke.const("_errs",l.default.errors);$(ee,De),ke.var(re,(0,s._)`${De} === ${l.default.errors}`)}function _(ee){(0,d.checkUnknownRules)(ee),M(ee)}function $(ee,re){if(ee.opts.jtd)return Y(ee,[],!1,re);const ye=(0,e.getSchemaTypes)(ee.schema),ke=(0,e.coerceAndCheckDataType)(ee,ye);Y(ee,ye,!ke,re)}function M(ee){const{schema:re,errSchemaPath:ye,opts:ke,self:Me}=ee;re.$ref&&ke.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(re,Me.RULES)&&Me.logger.warn(`$ref: keywords ignored in schema at path "${ye}"`)}function j(ee){const{schema:re,opts:ye}=ee;re.default!==void 0&&ye.useDefaults&&ye.strictSchema&&(0,d.checkStrictMode)(ee,"default is ignored in the schema root")}function B(ee){const re=ee.schema[ee.opts.schemaId];re&&(ee.baseId=(0,c.resolveUrl)(ee.opts.uriResolver,ee.baseId,re))}function V(ee){if(ee.schema.$async&&!ee.schemaEnv.$async)throw new Error("async schema in sync schema")}function X({gen:ee,schemaEnv:re,schema:ye,errSchemaPath:ke,opts:Me}){const De=ye.$comment;if(Me.$comment===!0)ee.code((0,s._)`${l.default.self}.logger.log(${De})`);else if(typeof Me.$comment=="function"){const Vt=(0,s.str)`${ke}/$comment`,vr=ee.scopeValue("root",{ref:re.root});ee.code((0,s._)`${l.default.self}.opts.$comment(${De}, ${Vt}, ${vr}.schema)`)}}function D(ee){const{gen:re,schemaEnv:ye,validateName:ke,ValidationError:Me,opts:De}=ee;ye.$async?re.if((0,s._)`${l.default.errors} === 0`,()=>re.return(l.default.data),()=>re.throw((0,s._)`new ${Me}(${l.default.vErrors})`)):(re.assign((0,s._)`${ke}.errors`,l.default.vErrors),De.unevaluated&&F(ee),re.return((0,s._)`${l.default.errors} === 0`))}function F({gen:ee,evaluated:re,props:ye,items:ke}){ye instanceof s.Name&&ee.assign((0,s._)`${re}.props`,ye),ke instanceof s.Name&&ee.assign((0,s._)`${re}.items`,ke)}function Y(ee,re,ye,ke){const{gen:Me,schema:De,data:Vt,allErrors:vr,opts:yr,self:ur}=ee,{RULES:or}=ur;if(De.$ref&&(yr.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(De,or))){Me.block(()=>Oe(ee,"$ref",or.all.$ref.definition));return}yr.jtd||H(ee,re),Me.block(()=>{for(const zt of or.rules)Rr(zt);Rr(or.post)});function Rr(zt){(0,r.shouldUseGroup)(De,zt)&&(zt.type?(Me.if((0,n.checkDataType)(zt.type,Vt,yr.strictNumbers)),ie(ee,zt),re.length===1&&re[0]===zt.type&&ye&&(Me.else(),(0,n.reportTypeError)(ee)),Me.endIf()):ie(ee,zt),vr||Me.if((0,s._)`${l.default.errors} === ${ke||0}`))}}function ie(ee,re){const{gen:ye,schema:ke,opts:{useDefaults:Me}}=ee;Me&&(0,i.assignDefaults)(ee,re.type),ye.block(()=>{for(const De of re.rules)(0,r.shouldUseRule)(ke,De)&&Oe(ee,De.keyword,De.definition,re.type)})}function H(ee,re){ee.schemaEnv.meta||!ee.opts.strictTypes||(ne(ee,re),ee.opts.allowUnionTypes||z(ee,re),N(ee,ee.dataTypes))}function ne(ee,re){if(re.length){if(!ee.dataTypes.length){ee.dataTypes=re;return}re.forEach(ye=>{J(ee.dataTypes,ye)||q(ee,`type "${ye}" not allowed by context "${ee.dataTypes.join(",")}"`)}),Q(ee,re)}}function z(ee,re){re.length>1&&!(re.length===2&&re.includes("null"))&&q(ee,"use allowUnionTypes to allow union type keyword")}function N(ee,re){const ye=ee.self.RULES.all;for(const ke in ye){const Me=ye[ke];if(typeof Me=="object"&&(0,r.shouldUseRule)(ee.schema,Me)){const{type:De}=Me.definition;De.length&&!De.some(Vt=>U(re,Vt))&&q(ee,`missing type "${De.join(",")}" for keyword "${ke}"`)}}}function U(ee,re){return ee.includes(re)||re==="number"&&ee.includes("integer")}function J(ee,re){return ee.includes(re)||re==="integer"&&ee.includes("number")}function Q(ee,re){const ye=[];for(const ke of ee.dataTypes)J(re,ke)?ye.push(ke):re.includes("integer")&&ke==="number"&&ye.push("integer");ee.dataTypes=ye}function q(ee,re){const ye=ee.schemaEnv.baseId+ee.errSchemaPath;re+=` at "${ye}" (strictTypes)`,(0,d.checkStrictMode)(ee,re,ee.opts.strictTypes)}class oe{constructor(re,ye,ke){if((0,o.validateKeywordUsage)(re,ye,ke),this.gen=re.gen,this.allErrors=re.allErrors,this.keyword=ke,this.data=re.data,this.schema=re.schema[ke],this.$data=ye.$data&&re.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(re,this.schema,ke,this.$data),this.schemaType=ye.schemaType,this.parentSchema=re.schema,this.params={},this.it=re,this.def=ye,this.$data)this.schemaCode=re.gen.const("vSchema",Pe(this.$data,re));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,ye.schemaType,ye.allowUndefined))throw new Error(`${ke} value must be ${JSON.stringify(ye.schemaType)}`);("code"in ye?ye.trackErrors:ye.errors!==!1)&&(this.errsCount=re.gen.const("_errs",l.default.errors))}result(re,ye,ke){this.failResult((0,s.not)(re),ye,ke)}failResult(re,ye,ke){this.gen.if(re),ke?ke():this.error(),ye?(this.gen.else(),ye(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(re,ye){this.failResult((0,s.not)(re),void 0,ye)}fail(re){if(re===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(re),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(re){if(!this.$data)return this.fail(re);const{schemaCode:ye}=this;this.fail((0,s._)`${ye} !== undefined && (${(0,s.or)(this.invalid$data(),re)})`)}error(re,ye,ke){if(ye){this.setParams(ye),this._error(re,ke),this.setParams({});return}this._error(re,ke)}_error(re,ye){(re?p.reportExtraError:p.reportError)(this,this.def.error,ye)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(re){this.allErrors||this.gen.if(re)}setParams(re,ye){ye?Object.assign(this.params,re):this.params=re}block$data(re,ye,ke=s.nil){this.gen.block(()=>{this.check$data(re,ke),ye()})}check$data(re=s.nil,ye=s.nil){if(!this.$data)return;const{gen:ke,schemaCode:Me,schemaType:De,def:Vt}=this;ke.if((0,s.or)((0,s._)`${Me} === undefined`,ye)),re!==s.nil&&ke.assign(re,!0),(De.length||Vt.validateSchema)&&(ke.elseIf(this.invalid$data()),this.$dataError(),re!==s.nil&&ke.assign(re,!1)),ke.else()}invalid$data(){const{gen:re,schemaCode:ye,schemaType:ke,def:Me,it:De}=this;return(0,s.or)(Vt(),vr());function Vt(){if(ke.length){if(!(ye instanceof s.Name))throw new Error("ajv implementation error");const yr=Array.isArray(ke)?ke:[ke];return(0,s._)`${(0,n.checkDataTypes)(yr,ye,De.opts.strictNumbers,n.DataType.Wrong)}`}return s.nil}function vr(){if(Me.validateSchema){const yr=re.scopeValue("validate$data",{ref:Me.validateSchema});return(0,s._)`!${yr}(${ye})`}return s.nil}}subschema(re,ye){const ke=(0,a.getSubschema)(this.it,re);(0,a.extendSubschemaData)(ke,this.it,re),(0,a.extendSubschemaMode)(ke,re);const Me={...this.it,...ke,items:void 0,props:void 0};return k(Me,ye),Me}mergeEvaluated(re,ye){const{it:ke,gen:Me}=this;ke.opts.unevaluated&&(ke.props!==!0&&re.props!==void 0&&(ke.props=d.mergeEvaluated.props(Me,re.props,ke.props,ye)),ke.items!==!0&&re.items!==void 0&&(ke.items=d.mergeEvaluated.items(Me,re.items,ke.items,ye)))}mergeValidEvaluated(re,ye){const{it:ke,gen:Me}=this;if(ke.opts.unevaluated&&(ke.props!==!0||ke.items!==!0))return Me.if(ye,()=>this.mergeEvaluated(re,s.Name)),!0}}ql.KeywordCxt=oe;function Oe(ee,re,ye,ke){const Me=new oe(ee,ye,re);"code"in ye?ye.code(Me,ke):Me.$data&&ye.validate?(0,o.funcKeywordCode)(Me,ye):"macro"in ye?(0,o.macroKeywordCode)(Me,ye):(ye.compile||ye.validate)&&(0,o.funcKeywordCode)(Me,ye)}const Z=/^\/(?:[^~]|~0|~1)*$/,le=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Pe(ee,{dataLevel:re,dataNames:ye,dataPathArr:ke}){let Me,De;if(ee==="")return l.default.rootData;if(ee[0]==="/"){if(!Z.test(ee))throw new Error(`Invalid JSON-pointer: ${ee}`);Me=ee,De=l.default.rootData}else{const ur=le.exec(ee);if(!ur)throw new Error(`Invalid JSON-pointer: ${ee}`);const or=+ur[1];if(Me=ur[2],Me==="#"){if(or>=re)throw new Error(yr("property/index",or));return ke[re-or]}if(or>re)throw new Error(yr("data",or));if(De=ye[re-or],!Me)return De}let Vt=De;const vr=Me.split("/");for(const ur of vr)ur&&(De=(0,s._)`${De}${(0,s.getProperty)((0,d.unescapeJsonPointer)(ur))}`,Vt=(0,s._)`${Vt} && ${De}`);return Vt;function yr(ur,or){return`Cannot access ${ur} ${or} levels up, current level is ${re}`}}return ql.getData=Pe,ql}var nw={},tB;function SM(){if(tB)return nw;tB=1,Object.defineProperty(nw,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return nw.default=t,nw}var iw={},rB;function UP(){if(rB)return iw;rB=1,Object.defineProperty(iw,"__esModule",{value:!0});const t=qP();class e extends Error{constructor(n,i,o,a){super(a||`can't resolve reference ${o} from id ${i}`),this.missingRef=(0,t.resolveUrl)(n,i,o),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return iw.default=e,iw}var ra={},nB;function HP(){if(nB)return ra;nB=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.resolveSchema=ra.getCompilingSchema=ra.resolveRef=ra.compileSchema=ra.SchemaEnv=void 0;const t=Bt(),e=SM(),r=Rs(),n=qP(),i=nr(),o=WP();class a{constructor(S){var w;this.refs={},this.dynamicAnchors={};let k;typeof S.schema=="object"&&(k=S.schema),this.schema=S.schema,this.schemaId=S.schemaId,this.root=S.root||this,this.baseId=(w=S.baseId)!==null&&w!==void 0?w:(0,n.normalizeId)(k==null?void 0:k[S.schemaId||"$id"]),this.schemaPath=S.schemaPath,this.localRefs=S.localRefs,this.meta=S.meta,this.$async=k==null?void 0:k.$async,this.refs={}}}ra.SchemaEnv=a;function s(O){const S=d.call(this,O);if(S)return S;const w=(0,n.getFullPath)(this.opts.uriResolver,O.root.baseId),{es5:k,lines:T}=this.opts.code,{ownProperties:C}=this.opts,E=new t.CodeGen(this.scope,{es5:k,lines:T,ownProperties:C});let _;O.$async&&(_=E.scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const $=E.scopeName("validate");O.validateName=$;const M={gen:E,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:E.scopeValue("schema",this.opts.code.source===!0?{ref:O.schema,code:(0,t.stringify)(O.schema)}:{ref:O.schema}),validateName:$,ValidationError:_,schema:O.schema,schemaEnv:O,rootId:w,baseId:O.baseId||w,schemaPath:t.nil,errSchemaPath:O.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let j;try{this._compilations.add(O),(0,o.validateFunctionCode)(M),E.optimize(this.opts.code.optimize);const B=E.toString();j=`${E.scopeRefs(r.default.scope)}return ${B}`,this.opts.code.process&&(j=this.opts.code.process(j,O));const X=new Function(`${r.default.self}`,`${r.default.scope}`,j)(this,this.scope.get());if(this.scope.value($,{ref:X}),X.errors=null,X.schema=O.schema,X.schemaEnv=O,O.$async&&(X.$async=!0),this.opts.code.source===!0&&(X.source={validateName:$,validateCode:B,scopeValues:E._values}),this.opts.unevaluated){const{props:D,items:F}=M;X.evaluated={props:D instanceof t.Name?void 0:D,items:F instanceof t.Name?void 0:F,dynamicProps:D instanceof t.Name,dynamicItems:F instanceof t.Name},X.source&&(X.source.evaluated=(0,t.stringify)(X.evaluated))}return O.validate=X,O}catch(B){throw delete O.validate,delete O.validateName,j&&this.logger.error("Error compiling schema, function code:",j),B}finally{this._compilations.delete(O)}}ra.compileSchema=s;function l(O,S,w){var k;w=(0,n.resolveUrl)(this.opts.uriResolver,S,w);const T=O.refs[w];if(T)return T;let C=g.call(this,O,w);if(C===void 0){const E=(k=O.localRefs)===null||k===void 0?void 0:k[w],{schemaId:_}=this.opts;E&&(C=new a({schema:E,schemaId:_,root:O,baseId:S}))}if(C!==void 0)return O.refs[w]=c.call(this,C)}ra.resolveRef=l;function c(O){return(0,n.inlineRef)(O.schema,this.opts.inlineRefs)?O.schema:O.validate?O:s.call(this,O)}function d(O){for(const S of this._compilations)if(p(S,O))return S}ra.getCompilingSchema=d;function p(O,S){return O.schema===S.schema&&O.root===S.root&&O.baseId===S.baseId}function g(O,S){let w;for(;typeof(w=this.refs[S])=="string";)S=w;return w||this.schemas[S]||m.call(this,O,S)}function m(O,S){const w=this.opts.uriResolver.parse(S),k=(0,n._getFullPath)(this.opts.uriResolver,w);let T=(0,n.getFullPath)(this.opts.uriResolver,O.baseId,void 0);if(Object.keys(O.schema).length>0&&k===T)return b.call(this,w,O);const C=(0,n.normalizeId)(k),E=this.refs[C]||this.schemas[C];if(typeof E=="string"){const _=m.call(this,O,E);return typeof(_==null?void 0:_.schema)!="object"?void 0:b.call(this,w,_)}if(typeof(E==null?void 0:E.schema)=="object"){if(E.validate||s.call(this,E),C===(0,n.normalizeId)(S)){const{schema:_}=E,{schemaId:$}=this.opts,M=_[$];return M&&(T=(0,n.resolveUrl)(this.opts.uriResolver,T,M)),new a({schema:_,schemaId:$,root:O,baseId:T})}return b.call(this,w,E)}}ra.resolveSchema=m;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function b(O,{baseId:S,schema:w,root:k}){var T;if(((T=O.fragment)===null||T===void 0?void 0:T[0])!=="/")return;for(const _ of O.fragment.slice(1).split("/")){if(typeof w=="boolean")return;const $=w[(0,i.unescapeFragment)(_)];if($===void 0)return;w=$;const M=typeof w=="object"&&w[this.opts.schemaId];!y.has(_)&&M&&(S=(0,n.resolveUrl)(this.opts.uriResolver,S,M))}let C;if(typeof w!="boolean"&&w.$ref&&!(0,i.schemaHasRulesButRef)(w,this.RULES)){const _=(0,n.resolveUrl)(this.opts.uriResolver,S,w.$ref);C=m.call(this,k,_)}const{schemaId:E}=this.opts;if(C=C||new a({schema:w,schemaId:E,root:k,baseId:S}),C.schema!==C.root.schema)return C}return ra}const RVe="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",IVe="Meta-schema for $data reference (JSON AnySchema extension proposal)",$Ve="object",AVe=["$data"],MVe={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},NVe=!1,jVe={$id:RVe,description:IVe,type:$Ve,required:AVe,properties:MVe,additionalProperties:NVe};var ow={},pv={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */var DVe=pv.exports,iB;function LVe(){return iB||(iB=1,function(t,e){(function(r,n){n(e)})(DVe,function(r){function n(){for(var G=arguments.length,W=Array(G),te=0;te<G;te++)W[te]=arguments[te];if(W.length>1){W[0]=W[0].slice(0,-1);for(var ce=W.length-1,de=1;de<ce;++de)W[de]=W[de].slice(1,-1);return W[ce]=W[ce].slice(1),W.join("")}else return W[0]}function i(G){return"(?:"+G+")"}function o(G){return G===void 0?"undefined":G===null?"null":Object.prototype.toString.call(G).split(" ").pop().split("]").shift().toLowerCase()}function a(G){return G.toUpperCase()}function s(G){return G!=null?G instanceof Array?G:typeof G.length!="number"||G.split||G.setInterval||G.call?[G]:Array.prototype.slice.call(G):[]}function l(G,W){var te=G;if(W)for(var ce in W)te[ce]=W[ce];return te}function c(G){var W="[A-Za-z]",te="[0-9]",ce=n(te,"[A-Fa-f]"),de=i(i("%[EFef]"+ce+"%"+ce+ce+"%"+ce+ce)+"|"+i("%[89A-Fa-f]"+ce+"%"+ce+ce)+"|"+i("%"+ce+ce)),qe="[\\:\\/\\?\\#\\[\\]\\@]",tt="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Ot=n(qe,tt),ir=G?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",br=G?"[\\uE000-\\uF8FF]":"[]",It=n(W,te,"[\\-\\.\\_\\~]",ir);i(W+n(W,te,"[\\+\\-\\.]")+"*"),i(i(de+"|"+n(It,tt,"[\\:]"))+"*");var qt=i(i("25[0-5]")+"|"+i("2[0-4]"+te)+"|"+i("1"+te+te)+"|"+i("0?[1-9]"+te)+"|0?0?"+te),Ir=i(qt+"\\."+qt+"\\."+qt+"\\."+qt),vt=i(ce+"{1,4}"),pr=i(i(vt+"\\:"+vt)+"|"+Ir),ct=i(i(vt+"\\:")+"{6}"+pr),Qt=i("\\:\\:"+i(vt+"\\:")+"{5}"+pr),Dt=i(i(vt)+"?\\:\\:"+i(vt+"\\:")+"{4}"+pr),xr=i(i(i(vt+"\\:")+"{0,1}"+vt)+"?\\:\\:"+i(vt+"\\:")+"{3}"+pr),Wn=i(i(i(vt+"\\:")+"{0,2}"+vt)+"?\\:\\:"+i(vt+"\\:")+"{2}"+pr),wa=i(i(i(vt+"\\:")+"{0,3}"+vt)+"?\\:\\:"+vt+"\\:"+pr),mo=i(i(i(vt+"\\:")+"{0,4}"+vt)+"?\\:\\:"+pr),vo=i(i(i(vt+"\\:")+"{0,5}"+vt)+"?\\:\\:"+vt),Ho=i(i(i(vt+"\\:")+"{0,6}"+vt)+"?\\:\\:"),Sa=i([ct,Qt,Dt,xr,Wn,wa,mo,vo,Ho].join("|")),Un=i(i(It+"|"+de)+"+");i("[vV]"+ce+"+\\."+n(It,tt,"[\\:]")+"+"),i(i(de+"|"+n(It,tt))+"*");var dd=i(de+"|"+n(It,tt,"[\\:\\@]"));return i(i(de+"|"+n(It,tt,"[\\@]"))+"+"),i(i(dd+"|"+n("[\\/\\?]",br))+"*"),{NOT_SCHEME:new RegExp(n("[^]",W,te,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",It,tt),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",It,tt),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",It,tt),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",It,tt),"g"),NOT_QUERY:new RegExp(n("[^\\%]",It,tt,"[\\:\\@\\/\\?]",br),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",It,tt,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",It,tt),"g"),UNRESERVED:new RegExp(It,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",It,Ot),"g"),PCT_ENCODED:new RegExp(de,"g"),IPV4ADDRESS:new RegExp("^("+Ir+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Sa+")"+i(i("\\%25|\\%(?!"+ce+"{2})")+"("+Un+")")+"?\\]?$")}}var d=c(!1),p=c(!0),g=function(){function G(W,te){var ce=[],de=!0,qe=!1,tt=void 0;try{for(var Ot=W[Symbol.iterator](),ir;!(de=(ir=Ot.next()).done)&&(ce.push(ir.value),!(te&&ce.length===te));de=!0);}catch(br){qe=!0,tt=br}finally{try{!de&&Ot.return&&Ot.return()}finally{if(qe)throw tt}}return ce}return function(W,te){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return G(W,te);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function(G){if(Array.isArray(G)){for(var W=0,te=Array(G.length);W<G.length;W++)te[W]=G[W];return te}else return Array.from(G)},y=2147483647,b=36,O=1,S=26,w=38,k=700,T=72,C=128,E="-",_=/^xn--/,$=/[^\0-\x7E]/,M=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=b-O,V=Math.floor,X=String.fromCharCode;function D(G){throw new RangeError(j[G])}function F(G,W){for(var te=[],ce=G.length;ce--;)te[ce]=W(G[ce]);return te}function Y(G,W){var te=G.split("@"),ce="";te.length>1&&(ce=te[0]+"@",G=te[1]),G=G.replace(M,".");var de=G.split("."),qe=F(de,W).join(".");return ce+qe}function ie(G){for(var W=[],te=0,ce=G.length;te<ce;){var de=G.charCodeAt(te++);if(de>=55296&&de<=56319&&te<ce){var qe=G.charCodeAt(te++);(qe&64512)==56320?W.push(((de&1023)<<10)+(qe&1023)+65536):(W.push(de),te--)}else W.push(de)}return W}var H=function(W){return String.fromCodePoint.apply(String,m(W))},ne=function(W){return W-48<10?W-22:W-65<26?W-65:W-97<26?W-97:b},z=function(W,te){return W+22+75*(W<26)-((te!=0)<<5)},N=function(W,te,ce){var de=0;for(W=ce?V(W/k):W>>1,W+=V(W/te);W>B*S>>1;de+=b)W=V(W/B);return V(de+(B+1)*W/(W+w))},U=function(W){var te=[],ce=W.length,de=0,qe=C,tt=T,Ot=W.lastIndexOf(E);Ot<0&&(Ot=0);for(var ir=0;ir<Ot;++ir)W.charCodeAt(ir)>=128&&D("not-basic"),te.push(W.charCodeAt(ir));for(var br=Ot>0?Ot+1:0;br<ce;){for(var It=de,qt=1,Ir=b;;Ir+=b){br>=ce&&D("invalid-input");var vt=ne(W.charCodeAt(br++));(vt>=b||vt>V((y-de)/qt))&&D("overflow"),de+=vt*qt;var pr=Ir<=tt?O:Ir>=tt+S?S:Ir-tt;if(vt<pr)break;var ct=b-pr;qt>V(y/ct)&&D("overflow"),qt*=ct}var Qt=te.length+1;tt=N(de-It,Qt,It==0),V(de/Qt)>y-qe&&D("overflow"),qe+=V(de/Qt),de%=Qt,te.splice(de++,0,qe)}return String.fromCodePoint.apply(String,te)},J=function(W){var te=[];W=ie(W);var ce=W.length,de=C,qe=0,tt=T,Ot=!0,ir=!1,br=void 0;try{for(var It=W[Symbol.iterator](),qt;!(Ot=(qt=It.next()).done);Ot=!0){var Ir=qt.value;Ir<128&&te.push(X(Ir))}}catch(As){ir=!0,br=As}finally{try{!Ot&&It.return&&It.return()}finally{if(ir)throw br}}var vt=te.length,pr=vt;for(vt&&te.push(E);pr<ce;){var ct=y,Qt=!0,Dt=!1,xr=void 0;try{for(var Wn=W[Symbol.iterator](),wa;!(Qt=(wa=Wn.next()).done);Qt=!0){var mo=wa.value;mo>=de&&mo<ct&&(ct=mo)}}catch(As){Dt=!0,xr=As}finally{try{!Qt&&Wn.return&&Wn.return()}finally{if(Dt)throw xr}}var vo=pr+1;ct-de>V((y-qe)/vo)&&D("overflow"),qe+=(ct-de)*vo,de=ct;var Ho=!0,Sa=!1,Un=void 0;try{for(var dd=W[Symbol.iterator](),yo;!(Ho=(yo=dd.next()).done);Ho=!0){var Jb=yo.value;if(Jb<de&&++qe>y&&D("overflow"),Jb==de){for(var Wf=qe,Uf=b;;Uf+=b){var Al=Uf<=tt?O:Uf>=tt+S?S:Uf-tt;if(Wf<Al)break;var fd=Wf-Al,Ac=b-Al;te.push(X(z(Al+fd%Ac,0))),Wf=V(fd/Ac)}te.push(X(z(Wf,0))),tt=N(qe,vo,pr==vt),qe=0,++pr}}}catch(As){Sa=!0,Un=As}finally{try{!Ho&&dd.return&&dd.return()}finally{if(Sa)throw Un}}++qe,++de}return te.join("")},Q=function(W){return Y(W,function(te){return _.test(te)?U(te.slice(4).toLowerCase()):te})},q=function(W){return Y(W,function(te){return $.test(te)?"xn--"+J(te):te})},oe={version:"2.1.0",ucs2:{decode:ie,encode:H},decode:U,encode:J,toASCII:q,toUnicode:Q},Oe={};function Z(G){var W=G.charCodeAt(0),te=void 0;return W<16?te="%0"+W.toString(16).toUpperCase():W<128?te="%"+W.toString(16).toUpperCase():W<2048?te="%"+(W>>6|192).toString(16).toUpperCase()+"%"+(W&63|128).toString(16).toUpperCase():te="%"+(W>>12|224).toString(16).toUpperCase()+"%"+(W>>6&63|128).toString(16).toUpperCase()+"%"+(W&63|128).toString(16).toUpperCase(),te}function le(G){for(var W="",te=0,ce=G.length;te<ce;){var de=parseInt(G.substr(te+1,2),16);if(de<128)W+=String.fromCharCode(de),te+=3;else if(de>=194&&de<224){if(ce-te>=6){var qe=parseInt(G.substr(te+4,2),16);W+=String.fromCharCode((de&31)<<6|qe&63)}else W+=G.substr(te,6);te+=6}else if(de>=224){if(ce-te>=9){var tt=parseInt(G.substr(te+4,2),16),Ot=parseInt(G.substr(te+7,2),16);W+=String.fromCharCode((de&15)<<12|(tt&63)<<6|Ot&63)}else W+=G.substr(te,9);te+=9}else W+=G.substr(te,3),te+=3}return W}function Pe(G,W){function te(ce){var de=le(ce);return de.match(W.UNRESERVED)?de:ce}return G.scheme&&(G.scheme=String(G.scheme).replace(W.PCT_ENCODED,te).toLowerCase().replace(W.NOT_SCHEME,"")),G.userinfo!==void 0&&(G.userinfo=String(G.userinfo).replace(W.PCT_ENCODED,te).replace(W.NOT_USERINFO,Z).replace(W.PCT_ENCODED,a)),G.host!==void 0&&(G.host=String(G.host).replace(W.PCT_ENCODED,te).toLowerCase().replace(W.NOT_HOST,Z).replace(W.PCT_ENCODED,a)),G.path!==void 0&&(G.path=String(G.path).replace(W.PCT_ENCODED,te).replace(G.scheme?W.NOT_PATH:W.NOT_PATH_NOSCHEME,Z).replace(W.PCT_ENCODED,a)),G.query!==void 0&&(G.query=String(G.query).replace(W.PCT_ENCODED,te).replace(W.NOT_QUERY,Z).replace(W.PCT_ENCODED,a)),G.fragment!==void 0&&(G.fragment=String(G.fragment).replace(W.PCT_ENCODED,te).replace(W.NOT_FRAGMENT,Z).replace(W.PCT_ENCODED,a)),G}function ee(G){return G.replace(/^0*(.*)/,"$1")||"0"}function re(G,W){var te=G.match(W.IPV4ADDRESS)||[],ce=g(te,2),de=ce[1];return de?de.split(".").map(ee).join("."):G}function ye(G,W){var te=G.match(W.IPV6ADDRESS)||[],ce=g(te,3),de=ce[1],qe=ce[2];if(de){for(var tt=de.toLowerCase().split("::").reverse(),Ot=g(tt,2),ir=Ot[0],br=Ot[1],It=br?br.split(":").map(ee):[],qt=ir.split(":").map(ee),Ir=W.IPV4ADDRESS.test(qt[qt.length-1]),vt=Ir?7:8,pr=qt.length-vt,ct=Array(vt),Qt=0;Qt<vt;++Qt)ct[Qt]=It[Qt]||qt[pr+Qt]||"";Ir&&(ct[vt-1]=re(ct[vt-1],W));var Dt=ct.reduce(function(vo,Ho,Sa){if(!Ho||Ho==="0"){var Un=vo[vo.length-1];Un&&Un.index+Un.length===Sa?Un.length++:vo.push({index:Sa,length:1})}return vo},[]),xr=Dt.sort(function(vo,Ho){return Ho.length-vo.length})[0],Wn=void 0;if(xr&&xr.length>1){var wa=ct.slice(0,xr.index),mo=ct.slice(xr.index+xr.length);Wn=wa.join(":")+"::"+mo.join(":")}else Wn=ct.join(":");return qe&&(Wn+="%"+qe),Wn}else return G}var ke=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Me="".match(/(){0}/)[1]===void 0;function De(G){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te={},ce=W.iri!==!1?p:d;W.reference==="suffix"&&(G=(W.scheme?W.scheme+":":"")+"//"+G);var de=G.match(ke);if(de){Me?(te.scheme=de[1],te.userinfo=de[3],te.host=de[4],te.port=parseInt(de[5],10),te.path=de[6]||"",te.query=de[7],te.fragment=de[8],isNaN(te.port)&&(te.port=de[5])):(te.scheme=de[1]||void 0,te.userinfo=G.indexOf("@")!==-1?de[3]:void 0,te.host=G.indexOf("//")!==-1?de[4]:void 0,te.port=parseInt(de[5],10),te.path=de[6]||"",te.query=G.indexOf("?")!==-1?de[7]:void 0,te.fragment=G.indexOf("#")!==-1?de[8]:void 0,isNaN(te.port)&&(te.port=G.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?de[4]:void 0)),te.host&&(te.host=ye(re(te.host,ce),ce)),te.scheme===void 0&&te.userinfo===void 0&&te.host===void 0&&te.port===void 0&&!te.path&&te.query===void 0?te.reference="same-document":te.scheme===void 0?te.reference="relative":te.fragment===void 0?te.reference="absolute":te.reference="uri",W.reference&&W.reference!=="suffix"&&W.reference!==te.reference&&(te.error=te.error||"URI is not a "+W.reference+" reference.");var qe=Oe[(W.scheme||te.scheme||"").toLowerCase()];if(!W.unicodeSupport&&(!qe||!qe.unicodeSupport)){if(te.host&&(W.domainHost||qe&&qe.domainHost))try{te.host=oe.toASCII(te.host.replace(ce.PCT_ENCODED,le).toLowerCase())}catch(tt){te.error=te.error||"Host's domain name can not be converted to ASCII via punycode: "+tt}Pe(te,d)}else Pe(te,ce);qe&&qe.parse&&qe.parse(te,W)}else te.error=te.error||"URI can not be parsed.";return te}function Vt(G,W){var te=W.iri!==!1?p:d,ce=[];return G.userinfo!==void 0&&(ce.push(G.userinfo),ce.push("@")),G.host!==void 0&&ce.push(ye(re(String(G.host),te),te).replace(te.IPV6ADDRESS,function(de,qe,tt){return"["+qe+(tt?"%25"+tt:"")+"]"})),(typeof G.port=="number"||typeof G.port=="string")&&(ce.push(":"),ce.push(String(G.port))),ce.length?ce.join(""):void 0}var vr=/^\.\.?\//,yr=/^\/\.(\/|$)/,ur=/^\/\.\.(\/|$)/,or=/^\/?(?:.|\n)*?(?=\/|$)/;function Rr(G){for(var W=[];G.length;)if(G.match(vr))G=G.replace(vr,"");else if(G.match(yr))G=G.replace(yr,"/");else if(G.match(ur))G=G.replace(ur,"/"),W.pop();else if(G==="."||G==="..")G="";else{var te=G.match(or);if(te){var ce=te[0];G=G.slice(ce.length),W.push(ce)}else throw new Error("Unexpected dot segment condition")}return W.join("")}function zt(G){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te=W.iri?p:d,ce=[],de=Oe[(W.scheme||G.scheme||"").toLowerCase()];if(de&&de.serialize&&de.serialize(G,W),G.host&&!te.IPV6ADDRESS.test(G.host)){if(W.domainHost||de&&de.domainHost)try{G.host=W.iri?oe.toUnicode(G.host):oe.toASCII(G.host.replace(te.PCT_ENCODED,le).toLowerCase())}catch(Ot){G.error=G.error||"Host's domain name can not be converted to "+(W.iri?"Unicode":"ASCII")+" via punycode: "+Ot}}Pe(G,te),W.reference!=="suffix"&&G.scheme&&(ce.push(G.scheme),ce.push(":"));var qe=Vt(G,W);if(qe!==void 0&&(W.reference!=="suffix"&&ce.push("//"),ce.push(qe),G.path&&G.path.charAt(0)!=="/"&&ce.push("/")),G.path!==void 0){var tt=G.path;!W.absolutePath&&(!de||!de.absolutePath)&&(tt=Rr(tt)),qe===void 0&&(tt=tt.replace(/^\/\//,"/%2F")),ce.push(tt)}return G.query!==void 0&&(ce.push("?"),ce.push(G.query)),G.fragment!==void 0&&(ce.push("#"),ce.push(G.fragment)),ce.join("")}function Tn(G,W){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ce=arguments[3],de={};return ce||(G=De(zt(G,te),te),W=De(zt(W,te),te)),te=te||{},!te.tolerant&&W.scheme?(de.scheme=W.scheme,de.userinfo=W.userinfo,de.host=W.host,de.port=W.port,de.path=Rr(W.path||""),de.query=W.query):(W.userinfo!==void 0||W.host!==void 0||W.port!==void 0?(de.userinfo=W.userinfo,de.host=W.host,de.port=W.port,de.path=Rr(W.path||""),de.query=W.query):(W.path?(W.path.charAt(0)==="/"?de.path=Rr(W.path):((G.userinfo!==void 0||G.host!==void 0||G.port!==void 0)&&!G.path?de.path="/"+W.path:G.path?de.path=G.path.slice(0,G.path.lastIndexOf("/")+1)+W.path:de.path=W.path,de.path=Rr(de.path)),de.query=W.query):(de.path=G.path,W.query!==void 0?de.query=W.query:de.query=G.query),de.userinfo=G.userinfo,de.host=G.host,de.port=G.port),de.scheme=G.scheme),de.fragment=W.fragment,de}function zn(G,W,te){var ce=l({scheme:"null"},te);return zt(Tn(De(G,ce),De(W,ce),ce,!0),ce)}function $n(G,W){return typeof G=="string"?G=zt(De(G,W),W):o(G)==="object"&&(G=De(zt(G,W),W)),G}function pi(G,W,te){return typeof G=="string"?G=zt(De(G,te),te):o(G)==="object"&&(G=zt(G,te)),typeof W=="string"?W=zt(De(W,te),te):o(W)==="object"&&(W=zt(W,te)),G===W}function io(G,W){return G&&G.toString().replace(!W||!W.iri?d.ESCAPE:p.ESCAPE,Z)}function En(G,W){return G&&G.toString().replace(!W||!W.iri?d.PCT_ENCODED:p.PCT_ENCODED,le)}var Ii={scheme:"http",domainHost:!0,parse:function(W,te){return W.host||(W.error=W.error||"HTTP URIs must have a host."),W},serialize:function(W,te){var ce=String(W.scheme).toLowerCase()==="https";return(W.port===(ce?443:80)||W.port==="")&&(W.port=void 0),W.path||(W.path="/"),W}},qn={scheme:"https",domainHost:Ii.domainHost,parse:Ii.parse,serialize:Ii.serialize};function Rl(G){return typeof G.secure=="boolean"?G.secure:String(G.scheme).toLowerCase()==="wss"}var Ja={scheme:"ws",domainHost:!0,parse:function(W,te){var ce=W;return ce.secure=Rl(ce),ce.resourceName=(ce.path||"/")+(ce.query?"?"+ce.query:""),ce.path=void 0,ce.query=void 0,ce},serialize:function(W,te){if((W.port===(Rl(W)?443:80)||W.port==="")&&(W.port=void 0),typeof W.secure=="boolean"&&(W.scheme=W.secure?"wss":"ws",W.secure=void 0),W.resourceName){var ce=W.resourceName.split("?"),de=g(ce,2),qe=de[0],tt=de[1];W.path=qe&&qe!=="/"?qe:void 0,W.query=tt,W.resourceName=void 0}return W.fragment=void 0,W}},Ic={scheme:"wss",domainHost:Ja.domainHost,parse:Ja.parse,serialize:Ja.serialize},Mg={},Il="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ni="[0-9A-Fa-f]",$c=i(i("%[EFef]"+ni+"%"+ni+ni+"%"+ni+ni)+"|"+i("%[89A-Fa-f]"+ni+"%"+ni+ni)+"|"+i("%"+ni+ni)),$l="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",cd="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",es=n(cd,'[\\"\\\\]'),$s="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",ud=new RegExp(Il,"g"),ts=new RegExp($c,"g"),ue=new RegExp(n("[^]",$l,"[\\.]",'[\\"]',es),"g"),ve=new RegExp(n("[^]",Il,$s),"g"),we=ve;function $e(G){var W=le(G);return W.match(ud)?W:G}var We={scheme:"mailto",parse:function(W,te){var ce=W,de=ce.to=ce.path?ce.path.split(","):[];if(ce.path=void 0,ce.query){for(var qe=!1,tt={},Ot=ce.query.split("&"),ir=0,br=Ot.length;ir<br;++ir){var It=Ot[ir].split("=");switch(It[0]){case"to":for(var qt=It[1].split(","),Ir=0,vt=qt.length;Ir<vt;++Ir)de.push(qt[Ir]);break;case"subject":ce.subject=En(It[1],te);break;case"body":ce.body=En(It[1],te);break;default:qe=!0,tt[En(It[0],te)]=En(It[1],te);break}}qe&&(ce.headers=tt)}ce.query=void 0;for(var pr=0,ct=de.length;pr<ct;++pr){var Qt=de[pr].split("@");if(Qt[0]=En(Qt[0]),te.unicodeSupport)Qt[1]=En(Qt[1],te).toLowerCase();else try{Qt[1]=oe.toASCII(En(Qt[1],te).toLowerCase())}catch(Dt){ce.error=ce.error||"Email address's domain name can not be converted to ASCII via punycode: "+Dt}de[pr]=Qt.join("@")}return ce},serialize:function(W,te){var ce=W,de=s(W.to);if(de){for(var qe=0,tt=de.length;qe<tt;++qe){var Ot=String(de[qe]),ir=Ot.lastIndexOf("@"),br=Ot.slice(0,ir).replace(ts,$e).replace(ts,a).replace(ue,Z),It=Ot.slice(ir+1);try{It=te.iri?oe.toUnicode(It):oe.toASCII(En(It,te).toLowerCase())}catch(pr){ce.error=ce.error||"Email address's domain name can not be converted to "+(te.iri?"Unicode":"ASCII")+" via punycode: "+pr}de[qe]=br+"@"+It}ce.path=de.join(",")}var qt=W.headers=W.headers||{};W.subject&&(qt.subject=W.subject),W.body&&(qt.body=W.body);var Ir=[];for(var vt in qt)qt[vt]!==Mg[vt]&&Ir.push(vt.replace(ts,$e).replace(ts,a).replace(ve,Z)+"="+qt[vt].replace(ts,$e).replace(ts,a).replace(we,Z));return Ir.length&&(ce.query=Ir.join("&")),ce}},wt=/^([^\:]+)\:(.*)/,at={scheme:"urn",parse:function(W,te){var ce=W.path&&W.path.match(wt),de=W;if(ce){var qe=te.scheme||de.scheme||"urn",tt=ce[1].toLowerCase(),Ot=ce[2],ir=qe+":"+(te.nid||tt),br=Oe[ir];de.nid=tt,de.nss=Ot,de.path=void 0,br&&(de=br.parse(de,te))}else de.error=de.error||"URN can not be parsed.";return de},serialize:function(W,te){var ce=te.scheme||W.scheme||"urn",de=W.nid,qe=ce+":"+(te.nid||de),tt=Oe[qe];tt&&(W=tt.serialize(W,te));var Ot=W,ir=W.nss;return Ot.path=(de||te.nid)+":"+ir,Ot}},Ue=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Ct={scheme:"urn:uuid",parse:function(W,te){var ce=W;return ce.uuid=ce.nss,ce.nss=void 0,!te.tolerant&&(!ce.uuid||!ce.uuid.match(Ue))&&(ce.error=ce.error||"UUID is not valid."),ce},serialize:function(W,te){var ce=W;return ce.nss=(W.uuid||"").toLowerCase(),ce}};Oe[Ii.scheme]=Ii,Oe[qn.scheme]=qn,Oe[Ja.scheme]=Ja,Oe[Ic.scheme]=Ic,Oe[We.scheme]=We,Oe[at.scheme]=at,Oe[Ct.scheme]=Ct,r.SCHEMES=Oe,r.pctEncChar=Z,r.pctDecChars=le,r.parse=De,r.removeDotSegments=Rr,r.serialize=zt,r.resolveComponents=Tn,r.resolve=zn,r.normalize=$n,r.equal=pi,r.escapeComponent=io,r.unescapeComponent=En,Object.defineProperty(r,"__esModule",{value:!0})})}(pv,pv.exports)),pv.exports}var oB;function QVe(){if(oB)return ow;oB=1,Object.defineProperty(ow,"__esModule",{value:!0});const t=LVe();return t.code='require("ajv/dist/runtime/uri").default',ow.default=t,ow}var aB;function VVe(){return aB||(aB=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=WP();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Bt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=SM(),i=UP(),o=SJ(),a=HP(),s=Bt(),l=qP(),c=lx(),d=nr(),p=jVe,g=QVe(),m=(z,N)=>new RegExp(z,N);m.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),O={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},S={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},w=200;function k(z){var N,U,J,Q,q,oe,Oe,Z,le,Pe,ee,re,ye,ke,Me,De,Vt,vr,yr,ur,or,Rr,zt,Tn,zn;const $n=z.strict,pi=(N=z.code)===null||N===void 0?void 0:N.optimize,io=pi===!0||pi===void 0?1:pi||0,En=(J=(U=z.code)===null||U===void 0?void 0:U.regExp)!==null&&J!==void 0?J:m,Ii=(Q=z.uriResolver)!==null&&Q!==void 0?Q:g.default;return{strictSchema:(oe=(q=z.strictSchema)!==null&&q!==void 0?q:$n)!==null&&oe!==void 0?oe:!0,strictNumbers:(Z=(Oe=z.strictNumbers)!==null&&Oe!==void 0?Oe:$n)!==null&&Z!==void 0?Z:!0,strictTypes:(Pe=(le=z.strictTypes)!==null&&le!==void 0?le:$n)!==null&&Pe!==void 0?Pe:"log",strictTuples:(re=(ee=z.strictTuples)!==null&&ee!==void 0?ee:$n)!==null&&re!==void 0?re:"log",strictRequired:(ke=(ye=z.strictRequired)!==null&&ye!==void 0?ye:$n)!==null&&ke!==void 0?ke:!1,code:z.code?{...z.code,optimize:io,regExp:En}:{optimize:io,regExp:En},loopRequired:(Me=z.loopRequired)!==null&&Me!==void 0?Me:w,loopEnum:(De=z.loopEnum)!==null&&De!==void 0?De:w,meta:(Vt=z.meta)!==null&&Vt!==void 0?Vt:!0,messages:(vr=z.messages)!==null&&vr!==void 0?vr:!0,inlineRefs:(yr=z.inlineRefs)!==null&&yr!==void 0?yr:!0,schemaId:(ur=z.schemaId)!==null&&ur!==void 0?ur:"$id",addUsedSchema:(or=z.addUsedSchema)!==null&&or!==void 0?or:!0,validateSchema:(Rr=z.validateSchema)!==null&&Rr!==void 0?Rr:!0,validateFormats:(zt=z.validateFormats)!==null&&zt!==void 0?zt:!0,unicodeRegExp:(Tn=z.unicodeRegExp)!==null&&Tn!==void 0?Tn:!0,int32range:(zn=z.int32range)!==null&&zn!==void 0?zn:!0,uriResolver:Ii}}class T{constructor(N={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,N=this.opts={...N,...k(N)};const{es5:U,lines:J}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:b,es5:U,lines:J}),this.logger=V(N.logger);const Q=N.validateFormats;N.validateFormats=!1,this.RULES=(0,o.getRules)(),C.call(this,O,N,"NOT SUPPORTED"),C.call(this,S,N,"DEPRECATED","warn"),this._metaOpts=j.call(this),N.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),N.keywords&&M.call(this,N.keywords),typeof N.meta=="object"&&this.addMetaSchema(N.meta),_.call(this),N.validateFormats=Q}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:N,meta:U,schemaId:J}=this.opts;let Q=p;J==="id"&&(Q={...p},Q.id=Q.$id,delete Q.$id),U&&N&&this.addMetaSchema(Q,Q[J],!1)}defaultMeta(){const{meta:N,schemaId:U}=this.opts;return this.opts.defaultMeta=typeof N=="object"?N[U]||N:void 0}validate(N,U){let J;if(typeof N=="string"){if(J=this.getSchema(N),!J)throw new Error(`no schema with key or ref "${N}"`)}else J=this.compile(N);const Q=J(U);return"$async"in J||(this.errors=J.errors),Q}compile(N,U){const J=this._addSchema(N,U);return J.validate||this._compileSchemaEnv(J)}compileAsync(N,U){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:J}=this.opts;return Q.call(this,N,U);async function Q(Pe,ee){await q.call(this,Pe.$schema);const re=this._addSchema(Pe,ee);return re.validate||oe.call(this,re)}async function q(Pe){Pe&&!this.getSchema(Pe)&&await Q.call(this,{$ref:Pe},!0)}async function oe(Pe){try{return this._compileSchemaEnv(Pe)}catch(ee){if(!(ee instanceof i.default))throw ee;return Oe.call(this,ee),await Z.call(this,ee.missingSchema),oe.call(this,Pe)}}function Oe({missingSchema:Pe,missingRef:ee}){if(this.refs[Pe])throw new Error(`AnySchema ${Pe} is loaded but ${ee} cannot be resolved`)}async function Z(Pe){const ee=await le.call(this,Pe);this.refs[Pe]||await q.call(this,ee.$schema),this.refs[Pe]||this.addSchema(ee,Pe,U)}async function le(Pe){const ee=this._loading[Pe];if(ee)return ee;try{return await(this._loading[Pe]=J(Pe))}finally{delete this._loading[Pe]}}}addSchema(N,U,J,Q=this.opts.validateSchema){if(Array.isArray(N)){for(const oe of N)this.addSchema(oe,void 0,J,Q);return this}let q;if(typeof N=="object"){const{schemaId:oe}=this.opts;if(q=N[oe],q!==void 0&&typeof q!="string")throw new Error(`schema ${oe} must be string`)}return U=(0,l.normalizeId)(U||q),this._checkUnique(U),this.schemas[U]=this._addSchema(N,J,U,Q,!0),this}addMetaSchema(N,U,J=this.opts.validateSchema){return this.addSchema(N,U,!0,J),this}validateSchema(N,U){if(typeof N=="boolean")return!0;let J;if(J=N.$schema,J!==void 0&&typeof J!="string")throw new Error("$schema must be a string");if(J=J||this.opts.defaultMeta||this.defaultMeta(),!J)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const Q=this.validate(J,N);if(!Q&&U){const q="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(q);else throw new Error(q)}return Q}getSchema(N){let U;for(;typeof(U=E.call(this,N))=="string";)N=U;if(U===void 0){const{schemaId:J}=this.opts,Q=new a.SchemaEnv({schema:{},schemaId:J});if(U=a.resolveSchema.call(this,Q,N),!U)return;this.refs[N]=U}return U.validate||this._compileSchemaEnv(U)}removeSchema(N){if(N instanceof RegExp)return this._removeAllSchemas(this.schemas,N),this._removeAllSchemas(this.refs,N),this;switch(typeof N){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const U=E.call(this,N);return typeof U=="object"&&this._cache.delete(U.schema),delete this.schemas[N],delete this.refs[N],this}case"object":{const U=N;this._cache.delete(U);let J=N[this.opts.schemaId];return J&&(J=(0,l.normalizeId)(J),delete this.schemas[J],delete this.refs[J]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(N){for(const U of N)this.addKeyword(U);return this}addKeyword(N,U){let J;if(typeof N=="string")J=N,typeof U=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),U.keyword=J);else if(typeof N=="object"&&U===void 0){if(U=N,J=U.keyword,Array.isArray(J)&&!J.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(D.call(this,J,U),!U)return(0,d.eachItem)(J,q=>F.call(this,q)),this;ie.call(this,U);const Q={...U,type:(0,c.getJSONTypes)(U.type),schemaType:(0,c.getJSONTypes)(U.schemaType)};return(0,d.eachItem)(J,Q.type.length===0?q=>F.call(this,q,Q):q=>Q.type.forEach(oe=>F.call(this,q,Q,oe))),this}getKeyword(N){const U=this.RULES.all[N];return typeof U=="object"?U.definition:!!U}removeKeyword(N){const{RULES:U}=this;delete U.keywords[N],delete U.all[N];for(const J of U.rules){const Q=J.rules.findIndex(q=>q.keyword===N);Q>=0&&J.rules.splice(Q,1)}return this}addFormat(N,U){return typeof U=="string"&&(U=new RegExp(U)),this.formats[N]=U,this}errorsText(N=this.errors,{separator:U=", ",dataVar:J="data"}={}){return!N||N.length===0?"No errors":N.map(Q=>`${J}${Q.instancePath} ${Q.message}`).reduce((Q,q)=>Q+U+q)}$dataMetaSchema(N,U){const J=this.RULES.all;N=JSON.parse(JSON.stringify(N));for(const Q of U){const q=Q.split("/").slice(1);let oe=N;for(const Oe of q)oe=oe[Oe];for(const Oe in J){const Z=J[Oe];if(typeof Z!="object")continue;const{$data:le}=Z.definition,Pe=oe[Oe];le&&Pe&&(oe[Oe]=ne(Pe))}}return N}_removeAllSchemas(N,U){for(const J in N){const Q=N[J];(!U||U.test(J))&&(typeof Q=="string"?delete N[J]:Q&&!Q.meta&&(this._cache.delete(Q.schema),delete N[J]))}}_addSchema(N,U,J,Q=this.opts.validateSchema,q=this.opts.addUsedSchema){let oe;const{schemaId:Oe}=this.opts;if(typeof N=="object")oe=N[Oe];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof N!="boolean")throw new Error("schema must be object or boolean")}let Z=this._cache.get(N);if(Z!==void 0)return Z;J=(0,l.normalizeId)(oe||J);const le=l.getSchemaRefs.call(this,N,J);return Z=new a.SchemaEnv({schema:N,schemaId:Oe,meta:U,baseId:J,localRefs:le}),this._cache.set(Z.schema,Z),q&&!J.startsWith("#")&&(J&&this._checkUnique(J),this.refs[J]=Z),Q&&this.validateSchema(N,!0),Z}_checkUnique(N){if(this.schemas[N]||this.refs[N])throw new Error(`schema with key or id "${N}" already exists`)}_compileSchemaEnv(N){if(N.meta?this._compileMetaSchema(N):a.compileSchema.call(this,N),!N.validate)throw new Error("ajv implementation error");return N.validate}_compileMetaSchema(N){const U=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,N)}finally{this.opts=U}}}T.ValidationError=n.default,T.MissingRefError=i.default,t.default=T;function C(z,N,U,J="error"){for(const Q in z){const q=Q;q in N&&this.logger[J](`${U}: option ${Q}. ${z[q]}`)}}function E(z){return z=(0,l.normalizeId)(z),this.schemas[z]||this.refs[z]}function _(){const z=this.opts.schemas;if(z)if(Array.isArray(z))this.addSchema(z);else for(const N in z)this.addSchema(z[N],N)}function $(){for(const z in this.opts.formats){const N=this.opts.formats[z];N&&this.addFormat(z,N)}}function M(z){if(Array.isArray(z)){this.addVocabulary(z);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const N in z){const U=z[N];U.keyword||(U.keyword=N),this.addKeyword(U)}}function j(){const z={...this.opts};for(const N of y)delete z[N];return z}const B={log(){},warn(){},error(){}};function V(z){if(z===!1)return B;if(z===void 0)return console;if(z.log&&z.warn&&z.error)return z;throw new Error("logger must implement log, warn and error methods")}const X=/^[a-z_$][a-z0-9_$:-]*$/i;function D(z,N){const{RULES:U}=this;if((0,d.eachItem)(z,J=>{if(U.keywords[J])throw new Error(`Keyword ${J} is already defined`);if(!X.test(J))throw new Error(`Keyword ${J} has invalid name`)}),!!N&&N.$data&&!("code"in N||"validate"in N))throw new Error('$data keyword must have "code" or "validate" function')}function F(z,N,U){var J;const Q=N==null?void 0:N.post;if(U&&Q)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:q}=this;let oe=Q?q.post:q.rules.find(({type:Z})=>Z===U);if(oe||(oe={type:U,rules:[]},q.rules.push(oe)),q.keywords[z]=!0,!N)return;const Oe={keyword:z,definition:{...N,type:(0,c.getJSONTypes)(N.type),schemaType:(0,c.getJSONTypes)(N.schemaType)}};N.before?Y.call(this,oe,Oe,N.before):oe.rules.push(Oe),q.all[z]=Oe,(J=N.implements)===null||J===void 0||J.forEach(Z=>this.addKeyword(Z))}function Y(z,N,U){const J=z.rules.findIndex(Q=>Q.keyword===U);J>=0?z.rules.splice(J,0,N):(z.rules.push(N),this.logger.warn(`rule ${U} is not defined`))}function ie(z){let{metaSchema:N}=z;N!==void 0&&(z.$data&&this.opts.$data&&(N=ne(N)),z.validateSchema=this.compile(N,!0))}const H={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ne(z){return{anyOf:[z,H]}}}(QE)),QE}var aw={},sw={},lw={},sB;function FVe(){if(sB)return lw;sB=1,Object.defineProperty(lw,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return lw.default=t,lw}var eu={},lB;function xM(){if(lB)return eu;lB=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.callRef=eu.getValidate=void 0;const t=UP(),e=Is(),r=Bt(),n=Rs(),i=HP(),o=nr(),a={keyword:"$ref",schemaType:"string",code(c){const{gen:d,schema:p,it:g}=c,{baseId:m,schemaEnv:y,validateName:b,opts:O,self:S}=g,{root:w}=y;if((p==="#"||p==="#/")&&m===w.baseId)return T();const k=i.resolveRef.call(S,w,m,p);if(k===void 0)throw new t.default(g.opts.uriResolver,m,p);if(k instanceof i.SchemaEnv)return C(k);return E(k);function T(){if(y===w)return l(c,b,y,y.$async);const _=d.scopeValue("root",{ref:w});return l(c,(0,r._)`${_}.validate`,w,w.$async)}function C(_){const $=s(c,_);l(c,$,_,_.$async)}function E(_){const $=d.scopeValue("schema",O.code.source===!0?{ref:_,code:(0,r.stringify)(_)}:{ref:_}),M=d.name("valid"),j=c.subschema({schema:_,dataTypes:[],schemaPath:r.nil,topSchemaRef:$,errSchemaPath:p},M);c.mergeEvaluated(j),c.ok(M)}}};function s(c,d){const{gen:p}=c;return d.validate?p.scopeValue("validate",{ref:d.validate}):(0,r._)`${p.scopeValue("wrapper",{ref:d})}.validate`}eu.getValidate=s;function l(c,d,p,g){const{gen:m,it:y}=c,{allErrors:b,schemaEnv:O,opts:S}=y,w=S.passContext?n.default.this:r.nil;g?k():T();function k(){if(!O.$async)throw new Error("async schema referenced by sync schema");const _=m.let("valid");m.try(()=>{m.code((0,r._)`await ${(0,e.callValidateCode)(c,d,w)}`),E(d),b||m.assign(_,!0)},$=>{m.if((0,r._)`!(${$} instanceof ${y.ValidationError})`,()=>m.throw($)),C($),b||m.assign(_,!1)}),c.ok(_)}function T(){c.result((0,e.callValidateCode)(c,d,w),()=>E(d),()=>C(d))}function C(_){const $=(0,r._)`${_}.errors`;m.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${$} : ${n.default.vErrors}.concat(${$})`),m.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function E(_){var $;if(!y.opts.unevaluated)return;const M=($=p==null?void 0:p.validate)===null||$===void 0?void 0:$.evaluated;if(y.props!==!0)if(M&&!M.dynamicProps)M.props!==void 0&&(y.props=o.mergeEvaluated.props(m,M.props,y.props));else{const j=m.var("props",(0,r._)`${_}.evaluated.props`);y.props=o.mergeEvaluated.props(m,j,y.props,r.Name)}if(y.items!==!0)if(M&&!M.dynamicItems)M.items!==void 0&&(y.items=o.mergeEvaluated.items(m,M.items,y.items));else{const j=m.var("items",(0,r._)`${_}.evaluated.items`);y.items=o.mergeEvaluated.items(m,j,y.items,r.Name)}}}return eu.callRef=l,eu.default=a,eu}var cB;function BVe(){if(cB)return sw;cB=1,Object.defineProperty(sw,"__esModule",{value:!0});const t=FVe(),e=xM(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return sw.default=r,sw}var cw={},uw={},uB;function zVe(){if(uB)return uw;uB=1,Object.defineProperty(uw,"__esModule",{value:!0});const t=Bt(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:o,schemaCode:a})=>(0,t.str)`must be ${r[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,t._)`{comparison: ${r[o].okStr}, limit: ${a}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:a,data:s,schemaCode:l}=o;o.fail$data((0,t._)`${s} ${r[a].fail} ${l} || isNaN(${s})`)}};return uw.default=i,uw}var dw={},dB;function qVe(){if(dB)return dw;dB=1,Object.defineProperty(dw,"__esModule",{value:!0});const t=Bt(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:o,schemaCode:a,it:s}=n,l=s.opts.multipleOfPrecision,c=i.let("res"),d=l?(0,t._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${l}`:(0,t._)`${c} !== parseInt(${c})`;n.fail$data((0,t._)`(${a} === 0 || (${c} = ${o}/${a}, ${d}))`)}};return dw.default=r,dw}var fw={},hw={},fB;function WVe(){if(fB)return hw;fB=1,Object.defineProperty(hw,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,i=0,o;for(;i<r;)n++,o=e.charCodeAt(i++),o>=55296&&o<=56319&&i<r&&(o=e.charCodeAt(i),(o&64512)===56320&&i++);return n}return hw.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',hw}var hB;function UVe(){if(hB)return fw;hB=1,Object.defineProperty(fw,"__esModule",{value:!0});const t=Bt(),e=nr(),r=WVe(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){const s=o==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${a} characters`},params:({schemaCode:o})=>(0,t._)`{limit: ${o}}`},code(o){const{keyword:a,data:s,schemaCode:l,it:c}=o,d=a==="maxLength"?t.operators.GT:t.operators.LT,p=c.opts.unicode===!1?(0,t._)`${s}.length`:(0,t._)`${(0,e.useFunc)(o.gen,r.default)}(${s})`;o.fail$data((0,t._)`${p} ${d} ${l}`)}};return fw.default=i,fw}var pw={},pB;function HVe(){if(pB)return pw;pB=1,Object.defineProperty(pw,"__esModule",{value:!0});const t=Is(),e=Bt(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,e._)`{pattern: ${i}}`},code(i){const{data:o,$data:a,schema:s,schemaCode:l,it:c}=i,d=c.opts.unicodeRegExp?"u":"",p=a?(0,e._)`(new RegExp(${l}, ${d}))`:(0,t.usePattern)(i,s);i.fail$data((0,e._)`!${p}.test(${o})`)}};return pw.default=n,pw}var gw={},gB;function XVe(){if(gB)return gw;gB=1,Object.defineProperty(gw,"__esModule",{value:!0});const t=Bt(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${i} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:a}=n,s=i==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${o}).length ${s} ${a}`)}};return gw.default=r,gw}var mw={},mB;function ZVe(){if(mB)return mw;mB=1,Object.defineProperty(mw,"__esModule",{value:!0});const t=Is(),e=Bt(),r=nr(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,e.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,e._)`{missingProperty: ${o}}`},code(o){const{gen:a,schema:s,schemaCode:l,data:c,$data:d,it:p}=o,{opts:g}=p;if(!d&&s.length===0)return;const m=s.length>=g.loopRequired;if(p.allErrors?y():b(),g.strictRequired){const w=o.parentSchema.properties,{definedProperties:k}=o.it;for(const T of s)if((w==null?void 0:w[T])===void 0&&!k.has(T)){const C=p.schemaEnv.baseId+p.errSchemaPath,E=`required property "${T}" is not defined at "${C}" (strictRequired)`;(0,r.checkStrictMode)(p,E,p.opts.strictRequired)}}function y(){if(m||d)o.block$data(e.nil,O);else for(const w of s)(0,t.checkReportMissingProp)(o,w)}function b(){const w=a.let("missing");if(m||d){const k=a.let("valid",!0);o.block$data(k,()=>S(w,k)),o.ok(k)}else a.if((0,t.checkMissingProp)(o,s,w)),(0,t.reportMissingProp)(o,w),a.else()}function O(){a.forOf("prop",l,w=>{o.setParams({missingProperty:w}),a.if((0,t.noPropertyInData)(a,c,w,g.ownProperties),()=>o.error())})}function S(w,k){o.setParams({missingProperty:w}),a.forOf(w,l,()=>{a.assign(k,(0,t.propertyInData)(a,c,w,g.ownProperties)),a.if((0,e.not)(k),()=>{o.error(),a.break()})},e.nil)}}};return mw.default=i,mw}var vw={},vB;function GVe(){if(vB)return vw;vB=1,Object.defineProperty(vw,"__esModule",{value:!0});const t=Bt(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${i} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:a}=n,s=i==="maxItems"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`${o}.length ${s} ${a}`)}};return vw.default=r,vw}var yw={},bw={},yB;function PM(){if(yB)return bw;yB=1,Object.defineProperty(bw,"__esModule",{value:!0});const t=PJ();return t.code='require("ajv/dist/runtime/equal").default',bw.default=t,bw}var bB;function YVe(){if(bB)return yw;bB=1,Object.defineProperty(yw,"__esModule",{value:!0});const t=lx(),e=Bt(),r=nr(),n=PM(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:s}})=>(0,e.str)`must NOT have duplicate items (items ## ${s} and ${a} are identical)`,params:({params:{i:a,j:s}})=>(0,e._)`{i: ${a}, j: ${s}}`},code(a){const{gen:s,data:l,$data:c,schema:d,parentSchema:p,schemaCode:g,it:m}=a;if(!c&&!d)return;const y=s.let("valid"),b=p.items?(0,t.getSchemaTypes)(p.items):[];a.block$data(y,O,(0,e._)`${g} === false`),a.ok(y);function O(){const T=s.let("i",(0,e._)`${l}.length`),C=s.let("j");a.setParams({i:T,j:C}),s.assign(y,!0),s.if((0,e._)`${T} > 1`,()=>(S()?w:k)(T,C))}function S(){return b.length>0&&!b.some(T=>T==="object"||T==="array")}function w(T,C){const E=s.name("item"),_=(0,t.checkDataTypes)(b,E,m.opts.strictNumbers,t.DataType.Wrong),$=s.const("indices",(0,e._)`{}`);s.for((0,e._)`;${T}--;`,()=>{s.let(E,(0,e._)`${l}[${T}]`),s.if(_,(0,e._)`continue`),b.length>1&&s.if((0,e._)`typeof ${E} == "string"`,(0,e._)`${E} += "_"`),s.if((0,e._)`typeof ${$}[${E}] == "number"`,()=>{s.assign(C,(0,e._)`${$}[${E}]`),a.error(),s.assign(y,!1).break()}).code((0,e._)`${$}[${E}] = ${T}`)})}function k(T,C){const E=(0,r.useFunc)(s,n.default),_=s.name("outer");s.label(_).for((0,e._)`;${T}--;`,()=>s.for((0,e._)`${C} = ${T}; ${C}--;`,()=>s.if((0,e._)`${E}(${l}[${T}], ${l}[${C}])`,()=>{a.error(),s.assign(y,!1).break(_)})))}}};return yw.default=o,yw}var Ow={},OB;function KVe(){if(OB)return Ow;OB=1,Object.defineProperty(Ow,"__esModule",{value:!0});const t=Bt(),e=nr(),r=PM(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,t._)`{allowedValue: ${o}}`},code(o){const{gen:a,data:s,$data:l,schemaCode:c,schema:d}=o;l||d&&typeof d=="object"?o.fail$data((0,t._)`!${(0,e.useFunc)(a,r.default)}(${s}, ${c})`):o.fail((0,t._)`${d} !== ${s}`)}};return Ow.default=i,Ow}var ww={},wB;function JVe(){if(wB)return ww;wB=1,Object.defineProperty(ww,"__esModule",{value:!0});const t=Bt(),e=nr(),r=PM(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,t._)`{allowedValues: ${o}}`},code(o){const{gen:a,data:s,$data:l,schema:c,schemaCode:d,it:p}=o;if(!l&&c.length===0)throw new Error("enum must have non-empty array");const g=c.length>=p.opts.loopEnum;let m;const y=()=>m??(m=(0,e.useFunc)(a,r.default));let b;if(g||l)b=a.let("valid"),o.block$data(b,O);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const w=a.const("vSchema",d);b=(0,t.or)(...c.map((k,T)=>S(w,T)))}o.pass(b);function O(){a.assign(b,!1),a.forOf("v",d,w=>a.if((0,t._)`${y()}(${s}, ${w})`,()=>a.assign(b,!0).break()))}function S(w,k){const T=c[k];return typeof T=="object"&&T!==null?(0,t._)`${y()}(${s}, ${w}[${k}])`:(0,t._)`${s} === ${T}`}}};return ww.default=i,ww}var SB;function eFe(){if(SB)return cw;SB=1,Object.defineProperty(cw,"__esModule",{value:!0});const t=zVe(),e=qVe(),r=UVe(),n=HVe(),i=XVe(),o=ZVe(),a=GVe(),s=YVe(),l=KVe(),c=JVe(),d=[t.default,e.default,r.default,n.default,i.default,o.default,a.default,s.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,c.default];return cw.default=d,cw}var Sw={},_h={},xB;function kJ(){if(xB)return _h;xB=1,Object.defineProperty(_h,"__esModule",{value:!0}),_h.validateAdditionalItems=void 0;const t=Bt(),e=nr(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{parentSchema:a,it:s}=o,{items:l}=a;if(!Array.isArray(l)){(0,e.checkStrictMode)(s,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(o,l)}};function i(o,a){const{gen:s,schema:l,data:c,keyword:d,it:p}=o;p.items=!0;const g=s.const("len",(0,t._)`${c}.length`);if(l===!1)o.setParams({len:a.length}),o.pass((0,t._)`${g} <= ${a.length}`);else if(typeof l=="object"&&!(0,e.alwaysValidSchema)(p,l)){const y=s.var("valid",(0,t._)`${g} <= ${a.length}`);s.if((0,t.not)(y),()=>m(y)),o.ok(y)}function m(y){s.forRange("i",a.length,g,b=>{o.subschema({keyword:d,dataProp:b,dataPropType:e.Type.Num},y),p.allErrors||s.if((0,t.not)(y),()=>s.break())})}}return _h.validateAdditionalItems=i,_h.default=n,_h}var xw={},Rh={},PB;function CJ(){if(PB)return Rh;PB=1,Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.validateTuple=void 0;const t=Bt(),e=nr(),r=Is(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:a,it:s}=o;if(Array.isArray(a))return i(o,"additionalItems",a);s.items=!0,!(0,e.alwaysValidSchema)(s,a)&&o.ok((0,r.validateArray)(o))}};function i(o,a,s=o.schema){const{gen:l,parentSchema:c,data:d,keyword:p,it:g}=o;b(c),g.opts.unevaluated&&s.length&&g.items!==!0&&(g.items=e.mergeEvaluated.items(l,s.length,g.items));const m=l.name("valid"),y=l.const("len",(0,t._)`${d}.length`);s.forEach((O,S)=>{(0,e.alwaysValidSchema)(g,O)||(l.if((0,t._)`${y} > ${S}`,()=>o.subschema({keyword:p,schemaProp:S,dataProp:S},m)),o.ok(m))});function b(O){const{opts:S,errSchemaPath:w}=g,k=s.length,T=k===O.minItems&&(k===O.maxItems||O[a]===!1);if(S.strictTuples&&!T){const C=`"${p}" is ${k}-tuple, but minItems or maxItems/${a} are not specified or different at path "${w}"`;(0,e.checkStrictMode)(g,C,S.strictTuples)}}}return Rh.validateTuple=i,Rh.default=n,Rh}var kB;function tFe(){if(kB)return xw;kB=1,Object.defineProperty(xw,"__esModule",{value:!0});const t=CJ(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return xw.default=e,xw}var Pw={},CB;function rFe(){if(CB)return Pw;CB=1,Object.defineProperty(Pw,"__esModule",{value:!0});const t=Bt(),e=nr(),r=Is(),n=kJ(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,t.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,t._)`{limit: ${a}}`},code(a){const{schema:s,parentSchema:l,it:c}=a,{prefixItems:d}=l;c.items=!0,!(0,e.alwaysValidSchema)(c,s)&&(d?(0,n.validateAdditionalItems)(a,d):a.ok((0,r.validateArray)(a)))}};return Pw.default=o,Pw}var kw={},TB;function nFe(){if(TB)return kw;TB=1,Object.defineProperty(kw,"__esModule",{value:!0});const t=Bt(),e=nr(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:o}})=>o===void 0?(0,t.str)`must contain at least ${i} valid item(s)`:(0,t.str)`must contain at least ${i} and no more than ${o} valid item(s)`,params:({params:{min:i,max:o}})=>o===void 0?(0,t._)`{minContains: ${i}}`:(0,t._)`{minContains: ${i}, maxContains: ${o}}`},code(i){const{gen:o,schema:a,parentSchema:s,data:l,it:c}=i;let d,p;const{minContains:g,maxContains:m}=s;c.opts.next?(d=g===void 0?1:g,p=m):d=1;const y=o.const("len",(0,t._)`${l}.length`);if(i.setParams({min:d,max:p}),p===void 0&&d===0){(0,e.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&d>p){(0,e.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,e.alwaysValidSchema)(c,a)){let k=(0,t._)`${y} >= ${d}`;p!==void 0&&(k=(0,t._)`${k} && ${y} <= ${p}`),i.pass(k);return}c.items=!0;const b=o.name("valid");p===void 0&&d===1?S(b,()=>o.if(b,()=>o.break())):d===0?(o.let(b,!0),p!==void 0&&o.if((0,t._)`${l}.length > 0`,O)):(o.let(b,!1),O()),i.result(b,()=>i.reset());function O(){const k=o.name("_valid"),T=o.let("count",0);S(k,()=>o.if(k,()=>w(T)))}function S(k,T){o.forRange("i",0,y,C=>{i.subschema({keyword:"contains",dataProp:C,dataPropType:e.Type.Num,compositeRule:!0},k),T()})}function w(k){o.code((0,t._)`${k}++`),p===void 0?o.if((0,t._)`${k} >= ${d}`,()=>o.assign(b,!0).break()):(o.if((0,t._)`${k} > ${p}`,()=>o.assign(b,!1).break()),d===1?o.assign(b,!0):o.if((0,t._)`${k} >= ${d}`,()=>o.assign(b,!0)))}}};return kw.default=n,kw}var UE={},EB;function kM(){return EB||(EB=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=Bt(),r=nr(),n=Is();t.error={message:({params:{property:l,depsCount:c,deps:d}})=>{const p=c===1?"property":"properties";return(0,e.str)`must have ${p} ${d} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:d,missingProperty:p}})=>(0,e._)`{property: ${l},
|
|
1105
1106
|
missingProperty: ${p},
|
|
1106
1107
|
depsCount: ${c},
|
|
1107
|
-
deps: ${d}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(l){const[c,d]=o(l);a(l,c),s(l,d)}};function o({schema:l}){const c={},d={};for(const p in l){if(p==="__proto__")continue;const g=Array.isArray(l[p])?c:d;g[p]=l[p]}return[c,d]}function a(l,c=l.schema){const{gen:d,data:p,it:g}=l;if(Object.keys(c).length===0)return;const m=d.let("missing");for(const y in c){const b=c[y];if(b.length===0)continue;const O=(0,n.propertyInData)(d,p,y,g.opts.ownProperties);l.setParams({property:y,depsCount:b.length,deps:b.join(", ")}),g.allErrors?d.if(O,()=>{for(const S of b)(0,n.checkReportMissingProp)(l,S)}):(d.if((0,e._)`${O} && (${(0,n.checkMissingProp)(l,b,m)})`),(0,n.reportMissingProp)(l,m),d.else())}}t.validatePropertyDeps=a;function s(l,c=l.schema){const{gen:d,data:p,keyword:g,it:m}=l,y=d.name("valid");for(const b in c)(0,r.alwaysValidSchema)(m,c[b])||(d.if((0,n.propertyInData)(d,p,b,m.opts.ownProperties),()=>{const O=l.subschema({keyword:g,schemaProp:b},y);l.mergeValidEvaluated(O,y)},()=>d.var(y,!0)),l.ok(y))}t.validateSchemaDeps=s,t.default=i}(UE)),UE}var Cw={},_B;function iFe(){if(_B)return Cw;_B=1,Object.defineProperty(Cw,"__esModule",{value:!0});const t=Bt(),e=nr(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,t._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:o,schema:a,data:s,it:l}=i;if((0,e.alwaysValidSchema)(l,a))return;const c=o.name("valid");o.forIn("key",s,d=>{i.setParams({propertyName:d}),i.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},c),o.if((0,t.not)(c),()=>{i.error(!0),l.allErrors||o.break()})}),i.ok(c)}};return Cw.default=n,Cw}var Tw={},RB;function TJ(){if(RB)return Tw;RB=1,Object.defineProperty(Tw,"__esModule",{value:!0});const t=Is(),e=Bt(),r=Rs(),n=nr(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,e._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:s,schema:l,parentSchema:c,data:d,errsCount:p,it:g}=a;if(!p)throw new Error("ajv implementation error");const{allErrors:m,opts:y}=g;if(g.props=!0,y.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(g,l))return;const b=(0,t.allSchemaProperties)(c.properties),O=(0,t.allSchemaProperties)(c.patternProperties);S(),a.ok((0,e._)`${p} === ${r.default.errors}`);function S(){s.forIn("key",d,E=>{!b.length&&!O.length?T(E):s.if(w(E),()=>T(E))})}function w(E){let _;if(b.length>8){const $=(0,n.schemaRefOrVal)(g,c.properties,"properties");_=(0,t.isOwnProperty)(s,$,E)}else b.length?_=(0,e.or)(...b.map($=>(0,e._)`${E} === ${$}`)):_=e.nil;return O.length&&(_=(0,e.or)(_,...O.map($=>(0,e._)`${(0,t.usePattern)(a,$)}.test(${E})`))),(0,e.not)(_)}function k(E){s.code((0,e._)`delete ${d}[${E}]`)}function T(E){if(y.removeAdditional==="all"||y.removeAdditional&&l===!1){k(E);return}if(l===!1){a.setParams({additionalProperty:E}),a.error(),m||s.break();return}if(typeof l=="object"&&!(0,n.alwaysValidSchema)(g,l)){const _=s.name("valid");y.removeAdditional==="failing"?(C(E,_,!1),s.if((0,e.not)(_),()=>{a.reset(),k(E)})):(C(E,_),m||s.if((0,e.not)(_),()=>s.break()))}}function C(E,_,$){const M={keyword:"additionalProperties",dataProp:E,dataPropType:n.Type.Str};$===!1&&Object.assign(M,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(M,_)}}};return Tw.default=o,Tw}var Ew={},IB;function oFe(){if(IB)return Ew;IB=1,Object.defineProperty(Ew,"__esModule",{value:!0});const t=WP(),e=Is(),r=nr(),n=TJ(),i={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:s,parentSchema:l,data:c,it:d}=o;d.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(d,n.default,"additionalProperties"));const p=(0,e.allSchemaProperties)(s);for(const O of p)d.definedProperties.add(O);d.opts.unevaluated&&p.length&&d.props!==!0&&(d.props=r.mergeEvaluated.props(a,(0,r.toHash)(p),d.props));const g=p.filter(O=>!(0,r.alwaysValidSchema)(d,s[O]));if(g.length===0)return;const m=a.name("valid");for(const O of g)y(O)?b(O):(a.if((0,e.propertyInData)(a,c,O,d.opts.ownProperties)),b(O),d.allErrors||a.else().var(m,!0),a.endIf()),o.it.definedProperties.add(O),o.ok(m);function y(O){return d.opts.useDefaults&&!d.compositeRule&&s[O].default!==void 0}function b(O){o.subschema({keyword:"properties",schemaProp:O,dataProp:O},m)}}};return Ew.default=i,Ew}var _w={},$B;function aFe(){if($B)return _w;$B=1,Object.defineProperty(_w,"__esModule",{value:!0});const t=Is(),e=Bt(),r=nr(),n=nr(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:s,data:l,parentSchema:c,it:d}=o,{opts:p}=d,g=(0,t.allSchemaProperties)(s),m=g.filter(T=>(0,r.alwaysValidSchema)(d,s[T]));if(g.length===0||m.length===g.length&&(!d.opts.unevaluated||d.props===!0))return;const y=p.strictSchema&&!p.allowMatchingProperties&&c.properties,b=a.name("valid");d.props!==!0&&!(d.props instanceof e.Name)&&(d.props=(0,n.evaluatedPropsToName)(a,d.props));const{props:O}=d;S();function S(){for(const T of g)y&&w(T),d.allErrors?k(T):(a.var(b,!0),k(T),a.if(b))}function w(T){for(const C in y)new RegExp(T).test(C)&&(0,r.checkStrictMode)(d,`property ${C} matches pattern ${T} (use allowMatchingProperties)`)}function k(T){a.forIn("key",l,C=>{a.if((0,e._)`${(0,t.usePattern)(o,T)}.test(${C})`,()=>{const E=m.includes(T);E||o.subschema({keyword:"patternProperties",schemaProp:T,dataProp:C,dataPropType:n.Type.Str},b),d.opts.unevaluated&&O!==!0?a.assign((0,e._)`${O}[${C}]`,!0):!E&&!d.allErrors&&a.if((0,e.not)(b),()=>a.break())})})}}};return _w.default=i,_w}var Rw={},AB;function sFe(){if(AB)return Rw;AB=1,Object.defineProperty(Rw,"__esModule",{value:!0});const t=nr(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:o}=r;if((0,t.alwaysValidSchema)(o,i)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Rw.default=e,Rw}var Iw={},MB;function lFe(){if(MB)return Iw;MB=1,Object.defineProperty(Iw,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Is().validateUnion,error:{message:"must match a schema in anyOf"}};return Iw.default=e,Iw}var $w={},NB;function cFe(){if(NB)return $w;NB=1,Object.defineProperty($w,"__esModule",{value:!0});const t=Bt(),e=nr(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,t._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:o,schema:a,parentSchema:s,it:l}=i;if(!Array.isArray(a))throw new Error("ajv implementation error");if(l.opts.discriminator&&s.discriminator)return;const c=a,d=o.let("valid",!1),p=o.let("passing",null),g=o.name("_valid");i.setParams({passing:p}),o.block(m),i.result(d,()=>i.reset(),()=>i.error(!0));function m(){c.forEach((y,b)=>{let O;(0,e.alwaysValidSchema)(l,y)?o.var(g,!0):O=i.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},g),b>0&&o.if((0,t._)`${g} && ${d}`).assign(d,!1).assign(p,(0,t._)`[${p}, ${b}]`).else(),o.if(g,()=>{o.assign(d,!0),o.assign(p,b),O&&i.mergeEvaluated(O,t.Name)})})}}};return $w.default=n,$w}var Aw={},jB;function uFe(){if(jB)return Aw;jB=1,Object.defineProperty(Aw,"__esModule",{value:!0});const t=nr(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:i,it:o}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const a=n.name("valid");i.forEach((s,l)=>{if((0,t.alwaysValidSchema)(o,s))return;const c=r.subschema({keyword:"allOf",schemaProp:l},a);r.ok(a),r.mergeEvaluated(c)})}};return Aw.default=e,Aw}var Mw={},DB;function dFe(){if(DB)return Mw;DB=1,Object.defineProperty(Mw,"__esModule",{value:!0});const t=Bt(),e=nr(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,t.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,t._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:a,parentSchema:s,it:l}=o;s.then===void 0&&s.else===void 0&&(0,e.checkStrictMode)(l,'"if" without "then" and "else" is ignored');const c=i(l,"then"),d=i(l,"else");if(!c&&!d)return;const p=a.let("valid",!0),g=a.name("_valid");if(m(),o.reset(),c&&d){const b=a.let("ifClause");o.setParams({ifClause:b}),a.if(g,y("then",b),y("else",b))}else c?a.if(g,y("then")):a.if((0,t.not)(g),y("else"));o.pass(p,()=>o.error(!0));function m(){const b=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);o.mergeEvaluated(b)}function y(b,O){return()=>{const S=o.subschema({keyword:b},g);a.assign(p,g),o.mergeValidEvaluated(S,p),O?a.assign(O,(0,t._)`${b}`):o.setParams({ifClause:b})}}}};function i(o,a){const s=o.schema[a];return s!==void 0&&!(0,e.alwaysValidSchema)(o,s)}return Mw.default=n,Mw}var Nw={},LB;function fFe(){if(LB)return Nw;LB=1,Object.defineProperty(Nw,"__esModule",{value:!0});const t=nr(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return Nw.default=e,Nw}var QB;function hFe(){if(QB)return Sw;QB=1,Object.defineProperty(Sw,"__esModule",{value:!0});const t=kJ(),e=tFe(),r=CJ(),n=rFe(),i=nFe(),o=kM(),a=iFe(),s=TJ(),l=oFe(),c=aFe(),d=sFe(),p=lFe(),g=cFe(),m=uFe(),y=dFe(),b=fFe();function O(S=!1){const w=[d.default,p.default,g.default,m.default,y.default,b.default,a.default,s.default,o.default,l.default,c.default];return S?w.push(e.default,n.default):w.push(t.default,r.default),w.push(i.default),w}return Sw.default=O,Sw}var jw={},Ih={},VB;function EJ(){if(VB)return Ih;VB=1,Object.defineProperty(Ih,"__esModule",{value:!0}),Ih.dynamicAnchor=void 0;const t=Bt(),e=Rs(),r=HP(),n=xM(),i={keyword:"$dynamicAnchor",schemaType:"string",code:s=>o(s,s.schema)};function o(s,l){const{gen:c,it:d}=s;d.schemaEnv.root.dynamicAnchors[l]=!0;const p=(0,t._)`${e.default.dynamicAnchors}${(0,t.getProperty)(l)}`,g=d.errSchemaPath==="#"?d.validateName:a(s);c.if((0,t._)`!${p}`,()=>c.assign(p,g))}Ih.dynamicAnchor=o;function a(s){const{schemaEnv:l,schema:c,self:d}=s.it,{root:p,baseId:g,localRefs:m,meta:y}=l.root,{schemaId:b}=d.opts,O=new r.SchemaEnv({schema:c,schemaId:b,root:p,baseId:g,localRefs:m,meta:y});return r.compileSchema.call(d,O),(0,n.getValidate)(s,O)}return Ih.default=i,Ih}var $h={},FB;function _J(){if(FB)return $h;FB=1,Object.defineProperty($h,"__esModule",{value:!0}),$h.dynamicRef=void 0;const t=Bt(),e=Rs(),r=xM(),n={keyword:"$dynamicRef",schemaType:"string",code:o=>i(o,o.schema)};function i(o,a){const{gen:s,keyword:l,it:c}=o;if(a[0]!=="#")throw new Error(`"${l}" only supports hash fragment reference`);const d=a.slice(1);if(c.allErrors)p();else{const m=s.let("valid",!1);p(m),o.ok(m)}function p(m){if(c.schemaEnv.root.dynamicAnchors[d]){const y=s.let("_v",(0,t._)`${e.default.dynamicAnchors}${(0,t.getProperty)(d)}`);s.if(y,g(y,m),g(c.validateName,m))}else g(c.validateName,m)()}function g(m,y){return y?()=>s.block(()=>{(0,r.callRef)(o,m),s.let(y,!0)}):()=>(0,r.callRef)(o,m)}}return $h.dynamicRef=i,$h.default=n,$h}var Dw={},BB;function pFe(){if(BB)return Dw;BB=1,Object.defineProperty(Dw,"__esModule",{value:!0});const t=EJ(),e=nr(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,t.dynamicAnchor)(n,""):(0,e.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return Dw.default=r,Dw}var Lw={},zB;function gFe(){if(zB)return Lw;zB=1,Object.defineProperty(Lw,"__esModule",{value:!0});const t=_J(),e={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,t.dynamicRef)(r,r.schema)};return Lw.default=e,Lw}var qB;function mFe(){if(qB)return jw;qB=1,Object.defineProperty(jw,"__esModule",{value:!0});const t=EJ(),e=_J(),r=pFe(),n=gFe(),i=[t.default,e.default,r.default,n.default];return jw.default=i,jw}var Qw={},Vw={},WB;function vFe(){if(WB)return Vw;WB=1,Object.defineProperty(Vw,"__esModule",{value:!0});const t=kM(),e={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:r=>(0,t.validatePropertyDeps)(r)};return Vw.default=e,Vw}var Fw={},UB;function yFe(){if(UB)return Fw;UB=1,Object.defineProperty(Fw,"__esModule",{value:!0});const t=kM(),e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,t.validateSchemaDeps)(r)};return Fw.default=e,Fw}var Bw={},HB;function bFe(){if(HB)return Bw;HB=1,Object.defineProperty(Bw,"__esModule",{value:!0});const t=nr(),e={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:i}){n.contains===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "contains" is ignored`)}};return Bw.default=e,Bw}var XB;function OFe(){if(XB)return Qw;XB=1,Object.defineProperty(Qw,"__esModule",{value:!0});const t=vFe(),e=yFe(),r=bFe(),n=[t.default,e.default,r.default];return Qw.default=n,Qw}var zw={},qw={},ZB;function wFe(){if(ZB)return qw;ZB=1,Object.defineProperty(qw,"__esModule",{value:!0});const t=Bt(),e=nr(),r=Rs(),i={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,t._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:a,schema:s,data:l,errsCount:c,it:d}=o;if(!c)throw new Error("ajv implementation error");const{allErrors:p,props:g}=d;g instanceof t.Name?a.if((0,t._)`${g} !== true`,()=>a.forIn("key",l,O=>a.if(y(g,O),()=>m(O)))):g!==!0&&a.forIn("key",l,O=>g===void 0?m(O):a.if(b(g,O),()=>m(O))),d.props=!0,o.ok((0,t._)`${c} === ${r.default.errors}`);function m(O){if(s===!1){o.setParams({unevaluatedProperty:O}),o.error(),p||a.break();return}if(!(0,e.alwaysValidSchema)(d,s)){const S=a.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:O,dataPropType:e.Type.Str},S),p||a.if((0,t.not)(S),()=>a.break())}}function y(O,S){return(0,t._)`!${O} || !${O}[${S}]`}function b(O,S){const w=[];for(const k in O)O[k]===!0&&w.push((0,t._)`${S} !== ${k}`);return(0,t.and)(...w)}}};return qw.default=i,qw}var Ww={},GB;function SFe(){if(GB)return Ww;GB=1,Object.defineProperty(Ww,"__esModule",{value:!0});const t=Bt(),e=nr(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:i}})=>(0,t.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,t._)`{limit: ${i}}`},code(i){const{gen:o,schema:a,data:s,it:l}=i,c=l.items||0;if(c===!0)return;const d=o.const("len",(0,t._)`${s}.length`);if(a===!1)i.setParams({len:c}),i.fail((0,t._)`${d} > ${c}`);else if(typeof a=="object"&&!(0,e.alwaysValidSchema)(l,a)){const g=o.var("valid",(0,t._)`${d} <= ${c}`);o.if((0,t.not)(g),()=>p(g,c)),i.ok(g)}l.items=!0;function p(g,m){o.forRange("i",m,d,y=>{i.subschema({keyword:"unevaluatedItems",dataProp:y,dataPropType:e.Type.Num},g),l.allErrors||o.if((0,t.not)(g),()=>o.break())})}}};return Ww.default=n,Ww}var YB;function xFe(){if(YB)return zw;YB=1,Object.defineProperty(zw,"__esModule",{value:!0});const t=wFe(),e=SFe(),r=[t.default,e.default];return zw.default=r,zw}var Uw={},Hw={},KB;function PFe(){if(KB)return Hw;KB=1,Object.defineProperty(Hw,"__esModule",{value:!0});const t=Bt(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,i){const{gen:o,data:a,$data:s,schema:l,schemaCode:c,it:d}=n,{opts:p,errSchemaPath:g,schemaEnv:m,self:y}=d;if(!p.validateFormats)return;s?b():O();function b(){const S=o.scopeValue("formats",{ref:y.formats,code:p.code.formats}),w=o.const("fDef",(0,t._)`${S}[${c}]`),k=o.let("fType"),T=o.let("format");o.if((0,t._)`typeof ${w} == "object" && !(${w} instanceof RegExp)`,()=>o.assign(k,(0,t._)`${w}.type || "string"`).assign(T,(0,t._)`${w}.validate`),()=>o.assign(k,(0,t._)`"string"`).assign(T,w)),n.fail$data((0,t.or)(C(),E()));function C(){return p.strictSchema===!1?t.nil:(0,t._)`${c} && !${T}`}function E(){const _=m.$async?(0,t._)`(${w}.async ? await ${T}(${a}) : ${T}(${a}))`:(0,t._)`${T}(${a})`,$=(0,t._)`(typeof ${T} == "function" ? ${_} : ${T}.test(${a}))`;return(0,t._)`${T} && ${T} !== true && ${k} === ${i} && !${$}`}}function O(){const S=y.formats[l];if(!S){C();return}if(S===!0)return;const[w,k,T]=E(S);w===i&&n.pass(_());function C(){if(p.strictSchema===!1){y.logger.warn($());return}throw new Error($());function $(){return`unknown format "${l}" ignored in schema at path "${g}"`}}function E($){const M=$ instanceof RegExp?(0,t.regexpCode)($):p.code.formats?(0,t._)`${p.code.formats}${(0,t.getProperty)(l)}`:void 0,j=o.scopeValue("formats",{key:l,ref:$,code:M});return typeof $=="object"&&!($ instanceof RegExp)?[$.type||"string",$.validate,(0,t._)`${j}.validate`]:["string",$,j]}function _(){if(typeof S=="object"&&!(S instanceof RegExp)&&S.async){if(!m.$async)throw new Error("async format in sync schema");return(0,t._)`await ${T}(${a})`}return typeof k=="function"?(0,t._)`${T}(${a})`:(0,t._)`${T}.test(${a})`}}}};return Hw.default=r,Hw}var JB;function kFe(){if(JB)return Uw;JB=1,Object.defineProperty(Uw,"__esModule",{value:!0});const e=[PFe().default];return Uw.default=e,Uw}var jd={},e6;function CFe(){return e6||(e6=1,Object.defineProperty(jd,"__esModule",{value:!0}),jd.contentVocabulary=jd.metadataVocabulary=void 0,jd.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],jd.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),jd}var t6;function TFe(){if(t6)return aw;t6=1,Object.defineProperty(aw,"__esModule",{value:!0});const t=BVe(),e=eFe(),r=hFe(),n=mFe(),i=OFe(),o=xFe(),a=kFe(),s=CFe(),l=[n.default,t.default,e.default,(0,r.default)(!0),a.default,s.metadataVocabulary,s.contentVocabulary,i.default,o.default];return aw.default=l,aw}var Xw={},Zm={},r6;function EFe(){if(r6)return Zm;r6=1,Object.defineProperty(Zm,"__esModule",{value:!0}),Zm.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(Zm.DiscrError=t={})),Zm}var n6;function _Fe(){if(n6)return Xw;n6=1,Object.defineProperty(Xw,"__esModule",{value:!0});const t=Bt(),e=EFe(),r=HP(),n=UP(),i=nr(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:l}})=>s===e.DiscrError.Tag?`tag "${l}" must be string`:`value of tag "${l}" must be in oneOf`,params:({params:{discrError:s,tag:l,tagName:c}})=>(0,t._)`{error: ${s}, tag: ${c}, tagValue: ${l}}`},code(s){const{gen:l,data:c,schema:d,parentSchema:p,it:g}=s,{oneOf:m}=p;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const y=d.propertyName;if(typeof y!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!m)throw new Error("discriminator: requires oneOf keyword");const b=l.let("valid",!1),O=l.const("tag",(0,t._)`${c}${(0,t.getProperty)(y)}`);l.if((0,t._)`typeof ${O} == "string"`,()=>S(),()=>s.error(!1,{discrError:e.DiscrError.Tag,tag:O,tagName:y})),s.ok(b);function S(){const T=k();l.if(!1);for(const C in T)l.elseIf((0,t._)`${O} === ${C}`),l.assign(b,w(T[C]));l.else(),s.error(!1,{discrError:e.DiscrError.Mapping,tag:O,tagName:y}),l.endIf()}function w(T){const C=l.name("valid"),E=s.subschema({keyword:"oneOf",schemaProp:T},C);return s.mergeEvaluated(E,t.Name),C}function k(){var T;const C={},E=$(p);let _=!0;for(let B=0;B<m.length;B++){let V=m[B];if(V!=null&&V.$ref&&!(0,i.schemaHasRulesButRef)(V,g.self.RULES)){const D=V.$ref;if(V=r.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,D),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new n.default(g.opts.uriResolver,g.baseId,D)}const X=(T=V==null?void 0:V.properties)===null||T===void 0?void 0:T[y];if(typeof X!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${y}"`);_=_&&(E||$(V)),M(X,B)}if(!_)throw new Error(`discriminator: "${y}" must be required`);return C;function $({required:B}){return Array.isArray(B)&&B.includes(y)}function M(B,V){if(B.const)j(B.const,V);else if(B.enum)for(const X of B.enum)j(X,V);else throw new Error(`discriminator: "properties/${y}" must have "const" or "enum"`)}function j(B,V){if(typeof B!="string"||B in C)throw new Error(`discriminator: "${y}" values must be unique strings`);C[B]=V}}}};return Xw.default=a,Xw}var Zw={};const RFe="https://json-schema.org/draft/2020-12/schema",IFe="https://json-schema.org/draft/2020-12/schema",$Fe={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},AFe="meta",MFe="Core and Validation specifications meta-schema",NFe=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],jFe=["object","boolean"],DFe="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",LFe={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},QFe={$schema:RFe,$id:IFe,$vocabulary:$Fe,$dynamicAnchor:AFe,title:MFe,allOf:NFe,type:jFe,$comment:DFe,properties:LFe},VFe="https://json-schema.org/draft/2020-12/schema",FFe="https://json-schema.org/draft/2020-12/meta/applicator",BFe={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},zFe="meta",qFe="Applicator vocabulary meta-schema",WFe=["object","boolean"],UFe={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},HFe={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},XFe={$schema:VFe,$id:FFe,$vocabulary:BFe,$dynamicAnchor:zFe,title:qFe,type:WFe,properties:UFe,$defs:HFe},ZFe="https://json-schema.org/draft/2020-12/schema",GFe="https://json-schema.org/draft/2020-12/meta/unevaluated",YFe={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},KFe="meta",JFe="Unevaluated applicator vocabulary meta-schema",e3e=["object","boolean"],t3e={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},r3e={$schema:ZFe,$id:GFe,$vocabulary:YFe,$dynamicAnchor:KFe,title:JFe,type:e3e,properties:t3e},n3e="https://json-schema.org/draft/2020-12/schema",i3e="https://json-schema.org/draft/2020-12/meta/content",o3e={"https://json-schema.org/draft/2020-12/vocab/content":!0},a3e="meta",s3e="Content vocabulary meta-schema",l3e=["object","boolean"],c3e={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},u3e={$schema:n3e,$id:i3e,$vocabulary:o3e,$dynamicAnchor:a3e,title:s3e,type:l3e,properties:c3e},d3e="https://json-schema.org/draft/2020-12/schema",f3e="https://json-schema.org/draft/2020-12/meta/core",h3e={"https://json-schema.org/draft/2020-12/vocab/core":!0},p3e="meta",g3e="Core vocabulary meta-schema",m3e=["object","boolean"],v3e={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},y3e={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},b3e={$schema:d3e,$id:f3e,$vocabulary:h3e,$dynamicAnchor:p3e,title:g3e,type:m3e,properties:v3e,$defs:y3e},O3e="https://json-schema.org/draft/2020-12/schema",w3e="https://json-schema.org/draft/2020-12/meta/format-annotation",S3e={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},x3e="meta",P3e="Format vocabulary meta-schema for annotation results",k3e=["object","boolean"],C3e={format:{type:"string"}},T3e={$schema:O3e,$id:w3e,$vocabulary:S3e,$dynamicAnchor:x3e,title:P3e,type:k3e,properties:C3e},E3e="https://json-schema.org/draft/2020-12/schema",_3e="https://json-schema.org/draft/2020-12/meta/meta-data",R3e={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},I3e="meta",$3e="Meta-data vocabulary meta-schema",A3e=["object","boolean"],M3e={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},N3e={$schema:E3e,$id:_3e,$vocabulary:R3e,$dynamicAnchor:I3e,title:$3e,type:A3e,properties:M3e},j3e="https://json-schema.org/draft/2020-12/schema",D3e="https://json-schema.org/draft/2020-12/meta/validation",L3e={"https://json-schema.org/draft/2020-12/vocab/validation":!0},Q3e="meta",V3e="Validation vocabulary meta-schema",F3e=["object","boolean"],B3e={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},z3e={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},q3e={$schema:j3e,$id:D3e,$vocabulary:L3e,$dynamicAnchor:Q3e,title:V3e,type:F3e,properties:B3e,$defs:z3e};var i6;function W3e(){if(i6)return Zw;i6=1,Object.defineProperty(Zw,"__esModule",{value:!0});const t=QFe,e=XFe,r=r3e,n=u3e,i=b3e,o=T3e,a=N3e,s=q3e,l=["/properties"];function c(d){return[t,e,r,n,i,p(this,o),a,p(this,s)].forEach(g=>this.addMetaSchema(g,void 0,!1)),this;function p(g,m){return d?g.$dataMetaSchema(m,l):m}}return Zw.default=c,Zw}var o6;function U3e(){return o6||(o6=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const r=VVe(),n=TFe(),i=_Fe(),o=W3e(),a="https://json-schema.org/draft/2020-12/schema";class s extends r.default{constructor(m={}){super({...m,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(m=>this.addVocabulary(m)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:m,meta:y}=this.opts;y&&(o.default.call(this,m),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var l=WP();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=Bt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var d=SM();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=UP();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}(tw,tw.exports)),tw.exports}var H3e=U3e();const X3e=Uu(H3e),$g={deprecated:{type:"boolean"},title:{type:"string"},description:{type:"string"}},Z3e={type:"object",properties:{...$g,$ref:{type:"string"}},additionalProperties:!1,required:["$ref"]},G3e={type:{const:"string"},default:{type:"string"},readOnly:{type:"boolean"},pattern:{type:"string",format:"regex"},enum:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},format:{type:"string",enum:["date-time","date","time","email","regex"]},contentMediaType:{type:"string",enum:["text/plain","text/markdown","text/html","application/json","application/schema+json","application/yaml"]},...$g},Y3e={type:"object",properties:{...G3e,foreignKey:{type:"string"}},additionalProperties:!1,required:["type","default"]},K3e={type:"object",properties:{type:{const:"number"},default:{type:"number"},readOnly:{type:"boolean"},...$g},additionalProperties:!1,required:["type","default"]},J3e={type:"object",properties:{type:{const:"boolean"},default:{type:"boolean"},readOnly:{type:"boolean"},...$g},additionalProperties:!1,required:["type","default"]},eBe={type:"object",properties:{type:{const:"object"},...$g,properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},additionalProperties:{const:!1},required:{$ref:"#/$defs/stringArray"}},additionalProperties:!1,required:["type","properties","additionalProperties","required"]},tBe={type:"object",properties:{type:{const:"array"},...$g,items:{oneOf:[{$ref:"#/$defs/refSchema"},{$ref:"#/$defs/objectSchema"},{$ref:"#/$defs/arraySchema"},{$ref:"#/$defs/stringSchema"},{$ref:"#/$defs/numberSchema"},{$ref:"#/$defs/booleanSchema"}]}},additionalProperties:!1,required:["type","items"]},rBe={$id:"meta-schema.json",type:"object",$dynamicAnchor:"meta",oneOf:[{$ref:"#/$defs/refSchema"},{$ref:"#/$defs/objectSchema"},{$ref:"#/$defs/arraySchema"},{$ref:"#/$defs/stringSchema"},{$ref:"#/$defs/numberSchema"},{$ref:"#/$defs/booleanSchema"}],$defs:{stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]},refSchema:Z3e,objectSchema:eBe,stringSchema:Y3e,numberSchema:K3e,booleanSchema:J3e,arraySchema:tBe}},Gy=new X3e;Gy.addKeyword({keyword:"foreignKey",type:"string"});Gy.addFormat("regex",{type:"string",validate:t=>{try{return new RegExp(t),!0}catch{return!1}}});const RJ=t=>Gy.validate(rBe,t),nBe=(t,e)=>({result:Gy.validate(t,e),errors:Gy.errors}),iBe=({dataTestId:t,...e})=>P.jsx(Ti,{"data-testid":t,_hover:{backgroundColor:"gray.100"},color:"gray.400",variant:"ghost",...e,children:P.jsx(Z2,{})}),oBe="_JsonCard_15gzu_1",aBe="_CopyButton_15gzu_1",a6={JsonCard:oBe,CopyButton:aBe},IJ=({data:t,readonly:e,onChange:r,schema:n})=>{const[i,o]=A.useState(""),a=JSON.stringify(t,null,3),s=A.useCallback(async()=>{await navigator.clipboard.writeText(a),ef.info({duration:1500,description:"Copied to clipboard"})},[a]),l=A.useCallback(c=>{var d,p,g,m;try{const y=JSON.parse(c);if(r==null||r(y),n){const b=nBe(n,y);if(!b.result){const O=(p=(d=b.errors)==null?void 0:d[0])==null?void 0:p.instancePath;o(`"${O||"/"}": ${(m=(g=b.errors)==null?void 0:g[0])==null?void 0:m.message}`);return}}o(""),r==null||r(y)}catch(y){console.error(y),o("Invalid JSON")}},[r,n]);return P.jsxs(Te,{position:"relative",width:"100%",flex:1,className:a6.JsonCard,direction:"column",gap:"1rem",children:[P.jsxs(ze,{p:1,flex:1,children:[P.jsx(wM,{value:a,extensions:[Ve.lineWrapping,PVe()],editable:!e,theme:gK,maxWidth:"100%",basicSetup:{lineNumbers:!0,foldGutter:!0},onChange:l}),P.jsx(iBe,{dataTestId:"json-card-copy-button","aria-label":"",position:"absolute",top:"8px",right:"8px",className:a6.CopyButton,onClick:s})]}),P.jsx(Te,{height:"40px",paddingBottom:"8px",alignItems:"flex-end",backgroundColor:"white",width:"100%",position:"sticky",bottom:0,justifyContent:"center",children:P.jsx(dt,{color:"gray",children:i})})]})},$J=({onClick:t,isDisabled:e,dataTestId:r})=>P.jsx(Ti,{"data-testid":r,disabled:e,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",color:"gray.400",height:"2.5rem",variant:"ghost",onClick:t,width:"48px",size:"sm",children:P.jsx(dX,{})}),sBe="_Root_1k7pa_1",lBe="_Actions_1k7pa_1",s6={Root:sBe,Actions:lBe},l6=mt(({store:t,mode:e,onApprove:r,onCancel:n,onSelectForeignKey:i})=>{const[o,a]=A.useState(!1),s=A.useCallback(async()=>{a(!0),await r(),a(!1)},[r]);return P.jsx(aG.Provider,{value:{onSelectForeignKey:i,mode:e,root:t},children:P.jsxs(Te,{flex:1,flexDirection:"column",gap:"0.5rem",className:s6.Root,"date-testid":"schema-data-card",children:[P.jsxs(Te,{justifyContent:"space-between",width:"100%",alignItems:"center",paddingBottom:"8px",children:[P.jsxs(ze,{children:[e===Of.Creating?P.jsx(Nb,{dataTestId:"close-create-table-button",onClick:n}):P.jsx(OG,{dataTestId:"back-to-table-list-button",onClick:n}),P.jsx(Mb,{dataTestId:"schema-editor-approve-button",onClick:s,isDisabled:t.isApproveDisabled,loading:o}),e===Of.Updating&&t.isDirty&&P.jsx($J,{dataTestId:"schema-editor-revert-button",onClick:t.resetChanges})]}),P.jsx(ze,{className:s6.Actions,children:P.jsx(TA,{availableRefByMode:!1,mode:t.viewMode||ki.Tree,onChange:t.setViewMode})})]}),t.viewMode===ki.Tree&&P.jsx(ze,{paddingBottom:"4rem",children:P.jsx(w2e,{store:t})}),t.viewMode===ki.Json&&P.jsx(IJ,{readonly:!0,data:t.getPlainSchema()})]})})}),cBe=t=>[...AS(t,function*(e){(e instanceof yn||e instanceof ti)&&(yield e)})],Dd=(t,e)=>{const r=[t];let n=t,i=cx(t,e==null?void 0:e.preferDraftParent);for(;i;)r.push(i),n=i,i=cx(n,e==null?void 0:e.preferDraftParent);return r},Gm=t=>{let e="",r=t[0];for(let n=1;n<t.length;n++){const i=t[n];i instanceof yn?e=`/properties/${AJ(r,!1)}${e}`:i instanceof ti&&(e=`/items${e}`),r=i}return e},c6=(t,e)=>{let r="",n=t,i=cx(t,e==null?void 0:e.preferDraftParent);for(;i;)i instanceof yn?r=`/properties/${n===t&&e.preferStartWithNotDraftId?n.id:AJ(n,e==null?void 0:e.preferDraftId)}${r}`:i instanceof ti&&(r=`/items${r}`),n=i,i=cx(n,e==null?void 0:e.preferDraftParent);return r},cx=(t,e)=>e?t.draftParent||t.parent:t.parent||t.draftParent,AJ=(t,e)=>e?t.draftId||t.id:t.id||t.draftId;class uBe{constructor(){de(this,"stack",[]);de(this,"setIdMap",new Set)}add(e){this.stack.push({node:e,op:"add",sequence:Dd(e,{preferDraftParent:!0})})}remove(e){const r=this.stack.findIndex(n=>n.node===e&&n.op==="add");this.deepRemovePatches(e),r===-1&&this.stack.push({node:e,op:"remove",sequence:Dd(e,{preferDraftParent:!0})})}replace(e,r){if(this.checkIfStringOrRefDuplicationInReplace(r))return;this.stack.findIndex(i=>i.node.nodeId===r.nodeId&&i.op==="add")!==-1?(this.deepRemovePatches(e,!1),this.stack.push({node:r,op:"add",sequence:Dd(r,{preferDraftParent:!0})})):(this.deepRemovePatches(e,!0),this.stack.push({node:r,op:"replace",sequence:Dd(r,{preferDraftParent:!0})}))}move(e){const r=this.stack.findIndex(i=>i.node===e&&i.op==="move");r!==-1&&this.stack.splice(r,1),e.parent===e.draftParent&&e.id===e.draftId||this.stack.push({node:e,op:"move",fromSequence:Dd(e,{preferDraftParent:!1}),toSequence:Dd(e,{preferDraftParent:!0})})}reset(){this.stack.length=0,this.setIdMap.clear()}getPatches(e){return[...this.getStackPatches(),...this.getMoveIdPatches(e)]}setId(e){this.setIdMap.add(e.nodeId)}getMoveIdPatches(e){const r=this;return[...AS(e,function*(i){r.setIdMap.has(i.nodeId)&&i.draftParent instanceof yn&&(yield{op:"move",from:c6(i,{preferDraftParent:!0,preferDraftId:!0,preferStartWithNotDraftId:!0}),path:c6(i,{preferDraftParent:!0,preferDraftId:!0})})})]}getStackPatches(){return this.stack.map(e=>{switch(e.op){case"add":return{op:"add",path:Gm(e.sequence),value:e.node.getSchema({skipMovedBetweenParentsNodes:!0})};case"replace":return{op:"replace",path:Gm(e.sequence),value:e.node.getSchema({skipMovedBetweenParentsNodes:!0})};case"remove":return{op:"remove",path:Gm(e.sequence)};case"move":return{op:"move",from:Gm(e.fromSequence),path:Gm(e.toSequence)}}})}checkIfStringOrRefDuplicationInReplace(e){return!!((e.type===yc.String||e.$ref)&&this.stack.find(n=>n.node===e))}deepRemovePatches(e,r){jp(e,n=>{let i=this.stack.findIndex(a=>a.node.nodeId===n.nodeId&&a.op!=="move");for(;i!==-1;)this.stack.splice(i,1),i=this.stack.findIndex(a=>a.node.nodeId===n.nodeId&&a.op!=="move");const o=this.stack.findIndex(a=>a.node.nodeId===n.nodeId&&a.op==="move");return o!==-1?(this.stack.splice(o,1,{node:n,op:"remove",sequence:Dd(n,{preferDraftParent:!1})}),this.deepRemovePatches(n,!0),!1):!0},r)}}class HE{constructor(e=new yn,r=""){de(this,"viewMode",ki.Tree);de(this,"state");de(this,"history",new uBe);lt(this,{},{autoBind:!0}),this.state=Bf(Ut({node:e,tableId:r}))}get node(){return this.state.node}get tableId(){return this.state.tableId}get draftTableId(){return this.state.node.draftId}get isApproveDisabled(){return!this.state.node.isValid||!this.state.node.isDirty}get isDirty(){return this.state.node.isDirty}get isDirtyItself(){return this.state.node.isDirtyItself}getPlainSchema(){return this.state.node.getSchema()}setViewMode(e){this.viewMode=e}getPatches(){return this.state.node!==this.state.model.node?[{op:"replace",path:"",value:this.state.node.getSchema()}]:[...this.history.getPatches(this.state.node)]}areThereDropTargets(e){return Mn(()=>!!cBe(this.state.node).filter(n=>sv(n,e)).length).get()}replaceNode(e){this.state.node=e}submitChanges(){this.node.submitChanges(),this.state.tableId=this.node.id,this.state.submit(),this.history.reset()}resetChanges(){this.node.resetChanges(),this.history.reset()}setId(e,r){e.setId(r),e.parent&&this.history.setId(e)}addProperty(e,r,n=null){e.addProperty(r,n),r.parent?this.history.move(r):this.history.add(r)}removeProperty(e,r){e.removeProperty(r.nodeId),this.history.remove(r)}replaceProperty(e,r,n){e.replaceProperty(r,n),this.history.replace(r,n)}replaceItems(e,r){const n=e.draftItems;e.replaceItems(r),r.parent?this.history.move(r):this.history.replace(n,r)}setForeignKey(e,r){e.setForeignKey(r),this.history.replace(e,e)}setForeignKeyValue(e,r){e&&e.draftParent&&(e.setForeignKey(r),this.history.replace(e.draftParent,e.draftParent))}}const dBe=(t,e=!1)=>{let r="",n=t;for(;n.draftParent;)n.draftParent instanceof yn?r=`/properties/${n===t&&e?n.id:n.draftId}${r}`:n.draftParent instanceof ti&&(r=`/items${r}`),n=n.draftParent;return r},fBe=Ae`
|
|
1108
|
+
deps: ${d}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(l){const[c,d]=o(l);a(l,c),s(l,d)}};function o({schema:l}){const c={},d={};for(const p in l){if(p==="__proto__")continue;const g=Array.isArray(l[p])?c:d;g[p]=l[p]}return[c,d]}function a(l,c=l.schema){const{gen:d,data:p,it:g}=l;if(Object.keys(c).length===0)return;const m=d.let("missing");for(const y in c){const b=c[y];if(b.length===0)continue;const O=(0,n.propertyInData)(d,p,y,g.opts.ownProperties);l.setParams({property:y,depsCount:b.length,deps:b.join(", ")}),g.allErrors?d.if(O,()=>{for(const S of b)(0,n.checkReportMissingProp)(l,S)}):(d.if((0,e._)`${O} && (${(0,n.checkMissingProp)(l,b,m)})`),(0,n.reportMissingProp)(l,m),d.else())}}t.validatePropertyDeps=a;function s(l,c=l.schema){const{gen:d,data:p,keyword:g,it:m}=l,y=d.name("valid");for(const b in c)(0,r.alwaysValidSchema)(m,c[b])||(d.if((0,n.propertyInData)(d,p,b,m.opts.ownProperties),()=>{const O=l.subschema({keyword:g,schemaProp:b},y);l.mergeValidEvaluated(O,y)},()=>d.var(y,!0)),l.ok(y))}t.validateSchemaDeps=s,t.default=i}(UE)),UE}var Cw={},_B;function iFe(){if(_B)return Cw;_B=1,Object.defineProperty(Cw,"__esModule",{value:!0});const t=Bt(),e=nr(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,t._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:o,schema:a,data:s,it:l}=i;if((0,e.alwaysValidSchema)(l,a))return;const c=o.name("valid");o.forIn("key",s,d=>{i.setParams({propertyName:d}),i.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},c),o.if((0,t.not)(c),()=>{i.error(!0),l.allErrors||o.break()})}),i.ok(c)}};return Cw.default=n,Cw}var Tw={},RB;function TJ(){if(RB)return Tw;RB=1,Object.defineProperty(Tw,"__esModule",{value:!0});const t=Is(),e=Bt(),r=Rs(),n=nr(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,e._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:s,schema:l,parentSchema:c,data:d,errsCount:p,it:g}=a;if(!p)throw new Error("ajv implementation error");const{allErrors:m,opts:y}=g;if(g.props=!0,y.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(g,l))return;const b=(0,t.allSchemaProperties)(c.properties),O=(0,t.allSchemaProperties)(c.patternProperties);S(),a.ok((0,e._)`${p} === ${r.default.errors}`);function S(){s.forIn("key",d,E=>{!b.length&&!O.length?T(E):s.if(w(E),()=>T(E))})}function w(E){let _;if(b.length>8){const $=(0,n.schemaRefOrVal)(g,c.properties,"properties");_=(0,t.isOwnProperty)(s,$,E)}else b.length?_=(0,e.or)(...b.map($=>(0,e._)`${E} === ${$}`)):_=e.nil;return O.length&&(_=(0,e.or)(_,...O.map($=>(0,e._)`${(0,t.usePattern)(a,$)}.test(${E})`))),(0,e.not)(_)}function k(E){s.code((0,e._)`delete ${d}[${E}]`)}function T(E){if(y.removeAdditional==="all"||y.removeAdditional&&l===!1){k(E);return}if(l===!1){a.setParams({additionalProperty:E}),a.error(),m||s.break();return}if(typeof l=="object"&&!(0,n.alwaysValidSchema)(g,l)){const _=s.name("valid");y.removeAdditional==="failing"?(C(E,_,!1),s.if((0,e.not)(_),()=>{a.reset(),k(E)})):(C(E,_),m||s.if((0,e.not)(_),()=>s.break()))}}function C(E,_,$){const M={keyword:"additionalProperties",dataProp:E,dataPropType:n.Type.Str};$===!1&&Object.assign(M,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(M,_)}}};return Tw.default=o,Tw}var Ew={},IB;function oFe(){if(IB)return Ew;IB=1,Object.defineProperty(Ew,"__esModule",{value:!0});const t=WP(),e=Is(),r=nr(),n=TJ(),i={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:s,parentSchema:l,data:c,it:d}=o;d.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(d,n.default,"additionalProperties"));const p=(0,e.allSchemaProperties)(s);for(const O of p)d.definedProperties.add(O);d.opts.unevaluated&&p.length&&d.props!==!0&&(d.props=r.mergeEvaluated.props(a,(0,r.toHash)(p),d.props));const g=p.filter(O=>!(0,r.alwaysValidSchema)(d,s[O]));if(g.length===0)return;const m=a.name("valid");for(const O of g)y(O)?b(O):(a.if((0,e.propertyInData)(a,c,O,d.opts.ownProperties)),b(O),d.allErrors||a.else().var(m,!0),a.endIf()),o.it.definedProperties.add(O),o.ok(m);function y(O){return d.opts.useDefaults&&!d.compositeRule&&s[O].default!==void 0}function b(O){o.subschema({keyword:"properties",schemaProp:O,dataProp:O},m)}}};return Ew.default=i,Ew}var _w={},$B;function aFe(){if($B)return _w;$B=1,Object.defineProperty(_w,"__esModule",{value:!0});const t=Is(),e=Bt(),r=nr(),n=nr(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:s,data:l,parentSchema:c,it:d}=o,{opts:p}=d,g=(0,t.allSchemaProperties)(s),m=g.filter(T=>(0,r.alwaysValidSchema)(d,s[T]));if(g.length===0||m.length===g.length&&(!d.opts.unevaluated||d.props===!0))return;const y=p.strictSchema&&!p.allowMatchingProperties&&c.properties,b=a.name("valid");d.props!==!0&&!(d.props instanceof e.Name)&&(d.props=(0,n.evaluatedPropsToName)(a,d.props));const{props:O}=d;S();function S(){for(const T of g)y&&w(T),d.allErrors?k(T):(a.var(b,!0),k(T),a.if(b))}function w(T){for(const C in y)new RegExp(T).test(C)&&(0,r.checkStrictMode)(d,`property ${C} matches pattern ${T} (use allowMatchingProperties)`)}function k(T){a.forIn("key",l,C=>{a.if((0,e._)`${(0,t.usePattern)(o,T)}.test(${C})`,()=>{const E=m.includes(T);E||o.subschema({keyword:"patternProperties",schemaProp:T,dataProp:C,dataPropType:n.Type.Str},b),d.opts.unevaluated&&O!==!0?a.assign((0,e._)`${O}[${C}]`,!0):!E&&!d.allErrors&&a.if((0,e.not)(b),()=>a.break())})})}}};return _w.default=i,_w}var Rw={},AB;function sFe(){if(AB)return Rw;AB=1,Object.defineProperty(Rw,"__esModule",{value:!0});const t=nr(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:o}=r;if((0,t.alwaysValidSchema)(o,i)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Rw.default=e,Rw}var Iw={},MB;function lFe(){if(MB)return Iw;MB=1,Object.defineProperty(Iw,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Is().validateUnion,error:{message:"must match a schema in anyOf"}};return Iw.default=e,Iw}var $w={},NB;function cFe(){if(NB)return $w;NB=1,Object.defineProperty($w,"__esModule",{value:!0});const t=Bt(),e=nr(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,t._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:o,schema:a,parentSchema:s,it:l}=i;if(!Array.isArray(a))throw new Error("ajv implementation error");if(l.opts.discriminator&&s.discriminator)return;const c=a,d=o.let("valid",!1),p=o.let("passing",null),g=o.name("_valid");i.setParams({passing:p}),o.block(m),i.result(d,()=>i.reset(),()=>i.error(!0));function m(){c.forEach((y,b)=>{let O;(0,e.alwaysValidSchema)(l,y)?o.var(g,!0):O=i.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},g),b>0&&o.if((0,t._)`${g} && ${d}`).assign(d,!1).assign(p,(0,t._)`[${p}, ${b}]`).else(),o.if(g,()=>{o.assign(d,!0),o.assign(p,b),O&&i.mergeEvaluated(O,t.Name)})})}}};return $w.default=n,$w}var Aw={},jB;function uFe(){if(jB)return Aw;jB=1,Object.defineProperty(Aw,"__esModule",{value:!0});const t=nr(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:i,it:o}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const a=n.name("valid");i.forEach((s,l)=>{if((0,t.alwaysValidSchema)(o,s))return;const c=r.subschema({keyword:"allOf",schemaProp:l},a);r.ok(a),r.mergeEvaluated(c)})}};return Aw.default=e,Aw}var Mw={},DB;function dFe(){if(DB)return Mw;DB=1,Object.defineProperty(Mw,"__esModule",{value:!0});const t=Bt(),e=nr(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,t.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,t._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:a,parentSchema:s,it:l}=o;s.then===void 0&&s.else===void 0&&(0,e.checkStrictMode)(l,'"if" without "then" and "else" is ignored');const c=i(l,"then"),d=i(l,"else");if(!c&&!d)return;const p=a.let("valid",!0),g=a.name("_valid");if(m(),o.reset(),c&&d){const b=a.let("ifClause");o.setParams({ifClause:b}),a.if(g,y("then",b),y("else",b))}else c?a.if(g,y("then")):a.if((0,t.not)(g),y("else"));o.pass(p,()=>o.error(!0));function m(){const b=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);o.mergeEvaluated(b)}function y(b,O){return()=>{const S=o.subschema({keyword:b},g);a.assign(p,g),o.mergeValidEvaluated(S,p),O?a.assign(O,(0,t._)`${b}`):o.setParams({ifClause:b})}}}};function i(o,a){const s=o.schema[a];return s!==void 0&&!(0,e.alwaysValidSchema)(o,s)}return Mw.default=n,Mw}var Nw={},LB;function fFe(){if(LB)return Nw;LB=1,Object.defineProperty(Nw,"__esModule",{value:!0});const t=nr(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return Nw.default=e,Nw}var QB;function hFe(){if(QB)return Sw;QB=1,Object.defineProperty(Sw,"__esModule",{value:!0});const t=kJ(),e=tFe(),r=CJ(),n=rFe(),i=nFe(),o=kM(),a=iFe(),s=TJ(),l=oFe(),c=aFe(),d=sFe(),p=lFe(),g=cFe(),m=uFe(),y=dFe(),b=fFe();function O(S=!1){const w=[d.default,p.default,g.default,m.default,y.default,b.default,a.default,s.default,o.default,l.default,c.default];return S?w.push(e.default,n.default):w.push(t.default,r.default),w.push(i.default),w}return Sw.default=O,Sw}var jw={},Ih={},VB;function EJ(){if(VB)return Ih;VB=1,Object.defineProperty(Ih,"__esModule",{value:!0}),Ih.dynamicAnchor=void 0;const t=Bt(),e=Rs(),r=HP(),n=xM(),i={keyword:"$dynamicAnchor",schemaType:"string",code:s=>o(s,s.schema)};function o(s,l){const{gen:c,it:d}=s;d.schemaEnv.root.dynamicAnchors[l]=!0;const p=(0,t._)`${e.default.dynamicAnchors}${(0,t.getProperty)(l)}`,g=d.errSchemaPath==="#"?d.validateName:a(s);c.if((0,t._)`!${p}`,()=>c.assign(p,g))}Ih.dynamicAnchor=o;function a(s){const{schemaEnv:l,schema:c,self:d}=s.it,{root:p,baseId:g,localRefs:m,meta:y}=l.root,{schemaId:b}=d.opts,O=new r.SchemaEnv({schema:c,schemaId:b,root:p,baseId:g,localRefs:m,meta:y});return r.compileSchema.call(d,O),(0,n.getValidate)(s,O)}return Ih.default=i,Ih}var $h={},FB;function _J(){if(FB)return $h;FB=1,Object.defineProperty($h,"__esModule",{value:!0}),$h.dynamicRef=void 0;const t=Bt(),e=Rs(),r=xM(),n={keyword:"$dynamicRef",schemaType:"string",code:o=>i(o,o.schema)};function i(o,a){const{gen:s,keyword:l,it:c}=o;if(a[0]!=="#")throw new Error(`"${l}" only supports hash fragment reference`);const d=a.slice(1);if(c.allErrors)p();else{const m=s.let("valid",!1);p(m),o.ok(m)}function p(m){if(c.schemaEnv.root.dynamicAnchors[d]){const y=s.let("_v",(0,t._)`${e.default.dynamicAnchors}${(0,t.getProperty)(d)}`);s.if(y,g(y,m),g(c.validateName,m))}else g(c.validateName,m)()}function g(m,y){return y?()=>s.block(()=>{(0,r.callRef)(o,m),s.let(y,!0)}):()=>(0,r.callRef)(o,m)}}return $h.dynamicRef=i,$h.default=n,$h}var Dw={},BB;function pFe(){if(BB)return Dw;BB=1,Object.defineProperty(Dw,"__esModule",{value:!0});const t=EJ(),e=nr(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,t.dynamicAnchor)(n,""):(0,e.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return Dw.default=r,Dw}var Lw={},zB;function gFe(){if(zB)return Lw;zB=1,Object.defineProperty(Lw,"__esModule",{value:!0});const t=_J(),e={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,t.dynamicRef)(r,r.schema)};return Lw.default=e,Lw}var qB;function mFe(){if(qB)return jw;qB=1,Object.defineProperty(jw,"__esModule",{value:!0});const t=EJ(),e=_J(),r=pFe(),n=gFe(),i=[t.default,e.default,r.default,n.default];return jw.default=i,jw}var Qw={},Vw={},WB;function vFe(){if(WB)return Vw;WB=1,Object.defineProperty(Vw,"__esModule",{value:!0});const t=kM(),e={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:r=>(0,t.validatePropertyDeps)(r)};return Vw.default=e,Vw}var Fw={},UB;function yFe(){if(UB)return Fw;UB=1,Object.defineProperty(Fw,"__esModule",{value:!0});const t=kM(),e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,t.validateSchemaDeps)(r)};return Fw.default=e,Fw}var Bw={},HB;function bFe(){if(HB)return Bw;HB=1,Object.defineProperty(Bw,"__esModule",{value:!0});const t=nr(),e={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:i}){n.contains===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "contains" is ignored`)}};return Bw.default=e,Bw}var XB;function OFe(){if(XB)return Qw;XB=1,Object.defineProperty(Qw,"__esModule",{value:!0});const t=vFe(),e=yFe(),r=bFe(),n=[t.default,e.default,r.default];return Qw.default=n,Qw}var zw={},qw={},ZB;function wFe(){if(ZB)return qw;ZB=1,Object.defineProperty(qw,"__esModule",{value:!0});const t=Bt(),e=nr(),r=Rs(),i={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,t._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:a,schema:s,data:l,errsCount:c,it:d}=o;if(!c)throw new Error("ajv implementation error");const{allErrors:p,props:g}=d;g instanceof t.Name?a.if((0,t._)`${g} !== true`,()=>a.forIn("key",l,O=>a.if(y(g,O),()=>m(O)))):g!==!0&&a.forIn("key",l,O=>g===void 0?m(O):a.if(b(g,O),()=>m(O))),d.props=!0,o.ok((0,t._)`${c} === ${r.default.errors}`);function m(O){if(s===!1){o.setParams({unevaluatedProperty:O}),o.error(),p||a.break();return}if(!(0,e.alwaysValidSchema)(d,s)){const S=a.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:O,dataPropType:e.Type.Str},S),p||a.if((0,t.not)(S),()=>a.break())}}function y(O,S){return(0,t._)`!${O} || !${O}[${S}]`}function b(O,S){const w=[];for(const k in O)O[k]===!0&&w.push((0,t._)`${S} !== ${k}`);return(0,t.and)(...w)}}};return qw.default=i,qw}var Ww={},GB;function SFe(){if(GB)return Ww;GB=1,Object.defineProperty(Ww,"__esModule",{value:!0});const t=Bt(),e=nr(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:i}})=>(0,t.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,t._)`{limit: ${i}}`},code(i){const{gen:o,schema:a,data:s,it:l}=i,c=l.items||0;if(c===!0)return;const d=o.const("len",(0,t._)`${s}.length`);if(a===!1)i.setParams({len:c}),i.fail((0,t._)`${d} > ${c}`);else if(typeof a=="object"&&!(0,e.alwaysValidSchema)(l,a)){const g=o.var("valid",(0,t._)`${d} <= ${c}`);o.if((0,t.not)(g),()=>p(g,c)),i.ok(g)}l.items=!0;function p(g,m){o.forRange("i",m,d,y=>{i.subschema({keyword:"unevaluatedItems",dataProp:y,dataPropType:e.Type.Num},g),l.allErrors||o.if((0,t.not)(g),()=>o.break())})}}};return Ww.default=n,Ww}var YB;function xFe(){if(YB)return zw;YB=1,Object.defineProperty(zw,"__esModule",{value:!0});const t=wFe(),e=SFe(),r=[t.default,e.default];return zw.default=r,zw}var Uw={},Hw={},KB;function PFe(){if(KB)return Hw;KB=1,Object.defineProperty(Hw,"__esModule",{value:!0});const t=Bt(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,i){const{gen:o,data:a,$data:s,schema:l,schemaCode:c,it:d}=n,{opts:p,errSchemaPath:g,schemaEnv:m,self:y}=d;if(!p.validateFormats)return;s?b():O();function b(){const S=o.scopeValue("formats",{ref:y.formats,code:p.code.formats}),w=o.const("fDef",(0,t._)`${S}[${c}]`),k=o.let("fType"),T=o.let("format");o.if((0,t._)`typeof ${w} == "object" && !(${w} instanceof RegExp)`,()=>o.assign(k,(0,t._)`${w}.type || "string"`).assign(T,(0,t._)`${w}.validate`),()=>o.assign(k,(0,t._)`"string"`).assign(T,w)),n.fail$data((0,t.or)(C(),E()));function C(){return p.strictSchema===!1?t.nil:(0,t._)`${c} && !${T}`}function E(){const _=m.$async?(0,t._)`(${w}.async ? await ${T}(${a}) : ${T}(${a}))`:(0,t._)`${T}(${a})`,$=(0,t._)`(typeof ${T} == "function" ? ${_} : ${T}.test(${a}))`;return(0,t._)`${T} && ${T} !== true && ${k} === ${i} && !${$}`}}function O(){const S=y.formats[l];if(!S){C();return}if(S===!0)return;const[w,k,T]=E(S);w===i&&n.pass(_());function C(){if(p.strictSchema===!1){y.logger.warn($());return}throw new Error($());function $(){return`unknown format "${l}" ignored in schema at path "${g}"`}}function E($){const M=$ instanceof RegExp?(0,t.regexpCode)($):p.code.formats?(0,t._)`${p.code.formats}${(0,t.getProperty)(l)}`:void 0,j=o.scopeValue("formats",{key:l,ref:$,code:M});return typeof $=="object"&&!($ instanceof RegExp)?[$.type||"string",$.validate,(0,t._)`${j}.validate`]:["string",$,j]}function _(){if(typeof S=="object"&&!(S instanceof RegExp)&&S.async){if(!m.$async)throw new Error("async format in sync schema");return(0,t._)`await ${T}(${a})`}return typeof k=="function"?(0,t._)`${T}(${a})`:(0,t._)`${T}.test(${a})`}}}};return Hw.default=r,Hw}var JB;function kFe(){if(JB)return Uw;JB=1,Object.defineProperty(Uw,"__esModule",{value:!0});const e=[PFe().default];return Uw.default=e,Uw}var jd={},e6;function CFe(){return e6||(e6=1,Object.defineProperty(jd,"__esModule",{value:!0}),jd.contentVocabulary=jd.metadataVocabulary=void 0,jd.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],jd.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),jd}var t6;function TFe(){if(t6)return aw;t6=1,Object.defineProperty(aw,"__esModule",{value:!0});const t=BVe(),e=eFe(),r=hFe(),n=mFe(),i=OFe(),o=xFe(),a=kFe(),s=CFe(),l=[n.default,t.default,e.default,(0,r.default)(!0),a.default,s.metadataVocabulary,s.contentVocabulary,i.default,o.default];return aw.default=l,aw}var Xw={},Zm={},r6;function EFe(){if(r6)return Zm;r6=1,Object.defineProperty(Zm,"__esModule",{value:!0}),Zm.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(Zm.DiscrError=t={})),Zm}var n6;function _Fe(){if(n6)return Xw;n6=1,Object.defineProperty(Xw,"__esModule",{value:!0});const t=Bt(),e=EFe(),r=HP(),n=UP(),i=nr(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:l}})=>s===e.DiscrError.Tag?`tag "${l}" must be string`:`value of tag "${l}" must be in oneOf`,params:({params:{discrError:s,tag:l,tagName:c}})=>(0,t._)`{error: ${s}, tag: ${c}, tagValue: ${l}}`},code(s){const{gen:l,data:c,schema:d,parentSchema:p,it:g}=s,{oneOf:m}=p;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const y=d.propertyName;if(typeof y!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!m)throw new Error("discriminator: requires oneOf keyword");const b=l.let("valid",!1),O=l.const("tag",(0,t._)`${c}${(0,t.getProperty)(y)}`);l.if((0,t._)`typeof ${O} == "string"`,()=>S(),()=>s.error(!1,{discrError:e.DiscrError.Tag,tag:O,tagName:y})),s.ok(b);function S(){const T=k();l.if(!1);for(const C in T)l.elseIf((0,t._)`${O} === ${C}`),l.assign(b,w(T[C]));l.else(),s.error(!1,{discrError:e.DiscrError.Mapping,tag:O,tagName:y}),l.endIf()}function w(T){const C=l.name("valid"),E=s.subschema({keyword:"oneOf",schemaProp:T},C);return s.mergeEvaluated(E,t.Name),C}function k(){var T;const C={},E=$(p);let _=!0;for(let B=0;B<m.length;B++){let V=m[B];if(V!=null&&V.$ref&&!(0,i.schemaHasRulesButRef)(V,g.self.RULES)){const D=V.$ref;if(V=r.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,D),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new n.default(g.opts.uriResolver,g.baseId,D)}const X=(T=V==null?void 0:V.properties)===null||T===void 0?void 0:T[y];if(typeof X!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${y}"`);_=_&&(E||$(V)),M(X,B)}if(!_)throw new Error(`discriminator: "${y}" must be required`);return C;function $({required:B}){return Array.isArray(B)&&B.includes(y)}function M(B,V){if(B.const)j(B.const,V);else if(B.enum)for(const X of B.enum)j(X,V);else throw new Error(`discriminator: "properties/${y}" must have "const" or "enum"`)}function j(B,V){if(typeof B!="string"||B in C)throw new Error(`discriminator: "${y}" values must be unique strings`);C[B]=V}}}};return Xw.default=a,Xw}var Zw={};const RFe="https://json-schema.org/draft/2020-12/schema",IFe="https://json-schema.org/draft/2020-12/schema",$Fe={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},AFe="meta",MFe="Core and Validation specifications meta-schema",NFe=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],jFe=["object","boolean"],DFe="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",LFe={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},QFe={$schema:RFe,$id:IFe,$vocabulary:$Fe,$dynamicAnchor:AFe,title:MFe,allOf:NFe,type:jFe,$comment:DFe,properties:LFe},VFe="https://json-schema.org/draft/2020-12/schema",FFe="https://json-schema.org/draft/2020-12/meta/applicator",BFe={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},zFe="meta",qFe="Applicator vocabulary meta-schema",WFe=["object","boolean"],UFe={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},HFe={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},XFe={$schema:VFe,$id:FFe,$vocabulary:BFe,$dynamicAnchor:zFe,title:qFe,type:WFe,properties:UFe,$defs:HFe},ZFe="https://json-schema.org/draft/2020-12/schema",GFe="https://json-schema.org/draft/2020-12/meta/unevaluated",YFe={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},KFe="meta",JFe="Unevaluated applicator vocabulary meta-schema",e3e=["object","boolean"],t3e={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},r3e={$schema:ZFe,$id:GFe,$vocabulary:YFe,$dynamicAnchor:KFe,title:JFe,type:e3e,properties:t3e},n3e="https://json-schema.org/draft/2020-12/schema",i3e="https://json-schema.org/draft/2020-12/meta/content",o3e={"https://json-schema.org/draft/2020-12/vocab/content":!0},a3e="meta",s3e="Content vocabulary meta-schema",l3e=["object","boolean"],c3e={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},u3e={$schema:n3e,$id:i3e,$vocabulary:o3e,$dynamicAnchor:a3e,title:s3e,type:l3e,properties:c3e},d3e="https://json-schema.org/draft/2020-12/schema",f3e="https://json-schema.org/draft/2020-12/meta/core",h3e={"https://json-schema.org/draft/2020-12/vocab/core":!0},p3e="meta",g3e="Core vocabulary meta-schema",m3e=["object","boolean"],v3e={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},y3e={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},b3e={$schema:d3e,$id:f3e,$vocabulary:h3e,$dynamicAnchor:p3e,title:g3e,type:m3e,properties:v3e,$defs:y3e},O3e="https://json-schema.org/draft/2020-12/schema",w3e="https://json-schema.org/draft/2020-12/meta/format-annotation",S3e={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},x3e="meta",P3e="Format vocabulary meta-schema for annotation results",k3e=["object","boolean"],C3e={format:{type:"string"}},T3e={$schema:O3e,$id:w3e,$vocabulary:S3e,$dynamicAnchor:x3e,title:P3e,type:k3e,properties:C3e},E3e="https://json-schema.org/draft/2020-12/schema",_3e="https://json-schema.org/draft/2020-12/meta/meta-data",R3e={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},I3e="meta",$3e="Meta-data vocabulary meta-schema",A3e=["object","boolean"],M3e={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},N3e={$schema:E3e,$id:_3e,$vocabulary:R3e,$dynamicAnchor:I3e,title:$3e,type:A3e,properties:M3e},j3e="https://json-schema.org/draft/2020-12/schema",D3e="https://json-schema.org/draft/2020-12/meta/validation",L3e={"https://json-schema.org/draft/2020-12/vocab/validation":!0},Q3e="meta",V3e="Validation vocabulary meta-schema",F3e=["object","boolean"],B3e={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},z3e={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},q3e={$schema:j3e,$id:D3e,$vocabulary:L3e,$dynamicAnchor:Q3e,title:V3e,type:F3e,properties:B3e,$defs:z3e};var i6;function W3e(){if(i6)return Zw;i6=1,Object.defineProperty(Zw,"__esModule",{value:!0});const t=QFe,e=XFe,r=r3e,n=u3e,i=b3e,o=T3e,a=N3e,s=q3e,l=["/properties"];function c(d){return[t,e,r,n,i,p(this,o),a,p(this,s)].forEach(g=>this.addMetaSchema(g,void 0,!1)),this;function p(g,m){return d?g.$dataMetaSchema(m,l):m}}return Zw.default=c,Zw}var o6;function U3e(){return o6||(o6=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const r=VVe(),n=TFe(),i=_Fe(),o=W3e(),a="https://json-schema.org/draft/2020-12/schema";class s extends r.default{constructor(m={}){super({...m,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(m=>this.addVocabulary(m)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:m,meta:y}=this.opts;y&&(o.default.call(this,m),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var l=WP();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=Bt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var d=SM();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=UP();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}(tw,tw.exports)),tw.exports}var H3e=U3e();const X3e=Uu(H3e),$g={deprecated:{type:"boolean"},title:{type:"string"},description:{type:"string"}},Z3e={type:"object",properties:{...$g,$ref:{type:"string"}},additionalProperties:!1,required:["$ref"]},G3e={type:{const:"string"},default:{type:"string"},readOnly:{type:"boolean"},pattern:{type:"string",format:"regex"},enum:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},format:{type:"string",enum:["date-time","date","time","email","regex"]},contentMediaType:{type:"string",enum:["text/plain","text/markdown","text/html","application/json","application/schema+json","application/yaml"]},...$g},Y3e={type:"object",properties:{...G3e,foreignKey:{type:"string"}},additionalProperties:!1,required:["type","default"]},K3e={type:"object",properties:{type:{const:"number"},default:{type:"number"},readOnly:{type:"boolean"},...$g},additionalProperties:!1,required:["type","default"]},J3e={type:"object",properties:{type:{const:"boolean"},default:{type:"boolean"},readOnly:{type:"boolean"},...$g},additionalProperties:!1,required:["type","default"]},eBe={type:"object",properties:{type:{const:"object"},...$g,properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},additionalProperties:{const:!1},required:{$ref:"#/$defs/stringArray"}},additionalProperties:!1,required:["type","properties","additionalProperties","required"]},tBe={type:"object",properties:{type:{const:"array"},...$g,items:{oneOf:[{$ref:"#/$defs/refSchema"},{$ref:"#/$defs/objectSchema"},{$ref:"#/$defs/arraySchema"},{$ref:"#/$defs/stringSchema"},{$ref:"#/$defs/numberSchema"},{$ref:"#/$defs/booleanSchema"}]}},additionalProperties:!1,required:["type","items"]},rBe={$id:"meta-schema.json",type:"object",$dynamicAnchor:"meta",oneOf:[{$ref:"#/$defs/refSchema"},{$ref:"#/$defs/objectSchema"},{$ref:"#/$defs/arraySchema"},{$ref:"#/$defs/stringSchema"},{$ref:"#/$defs/numberSchema"},{$ref:"#/$defs/booleanSchema"}],$defs:{stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]},refSchema:Z3e,objectSchema:eBe,stringSchema:Y3e,numberSchema:K3e,booleanSchema:J3e,arraySchema:tBe}},Gy=new X3e;Gy.addKeyword({keyword:"foreignKey",type:"string"});Gy.addFormat("regex",{type:"string",validate:t=>{try{return new RegExp(t),!0}catch{return!1}}});const RJ=t=>Gy.validate(rBe,t),nBe=(t,e)=>({result:Gy.validate(t,e),errors:Gy.errors}),iBe=({dataTestId:t,...e})=>P.jsx(Ti,{"data-testid":t,_hover:{backgroundColor:"gray.100"},color:"gray.400",variant:"ghost",...e,children:P.jsx(Z2,{})}),oBe="_JsonCard_15gzu_1",aBe="_CopyButton_15gzu_1",a6={JsonCard:oBe,CopyButton:aBe},IJ=({data:t,readonly:e,onChange:r,schema:n})=>{const[i,o]=A.useState(""),a=JSON.stringify(t,null,3),s=A.useCallback(async()=>{await navigator.clipboard.writeText(a),ef.info({duration:1500,description:"Copied to clipboard"})},[a]),l=A.useCallback(c=>{var d,p,g,m;try{const y=JSON.parse(c);if(r==null||r(y),n){const b=nBe(n,y);if(!b.result){const O=(p=(d=b.errors)==null?void 0:d[0])==null?void 0:p.instancePath;o(`"${O||"/"}": ${(m=(g=b.errors)==null?void 0:g[0])==null?void 0:m.message}`);return}}o(""),r==null||r(y)}catch(y){console.error(y),o("Invalid JSON")}},[r,n]);return P.jsxs(Te,{position:"relative",width:"100%",flex:1,className:a6.JsonCard,direction:"column",gap:"1rem",children:[P.jsxs(ze,{p:1,flex:1,children:[P.jsx(wM,{value:a,extensions:[Ve.lineWrapping,PVe()],editable:!e,theme:gK,maxWidth:"100%",basicSetup:{lineNumbers:!0,foldGutter:!0},onChange:l}),P.jsx(iBe,{dataTestId:"json-card-copy-button","aria-label":"",position:"absolute",top:"8px",right:"8px",className:a6.CopyButton,onClick:s})]}),P.jsx(Te,{height:"40px",paddingBottom:"8px",alignItems:"flex-end",backgroundColor:"white",width:"100%",position:"sticky",bottom:0,justifyContent:"center",children:P.jsx(dt,{color:"gray",children:i})})]})},$J=({onClick:t,isDisabled:e,dataTestId:r})=>P.jsx(Ti,{"data-testid":r,disabled:e,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",color:"gray.400",height:"2.5rem",variant:"ghost",onClick:t,width:"48px",size:"sm",children:P.jsx(dX,{})}),sBe="_Root_1k7pa_1",lBe="_Actions_1k7pa_1",s6={Root:sBe,Actions:lBe},l6=mt(({store:t,mode:e,onApprove:r,onCancel:n,onSelectForeignKey:i})=>{const[o,a]=A.useState(!1),s=A.useCallback(async()=>{a(!0),await r(),a(!1)},[r]);return P.jsx(aG.Provider,{value:{onSelectForeignKey:i,mode:e,root:t},children:P.jsxs(Te,{flex:1,flexDirection:"column",gap:"0.5rem",className:s6.Root,"date-testid":"schema-data-card",children:[P.jsxs(Te,{justifyContent:"space-between",width:"100%",alignItems:"center",paddingBottom:"8px",children:[P.jsxs(ze,{children:[e===Of.Creating?P.jsx(Nb,{dataTestId:"close-create-table-button",onClick:n}):P.jsx(OG,{dataTestId:"back-to-table-list-button",onClick:n}),P.jsx(Mb,{dataTestId:"schema-editor-approve-button",onClick:s,isDisabled:t.isApproveDisabled,loading:o}),e===Of.Updating&&t.isDirty&&P.jsx($J,{dataTestId:"schema-editor-revert-button",onClick:t.resetChanges})]}),P.jsx(ze,{className:s6.Actions,children:P.jsx(TA,{availableRefByMode:!1,mode:t.viewMode||ki.Tree,onChange:t.setViewMode})})]}),t.viewMode===ki.Tree&&P.jsx(ze,{paddingBottom:"4rem",children:P.jsx(w2e,{store:t})}),t.viewMode===ki.Json&&P.jsx(IJ,{readonly:!0,data:t.getPlainSchema()})]})})}),cBe=t=>[...AS(t,function*(e){(e instanceof yn||e instanceof ti)&&(yield e)})],Dd=(t,e)=>{const r=[t];let n=t,i=cx(t,e==null?void 0:e.preferDraftParent);for(;i;)r.push(i),n=i,i=cx(n,e==null?void 0:e.preferDraftParent);return r},Gm=t=>{let e="",r=t[0];for(let n=1;n<t.length;n++){const i=t[n];i instanceof yn?e=`/properties/${AJ(r,!1)}${e}`:i instanceof ti&&(e=`/items${e}`),r=i}return e},c6=(t,e)=>{let r="",n=t,i=cx(t,e==null?void 0:e.preferDraftParent);for(;i;)i instanceof yn?r=`/properties/${n===t&&e.preferStartWithNotDraftId?n.id:AJ(n,e==null?void 0:e.preferDraftId)}${r}`:i instanceof ti&&(r=`/items${r}`),n=i,i=cx(n,e==null?void 0:e.preferDraftParent);return r},cx=(t,e)=>e?t.draftParent||t.parent:t.parent||t.draftParent,AJ=(t,e)=>e?t.draftId||t.id:t.id||t.draftId;class uBe{constructor(){fe(this,"stack",[]);fe(this,"setIdMap",new Set)}add(e){this.stack.push({node:e,op:"add",sequence:Dd(e,{preferDraftParent:!0})})}remove(e){const r=this.stack.findIndex(n=>n.node===e&&n.op==="add");this.deepRemovePatches(e),r===-1&&this.stack.push({node:e,op:"remove",sequence:Dd(e,{preferDraftParent:!0})})}replace(e,r){if(this.checkIfStringOrRefDuplicationInReplace(r))return;this.stack.findIndex(i=>i.node.nodeId===r.nodeId&&i.op==="add")!==-1?(this.deepRemovePatches(e,!1),this.stack.push({node:r,op:"add",sequence:Dd(r,{preferDraftParent:!0})})):(this.deepRemovePatches(e,!0),this.stack.push({node:r,op:"replace",sequence:Dd(r,{preferDraftParent:!0})}))}move(e){const r=this.stack.findIndex(i=>i.node===e&&i.op==="move");r!==-1&&this.stack.splice(r,1),e.parent===e.draftParent&&e.id===e.draftId||this.stack.push({node:e,op:"move",fromSequence:Dd(e,{preferDraftParent:!1}),toSequence:Dd(e,{preferDraftParent:!0})})}reset(){this.stack.length=0,this.setIdMap.clear()}getPatches(e){return[...this.getStackPatches(),...this.getMoveIdPatches(e)]}setId(e){this.setIdMap.add(e.nodeId)}getMoveIdPatches(e){const r=this;return[...AS(e,function*(i){r.setIdMap.has(i.nodeId)&&i.draftParent instanceof yn&&(yield{op:"move",from:c6(i,{preferDraftParent:!0,preferDraftId:!0,preferStartWithNotDraftId:!0}),path:c6(i,{preferDraftParent:!0,preferDraftId:!0})})})]}getStackPatches(){return this.stack.map(e=>{switch(e.op){case"add":return{op:"add",path:Gm(e.sequence),value:e.node.getSchema({skipMovedBetweenParentsNodes:!0})};case"replace":return{op:"replace",path:Gm(e.sequence),value:e.node.getSchema({skipMovedBetweenParentsNodes:!0})};case"remove":return{op:"remove",path:Gm(e.sequence)};case"move":return{op:"move",from:Gm(e.fromSequence),path:Gm(e.toSequence)}}})}checkIfStringOrRefDuplicationInReplace(e){return!!((e.type===yc.String||e.$ref)&&this.stack.find(n=>n.node===e))}deepRemovePatches(e,r){jp(e,n=>{let i=this.stack.findIndex(a=>a.node.nodeId===n.nodeId&&a.op!=="move");for(;i!==-1;)this.stack.splice(i,1),i=this.stack.findIndex(a=>a.node.nodeId===n.nodeId&&a.op!=="move");const o=this.stack.findIndex(a=>a.node.nodeId===n.nodeId&&a.op==="move");return o!==-1?(this.stack.splice(o,1,{node:n,op:"remove",sequence:Dd(n,{preferDraftParent:!1})}),this.deepRemovePatches(n,!0),!1):!0},r)}}class HE{constructor(e=new yn,r=""){fe(this,"viewMode",ki.Tree);fe(this,"state");fe(this,"history",new uBe);lt(this,{},{autoBind:!0}),this.state=Bf(Ut({node:e,tableId:r}))}get node(){return this.state.node}get tableId(){return this.state.tableId}get draftTableId(){return this.state.node.draftId}get isApproveDisabled(){return!this.state.node.isValid||!this.state.node.isDirty}get isDirty(){return this.state.node.isDirty}get isDirtyItself(){return this.state.node.isDirtyItself}getPlainSchema(){return this.state.node.getSchema()}setViewMode(e){this.viewMode=e}getPatches(){return this.state.node!==this.state.model.node?[{op:"replace",path:"",value:this.state.node.getSchema()}]:[...this.history.getPatches(this.state.node)]}areThereDropTargets(e){return Mn(()=>!!cBe(this.state.node).filter(n=>sv(n,e)).length).get()}replaceNode(e){this.state.node=e}submitChanges(){this.node.submitChanges(),this.state.tableId=this.node.id,this.state.submit(),this.history.reset()}resetChanges(){this.node.resetChanges(),this.history.reset()}setId(e,r){e.setId(r),e.parent&&this.history.setId(e)}addProperty(e,r,n=null){e.addProperty(r,n),r.parent?this.history.move(r):this.history.add(r)}removeProperty(e,r){e.removeProperty(r.nodeId),this.history.remove(r)}replaceProperty(e,r,n){e.replaceProperty(r,n),this.history.replace(r,n)}replaceItems(e,r){const n=e.draftItems;e.replaceItems(r),r.parent?this.history.move(r):this.history.replace(n,r)}setForeignKey(e,r){e.setForeignKey(r),this.history.replace(e,e)}setForeignKeyValue(e,r){e&&e.draftParent&&(e.setForeignKey(r),this.history.replace(e.draftParent,e.draftParent))}}const dBe=(t,e=!1)=>{let r="",n=t;for(;n.draftParent;)n.draftParent instanceof yn?r=`/properties/${n===t&&e?n.id:n.draftId}${r}`:n.draftParent instanceof ti&&(r=`/items${r}`),n=n.draftParent;return r},fBe=Ae`
|
|
1108
1109
|
mutation CreateTableMst($data: CreateTableInput!) {
|
|
1109
1110
|
createTable(data: $data) {
|
|
1110
1111
|
branch {
|
|
@@ -1137,7 +1138,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1137
1138
|
}
|
|
1138
1139
|
}
|
|
1139
1140
|
${Pl}
|
|
1140
|
-
`,yBe=async t=>{const e=await _r.mutate({mutation:vBe,variables:t});if(!e.data)throw e.errors;return e.data};class bBe{constructor(e,r,n){this.rootStore=e,this.branch=r,this.store=n}async execute(){const e=await this.updateTableRequest();this.resetRowsConnectionCache(),this.branch.touched||this.branch.updateTouched(!0),e&&await this.refetchTablesConnection()}async updateTableRequest(){let e=!1;if(this.store.tableId!==this.store.draftTableId){const n=await mBe({data:{revisionId:this.branch.draft.id,tableId:this.store.tableId,nextTableId:this.store.draftTableId}});this.addVersionedTableToCache(n.renameTable.table),e=!0}if(this.store.getPatches().length){const n=await yBe({data:{revisionId:this.branch.draft.id,tableId:this.store.draftTableId,patches:this.store.getPatches()}}),i=this.addVersionedTableToCache(n.updateTable.table),o=n.updateTable.previousVersionTableId;e=e||i.versionId!==o}return e}addVersionedTableToCache(e){return this.addTableToCache(e)}addTableToCache(e){const r=this.rootStore.cache.addOrTable(Og(e));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.store.draftTableId},r.versionId),r}resetRowsConnectionCache(){const e=this.rootStore.cache.getTableByVariables({tableId:this.store.draftTableId,revisionId:this.branch.draft.id});e&&e.rowsConnection.reset()}async refetchTablesConnection(){await this.rootStore.queryTables({revisionId:this.branch.draft.id,first:50})}}var Qi=(t=>(t.List="List",t.CreatingTable="CreatingTable",t.ConnectingForeignKeyTable="ConnectingForeignKeyTable",t.UpdatingTable="UpdatingTable",t))(Qi||{});class u6{constructor(e,r,n){
|
|
1141
|
+
`,yBe=async t=>{const e=await _r.mutate({mutation:vBe,variables:t});if(!e.data)throw e.errors;return e.data};class bBe{constructor(e,r,n){this.rootStore=e,this.branch=r,this.store=n}async execute(){const e=await this.updateTableRequest();this.resetRowsConnectionCache(),this.branch.touched||this.branch.updateTouched(!0),e&&await this.refetchTablesConnection()}async updateTableRequest(){let e=!1;if(this.store.tableId!==this.store.draftTableId){const n=await mBe({data:{revisionId:this.branch.draft.id,tableId:this.store.tableId,nextTableId:this.store.draftTableId}});this.addVersionedTableToCache(n.renameTable.table),e=!0}if(this.store.getPatches().length){const n=await yBe({data:{revisionId:this.branch.draft.id,tableId:this.store.draftTableId,patches:this.store.getPatches()}}),i=this.addVersionedTableToCache(n.updateTable.table),o=n.updateTable.previousVersionTableId;e=e||i.versionId!==o}return e}addVersionedTableToCache(e){return this.addTableToCache(e)}addTableToCache(e){const r=this.rootStore.cache.addOrTable(Og(e));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.store.draftTableId},r.versionId),r}resetRowsConnectionCache(){const e=this.rootStore.cache.getTableByVariables({tableId:this.store.draftTableId,revisionId:this.branch.draft.id});e&&e.rowsConnection.reset()}async refetchTablesConnection(){await this.rootStore.queryTables({revisionId:this.branch.draft.id,first:50})}}var Qi=(t=>(t.List="List",t.CreatingTable="CreatingTable",t.ConnectingForeignKeyTable="ConnectingForeignKeyTable",t.UpdatingTable="UpdatingTable",t))(Qi||{});class u6{constructor(e,r,n){fe(this,"id",vn());this.rootStore=e,this.projectPageModel=r,this.state=n,lt(this,{},{autoBind:!0})}get currentForeignKeyPath(){return this.state.type==="ConnectingForeignKeyTable"&&this.state.foreignKeyNode.draftParent?dBe(this.state.foreignKeyNode.draftParent):""}get title(){return this.revision.id===this.branch.draft.id?`Branch - ${this.branch.name}[draft]`:this.revision.id===this.branch.head.id?`Branch - ${this.branch.name}`:`Branch - ${this.branch.name}[rev:${this.revision.id.slice(0,6)}]`}toList(){this.state={type:"List",isSelectingForeignKey:this.state.isSelectingForeignKey}}toConnectingForeignKeyTable(e){if(this.state.type==="CreatingTable"||this.state.type==="UpdatingTable")this.state={type:"ConnectingForeignKeyTable",previousType:this.state.type,store:this.state.store,isSelectingForeignKey:this.state.isSelectingForeignKey,foreignKeyNode:e};else throw new Error("Invalid state")}toCreatingTable(){const e=this.state.type==="ConnectingForeignKeyTable"?this.state.store:new HE;this.state={type:"CreatingTable",store:e,isSelectingForeignKey:this.state.isSelectingForeignKey}}toCloningTable(e){const r=this.rootStore.cache.getTable(e);if(!r)throw new Error(`Not found table.versionId ${e}`);const n=Kn(r.schema,{collapse:!0}),i=new HE(n,r.id);this.state={type:"CreatingTable",store:i,isSelectingForeignKey:!1}}toUpdatingTableFromConnectingForeignKeyTable(){if(this.state.type!=="ConnectingForeignKeyTable")throw new Error("Invalid state");const e=this.state.store;this.state={type:"UpdatingTable",store:e,isSelectingForeignKey:this.state.isSelectingForeignKey}}toUpdatingTableFromCreatingTable(){if(this.state.type!=="CreatingTable")throw new Error("Invalid state");const e=this.state.store;this.state={type:"UpdatingTable",store:e,isSelectingForeignKey:!1}}toUpdatingTable(e){const r=this.rootStore.cache.getTable(e);if(!r)throw new Error(`Not found table.versionId ${e}`);const n=Kn(r.schema,{collapse:!0});n.setId(r.id),n.submitChanges();const i=new HE(n,r.id);this.state={type:"UpdatingTable",store:i,isSelectingForeignKey:this.state.isSelectingForeignKey}}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}init(){}dispose(){}async createTable(e,r){try{return await new pBe(this.rootStore,this.branch,e,r).execute(),!0}catch(n){return console.log(n),!1}}async updateTable(e){try{return await new bBe(this.rootStore,this.branch,e).execute(),!0}catch(r){return console.error(r),!1}}}class OBe{constructor(e,r){fe(this,"stack");this.rootStore=e,this.projectPageModel=r,lt(this,{},{autoBind:!0}),this.stack=[this.createFirstStackItem()]}init(){}dispose(){}selectForeignKey(e,r){e.toConnectingForeignKeyTable(r),this.stack.push(new u6(this.rootStore,this.projectPageModel,{type:Qi.List,isSelectingForeignKey:!0}))}onSelectedForeignKey(e,r){const n=this.stack.findIndex(o=>o===e),i=this.stack[n-1];i.state.type===Qi.ConnectingForeignKeyTable&&(i.state.store.setForeignKeyValue(i.state.foreignKeyNode,r),i.state.previousType===Qi.CreatingTable?i.toCreatingTable():i.state.previousType===Qi.UpdatingTable&&i.toUpdatingTableFromConnectingForeignKeyTable()),this.stack.splice(n)}cancelSelectingForeignKey(e){const r=this.stack.findIndex(n=>n===e);r!==-1&&this.stack.splice(r+1),e.state.type===Qi.ConnectingForeignKeyTable&&(e.state.previousType===Qi.CreatingTable?e.toCreatingTable():e.state.previousType===Qi.UpdatingTable&&e.toUpdatingTableFromConnectingForeignKeyTable())}createFirstStackItem(){const e={type:Qi.List,isSelectingForeignKey:!1};return new u6(this.rootStore,this.projectPageModel,e)}}const wBe=()=>{const t=Ui(),[e]=A.useState(()=>new OBe(gt,t));return A.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e},MJ=A.createContext(null),SBe=()=>{const t=A.useContext(MJ);if(!t)throw new Error("Invalid TableStackModelContext");return t},xBe=mt(({onClick:t})=>{const e=Ui();return P.jsx(mg,{dataTestId:"create-table-button",disabled:!e.isEditableRevision,title:"Table",onClick:t})}),XE=()=>P.jsx(Te,{width:"100%",borderStyle:"solid",borderTopWidth:1,borderColor:"gray.100",justifyContent:"center",color:"gray.400",fontWeight:"300",pt:"0.5rem",pb:"0.5rem",children:P.jsx(ze,{backgroundColor:"gray.50",pl:"5px",pr:"5px",borderRadius:"5px",children:"Select or create a table to be referenced by the above table"})}),PBe=({previousType:t,tableId:e,foreignKeyPath:r,onCancel:n})=>{const i=A.useMemo(()=>t===Qi.UpdatingTable?"updating":t===Qi.CreatingTable?"creating":"",[t]);return P.jsx(ze,{width:"100%",borderStyle:"solid",borderLeftWidth:2,borderColor:"gray.200",pl:"1rem",mb:"1rem",children:P.jsxs(Te,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",color:"gray.400",fontWeight:"300",children:[P.jsx(dt,{textDecoration:"underline",cursor:"pointer",onClick:n,children:"Back"}),P.jsxs(dt,{whiteSpace:"nowrap",children:["- ",i,' "',e,'" -']}),P.jsxs(dt,{minWidth:0,dir:"rtl",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:["path: ",r]})]})})},kBe=Ae`
|
|
1141
1142
|
mutation DeleteTableMst($data: RemoveTableInput!) {
|
|
1142
1143
|
removeTable(data: $data) {
|
|
1143
1144
|
branch {
|
|
@@ -1146,7 +1147,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1146
1147
|
}
|
|
1147
1148
|
}
|
|
1148
1149
|
${_c}
|
|
1149
|
-
`,CBe=async t=>{const e=await _r.mutate({mutation:kBe,variables:t});if(!e.data)throw e.errors;return e.data};class TBe{constructor(e,r){this.projectPageModel=e,this.tableId=r}get branch(){return this.projectPageModel.branchOrThrow}async execute(){const e=await this.deleteTableRequest();return await this.updateTablesConnection(),this.branch.updateTouched(e),!0}async deleteTableRequest(){return(await CBe({data:{revisionId:this.branch.draft.id,tableId:this.tableId}})).removeTable.branch.touched}async updateTablesConnection(){const e=this.branch.draft,r=e.tablesConnection.edges.find(n=>n.node.id===this.tableId);e.tablesConnection.removeEdge(r==null?void 0:r.cursor)}}class EBe{constructor(e,r){this.rootStore=e,this.projectPageModel=r,lt(this,{},{autoBind:!0}),this.init()}get totalCount(){return this.items.length}get hasNextPage(){return this.revision.tablesConnection.availableNextPage}get isEditableRevision(){return this.projectPageModel.isEditableRevision}get items(){return this.revision.tablesConnection.edges.map(({node:e})=>({id:e.id,versionId:e.versionId,readonly:e.readonly,title:e.id,count:e.count,link:""}))}dispose(){}tryToFetchNextPage(){this.hasNextPage&&this.rootStore.queryTables({revisionId:this.revision.id,first:50,after:this.revision.tablesConnection.endCursor||void 0})}async deleteTable(e){try{return await new TBe(this.projectPageModel,e).execute()}catch(r){return console.log(r),!1}}init(){}get revision(){return this.projectPageModel.revisionOrThrow}}const _Be=()=>{const t=Ui(),[e]=A.useState(()=>new EBe(gt,t));return A.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e},RBe="_Row_14e1q_1",IBe="_Actions_14e1q_1",d6={Row:RBe,Actions:IBe},$Be=({table:t,store:e,onSettings:r,onCopy:n,onSelect:i})=>{const{open:o,setOpen:a}=cb(),s=A.useCallback(async()=>{r(t.versionId)},[r,t.versionId]),l=A.useCallback(()=>e.deleteTable(t.id),[e,t.id]),c=A.useCallback(()=>{n(t.versionId)},[n,t.versionId]),d=A.useCallback(()=>{i==null||i(t.id)},[i,t.id]),p=!!i;return P.jsx(ze,{height:"2.5rem",width:"100%","data-testid":`table-${t.id}`,children:P.jsxs(Te,{_hover:{backgroundColor:"gray.50"},backgroundColor:o?"gray.50":void 0,alignItems:"center",className:d6.Row,gap:"4px",paddingLeft:"1rem",children:[P.jsxs(Te,{width:"150px",children:[i?P.jsx(dt,{maxWidth:"140px",textDecoration:"underline",cursor:"pointer",onClick:d,"data-testid":`table-${t.id}-select`,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:t.id}):P.jsx(Ua,{to:`${t.id}`,"data-testid":`table-${t.id}-link`,children:P.jsx(dt,{maxWidth:"140px",textDecoration:"underline",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:t.id})}),!t.readonly&&e.isEditableRevision&&P.jsx(dt,{children:"*"})]}),P.jsxs(Te,{alignItems:"center",flex:1,justifyContent:"space-between",minHeight:"40px",children:[P.jsxs(dt,{color:"gray.400",fontWeight:"300",ml:"16px",children:[t.count," rows"]}),!p&&e.isEditableRevision&&P.jsx(Te,{className:o?void 0:d6.Actions,children:P.jsxs(mb,{positioning:{placement:"bottom-start"},open:o,onOpenChange:g=>{a(g.open)},children:[P.jsx(zx,{children:P.jsx(ze,{paddingRight:"2px",children:P.jsx(mX,{dataTestId:`table-list-menu-${t.id}`})})}),P.jsx(Ku,{children:P.jsx(vb,{children:P.jsxs(yb,{children:[P.jsxs(Jl,{color:"gray.600",value:"edit-schema","data-testid":`edit-schema-button-${t.id}`,onClick:s,children:[P.jsx(gP,{}),P.jsx(ze,{flex:"1",children:"Edit schema"})]}),P.jsxs(Jl,{color:"gray.600",value:"copy","data-testid":`copy-table-button-${t.id}`,onClick:c,children:[P.jsx(Z2,{}),P.jsx(ze,{flex:"1",children:"Copy schema"})]}),P.jsxs(Jl,{color:"gray.600",value:"delete","data-restid":`remove-table-button-${t.id}`,onClick:l,children:[P.jsx(Ab,{}),P.jsx(ze,{flex:1,children:"Delete"})]})]})})})]})})]})]})},t.versionId)},ABe=mt(({onSettings:t,onCopy:e,onSelect:r})=>{const n=_Be();return P.jsx(PA,{useWindowScroll:!0,totalCount:n.totalCount,defaultItemHeight:40,increaseViewportBy:40*100,endReached:n.hasNextPage?n.tryToFetchNextPage:void 0,itemContent:i=>{const o=n.items[i];if(o)return P.jsx($Be,{table:o,store:n,onSettings:t,onCopy:e,onSelect:r},o.versionId)}})}),MBe=mt(()=>{const{root:t,item:e}=SBe(),r=A.useCallback(s=>{t.selectForeignKey(e,s)},[e,t]),n=A.useCallback(()=>{t.cancelSelectingForeignKey(e)},[e,t]),i=A.useCallback(async()=>{if(e.state.type===Qi.CreatingTable){const s=e.state.store;await e.createTable(s.draftTableId,s.getPlainSchema())&&(s.submitChanges(),e.state.isSelectingForeignKey?t.onSelectedForeignKey(e,s.draftTableId):e.toUpdatingTableFromCreatingTable())}},[e,t]),o=A.useCallback(async()=>{if(e.state.type===Qi.UpdatingTable){const s=e.state.store;await e.updateTable(s)&&s.submitChanges()}},[e]),a=A.useCallback(s=>{t.onSelectedForeignKey(e,s)},[e,t]);if(e.state.type===Qi.ConnectingForeignKeyTable){const s=e.state.store;return P.jsx(P.Fragment,{children:P.jsx(PBe,{previousType:e.state.previousType,foreignKeyPath:e.currentForeignKeyPath,onCancel:n,tableId:s.draftTableId})})}if(e.state.type===Qi.List)return P.jsxs(P.Fragment,{children:[e.state.isSelectingForeignKey&&P.jsx(XE,{}),P.jsx(xBe,{onClick:e.toCreatingTable}),P.jsx(ze,{paddingTop:"0.5rem",paddingBottom:"1rem",children:P.jsx(ABe,{onSettings:e.toUpdatingTable,onCopy:e.toCloningTable,onSelect:e.state.isSelectingForeignKey?a:void 0})})]});if(e.state.type===Qi.CreatingTable){const s=e.state.store;return P.jsxs(P.Fragment,{children:[e.state.isSelectingForeignKey&&P.jsx(XE,{}),P.jsx(l6,{store:s,mode:Of.Creating,onApprove:i,onCancel:e.toList,onSelectForeignKey:r})]})}if(e.state.type===Qi.UpdatingTable){const s=e.state.store;return P.jsxs(P.Fragment,{children:[e.state.isSelectingForeignKey&&P.jsx(XE,{}),P.jsx(l6,{store:s,mode:Of.Updating,onApprove:o,onCancel:e.toList,onSelectForeignKey:r})]})}return null}),ZE=mt(()=>{const t=wBe();return P.jsx(P.Fragment,{children:t.stack.map(e=>P.jsx(MJ.Provider,{value:{root:t,item:e},children:P.jsx(MBe,{})},e.id))})}),NBe="_Root_1k7pa_1",jBe="_Actions_1k7pa_1",ux={Root:NBe,Actions:jBe},DBe="row-edit-mode",LBe=({data:t})=>{const[e,r]=qTe(DBe,ki.Tree);return P.jsxs(Te,{alignItems:"flex-start",flexDirection:"column",gap:"1rem",className:ux.Root,flex:1,children:[P.jsxs(Te,{justifyContent:"space-between",width:"100%",alignItems:"center",children:[P.jsx(Te,{minHeight:"40px"}),P.jsx(ze,{className:ux.Actions,children:P.jsx(TA,{mode:e||ki.Tree,onChange:r})})]}),e===ki.Tree&&P.jsxs(Te,{alignItems:"center",flex:1,gap:"1rem",justifyContent:"center",width:"100%",children:[P.jsx(G2,{color:"gray"}),P.jsx(dt,{color:"gray.400",children:"Unsupported schema, use JSON mode"})]}),e===ki.Json&&P.jsx(_ge,{whiteSpace:"pre-wrap",backgroundColor:"gray.50",padding:"1rem",paddingRight:"5rem",children:JSON.stringify(t,null,4)})]})};class QBe{constructor(e){this.projectPageModel=e,lt(this,{},{autoBind:!0})}get row(){return this.projectPageModel.rowOrThrow}get isValidSchema(){const e=this.projectPageModel.tableOrThrow.schema;return RJ(e)}init(){}dispose(){}}const VBe=()=>{const t=Ui(),[e]=A.useState(()=>new QBe(t));return A.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e};class FBe{constructor(e,r=vn()){de(this,"type",xe.Array);de(this,"name","");de(this,"$ref","");de(this,"readOnly");de(this,"title");de(this,"description");de(this,"deprecated");de(this,"valuesMap",new Map);this.items=e,this.nodeId=r,lt(this)}registerValue(e){return this.getOrCreateValues(e.rowId).push(e)-1}getValue(e,r=0){return this.getOrCreateValues(e)[r]}getPlainSchema(){return Z_({type:this.type,items:this.items.getPlainSchema()})}getOrCreateValues(e){let r=this.valuesMap.get(e);return r||(r=Ut([]),this.valuesMap.set(e,r)),r}}class BBe{constructor(e=vn()){de(this,"type",xe.Boolean);de(this,"name","");de(this,"$ref","");de(this,"default",!1);de(this,"readOnly");de(this,"title");de(this,"description");de(this,"deprecated");de(this,"valuesMap",new Map);this.nodeId=e,lt(this)}registerValue(e){return this.getOrCreateValues(e.rowId).push(e)-1}getValue(e,r=0){return this.getOrCreateValues(e)[r]}getPlainSchema(){return{type:this.type,default:this.default}}getOrCreateValues(e){let r=this.valuesMap.get(e);return r||(r=Ut([]),this.valuesMap.set(e,r)),r}}class zBe{constructor(e=vn()){de(this,"type",xe.Number);de(this,"name","");de(this,"$ref","");de(this,"default",0);de(this,"readOnly");de(this,"title");de(this,"description");de(this,"deprecated");de(this,"valuesMap",new Map);this.nodeId=e,lt(this)}registerValue(e){return this.getOrCreateValues(e.rowId).push(e)-1}getValue(e,r=0){return this.getOrCreateValues(e)[r]}getPlainSchema(){return{type:this.type,default:this.default}}getOrCreateValues(e){let r=this.valuesMap.get(e);return r||(r=Ut([]),this.valuesMap.set(e,r)),r}}class NJ{constructor(e=vn()){de(this,"type",xe.Object);de(this,"name","");de(this,"$ref","");de(this,"readOnly");de(this,"title");de(this,"description");de(this,"deprecated");de(this,"additionalProperties",!1);de(this,"required",[]);de(this,"properties",{});de(this,"valuesMap",new Map);this.nodeId=e,lt(this)}registerValue(e){return this.getOrCreateValues(e.rowId).push(e)-1}getValue(e,r=0){return this.getOrCreateValues(e)[r]}get empty(){return Object.keys(this.properties).length===0}addPropertyWithStore(e,r){if(this.properties[e]||this.required.includes(e))throw new Error("this name already exists");return r.name=e,this.required.push(e),this.properties[e]=r}getProperty(e){return this.properties[e]}getPlainSchema(){return Z_({type:this.type,additionalProperties:this.additionalProperties,required:Z_(this.required).sort(),properties:Object.entries(this.properties).reduce((e,[r,n])=>(e[r]=n.getPlainSchema(),e),{})})}getOrCreateValues(e){let r=this.valuesMap.get(e);return r||(r=Ut([]),this.valuesMap.set(e,r)),r}}class jJ{constructor(e=vn()){de(this,"type",xe.String);de(this,"name","");de(this,"$ref","");de(this,"default","");de(this,"foreignKey");de(this,"contentMediaType");de(this,"readOnly");de(this,"title");de(this,"description");de(this,"deprecated");de(this,"valuesMap",new Map);this.nodeId=e,lt(this)}registerValue(e){return this.getOrCreateValues(e.rowId).push(e)-1}getValue(e,r=0){return this.getOrCreateValues(e)[r]}getPlainSchema(){const e={type:this.type,default:this.default};return this.foreignKey&&(e.foreignKey=this.foreignKey),this.contentMediaType&&(e.contentMediaType=this.contentMediaType),e}getOrCreateValues(e){let r=this.valuesMap.get(e);return r||(r=Ut([]),this.valuesMap.set(e,r)),r}}const _u=t=>{if("$ref"in t){const e=CA[t.$ref];if(!e)throw new Error(`Schema refs must be defined ref$=${t.$ref}`);const r=_u(e);return Gw(r,t),r.$ref=t.$ref,r}else if(t.type===xe.Object){const e=qBe(t);return Gw(e,t),e}else if(t.type===xe.Array){const e=_u(t.items),r=new FBe(e);return Gw(r,t),r}else{const e=WBe(t);return Gw(e,t),e}},qBe=t=>{const e=new NJ;return Object.entries(t.properties).forEach(([r,n])=>{e.addPropertyWithStore(r,_u(n))}),e},WBe=t=>{if(t.type===xe.String){const e=new jJ;return e.foreignKey=t.foreignKey,e.contentMediaType=t.contentMediaType,e.readOnly=t.readOnly,e}else if(t.type===xe.Number){const e=new zBe;return e.readOnly=t.readOnly,e}else if(t.type===xe.Boolean){const e=new BBe;return e.readOnly=t.readOnly,e}else throw new Error("this type is not allowed")},Gw=(t,e)=>{t.title=e.title,t.description=e.description,t.deprecated=e.deprecated},dx=t=>{let e=t,r="";for(;e.parent;)e.parent.type===xe.Object?e.type===xe.Array?r=`${e.id}${r}`:r?r=`${e.id}.${r}`:r=e.id:e.parent.type===xe.Array&&(r&&e.type===xe.Array?r=`[${e.id}]${r}`:r?r=`[${e.id}].${r}`:r=`[${e.id}]`),e=e.parent;return r?`"${r}"`:""},Yy=(t,e)=>{e(t),t.type===xe.Object?Object.values(t.value).forEach(r=>{Yy(r,e)}):t.type===xe.Array&&t.value.forEach(r=>{Yy(r,e)})};class XP{constructor(e,r="",n=[]){de(this,"id","");de(this,"parent",null);de(this,"nodeId",vn());de(this,"isCollapsible",!0);de(this,"isCollapsed",!1);de(this,"type",xe.Array);de(this,"baseValue",[]);de(this,"index");this.schema=e,this.rowId=r,this.value=n,this.index=this.schema.registerValue(this),this.baseValue=this.value,lt(this,{},{autoBind:!0})}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get title(){return this.schema.title}get description(){return this.schema.description}get deprecated(){return this.schema.deprecated}get touched(){return this.value!==this.baseValue?!0:this.value.some(e=>e.touched)}get isValid(){return this.value.every(e=>e.isValid)}get items(){return this.schema.items}getPlainValue(){return this.value.map(e=>e.getPlainValue())}createItem(){this.value===this.baseValue&&(this.value=this.baseValue.slice());const e=sc(this.schema.items);return this.value.push(e),e.parent=this,e.id=(this.value.length-1).toString(),e}removeItem(e){this.value===this.baseValue&&(this.value=this.baseValue.slice());const r=this.value[e];r.parent=null,r.id="",this.value.splice(e,1)}updateBaseValue(e){const r=e;this.baseValue.length=Math.min(this.baseValue.length,r.length),r.forEach((n,i)=>{let o=this.baseValue[i];o||(o=sc(this.schema.items),this.baseValue.push(o)),o.parent=this,o.id=i.toString(),o.updateBaseValue(n)}),this.value=this.baseValue}updateValue(e){const r=e;this.value.length!==this.baseValue.length&&(this.value=this.baseValue.slice()),this.value.length=Math.min(this.value.length,r.length),r.forEach((n,i)=>{let o=this.value[i];o||(o=sc(this.schema.items),this.value.push(o)),o.parent=this,o.id=i.toString(),o.updateValue(n)})}toggleCollapsed(){this.isCollapsed=!this.isCollapsed}}class CM{constructor(e,r="",n=null){de(this,"id","");de(this,"parent",null);de(this,"nodeId",vn());de(this,"type",xe.Boolean);de(this,"baseValue",null);de(this,"index");this.schema=e,this.rowId=r,this.value=n,this.index=this.schema.registerValue(this),this.baseValue=this.value??null,lt(this)}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get title(){return this.schema.title}get description(){return this.schema.description}get deprecated(){return this.schema.deprecated}get touched(){return this.baseValue!==this.value}get isValid(){return!0}getPlainValue(){return this.value??this.schema.default}setValue(e){this.value=e}updateBaseValue(e){this.baseValue=e,this.value=e}updateValue(e){this.value=e}}class TM{constructor(e,r="",n=null){de(this,"id","");de(this,"parent",null);de(this,"nodeId",vn());de(this,"type",xe.Number);de(this,"baseValue",null);de(this,"index");this.schema=e,this.rowId=r,this.value=n,this.index=this.schema.registerValue(this),this.baseValue=this.value??null,lt(this)}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get title(){return this.schema.title}get description(){return this.schema.description}get deprecated(){return this.schema.deprecated}get touched(){return this.baseValue!==this.value}get isValid(){return!0}get default(){return this.schema.default}getPlainValue(){return this.value??this.default}setValue(e){this.value=e}updateBaseValue(e){this.baseValue=e,this.value=e}updateValue(e){this.value=e}}class Ky{constructor(e,r="",n=null){de(this,"id","");de(this,"parent",null);de(this,"nodeId",vn());de(this,"isCollapsible",!0);de(this,"isCollapsed",!1);de(this,"type",xe.Object);de(this,"value",{});de(this,"index");this.schema=e,this.rowId=r,this.index=this.schema.registerValue(this),lt(this,{},{autoBind:!0}),n?this.value=n:Object.entries(this.schema.properties).forEach(([i,o])=>{const a=sc(o);a.parent=this,a.id=i,this.value[i]=a}),this.init()}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get title(){return this.schema.title}get description(){return this.schema.description}get deprecated(){return this.schema.deprecated}get touched(){return Object.values(this.value).some(e=>e.touched)}get isValid(){return Object.values(this.value).every(e=>e.isValid)}getPlainValue(){return Object.entries(this.value).reduce((e,[r,n])=>(e[r]=n.getPlainValue(),e),{})}updateBaseValue(e){Object.entries(this.value).map(([r,n])=>{r in e&&n.updateBaseValue(e[r])})}updateValue(e){Object.entries(this.value).forEach(([r,n])=>{r in e&&n.updateValue(e[r])})}init(){this.$ref&&(this.isCollapsed=!0)}toggleCollapsed(){this.isCollapsed=!this.isCollapsed}}class ZP{constructor(e,r="",n=null){de(this,"id","");de(this,"parent",null);de(this,"nodeId",vn());de(this,"type",xe.String);de(this,"baseValue");de(this,"index");this.schema=e,this.rowId=r,this.value=n,this.index=this.schema.registerValue(this),this.baseValue=this.value??"",lt(this)}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get title(){return this.schema.title}get description(){return this.schema.description}get deprecated(){return this.schema.deprecated}get foreignKey(){return this.schema.foreignKey}get contentMediaType(){return this.schema.contentMediaType}get touched(){return this.baseValue!==this.value}get isValid(){return!(this.schema.foreignKey&&!this.value)}getPlainValue(){return this.value??this.schema.default}setValue(e){this.value=e}updateBaseValue(e){this.baseValue=e,this.value=e}updateValue(e){this.value=e}}const sc=t=>{switch(t.type){case xe.Object:return new Ky(t);case xe.Array:return new XP(t);case xe.String:return new ZP(t);case xe.Number:return new TM(t);case xe.Boolean:return new CM(t)}};class zI{constructor(e,r,n,i=null,o){de(this,"name",new ZP(new jJ));de(this,"root");de(this,"overNode",null);de(this,"viewMode",ki.Tree);de(this,"scrollPosition",null);de(this,"originData",null);var a;this.schemaStore=e,this.originRow=i,this.projectPageModel=o,this.root=r,this.name.baseValue=n,this.name.value=n,this.originData=((a=this.originRow)==null?void 0:a.data)??null,this.reset(),lt(this,{},{autoBind:!0})}get touched(){return this.root.touched||this.name.touched}get isValid(){return this.root.isValid||this.name.isValid}get isComplexStructure(){return this.root.type===xe.Object?Object.values(this.root.value).some(e=>e.type===xe.Object||e.type===xe.Array):this.root.type===xe.Array?this.root.items.type===xe.Object||this.root.items.type===xe.Array:!1}get areThereForeignKeysBy(){var e,r;return!!((r=(e=this.projectPageModel)==null?void 0:e.rowRefsBy)!=null&&r.countForeignKeysBy)}setOverNode(e){this.overNode=e}setViewMode(e){this.viewMode=e}setScrollPosition(e){this.scrollPosition=e}reset(){this.originData!==null&&(this.root.updateBaseValue(this.originData),this.name.value=this.name.baseValue)}syncReadOnlyStores(){var e;if((e=this.originRow)!=null&&e.data){const r=new Map;Yy(this.root,i=>{i.readOnly&&r.set(dx(i),i)});const n=sc(this.schemaStore);n.updateBaseValue(this.originRow.data),Yy(n,i=>{if(i.readOnly){const o=r.get(dx(i));o&&o.updateBaseValue(i.getPlainValue())}})}}save(){this.originData=this.root.getPlainValue(),this.root.updateBaseValue(this.originData),this.name.updateBaseValue(this.name.value)}updateValue(e){this.root.updateValue(e)}}const UBe=Ae`
|
|
1150
|
+
`,CBe=async t=>{const e=await _r.mutate({mutation:kBe,variables:t});if(!e.data)throw e.errors;return e.data};class TBe{constructor(e,r){this.projectPageModel=e,this.tableId=r}get branch(){return this.projectPageModel.branchOrThrow}async execute(){const e=await this.deleteTableRequest();return await this.updateTablesConnection(),this.branch.updateTouched(e),!0}async deleteTableRequest(){return(await CBe({data:{revisionId:this.branch.draft.id,tableId:this.tableId}})).removeTable.branch.touched}async updateTablesConnection(){const e=this.branch.draft,r=e.tablesConnection.edges.find(n=>n.node.id===this.tableId);e.tablesConnection.removeEdge(r==null?void 0:r.cursor)}}class EBe{constructor(e,r){this.rootStore=e,this.projectPageModel=r,lt(this,{},{autoBind:!0}),this.init()}get totalCount(){return this.items.length}get hasNextPage(){return this.revision.tablesConnection.availableNextPage}get isEditableRevision(){return this.projectPageModel.isEditableRevision}get items(){return this.revision.tablesConnection.edges.map(({node:e})=>({id:e.id,versionId:e.versionId,readonly:e.readonly,title:e.id,count:e.count,link:""}))}dispose(){}tryToFetchNextPage(){this.hasNextPage&&this.rootStore.queryTables({revisionId:this.revision.id,first:50,after:this.revision.tablesConnection.endCursor||void 0})}async deleteTable(e){try{return await new TBe(this.projectPageModel,e).execute()}catch(r){return console.log(r),!1}}init(){}get revision(){return this.projectPageModel.revisionOrThrow}}const _Be=()=>{const t=Ui(),[e]=A.useState(()=>new EBe(gt,t));return A.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e},RBe="_Row_14e1q_1",IBe="_Actions_14e1q_1",d6={Row:RBe,Actions:IBe},$Be=({table:t,store:e,onSettings:r,onCopy:n,onSelect:i})=>{const{open:o,setOpen:a}=cb(),s=A.useCallback(async()=>{r(t.versionId)},[r,t.versionId]),l=A.useCallback(()=>e.deleteTable(t.id),[e,t.id]),c=A.useCallback(()=>{n(t.versionId)},[n,t.versionId]),d=A.useCallback(()=>{i==null||i(t.id)},[i,t.id]),p=!!i;return P.jsx(ze,{height:"2.5rem",width:"100%","data-testid":`table-${t.id}`,children:P.jsxs(Te,{_hover:{backgroundColor:"gray.50"},backgroundColor:o?"gray.50":void 0,alignItems:"center",className:d6.Row,gap:"4px",paddingLeft:"1rem",children:[P.jsxs(Te,{width:"150px",children:[i?P.jsx(dt,{maxWidth:"140px",textDecoration:"underline",cursor:"pointer",onClick:d,"data-testid":`table-${t.id}-select`,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:t.id}):P.jsx(Ua,{to:`${t.id}`,"data-testid":`table-${t.id}-link`,children:P.jsx(dt,{maxWidth:"140px",textDecoration:"underline",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:t.id})}),!t.readonly&&e.isEditableRevision&&P.jsx(dt,{children:"*"})]}),P.jsxs(Te,{alignItems:"center",flex:1,justifyContent:"space-between",minHeight:"40px",children:[P.jsxs(dt,{color:"gray.400",fontWeight:"300",ml:"16px",children:[t.count," rows"]}),!p&&e.isEditableRevision&&P.jsx(Te,{className:o?void 0:d6.Actions,children:P.jsxs(mb,{positioning:{placement:"bottom-start"},open:o,onOpenChange:g=>{a(g.open)},children:[P.jsx(zx,{children:P.jsx(ze,{paddingRight:"2px",children:P.jsx(mX,{dataTestId:`table-list-menu-${t.id}`})})}),P.jsx(Ku,{children:P.jsx(vb,{children:P.jsxs(yb,{children:[P.jsxs(Jl,{color:"gray.600",value:"edit-schema","data-testid":`edit-schema-button-${t.id}`,onClick:s,children:[P.jsx(gP,{}),P.jsx(ze,{flex:"1",children:"Edit schema"})]}),P.jsxs(Jl,{color:"gray.600",value:"copy","data-testid":`copy-table-button-${t.id}`,onClick:c,children:[P.jsx(Z2,{}),P.jsx(ze,{flex:"1",children:"Copy schema"})]}),P.jsxs(Jl,{color:"gray.600",value:"delete","data-restid":`remove-table-button-${t.id}`,onClick:l,children:[P.jsx(Ab,{}),P.jsx(ze,{flex:1,children:"Delete"})]})]})})})]})})]})]})},t.versionId)},ABe=mt(({onSettings:t,onCopy:e,onSelect:r})=>{const n=_Be();return P.jsx(PA,{useWindowScroll:!0,totalCount:n.totalCount,defaultItemHeight:40,increaseViewportBy:40*100,endReached:n.hasNextPage?n.tryToFetchNextPage:void 0,itemContent:i=>{const o=n.items[i];if(o)return P.jsx($Be,{table:o,store:n,onSettings:t,onCopy:e,onSelect:r},o.versionId)}})}),MBe=mt(()=>{const{root:t,item:e}=SBe(),r=A.useCallback(s=>{t.selectForeignKey(e,s)},[e,t]),n=A.useCallback(()=>{t.cancelSelectingForeignKey(e)},[e,t]),i=A.useCallback(async()=>{if(e.state.type===Qi.CreatingTable){const s=e.state.store;await e.createTable(s.draftTableId,s.getPlainSchema())&&(s.submitChanges(),e.state.isSelectingForeignKey?t.onSelectedForeignKey(e,s.draftTableId):e.toUpdatingTableFromCreatingTable())}},[e,t]),o=A.useCallback(async()=>{if(e.state.type===Qi.UpdatingTable){const s=e.state.store;await e.updateTable(s)&&s.submitChanges()}},[e]),a=A.useCallback(s=>{t.onSelectedForeignKey(e,s)},[e,t]);if(e.state.type===Qi.ConnectingForeignKeyTable){const s=e.state.store;return P.jsx(P.Fragment,{children:P.jsx(PBe,{previousType:e.state.previousType,foreignKeyPath:e.currentForeignKeyPath,onCancel:n,tableId:s.draftTableId})})}if(e.state.type===Qi.List)return P.jsxs(P.Fragment,{children:[e.state.isSelectingForeignKey&&P.jsx(XE,{}),P.jsx(xBe,{onClick:e.toCreatingTable}),P.jsx(ze,{paddingTop:"0.5rem",paddingBottom:"1rem",children:P.jsx(ABe,{onSettings:e.toUpdatingTable,onCopy:e.toCloningTable,onSelect:e.state.isSelectingForeignKey?a:void 0})})]});if(e.state.type===Qi.CreatingTable){const s=e.state.store;return P.jsxs(P.Fragment,{children:[e.state.isSelectingForeignKey&&P.jsx(XE,{}),P.jsx(l6,{store:s,mode:Of.Creating,onApprove:i,onCancel:e.toList,onSelectForeignKey:r})]})}if(e.state.type===Qi.UpdatingTable){const s=e.state.store;return P.jsxs(P.Fragment,{children:[e.state.isSelectingForeignKey&&P.jsx(XE,{}),P.jsx(l6,{store:s,mode:Of.Updating,onApprove:o,onCancel:e.toList,onSelectForeignKey:r})]})}return null}),ZE=mt(()=>{const t=wBe();return P.jsx(P.Fragment,{children:t.stack.map(e=>P.jsx(MJ.Provider,{value:{root:t,item:e},children:P.jsx(MBe,{})},e.id))})}),NBe="_Root_1k7pa_1",jBe="_Actions_1k7pa_1",ux={Root:NBe,Actions:jBe},DBe="row-edit-mode",LBe=({data:t})=>{const[e,r]=qTe(DBe,ki.Tree);return P.jsxs(Te,{alignItems:"flex-start",flexDirection:"column",gap:"1rem",className:ux.Root,flex:1,children:[P.jsxs(Te,{justifyContent:"space-between",width:"100%",alignItems:"center",children:[P.jsx(Te,{minHeight:"40px"}),P.jsx(ze,{className:ux.Actions,children:P.jsx(TA,{mode:e||ki.Tree,onChange:r})})]}),e===ki.Tree&&P.jsxs(Te,{alignItems:"center",flex:1,gap:"1rem",justifyContent:"center",width:"100%",children:[P.jsx(G2,{color:"gray"}),P.jsx(dt,{color:"gray.400",children:"Unsupported schema, use JSON mode"})]}),e===ki.Json&&P.jsx(_ge,{whiteSpace:"pre-wrap",backgroundColor:"gray.50",padding:"1rem",paddingRight:"5rem",children:JSON.stringify(t,null,4)})]})};class QBe{constructor(e){this.projectPageModel=e,lt(this,{},{autoBind:!0})}get row(){return this.projectPageModel.rowOrThrow}get isValidSchema(){const e=this.projectPageModel.tableOrThrow.schema;return RJ(e)}init(){}dispose(){}}const VBe=()=>{const t=Ui(),[e]=A.useState(()=>new QBe(t));return A.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e};class FBe{constructor(e,r=vn()){fe(this,"type",xe.Array);fe(this,"name","");fe(this,"$ref","");fe(this,"readOnly");fe(this,"title");fe(this,"description");fe(this,"deprecated");fe(this,"valuesMap",new Map);this.items=e,this.nodeId=r,lt(this)}registerValue(e){return this.getOrCreateValues(e.rowId).push(e)-1}getValue(e,r=0){return this.getOrCreateValues(e)[r]}getPlainSchema(){return Z_({type:this.type,items:this.items.getPlainSchema()})}getOrCreateValues(e){let r=this.valuesMap.get(e);return r||(r=Ut([]),this.valuesMap.set(e,r)),r}}class BBe{constructor(e=vn()){fe(this,"type",xe.Boolean);fe(this,"name","");fe(this,"$ref","");fe(this,"default",!1);fe(this,"readOnly");fe(this,"title");fe(this,"description");fe(this,"deprecated");fe(this,"valuesMap",new Map);this.nodeId=e,lt(this)}registerValue(e){return this.getOrCreateValues(e.rowId).push(e)-1}getValue(e,r=0){return this.getOrCreateValues(e)[r]}getPlainSchema(){return{type:this.type,default:this.default}}getOrCreateValues(e){let r=this.valuesMap.get(e);return r||(r=Ut([]),this.valuesMap.set(e,r)),r}}class zBe{constructor(e=vn()){fe(this,"type",xe.Number);fe(this,"name","");fe(this,"$ref","");fe(this,"default",0);fe(this,"readOnly");fe(this,"title");fe(this,"description");fe(this,"deprecated");fe(this,"valuesMap",new Map);this.nodeId=e,lt(this)}registerValue(e){return this.getOrCreateValues(e.rowId).push(e)-1}getValue(e,r=0){return this.getOrCreateValues(e)[r]}getPlainSchema(){return{type:this.type,default:this.default}}getOrCreateValues(e){let r=this.valuesMap.get(e);return r||(r=Ut([]),this.valuesMap.set(e,r)),r}}class NJ{constructor(e=vn()){fe(this,"type",xe.Object);fe(this,"name","");fe(this,"$ref","");fe(this,"readOnly");fe(this,"title");fe(this,"description");fe(this,"deprecated");fe(this,"additionalProperties",!1);fe(this,"required",[]);fe(this,"properties",{});fe(this,"valuesMap",new Map);this.nodeId=e,lt(this)}registerValue(e){return this.getOrCreateValues(e.rowId).push(e)-1}getValue(e,r=0){return this.getOrCreateValues(e)[r]}get empty(){return Object.keys(this.properties).length===0}addPropertyWithStore(e,r){if(this.properties[e]||this.required.includes(e))throw new Error("this name already exists");return r.name=e,this.required.push(e),this.properties[e]=r}getProperty(e){return this.properties[e]}getPlainSchema(){return Z_({type:this.type,additionalProperties:this.additionalProperties,required:Z_(this.required).sort(),properties:Object.entries(this.properties).reduce((e,[r,n])=>(e[r]=n.getPlainSchema(),e),{})})}getOrCreateValues(e){let r=this.valuesMap.get(e);return r||(r=Ut([]),this.valuesMap.set(e,r)),r}}class jJ{constructor(e=vn()){fe(this,"type",xe.String);fe(this,"name","");fe(this,"$ref","");fe(this,"default","");fe(this,"foreignKey");fe(this,"contentMediaType");fe(this,"readOnly");fe(this,"title");fe(this,"description");fe(this,"deprecated");fe(this,"valuesMap",new Map);this.nodeId=e,lt(this)}registerValue(e){return this.getOrCreateValues(e.rowId).push(e)-1}getValue(e,r=0){return this.getOrCreateValues(e)[r]}getPlainSchema(){const e={type:this.type,default:this.default};return this.foreignKey&&(e.foreignKey=this.foreignKey),this.contentMediaType&&(e.contentMediaType=this.contentMediaType),e}getOrCreateValues(e){let r=this.valuesMap.get(e);return r||(r=Ut([]),this.valuesMap.set(e,r)),r}}const _u=t=>{if("$ref"in t){const e=CA[t.$ref];if(!e)throw new Error(`Schema refs must be defined ref$=${t.$ref}`);const r=_u(e);return Gw(r,t),r.$ref=t.$ref,r}else if(t.type===xe.Object){const e=qBe(t);return Gw(e,t),e}else if(t.type===xe.Array){const e=_u(t.items),r=new FBe(e);return Gw(r,t),r}else{const e=WBe(t);return Gw(e,t),e}},qBe=t=>{const e=new NJ;return Object.entries(t.properties).forEach(([r,n])=>{e.addPropertyWithStore(r,_u(n))}),e},WBe=t=>{if(t.type===xe.String){const e=new jJ;return e.foreignKey=t.foreignKey,e.contentMediaType=t.contentMediaType,e.readOnly=t.readOnly,e}else if(t.type===xe.Number){const e=new zBe;return e.readOnly=t.readOnly,e}else if(t.type===xe.Boolean){const e=new BBe;return e.readOnly=t.readOnly,e}else throw new Error("this type is not allowed")},Gw=(t,e)=>{t.title=e.title,t.description=e.description,t.deprecated=e.deprecated},dx=t=>{let e=t,r="";for(;e.parent;)e.parent.type===xe.Object?e.type===xe.Array?r=`${e.id}${r}`:r?r=`${e.id}.${r}`:r=e.id:e.parent.type===xe.Array&&(r&&e.type===xe.Array?r=`[${e.id}]${r}`:r?r=`[${e.id}].${r}`:r=`[${e.id}]`),e=e.parent;return r?`"${r}"`:""},Yy=(t,e)=>{e(t),t.type===xe.Object?Object.values(t.value).forEach(r=>{Yy(r,e)}):t.type===xe.Array&&t.value.forEach(r=>{Yy(r,e)})};class XP{constructor(e,r="",n=[]){fe(this,"id","");fe(this,"parent",null);fe(this,"nodeId",vn());fe(this,"isCollapsible",!0);fe(this,"isCollapsed",!1);fe(this,"type",xe.Array);fe(this,"baseValue",[]);fe(this,"index");this.schema=e,this.rowId=r,this.value=n,this.index=this.schema.registerValue(this),this.baseValue=this.value,lt(this,{},{autoBind:!0})}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get title(){return this.schema.title}get description(){return this.schema.description}get deprecated(){return this.schema.deprecated}get touched(){return this.value!==this.baseValue?!0:this.value.some(e=>e.touched)}get isValid(){return this.value.every(e=>e.isValid)}get items(){return this.schema.items}getPlainValue(){return this.value.map(e=>e.getPlainValue())}createItem(){this.value===this.baseValue&&(this.value=this.baseValue.slice());const e=sc(this.schema.items);return this.value.push(e),e.parent=this,e.id=(this.value.length-1).toString(),e}removeItem(e){this.value===this.baseValue&&(this.value=this.baseValue.slice());const r=this.value[e];r.parent=null,r.id="",this.value.splice(e,1)}updateBaseValue(e){const r=e;this.baseValue.length=Math.min(this.baseValue.length,r.length),r.forEach((n,i)=>{let o=this.baseValue[i];o||(o=sc(this.schema.items),this.baseValue.push(o)),o.parent=this,o.id=i.toString(),o.updateBaseValue(n)}),this.value=this.baseValue}updateValue(e){const r=e;this.value.length!==this.baseValue.length&&(this.value=this.baseValue.slice()),this.value.length=Math.min(this.value.length,r.length),r.forEach((n,i)=>{let o=this.value[i];o||(o=sc(this.schema.items),this.value.push(o)),o.parent=this,o.id=i.toString(),o.updateValue(n)})}toggleCollapsed(){this.isCollapsed=!this.isCollapsed}}class CM{constructor(e,r="",n=null){fe(this,"id","");fe(this,"parent",null);fe(this,"nodeId",vn());fe(this,"type",xe.Boolean);fe(this,"baseValue",null);fe(this,"index");this.schema=e,this.rowId=r,this.value=n,this.index=this.schema.registerValue(this),this.baseValue=this.value??null,lt(this)}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get title(){return this.schema.title}get description(){return this.schema.description}get deprecated(){return this.schema.deprecated}get touched(){return this.baseValue!==this.value}get isValid(){return!0}getPlainValue(){return this.value??this.schema.default}setValue(e){this.value=e}updateBaseValue(e){this.baseValue=e,this.value=e}updateValue(e){this.value=e}}class TM{constructor(e,r="",n=null){fe(this,"id","");fe(this,"parent",null);fe(this,"nodeId",vn());fe(this,"type",xe.Number);fe(this,"baseValue",null);fe(this,"index");this.schema=e,this.rowId=r,this.value=n,this.index=this.schema.registerValue(this),this.baseValue=this.value??null,lt(this)}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get title(){return this.schema.title}get description(){return this.schema.description}get deprecated(){return this.schema.deprecated}get touched(){return this.baseValue!==this.value}get isValid(){return!0}get default(){return this.schema.default}getPlainValue(){return this.value??this.default}setValue(e){this.value=e}updateBaseValue(e){this.baseValue=e,this.value=e}updateValue(e){this.value=e}}class Ky{constructor(e,r="",n=null){fe(this,"id","");fe(this,"parent",null);fe(this,"nodeId",vn());fe(this,"isCollapsed",!1);fe(this,"type",xe.Object);fe(this,"value",{});fe(this,"index");this.schema=e,this.rowId=r,this.index=this.schema.registerValue(this),lt(this,{},{autoBind:!0}),n?this.value=n:Object.entries(this.schema.properties).forEach(([i,o])=>{const a=sc(o);a.parent=this,a.id=i,this.value[i]=a}),this.init()}get isCollapsible(){return Object.keys(this.schema.properties).length>0}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get title(){return this.schema.title}get description(){return this.schema.description}get deprecated(){return this.schema.deprecated}get touched(){return Object.values(this.value).some(e=>e.touched)}get isValid(){return Object.values(this.value).every(e=>e.isValid)}getPlainValue(){return Object.entries(this.value).reduce((e,[r,n])=>(e[r]=n.getPlainValue(),e),{})}updateBaseValue(e){Object.entries(this.value).map(([r,n])=>{r in e&&n.updateBaseValue(e[r])})}updateValue(e){Object.entries(this.value).forEach(([r,n])=>{r in e&&n.updateValue(e[r])})}init(){this.$ref&&(this.isCollapsed=!0)}toggleCollapsed(){this.isCollapsed=!this.isCollapsed}}class ZP{constructor(e,r="",n=null){fe(this,"id","");fe(this,"parent",null);fe(this,"nodeId",vn());fe(this,"type",xe.String);fe(this,"baseValue");fe(this,"index");this.schema=e,this.rowId=r,this.value=n,this.index=this.schema.registerValue(this),this.baseValue=this.value??"",lt(this)}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get title(){return this.schema.title}get description(){return this.schema.description}get deprecated(){return this.schema.deprecated}get foreignKey(){return this.schema.foreignKey}get contentMediaType(){return this.schema.contentMediaType}get touched(){return this.baseValue!==this.value}get isValid(){return!(this.schema.foreignKey&&!this.value)}getPlainValue(){return this.value??this.schema.default}setValue(e){this.value=e}updateBaseValue(e){this.baseValue=e,this.value=e}updateValue(e){this.value=e}}const sc=t=>{switch(t.type){case xe.Object:return new Ky(t);case xe.Array:return new XP(t);case xe.String:return new ZP(t);case xe.Number:return new TM(t);case xe.Boolean:return new CM(t)}};class zI{constructor(e,r,n,i=null,o){fe(this,"name",new ZP(new jJ));fe(this,"root");fe(this,"overNode",null);fe(this,"viewMode",ki.Tree);fe(this,"scrollPosition",null);fe(this,"originData",null);var a;this.schemaStore=e,this.originRow=i,this.projectPageModel=o,this.root=r,this.name.baseValue=n,this.name.value=n,this.originData=((a=this.originRow)==null?void 0:a.data)??null,this.reset(),lt(this,{},{autoBind:!0})}get touched(){return this.root.touched||this.name.touched}get isValid(){return this.root.isValid||this.name.isValid}get isComplexStructure(){return this.root.type===xe.Object?Object.values(this.root.value).some(e=>e.type===xe.Object||e.type===xe.Array):this.root.type===xe.Array?this.root.items.type===xe.Object||this.root.items.type===xe.Array:!1}get areThereForeignKeysBy(){var e,r;return!!((r=(e=this.projectPageModel)==null?void 0:e.rowRefsBy)!=null&&r.countForeignKeysBy)}setOverNode(e){this.overNode=e}setViewMode(e){this.viewMode=e}setScrollPosition(e){this.scrollPosition=e}reset(){this.originData!==null&&(this.root.updateBaseValue(this.originData),this.name.value=this.name.baseValue)}syncReadOnlyStores(){var e;if((e=this.originRow)!=null&&e.data){const r=new Map;Yy(this.root,i=>{i.readOnly&&r.set(dx(i),i)});const n=sc(this.schemaStore);n.updateBaseValue(this.originRow.data),Yy(n,i=>{if(i.readOnly){const o=r.get(dx(i));o&&o.updateBaseValue(i.getPlainValue())}})}}save(){this.originData=this.root.getPlainValue(),this.root.updateBaseValue(this.originData),this.name.updateBaseValue(this.name.value)}updateValue(e){this.root.updateValue(e)}}const UBe=Ae`
|
|
1150
1151
|
mutation CreateRowMst($data: CreateRowInput!) {
|
|
1151
1152
|
createRow(data: $data) {
|
|
1152
1153
|
table {
|
|
@@ -1190,7 +1191,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1190
1191
|
}
|
|
1191
1192
|
${Pl}
|
|
1192
1193
|
${bg}
|
|
1193
|
-
`,KBe=async t=>{const e=await _r.mutate({mutation:YBe,variables:t});if(!e.data)throw e.errors;return e.data};class DJ{constructor(e,r){this.rootStore=e,this.projectPageModel=r}get branch(){return this.projectPageModel.branchOrThrow}get table(){return this.projectPageModel.tableOrThrow}get row(){return this.projectPageModel.rowOrThrow}addVersionedTableToCache(e){return this.addTableToCache(e)}addTableToCache(e){const r=this.rootStore.cache.addOrTable(Og(e));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id},r.versionId),r}addVersionedRowToCache(e){return this.addRowToCache(e)}addRowToCache(e){const r=this.rootStore.cache.addRow(iA(e));return this.rootStore.cache.addRowByVariables({revisionId:this.branch.draft.id,tableId:this.table.id,rowId:r.id},r.versionId),r}updateTablesConnection(e){const r=this.branch.draft,n=r.tablesConnection.edges.find(i=>i.node.id===e.id);n&&r.tablesConnection.replaceNode(n.cursor,e)}updateRowsConnection(e,r){const n=e.rowsConnection.edges.find(i=>i.node.id===r.id);n&&e.rowsConnection.replaceNode(n.cursor,r)}}class JBe extends DJ{constructor(e,r,n){super(e,r),this.store=n}async execute(){let e=!1,r=!1;if(this.row.id!==this.store.name.value&&(await this.renameRowRequest(),e=!0,r=!0),this.store.root.touched){const{wasCreatedNewVersionTable:n,wasCreatedNewVersionRow:i}=await this.updateRowProcess();e=e||n||i}return this.branch.touched||this.branch.updateTouched(!0),r&&this.branch.draft.tablesConnection.reset(),e&&this.projectPageModel.revalidateLoaders(),!0}async updateRowProcess(){const{table:e,previousVersionTableId:r,row:n,previousVersionRowId:i}=await this.updateRowRequest(this.store.root.getPlainValue()),o=e.versionId!==r;o&&this.updateTablesConnection(e);const a=n.versionId!==i;return a&&this.updateRowsConnection(e,n),{wasCreatedNewVersionTable:o,wasCreatedNewVersionRow:a}}async renameRowRequest(){const e=await GBe({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.row.id,nextRowId:this.store.name.getPlainValue()}});return{table:this.addVersionedTableToCache(e.renameRow.table),previousVersionTableId:e.renameRow.previousVersionTableId,row:this.addVersionedRowToCache(e.renameRow.row),previousVersionRowId:e.renameRow.previousVersionRowId}}async updateRowRequest(e){const r=await KBe({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.store.name.getPlainValue(),data:e}});return{table:this.addVersionedTableToCache(r.updateRow.table),previousVersionTableId:r.updateRow.previousVersionTableId,row:this.addVersionedRowToCache(r.updateRow.row),previousVersionRowId:r.updateRow.previousVersionRowId}}}class e6e extends DJ{constructor(e,r,n,i){super(e,r),this.fileService=n,this.store=i}async execute(e,r){let n=!1;const{wasCreatedNewVersionTable:i,wasCreatedNewVersionRow:o}=await this.uploadFileProcess(e,r);return n=n||i||o,this.branch.touched||this.branch.updateTouched(!0),n&&this.projectPageModel.revalidateLoaders(),!0}async uploadFileProcess(e,r){const{table:n,previousVersionTableId:i,row:o,previousVersionRowId:a}=await this.uploadFileRequest(e,r),s=n.versionId!==i;s&&this.updateTablesConnection(n);const l=o.versionId!==a;return l&&this.updateRowsConnection(n,o),{wasCreatedNewVersionTable:s,wasCreatedNewVersionRow:l}}async uploadFileRequest(e,r){const n=await this.fileService.add({revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.store.name.getPlainValue(),fileId:e,file:r}),i=await this.rootStore.queryTable({data:{revisionId:this.branch.draft.id,tableId:this.table.id}}),o=await this.rootStore.queryRow({revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.row.id});if(!i||!o)throw new Error("Table or row not found");return{table:i,previousVersionTableId:n.previousVersionTableId,row:o,previousVersionRowId:n.previousVersionRowId}}}class qI{constructor(e,r){this.authService=e,this.environmentService=r}async add({revisionId:e,tableId:r,rowId:n,fileId:i,file:o}){const a=`${this.environmentService.get("REACT_APP_SWAGGER_SERVER_URL")}/revision/${e}/tables/${r}/rows/${n}/upload/${i}`,s=await this.upload(a,o);if(!s.ok)throw new Error(s.statusText);return s.json()}async upload(e,r){const n=new FormData;return n.append("file",r,r.name),fetch(e,{method:"POST",headers:{Authorization:`Bearer ${this.authService.token}`},body:n})}}ft.register(qI,()=>{const t=ft.get(ho),e=ft.get(bS);return new qI(t,e)},{scope:"singleton"});var ai=(t=>(t.List="List",t.CreatingRow="CreatingRow",t.ConnectingForeignKeyRow="ConnectingForeignKeyRow",t.UpdatingRow="UpdatingRow",t))(ai||{});class GE{constructor(e,r,n,i){de(this,"id",vn());this.rootStore=e,this.projectPageModel=r,this.customTable=n,this.state=i,lt(this,{},{autoBind:!0})}get table(){return this.customTable||this.projectPageModel.tableOrThrow}get schema(){return this.table.schema}get isEditableRevision(){return this.projectPageModel.isEditableRevision}get currentForeignKeyPath(){return this.state.type==="ConnectingForeignKeyRow"?dx(this.state.foreignKeyNode):""}get branch(){return this.projectPageModel.branchOrThrow}async createRow(e,r){try{return await new XBe(this.rootStore,this.projectPageModel,this.branch,this.table).execute(e,r)}catch(n){return console.error(n),null}}async updateRow(e){try{return await new JBe(this.rootStore,this.projectPageModel,e).execute()}catch(r){return console.error(r),!1}}async uploadFile(e,r,n){try{const i=ft.get(qI);return await new e6e(this.rootStore,this.projectPageModel,i,e).execute(r,n)}catch(i){return console.error(i),!1}}toList(){this.state={type:"List",isSelectingForeignKey:this.state.isSelectingForeignKey}}toConnectingForeignKeyRow(e){if(this.state.type==="CreatingRow"||this.state.type==="UpdatingRow")this.state={type:"ConnectingForeignKeyRow",previousType:this.state.type,isSelectingForeignKey:this.state.isSelectingForeignKey,store:this.state.store,foreignKeyNode:e};else throw new Error("Invalid state")}toCloneRow(e){const r=this.rootStore.cache.getRow(e);if(!r)throw new Error(`Not found row.versionId ${e}`);const n=`${this.table.id.toLowerCase()}-${vn(9).toLowerCase()}`,i=_u(this.schema),o=new zI(i,sc(i),n,null,this.projectPageModel);o.root.updateBaseValue(r.data),Yy(o.root,a=>{if(a.$ref){const s=CA[a.$ref];if(s){const l=sc(_u(s));a.updateBaseValue(l.getPlainValue())}}}),this.state={type:"CreatingRow",isSelectingForeignKey:this.state.isSelectingForeignKey,store:o}}toCreatingRow(){const e=`${this.table.id.toLowerCase()}-${vn(9).toLowerCase()}`,r=_u(this.schema),n=this.state.type==="ConnectingForeignKeyRow"?this.state.store:new zI(r,sc(r),e);this.state={type:"CreatingRow",isSelectingForeignKey:this.state.isSelectingForeignKey,store:n}}toUpdatingTableFromConnectingForeignKeyRow(){if(this.state.type!=="ConnectingForeignKeyRow")throw new Error("Invalid state");const e=this.state.store;this.state={type:"UpdatingRow",isSelectingForeignKey:this.state.isSelectingForeignKey,store:e}}init(){}dispose(){}updateStore(e){this.state.type==="UpdatingRow"&&(this.state.store=e)}}class t6e{constructor(e,r,n){de(this,"stack");de(this,"disposers",[]);this.rootStore=e,this.projectPageModel=r,this.stack=[new GE(this.rootStore,this.projectPageModel,null,{type:ai.List,isSelectingForeignKey:!1})],n&&(this.stack=[new GE(this.rootStore,this.projectPageModel,null,{type:ai.UpdatingRow,isSelectingForeignKey:!1,store:this.createStore()})]),lt(this,{},{autoBind:!0})}async selectForeignKey(e,r){if(!r.foreignKey)throw new Error("Invalid foreign key");const n=await this.getFetchedTableWithRows(r.foreignKey);e.toConnectingForeignKeyRow(r),ry(()=>{this.stack.push(new GE(this.rootStore,this.projectPageModel,n,{type:ai.List,isSelectingForeignKey:!0}))})}cancelSelectingForeignKey(e){const r=this.stack.findIndex(n=>n===e);r!==-1&&this.stack.splice(r+1),e.state.type===ai.ConnectingForeignKeyRow&&(e.state.previousType===ai.CreatingRow?e.toCreatingRow():e.state.previousType===ai.UpdatingRow&&e.toUpdatingTableFromConnectingForeignKeyRow())}onSelectedForeignKey(e,r){const n=this.stack.findIndex(o=>o===e),i=this.stack[n-1];i.state.type===ai.ConnectingForeignKeyRow&&(i.state.foreignKeyNode.setValue(r),i.state.previousType===ai.CreatingRow?i.toCreatingRow():i.state.previousType===ai.UpdatingRow&&i.toUpdatingTableFromConnectingForeignKeyRow()),this.stack.splice(n)}updateStore(){this.stack[0].updateStore(this.createStore())}init(){this.disposers.push(ol(()=>this.projectPageModel.row,()=>{this.updateStore()}))}dispose(){this.disposers.length=0}async getFetchedTableWithRows(e){const r={revisionId:this.projectPageModel.revisionOrThrow.id,tableId:e},n=this.rootStore.cache.getTableByVariables(r)||await gt.queryTable({data:r});if(!n)throw new Error(`Not found table ${e}`);return n.rowsConnection.countLoaded||await gt.queryRows({revisionId:this.projectPageModel.revisionOrThrow.id,tableId:n.id,first:50}),n}createStore(){const e=this.projectPageModel.tableOrThrow.schema,r=RJ(e)?_u(e):new NJ;return new zI(r,sc(r),this.projectPageModel.rowOrThrow.id,this.projectPageModel.rowOrThrow,this.projectPageModel)}}const r6e=t=>{const e=Ui(),[r]=A.useState(()=>new t6e(gt,e,t));return A.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},LJ=A.createContext(null),n6e=()=>{const t=A.useContext(LJ);if(!t)throw new Error("Invalid RowStackModelContext");return t},i6e=mt(({onClick:t})=>{const e=Ui();return P.jsx(mg,{dataTestId:"create-row-button",disabled:!e.isEditableRevision,title:"Row",onClick:t})}),o6e=({row:t,onSelect:e})=>{const r=A.useCallback(()=>{e==null||e(t.id)},[e,t.id]);return P.jsxs(Te,{_hover:{backgroundColor:"gray.50"},alignItems:"center",gap:"4px",paddingLeft:"1rem",minHeight:"2.5rem",width:"100%",children:[P.jsx(Te,{minWidth:"150px",children:P.jsx(dt,{textDecoration:"underline",cursor:"pointer",onClick:r,children:t.id})}),P.jsx(Te,{alignItems:"center",justifyContent:"space-between",minHeight:"40px",width:"100%",minWidth:0,children:P.jsx(dt,{ml:"16px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:"gray.400",children:t.data})})]},t.versionId)},a6e=({tableId:t,connection:e})=>{const r=rd(),n=Vf(),i=A.useCallback(o=>{r(n.make({...n.getCurrentOptions(),tableId:t,rowId:o}),{state:{isBackToRow:!0}})},[n,r,t]);return P.jsxs(Te,{flexDirection:"column",width:"100%",children:[P.jsxs(Te,{minHeight:"40px",width:"100%",gap:"4px",children:[P.jsx(dt,{children:t}),P.jsxs(dt,{color:"gray.300",children:["(",e.totalCount,")"]})]}),P.jsx(PA,{useWindowScroll:!0,totalCount:e.totalCount,defaultItemHeight:40,increaseViewportBy:40*100,itemContent:o=>{const{node:a}=e.edges[o];if(a)return P.jsx(o6e,{row:{id:a.id,versionId:a.versionId,data:JSON.stringify(a.data,null,2).replaceAll("\\n","")},onSelect:i})}})]})},s6e=({row:t})=>{const e=A.useMemo(()=>[...t.rowForeignKeysByConnection.keys()].map(n=>({tableId:n,connection:t.rowForeignKeysByConnection.get(n)})).filter(n=>n.connection.totalCount),[t]);return P.jsx(Te,{flexDirection:"column",width:"100%",gap:"40px",children:e.map(({tableId:r,connection:n})=>P.jsx(a6e,{tableId:r,connection:n},r))})},l6e=mt(({store:t})=>P.jsx(Te,{height:"40px",paddingBottom:"4px",alignItems:"flex-end",backgroundColor:"white",width:"100%",position:"sticky",bottom:0,justifyContent:"space-between",children:P.jsx(dt,{color:"gray",opacity:"0.4",children:t.isComplexStructure&&t.overNode&&dx(t.overNode)})})),f6=({dataTestId:t,url:e})=>{const r=A.useCallback(()=>{window.open(e,"_blank")},[e]);return P.jsx(Ti,{"data-testid":`${t}-open-file`,_hover:{backgroundColor:"gray.100",color:"black"},color:"gray.400","aria-label":"",height:"24px",variant:"ghost",onClick:r,size:"sm",children:P.jsx(F1e,{})})},c6e=({url:t,dataTestId:e,availablePreview:r,width:n,height:i})=>r?P.jsxs(Age,{lazyMount:!0,unmountOnExit:!0,openDelay:350,closeDelay:100,positioning:{gutter:16},children:[P.jsx(Mge,{children:P.jsx(f6,{dataTestId:e,url:t})}),P.jsx(Ku,{children:P.jsx(Nge,{children:P.jsxs(jge,{children:[P.jsx(Dge,{children:P.jsx(eW,{})}),P.jsx(Lge,{aspectRatio:n/i,width:"400px",src:t})]})})})]}):P.jsx(f6,{dataTestId:e,url:t}),GP=({hoverClassName:t,readonly:e,hideInfo:r,store:n,onUpload:i,dataTestId:o})=>{const a=n.value.status.getPlainValue(),s=n.value.fileId.getPlainValue(),l=n.value.url.getPlainValue(),c=n.value.mimeType.getPlainValue(),d=n.value.width.getPlainValue(),p=n.value.height.getPlainValue(),g=c.startsWith("image/"),m=!!l,y=!e&&(a==="ready"||a==="uploaded"),b=!m&&!y&&!r,O=m,S=async w=>{var T;const k=(T=w.target.files)==null?void 0:T[0];k&&(i==null||i(s,k),w.target.value="")};return P.jsxs(Te,{alignItems:"center",children:[b&&P.jsx(vX,{openDelay:50,closeDelay:50,positioning:{placement:"right"},content:e?"The file was not uploaded in this revision":"To upload this file, you must first save this row.",children:P.jsx(Te,{width:"24px",height:"24px",alignItems:"center",justifyContent:"center",color:"gray.400",children:P.jsx(B1e,{})})}),m&&P.jsx(c6e,{width:d,height:p,availablePreview:g,dataTestId:`${o}-open-file`,url:l}),y&&P.jsxs(ze,{className:O?t:void 0,children:[P.jsx("input",{type:"file",onChange:S,id:`file-${s}`,style:{display:"none"}}),P.jsx("label",{htmlFor:`file-${s}`,children:P.jsx(Ti,{"data-testid":`${o}-upload-file`,cursor:"pointer",_hover:{backgroundColor:"gray.100",color:"black"},color:m?"gray.300":void 0,"aria-label":"",height:"24px",variant:"ghost",as:"span",size:"sm",children:P.jsx(iSe,{})})})]})]})},EM=mt(({store:t,readonly:e,dataTestId:r})=>{const[n,i]=A.useState(t.getPlainValue().toString()),o=A.useCallback(s=>{i(s)},[]),a=A.useCallback(()=>{const s=n.toLowerCase()==="false"||n==="0"?!1:!!n;i(s.toString()),t.setValue(s)},[t,n]);return P.jsx(ze,{ml:"2px",pl:"4px",pr:"4px",height:"24px",minWidth:"15px",cursor:e?"not-allowed":void 0,children:e?t.getPlainValue().toString()??'""':P.jsx(sf,{dataTestId:r,initValue:n,onChange:o,onBlur:a})})}),Hd=mt(({name:t,value:e,children:r,nameAndValueClassName:n,colorName:i,onOverLabel:o,onOutLabel:a,store:s,description:l,deprecated:c})=>{const d=s instanceof XP||s instanceof Ky?{isCollapsible:s.isCollapsible,isCollapsed:s.isCollapsed,toggleCollapsed:s.toggleCollapsed}:{},p=`dot-outline-${s==null?void 0:s.nodeId}`,g=`collapse-button-${s==null?void 0:s.nodeId}`,m=d.isCollapsible&&!d.isCollapsed?{[`& .${p}`]:{visibility:"hidden"},[`& .${g}`]:{visibility:"visible"}}:{};return t===void 0&&e===void 0?P.jsx(Te,{flexDirection:"column",width:"100%",children:r}):P.jsxs(Te,{flexDirection:"column",flex:1,width:"100%",_hover:m,children:[P.jsxs(Te,{className:n,gap:"4px",minHeight:"28px",alignItems:"flex-start",onMouseOver:o,onMouseOut:a,children:[P.jsx(ze,{position:"absolute",ml:"-60px",width:"60px",height:"28px"}),P.jsx(Te,{color:"gray.300",height:"28px",alignItems:"center",className:p,visibility:d.isCollapsed?"hidden":"visible",children:P.jsx(X2,{})}),d.isCollapsible&&P.jsx(Ti,{className:g,visibility:d.isCollapsed?"visible":"hidden",_hover:{backgroundColor:"transparent"},ml:"-8px",position:"absolute",zIndex:1,size:"xs",color:"gray.300",variant:"ghost",onClick:d.toggleCollapsed,width:"26px",height:"26px",children:P.jsx(ze,{rotate:d.isCollapsed?"0":"90deg",children:P.jsx(bG,{})})}),t?P.jsxs(Te,{flex:1,children:[l?P.jsx(vX,{openDelay:350,closeDelay:50,showArrow:!0,content:l,positioning:{placement:"right-end"},children:P.jsx(dt,{color:i,fontWeight:"300",textDecoration:c?"line-through":void 0,children:t})}):P.jsx(dt,{color:i,fontWeight:"300",textDecoration:c?"line-through":void 0,children:t}),P.jsx(Te,{gap:"4px",flex:1,children:e})]}):P.jsxs(Te,{children:[P.jsx(dt,{children:e}),P.jsx(ze,{children:":"})]})]}),r&&!d.isCollapsed&&P.jsx(ze,{ml:"7px",pl:"18px",borderLeftWidth:1,borderLeftStyle:"solid",borderLeftColor:"white",_hover:{borderLeftColor:"blackAlpha.200"},children:r})]})}),u6e=/^[\d.-]+$/,_M=mt(({store:t,readonly:e,dataTestId:r})=>{const n=A.useCallback(i=>{const o=parseFloat(i);isNaN(o)?t.setValue(t.default):t.setValue(o)},[t]);return P.jsx(ze,{ml:"2px",pl:"4px",pr:"4px",height:"24px",minWidth:"15px",cursor:e?"not-allowed":void 0,children:e?t.getPlainValue()??'""':P.jsx(sf,{dataTestId:r,initValue:t.getPlainValue().toString(),onChange:n,restrict:u6e})})});class fx{static create(e,r,n,i,o){let a=i+(i<<8)+e+(r<<4)|0;return new fx(e,r,n,a,o,[],[])}constructor(e,r,n,i,o,a,s){this.type=e,this.value=r,this.from=n,this.hash=i,this.end=o,this.children=a,this.positions=s,this.hashProp=[[_t.contextHash,i]]}addChild(e,r){e.prop(_t.contextHash)!=this.hash&&(e=new Tr(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(r)}toTree(e,r=this.end){let n=this.children.length-1;return n>=0&&(r=Math.max(r,this.positions[n]+this.children[n].length+this.from)),new Tr(e.types[this.type],this.children,this.positions,r-this.from).balance({makeTree:(i,o,a)=>new Tr(fi.none,i,o,a,this.hashProp)})}}var je;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(je||(je={}));class d6e{constructor(e,r){this.start=e,this.content=r,this.marks=[],this.parsers=[]}}class f6e{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return zv(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,r=0,n=0){for(let i=r;i<e;i++)n+=this.text.charCodeAt(i)==9?4-n%4:1;return n}findColumn(e){let r=0;for(let n=0;r<this.text.length&&n<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return r}scrub(){if(!this.baseIndent)return this.text;let e="";for(let r=0;r<this.basePos;r++)e+=" ";return e+this.text.slice(this.basePos)}}function h6(t,e,r){if(r.pos==r.text.length||t!=e.block&&r.indent>=e.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(t.type==je.OrderedList?$M:IM)(r,e,!1);return n>0&&(t.type!=je.BulletList||RM(r,e,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==t.value}const QJ={[je.Blockquote](t,e,r){return r.next!=62?!1:(r.markers.push(ar(je.QuoteMark,e.lineStart+r.pos,e.lineStart+r.pos+1)),r.moveBase(r.pos+(Ka(r.text.charCodeAt(r.pos+1))?2:1)),t.end=e.lineStart+r.text.length,!0)},[je.ListItem](t,e,r){return r.indent<r.baseIndent+t.value&&r.next>-1?!1:(r.moveBaseColumn(r.baseIndent+t.value),!0)},[je.OrderedList]:h6,[je.BulletList]:h6,[je.Document](){return!0}};function Ka(t){return t==32||t==9||t==10||t==13}function zv(t,e=0){for(;e<t.length&&Ka(t.charCodeAt(e));)e++;return e}function p6(t,e,r){for(;e>r&&Ka(t.charCodeAt(e-1));)e--;return e}function VJ(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let r=e;r<t.text.length;r++)if(t.text.charCodeAt(r)==96)return-1}return e}function FJ(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function RM(t,e,r){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let n=1;for(let i=t.pos+1;i<t.text.length;i++){let o=t.text.charCodeAt(i);if(o==t.next)n++;else if(!Ka(o))return-1}return r&&t.next==45&&qJ(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(XJ.SetextHeading)>-1||n<3?-1:1}function BJ(t,e){for(let r=t.stack.length-1;r>=0;r--)if(t.stack[r].type==e)return!0;return!1}function IM(t,e,r){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||Ka(t.text.charCodeAt(t.pos+1)))&&(!r||BJ(e,je.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function $M(t,e,r){let n=t.pos,i=t.next;for(;i>=48&&i<=57;){n++;if(n==t.text.length)return-1;i=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||i!=46&&i!=41||n<t.text.length-1&&!Ka(t.text.charCodeAt(n+1))||r&&!BJ(e,je.OrderedList)&&(t.skipSpace(n+1)==t.text.length||n>t.pos+1||t.next!=49)?-1:n+1-t.pos}function zJ(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let r=e-t.pos;return r>6?-1:r}function qJ(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let r=e;for(;e<t.text.length&&Ka(t.text.charCodeAt(e));)e++;return e==t.text.length?r:-1}const WI=/^[ \t]*$/,WJ=/-->/,UJ=/\?>/,UI=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,WJ],[/^\s*<\?/,UJ],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,WI],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,WI]];function HJ(t,e,r){if(t.next!=60)return-1;let n=t.text.slice(t.pos);for(let i=0,o=UI.length-(r?1:0);i<o;i++)if(UI[i][0].test(n))return i;return-1}function g6(t,e){let r=t.countIndent(e,t.pos,t.indent),n=t.countIndent(t.skipSpace(e),e,r);return n>=r+5?r+1:n}function Ld(t,e,r){let n=t.length-1;n>=0&&t[n].to==e&&t[n].type==je.CodeText?t[n].to=r:t.push(ar(je.CodeText,e,r))}const Yw={LinkReference:void 0,IndentedCode(t,e){let r=e.baseIndent+4;if(e.indent<r)return!1;let n=e.findColumn(r),i=t.lineStart+n,o=t.lineStart+e.text.length,a=[],s=[];for(Ld(a,i,o);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){Ld(s,t.lineStart-1,t.lineStart);for(let l of e.markers)s.push(l)}else{if(e.indent<r)break;{if(s.length){for(let c of s)c.type==je.CodeText?Ld(a,c.from,c.to):a.push(c);s=[]}Ld(a,t.lineStart-1,t.lineStart);for(let c of e.markers)a.push(c);o=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<o&&Ld(a,l,o)}}return s.length&&(s=s.filter(l=>l.type!=je.CodeText),s.length&&(e.markers=s.concat(e.markers))),t.addNode(t.buffer.writeElements(a,-i).finish(je.CodeBlock,o-i),i),!0},FencedCode(t,e){let r=VJ(e);if(r<0)return!1;let n=t.lineStart+e.pos,i=e.next,o=r-e.pos,a=e.skipSpace(r),s=p6(e.text,e.text.length,a),l=[ar(je.CodeMark,n,n+o)];a<s&&l.push(ar(je.CodeInfo,t.lineStart+a,t.lineStart+s));for(let c=!0;t.nextLine()&&e.depth>=t.stack.length;c=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==i;)d++;if(d-e.pos>=o&&e.skipSpace(d)==e.text.length){for(let p of e.markers)l.push(p);l.push(ar(je.CodeMark,t.lineStart+e.pos,t.lineStart+d)),t.nextLine();break}else{c||Ld(l,t.lineStart-1,t.lineStart);for(let m of e.markers)l.push(m);let p=t.lineStart+e.basePos,g=t.lineStart+e.text.length;p<g&&Ld(l,p,g)}}return t.addNode(t.buffer.writeElements(l,-n).finish(je.FencedCode,t.prevLineEnd()-n),n),!0},Blockquote(t,e){let r=FJ(e);return r<0?!1:(t.startContext(je.Blockquote,e.pos),t.addNode(je.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+r),null)},HorizontalRule(t,e){if(RM(e,t,!1)<0)return!1;let r=t.lineStart+e.pos;return t.nextLine(),t.addNode(je.HorizontalRule,r),!0},BulletList(t,e){let r=IM(e,t,!1);if(r<0)return!1;t.block.type!=je.BulletList&&t.startContext(je.BulletList,e.basePos,e.next);let n=g6(e,e.pos+1);return t.startContext(je.ListItem,e.basePos,n-e.baseIndent),t.addNode(je.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},OrderedList(t,e){let r=$M(e,t,!1);if(r<0)return!1;t.block.type!=je.OrderedList&&t.startContext(je.OrderedList,e.basePos,e.text.charCodeAt(e.pos+r-1));let n=g6(e,e.pos+r);return t.startContext(je.ListItem,e.basePos,n-e.baseIndent),t.addNode(je.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},ATXHeading(t,e){let r=zJ(e);if(r<0)return!1;let n=e.pos,i=t.lineStart+n,o=p6(e.text,e.text.length,n),a=o;for(;a>n&&e.text.charCodeAt(a-1)==e.next;)a--;(a==o||a==n||!Ka(e.text.charCodeAt(a-1)))&&(a=e.text.length);let s=t.buffer.write(je.HeaderMark,0,r).writeElements(t.parser.parseInline(e.text.slice(n+r+1,a),i+r+1),-i);a<e.text.length&&s.write(je.HeaderMark,a-n,o-n);let l=s.finish(je.ATXHeading1-1+r,e.text.length-n);return t.nextLine(),t.addNode(l,i),!0},HTMLBlock(t,e){let r=HJ(e,t,!1);if(r<0)return!1;let n=t.lineStart+e.pos,i=UI[r][1],o=[],a=i!=WI;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){a=!1;break}for(let c of e.markers)o.push(c)}a&&t.nextLine();let s=i==WJ?je.CommentBlock:i==UJ?je.ProcessingInstructionBlock:je.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(o,-n).finish(s,l-n),n),!0},SetextHeading:void 0};class h6e{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,r,n){if(this.stage==-1)return!1;let i=n.content+`
|
|
1194
|
+
`,KBe=async t=>{const e=await _r.mutate({mutation:YBe,variables:t});if(!e.data)throw e.errors;return e.data};class DJ{constructor(e,r){this.rootStore=e,this.projectPageModel=r}get branch(){return this.projectPageModel.branchOrThrow}get table(){return this.projectPageModel.tableOrThrow}get row(){return this.projectPageModel.rowOrThrow}addVersionedTableToCache(e){return this.addTableToCache(e)}addTableToCache(e){const r=this.rootStore.cache.addOrTable(Og(e));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id},r.versionId),r}addVersionedRowToCache(e){return this.addRowToCache(e)}addRowToCache(e){const r=this.rootStore.cache.addRow(iA(e));return this.rootStore.cache.addRowByVariables({revisionId:this.branch.draft.id,tableId:this.table.id,rowId:r.id},r.versionId),r}updateTablesConnection(e){const r=this.branch.draft,n=r.tablesConnection.edges.find(i=>i.node.id===e.id);n&&r.tablesConnection.replaceNode(n.cursor,e)}updateRowsConnection(e,r){const n=e.rowsConnection.edges.find(i=>i.node.id===r.id);n&&e.rowsConnection.replaceNode(n.cursor,r)}}class JBe extends DJ{constructor(e,r,n){super(e,r),this.store=n}async execute(){let e=!1,r=!1;if(this.row.id!==this.store.name.value&&(await this.renameRowRequest(),e=!0,r=!0),this.store.root.touched){const{wasCreatedNewVersionTable:n,wasCreatedNewVersionRow:i}=await this.updateRowProcess();e=e||n||i}return this.branch.touched||this.branch.updateTouched(!0),r&&this.branch.draft.tablesConnection.reset(),e&&this.projectPageModel.revalidateLoaders(),!0}async updateRowProcess(){const{table:e,previousVersionTableId:r,row:n,previousVersionRowId:i}=await this.updateRowRequest(this.store.root.getPlainValue()),o=e.versionId!==r;o&&this.updateTablesConnection(e);const a=n.versionId!==i;return a&&this.updateRowsConnection(e,n),{wasCreatedNewVersionTable:o,wasCreatedNewVersionRow:a}}async renameRowRequest(){const e=await GBe({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.row.id,nextRowId:this.store.name.getPlainValue()}});return{table:this.addVersionedTableToCache(e.renameRow.table),previousVersionTableId:e.renameRow.previousVersionTableId,row:this.addVersionedRowToCache(e.renameRow.row),previousVersionRowId:e.renameRow.previousVersionRowId}}async updateRowRequest(e){const r=await KBe({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.store.name.getPlainValue(),data:e}});return{table:this.addVersionedTableToCache(r.updateRow.table),previousVersionTableId:r.updateRow.previousVersionTableId,row:this.addVersionedRowToCache(r.updateRow.row),previousVersionRowId:r.updateRow.previousVersionRowId}}}class e6e extends DJ{constructor(e,r,n,i){super(e,r),this.fileService=n,this.store=i}async execute(e,r){let n=!1;const{wasCreatedNewVersionTable:i,wasCreatedNewVersionRow:o}=await this.uploadFileProcess(e,r);return n=n||i||o,this.branch.touched||this.branch.updateTouched(!0),n&&this.projectPageModel.revalidateLoaders(),!0}async uploadFileProcess(e,r){const{table:n,previousVersionTableId:i,row:o,previousVersionRowId:a}=await this.uploadFileRequest(e,r),s=n.versionId!==i;s&&this.updateTablesConnection(n);const l=o.versionId!==a;return l&&this.updateRowsConnection(n,o),{wasCreatedNewVersionTable:s,wasCreatedNewVersionRow:l}}async uploadFileRequest(e,r){const n=await this.fileService.add({revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.store.name.getPlainValue(),fileId:e,file:r}),i=await this.rootStore.queryTable({data:{revisionId:this.branch.draft.id,tableId:this.table.id}}),o=await this.rootStore.queryRow({revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.row.id});if(!i||!o)throw new Error("Table or row not found");return{table:i,previousVersionTableId:n.previousVersionTableId,row:o,previousVersionRowId:n.previousVersionRowId}}}class qI{constructor(e,r){this.authService=e,this.environmentService=r}async add({revisionId:e,tableId:r,rowId:n,fileId:i,file:o}){const a=`${this.environmentService.get("REACT_APP_SWAGGER_SERVER_URL")}/revision/${e}/tables/${r}/rows/${n}/upload/${i}`,s=await this.upload(a,o);if(!s.ok)throw new Error(s.statusText);return s.json()}async upload(e,r){const n=new FormData;return n.append("file",r,r.name),fetch(e,{method:"POST",headers:{Authorization:`Bearer ${this.authService.token}`},body:n})}}ft.register(qI,()=>{const t=ft.get(ho),e=ft.get(bS);return new qI(t,e)},{scope:"singleton"});var ai=(t=>(t.List="List",t.CreatingRow="CreatingRow",t.ConnectingForeignKeyRow="ConnectingForeignKeyRow",t.UpdatingRow="UpdatingRow",t))(ai||{});class GE{constructor(e,r,n,i){fe(this,"id",vn());this.rootStore=e,this.projectPageModel=r,this.customTable=n,this.state=i,lt(this,{},{autoBind:!0})}get table(){return this.customTable||this.projectPageModel.tableOrThrow}get schema(){return this.table.schema}get isEditableRevision(){return this.projectPageModel.isEditableRevision}get currentForeignKeyPath(){return this.state.type==="ConnectingForeignKeyRow"?dx(this.state.foreignKeyNode):""}get branch(){return this.projectPageModel.branchOrThrow}async createRow(e,r){try{return await new XBe(this.rootStore,this.projectPageModel,this.branch,this.table).execute(e,r)}catch(n){return console.error(n),null}}async updateRow(e){try{return await new JBe(this.rootStore,this.projectPageModel,e).execute()}catch(r){return console.error(r),!1}}async uploadFile(e,r,n){try{const i=ft.get(qI);return await new e6e(this.rootStore,this.projectPageModel,i,e).execute(r,n)}catch(i){return console.error(i),!1}}toList(){this.state={type:"List",isSelectingForeignKey:this.state.isSelectingForeignKey}}toConnectingForeignKeyRow(e){if(this.state.type==="CreatingRow"||this.state.type==="UpdatingRow")this.state={type:"ConnectingForeignKeyRow",previousType:this.state.type,isSelectingForeignKey:this.state.isSelectingForeignKey,store:this.state.store,foreignKeyNode:e};else throw new Error("Invalid state")}toCloneRow(e){const r=this.rootStore.cache.getRow(e);if(!r)throw new Error(`Not found row.versionId ${e}`);const n=`${this.table.id.toLowerCase()}-${vn(9).toLowerCase()}`,i=_u(this.schema),o=new zI(i,sc(i),n,null,this.projectPageModel);o.root.updateBaseValue(r.data),Yy(o.root,a=>{if(a.$ref){const s=CA[a.$ref];if(s){const l=sc(_u(s));a.updateBaseValue(l.getPlainValue())}}}),this.state={type:"CreatingRow",isSelectingForeignKey:this.state.isSelectingForeignKey,store:o}}toCreatingRow(){const e=`${this.table.id.toLowerCase()}-${vn(9).toLowerCase()}`,r=_u(this.schema),n=this.state.type==="ConnectingForeignKeyRow"?this.state.store:new zI(r,sc(r),e);this.state={type:"CreatingRow",isSelectingForeignKey:this.state.isSelectingForeignKey,store:n}}toUpdatingTableFromConnectingForeignKeyRow(){if(this.state.type!=="ConnectingForeignKeyRow")throw new Error("Invalid state");const e=this.state.store;this.state={type:"UpdatingRow",isSelectingForeignKey:this.state.isSelectingForeignKey,store:e}}init(){}dispose(){}updateStore(e){this.state.type==="UpdatingRow"&&(this.state.store=e)}}class t6e{constructor(e,r,n){fe(this,"stack");fe(this,"disposers",[]);this.rootStore=e,this.projectPageModel=r,this.stack=[new GE(this.rootStore,this.projectPageModel,null,{type:ai.List,isSelectingForeignKey:!1})],n&&(this.stack=[new GE(this.rootStore,this.projectPageModel,null,{type:ai.UpdatingRow,isSelectingForeignKey:!1,store:this.createStore()})]),lt(this,{},{autoBind:!0})}async selectForeignKey(e,r){if(!r.foreignKey)throw new Error("Invalid foreign key");const n=await this.getFetchedTableWithRows(r.foreignKey);e.toConnectingForeignKeyRow(r),ry(()=>{this.stack.push(new GE(this.rootStore,this.projectPageModel,n,{type:ai.List,isSelectingForeignKey:!0}))})}cancelSelectingForeignKey(e){const r=this.stack.findIndex(n=>n===e);r!==-1&&this.stack.splice(r+1),e.state.type===ai.ConnectingForeignKeyRow&&(e.state.previousType===ai.CreatingRow?e.toCreatingRow():e.state.previousType===ai.UpdatingRow&&e.toUpdatingTableFromConnectingForeignKeyRow())}onSelectedForeignKey(e,r){const n=this.stack.findIndex(o=>o===e),i=this.stack[n-1];i.state.type===ai.ConnectingForeignKeyRow&&(i.state.foreignKeyNode.setValue(r),i.state.previousType===ai.CreatingRow?i.toCreatingRow():i.state.previousType===ai.UpdatingRow&&i.toUpdatingTableFromConnectingForeignKeyRow()),this.stack.splice(n)}updateStore(){this.stack[0].updateStore(this.createStore())}init(){this.disposers.push(ol(()=>this.projectPageModel.row,()=>{this.updateStore()}))}dispose(){this.disposers.length=0}async getFetchedTableWithRows(e){const r={revisionId:this.projectPageModel.revisionOrThrow.id,tableId:e},n=this.rootStore.cache.getTableByVariables(r)||await gt.queryTable({data:r});if(!n)throw new Error(`Not found table ${e}`);return n.rowsConnection.countLoaded||await gt.queryRows({revisionId:this.projectPageModel.revisionOrThrow.id,tableId:n.id,first:50}),n}createStore(){const e=this.projectPageModel.tableOrThrow.schema,r=RJ(e)?_u(e):new NJ;return new zI(r,sc(r),this.projectPageModel.rowOrThrow.id,this.projectPageModel.rowOrThrow,this.projectPageModel)}}const r6e=t=>{const e=Ui(),[r]=A.useState(()=>new t6e(gt,e,t));return A.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},LJ=A.createContext(null),n6e=()=>{const t=A.useContext(LJ);if(!t)throw new Error("Invalid RowStackModelContext");return t},i6e=mt(({onClick:t})=>{const e=Ui();return P.jsx(mg,{dataTestId:"create-row-button",disabled:!e.isEditableRevision,title:"Row",onClick:t})}),o6e=({row:t,onSelect:e})=>{const r=A.useCallback(()=>{e==null||e(t.id)},[e,t.id]);return P.jsxs(Te,{_hover:{backgroundColor:"gray.50"},alignItems:"center",gap:"4px",paddingLeft:"1rem",minHeight:"2.5rem",width:"100%",children:[P.jsx(Te,{minWidth:"150px",children:P.jsx(dt,{textDecoration:"underline",cursor:"pointer",onClick:r,children:t.id})}),P.jsx(Te,{alignItems:"center",justifyContent:"space-between",minHeight:"40px",width:"100%",minWidth:0,children:P.jsx(dt,{ml:"16px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:"gray.400",children:t.data})})]},t.versionId)},a6e=({tableId:t,connection:e})=>{const r=rd(),n=Vf(),i=A.useCallback(o=>{r(n.make({...n.getCurrentOptions(),tableId:t,rowId:o}),{state:{isBackToRow:!0}})},[n,r,t]);return P.jsxs(Te,{flexDirection:"column",width:"100%",children:[P.jsxs(Te,{minHeight:"40px",width:"100%",gap:"4px",children:[P.jsx(dt,{children:t}),P.jsxs(dt,{color:"gray.300",children:["(",e.totalCount,")"]})]}),P.jsx(PA,{useWindowScroll:!0,totalCount:e.totalCount,defaultItemHeight:40,increaseViewportBy:40*100,itemContent:o=>{const{node:a}=e.edges[o];if(a)return P.jsx(o6e,{row:{id:a.id,versionId:a.versionId,data:JSON.stringify(a.data,null,2).replaceAll("\\n","")},onSelect:i})}})]})},s6e=({row:t})=>{const e=A.useMemo(()=>[...t.rowForeignKeysByConnection.keys()].map(n=>({tableId:n,connection:t.rowForeignKeysByConnection.get(n)})).filter(n=>n.connection.totalCount),[t]);return P.jsx(Te,{flexDirection:"column",width:"100%",gap:"40px",children:e.map(({tableId:r,connection:n})=>P.jsx(a6e,{tableId:r,connection:n},r))})},l6e=mt(({store:t})=>P.jsx(Te,{height:"40px",paddingBottom:"4px",alignItems:"flex-end",backgroundColor:"white",width:"100%",position:"sticky",bottom:0,justifyContent:"space-between",children:P.jsx(dt,{color:"gray",opacity:"0.4",children:t.isComplexStructure&&t.overNode&&dx(t.overNode)})})),f6=({dataTestId:t,url:e})=>{const r=A.useCallback(()=>{window.open(e,"_blank")},[e]);return P.jsx(Ti,{"data-testid":`${t}-open-file`,_hover:{backgroundColor:"gray.100",color:"black"},color:"gray.400","aria-label":"",height:"24px",variant:"ghost",onClick:r,size:"sm",children:P.jsx(F1e,{})})},c6e=({url:t,dataTestId:e,availablePreview:r,width:n,height:i})=>r?P.jsxs(Age,{lazyMount:!0,unmountOnExit:!0,openDelay:350,closeDelay:100,positioning:{gutter:16},children:[P.jsx(Mge,{children:P.jsx(f6,{dataTestId:e,url:t})}),P.jsx(Ku,{children:P.jsx(Nge,{children:P.jsxs(jge,{children:[P.jsx(Dge,{children:P.jsx(eW,{})}),P.jsx(Lge,{aspectRatio:n/i,width:"400px",src:t})]})})})]}):P.jsx(f6,{dataTestId:e,url:t}),GP=({hoverClassName:t,readonly:e,hideInfo:r,store:n,onUpload:i,dataTestId:o})=>{const a=n.value.status.getPlainValue(),s=n.value.fileId.getPlainValue(),l=n.value.url.getPlainValue(),c=n.value.mimeType.getPlainValue(),d=n.value.width.getPlainValue(),p=n.value.height.getPlainValue(),g=c.startsWith("image/"),m=!!l,y=!e&&(a==="ready"||a==="uploaded"),b=!m&&!y&&!r,O=m,S=async w=>{var T;const k=(T=w.target.files)==null?void 0:T[0];k&&(i==null||i(s,k),w.target.value="")};return P.jsxs(Te,{alignItems:"center",children:[b&&P.jsx(vX,{openDelay:50,closeDelay:50,positioning:{placement:"right"},content:e?"The file was not uploaded in this revision":"To upload this file, you must first save this row.",children:P.jsx(Te,{width:"24px",height:"24px",alignItems:"center",justifyContent:"center",color:"gray.400",children:P.jsx(B1e,{})})}),m&&P.jsx(c6e,{width:d,height:p,availablePreview:g,dataTestId:`${o}-open-file`,url:l}),y&&P.jsxs(ze,{className:O?t:void 0,children:[P.jsx("input",{type:"file",onChange:S,id:`file-${s}`,style:{display:"none"}}),P.jsx("label",{htmlFor:`file-${s}`,children:P.jsx(Ti,{"data-testid":`${o}-upload-file`,cursor:"pointer",_hover:{backgroundColor:"gray.100",color:"black"},color:m?"gray.300":void 0,"aria-label":"",height:"24px",variant:"ghost",as:"span",size:"sm",children:P.jsx(iSe,{})})})]})]})},EM=mt(({store:t,readonly:e,dataTestId:r})=>{const[n,i]=A.useState(t.getPlainValue().toString()),o=A.useCallback(s=>{i(s)},[]),a=A.useCallback(()=>{const s=n.toLowerCase()==="false"||n==="0"?!1:!!n;i(s.toString()),t.setValue(s)},[t,n]);return P.jsx(ze,{ml:"2px",pl:"4px",pr:"4px",height:"24px",minWidth:"15px",cursor:e?"not-allowed":void 0,children:e?t.getPlainValue().toString()??'""':P.jsx(sf,{dataTestId:r,initValue:n,onChange:o,onBlur:a})})}),Hd=mt(({name:t,value:e,children:r,nameAndValueClassName:n,colorName:i,onOverLabel:o,onOutLabel:a,store:s,description:l,deprecated:c})=>{const d=s instanceof XP||s instanceof Ky?{isCollapsible:s.isCollapsible,isCollapsed:s.isCollapsed,toggleCollapsed:s.toggleCollapsed}:{},p=`dot-outline-${s==null?void 0:s.nodeId}`,g=`collapse-button-${s==null?void 0:s.nodeId}`,m=d.isCollapsible&&!d.isCollapsed?{[`& .${p}`]:{visibility:"hidden"},[`& .${g}`]:{visibility:"visible"}}:{};return t===void 0&&e===void 0?P.jsx(Te,{flexDirection:"column",width:"100%",children:r}):P.jsxs(Te,{flexDirection:"column",flex:1,width:"100%",_hover:m,children:[P.jsxs(Te,{className:n,gap:"4px",minHeight:"28px",alignItems:"flex-start",onMouseOver:o,onMouseOut:a,children:[P.jsx(ze,{position:"absolute",ml:"-60px",width:"60px",height:"28px"}),P.jsx(Te,{color:"gray.300",height:"28px",alignItems:"center",className:p,visibility:d.isCollapsed?"hidden":"visible",children:P.jsx(X2,{})}),d.isCollapsible&&P.jsx(Ti,{className:g,visibility:d.isCollapsed?"visible":"hidden",_hover:{backgroundColor:"transparent"},ml:"-8px",position:"absolute",zIndex:1,size:"xs",color:d.isCollapsed?"gray.600":"gray.300",variant:"ghost",onClick:d.toggleCollapsed,width:"26px",height:"26px",children:P.jsx(ze,{rotate:d.isCollapsed?"0":"90deg",children:P.jsx(bG,{})})}),t?P.jsxs(Te,{flex:1,children:[l?P.jsx(vX,{openDelay:350,closeDelay:50,showArrow:!0,content:l,positioning:{placement:"right-end"},children:P.jsx(dt,{color:i,fontWeight:"300",textDecoration:c?"line-through":void 0,children:t})}):P.jsx(dt,{color:i,fontWeight:"300",textDecoration:c?"line-through":void 0,children:t}),P.jsx(Te,{gap:"4px",flex:1,children:e})]}):P.jsxs(Te,{children:[P.jsx(dt,{children:e}),P.jsx(ze,{children:":"})]})]}),r&&!d.isCollapsed&&P.jsx(ze,{ml:"7px",pl:"18px",borderLeftWidth:1,borderLeftStyle:"solid",borderLeftColor:"white",_hover:{borderLeftColor:"blackAlpha.200"},children:r})]})}),u6e=/^[\d.-]+$/,_M=mt(({store:t,readonly:e,dataTestId:r})=>{const n=A.useCallback(i=>{const o=parseFloat(i);isNaN(o)?t.setValue(t.default):t.setValue(o)},[t]);return P.jsx(ze,{ml:"2px",pl:"4px",pr:"4px",height:"24px",minWidth:"15px",cursor:e?"not-allowed":void 0,children:e?t.getPlainValue()??'""':P.jsx(sf,{dataTestId:r,initValue:t.getPlainValue().toString(),onChange:n,restrict:u6e})})});class fx{static create(e,r,n,i,o){let a=i+(i<<8)+e+(r<<4)|0;return new fx(e,r,n,a,o,[],[])}constructor(e,r,n,i,o,a,s){this.type=e,this.value=r,this.from=n,this.hash=i,this.end=o,this.children=a,this.positions=s,this.hashProp=[[_t.contextHash,i]]}addChild(e,r){e.prop(_t.contextHash)!=this.hash&&(e=new Tr(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(r)}toTree(e,r=this.end){let n=this.children.length-1;return n>=0&&(r=Math.max(r,this.positions[n]+this.children[n].length+this.from)),new Tr(e.types[this.type],this.children,this.positions,r-this.from).balance({makeTree:(i,o,a)=>new Tr(fi.none,i,o,a,this.hashProp)})}}var je;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(je||(je={}));class d6e{constructor(e,r){this.start=e,this.content=r,this.marks=[],this.parsers=[]}}class f6e{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return zv(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,r=0,n=0){for(let i=r;i<e;i++)n+=this.text.charCodeAt(i)==9?4-n%4:1;return n}findColumn(e){let r=0;for(let n=0;r<this.text.length&&n<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return r}scrub(){if(!this.baseIndent)return this.text;let e="";for(let r=0;r<this.basePos;r++)e+=" ";return e+this.text.slice(this.basePos)}}function h6(t,e,r){if(r.pos==r.text.length||t!=e.block&&r.indent>=e.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(t.type==je.OrderedList?$M:IM)(r,e,!1);return n>0&&(t.type!=je.BulletList||RM(r,e,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==t.value}const QJ={[je.Blockquote](t,e,r){return r.next!=62?!1:(r.markers.push(ar(je.QuoteMark,e.lineStart+r.pos,e.lineStart+r.pos+1)),r.moveBase(r.pos+(Ka(r.text.charCodeAt(r.pos+1))?2:1)),t.end=e.lineStart+r.text.length,!0)},[je.ListItem](t,e,r){return r.indent<r.baseIndent+t.value&&r.next>-1?!1:(r.moveBaseColumn(r.baseIndent+t.value),!0)},[je.OrderedList]:h6,[je.BulletList]:h6,[je.Document](){return!0}};function Ka(t){return t==32||t==9||t==10||t==13}function zv(t,e=0){for(;e<t.length&&Ka(t.charCodeAt(e));)e++;return e}function p6(t,e,r){for(;e>r&&Ka(t.charCodeAt(e-1));)e--;return e}function VJ(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let r=e;r<t.text.length;r++)if(t.text.charCodeAt(r)==96)return-1}return e}function FJ(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function RM(t,e,r){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let n=1;for(let i=t.pos+1;i<t.text.length;i++){let o=t.text.charCodeAt(i);if(o==t.next)n++;else if(!Ka(o))return-1}return r&&t.next==45&&qJ(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(XJ.SetextHeading)>-1||n<3?-1:1}function BJ(t,e){for(let r=t.stack.length-1;r>=0;r--)if(t.stack[r].type==e)return!0;return!1}function IM(t,e,r){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||Ka(t.text.charCodeAt(t.pos+1)))&&(!r||BJ(e,je.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function $M(t,e,r){let n=t.pos,i=t.next;for(;i>=48&&i<=57;){n++;if(n==t.text.length)return-1;i=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||i!=46&&i!=41||n<t.text.length-1&&!Ka(t.text.charCodeAt(n+1))||r&&!BJ(e,je.OrderedList)&&(t.skipSpace(n+1)==t.text.length||n>t.pos+1||t.next!=49)?-1:n+1-t.pos}function zJ(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let r=e-t.pos;return r>6?-1:r}function qJ(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let r=e;for(;e<t.text.length&&Ka(t.text.charCodeAt(e));)e++;return e==t.text.length?r:-1}const WI=/^[ \t]*$/,WJ=/-->/,UJ=/\?>/,UI=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,WJ],[/^\s*<\?/,UJ],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,WI],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,WI]];function HJ(t,e,r){if(t.next!=60)return-1;let n=t.text.slice(t.pos);for(let i=0,o=UI.length-(r?1:0);i<o;i++)if(UI[i][0].test(n))return i;return-1}function g6(t,e){let r=t.countIndent(e,t.pos,t.indent),n=t.countIndent(t.skipSpace(e),e,r);return n>=r+5?r+1:n}function Ld(t,e,r){let n=t.length-1;n>=0&&t[n].to==e&&t[n].type==je.CodeText?t[n].to=r:t.push(ar(je.CodeText,e,r))}const Yw={LinkReference:void 0,IndentedCode(t,e){let r=e.baseIndent+4;if(e.indent<r)return!1;let n=e.findColumn(r),i=t.lineStart+n,o=t.lineStart+e.text.length,a=[],s=[];for(Ld(a,i,o);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){Ld(s,t.lineStart-1,t.lineStart);for(let l of e.markers)s.push(l)}else{if(e.indent<r)break;{if(s.length){for(let c of s)c.type==je.CodeText?Ld(a,c.from,c.to):a.push(c);s=[]}Ld(a,t.lineStart-1,t.lineStart);for(let c of e.markers)a.push(c);o=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<o&&Ld(a,l,o)}}return s.length&&(s=s.filter(l=>l.type!=je.CodeText),s.length&&(e.markers=s.concat(e.markers))),t.addNode(t.buffer.writeElements(a,-i).finish(je.CodeBlock,o-i),i),!0},FencedCode(t,e){let r=VJ(e);if(r<0)return!1;let n=t.lineStart+e.pos,i=e.next,o=r-e.pos,a=e.skipSpace(r),s=p6(e.text,e.text.length,a),l=[ar(je.CodeMark,n,n+o)];a<s&&l.push(ar(je.CodeInfo,t.lineStart+a,t.lineStart+s));for(let c=!0;t.nextLine()&&e.depth>=t.stack.length;c=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==i;)d++;if(d-e.pos>=o&&e.skipSpace(d)==e.text.length){for(let p of e.markers)l.push(p);l.push(ar(je.CodeMark,t.lineStart+e.pos,t.lineStart+d)),t.nextLine();break}else{c||Ld(l,t.lineStart-1,t.lineStart);for(let m of e.markers)l.push(m);let p=t.lineStart+e.basePos,g=t.lineStart+e.text.length;p<g&&Ld(l,p,g)}}return t.addNode(t.buffer.writeElements(l,-n).finish(je.FencedCode,t.prevLineEnd()-n),n),!0},Blockquote(t,e){let r=FJ(e);return r<0?!1:(t.startContext(je.Blockquote,e.pos),t.addNode(je.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+r),null)},HorizontalRule(t,e){if(RM(e,t,!1)<0)return!1;let r=t.lineStart+e.pos;return t.nextLine(),t.addNode(je.HorizontalRule,r),!0},BulletList(t,e){let r=IM(e,t,!1);if(r<0)return!1;t.block.type!=je.BulletList&&t.startContext(je.BulletList,e.basePos,e.next);let n=g6(e,e.pos+1);return t.startContext(je.ListItem,e.basePos,n-e.baseIndent),t.addNode(je.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},OrderedList(t,e){let r=$M(e,t,!1);if(r<0)return!1;t.block.type!=je.OrderedList&&t.startContext(je.OrderedList,e.basePos,e.text.charCodeAt(e.pos+r-1));let n=g6(e,e.pos+r);return t.startContext(je.ListItem,e.basePos,n-e.baseIndent),t.addNode(je.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},ATXHeading(t,e){let r=zJ(e);if(r<0)return!1;let n=e.pos,i=t.lineStart+n,o=p6(e.text,e.text.length,n),a=o;for(;a>n&&e.text.charCodeAt(a-1)==e.next;)a--;(a==o||a==n||!Ka(e.text.charCodeAt(a-1)))&&(a=e.text.length);let s=t.buffer.write(je.HeaderMark,0,r).writeElements(t.parser.parseInline(e.text.slice(n+r+1,a),i+r+1),-i);a<e.text.length&&s.write(je.HeaderMark,a-n,o-n);let l=s.finish(je.ATXHeading1-1+r,e.text.length-n);return t.nextLine(),t.addNode(l,i),!0},HTMLBlock(t,e){let r=HJ(e,t,!1);if(r<0)return!1;let n=t.lineStart+e.pos,i=UI[r][1],o=[],a=i!=WI;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){a=!1;break}for(let c of e.markers)o.push(c)}a&&t.nextLine();let s=i==WJ?je.CommentBlock:i==UJ?je.ProcessingInstructionBlock:je.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(o,-n).finish(s,l-n),n),!0},SetextHeading:void 0};class h6e{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,r,n){if(this.stage==-1)return!1;let i=n.content+`
|
|
1194
1195
|
`+r.scrub(),o=this.advance(i);return o>-1&&o<i.length?this.complete(e,n,o):!1}finish(e,r){return(this.stage==2||this.stage==3)&&zv(r.content,this.pos)==r.content.length?this.complete(e,r,r.content.length):!1}complete(e,r,n){return e.addLeafElement(r,ar(je.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(nee(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(ar(je.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(tee(e,zv(e,this.pos),this.start)))return-1}else if(this.stage==2){let r=zv(e,this.pos),n=0;if(r>this.pos){let i=ree(e,r,this.start);if(i){let o=YE(e,i.to-this.start);o>0&&(this.nextStage(i),n=o)}}return n||(n=YE(e,this.pos)),n>0&&n<e.length?n:-1}else return YE(e,this.pos)}}}function YE(t,e){for(;e<t.length;e++){let r=t.charCodeAt(e);if(r==10)break;if(!Ka(r))return-1}return e}class p6e{nextLine(e,r,n){let i=r.depth<e.stack.length?-1:qJ(r),o=r.next;if(i<0)return!1;let a=ar(je.HeaderMark,e.lineStart+r.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(n,ar(o==61?je.SetextHeading1:je.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}}const XJ={LinkReference(t,e){return e.content.charCodeAt(0)==91?new h6e(e):null},SetextHeading(){return new p6e}},g6e=[(t,e)=>zJ(e)>=0,(t,e)=>VJ(e)>=0,(t,e)=>FJ(e)>=0,(t,e)=>IM(e,t,!0)>=0,(t,e)=>$M(e,t,!0)>=0,(t,e)=>RM(e,t,!0)>=0,(t,e)=>HJ(e,t,!0)>=0],m6e={text:"",end:0};class v6e{constructor(e,r,n,i){this.parser=e,this.input=r,this.ranges=i,this.line=new f6e,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=fx.create(je.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new w6e(n,r):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!i||e.markers[n].from<i.end);){let o=e.markers[n++];this.addNode(o.type,o.from,o.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let i=n(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let r=new d6e(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let i=n(this,r);i&&r.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,r))break e}for(let n of r.parsers)if(n.nextLine(this,e,r))return null;r.content+=`
|
|
1195
1196
|
`+e.scrub();for(let n of e.markers)r.marks.push(n)}return this.finishLeaf(r),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let r=this.fragments.takeNodes(this);return r?(this.absoluteLineStart+=r,this.lineStart=iee(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let r=m6e;if(r.end=e,e>=this.to)r.text="";else if(r.text=this.lineChunkAt(e),r.end+=r.text.length,this.ranges.length>1){let n=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<r.end;){i++;let o=this.ranges[i].from,a=this.lineChunkAt(o);r.end=o+a.length,r.text=r.text.slice(0,this.ranges[i-1].to-n)+a,n=r.end-r.text.length}}return r}readLine(){let{line:e}=this,{text:r,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(r);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],o=this.parser.skipContextMarkup[i.type];if(!o)throw new Error("Unhandled block context "+je[i.type]);if(!o(i,this,e))break;e.forward()}}lineChunkAt(e){let r=this.input.chunk(e),n;if(this.input.lineChunks)n=r==`
|
|
1196
1197
|
`?"":r;else{let i=r.indexOf(`
|
|
@@ -1221,4 +1222,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1221
1222
|
}
|
|
1222
1223
|
${_c}
|
|
1223
1224
|
${Pl}
|
|
1224
|
-
`,Eqe=async t=>{const e=await _r.mutate({mutation:Tqe,variables:t});if(!e.data)throw e.errors;return e.data};class _qe{constructor(e,r){this.rootStore=e,this.projectPageModel=r}get branch(){return this.projectPageModel.branchOrThrow}get table(){return this.projectPageModel.tableOrThrow}async execute(e){const{table:r,previousVersionTableId:n,isBranchTouched:i}=await this.updateRowRequest(e),o=r&&n&&r.versionId!==n,a=!r;return o&&this.updateTablesConnection(r),o?await this.refetchRowsConnectionInDraftTable():(this.updateRowsConnectionInDraftTable(e),a&&await this.refetchDraftTables()),this.branch.updateTouched(i),o&&this.projectPageModel.revalidateLoaders(),!0}async updateRowRequest(e){var n,i;const r=await Eqe({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:e}});return{table:this.addVersionedTableToCache((n=r.removeRow)==null?void 0:n.table),previousVersionTableId:(i=r.removeRow)==null?void 0:i.previousVersionTableId,isBranchTouched:r.removeRow.branch.touched}}addVersionedTableToCache(e){return e?this.addTableToCache(e):null}addTableToCache(e){const r=this.rootStore.cache.addOrTable(Og(e));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id},r.versionId),r}updateTablesConnection(e){const r=this.branch.draft,n=r.tablesConnection.edges.find(i=>i.node.id===e.id);n&&r.tablesConnection.replaceNode(n.cursor,e)}async refetchDraftTables(){return this.rootStore.queryTables({revisionId:this.branch.draft.id,first:50})}async refetchRowsConnectionInDraftTable(){return this.rootStore.queryRows({revisionId:this.branch.draft.id,tableId:this.table.id,first:50})}updateRowsConnectionInDraftTable(e){const r=this.rootStore.cache.getTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id}),n=r==null?void 0:r.rowsConnection.edges.find(i=>i.node.id===e);r==null||r.rowsConnection.removeEdge(n==null?void 0:n.cursor)}}const r$=t=>t.type===xe.Number||t.type===xe.Boolean?120:t.type===xe.String?200:t.$ref===Jt.File?80:120,Z6=t=>{if(t.$ref===Jt.File)return 1;if(!t.$ref){if(t.type===xe.String&&!t.foreignKey)return 2;if(t.type===xe.Number)return 3;if(t.type===xe.Boolean)return 4}return t.type===xe.String&&t.foreignKey?5:t.$ref?6:t.type===xe.Object||t.type===xe.Array?7:8},n$=(t,e)=>{if(t.type===xe.Object){const r=Object.entries(t.properties).map(([i,o])=>({key:i,schema:o}));r.sort((i,o)=>{const a=Z6(i.schema),s=Z6(o.schema);return a!==s?a-s:i.key.localeCompare(o.key)});const n=[];r.forEach(({schema:i})=>{e(i)||n.push(i)}),n.forEach(i=>{n$(i,e)})}else t.type===xe.Array&&n$(t.items,e)},Rqe=(t,e)=>{e(t)||n$(t,e)};class Iqe{constructor(e,r,n){this.rootStore=e,this.projectPageModel=r,this.table=n,lt(this,{},{autoBind:!0})}get totalCount(){return this.table.rowsConnection.edges.length}get hasNextPage(){return this.table.rowsConnection.availableNextPage}get isEdit(){return this.projectPageModel.isEditableRevision}get columns(){const e=_u(this.table.schema),r=[];Rqe(e,o=>{if(o.type===xe.String||o.type===xe.Number||o.type===xe.Boolean)r.push(o);else if(o.type===xe.Object){if(o.$ref)return r.push(o),!0}else return!0}),this.table.rowsConnection.edges.forEach(({node:o})=>{vx(e,o.id,o.data)});const n=this.table.rowsConnection.edges.map(({node:o})=>(vx(e,o.id,o.data),{id:o.id,versionId:o.versionId,readonly:o.readonly,title:o.id,data:JSON.stringify(o.data,null,2).replaceAll("\\n","").substring(0,10),link:"",cells:r.map(a=>a.getValue(o.id)).filter(a=>!!a)})),i=r.map(o=>({id:o.nodeId,title:o.name,width:r$(o)}));return{showHeader:i.some(o=>o.title),columns:i,data:n}}setTable(e){this.table=e}dispose(){}tryToFetchNextPage(){this.hasNextPage&&this.rootStore.queryRows({revisionId:this.revision.id,tableId:this.table.id,first:50,after:this.table.rowsConnection.endCursor||void 0})}async deleteRow(e){try{return await new _qe(this.rootStore,this.projectPageModel).execute(e)}catch(r){return console.error(r),!1}}init(){}get revision(){return this.projectPageModel.revisionOrThrow}}const $qe=t=>{const e=Ui(),[r]=A.useState(()=>new Iqe(gt,e,t));return A.useEffect(()=>(r.init(),r.setTable(t),()=>r.dispose()),[r,t]),r},G6=({width:t,isLastCell:e,children:r})=>P.jsx(ze,{minHeight:"40px",as:"td",...e?{}:{borderRightWidth:"1px",borderColor:"gray.100"},width:t,maxWidth:t,pl:"16px",pr:"16px",children:P.jsx(dt,{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:"black",_hover:{color:"black"},fontWeight:"300",children:r})}),Xee=({isLastCell:t,store:e})=>e instanceof Ky&&e.$ref===Jt.File?P.jsx(G6,{isLastCell:t,width:`${r$(e.schema)}px`,children:P.jsx(GP,{hoverClassName:t$.Action,readonly:!0,hideInfo:!0,store:e})}):P.jsxs(G6,{isLastCell:t,width:`${r$(e.schema)}px`,children:[e instanceof ZP&&e.value,e instanceof TM&&e.value,e instanceof CM&&String(e.getPlainValue()),e instanceof Ky&&"{...}",e instanceof XP&&"[...]"]}),Aqe="_Row_5zyqz_1",Mqe="_Actions_5zyqz_1",i$={Row:Aqe,Actions:Mqe},Nqe=({row:t,store:e,onCopy:r})=>{const{open:n,setOpen:i}=cb(),o=A.useCallback(()=>{r==null||r(t.versionId)},[r,t.versionId]),a=A.useCallback(async()=>{await e.deleteRow(t.id)},[t.id,e]),s=t.cells.length-1;return P.jsxs(ze,{height:"40px",as:"tr",_hover:{"& td":{bg:"gray.50"}},className:i$.Row,"data-testid":`row-${t.id}`,children:[P.jsx(ze,{as:"td",position:"sticky",left:0,zIndex:1,backgroundColor:"white",width:"200px",maxWidth:"200px",pl:"8px",pr:"24px",children:P.jsxs(Te,{alignItems:"center",children:[P.jsx(dt,{color:"gray.400",textDecoration:"underline",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:P.jsx(Ua,{to:`${t.id}`,"data-testid":`row-${t.id}-link`,children:t.id})}),!t.readonly&&e.isEdit&&P.jsx(dt,{color:"gray.400",children:"*"})]})}),t.cells.map((l,c)=>P.jsx(Xee,{store:l,isLastCell:s===c},l.nodeId)),P.jsx(ze,{as:"td",width:"100%"}),e.isEdit&&P.jsx(ze,{className:n?void 0:i$.Actions,as:"td",position:"sticky",right:0,zIndex:1,backgroundColor:"white",width:"40px",children:P.jsx(Te,{justifyContent:"flex-end",children:P.jsxs(mb,{positioning:{placement:"bottom-start"},open:n,onOpenChange:l=>{i(l.open)},children:[P.jsx(zx,{children:P.jsx(ze,{paddingRight:"2px",children:P.jsx(mX,{dataTestId:`row-list-menu-${t.id}`})})}),P.jsx(Ku,{children:P.jsx(vb,{children:P.jsxs(yb,{children:[P.jsxs(Jl,{color:"gray.600",value:"copy","data-testid":`copy-row-${t.id}`,onClick:o,children:[P.jsx(Z2,{}),P.jsx(ze,{flex:"1",children:"Duplicate"})]}),P.jsxs(Jl,{color:"gray.600",value:"delete","data-restid":`remove-row-${t.id}`,onClick:a,children:[P.jsx(Ab,{}),P.jsx(ze,{flex:1,children:"Delete"})]})]})})})]})})})]})},jqe=({row:t,store:e,onSelect:r})=>{const n=A.useCallback(()=>{r==null||r(t.id)},[r,t.id]),i=t.cells.length-1;return P.jsxs(ze,{height:"40px",as:"tr",_hover:{"& td":{bg:"gray.50"}},className:i$.Row,"data-testid":`row-${t.id}`,children:[P.jsx(ze,{as:"td",position:"sticky",left:0,backgroundColor:"white",width:"200px",maxWidth:"200px",children:P.jsxs(Te,{alignItems:"center",children:[P.jsx(dt,{textDecoration:"underline",cursor:"pointer",onClick:n,"data-testid":`row-${t.id}-select`,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:t.id}),!t.readonly&&e.isEdit&&P.jsx(dt,{color:"gray.400",children:"*"})]})}),t.cells.map((o,a)=>P.jsx(Xee,{store:o,isLastCell:i===a},o.nodeId)),P.jsx(ze,{as:"td",width:"100%"}),P.jsx(ze,{as:"td"})]})},Dqe=mt(({table:t,onSelect:e,onCopy:r})=>{const n=$qe(t),i=!!e,{columns:o,data:a,showHeader:s}=n.columns;return a.length?P.jsx(EIe,{style:{height:"100%"},totalCount:n.totalCount,defaultItemHeight:40,increaseViewportBy:40*100,endReached:n.hasNextPage?n.tryToFetchNextPage:void 0,data:a,components:{Table:({style:l,...c})=>P.jsx("table",{...c,style:{...l,width:"max-content",minWidth:"100%"}}),TableRow:l=>{const c=l["data-index"],d=a[c];return i?P.jsx(jqe,{row:d,store:n,onSelect:e}):P.jsx(Nqe,{row:d,store:n,onCopy:r})}},fixedHeaderContent:s?()=>P.jsxs(ze,{as:"tr",height:"40px",children:[P.jsx(ze,{as:"th",backgroundColor:"white",position:"sticky",left:0,zIndex:1,width:"140px",maxWidth:"140px",minWidth:"140px",children:P.jsx(ze,{height:"30px",borderBottomWidth:"1px",borderColor:"gray.100"})}),o.map(l=>P.jsx(ze,{as:"th",textAlign:"start",width:`${l.width}px`,maxWidth:`${l.width}px`,minWidth:`${l.width}px`,backgroundColor:"white",children:P.jsx(dt,{pl:"16px",pr:"16px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",height:"30px",borderBottomWidth:"1px",borderColor:"gray.100",color:"gray.400",children:l.title})},l.id)),P.jsx(ze,{as:"th",backgroundColor:"white",width:"100%",children:P.jsx(ze,{height:"30px",borderBottomWidth:"1px",borderColor:"gray.100"})}),P.jsx(ze,{as:"th",backgroundColor:"white",position:"sticky",right:0,zIndex:1,width:"40px",children:P.jsx(ze,{height:"30px",borderBottomWidth:"1px",borderColor:"gray.100"})})]}):void 0}):null}),f_=({tableId:t})=>P.jsx(Te,{width:"100%",borderStyle:"solid",borderTopWidth:1,borderColor:"gray.100",justifyContent:"center",color:"gray.400",fontWeight:"300",pt:"0.5rem",pb:"0.5rem",children:P.jsxs(ze,{backgroundColor:"gray.50",pl:"5px",pr:"5px",borderRadius:"5px",children:['Select or create a row in "',t,'" to be referenced by the above row']})}),Lqe=({previousType:t,tableId:e,rowId:r,foreignKeyPath:n,onCancel:i})=>{const o=A.useMemo(()=>t===ai.UpdatingRow?"updating":t===ai.CreatingRow?"creating":"",[t]);return P.jsx(P.Fragment,{children:P.jsx(ze,{width:"100%",borderStyle:"solid",borderLeftWidth:2,borderColor:"gray.200",pl:"1rem",mb:"1rem",children:P.jsxs(Te,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",color:"gray.400",fontWeight:"300",children:[P.jsx(dt,{textDecoration:"underline",cursor:"pointer",onClick:i,children:"Back"}),P.jsxs(dt,{children:["- ",o,' "',e," - ",r,'":']}),P.jsx(dt,{children:n})]})})})},Qqe=mt(()=>{const t=rd(),e=Vf(),{root:r,item:n}=n6e(),i=A.useCallback(async d=>{await r.selectForeignKey(n,d)},[n,r]),o=A.useCallback(()=>{r.cancelSelectingForeignKey(n)},[n,r]),a=A.useCallback(d=>{r.onSelectedForeignKey(n,d)},[n,r]),s=A.useCallback(async()=>{if(n.state.type===ai.CreatingRow){const d=n.state.store,p=await n.createRow(d.name.getPlainValue(),d.root.getPlainValue());p&&(n.state.isSelectingForeignKey?r.onSelectedForeignKey(n,d.name.getPlainValue()):t(e.make({isDraft:!0,rowId:p.id})))}},[n,e,t,r]),l=A.useCallback(async()=>{if(n.state.type===ai.UpdatingRow){const d=n.state.store;await n.updateRow(d)&&(d.save(),d.syncReadOnlyStores(),t(e.make({isDraft:!0,rowId:d.name.getPlainValue()})))}},[n,e,t]),c=A.useCallback(async(d,p)=>{if(n.state.type===ai.UpdatingRow){const g=n.state.store,m=vn();ef.loading({id:m,title:"Uploading..."}),await n.uploadFile(g,d,p)?(ef.update(m,{type:"info",title:"Successfully uploaded!",duration:1500}),g.syncReadOnlyStores(),t(e.make({isDraft:!0,rowId:g.name.getPlainValue()}))):ef.update(m,{type:"info",title:"Something wrong with the upload"})}},[n,e,t]);if(n.state.type===ai.ConnectingForeignKeyRow){const d=n.state.store;return P.jsx(Lqe,{previousType:n.state.previousType,foreignKeyPath:n.currentForeignKeyPath,onCancel:o,tableId:n.table.id,rowId:d.name.getPlainValue()})}return n.state.type===ai.List?P.jsxs(P.Fragment,{children:[n.state.isSelectingForeignKey&&P.jsx(f_,{tableId:n.table.id}),P.jsx(i6e,{onClick:n.toCreatingRow}),P.jsx(ze,{paddingTop:"0.5rem",paddingBottom:"1rem",height:"100%",children:P.jsx(Dqe,{table:n.table,onSelect:n.state.isSelectingForeignKey?a:void 0,onCopy:n.toCloneRow})})]}):n.state.type===ai.CreatingRow?P.jsxs(P.Fragment,{children:[n.state.isSelectingForeignKey&&P.jsx(f_,{tableId:n.table.id}),P.jsx(Oqe,{store:n.state.store,onAdd:s,onCancel:n.toList,onSelectForeignKey:i})]}):n.state.type===ai.UpdatingRow?P.jsxs(P.Fragment,{children:[n.state.isSelectingForeignKey&&P.jsx(f_,{tableId:n.table.id}),P.jsx(wqe,{isEdit:n.isEditableRevision,store:n.state.store,onUpdate:l,onSelectForeignKey:i,onUploadFile:c})]}):null}),Zee=mt(({startWithUpdating:t})=>{const e=r6e(t);return P.jsx(P.Fragment,{children:e.stack.map(r=>P.jsx(LJ.Provider,{value:{root:e,item:r},children:P.jsx(Qqe,{})},r.id))})}),Vqe=mt(()=>{const t=VBe();return t.isValidSchema?P.jsx(Zee,{startWithUpdating:!0}):P.jsx(LBe,{data:t.row.data})}),Fqe=()=>P.jsx(gg,{hideSidebar:!0,children:P.jsxs(Te,{alignItems:"center",flexDirection:"column",justifyContent:"center",flex:1,gap:"8px",children:[P.jsx(dt,{color:"gray.400",children:"Check your email to confirm your account"}),P.jsx(Ua,{to:`/${Nf}`,children:P.jsx(gb,{color:"gray.400",alignSelf:"center",children:"Log in"})})]})}),Bqe=()=>null;class o${constructor(e,r,n){de(this,"isLoading",!1);this.routerService=e,this.apiService=r,this.authService=n,lt(this)}async login(e){e?(await this.loginRequest(e),await this.routerService.navigate("/")):console.error("Invalid code")}dispose(){}init(){}async loginRequest(e){this.setIsLoading(!0);try{const r=await this.apiService.client.loginGoogle({data:{code:e,redirectUrl:RZ()}});return await this.authService.setToken(r.loginGoogle.accessToken),!0}catch(r){console.error(r)}finally{this.setIsLoading(!1)}}setIsLoading(e){this.isLoading=e}}ft.register(o$,()=>{const t=ft.get(Sc),e=ft.get(hl),r=ft.get(ho);return new o$(t,e,r)},{scope:"request"});const zqe=async({request:t})=>{const n=new URL(t.url).searchParams.get("code");if(!n)throw new Error("Invalid code");return await ft.get(o$).login(n),Tp("/")};class a${constructor(e,r,n){de(this,"isLoading",!1);de(this,"form",new Y2({email:"",username:"",password:""}));this.routerService=e,this.apiService=r,this.configurationService=n,lt(this)}get disableSubmitButton(){return!this.form.isValid}get availableEmailSignUp(){return this.configurationService.availableEmailSignUp}get availableOauth(){return this.configurationService.availableGoogleOauth}get availableGoogleOauth(){return this.configurationService.availableGoogleOauth}get availableGithubOauth(){return this.configurationService.availableGithubOauth}toGoogleOauth(){IZ(this.configurationService.googleOauthClientId)}toGithubOauth(){_Z(this.configurationService.githubOauthClientId)}async submit(){await this.signUp()&&await this.routerService.navigate(`/${hP}/${aX}`)}dispose(){}init(){}async signUp(){this.setIsLoading(!0);try{return await this.apiService.client.signUp({data:this.form.values}),!0}finally{this.setIsLoading(!1)}}setIsLoading(e){this.isLoading=e}}ft.register(a$,()=>{const t=ft.get(Sc),e=ft.get(hl),r=ft.get(yf);return new a$(t,e,r)},{scope:"request"});const qqe=mt(()=>{const t=jf(a$),e=A.useCallback(s=>{t.form.setValue("username",s.currentTarget.value)},[t.form]),r=A.useCallback(s=>{t.form.setValue("email",s.currentTarget.value)},[t.form]),n=A.useCallback(s=>{t.form.setValue("password",s.currentTarget.value)},[t.form]),i=A.useCallback(async()=>{await t.submit()},[t]),o=A.useCallback(()=>{t.toGithubOauth()},[t]),a=A.useCallback(()=>{t.toGoogleOauth()},[t]);return P.jsxs(gg,{hideSidebar:!0,children:[P.jsxs(Te,{width:"100%",gap:"8px",justifyContent:"flex-end",children:[P.jsx(dt,{color:"gray.300",children:"Already have an account?"}),P.jsx(Ua,{to:`/${Nf}`,children:P.jsx(gb,{color:"gray.300",alignSelf:"center",children:"Log in"})})]}),P.jsx(Te,{alignItems:"center",justifyContent:"center",flex:1,children:P.jsxs(Te,{flexDirection:"column",width:"16rem",gap:"1rem",alignItems:"center",children:[t.availableOauth&&P.jsxs(P.Fragment,{children:[P.jsxs(Te,{flexDirection:"column",gap:"2px",children:[t.availableGithubOauth&&P.jsx(sl,{icon:P.jsx(hX,{}),onClick:o,title:"Continue with Github"}),t.availableGoogleOauth&&P.jsx(sl,{icon:P.jsx(pX,{}),onClick:a,title:"Continue with Google"})]}),t.availableEmailSignUp&&P.jsxs(Te,{width:"100%",alignItems:"center",gap:"16px",children:[P.jsx(ze,{backgroundColor:"gray.100",flex:1,height:"1px"}),P.jsx(dt,{color:"gray.300",fontSize:"12px",children:"OR"}),P.jsx(ze,{backgroundColor:"gray.100",flex:1,height:"1px"})]})]}),t.availableEmailSignUp&&P.jsxs(P.Fragment,{children:[P.jsx(nc,{dataTestId:"signup-username-input",autoFocus:!0,height:"40px",placeholder:"enter your username",autoComplete:"new-password",value:t.form.values.username,onChange:e}),P.jsx(nc,{dataTestId:"signup-email-input",height:"40px",placeholder:"enter your email",type:"email",autoComplete:"new-password",value:t.form.values.email,onChange:r}),P.jsx(nc,{dataTestId:"signup-password-input",height:"40px",placeholder:"create a password",type:"password",autoComplete:"new-password",value:t.form.values.password,onChange:n,onEnter:i}),P.jsx(ze,{visibility:t.disableSubmitButton?"hidden":"visible",children:P.jsx(sl,{onClick:i,disabled:t.disableSubmitButton,isLoading:t.isLoading,title:"Sign up"})})]})]})})]})}),Wqe=()=>P.jsx(Zee,{});class s${constructor(e,r,n){de(this,"isLoading",!1);de(this,"form",new Y2({username:""}));this.authService=e,this.apiService=r,this.routerService=n,lt(this)}get disableSubmitButton(){return!this.form.isValid}async submit(){await this.request()&&(await this.authService.fetchMe(),await this.routerService.navigate(H2))}dispose(){}init(){}async request(){this.setIsLoading(!0);try{return await this.apiService.client.setUsername({data:{username:this.form.values.username}}),!0}catch(e){console.error(e)}finally{this.setIsLoading(!1)}}setIsLoading(e){this.isLoading=e}}ft.register(s$,()=>{const t=ft.get(ho),e=ft.get(hl),r=ft.get(Sc);return new s$(t,e,r)},{scope:"request"});const Uqe=mt(()=>{const t=jf(s$),e=A.useCallback(n=>{t.form.setValue("username",n.currentTarget.value)},[t.form]),r=A.useCallback(async()=>{await t.submit()},[t]);return P.jsx(gg,{hideSidebar:!0,children:P.jsx(Te,{alignItems:"center",justifyContent:"center",flex:1,children:P.jsxs(Te,{flexDirection:"column",width:"16rem",gap:"1rem",alignItems:"center",children:[P.jsx(nc,{dataTestId:"login-emailOrUsername-input",autoFocus:!0,height:"40px",placeholder:"set username",value:t.form.values.username,onChange:e,onEnter:r}),P.jsx(ze,{visibility:t.disableSubmitButton?"hidden":"visible",children:P.jsx(sl,{onClick:r,isLoading:t.isLoading,title:"Set username"})})]})})})}),Hqe=()=>{const t=S2(),e=A.useMemo(()=>(console.error(t),"Unexpected error"),[t]);return P.jsxs(Te,{alignItems:"center",flex:1,gap:"1rem",justifyContent:"center",width:"100%",height:"100%",children:[P.jsx(G2,{color:"gray"}),P.jsx(dt,{color:"gray.400",children:e})]})},h_=()=>{const t=S2(),e=A.useMemo(()=>t instanceof fZ?`Not found table "${t.message}" in this revision`:t instanceof xP?`Not found row "${t.message}" in this revision`:(console.error(t),"Unexpected error"),[t]);return P.jsxs(Te,{alignItems:"center",flex:1,gap:"1rem",justifyContent:"center",width:"100%",children:[P.jsx(G2,{color:"gray"}),P.jsx(dt,{color:"gray.400",children:e})]})};function ia(){return(ia=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var Xqe=function(){};function Gee(t,e){return Math.random()*(e-t+1)+t}function Y6(t,e){return Math.floor(Gee(t,e))}var Zqe=A.forwardRef(function(t,e){var r=t.progress,n=t.height,i=n===void 0?2:n,o=t.className,a=o===void 0?"":o,s=t.color,l=s===void 0?"red":s,c=t.background,d=c===void 0?"transparent":c,p=t.onLoaderFinished,g=t.transitionTime,m=g===void 0?300:g,y=t.loaderSpeed,b=y===void 0?500:y,O=t.waitingTime,S=O===void 0?1e3:O,w=t.shadow,k=w===void 0||w,T=t.containerStyle,C=T===void 0?{}:T,E=t.style,_=E===void 0?{}:E,$=t.shadowStyle,M=$===void 0?{}:$,j=t.containerClassName,B=j===void 0?"":j,V=A.useRef(!1),X=A.useState(0),D=X[0],F=X[1],Y=A.useRef({active:!1,refreshRate:1e3}),ie=A.useState(!1),H=ie[0],ne=ie[1],z=A.useState({active:!1,value:20}),N=z[0],U=z[1],J={position:"fixed",top:0,left:0,height:i,background:d,zIndex:99999999999,width:"100%"},Q={boxShadow:"0 0 10px "+l+", 0 0 10px "+l,width:"5%",opacity:1,position:"absolute",height:"100%",transition:"all "+b+"ms ease",transform:"rotate(3deg) translate(0px, -4px)",left:"-10rem"},q=A.useState({height:"100%",background:l,transition:"all "+b+"ms ease",width:"0%"}),oe=q[0],Oe=q[1],Z=A.useState(Q),le=Z[0],Pe=Z[1];A.useEffect(function(){return V.current=!0,function(){V.current=!1}},[]),A.useImperativeHandle(e,function(){return{continuousStart:function(Me,De){if(De===void 0&&(De=1e3),!N.active)if(H)console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");else{var Vt=Me||Y6(10,20);Y.current={active:!0,refreshRate:De},F(Vt),ke(Vt)}},staticStart:function(Me){if(!Y.current.active)if(H)console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");else{var De=Me||Y6(30,50);U({active:!0,value:De}),F(De),ke(De)}},complete:function(){H?console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!"):(F(100),ke(100))}}}),A.useEffect(function(){Oe(ia({},oe,{background:l})),Pe(ia({},le,{boxShadow:"0 0 10px "+l+", 0 0 5px "+l}))},[l]),A.useEffect(function(){if(e){if(e&&r!==void 0)return void console.warn(`react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar! Please use only props or only ref methods! Ref methods will override props if "ref" property is available.`);ke(D),ne(!1)}else r&&ke(r),ne(!0)},[r]);var ee,re,ye,ke=function Me(De){De>=100?(Oe(ia({},oe,{width:"100%"})),k&&Pe(ia({},le,{left:De-10+"%"})),setTimeout(function(){V.current&&(Oe(ia({},oe,{opacity:0,width:"100%",transition:"all "+m+"ms ease-out",color:l})),setTimeout(function(){V.current&&(Y.current.active&&(Y.current=ia({},Y.current,{active:!1}),F(0),Me(0)),N.active&&(U(ia({},N,{active:!1})),F(0),Me(0)),p&&p(),F(0),Me(0))},m))},S)):(Oe(function(Vt){return ia({},Vt,{width:De+"%",opacity:1,transition:De>0?"all "+b+"ms ease":""})}),k&&Pe(ia({},le,{left:De-5.5+"%",transition:De>0?"all "+b+"ms ease":""})))};return ee=function(){var Me=Gee(Math.min(10,(100-D)/5),Math.min(20,(100-D)/3));D+Me<95&&(F(D+Me),ke(D+Me))},re=Y.current.active?Y.current.refreshRate:null,ye=A.useRef(Xqe),A.useEffect(function(){ye.current=ee}),A.useEffect(function(){},[void 0]),A.useEffect(function(){if(re!==null&&re!==!1){var Me=setInterval(function(){return ye.current()},re);return function(){return clearInterval(Me)}}},[re]),A.createElement("div",{className:B,style:ia({},J,C)},A.createElement("div",{className:a,style:ia({},oe,_)},k?A.createElement("div",{style:ia({},le,M)}):null))});const Gqe=(t=300)=>{const e=A.useRef(null),r=Tbe();return A.useEffect(()=>{const n=e.current;let i=NaN,o=!1;return r.state==="loading"&&(i=setTimeout(()=>{o=!0,n==null||n.continuousStart()},t)),()=>{o&&(n==null||n.complete()),clearTimeout(i)}},[t,r.state]),e},Yqe=()=>{const t=Gqe(150);return P.jsxs(P.Fragment,{children:[P.jsx(Zqe,{ref:t,color:"#1fa3ff",height:1,waitingTime:500}),P.jsx(dS,{})]})},p_=({tableLoader:t,tableId:e,rowLoader:r,rowId:n})=>({path:_v,loader:t,id:e,children:[{index:!0,element:P.jsx(Wqe,{})},{path:lX,loader:r,id:n,element:P.jsx(Vqe,{})}]}),Kqe={path:ku,element:P.jsx(dS,{}),loader:AR(xS,Wke),id:dn.Organization,children:[{path:Cu,element:P.jsx(dS,{}),loader:AR(xS,Uke),id:dn.Project,children:[{path:Tu,element:P.jsx(W_e,{}),loader:Fke,id:dn.Branch,children:[{loader:Xke,id:dn.HeadRevision,errorElement:P.jsx(h_,{}),children:[{index:!0,element:P.jsx(ZE,{})},p_({tableLoader:eCe,tableId:dn.HeadTable,rowLoader:Yke,rowId:dn.HeadRow})]},{path:pP,loader:Hke,id:dn.DraftRevision,errorElement:P.jsx(h_,{}),children:[{index:!0,element:P.jsx(ZE,{})},p_({tableLoader:Jke,tableId:dn.DraftTable,rowLoader:Gke,rowId:dn.DraftRow})]},{path:sX,loader:Zke,id:dn.SpecificRevision,errorElement:P.jsx(h_,{}),children:[{index:!0,element:P.jsx(ZE,{})},p_({tableLoader:tCe,tableId:dn.SpecificTable,rowLoader:Kke,rowId:dn.SpecificRow})]}]}]}]},Jqe=[{path:`${tX}/*`,element:P.jsx(sTe,{})},{path:"/",element:P.jsx(Yqe,{}),errorElement:P.jsx(Hqe,{}),children:[{index:!0,element:P.jsx(t$e,{}),loader:AR(xS,qke)},{path:nX,element:P.jsx(Uqe,{})},{path:Nf,loader:Bke,children:[{index:!0,element:P.jsx(K_e,{})},{path:oX,loader:zqe,element:P.jsx(Bqe,{})},{path:iX,loader:X_e,element:P.jsx(H_e,{})}]},{path:rX,element:P.jsx(J_e,{}),loader:xS},{path:hP,loader:zke,children:[{index:!0,element:P.jsx(qqe,{})},{path:aX,element:P.jsx(Fqe,{})},{path:_1e,element:P.jsx(U_e,{})}]},{path:Pu,children:[Kqe]}]}];class Sc{constructor(e){de(this,"_router",null);this.bootstrapService=e,this.init()}get router(){if(!this._router)throw new Error("Router not found");return this._router}navigate(...e){return this.router.navigate(...e)}init(){ol(()=>this.bootstrapService.isLoaded,e=>{e&&(this._router=Qbe(Jqe))})}}ft.register(Sc,()=>{const t=ft.get(OS);return new Sc(t)},{scope:"singleton"});class l${constructor(e,r){this.bootstrapService=e,this.routerService=r,lt(this)}get isLoaded(){return this.bootstrapService.isLoaded}get router(){return this.routerService.router}async init(){}dispose(){}}ft.register(l$,()=>{const t=ft.get(OS),e=ft.get(Sc);return new l$(t,e)},{scope:"request"});const e7e=({children:t})=>P.jsx(k1e,{client:_r,children:t}),K6=U9(G9,{theme:{tokens:{colors:{gray:{50:{value:"#F7FAFC"},100:{value:"#EDF2F7"},200:{value:"#E2E8F0"},300:{value:"#CBD5E0"},400:{value:"#A0AEC0"},500:{value:"#718096"},600:{value:"#4A5568"},700:{value:"#2D3748"},800:{value:"#1A202C"},900:{value:"#171923"}}}}}}),t7e=mt(()=>{const t=jf(l$);return!t.isLoaded||!t.router?P.jsxs($D,{value:K6,children:[P.jsx(Y$,{w:"100%",h:"100%",children:P.jsx(Bx,{})}),P.jsx(s4,{})]}):P.jsx(e7e,{children:P.jsxs($D,{value:K6,children:[P.jsx(Xbe,{router:t.router}),P.jsx(s4,{})]})})}),J6=document.getElementById("root");J6&&Bre.createRoot(J6).render(P.jsx(A.StrictMode,{children:P.jsx(t7e,{})}));const r7e=`ver: ${gv("PACKAGE_VERSION")} - ${gv("GIT_BRANCH_NAME")}:${gv("GIT_COMMIT_HASH")}`;console.info(r7e)});export default n7e();
|
|
1225
|
+
`,Eqe=async t=>{const e=await _r.mutate({mutation:Tqe,variables:t});if(!e.data)throw e.errors;return e.data};class _qe{constructor(e,r){this.rootStore=e,this.projectPageModel=r}get branch(){return this.projectPageModel.branchOrThrow}get table(){return this.projectPageModel.tableOrThrow}async execute(e){const{table:r,previousVersionTableId:n,isBranchTouched:i}=await this.updateRowRequest(e),o=r&&n&&r.versionId!==n,a=!r;return o&&this.updateTablesConnection(r),o?await this.refetchRowsConnectionInDraftTable():(this.updateRowsConnectionInDraftTable(e),a&&await this.refetchDraftTables()),this.branch.updateTouched(i),o&&this.projectPageModel.revalidateLoaders(),!0}async updateRowRequest(e){var n,i;const r=await Eqe({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:e}});return{table:this.addVersionedTableToCache((n=r.removeRow)==null?void 0:n.table),previousVersionTableId:(i=r.removeRow)==null?void 0:i.previousVersionTableId,isBranchTouched:r.removeRow.branch.touched}}addVersionedTableToCache(e){return e?this.addTableToCache(e):null}addTableToCache(e){const r=this.rootStore.cache.addOrTable(Og(e));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id},r.versionId),r}updateTablesConnection(e){const r=this.branch.draft,n=r.tablesConnection.edges.find(i=>i.node.id===e.id);n&&r.tablesConnection.replaceNode(n.cursor,e)}async refetchDraftTables(){return this.rootStore.queryTables({revisionId:this.branch.draft.id,first:50})}async refetchRowsConnectionInDraftTable(){return this.rootStore.queryRows({revisionId:this.branch.draft.id,tableId:this.table.id,first:50})}updateRowsConnectionInDraftTable(e){const r=this.rootStore.cache.getTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id}),n=r==null?void 0:r.rowsConnection.edges.find(i=>i.node.id===e);r==null||r.rowsConnection.removeEdge(n==null?void 0:n.cursor)}}const r$=t=>t.type===xe.Number||t.type===xe.Boolean?120:t.type===xe.String?200:t.$ref===Jt.File?80:120,Z6=t=>{if(t.$ref===Jt.File)return 1;if(!t.$ref){if(t.type===xe.String&&!t.foreignKey)return 2;if(t.type===xe.Number)return 3;if(t.type===xe.Boolean)return 4}return t.type===xe.String&&t.foreignKey?5:t.$ref?6:t.type===xe.Object||t.type===xe.Array?7:8},n$=(t,e)=>{if(t.type===xe.Object){const r=Object.entries(t.properties).map(([i,o])=>({key:i,schema:o}));r.sort((i,o)=>{const a=Z6(i.schema),s=Z6(o.schema);return a!==s?a-s:i.key.localeCompare(o.key)});const n=[];r.forEach(({schema:i})=>{e(i)||n.push(i)}),n.forEach(i=>{n$(i,e)})}else t.type===xe.Array&&n$(t.items,e)},Rqe=(t,e)=>{e(t)||n$(t,e)};class Iqe{constructor(e,r,n){this.rootStore=e,this.projectPageModel=r,this.table=n,lt(this,{},{autoBind:!0})}get totalCount(){return this.table.rowsConnection.edges.length}get hasNextPage(){return this.table.rowsConnection.availableNextPage}get isEdit(){return this.projectPageModel.isEditableRevision}get columns(){const e=_u(this.table.schema),r=[];Rqe(e,o=>{if(o.type===xe.String||o.type===xe.Number||o.type===xe.Boolean)r.push(o);else if(o.type===xe.Object){if(o.$ref)return r.push(o),!0}else return!0}),this.table.rowsConnection.edges.forEach(({node:o})=>{vx(e,o.id,o.data)});const n=this.table.rowsConnection.edges.map(({node:o})=>(vx(e,o.id,o.data),{id:o.id,versionId:o.versionId,readonly:o.readonly,title:o.id,data:JSON.stringify(o.data,null,2).replaceAll("\\n","").substring(0,10),link:"",cells:r.map(a=>a.getValue(o.id)).filter(a=>!!a)})),i=r.map(o=>({id:o.nodeId,title:o.name,width:r$(o)}));return{showHeader:i.some(o=>o.title),columns:i,data:n}}setTable(e){this.table=e}dispose(){}tryToFetchNextPage(){this.hasNextPage&&this.rootStore.queryRows({revisionId:this.revision.id,tableId:this.table.id,first:50,after:this.table.rowsConnection.endCursor||void 0})}async deleteRow(e){try{return await new _qe(this.rootStore,this.projectPageModel).execute(e)}catch(r){return console.error(r),!1}}init(){}get revision(){return this.projectPageModel.revisionOrThrow}}const $qe=t=>{const e=Ui(),[r]=A.useState(()=>new Iqe(gt,e,t));return A.useEffect(()=>(r.init(),r.setTable(t),()=>r.dispose()),[r,t]),r},G6=({width:t,isLastCell:e,children:r})=>P.jsx(ze,{minHeight:"40px",as:"td",...e?{}:{borderRightWidth:"1px",borderColor:"gray.100"},width:t,maxWidth:t,pl:"16px",pr:"16px",children:P.jsx(dt,{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:"black",_hover:{color:"black"},fontWeight:"300",children:r})}),Xee=({isLastCell:t,store:e})=>e instanceof Ky&&e.$ref===Jt.File?P.jsx(G6,{isLastCell:t,width:`${r$(e.schema)}px`,children:P.jsx(GP,{hoverClassName:t$.Action,readonly:!0,hideInfo:!0,store:e})}):P.jsxs(G6,{isLastCell:t,width:`${r$(e.schema)}px`,children:[e instanceof ZP&&e.value,e instanceof TM&&e.value,e instanceof CM&&String(e.getPlainValue()),e instanceof Ky&&"{...}",e instanceof XP&&"[...]"]}),Aqe="_Row_5zyqz_1",Mqe="_Actions_5zyqz_1",i$={Row:Aqe,Actions:Mqe},Nqe=({row:t,store:e,onCopy:r})=>{const{open:n,setOpen:i}=cb(),o=A.useCallback(()=>{r==null||r(t.versionId)},[r,t.versionId]),a=A.useCallback(async()=>{await e.deleteRow(t.id)},[t.id,e]),s=t.cells.length-1;return P.jsxs(ze,{height:"40px",as:"tr",_hover:{"& td":{bg:"gray.50"}},className:i$.Row,"data-testid":`row-${t.id}`,children:[P.jsx(ze,{as:"td",position:"sticky",left:0,zIndex:1,backgroundColor:"white",width:"200px",maxWidth:"200px",pl:"8px",pr:"24px",children:P.jsxs(Te,{alignItems:"center",children:[P.jsx(dt,{color:"gray.400",textDecoration:"underline",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:P.jsx(Ua,{to:`${t.id}`,"data-testid":`row-${t.id}-link`,children:t.id})}),!t.readonly&&e.isEdit&&P.jsx(dt,{color:"gray.400",children:"*"})]})}),t.cells.map((l,c)=>P.jsx(Xee,{store:l,isLastCell:s===c},l.nodeId)),P.jsx(ze,{as:"td",width:"100%"}),e.isEdit&&P.jsx(ze,{className:n?void 0:i$.Actions,as:"td",position:"sticky",right:0,zIndex:1,backgroundColor:"white",width:"40px",children:P.jsx(Te,{justifyContent:"flex-end",children:P.jsxs(mb,{positioning:{placement:"bottom-start"},open:n,onOpenChange:l=>{i(l.open)},children:[P.jsx(zx,{children:P.jsx(ze,{paddingRight:"2px",children:P.jsx(mX,{dataTestId:`row-list-menu-${t.id}`})})}),P.jsx(Ku,{children:P.jsx(vb,{children:P.jsxs(yb,{children:[P.jsxs(Jl,{color:"gray.600",value:"copy","data-testid":`copy-row-${t.id}`,onClick:o,children:[P.jsx(Z2,{}),P.jsx(ze,{flex:"1",children:"Duplicate"})]}),P.jsxs(Jl,{color:"gray.600",value:"delete","data-restid":`remove-row-${t.id}`,onClick:a,children:[P.jsx(Ab,{}),P.jsx(ze,{flex:1,children:"Delete"})]})]})})})]})})})]})},jqe=({row:t,store:e,onSelect:r})=>{const n=A.useCallback(()=>{r==null||r(t.id)},[r,t.id]),i=t.cells.length-1;return P.jsxs(ze,{height:"40px",as:"tr",_hover:{"& td":{bg:"gray.50"}},className:i$.Row,"data-testid":`row-${t.id}`,children:[P.jsx(ze,{as:"td",position:"sticky",left:0,backgroundColor:"white",width:"200px",maxWidth:"200px",children:P.jsxs(Te,{alignItems:"center",children:[P.jsx(dt,{textDecoration:"underline",cursor:"pointer",onClick:n,"data-testid":`row-${t.id}-select`,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:t.id}),!t.readonly&&e.isEdit&&P.jsx(dt,{color:"gray.400",children:"*"})]})}),t.cells.map((o,a)=>P.jsx(Xee,{store:o,isLastCell:i===a},o.nodeId)),P.jsx(ze,{as:"td",width:"100%"}),P.jsx(ze,{as:"td"})]})},Dqe=mt(({table:t,onSelect:e,onCopy:r})=>{const n=$qe(t),i=!!e,{columns:o,data:a,showHeader:s}=n.columns;return a.length?P.jsx(EIe,{style:{height:"100%"},totalCount:n.totalCount,defaultItemHeight:40,increaseViewportBy:40*100,endReached:n.hasNextPage?n.tryToFetchNextPage:void 0,data:a,components:{Table:({style:l,...c})=>P.jsx("table",{...c,style:{...l,width:"max-content",minWidth:"100%"}}),TableRow:l=>{const c=l["data-index"],d=a[c];return i?P.jsx(jqe,{row:d,store:n,onSelect:e}):P.jsx(Nqe,{row:d,store:n,onCopy:r})}},fixedHeaderContent:s?()=>P.jsxs(ze,{as:"tr",height:"40px",children:[P.jsx(ze,{as:"th",backgroundColor:"white",position:"sticky",left:0,zIndex:1,width:"140px",maxWidth:"140px",minWidth:"140px",children:P.jsx(ze,{height:"30px",borderBottomWidth:"1px",borderColor:"gray.100"})}),o.map(l=>P.jsx(ze,{as:"th",textAlign:"start",width:`${l.width}px`,maxWidth:`${l.width}px`,minWidth:`${l.width}px`,backgroundColor:"white",children:P.jsx(dt,{pl:"16px",pr:"16px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",height:"30px",borderBottomWidth:"1px",borderColor:"gray.100",color:"gray.400",children:l.title})},l.id)),P.jsx(ze,{as:"th",backgroundColor:"white",width:"100%",children:P.jsx(ze,{height:"30px",borderBottomWidth:"1px",borderColor:"gray.100"})}),P.jsx(ze,{as:"th",backgroundColor:"white",position:"sticky",right:0,zIndex:1,width:"40px",children:P.jsx(ze,{height:"30px",borderBottomWidth:"1px",borderColor:"gray.100"})})]}):void 0}):null}),f_=({tableId:t})=>P.jsx(Te,{width:"100%",borderStyle:"solid",borderTopWidth:1,borderColor:"gray.100",justifyContent:"center",color:"gray.400",fontWeight:"300",pt:"0.5rem",pb:"0.5rem",children:P.jsxs(ze,{backgroundColor:"gray.50",pl:"5px",pr:"5px",borderRadius:"5px",children:['Select or create a row in "',t,'" to be referenced by the above row']})}),Lqe=({previousType:t,tableId:e,rowId:r,foreignKeyPath:n,onCancel:i})=>{const o=A.useMemo(()=>t===ai.UpdatingRow?"updating":t===ai.CreatingRow?"creating":"",[t]);return P.jsx(P.Fragment,{children:P.jsx(ze,{width:"100%",borderStyle:"solid",borderLeftWidth:2,borderColor:"gray.200",pl:"1rem",mb:"1rem",children:P.jsxs(Te,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",color:"gray.400",fontWeight:"300",children:[P.jsx(dt,{textDecoration:"underline",cursor:"pointer",onClick:i,children:"Back"}),P.jsxs(dt,{children:["- ",o,' "',e," - ",r,'":']}),P.jsx(dt,{children:n})]})})})},Qqe=mt(()=>{const t=rd(),e=Vf(),{root:r,item:n}=n6e(),i=A.useCallback(async d=>{await r.selectForeignKey(n,d)},[n,r]),o=A.useCallback(()=>{r.cancelSelectingForeignKey(n)},[n,r]),a=A.useCallback(d=>{r.onSelectedForeignKey(n,d)},[n,r]),s=A.useCallback(async()=>{if(n.state.type===ai.CreatingRow){const d=n.state.store,p=await n.createRow(d.name.getPlainValue(),d.root.getPlainValue());p&&(n.state.isSelectingForeignKey?r.onSelectedForeignKey(n,d.name.getPlainValue()):t(e.make({isDraft:!0,rowId:p.id})))}},[n,e,t,r]),l=A.useCallback(async()=>{if(n.state.type===ai.UpdatingRow){const d=n.state.store;await n.updateRow(d)&&(d.save(),d.syncReadOnlyStores(),t(e.make({isDraft:!0,rowId:d.name.getPlainValue()})))}},[n,e,t]),c=A.useCallback(async(d,p)=>{if(n.state.type===ai.UpdatingRow){const g=n.state.store,m=vn();ef.loading({id:m,title:"Uploading..."}),await n.uploadFile(g,d,p)?(ef.update(m,{type:"info",title:"Successfully uploaded!",duration:1500}),g.syncReadOnlyStores(),t(e.make({isDraft:!0,rowId:g.name.getPlainValue()}))):ef.update(m,{type:"info",title:"Something wrong with the upload"})}},[n,e,t]);if(n.state.type===ai.ConnectingForeignKeyRow){const d=n.state.store;return P.jsx(Lqe,{previousType:n.state.previousType,foreignKeyPath:n.currentForeignKeyPath,onCancel:o,tableId:n.table.id,rowId:d.name.getPlainValue()})}return n.state.type===ai.List?P.jsxs(P.Fragment,{children:[n.state.isSelectingForeignKey&&P.jsx(f_,{tableId:n.table.id}),P.jsx(i6e,{onClick:n.toCreatingRow}),P.jsx(ze,{paddingTop:"0.5rem",paddingBottom:"1rem",height:"100%",children:P.jsx(Dqe,{table:n.table,onSelect:n.state.isSelectingForeignKey?a:void 0,onCopy:n.toCloneRow})})]}):n.state.type===ai.CreatingRow?P.jsxs(P.Fragment,{children:[n.state.isSelectingForeignKey&&P.jsx(f_,{tableId:n.table.id}),P.jsx(Oqe,{store:n.state.store,onAdd:s,onCancel:n.toList,onSelectForeignKey:i})]}):n.state.type===ai.UpdatingRow?P.jsxs(P.Fragment,{children:[n.state.isSelectingForeignKey&&P.jsx(f_,{tableId:n.table.id}),P.jsx(wqe,{isEdit:n.isEditableRevision,store:n.state.store,onUpdate:l,onSelectForeignKey:i,onUploadFile:c})]}):null}),Zee=mt(({startWithUpdating:t})=>{const e=r6e(t);return P.jsx(P.Fragment,{children:e.stack.map(r=>P.jsx(LJ.Provider,{value:{root:e,item:r},children:P.jsx(Qqe,{})},r.id))})}),Vqe=mt(()=>{const t=VBe();return t.isValidSchema?P.jsx(Zee,{startWithUpdating:!0}):P.jsx(LBe,{data:t.row.data})}),Fqe=()=>P.jsx(gg,{hideSidebar:!0,children:P.jsxs(Te,{alignItems:"center",flexDirection:"column",justifyContent:"center",flex:1,gap:"8px",children:[P.jsx(dt,{color:"gray.400",children:"Check your email to confirm your account"}),P.jsx(Ua,{to:`/${Nf}`,children:P.jsx(gb,{color:"gray.400",alignSelf:"center",children:"Log in"})})]})}),Bqe=()=>null;class o${constructor(e,r,n){fe(this,"isLoading",!1);this.routerService=e,this.apiService=r,this.authService=n,lt(this)}async login(e){e?(await this.loginRequest(e),await this.routerService.navigate("/")):console.error("Invalid code")}dispose(){}init(){}async loginRequest(e){this.setIsLoading(!0);try{const r=await this.apiService.client.loginGoogle({data:{code:e,redirectUrl:RZ()}});return await this.authService.setToken(r.loginGoogle.accessToken),!0}catch(r){console.error(r)}finally{this.setIsLoading(!1)}}setIsLoading(e){this.isLoading=e}}ft.register(o$,()=>{const t=ft.get(Sc),e=ft.get(hl),r=ft.get(ho);return new o$(t,e,r)},{scope:"request"});const zqe=async({request:t})=>{const n=new URL(t.url).searchParams.get("code");if(!n)throw new Error("Invalid code");return await ft.get(o$).login(n),Tp("/")};class a${constructor(e,r,n){fe(this,"isLoading",!1);fe(this,"form",new Y2({email:"",username:"",password:""}));this.routerService=e,this.apiService=r,this.configurationService=n,lt(this)}get disableSubmitButton(){return!this.form.isValid}get availableEmailSignUp(){return this.configurationService.availableEmailSignUp}get availableOauth(){return this.configurationService.availableGoogleOauth}get availableGoogleOauth(){return this.configurationService.availableGoogleOauth}get availableGithubOauth(){return this.configurationService.availableGithubOauth}toGoogleOauth(){IZ(this.configurationService.googleOauthClientId)}toGithubOauth(){_Z(this.configurationService.githubOauthClientId)}async submit(){await this.signUp()&&await this.routerService.navigate(`/${hP}/${aX}`)}dispose(){}init(){}async signUp(){this.setIsLoading(!0);try{return await this.apiService.client.signUp({data:this.form.values}),!0}finally{this.setIsLoading(!1)}}setIsLoading(e){this.isLoading=e}}ft.register(a$,()=>{const t=ft.get(Sc),e=ft.get(hl),r=ft.get(yf);return new a$(t,e,r)},{scope:"request"});const qqe=mt(()=>{const t=jf(a$),e=A.useCallback(s=>{t.form.setValue("username",s.currentTarget.value)},[t.form]),r=A.useCallback(s=>{t.form.setValue("email",s.currentTarget.value)},[t.form]),n=A.useCallback(s=>{t.form.setValue("password",s.currentTarget.value)},[t.form]),i=A.useCallback(async()=>{await t.submit()},[t]),o=A.useCallback(()=>{t.toGithubOauth()},[t]),a=A.useCallback(()=>{t.toGoogleOauth()},[t]);return P.jsxs(gg,{hideSidebar:!0,children:[P.jsxs(Te,{width:"100%",gap:"8px",justifyContent:"flex-end",children:[P.jsx(dt,{color:"gray.300",children:"Already have an account?"}),P.jsx(Ua,{to:`/${Nf}`,children:P.jsx(gb,{color:"gray.300",alignSelf:"center",children:"Log in"})})]}),P.jsx(Te,{alignItems:"center",justifyContent:"center",flex:1,children:P.jsxs(Te,{flexDirection:"column",width:"16rem",gap:"1rem",alignItems:"center",children:[t.availableOauth&&P.jsxs(P.Fragment,{children:[P.jsxs(Te,{flexDirection:"column",gap:"2px",children:[t.availableGithubOauth&&P.jsx(sl,{icon:P.jsx(hX,{}),onClick:o,title:"Continue with Github"}),t.availableGoogleOauth&&P.jsx(sl,{icon:P.jsx(pX,{}),onClick:a,title:"Continue with Google"})]}),t.availableEmailSignUp&&P.jsxs(Te,{width:"100%",alignItems:"center",gap:"16px",children:[P.jsx(ze,{backgroundColor:"gray.100",flex:1,height:"1px"}),P.jsx(dt,{color:"gray.300",fontSize:"12px",children:"OR"}),P.jsx(ze,{backgroundColor:"gray.100",flex:1,height:"1px"})]})]}),t.availableEmailSignUp&&P.jsxs(P.Fragment,{children:[P.jsx(nc,{dataTestId:"signup-username-input",autoFocus:!0,height:"40px",placeholder:"enter your username",autoComplete:"new-password",value:t.form.values.username,onChange:e}),P.jsx(nc,{dataTestId:"signup-email-input",height:"40px",placeholder:"enter your email",type:"email",autoComplete:"new-password",value:t.form.values.email,onChange:r}),P.jsx(nc,{dataTestId:"signup-password-input",height:"40px",placeholder:"create a password",type:"password",autoComplete:"new-password",value:t.form.values.password,onChange:n,onEnter:i}),P.jsx(ze,{visibility:t.disableSubmitButton?"hidden":"visible",children:P.jsx(sl,{onClick:i,disabled:t.disableSubmitButton,isLoading:t.isLoading,title:"Sign up"})})]})]})})]})}),Wqe=()=>P.jsx(Zee,{});class s${constructor(e,r,n){fe(this,"isLoading",!1);fe(this,"form",new Y2({username:""}));this.authService=e,this.apiService=r,this.routerService=n,lt(this)}get disableSubmitButton(){return!this.form.isValid}async submit(){await this.request()&&(await this.authService.fetchMe(),await this.routerService.navigate(H2))}dispose(){}init(){}async request(){this.setIsLoading(!0);try{return await this.apiService.client.setUsername({data:{username:this.form.values.username}}),!0}catch(e){console.error(e)}finally{this.setIsLoading(!1)}}setIsLoading(e){this.isLoading=e}}ft.register(s$,()=>{const t=ft.get(ho),e=ft.get(hl),r=ft.get(Sc);return new s$(t,e,r)},{scope:"request"});const Uqe=mt(()=>{const t=jf(s$),e=A.useCallback(n=>{t.form.setValue("username",n.currentTarget.value)},[t.form]),r=A.useCallback(async()=>{await t.submit()},[t]);return P.jsx(gg,{hideSidebar:!0,children:P.jsx(Te,{alignItems:"center",justifyContent:"center",flex:1,children:P.jsxs(Te,{flexDirection:"column",width:"16rem",gap:"1rem",alignItems:"center",children:[P.jsx(nc,{dataTestId:"login-emailOrUsername-input",autoFocus:!0,height:"40px",placeholder:"set username",value:t.form.values.username,onChange:e,onEnter:r}),P.jsx(ze,{visibility:t.disableSubmitButton?"hidden":"visible",children:P.jsx(sl,{onClick:r,isLoading:t.isLoading,title:"Set username"})})]})})})}),Hqe=()=>{const t=S2(),e=A.useMemo(()=>(console.error(t),"Unexpected error"),[t]);return P.jsxs(Te,{alignItems:"center",flex:1,gap:"1rem",justifyContent:"center",width:"100%",height:"100%",children:[P.jsx(G2,{color:"gray"}),P.jsx(dt,{color:"gray.400",children:e})]})},h_=()=>{const t=S2(),e=A.useMemo(()=>t instanceof fZ?`Not found table "${t.message}" in this revision`:t instanceof xP?`Not found row "${t.message}" in this revision`:(console.error(t),"Unexpected error"),[t]);return P.jsxs(Te,{alignItems:"center",flex:1,gap:"1rem",justifyContent:"center",width:"100%",children:[P.jsx(G2,{color:"gray"}),P.jsx(dt,{color:"gray.400",children:e})]})};function ia(){return(ia=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var Xqe=function(){};function Gee(t,e){return Math.random()*(e-t+1)+t}function Y6(t,e){return Math.floor(Gee(t,e))}var Zqe=A.forwardRef(function(t,e){var r=t.progress,n=t.height,i=n===void 0?2:n,o=t.className,a=o===void 0?"":o,s=t.color,l=s===void 0?"red":s,c=t.background,d=c===void 0?"transparent":c,p=t.onLoaderFinished,g=t.transitionTime,m=g===void 0?300:g,y=t.loaderSpeed,b=y===void 0?500:y,O=t.waitingTime,S=O===void 0?1e3:O,w=t.shadow,k=w===void 0||w,T=t.containerStyle,C=T===void 0?{}:T,E=t.style,_=E===void 0?{}:E,$=t.shadowStyle,M=$===void 0?{}:$,j=t.containerClassName,B=j===void 0?"":j,V=A.useRef(!1),X=A.useState(0),D=X[0],F=X[1],Y=A.useRef({active:!1,refreshRate:1e3}),ie=A.useState(!1),H=ie[0],ne=ie[1],z=A.useState({active:!1,value:20}),N=z[0],U=z[1],J={position:"fixed",top:0,left:0,height:i,background:d,zIndex:99999999999,width:"100%"},Q={boxShadow:"0 0 10px "+l+", 0 0 10px "+l,width:"5%",opacity:1,position:"absolute",height:"100%",transition:"all "+b+"ms ease",transform:"rotate(3deg) translate(0px, -4px)",left:"-10rem"},q=A.useState({height:"100%",background:l,transition:"all "+b+"ms ease",width:"0%"}),oe=q[0],Oe=q[1],Z=A.useState(Q),le=Z[0],Pe=Z[1];A.useEffect(function(){return V.current=!0,function(){V.current=!1}},[]),A.useImperativeHandle(e,function(){return{continuousStart:function(Me,De){if(De===void 0&&(De=1e3),!N.active)if(H)console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");else{var Vt=Me||Y6(10,20);Y.current={active:!0,refreshRate:De},F(Vt),ke(Vt)}},staticStart:function(Me){if(!Y.current.active)if(H)console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");else{var De=Me||Y6(30,50);U({active:!0,value:De}),F(De),ke(De)}},complete:function(){H?console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!"):(F(100),ke(100))}}}),A.useEffect(function(){Oe(ia({},oe,{background:l})),Pe(ia({},le,{boxShadow:"0 0 10px "+l+", 0 0 5px "+l}))},[l]),A.useEffect(function(){if(e){if(e&&r!==void 0)return void console.warn(`react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar! Please use only props or only ref methods! Ref methods will override props if "ref" property is available.`);ke(D),ne(!1)}else r&&ke(r),ne(!0)},[r]);var ee,re,ye,ke=function Me(De){De>=100?(Oe(ia({},oe,{width:"100%"})),k&&Pe(ia({},le,{left:De-10+"%"})),setTimeout(function(){V.current&&(Oe(ia({},oe,{opacity:0,width:"100%",transition:"all "+m+"ms ease-out",color:l})),setTimeout(function(){V.current&&(Y.current.active&&(Y.current=ia({},Y.current,{active:!1}),F(0),Me(0)),N.active&&(U(ia({},N,{active:!1})),F(0),Me(0)),p&&p(),F(0),Me(0))},m))},S)):(Oe(function(Vt){return ia({},Vt,{width:De+"%",opacity:1,transition:De>0?"all "+b+"ms ease":""})}),k&&Pe(ia({},le,{left:De-5.5+"%",transition:De>0?"all "+b+"ms ease":""})))};return ee=function(){var Me=Gee(Math.min(10,(100-D)/5),Math.min(20,(100-D)/3));D+Me<95&&(F(D+Me),ke(D+Me))},re=Y.current.active?Y.current.refreshRate:null,ye=A.useRef(Xqe),A.useEffect(function(){ye.current=ee}),A.useEffect(function(){},[void 0]),A.useEffect(function(){if(re!==null&&re!==!1){var Me=setInterval(function(){return ye.current()},re);return function(){return clearInterval(Me)}}},[re]),A.createElement("div",{className:B,style:ia({},J,C)},A.createElement("div",{className:a,style:ia({},oe,_)},k?A.createElement("div",{style:ia({},le,M)}):null))});const Gqe=(t=300)=>{const e=A.useRef(null),r=Tbe();return A.useEffect(()=>{const n=e.current;let i=NaN,o=!1;return r.state==="loading"&&(i=setTimeout(()=>{o=!0,n==null||n.continuousStart()},t)),()=>{o&&(n==null||n.complete()),clearTimeout(i)}},[t,r.state]),e},Yqe=()=>{const t=Gqe(150);return P.jsxs(P.Fragment,{children:[P.jsx(Zqe,{ref:t,color:"#1fa3ff",height:1,waitingTime:500}),P.jsx(dS,{})]})},p_=({tableLoader:t,tableId:e,rowLoader:r,rowId:n})=>({path:_v,loader:t,id:e,children:[{index:!0,element:P.jsx(Wqe,{})},{path:lX,loader:r,id:n,element:P.jsx(Vqe,{})}]}),Kqe={path:ku,element:P.jsx(dS,{}),loader:AR(xS,Wke),id:dn.Organization,children:[{path:Cu,element:P.jsx(dS,{}),loader:AR(xS,Uke),id:dn.Project,children:[{path:Tu,element:P.jsx(W_e,{}),loader:Fke,id:dn.Branch,children:[{loader:Xke,id:dn.HeadRevision,errorElement:P.jsx(h_,{}),children:[{index:!0,element:P.jsx(ZE,{})},p_({tableLoader:eCe,tableId:dn.HeadTable,rowLoader:Yke,rowId:dn.HeadRow})]},{path:pP,loader:Hke,id:dn.DraftRevision,errorElement:P.jsx(h_,{}),children:[{index:!0,element:P.jsx(ZE,{})},p_({tableLoader:Jke,tableId:dn.DraftTable,rowLoader:Gke,rowId:dn.DraftRow})]},{path:sX,loader:Zke,id:dn.SpecificRevision,errorElement:P.jsx(h_,{}),children:[{index:!0,element:P.jsx(ZE,{})},p_({tableLoader:tCe,tableId:dn.SpecificTable,rowLoader:Kke,rowId:dn.SpecificRow})]}]}]}]},Jqe=[{path:`${tX}/*`,element:P.jsx(sTe,{})},{path:"/",element:P.jsx(Yqe,{}),errorElement:P.jsx(Hqe,{}),children:[{index:!0,element:P.jsx(t$e,{}),loader:AR(xS,qke)},{path:nX,element:P.jsx(Uqe,{})},{path:Nf,loader:Bke,children:[{index:!0,element:P.jsx(K_e,{})},{path:oX,loader:zqe,element:P.jsx(Bqe,{})},{path:iX,loader:X_e,element:P.jsx(H_e,{})}]},{path:rX,element:P.jsx(J_e,{}),loader:xS},{path:hP,loader:zke,children:[{index:!0,element:P.jsx(qqe,{})},{path:aX,element:P.jsx(Fqe,{})},{path:_1e,element:P.jsx(U_e,{})}]},{path:Pu,children:[Kqe]}]}];class Sc{constructor(e){fe(this,"_router",null);this.bootstrapService=e,this.init()}get router(){if(!this._router)throw new Error("Router not found");return this._router}navigate(...e){return this.router.navigate(...e)}init(){ol(()=>this.bootstrapService.isLoaded,e=>{e&&(this._router=Qbe(Jqe))})}}ft.register(Sc,()=>{const t=ft.get(OS);return new Sc(t)},{scope:"singleton"});class l${constructor(e,r){this.bootstrapService=e,this.routerService=r,lt(this)}get isLoaded(){return this.bootstrapService.isLoaded}get router(){return this.routerService.router}async init(){}dispose(){}}ft.register(l$,()=>{const t=ft.get(OS),e=ft.get(Sc);return new l$(t,e)},{scope:"request"});const e7e=({children:t})=>P.jsx(k1e,{client:_r,children:t}),K6=U9(G9,{theme:{tokens:{colors:{gray:{50:{value:"#F7FAFC"},100:{value:"#EDF2F7"},200:{value:"#E2E8F0"},300:{value:"#CBD5E0"},400:{value:"#A0AEC0"},500:{value:"#718096"},600:{value:"#4A5568"},700:{value:"#2D3748"},800:{value:"#1A202C"},900:{value:"#171923"}}}}}}),t7e=mt(()=>{const t=jf(l$);return!t.isLoaded||!t.router?P.jsxs($D,{value:K6,children:[P.jsx(Y$,{w:"100%",h:"100%",children:P.jsx(Bx,{})}),P.jsx(s4,{})]}):P.jsx(e7e,{children:P.jsxs($D,{value:K6,children:[P.jsx(Xbe,{router:t.router}),P.jsx(s4,{})]})})}),J6=document.getElementById("root");J6&&Bre.createRoot(J6).render(P.jsx(A.StrictMode,{children:P.jsx(t7e,{})}));const r7e=`ver: ${gv("PACKAGE_VERSION")} - ${gv("GIT_BRANCH_NAME")}:${gv("GIT_COMMIT_HASH")}`;console.info(r7e)});export default n7e();
|