diff --git a/assets/D2Renderer.worker-19d00eda.js b/assets/D2Renderer.worker-19d00eda.js new file mode 100644 index 00000000..5ca4e3c6 --- /dev/null +++ b/assets/D2Renderer.worker-19d00eda.js @@ -0,0 +1,28 @@ +var Af=(cn,wn,Rn)=>{if(!wn.has(cn))throw TypeError("Cannot "+Rn)};var yn=(cn,wn,Rn)=>(Af(cn,wn,"read from private field"),Rn?Rn.call(cn):wn.get(cn)),fe=(cn,wn,Rn)=>{if(wn.has(cn))throw TypeError("Cannot add the same private member more than once");wn instanceof WeakSet?wn.add(cn):wn.set(cn,Rn)},me=(cn,wn,Rn,Ae)=>(Af(cn,wn,"write to private field"),Ae?Ae.call(cn,Rn):wn.set(cn,Rn),Rn);var Yc=(cn,wn,Rn,Ae)=>({set _(Ki){me(cn,wn,Ki,Rn)},get _(){return yn(cn,wn,Ae)}}),Je=(cn,wn,Rn)=>(Af(cn,wn,"access private method"),Rn);(function(){var Qn,Ct,Ne,Ye,fr,Jr,$c,Ft,ft,Mr,Bt,Qr,Xc,jr,Wc;"use strict";var cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rn={},Ae=cn&&cn.__assign||function(){return Ae=Object.assign||function(t){for(var u,i=1,f=arguments.length;i + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */Lr.exports,function(t,u){(function(){var i,f="4.17.21",s=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",g="Invalid `variable` option passed into `_.template`",m="__lodash_hash_undefined__",d=500,y="__lodash_placeholder__",w=1,B=2,F=4,M=1,H=2,E=1,T=2,C=4,A=8,L=16,D=32,N=64,K=128,Z=256,gn=512,Wn=30,se="...",_e=800,ar=16,at=1,sr=2,lr=3,le=1/0,Gn=9007199254740991,Tt=17976931348623157e292,st=0/0,ye=4294967295,Mg=ye-1,Lg=ye>>>1,Pg=[["ary",K],["bind",E],["bindKey",T],["curry",A],["curryRight",L],["flip",gn],["partial",D],["partialRight",N],["rearg",Z]],Mt="[object Arguments]",ni="[object Array]",Hg="[object AsyncFunction]",cr="[object Boolean]",hr="[object Date]",Dg="[object DOMException]",ei="[object Error]",ti="[object Function]",ls="[object GeneratorFunction]",ce="[object Map]",pr="[object Number]",qg="[object Null]",Re="[object Object]",cs="[object Promise]",Gg="[object Proxy]",gr="[object RegExp]",he="[object Set]",dr="[object String]",ri="[object Symbol]",Ng="[object Undefined]",vr="[object WeakMap]",Yg="[object WeakSet]",mr="[object ArrayBuffer]",Lt="[object DataView]",no="[object Float32Array]",eo="[object Float64Array]",to="[object Int8Array]",ro="[object Int16Array]",io="[object Int32Array]",uo="[object Uint8Array]",oo="[object Uint8ClampedArray]",fo="[object Uint16Array]",ao="[object Uint32Array]",$g=/\b__p \+= '';/g,Xg=/\b(__p \+=) '' \+/g,Wg=/(__e\(.*?\)|\b__t\)) \+\n'';/g,hs=/&(?:amp|lt|gt|quot|#39);/g,ps=/[&<>"']/g,Ug=RegExp(hs.source),Kg=RegExp(ps.source),zg=/<%-([\s\S]+?)%>/g,kg=/<%([\s\S]+?)%>/g,gs=/<%=([\s\S]+?)%>/g,Vg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zg=/^\w*$/,Jg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,so=/[\\^$.*+?()[\]{}|]/g,Qg=RegExp(so.source),lo=/^\s+/,jg=/\s/,nd=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ed=/\{\n\/\* \[wrapped with (.+)\] \*/,td=/,? & /,rd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,id=/[()=,{}\[\]\/\s]/,ud=/\\(\\)?/g,od=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ds=/\w*$/,fd=/^[-+]0x[0-9a-f]+$/i,ad=/^0b[01]+$/i,sd=/^\[object .+?Constructor\]$/,ld=/^0o[0-7]+$/i,cd=/^(?:0|[1-9]\d*)$/,hd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ii=/($^)/,pd=/['\n\r\u2028\u2029\\]/g,ui="\\ud800-\\udfff",gd="\\u0300-\\u036f",dd="\\ufe20-\\ufe2f",vd="\\u20d0-\\u20ff",vs=gd+dd+vd,ms="\\u2700-\\u27bf",_s="a-z\\xdf-\\xf6\\xf8-\\xff",md="\\xac\\xb1\\xd7\\xf7",_d="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yd="\\u2000-\\u206f",bd=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ys="A-Z\\xc0-\\xd6\\xd8-\\xde",bs="\\ufe0e\\ufe0f",xs=md+_d+yd+bd,co="['’]",xd="["+ui+"]",ws="["+xs+"]",oi="["+vs+"]",As="\\d+",wd="["+ms+"]",Ss="["+_s+"]",Es="[^"+ui+xs+As+ms+_s+ys+"]",ho="\\ud83c[\\udffb-\\udfff]",Ad="(?:"+oi+"|"+ho+")",Rs="[^"+ui+"]",po="(?:\\ud83c[\\udde6-\\uddff]){2}",go="[\\ud800-\\udbff][\\udc00-\\udfff]",Pt="["+ys+"]",Os="\\u200d",Is="(?:"+Ss+"|"+Es+")",Sd="(?:"+Pt+"|"+Es+")",Cs="(?:"+co+"(?:d|ll|m|re|s|t|ve))?",Fs="(?:"+co+"(?:D|LL|M|RE|S|T|VE))?",Bs=Ad+"?",Ts="["+bs+"]?",Ed="(?:"+Os+"(?:"+[Rs,po,go].join("|")+")"+Ts+Bs+")*",Rd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Od="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ms=Ts+Bs+Ed,Id="(?:"+[wd,po,go].join("|")+")"+Ms,Cd="(?:"+[Rs+oi+"?",oi,po,go,xd].join("|")+")",Fd=RegExp(co,"g"),Bd=RegExp(oi,"g"),vo=RegExp(ho+"(?="+ho+")|"+Cd+Ms,"g"),Td=RegExp([Pt+"?"+Ss+"+"+Cs+"(?="+[ws,Pt,"$"].join("|")+")",Sd+"+"+Fs+"(?="+[ws,Pt+Is,"$"].join("|")+")",Pt+"?"+Is+"+"+Cs,Pt+"+"+Fs,Od,Rd,As,Id].join("|"),"g"),Md=RegExp("["+Os+ui+vs+bs+"]"),Ld=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Hd=-1,dn={};dn[no]=dn[eo]=dn[to]=dn[ro]=dn[io]=dn[uo]=dn[oo]=dn[fo]=dn[ao]=!0,dn[Mt]=dn[ni]=dn[mr]=dn[cr]=dn[Lt]=dn[hr]=dn[ei]=dn[ti]=dn[ce]=dn[pr]=dn[Re]=dn[gr]=dn[he]=dn[dr]=dn[vr]=!1;var pn={};pn[Mt]=pn[ni]=pn[mr]=pn[Lt]=pn[cr]=pn[hr]=pn[no]=pn[eo]=pn[to]=pn[ro]=pn[io]=pn[ce]=pn[pr]=pn[Re]=pn[gr]=pn[he]=pn[dr]=pn[ri]=pn[uo]=pn[oo]=pn[fo]=pn[ao]=!0,pn[ei]=pn[ti]=pn[vr]=!1;var Dd={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},qd={"&":"&","<":"<",">":">",'"':""","'":"'"},Gd={"&":"&","<":"<",">":">",""":'"',"'":"'"},Nd={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yd=parseFloat,$d=parseInt,Ls=typeof cn=="object"&&cn&&cn.Object===Object&&cn,Xd=typeof self=="object"&&self&&self.Object===Object&&self,Cn=Ls||Xd||Function("return this")(),mo=u&&!u.nodeType&&u,lt=mo&&!0&&t&&!t.nodeType&&t,Ps=lt&<.exports===mo,_o=Ps&&Ls.process,jn=function(){try{var b=lt&<.require&<.require("util").types;return b||_o&&_o.binding&&_o.binding("util")}catch{}}(),Hs=jn&&jn.isArrayBuffer,Ds=jn&&jn.isDate,qs=jn&&jn.isMap,Gs=jn&&jn.isRegExp,Ns=jn&&jn.isSet,Ys=jn&&jn.isTypedArray;function Un(b,R,S){switch(S.length){case 0:return b.call(R);case 1:return b.call(R,S[0]);case 2:return b.call(R,S[0],S[1]);case 3:return b.call(R,S[0],S[1],S[2])}return b.apply(R,S)}function Wd(b,R,S,G){for(var k=-1,fn=b==null?0:b.length;++k-1}function yo(b,R,S){for(var G=-1,k=b==null?0:b.length;++G-1;);return S}function Vs(b,R){for(var S=b.length;S--&&Ht(R,b[S],0)>-1;);return S}function jd(b,R){for(var S=b.length,G=0;S--;)b[S]===R&&++G;return G}var n0=Ao(Dd),e0=Ao(qd);function t0(b){return"\\"+Nd[b]}function r0(b,R){return b==null?i:b[R]}function Dt(b){return Md.test(b)}function i0(b){return Ld.test(b)}function u0(b){for(var R,S=[];!(R=b.next()).done;)S.push(R.value);return S}function Oo(b){var R=-1,S=Array(b.size);return b.forEach(function(G,k){S[++R]=[k,G]}),S}function Zs(b,R){return function(S){return b(R(S))}}function We(b,R){for(var S=-1,G=b.length,k=0,fn=[];++S-1}function K0(n,e){var r=this.__data__,o=Si(r,n);return o<0?(++this.size,r.push([n,e])):r[o][1]=e,this}Oe.prototype.clear=$0,Oe.prototype.delete=X0,Oe.prototype.get=W0,Oe.prototype.has=U0,Oe.prototype.set=K0;function Ie(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function re(n,e,r,o,a,h){var v,_=e&w,x=e&B,O=e&F;if(r&&(v=a?r(n,o,a,h):r(n)),v!==i)return v;if(!mn(n))return n;var I=V(n);if(I){if(v=Zv(n),!_)return Nn(n,v)}else{var P=Mn(n),q=P==ti||P==ls;if(Ze(n))return Tl(n,_);if(P==Re||P==Mt||q&&!a){if(v=x||q?{}:Jl(n),!_)return x?Gv(n,av(v,n)):qv(n,al(v,n))}else{if(!pn[P])return a?n:{};v=Jv(n,P,_)}}h||(h=new ge);var Y=h.get(n);if(Y)return Y;h.set(n,v),Rc(n)?n.forEach(function(U){v.add(re(U,e,r,U,n,h))}):Sc(n)&&n.forEach(function(U,rn){v.set(rn,re(U,e,r,rn,n,h))});var W=O?x?jo:Qo:x?$n:En,Q=I?i:W(n);return ne(Q||n,function(U,rn){Q&&(rn=U,U=n[rn]),Sr(v,rn,re(U,e,r,rn,n,h))}),v}function sv(n){var e=En(n);return function(r){return sl(r,n,e)}}function sl(n,e,r){var o=r.length;if(n==null)return!o;for(n=ln(n);o--;){var a=r[o],h=e[a],v=n[a];if(v===i&&!(a in n)||!h(v))return!1}return!0}function ll(n,e,r){if(typeof n!="function")throw new ee(p);return Br(function(){n.apply(i,r)},e)}function Er(n,e,r,o){var a=-1,h=fi,v=!0,_=n.length,x=[],O=e.length;if(!_)return x;r&&(e=vn(e,Kn(r))),o?(h=yo,v=!1):e.length>=s&&(h=_r,v=!1,e=new pt(e));n:for(;++a<_;){var I=n[a],P=r==null?I:r(I);if(I=o||I!==0?I:0,v&&P===P){for(var q=O;q--;)if(e[q]===P)continue n;x.push(I)}else h(e,P,o)||x.push(I)}return x}var Ke=Dl(be),cl=Dl(Po,!0);function lv(n,e){var r=!0;return Ke(n,function(o,a,h){return r=!!e(o,a,h),r}),r}function Ei(n,e,r){for(var o=-1,a=n.length;++oa?0:a+r),o=o===i||o>a?a:J(o),o<0&&(o+=a),o=r>o?0:Ic(o);r0&&r(_)?e>1?Fn(_,e-1,r,o,a):Xe(a,_):o||(a[a.length]=_)}return a}var Lo=ql(),pl=ql(!0);function be(n,e){return n&&Lo(n,e,En)}function Po(n,e){return n&&pl(n,e,En)}function Ri(n,e){return $e(e,function(r){return Me(n[r])})}function dt(n,e){e=ke(e,n);for(var r=0,o=e.length;n!=null&&re}function hv(n,e){return n!=null&&sn.call(n,e)}function pv(n,e){return n!=null&&e in ln(n)}function gv(n,e,r){return n>=Tn(e,r)&&n=120&&I.length>=120)?new pt(v&&I):i}I=n[0];var P=-1,q=_[0];n:for(;++P-1;)_!==n&&mi.call(_,x,1),mi.call(n,x,1);return n}function Sl(n,e){for(var r=n?e.length:0,o=r-1;r--;){var a=e[r];if(r==o||a!==h){var h=a;Te(a)?mi.call(n,a,1):Uo(n,a)}}return n}function $o(n,e){return n+bi(il()*(e-n+1))}function Ov(n,e,r,o){for(var a=-1,h=Sn(yi((e-n)/(r||1)),0),v=S(h);h--;)v[o?h:++a]=n,n+=r;return v}function Xo(n,e){var r="";if(!n||e<1||e>Gn)return r;do e%2&&(r+=n),e=bi(e/2),e&&(n+=n);while(e);return r}function j(n,e){return ff(nc(n,e,Xn),n+"")}function Iv(n){return fl(kt(n))}function Cv(n,e){var r=kt(n);return Di(r,gt(e,0,r.length))}function Ir(n,e,r,o){if(!mn(n))return n;e=ke(e,n);for(var a=-1,h=e.length,v=h-1,_=n;_!=null&&++aa?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var h=S(a);++o>>1,v=n[h];v!==null&&!kn(v)&&(r?v<=e:v=s){var O=e?null:Xv(n);if(O)return si(O);v=!1,a=_r,x=new pt}else x=e?[]:_;n:for(;++o=o?n:ie(n,e,r)}var Bl=b0||function(n){return Cn.clearTimeout(n)};function Tl(n,e){if(e)return n.slice();var r=n.length,o=js?js(r):new n.constructor(r);return n.copy(o),o}function Vo(n){var e=new n.constructor(n.byteLength);return new di(e).set(new di(n)),e}function Lv(n,e){var r=e?Vo(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function Pv(n){var e=new n.constructor(n.source,ds.exec(n));return e.lastIndex=n.lastIndex,e}function Hv(n){return Ar?ln(Ar.call(n)):{}}function Ml(n,e){var r=e?Vo(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Ll(n,e){if(n!==e){var r=n!==i,o=n===null,a=n===n,h=kn(n),v=e!==i,_=e===null,x=e===e,O=kn(e);if(!_&&!O&&!h&&n>e||h&&v&&x&&!_&&!O||o&&v&&x||!r&&x||!a)return 1;if(!o&&!h&&!O&&n=_)return x;var O=r[o];return x*(O=="desc"?-1:1)}}return n.index-e.index}function Pl(n,e,r,o){for(var a=-1,h=n.length,v=r.length,_=-1,x=e.length,O=Sn(h-v,0),I=S(x+O),P=!o;++_1?r[a-1]:i,v=a>2?r[2]:i;for(h=n.length>3&&typeof h=="function"?(a--,h):i,v&&Hn(r[0],r[1],v)&&(h=a<3?i:h,a=1),e=ln(e);++o-1?a[h?e[v]:v]:i}}function Yl(n){return Be(function(e){var r=e.length,o=r,a=te.prototype.thru;for(n&&e.reverse();o--;){var h=e[o];if(typeof h!="function")throw new ee(p);if(a&&!v&&Pi(h)=="wrapper")var v=new te([],!0)}for(o=v?o:r;++o1&&on.reverse(),I&&x_))return!1;var O=h.get(n),I=h.get(e);if(O&&I)return O==e&&I==n;var P=-1,q=!0,Y=r&H?new pt:i;for(h.set(n,e),h.set(e,n);++P<_;){var W=n[P],Q=e[P];if(o)var U=v?o(Q,W,P,e,n,h):o(W,Q,P,n,e,h);if(U!==i){if(U)continue;q=!1;break}if(Y){if(!xo(e,function(rn,on){if(!_r(Y,on)&&(W===rn||a(W,rn,r,o,h)))return Y.push(on)})){q=!1;break}}else if(!(W===Q||a(W,Q,r,o,h))){q=!1;break}}return h.delete(n),h.delete(e),q}function Uv(n,e,r,o,a,h,v){switch(r){case Lt:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case mr:return!(n.byteLength!=e.byteLength||!h(new di(n),new di(e)));case cr:case hr:case pr:return de(+n,+e);case ei:return n.name==e.name&&n.message==e.message;case gr:case dr:return n==e+"";case ce:var _=Oo;case he:var x=o&M;if(_||(_=si),n.size!=e.size&&!x)return!1;var O=v.get(n);if(O)return O==e;o|=H,v.set(n,e);var I=kl(_(n),_(e),o,a,h,v);return v.delete(n),I;case ri:if(Ar)return Ar.call(n)==Ar.call(e)}return!1}function Kv(n,e,r,o,a,h){var v=r&M,_=Qo(n),x=_.length,O=Qo(e),I=O.length;if(x!=I&&!v)return!1;for(var P=x;P--;){var q=_[P];if(!(v?q in e:sn.call(e,q)))return!1}var Y=h.get(n),W=h.get(e);if(Y&&W)return Y==e&&W==n;var Q=!0;h.set(n,e),h.set(e,n);for(var U=v;++P1?"& ":"")+e[o],e=e.join(r>2?", ":" "),n.replace(nd,`{ +/* [wrapped with `+e+`] */ +`)}function jv(n){return V(n)||_t(n)||!!(tl&&n&&n[tl])}function Te(n,e){var r=typeof n;return e=e??Gn,!!e&&(r=="number"||r!="symbol"&&cd.test(n))&&n>-1&&n%1==0&&n0){if(++e>=_e)return arguments[0]}else e=0;return n.apply(i,arguments)}}function Di(n,e){var r=-1,o=n.length,a=o-1;for(e=e===i?o:e;++r1?n[e-1]:i;return r=typeof r=="function"?(n.pop(),r):i,hc(n,r)});function pc(n){var e=l(n);return e.__chain__=!0,e}function lm(n,e){return e(n),n}function qi(n,e){return e(n)}var cm=Be(function(n){var e=n.length,r=e?n[0]:0,o=this.__wrapped__,a=function(h){return Mo(h,n)};return e>1||this.__actions__.length||!(o instanceof un)||!Te(r)?this.thru(a):(o=o.slice(r,+r+(e?1:0)),o.__actions__.push({func:qi,args:[a],thisArg:i}),new te(o,this.__chain__).thru(function(h){return e&&!h.length&&h.push(i),h}))});function hm(){return pc(this)}function pm(){return new te(this.value(),this.__chain__)}function gm(){this.__values__===i&&(this.__values__=Oc(this.value()));var n=this.__index__>=this.__values__.length,e=n?i:this.__values__[this.__index__++];return{done:n,value:e}}function dm(){return this}function vm(n){for(var e,r=this;r instanceof Ai;){var o=oc(r);o.__index__=0,o.__values__=i,e?a.__wrapped__=o:e=o;var a=o;r=r.__wrapped__}return a.__wrapped__=n,e}function mm(){var n=this.__wrapped__;if(n instanceof un){var e=n;return this.__actions__.length&&(e=new un(this)),e=e.reverse(),e.__actions__.push({func:qi,args:[af],thisArg:i}),new te(e,this.__chain__)}return this.thru(af)}function _m(){return Cl(this.__wrapped__,this.__actions__)}var ym=Fi(function(n,e,r){sn.call(n,r)?++n[r]:Ce(n,r,1)});function bm(n,e,r){var o=V(n)?$s:lv;return r&&Hn(n,e,r)&&(e=i),o(n,X(e,3))}function xm(n,e){var r=V(n)?$e:hl;return r(n,X(e,3))}var wm=Nl(fc),Am=Nl(ac);function Sm(n,e){return Fn(Gi(n,e),1)}function Em(n,e){return Fn(Gi(n,e),le)}function Rm(n,e,r){return r=r===i?1:J(r),Fn(Gi(n,e),r)}function gc(n,e){var r=V(n)?ne:Ke;return r(n,X(e,3))}function dc(n,e){var r=V(n)?Ud:cl;return r(n,X(e,3))}var Om=Fi(function(n,e,r){sn.call(n,r)?n[r].push(e):Ce(n,r,[e])});function Im(n,e,r,o){n=Yn(n)?n:kt(n),r=r&&!o?J(r):0;var a=n.length;return r<0&&(r=Sn(a+r,0)),Wi(n)?r<=a&&n.indexOf(e,r)>-1:!!a&&Ht(n,e,r)>-1}var Cm=j(function(n,e,r){var o=-1,a=typeof e=="function",h=Yn(n)?S(n.length):[];return Ke(n,function(v){h[++o]=a?Un(e,v,r):Rr(v,e,r)}),h}),Fm=Fi(function(n,e,r){Ce(n,r,e)});function Gi(n,e){var r=V(n)?vn:_l;return r(n,X(e,3))}function Bm(n,e,r,o){return n==null?[]:(V(e)||(e=e==null?[]:[e]),r=o?i:r,V(r)||(r=r==null?[]:[r]),wl(n,e,r))}var Tm=Fi(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function Mm(n,e,r){var o=V(n)?bo:Ks,a=arguments.length<3;return o(n,X(e,4),r,a,Ke)}function Lm(n,e,r){var o=V(n)?Kd:Ks,a=arguments.length<3;return o(n,X(e,4),r,a,cl)}function Pm(n,e){var r=V(n)?$e:hl;return r(n,$i(X(e,3)))}function Hm(n){var e=V(n)?fl:Iv;return e(n)}function Dm(n,e,r){(r?Hn(n,e,r):e===i)?e=1:e=J(e);var o=V(n)?uv:Cv;return o(n,e)}function qm(n){var e=V(n)?ov:Bv;return e(n)}function Gm(n){if(n==null)return 0;if(Yn(n))return Wi(n)?qt(n):n.length;var e=Mn(n);return e==ce||e==he?n.size:Go(n).length}function Nm(n,e,r){var o=V(n)?xo:Tv;return r&&Hn(n,e,r)&&(e=i),o(n,X(e,3))}var Ym=j(function(n,e){if(n==null)return[];var r=e.length;return r>1&&Hn(n,e[0],e[1])?e=[]:r>2&&Hn(e[0],e[1],e[2])&&(e=[e[0]]),wl(n,Fn(e,1),[])}),Ni=x0||function(){return Cn.Date.now()};function $m(n,e){if(typeof e!="function")throw new ee(p);return n=J(n),function(){if(--n<1)return e.apply(this,arguments)}}function vc(n,e,r){return e=r?i:e,e=n&&e==null?n.length:e,Fe(n,K,i,i,i,i,e)}function mc(n,e){var r;if(typeof e!="function")throw new ee(p);return n=J(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=i),r}}var lf=j(function(n,e,r){var o=E;if(r.length){var a=We(r,Kt(lf));o|=D}return Fe(n,o,e,r,a)}),_c=j(function(n,e,r){var o=E|T;if(r.length){var a=We(r,Kt(_c));o|=D}return Fe(e,o,n,r,a)});function yc(n,e,r){e=r?i:e;var o=Fe(n,A,i,i,i,i,i,e);return o.placeholder=yc.placeholder,o}function bc(n,e,r){e=r?i:e;var o=Fe(n,L,i,i,i,i,i,e);return o.placeholder=bc.placeholder,o}function xc(n,e,r){var o,a,h,v,_,x,O=0,I=!1,P=!1,q=!0;if(typeof n!="function")throw new ee(p);e=oe(e)||0,mn(r)&&(I=!!r.leading,P="maxWait"in r,h=P?Sn(oe(r.maxWait)||0,e):h,q="trailing"in r?!!r.trailing:q);function Y(xn){var ve=o,Pe=a;return o=a=i,O=xn,v=n.apply(Pe,ve),v}function W(xn){return O=xn,_=Br(rn,e),I?Y(xn):v}function Q(xn){var ve=xn-x,Pe=xn-O,Nc=e-ve;return P?Tn(Nc,h-Pe):Nc}function U(xn){var ve=xn-x,Pe=xn-O;return x===i||ve>=e||ve<0||P&&Pe>=h}function rn(){var xn=Ni();if(U(xn))return on(xn);_=Br(rn,Q(xn))}function on(xn){return _=i,q&&o?Y(xn):(o=a=i,v)}function Vn(){_!==i&&Bl(_),O=0,o=x=a=_=i}function Dn(){return _===i?v:on(Ni())}function Zn(){var xn=Ni(),ve=U(xn);if(o=arguments,a=this,x=xn,ve){if(_===i)return W(x);if(P)return Bl(_),_=Br(rn,e),Y(x)}return _===i&&(_=Br(rn,e)),v}return Zn.cancel=Vn,Zn.flush=Dn,Zn}var Xm=j(function(n,e){return ll(n,1,e)}),Wm=j(function(n,e,r){return ll(n,oe(e)||0,r)});function Um(n){return Fe(n,gn)}function Yi(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new ee(p);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],h=r.cache;if(h.has(a))return h.get(a);var v=n.apply(this,o);return r.cache=h.set(a,v)||h,v};return r.cache=new(Yi.Cache||Ie),r}Yi.Cache=Ie;function $i(n){if(typeof n!="function")throw new ee(p);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function Km(n){return mc(2,n)}var zm=Mv(function(n,e){e=e.length==1&&V(e[0])?vn(e[0],Kn(X())):vn(Fn(e,1),Kn(X()));var r=e.length;return j(function(o){for(var a=-1,h=Tn(o.length,r);++a=e}),_t=dl(function(){return arguments}())?dl:function(n){return _n(n)&&sn.call(n,"callee")&&!el.call(n,"callee")},V=S.isArray,a_=Hs?Kn(Hs):vv;function Yn(n){return n!=null&&Xi(n.length)&&!Me(n)}function bn(n){return _n(n)&&Yn(n)}function s_(n){return n===!0||n===!1||_n(n)&&Pn(n)==cr}var Ze=A0||wf,l_=Ds?Kn(Ds):mv;function c_(n){return _n(n)&&n.nodeType===1&&!Tr(n)}function h_(n){if(n==null)return!0;if(Yn(n)&&(V(n)||typeof n=="string"||typeof n.splice=="function"||Ze(n)||zt(n)||_t(n)))return!n.length;var e=Mn(n);if(e==ce||e==he)return!n.size;if(Fr(n))return!Go(n).length;for(var r in n)if(sn.call(n,r))return!1;return!0}function p_(n,e){return Or(n,e)}function g_(n,e,r){r=typeof r=="function"?r:i;var o=r?r(n,e):i;return o===i?Or(n,e,i,r):!!o}function hf(n){if(!_n(n))return!1;var e=Pn(n);return e==ei||e==Dg||typeof n.message=="string"&&typeof n.name=="string"&&!Tr(n)}function d_(n){return typeof n=="number"&&rl(n)}function Me(n){if(!mn(n))return!1;var e=Pn(n);return e==ti||e==ls||e==Hg||e==Gg}function Ac(n){return typeof n=="number"&&n==J(n)}function Xi(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Gn}function mn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function _n(n){return n!=null&&typeof n=="object"}var Sc=qs?Kn(qs):yv;function v_(n,e){return n===e||qo(n,e,ef(e))}function m_(n,e,r){return r=typeof r=="function"?r:i,qo(n,e,ef(e),r)}function __(n){return Ec(n)&&n!=+n}function y_(n){if(t1(n))throw new k(c);return vl(n)}function b_(n){return n===null}function x_(n){return n==null}function Ec(n){return typeof n=="number"||_n(n)&&Pn(n)==pr}function Tr(n){if(!_n(n)||Pn(n)!=Re)return!1;var e=vi(n);if(e===null)return!0;var r=sn.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&hi.call(r)==m0}var pf=Gs?Kn(Gs):bv;function w_(n){return Ac(n)&&n>=-Gn&&n<=Gn}var Rc=Ns?Kn(Ns):xv;function Wi(n){return typeof n=="string"||!V(n)&&_n(n)&&Pn(n)==dr}function kn(n){return typeof n=="symbol"||_n(n)&&Pn(n)==ri}var zt=Ys?Kn(Ys):wv;function A_(n){return n===i}function S_(n){return _n(n)&&Mn(n)==vr}function E_(n){return _n(n)&&Pn(n)==Yg}var R_=Li(No),O_=Li(function(n,e){return n<=e});function Oc(n){if(!n)return[];if(Yn(n))return Wi(n)?pe(n):Nn(n);if(yr&&n[yr])return u0(n[yr]());var e=Mn(n),r=e==ce?Oo:e==he?si:kt;return r(n)}function Le(n){if(!n)return n===0?n:0;if(n=oe(n),n===le||n===-le){var e=n<0?-1:1;return e*Tt}return n===n?n:0}function J(n){var e=Le(n),r=e%1;return e===e?r?e-r:e:0}function Ic(n){return n?gt(J(n),0,ye):0}function oe(n){if(typeof n=="number")return n;if(kn(n))return st;if(mn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=mn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=zs(n);var r=ad.test(n);return r||ld.test(n)?$d(n.slice(2),r?2:8):fd.test(n)?st:+n}function Cc(n){return xe(n,$n(n))}function I_(n){return n?gt(J(n),-Gn,Gn):n===0?n:0}function an(n){return n==null?"":zn(n)}var C_=Wt(function(n,e){if(Fr(e)||Yn(e)){xe(e,En(e),n);return}for(var r in e)sn.call(e,r)&&Sr(n,r,e[r])}),Fc=Wt(function(n,e){xe(e,$n(e),n)}),Ui=Wt(function(n,e,r,o){xe(e,$n(e),n,o)}),F_=Wt(function(n,e,r,o){xe(e,En(e),n,o)}),B_=Be(Mo);function T_(n,e){var r=Xt(n);return e==null?r:al(r,e)}var M_=j(function(n,e){n=ln(n);var r=-1,o=e.length,a=o>2?e[2]:i;for(a&&Hn(e[0],e[1],a)&&(o=1);++r1),h}),xe(n,jo(n),r),o&&(r=re(r,w|B|F,Wv));for(var a=e.length;a--;)Uo(r,e[a]);return r});function J_(n,e){return Tc(n,$i(X(e)))}var Q_=Be(function(n,e){return n==null?{}:Ev(n,e)});function Tc(n,e){if(n==null)return{};var r=vn(jo(n),function(o){return[o]});return e=X(e),Al(n,r,function(o,a){return e(o,a[0])})}function j_(n,e,r){e=ke(e,n);var o=-1,a=e.length;for(a||(a=1,n=i);++oe){var o=n;n=e,e=o}if(r||n%1||e%1){var a=il();return Tn(n+a*(e-n+Yd("1e-"+((a+"").length-1))),e)}return $o(n,e)}var ly=Ut(function(n,e,r){return e=e.toLowerCase(),n+(r?Pc(e):e)});function Pc(n){return vf(an(n).toLowerCase())}function Hc(n){return n=an(n),n&&n.replace(hd,n0).replace(Bd,"")}function cy(n,e,r){n=an(n),e=zn(e);var o=n.length;r=r===i?o:gt(J(r),0,o);var a=r;return r-=e.length,r>=0&&n.slice(r,a)==e}function hy(n){return n=an(n),n&&Kg.test(n)?n.replace(ps,e0):n}function py(n){return n=an(n),n&&Qg.test(n)?n.replace(so,"\\$&"):n}var gy=Ut(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),dy=Ut(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),vy=Gl("toLowerCase");function my(n,e,r){n=an(n),e=J(e);var o=e?qt(n):0;if(!e||o>=e)return n;var a=(e-o)/2;return Mi(bi(a),r)+n+Mi(yi(a),r)}function _y(n,e,r){n=an(n),e=J(e);var o=e?qt(n):0;return e&&o>>0,r?(n=an(n),n&&(typeof e=="string"||e!=null&&!pf(e))&&(e=zn(e),!e&&Dt(n))?Ve(pe(n),0,r):n.split(e,r)):[]}var Ey=Ut(function(n,e,r){return n+(r?" ":"")+vf(e)});function Ry(n,e,r){return n=an(n),r=r==null?0:gt(J(r),0,n.length),e=zn(e),n.slice(r,r+e.length)==e}function Oy(n,e,r){var o=l.templateSettings;r&&Hn(n,e,r)&&(e=i),n=an(n),e=Ui({},e,o,Kl);var a=Ui({},e.imports,o.imports,Kl),h=En(a),v=Ro(a,h),_,x,O=0,I=e.interpolate||ii,P="__p += '",q=Io((e.escape||ii).source+"|"+I.source+"|"+(I===gs?od:ii).source+"|"+(e.evaluate||ii).source+"|$","g"),Y="//# sourceURL="+(sn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Hd+"]")+` +`;n.replace(q,function(U,rn,on,Vn,Dn,Zn){return on||(on=Vn),P+=n.slice(O,Zn).replace(pd,t0),rn&&(_=!0,P+=`' + +__e(`+rn+`) + +'`),Dn&&(x=!0,P+=`'; +`+Dn+`; +__p += '`),on&&(P+=`' + +((__t = (`+on+`)) == null ? '' : __t) + +'`),O=Zn+U.length,U}),P+=`'; +`;var W=sn.call(e,"variable")&&e.variable;if(!W)P=`with (obj) { +`+P+` +} +`;else if(id.test(W))throw new k(g);P=(x?P.replace($g,""):P).replace(Xg,"$1").replace(Wg,"$1;"),P="function("+(W||"obj")+`) { +`+(W?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(_?", __e = _.escape":"")+(x?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+P+`return __p +}`;var Q=qc(function(){return fn(h,Y+"return "+P).apply(i,v)});if(Q.source=P,hf(Q))throw Q;return Q}function Iy(n){return an(n).toLowerCase()}function Cy(n){return an(n).toUpperCase()}function Fy(n,e,r){if(n=an(n),n&&(r||e===i))return zs(n);if(!n||!(e=zn(e)))return n;var o=pe(n),a=pe(e),h=ks(o,a),v=Vs(o,a)+1;return Ve(o,h,v).join("")}function By(n,e,r){if(n=an(n),n&&(r||e===i))return n.slice(0,Js(n)+1);if(!n||!(e=zn(e)))return n;var o=pe(n),a=Vs(o,pe(e))+1;return Ve(o,0,a).join("")}function Ty(n,e,r){if(n=an(n),n&&(r||e===i))return n.replace(lo,"");if(!n||!(e=zn(e)))return n;var o=pe(n),a=ks(o,pe(e));return Ve(o,a).join("")}function My(n,e){var r=Wn,o=se;if(mn(e)){var a="separator"in e?e.separator:a;r="length"in e?J(e.length):r,o="omission"in e?zn(e.omission):o}n=an(n);var h=n.length;if(Dt(n)){var v=pe(n);h=v.length}if(r>=h)return n;var _=r-qt(o);if(_<1)return o;var x=v?Ve(v,0,_).join(""):n.slice(0,_);if(a===i)return x+o;if(v&&(_+=x.length-_),pf(a)){if(n.slice(_).search(a)){var O,I=x;for(a.global||(a=Io(a.source,an(ds.exec(a))+"g")),a.lastIndex=0;O=a.exec(I);)var P=O.index;x=x.slice(0,P===i?_:P)}}else if(n.indexOf(zn(a),_)!=_){var q=x.lastIndexOf(a);q>-1&&(x=x.slice(0,q))}return x+o}function Ly(n){return n=an(n),n&&Ug.test(n)?n.replace(hs,s0):n}var Py=Ut(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),vf=Gl("toUpperCase");function Dc(n,e,r){return n=an(n),e=r?i:e,e===i?i0(n)?h0(n):Vd(n):n.match(e)||[]}var qc=j(function(n,e){try{return Un(n,i,e)}catch(r){return hf(r)?r:new k(r)}}),Hy=Be(function(n,e){return ne(e,function(r){r=we(r),Ce(n,r,lf(n[r],n))}),n});function Dy(n){var e=n==null?0:n.length,r=X();return n=e?vn(n,function(o){if(typeof o[1]!="function")throw new ee(p);return[r(o[0]),o[1]]}):[],j(function(o){for(var a=-1;++aGn)return[];var r=ye,o=Tn(n,ye);e=X(e),n-=ye;for(var a=Eo(o,e);++r0||e<0)?new un(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==i&&(e=J(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},un.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},un.prototype.toArray=function(){return this.take(ye)},be(un.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),a=l[o?"take"+(e=="last"?"Right":""):e],h=o||/^find/.test(e);a&&(l.prototype[e]=function(){var v=this.__wrapped__,_=o?[1]:arguments,x=v instanceof un,O=_[0],I=x||V(v),P=function(rn){var on=a.apply(l,Xe([rn],_));return o&&q?on[0]:on};I&&r&&typeof O=="function"&&O.length!=1&&(x=I=!1);var q=this.__chain__,Y=!!this.__actions__.length,W=h&&!q,Q=x&&!Y;if(!h&&I){v=Q?v:new un(this);var U=n.apply(v,_);return U.__actions__.push({func:qi,args:[P],thisArg:i}),new te(U,q)}return W&&Q?n.apply(this,_):(U=this.thru(P),W?o?U.value()[0]:U.value():U)})}),ne(["pop","push","shift","sort","splice","unshift"],function(n){var e=li[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",o=/^(?:pop|shift)$/.test(n);l.prototype[n]=function(){var a=arguments;if(o&&!this.__chain__){var h=this.value();return e.apply(V(h)?h:[],a)}return this[r](function(v){return e.apply(V(v)?v:[],a)})}}),be(un.prototype,function(n,e){var r=l[e];if(r){var o=r.name+"";sn.call($t,o)||($t[o]=[]),$t[o].push({name:e,func:r})}}),$t[Bi(i,T).name]=[{name:"wrapper",func:i}],un.prototype.clone=L0,un.prototype.reverse=P0,un.prototype.value=H0,l.prototype.at=cm,l.prototype.chain=hm,l.prototype.commit=pm,l.prototype.next=gm,l.prototype.plant=vm,l.prototype.reverse=mm,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=_m,l.prototype.first=l.prototype.head,yr&&(l.prototype[yr]=dm),l},Gt=p0();lt?((lt.exports=Gt)._=Gt,mo._=Gt):Cn._=Gt}).call(cn)}(Lr,Lr.exports);var hn=Lr.exports,Kc=function(){},zc=Kc(),Qe=function(t){return t!==zc&&t!==null},kc=Qe,Vc=Array.prototype.forEach,Zc=Object.create,Jc=function(t,u){var i;for(i in t)u[i]=t[i]},Sf=function(t){var u=Zc(null);return Vc.call(arguments,function(i){kc(i)&&Jc(Object(i),u)}),u},Qc=function(){var t=Math.sign;return typeof t!="function"?!1:t(10)===1&&t(-20)===-1},zi,Ef;function jc(){return Ef||(Ef=1,zi=function(t){return t=Number(t),isNaN(t)||t===0?t:t>0?1:-1}),zi}var nh=Qc()?Math.sign:jc(),eh=nh,th=Math.abs,rh=Math.floor,ih=function(t){return isNaN(t)?0:(t=Number(t),t===0||!isFinite(t)?t:eh(t)*rh(th(t)))},uh=ih,oh=Math.max,je=function(t){return oh(0,uh(t))},fh=je,Rf=function(t,u,i){var f;return isNaN(t)?(f=u,f>=0?i&&f?f-1:f:1):t===!1?!1:fh(t)},He=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");return t},ah=Qe,yt=function(t){if(!ah(t))throw new TypeError("Cannot use null or undefined");return t},sh=He,lh=yt,ch=Function.prototype.bind,Of=Function.prototype.call,hh=Object.keys,ph=Object.prototype.propertyIsEnumerable,gh=function(t,u){return function(i,f){var s,c=arguments[2],p=arguments[3];return i=Object(lh(i)),sh(f),s=hh(i),p&&s.sort(typeof p=="function"?ch.call(p,i):void 0),typeof t!="function"&&(t=s[t]),Of.call(t,s,function(g,m){return ph.call(i,g)?Of.call(f,c,i[g],g,i,m):u})}},Pr=gh("forEach"),nt={},If={exports:{}},dh=function(){var t=Object.assign,u;return typeof t!="function"?!1:(u={foo:"raz"},t(u,{bar:"dwa"},{trzy:"trzy"}),u.foo+u.bar+u.trzy==="razdwatrzy")},ki,Cf;function vh(){return Cf||(Cf=1,ki=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),ki}var Vi,Ff;function mh(){if(Ff)return Vi;Ff=1;var t=Qe,u=Object.keys;return Vi=function(i){return u(t(i)?Object(i):i)},Vi}var Zi,Bf;function _h(){return Bf||(Bf=1,Zi=vh()()?Object.keys:mh()),Zi}var Ji,Tf;function yh(){if(Tf)return Ji;Tf=1;var t=_h(),u=yt,i=Math.max;return Ji=function(f,s){var c,p,g=i(arguments.length,2),m;for(f=Object(u(f)),m=function(d){try{f[d]=s[d]}catch(y){c||(c=y)}},p=1;p-1},tu}var qh=Hh()?String.prototype.contains:Dh(),Hr=Xf,Uf=Ph,Kf=Mf,zf=Sf,Vt=qh,Gh=$f.exports=function(t,u){var i,f,s,c,p;return arguments.length<2||typeof t!="string"?(c=u,u=t,t=null):c=arguments[2],Hr(t)?(i=Vt.call(t,"c"),f=Vt.call(t,"e"),s=Vt.call(t,"w")):(i=s=!0,f=!1),p={value:u,configurable:i,enumerable:f,writable:s},c?Kf(zf(c),p):p};Gh.gs=function(t,u,i){var f,s,c,p;return typeof t!="string"?(c=i,i=u,u=t,t=null):c=arguments[3],Hr(u)?Uf(u)?Hr(i)?Uf(i)||(c=i,i=void 0):i=void 0:(c=u,u=i=void 0):u=void 0,Hr(t)?(f=Vt.call(t,"c"),s=Vt.call(t,"e")):(f=!0,s=!1),p={get:u,set:i,configurable:f,enumerable:s},c?Kf(zf(c),p):p};var et=$f.exports,ru={exports:{}};(function(t,u){var i=et,f=He,s=Function.prototype.apply,c=Function.prototype.call,p=Object.create,g=Object.defineProperty,m=Object.defineProperties,d=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0},w,B,F,M,H,E,T;w=function(C,A){var L;return f(A),d.call(this,"__ee__")?L=this.__ee__:(L=y.value=p(null),g(this,"__ee__",y),y.value=null),L[C]?typeof L[C]=="object"?L[C].push(A):L[C]=[L[C],A]:L[C]=A,this},B=function(C,A){var L,D;return f(A),D=this,w.call(this,C,L=function(){F.call(D,C,L),s.call(A,this,arguments)}),L.__eeOnceListener__=A,this},F=function(C,A){var L,D,N,K;if(f(A),!d.call(this,"__ee__"))return this;if(L=this.__ee__,!L[C])return this;if(D=L[C],typeof D=="object")for(K=0;N=D[K];++K)(N===A||N.__eeOnceListener__===A)&&(D.length===2?L[C]=D[K?0:1]:D.splice(K,1));else(D===A||D.__eeOnceListener__===A)&&delete L[C];return this},M=function(C){var A,L,D,N,K;if(d.call(this,"__ee__")&&(N=this.__ee__[C],!!N))if(typeof N=="object"){for(L=arguments.length,K=new Array(L-1),A=1;A=55296&&L<=56319&&(Z+=B[++E])),Z=F?d.call(F,M,Z,T):Z,H?(y.value=Z,w(C,T,y)):C[T]=Z,++T;A=T}}if(A===void 0)for(A=f(B.length),H&&(C=new H(A)),E=0;E=0?y=p(y):y=u(this.length)-p(c(y)),m=y;m"}},Yu}var $u,Da;function Lp(){if(Da)return $u;Da=1;var t=Mp(),u=/[\n\r\u2028\u2029]/g;return $u=function(i){var f=t(i);return f.length>100&&(f=f.slice(0,99)+"…"),f=f.replace(u,function(s){return JSON.stringify(s).slice(1,-1)}),f},$u}var Yr={exports:{}},qa;function Ga(){if(qa)return Yr.exports;qa=1,Yr.exports=t,Yr.exports.default=t;function t(u){return!!u&&(typeof u=="object"||typeof u=="function")&&typeof u.then=="function"}return Yr.exports}var Na;function Pp(){if(Na)return Fa;Na=1;var t=Oa(),u=Fp(),i=Tp(),f=Lp(),s=Ga(),c=Hu(),p=Object.create,g=u("then","then:finally","done","done:finally");return nt.promise=function(m,d){var y=p(null),w=p(null),B=p(null);if(m===!0)m=null;else if(m=i(m),!g[m])throw new TypeError("'"+f(m)+"' is not valid promise mode");d.on("set",function(F,M,H){var E=!1;if(!s(H)){w[F]=H,d.emit("setasync",F,1);return}y[F]=1,B[F]=H;var T=function(D){var N=y[F];if(E)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) +Consider to rely on 'then' or 'done' mode instead.`);N&&(delete y[F],w[F]=D,d.emit("setasync",F,N))},C=function(){E=!0,y[F]&&(delete y[F],delete B[F],d.delete(F))},A=m;if(A||(A="then"),A==="then"){var L=function(){c(C)};H=H.then(function(D){c(T.bind(this,D))},L),typeof H.finally=="function"&&H.finally(L)}else if(A==="done"){if(typeof H.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");H.done(T,C)}else if(A==="done:finally"){if(typeof H.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof H.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");H.done(T),H.finally(C)}}),d.on("get",function(F,M,H){var E;if(y[F]){++y[F];return}E=B[F];var T=function(){d.emit("getasync",F,M,H)};s(E)?typeof E.done=="function"?E.done(T):E.then(function(){c(T)}):T()}),d.on("delete",function(F){if(delete B[F],y[F]){delete y[F];return}if(hasOwnProperty.call(w,F)){var M=w[F];delete w[F],d.emit("deleteasync",F,[M])}}),d.on("clear",function(){var F=w;w=p(null),y=p(null),B=p(null),d.emit("clearasync",t(F,function(M){return[M]}))})},Fa}var Ya={},$a;function Hp(){if($a)return Ya;$a=1;var t=He,u=Pr,i=nt,f=Function.prototype.apply;return i.dispose=function(s,c,p){var g;if(t(s),p.async&&i.async||p.promise&&i.promise){c.on("deleteasync",g=function(m,d){f.call(s,null,d)}),c.on("clearasync",function(m){u(m,function(d,y){g(y,d)})});return}c.on("delete",g=function(m,d){s(d)}),c.on("clear",function(m){u(m,function(d,y){g(y,d)})})},Ya}var Xa={},Xu,Wa;function Dp(){return Wa||(Wa=1,Xu=2147483647),Xu}var Wu,Ua;function qp(){if(Ua)return Wu;Ua=1;var t=je,u=Dp();return Wu=function(i){if(i=t(i),i>u)throw new TypeError(i+" exceeds maximum possible timeout");return i},Wu}var Ka;function Gp(){if(Ka)return Xa;Ka=1;var t=xu(),u=Pr,i=Hu(),f=Ga(),s=qp(),c=nt,p=Function.prototype,g=Math.max,m=Math.min,d=Object.create;return c.maxAge=function(y,w,B){var F,M,H,E;y=s(y),y&&(F=d(null),M=B.async&&c.async||B.promise&&c.promise?"async":"",w.on("set"+M,function(T){F[T]=setTimeout(function(){w.delete(T)},y),typeof F[T].unref=="function"&&F[T].unref(),E&&(E[T]&&E[T]!=="nextTick"&&clearTimeout(E[T]),E[T]=setTimeout(function(){delete E[T]},H),typeof E[T].unref=="function"&&E[T].unref())}),w.on("delete"+M,function(T){clearTimeout(F[T]),delete F[T],E&&(E[T]!=="nextTick"&&clearTimeout(E[T]),delete E[T])}),B.preFetch&&(B.preFetch===!0||isNaN(B.preFetch)?H=.333:H=g(m(Number(B.preFetch),1),0),H&&(E={},H=(1-H)*y,w.on("get"+M,function(T,C,A){E[T]||(E[T]="nextTick",i(function(){var L;E[T]==="nextTick"&&(delete E[T],w.delete(T),B.async&&(C=t(C),C.push(p)),L=w.memoized.apply(A,C),B.promise&&f(L)&&(typeof L.done=="function"?L.done(p,p):L.then(p,p)))}))}))),w.on("clear"+M,function(){u(F,function(T){clearTimeout(T)}),F={},E&&(u(E,function(T){T!=="nextTick"&&clearTimeout(T)}),E={})}))},Xa}var za={},Uu,ka;function Np(){if(ka)return Uu;ka=1;var t=je,u=Object.create,i=Object.prototype.hasOwnProperty;return Uu=function(f){var s=0,c=1,p=u(null),g=u(null),m=0,d;return f=t(f),{hit:function(y){var w=g[y],B=++m;if(p[B]=y,g[y]=B,!w)return++s,s<=f?void 0:(y=p[c],d(y),y);if(delete p[w],c===w)for(;!i.call(p,++c););},delete:d=function(y){var w=g[y];if(w&&(delete p[w],delete g[y],--s,c===w)){if(!s){m=0,c=1;return}for(;!i.call(p,++c););}},clear:function(){s=0,c=1,p=u(null),g=u(null),m=0}}},Uu}var Va;function Yp(){if(Va)return za;Va=1;var t=je,u=Np(),i=nt;return i.max=function(f,s,c){var p,g,m;f=t(f),f&&(g=u(f),p=c.async&&i.async||c.promise&&i.promise?"async":"",s.on("set"+p,m=function(d){d=g.hit(d),d!==void 0&&s.delete(d)}),s.on("get"+p,m),s.on("delete"+p,g.delete),s.on("clear"+p,g.clear))},za}var Za={},Ja;function $p(){if(Ja)return Za;Ja=1;var t=et,u=nt,i=Object.create,f=Object.defineProperties;return u.refCounter=function(s,c,p){var g,m;g=i(null),m=p.async&&u.async||p.promise&&u.promise?"async":"",c.on("set"+m,function(d,y){g[d]=y||1}),c.on("get"+m,function(d){++g[d]}),c.on("delete"+m,function(d){delete g[d]}),c.on("clear"+m,function(){g={}}),f(c.memoized,{deleteRef:t(function(){var d=c.get(arguments);return d===null||!g[d]?null:--g[d]?!1:(c.delete(d),!0)}),getRefCount:t(function(){var d=c.get(arguments);return d===null||!g[d]?0:g[d]})})},Za}var Xp=Sf,Wp=Rf,Up=bp,Kp=function(t){var u=Xp(arguments[1]),i;return u.normalizer||(i=u.length=Wp(u.length,t.length,u.async),i!==0&&(u.primitive?i===!1?u.normalizer=xp():i>1&&(u.normalizer=wp()(i)):i===!1?u.normalizer=Rp()():i===1?u.normalizer=Op()():u.normalizer=Ip()(i))),u.async&&Cp(),u.promise&&Pp(),u.dispose&&Hp(),u.maxAge&&Gp(),u.max&&Yp(),u.refCounter&&$p(),Up(t,u)},zp=wn(Kp);function kp(t,u,i,f,s){Qa(t,u,i||0,f||t.length-1,s||Vp)}function Qa(t,u,i,f,s){for(;f>i;){if(f-i>600){var c=f-i+1,p=u-i+1,g=Math.log(c),m=.5*Math.exp(2*g/3),d=.5*Math.sqrt(g*m*(c-m)/c)*(p-c/2<0?-1:1),y=Math.max(i,Math.floor(u-p*m/c+d)),w=Math.min(f,Math.floor(u+(c-p)*m/c+d));Qa(t,u,y,w,s)}var B=t[u],F=i,M=f;for(Jt(t,i,u),s(t[f],B)>0&&Jt(t,i,f);F0;)M--}s(t[i],B)===0?Jt(t,i,M):(M++,Jt(t,M,f)),M<=u&&(i=M+1),u<=M&&(f=M-1)}}function Jt(t,u,i){var f=t[u];t[u]=t[i],t[i]=f}function Vp(t,u){return tu?1:0}class Zp{constructor(u=9){this._maxEntries=Math.max(4,u),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(u){let i=this.data;const f=[];if(!Xr(u,i))return f;const s=this.toBBox,c=[];for(;i;){for(let p=0;p=0&&c[i].children.length>this._maxEntries;)this._split(c,i),i--;this._adjustParentBBoxes(s,c,i)}_split(u,i){const f=u[i],s=f.children.length,c=this._minEntries;this._chooseSplitAxis(f,c,s);const p=this._chooseSplitIndex(f,c,s),g=xt(f.children.splice(p,f.children.length-p));g.height=f.height,g.leaf=f.leaf,bt(f,this.toBBox),bt(g,this.toBBox),i?u[i-1].children.push(g):this._splitRoot(f,g)}_splitRoot(u,i){this.data=xt([u,i]),this.data.height=u.height+1,this.data.leaf=!1,bt(this.data,this.toBBox)}_chooseSplitIndex(u,i,f){let s,c=1/0,p=1/0;for(let g=i;g<=f-i;g++){const m=Qt(u,0,g,this.toBBox),d=Qt(u,g,f,this.toBBox),y=eg(m,d),w=Ku(m)+Ku(d);y=i;d--){const y=u.children[d];jt(g,u.leaf?c(y):y),m+=$r(g)}return m}_adjustParentBBoxes(u,i,f){for(let s=f;s>=0;s--)jt(i[s],u)}_condense(u){for(let i=u.length-1,f;i>=0;i--)u[i].children.length===0?i>0?(f=u[i-1].children,f.splice(f.indexOf(u[i]),1)):this.clear():bt(u[i],this.toBBox)}}function Jp(t,u,i){if(!i)return u.indexOf(t);for(let f=0;f=t.minX&&u.maxY>=t.minY}function xt(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ja(t,u,i,f,s){const c=[u,i];for(;c.length;){if(i=c.pop(),u=c.pop(),i-u<=f)continue;const p=u+Math.ceil((i-u)/f/2)*f;kp(t,p,u,i,s),c.push(u,p,p,i)}}class tg extends Zp{toBBox(u){return{minX:u.left,minY:u.top,maxX:u.right,maxY:u.bottom}}compareMinX(u,i){return u.left-i.left}compareMinY(u,i){return u.top-i.top}}const rg={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:1e3/60,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:2,minScale:1,dtMax:1.5,dtMin:1.1}};var ns={exports:{}};(function(t){var u=Object.prototype.hasOwnProperty,i="~";function f(){}Object.create&&(f.prototype=Object.create(null),new f().__proto__||(i=!1));function s(m,d,y){this.fn=m,this.context=d,this.once=y||!1}function c(m,d,y,w,B){if(typeof y!="function")throw new TypeError("The listener must be a function");var F=new s(y,w||m,B),M=i?i+d:d;return m._events[M]?m._events[M].fn?m._events[M]=[m._events[M],F]:m._events[M].push(F):(m._events[M]=F,m._eventsCount++),m}function p(m,d){--m._eventsCount===0?m._events=new f:delete m._events[d]}function g(){this._events=new f,this._eventsCount=0}g.prototype.eventNames=function(){var d=[],y,w;if(this._eventsCount===0)return d;for(w in y=this._events)u.call(y,w)&&d.push(i?w.slice(1):w);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(y)):d},g.prototype.listeners=function(d){var y=i?i+d:d,w=this._events[y];if(!w)return[];if(w.fn)return[w.fn];for(var B=0,F=w.length,M=new Array(F);B=6&&(i-=6),$(i<1?255*((u-t)*i+t):i<3?255*u:i<4?255*((u-t)*(4-i)+t):255*t)},On=function(t,u,i){u/=100;var f=(i/=100)<=.5?i*(u+1):i+u-i*u,s=2*i-f;return{r:Ju(s,f,(t/=60)+2),g:Ju(s,f,t),b:Ju(s,f,t-2)}},Qu=function(t,u,i,f){return{r:$(255*(1-t)*(f=1-f)),g:$(255*(1-u)*f),b:$(255*(1-i)*f)}},rs=function(t,u,i){t/=255,u/=255,i/=255;var f=1-Math.max(t,u,i),s=1-f,c=s&&(s-u)/s,p=s&&(s-i)/s;return{c:$(100*(s&&(s-t)/s)),m:$(100*c),y:$(100*p),k:$(100*f)}},At=function(t,u,i,f){f===void 0&&(f=1),t/=255,u/=255,i/=255,f=Math.min(f,1);var s=Math.max(t,u,i),c=Math.min(t,u,i),p=s-c,g=0,m=0,d=(s+c)/2;if(p!==0){switch(s){case t:g=(u-i)/p%6;break;case u:g=(i-t)/p+2;break;case i:g=(t-u)/p+4}(g=$(60*g))<0&&(g+=360),m=p/(1-Math.abs(2*d-1))}return{h:g,s:$(100*m),l:$(100*d),a:f}},is=function(t,u){if(t<0&&(t+=360),t>360&&(t-=360),t===360||t===0)return t;var i=[[0,120],[120,180],[180,240],[240,360]],f=[[0,60],[60,120],[120,240],[240,360]],s=u?f:i,c=0,p=0,g=0,m=0;return(u?i:f).find(function(d,y){return t>=d[0]&&t360||t<0)&&(t-=360*Math.floor(t/360)),t},Ln=function(t){return typeof t=="string"&&(t=wt.test(t)?Ur(t)/100:+t),isNaN(+t)||t>1?1:$(t)},St=function(t,u,i){return u.reduce(function(f,s){return ku(ku([],f,!0),[en(en({},t),{h:i===qn.ADDITIVE?ur(t.h+s):ur(is(is(t.h,!1)+s,!0))})],!1)},[en({},t)])},hg=function(t,u){return St(t,[30,-30],u)},pg=function(t,u){return St(t,[180],u)},gg=function(t,u){return St(t,[150,-150],u)},dg=function(t,u){return St(t,[120,-120],u)},vg=function(t,u){return St(t,[60,-120,180],u)},mg=function(t,u){return St(t,[90,-90,180],u)},Jn=function(t){return typeof t=="string"?function(u){var i;if(Object.keys(z).some(function(f){if(ir[f].test(u))return i=f,!0}),!i&&~es.indexOf(u)&&(i=z.HEX),!i)throw new Error(lg);return i}(t):function(u){var i,f=!1,s=ts(Object.keys(u));if(Vu[s]&&(i=Vu[s]),i&&i===z.RGB){var c=Object.entries(u).some(function(g){return!Zu.test("".concat(g[1]))}),p=Object.entries(u).some(function(g){return!(wt.test("".concat(g[1]))||!Zu.test("".concat(g[1]))&&!isNaN(+g[1])&&+g[1]<=255)});c&&p&&(f=!0),c||(i=z.HEX)}if(!i||f)throw new Error(cg);return i}(t)},_g=((tr={})[z.HEX]=function(t){var u=(~es.indexOf(t)?Wr[t]:t).match(ir.HEX),i={r:zr(u[1]||u[5]),g:zr(u[2]||u[6]),b:zr(u[3]||u[7])},f=u[4]||u[8];return f!==void 0&&(i.a=zr(f)/255),i},tr[z.RGB]=function(t){var u=t.match(ir.RGB),i=it(u[1]||u[5]),f=it(u[2]||u[6]),s=it(u[3]||u[7]),c=u[4]||u[8],p={r:Math.min(i,255),g:Math.min(f,255),b:Math.min(s,255)};return c!==void 0&&(p.a=Ln(c)),p},tr[z.HSL]=function(t){var u=t.match(ir.HSL),i=ur(u[1]||u[5]),f=Kr(u[2]||u[6]),s=Kr(u[3]||u[7]),c=u[4]||u[8],p=On(i,f,s);return c!==void 0&&(p.a=Ln(c)),p},tr[z.CMYK]=function(t){var u=t.match(ir.CMYK),i=De(u[1]||u[6]),f=De(u[2]||u[7]),s=De(u[3]||u[8]),c=De(u[4]||u[9]),p=u[5]||u[10],g=Qu(i,f,s,c);return p!==void 0&&(g.a=Ln(p)),g},tr),yg=((rr={})[z.HEX]=function(t){var u={r:it("".concat(t.r)),g:it("".concat(t.g)),b:it("".concat(t.b))};return Bn(t,"a")&&(u.a=Math.min(it("".concat(t.a),!0),1)),u},rr[z.RGB]=function(t){return this.HEX(t)},rr[z.HSL]=function(t){var u=Kr("".concat(t.s)),i=Kr("".concat(t.l)),f=On(ur(t.h),u,i);return Bn(t,"a")&&(f.a=Ln(t.a)),f},rr[z.CMYK]=function(t){var u=De("".concat(t.c)),i=De("".concat(t.m)),f=De("".concat(t.y)),s=De("".concat(t.k)),c=Qu(u,i,f,s);return Bn(t,"a")&&(c.a=Ln(t.a)),c},rr),ut=function(t,u){return u===void 0&&(u=Jn(t)),typeof t=="string"?_g[u](t):yg[u](t)},tn=((Ee={})[z.HEX]=function(t){return{r:kr(t.r),g:kr(t.g),b:kr(t.b)}},Ee.HEXA=function(t){var u=tn.HEX(t);return u.a=Bn(t,"a")?kr(255*t.a):"0xFF",u},Ee[z.RGB]=function(t,u){return Bn(t,"a")&&delete t.a,ot(t,u)},Ee.RGBA=function(t,u){return t.a=Bn(t,"a")?$(t.a):1,ot(t,u)},Ee[z.HSL]=function(t,u){var i=At(t.r,t.g,t.b);return delete i.a,Ot(i,u)},Ee.HSLA=function(t,u){var i=tn.HSL(t,u);return i.a=Bn(t,"a")?$(t.a,u):1,i},Ee[z.CMYK]=function(t,u){return bg(rs(t.r,t.g,t.b),u)},Ee.CMYKA=function(t,u){var i=tn.CMYK(t,u);return i.a=Bn(t,"a")?$(t.a,u):1,i},Ee),us=function(t,u,i,f){var s=Jn(t),c=typeof t=="string",p=ut(t,s),g=typeof t=="string"&&Bn(p,"a")||typeof t!="string"&&Bn(t,"a"),m=At(p.r,p.g,p.b,p.a);g||delete m.a;var d=i?m.l/(u+1):(100-m.l)/(u+1),y=Array(u).fill(null).map(function(w,B){return en(en({},m),{l:m.l+d*(B+1)*(1-2*+i)})});switch(s){case z.HEX:default:return y.map(function(w){var B=On(w.h,w.s,w.l);return g&&(B.a=w.a),c?g?nn.HEX(ot(en(en({},B),{a:$(255*B.a)}),f)):nn.HEX(ot(B,f)):g?tn.HEXA(B):tn.HEX(B)});case z.RGB:return y.map(function(w){var B=On(w.h,w.s,w.l);return g&&(B.a=w.a),c?nn.RGB(ot(B,f)):g?tn.RGBA(B,f):tn.RGB(B,f)});case z.HSL:return y.map(function(w){return c?nn.HSL(Ot(w,f)):g?tn.HSLA(en(en({},On(w.h,w.s,w.l)),{a:w.a}),f):tn.HSL(On(w.h,w.s,w.l),f)})}},Et=((tt={buildHarmony:function(t,u,i,f){var s=Jn(t),c=ut(t,s),p=At(c.r,c.g,c.b,c.a),g=typeof t=="string"&&Bn(c,"a")||typeof t!="string"&&Bn(t,"a"),m=typeof t=="string";switch(s){case z.HEX:default:return g?this.HEXA(Ot(p,0),u,i,m):this.HEX(Ot(p,0),u,i,m);case z.HSL:return g?this.HSLA(p,u,i,m,f):this.HSL(p,u,i,m,f);case z.RGB:return g?this.RGBA(p,u,i,m,f):this.RGB(p,u,i,m,f)}}})[z.HEX]=function(t,u,i,f){return u(t,i).map(function(s){return f?nn.HEX(On(s.h,s.s,s.l)):tn.HEX(On(s.h,s.s,s.l))})},tt.HEXA=function(t,u,i,f){return u(t,i).map(function(s){return f?nn.HEX(en(en({},On(s.h,s.s,s.l)),{a:255*Ln(s.a)})):tn.HEXA(en(en({},On(s.h,s.s,s.l)),{a:Ln(s.a)}))})},tt[z.RGB]=function(t,u,i,f,s){return u(t,i).map(function(c){return f?nn.RGB(ot(On(c.h,c.s,c.l),s)):tn.RGB(On(c.h,c.s,c.l),s)})},tt.RGBA=function(t,u,i,f,s){return u(t,i).map(function(c){return f?nn.RGB(ot(en(en({},On(c.h,c.s,c.l)),{a:Ln(c.a)}),s)):tn.RGBA(en(en({},On(c.h,c.s,c.l)),{a:Ln(c.a)}),s)})},tt[z.HSL]=function(t,u,i,f,s){return u(t,i).map(function(c){return f?nn.HSL(Ot({h:c.h,s:c.s,l:c.l},s)):tn.HSL(On(c.h,c.s,c.l),s)})},tt.HSLA=function(t,u,i,f,s){return u(t,i).map(function(c){return f?nn.HSL(Ot(en(en({},c),{a:Ln(c.a)}),s)):tn.HSLA(en(en({},On(c.h,c.s,c.l)),{a:Ln(c.a)}),s)})},tt),Rt=((rt={mix:function(t,u){var i,f,s,c,p,g,m,d,y,w,B,F,M,H,E,T=t.map(function(D){var N=Jn(D);return ut(D,N)}),C=u===qn.SUBTRACTIVE?T.map(function(D){var N,K,Z,gn,Wn,se,_e,ar,at,sr,lr,le,Gn,Tt,st=(N=D.r,K=D.g,Z=D.b,gn=Math.min(N,K,Z),Wn=Math.min(255-N,255-K,255-Z),se=N-gn,_e=K-gn,ar=Z-gn,at=Math.min(se,_e),sr=se-at,lr=(_e+at)/2,le=(ar+_e-at)/2,Gn=Math.max(sr,lr,le)/Math.max(se,_e,ar),Tt=isNaN(Gn)||Gn===1/0||Gn<=0?1:Gn,{r:sr/Tt+Wn,y:lr/Tt+Wn,b:le/Tt+Wn});return Bn(D,"a")&&(st.a=D.a),st}):null;function A(D){var N=u===qn.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return D.reduce(function(K,Z){var gn=Bn(Z,"a")?Z.a:1,Wn={r:Math.min(K.r+Z.r*gn,255),b:Math.min(K.b+Z.b*gn,255),a:1-(1-gn)*(1-K.a)},se="g"in K?K.g:K.y,_e="g"in Z?Z.g:Z.y;return en(en({},Wn),u===qn.ADDITIVE?{g:Math.min(se+_e*gn,255)}:{y:Math.min(se+_e*gn,255)})},N)}if(u===qn.ADDITIVE)i=A(T);else{var L=A(C);f=L.r,s=L.y,c=L.b,p=Math.min(f,s,c),g=Math.min(255-f,255-s,255-c),m=f-p,d=s-p,y=c-p,w=Math.min(d,y),B=m+d-w,F=d+w,M=2*(y-w),H=Math.max(B,F,M)/Math.max(m,d,y),E=isNaN(H)||H===1/0||H<=0?1:H,(i={r:B/E+g,g:F/E+g,b:M/E+g}).a=L.a}return{r:$(i.r),g:$(i.g),b:$(i.b),a:ae(i.a,0,1)}}})[z.HEX]=function(t,u,i){var f=this.mix(t,u);return delete f.a,i?nn.HEX(f):tn.HEX(f)},rt.HEXA=function(t,u,i){var f=this.mix(t,u);return f.a=i?255*Ln(f.a):Ln(f.a),i?nn.HEX(f):tn.HEXA(f)},rt[z.RGB]=function(t,u,i,f){var s=this.mix(t,u);return delete s.a,i?nn.RGB(s):tn.RGB(s,f)},rt.RGBA=function(t,u,i,f){var s=this.mix(t,u);return i?nn.RGB(s):tn.RGBA(s,f)},rt[z.HSL]=function(t,u,i,f){var s=this.mix(t,u),c=At(s.r,s.g,s.b);return delete s.a,delete c.a,i?nn.HSL(c):tn.HSL(s,f)},rt.HSLA=function(t,u,i,f){var s=this.mix(t,u),c=At(s.r,s.g,s.b,s.a);return i?nn.HSL(c):tn.HSLA(s,f)},rt),ot=function(t,u){return en({r:$(t.r,u),g:$(t.g,u),b:$(t.b,u)},Bn(t,"a")?{a:$(t.a,u)}:{})},Ot=function(t,u){return en({h:$(t.h,u),s:$(t.s,u),l:$(t.l,u)},Bn(t,"a")?{a:$(t.a,u)}:{})},bg=function(t,u){return{c:$(t.c,u),m:$(t.m,u),y:$(t.y,u),k:$(t.k,u)}},qe=function(t,u,i,f,s,c){var p=s(ut(t,u),f);return i?c(p):p},It=function(t,u,i,f,s,c,p){i<1&&(i=5);var g=function(m,d,y){var w=y-1,B=(d.r-m.r)/w,F=(d.g-m.g)/w,M=(d.b-m.b)/w,H=Ln(m.a),E=(Ln(d.a)-H)/w;return Array(y).fill(null).map(function(T,C){return C===0?m:C===w?d:{r:$(m.r+B*C),g:$(m.g+F*C),b:$(m.b+M*C),a:$(H+E*C)}})}(ut(t),ut(u),i);return g.map(function(m){var d=c(m,s);return f?p(d):d})},xg=function(){function t(u,i){i===void 0&&(i=6),this.rgb=ut(u),this._decimals=i,this.updateHSL(),this.updateCMYK()}return t.prototype.updateRGB=function(){this.rgb=en(en({},On(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},t.prototype.updateRGBFromCMYK=function(){this.rgb=en(en({},Qu(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},t.prototype.updateHSL=function(){this.hsl=At(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},t.prototype.updateCMYK=function(){this.cmyk=rs(this.rgb.r,this.rgb.g,this.rgb.b)},t.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},t.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},t.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},t.prototype.setDecimals=function(u){return this._decimals=u,this},t.prototype.setH=function(u){return this.hsl.h=ur(u),this.updateRGBAndCMYK()},t.prototype.setS=function(u){return this.hsl.s=ae(u,0,100),this.updateRGBAndCMYK()},t.prototype.setL=function(u){return this.hsl.l=ae(u,0,100),this.updateRGBAndCMYK()},t.prototype.setR=function(u){return this.rgb.r=ae(u,0,255),this.updateHSLAndCMYK()},t.prototype.setG=function(u){return this.rgb.g=ae(u,0,255),this.updateHSLAndCMYK()},t.prototype.setB=function(u){return this.rgb.b=ae(u,0,255),this.updateHSLAndCMYK()},t.prototype.setA=function(u){return this.hsl.a=this.rgb.a=ae(u,0,1),this},t.prototype.setC=function(u){return this.cmyk.c=ae(u,0,100),this.updateRGBAndHSL()},t.prototype.setM=function(u){return this.cmyk.m=ae(u,0,100),this.updateRGBAndHSL()},t.prototype.setY=function(u){return this.cmyk.y=ae(u,0,100),this.updateRGBAndHSL()},t.prototype.setK=function(u){return this.cmyk.k=ae(u,0,100),this.updateRGBAndHSL()},Object.defineProperty(t.prototype,"decimals",{get:function(){return this._decimals},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"H",{get:function(){return $(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"S",{get:function(){return $(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"L",{get:function(){return $(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"R",{get:function(){return $(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"G",{get:function(){return $(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"B",{get:function(){return $(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"A",{get:function(){return $(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"C",{get:function(){return $(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"M",{get:function(){return $(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Y",{get:function(){return $(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"K",{get:function(){return $(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXObject",{get:function(){return tn.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXAObject",{get:function(){return tn.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBAObject",{get:function(){return en(en({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLAObject",{get:function(){return en(en({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKAObject",{get:function(){return en(en({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEX",{get:function(){return nn.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXA",{get:function(){return nn.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGB",{get:function(){return nn.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBA",{get:function(){return nn.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSL",{get:function(){return nn.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLA",{get:function(){return nn.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYK",{get:function(){return nn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKA",{get:function(){return nn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),t.toHEX=function(u,i){i===void 0&&(i=!0);var f=Jn(u);return qe(u,f,i,0,tn.HEX,nn.HEX)},t.toHEXA=function(u,i){i===void 0&&(i=!0);var f=Jn(u);return qe(u,f,i,0,tn.HEXA,nn.HEX)},t.toRGB=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.RGB,nn.RGB)},t.toRGBA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.RGBA,nn.RGB)},t.toHSL=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.HSL,nn.HSL)},t.toHSLA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.HSLA,nn.HSL)},t.toCMYK=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.CMYK,nn.CMYK)},t.toCMYKA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.CMYKA,nn.CMYK)},t.getBlendHEX=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.HEX,nn.HEX)},t.getBlendHEXA=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.HEXA,nn.HEX)},t.getBlendRGB=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.RGB,nn.RGB)},t.getBlendRGBA=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.RGBA,nn.RGB)},t.getBlendHSL=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.HSL,nn.HSL)},t.getBlendHSLA=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.HSLA,nn.HSL)},t.getMixHEX=function(u,i,f){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),Rt.HEX(u,i,f)},t.getMixHEXA=function(u,i,f){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),Rt.HEXA(u,i,f)},t.getMixRGB=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.RGB(u,i,f,s)},t.getMixRGBA=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.RGBA(u,i,f,s)},t.getMixHSL=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.HSL(u,i,f,s)},t.getMixHSLA=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.HSLA(u,i,f,s)},t.getShades=function(u,i,f){return f===void 0&&(f=6),us(u,i,!0,f)},t.getTints=function(u,i,f){return f===void 0&&(f=6),us(u,i,!1,f)},t.getHarmony=function(u,i,f,s){return i===void 0&&(i=Se.COMPLEMENTARY),f===void 0&&(f=qn.ADDITIVE),s===void 0&&(s=6),function(c,p,g,m){var d;return(d={},d[Se.ANALOGOUS]=Et.buildHarmony(p,hg,m,g),d[Se.COMPLEMENTARY]=Et.buildHarmony(p,pg,m,g),d[Se.SPLIT_COMPLEMENTARY]=Et.buildHarmony(p,gg,m,g),d[Se.TRIADIC]=Et.buildHarmony(p,dg,m,g),d[Se.TETRADIC]=Et.buildHarmony(p,vg,m,g),d[Se.SQUARE]=Et.buildHarmony(p,mg,m,g),d)[c]}(i,u,s,f)},t}();const wg={current:void 0,parent:void 0,events:void 0,color:{source:2533018,destination:15753874,expanding:16733986,updating:16733986,generating:16771899,closing:11583173,end:15483002},scale:10,fill:"#000000",alpha:1},{ceil:In,PI:Ag}=Math,or=(t,u)=>new xg(t).setA(u??wg.alpha).RGBA,Sg=(t,u)=>or(t,u);function Ge(t,u){return{width:t.width*u.scale.x,height:t.height*u.scale.y,x:t.x*u.scale.x+u.x,y:t.y*u.scale.y+u.y}}const ju={text:{draw(t,u,i){if(t.text){const f=Ge(t,{x:t.textX,y:t.textY,scale:{x:1,y:1}}),s=Ge(f,i);u.font=`${t.fontSize*i.scale.x}px Arial`,u.fillStyle=or(t.fontColor,t.alpha),u.fillText(t.text,s.x,s.y)}},test(t){return{left:-1/0,right:1/0,top:-1/0,bottom:1/0}}},path:{draw(t,u,i){const[f,...s]=t.points;u.beginPath(),u.lineCap="round",u.lineJoin="round",u.strokeStyle=Sg(t.fill,t.alpha);const{x:c,y:p,width:g}=Ge({...f,width:t.lineWidth,height:0},i);u.lineWidth=In(g),u.moveTo(In(c),In(p));for(const m of s){const{x:d,y}=Ge({...m,width:0,height:0},i);u.lineTo(In(d),In(y))}u.stroke()},test(t){var u,i,f,s;return{left:((u=hn.minBy(t.points,"x"))==null?void 0:u.x)??0-t.lineWidth??0,right:((i=hn.maxBy(t.points,"x"))==null?void 0:i.x)??0+t.lineWidth??0,top:((f=hn.minBy(t.points,"y"))==null?void 0:f.y)??0-t.lineWidth??0,bottom:((s=hn.maxBy(t.points,"y"))==null?void 0:s.y)??0+t.lineWidth??0}}},rect:{draw(t,u,i){const{x:f,y:s,width:c,height:p}=Ge(t,i);u.fillStyle=or(t.fill,t.alpha),u.fillRect(In(f),In(s),In(c)||1,In(p)||1)},test(t){return{left:t.x,right:t.x+t.width,top:t.y,bottom:t.y+t.height}}},polygon:{draw(t,u,i){const[f,...s]=t.points;u.beginPath(),u.fillStyle=or(t.fill,t.alpha);const{x:c,y:p}=Ge({...f,width:0,height:0},i);u.moveTo(In(c),In(p));for(const g of s){const{x:m,y:d}=Ge({...g,width:0,height:0},i);u.lineTo(In(m),In(d))}u.closePath(),u.fill()},test(t){var u,i,f,s;return{left:((u=hn.minBy(t.points,"x"))==null?void 0:u.x)??0,right:((i=hn.maxBy(t.points,"x"))==null?void 0:i.x)??0,top:((f=hn.minBy(t.points,"y"))==null?void 0:f.y)??0,bottom:((s=hn.maxBy(t.points,"y"))==null?void 0:s.y)??0}}},circle:{draw(t,u,i){u.fillStyle=or(t.fill,t.alpha),u.beginPath();const f=Ge({...t,width:t.radius,height:t.radius},i);u.ellipse(In(f.x),In(f.y),In(f.width),In(f.height),0,0,2*Ag),u.fill()},test(t){return{left:t.x-t.radius,right:t.x+t.radius,top:t.y-t.radius,bottom:t.y+t.radius}}}},Eg=t=>new Error(`The component ${t.$} is not supported by this renderer.`);function os(t,u,i,f){if(t in ju)ju[t].draw(u,i,f);else throw Eg(u)}const Rg=(t,u,i)=>{os(t.$,t,u,i),t.text&&os("text",t,u,i)},Og=({x:t,y:u})=>{const i=Math.abs(t),f=Math.abs(u),s=Math.max(i,f),c=2*s,p=Math.pow(c-1,2);return t==s&&u>-s?p+u-(-s+1):u==s?p+s-t+c-1:t==-s?p+s-u+2*c-1:u==-s?p+t+s+3*c-1:0},fs=JSON.stringify,{log2:Ig,max:Cg}=Math,as=t=>hn.floor(Ig(t+1));function Fg({right:t,left:u,bottom:i,top:f},s){const c=Cg(as(t-u),as(i-f))-s,p=2**c,g={left:hn.floor(u/p),right:hn.ceil((t+1)/p),top:hn.floor(f/p),bottom:hn.ceil((i+1)/p)};return{zoom:c,order:p,tiles:hn.shuffle(Uc({x:hn.range(g.left,g.right+1),y:hn.range(g.top,g.bottom+1)}).map(m=>{const d=m.x*p,y=m.y*p;return{tile:m,bounds:{left:d-p/2,right:d+p/2,top:y-p/2,bottom:y+p/2}}}))}}const Bg=200;class Tg extends og{constructor(){super(...arguments);fe(this,Jr);fe(this,ft);fe(this,Qr);fe(this,jr);fe(this,Qn,void 0);fe(this,Ct,void 0);fe(this,Ne,void 0);fe(this,Ye,void 0);fe(this,fr,void 0);fe(this,Ft,void 0);fe(this,Bt,void 0);me(this,Qn,rg),me(this,Ct,{bottom:256,top:0,left:0,right:256}),me(this,Ne,new tg(16)),me(this,Ye,{}),me(this,fr,0),me(this,Ft,{}),me(this,Bt,hn.once(()=>hn.debounce(()=>this.render(),yn(this,Qn).refreshInterval,{leading:!1,trailing:!0}))),this.renderTile=zp((i,f)=>Je(this,jr,Wc).call(this,i,f),{normalizer:JSON.stringify,max:Bg})}getView(){return{system:yn(this,Ne),world:yn(this,Ye)}}setFrustum(i){me(this,Ct,i),yn(this,Bt).call(this)()}setTileResolution(i){hn.isEqual(i,yn(this,Qn).tileResolution)||(Object.assign(yn(this,Qn),{tileResolution:i}),Je(this,ft,Mr).call(this))}add(i,f){const s=hn.map(i,({component:c,meta:p})=>({...ju[c.$].test(c),component:c,meta:hn.pick(p,"sourceLayerIndex","sourceLayerAlpha","sourceLayerDisplayMode"),index:Je(this,Jr,$c).call(this)}));yn(this,Ne).load(s),yn(this,Ye)[f]=s,Je(this,ft,Mr).call(this)}remove(i){for(const f of yn(this,Ye)[i])yn(this,Ne).remove(f);delete yn(this,Ye)[i],Je(this,ft,Mr).call(this)}setup(i){me(this,Qn,i),Je(this,ft,Mr).call(this)}async render(){for(const{tile:i,bounds:f}of Fg(yn(this,Ct),yn(this,Qn).tileSubdivision).tiles)if(Je(this,Qr,Xc).call(this,i)){const s=this.renderTile(f,yn(this,Qn).tileResolution);s&&this.emit("message",{action:"update",payload:{bounds:f,bitmap:s}},[])}}}Qn=new WeakMap,Ct=new WeakMap,Ne=new WeakMap,Ye=new WeakMap,fr=new WeakMap,Jr=new WeakSet,$c=function(){return Yc(this,fr)._++},Ft=new WeakMap,ft=new WeakSet,Mr=function(){this.renderTile.clear(),yn(this,Bt).call(this)()},Bt=new WeakMap,Qr=new WeakSet,Xc=function({x:i,y:f}){const{workerCount:s,workerIndex:c}=yn(this,Qn);return Og({x:i,y:f})%s===c},jr=new WeakSet,Wc=function(i,f){const{top:s,right:c,bottom:p,left:g}=i,m={x:f.width/(c-g),y:f.height/(p-s)},d=hn.sortBy(yn(this,Ne).search({minX:g,maxX:c,maxY:p,minY:s}),"index"),y=fs(hn.map(d,"index")),w=fs([s,c,p,g]),B=yn(this,Ft)[w];if(!B||y!==B.hash){const F=new OffscreenCanvas(f.width,f.height),M=F.getContext("2d",{alpha:!1});M.imageSmoothingEnabled=!1,M.fillStyle=yn(this,Qn).backgroundColor,M.fillRect(0,0,f.width,f.height);const H=f.width*.05,E=1;M.fillStyle="rgba(127,127,127,0.36)",M.fillRect((f.width-H)/2,(f.height-E)/2,H,E),M.fillRect((f.width-E)/2,(f.height-H)/2,E,H),hn.chain(d).sortBy(C=>{var A;return-(((A=C.meta)==null?void 0:A.sourceLayerIndex)??0)}).groupBy(C=>{var A;return((A=C.meta)==null?void 0:A.sourceLayerIndex)??0}).forEach(C=>{var K,Z,gn,Wn;const A=new OffscreenCanvas(f.width,f.height),L=A.getContext("2d");for(const{component:se}of C)Rg(se,L,{scale:m,x:-g*m.x,y:-s*m.y});const D=((Z=(K=hn.head(C))==null?void 0:K.meta)==null?void 0:Z.sourceLayerAlpha)??1,N=((Wn=(gn=hn.head(C))==null?void 0:gn.meta)==null?void 0:Wn.sourceLayerDisplayMode)??"source-over";M.globalCompositeOperation=N,M.globalAlpha=D,M.drawImage(A,0,0)}).value();const T=F.transferToImageBitmap();return yn(this,Ft)[w]={hash:y,tile:T},T}else return B.tile};const ss=new Tg;ss.on("message",(t,u)=>self.postMessage(t,u)),self.onmessage=t=>{const{action:u,payload:i}=t.data;ss[u](...i)}})(); diff --git a/assets/D2Renderer.worker-835e2af9.js b/assets/D2Renderer.worker-835e2af9.js deleted file mode 100644 index e28b4aaf..00000000 --- a/assets/D2Renderer.worker-835e2af9.js +++ /dev/null @@ -1,28 +0,0 @@ -var Af=(cn,wn,Rn)=>{if(!wn.has(cn))throw TypeError("Cannot "+Rn)};var yn=(cn,wn,Rn)=>(Af(cn,wn,"read from private field"),Rn?Rn.call(cn):wn.get(cn)),oe=(cn,wn,Rn)=>{if(wn.has(cn))throw TypeError("Cannot add the same private member more than once");wn instanceof WeakSet?wn.add(cn):wn.set(cn,Rn)},de=(cn,wn,Rn,we)=>(Af(cn,wn,"write to private field"),we?we.call(cn,Rn):wn.set(cn,Rn),Rn);var Yc=(cn,wn,Rn,we)=>({set _(Ki){de(cn,wn,Ki,Rn)},get _(){return yn(cn,wn,we)}}),Je=(cn,wn,Rn)=>(Af(cn,wn,"access private method"),Rn);(function(){var Jn,Ft,Ne,Ye,fr,Jr,$c,Ct,ft,Mr,Bt,Qr,Xc,jr,Wc;"use strict";var cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rn={},we=cn&&cn.__assign||function(){return we=Object.assign||function(t){for(var u,i=1,f=arguments.length;i - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Lr.exports,function(t,u){(function(){var i,f="4.17.21",s=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",g="Invalid `variable` option passed into `_.template`",m="__lodash_hash_undefined__",d=500,y="__lodash_placeholder__",w=1,C=2,F=4,M=1,H=2,E=1,B=2,T=4,S=8,P=16,D=32,Y=64,K=128,nn=256,mn=512,ve=30,Ee="...",me=800,ar=16,at=1,sr=2,lr=3,ae=1/0,Gn=9007199254740991,Tt=17976931348623157e292,st=0/0,_e=4294967295,Mg=_e-1,Lg=_e>>>1,Pg=[["ary",K],["bind",E],["bindKey",B],["curry",S],["curryRight",P],["flip",mn],["partial",D],["partialRight",Y],["rearg",nn]],Mt="[object Arguments]",ni="[object Array]",Hg="[object AsyncFunction]",cr="[object Boolean]",hr="[object Date]",Dg="[object DOMException]",ei="[object Error]",ti="[object Function]",ls="[object GeneratorFunction]",se="[object Map]",pr="[object Number]",qg="[object Null]",Re="[object Object]",cs="[object Promise]",Gg="[object Proxy]",gr="[object RegExp]",le="[object Set]",dr="[object String]",ri="[object Symbol]",Ng="[object Undefined]",vr="[object WeakMap]",Yg="[object WeakSet]",mr="[object ArrayBuffer]",Lt="[object DataView]",no="[object Float32Array]",eo="[object Float64Array]",to="[object Int8Array]",ro="[object Int16Array]",io="[object Int32Array]",uo="[object Uint8Array]",oo="[object Uint8ClampedArray]",fo="[object Uint16Array]",ao="[object Uint32Array]",$g=/\b__p \+= '';/g,Xg=/\b(__p \+=) '' \+/g,Wg=/(__e\(.*?\)|\b__t\)) \+\n'';/g,hs=/&(?:amp|lt|gt|quot|#39);/g,ps=/[&<>"']/g,Ug=RegExp(hs.source),Kg=RegExp(ps.source),zg=/<%-([\s\S]+?)%>/g,kg=/<%([\s\S]+?)%>/g,gs=/<%=([\s\S]+?)%>/g,Vg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zg=/^\w*$/,Jg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,so=/[\\^$.*+?()[\]{}|]/g,Qg=RegExp(so.source),lo=/^\s+/,jg=/\s/,nd=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ed=/\{\n\/\* \[wrapped with (.+)\] \*/,td=/,? & /,rd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,id=/[()=,{}\[\]\/\s]/,ud=/\\(\\)?/g,od=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ds=/\w*$/,fd=/^[-+]0x[0-9a-f]+$/i,ad=/^0b[01]+$/i,sd=/^\[object .+?Constructor\]$/,ld=/^0o[0-7]+$/i,cd=/^(?:0|[1-9]\d*)$/,hd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ii=/($^)/,pd=/['\n\r\u2028\u2029\\]/g,ui="\\ud800-\\udfff",gd="\\u0300-\\u036f",dd="\\ufe20-\\ufe2f",vd="\\u20d0-\\u20ff",vs=gd+dd+vd,ms="\\u2700-\\u27bf",_s="a-z\\xdf-\\xf6\\xf8-\\xff",md="\\xac\\xb1\\xd7\\xf7",_d="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yd="\\u2000-\\u206f",bd=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ys="A-Z\\xc0-\\xd6\\xd8-\\xde",bs="\\ufe0e\\ufe0f",xs=md+_d+yd+bd,co="['’]",xd="["+ui+"]",ws="["+xs+"]",oi="["+vs+"]",As="\\d+",wd="["+ms+"]",Ss="["+_s+"]",Es="[^"+ui+xs+As+ms+_s+ys+"]",ho="\\ud83c[\\udffb-\\udfff]",Ad="(?:"+oi+"|"+ho+")",Rs="[^"+ui+"]",po="(?:\\ud83c[\\udde6-\\uddff]){2}",go="[\\ud800-\\udbff][\\udc00-\\udfff]",Pt="["+ys+"]",Os="\\u200d",Is="(?:"+Ss+"|"+Es+")",Sd="(?:"+Pt+"|"+Es+")",Fs="(?:"+co+"(?:d|ll|m|re|s|t|ve))?",Cs="(?:"+co+"(?:D|LL|M|RE|S|T|VE))?",Bs=Ad+"?",Ts="["+bs+"]?",Ed="(?:"+Os+"(?:"+[Rs,po,go].join("|")+")"+Ts+Bs+")*",Rd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Od="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ms=Ts+Bs+Ed,Id="(?:"+[wd,po,go].join("|")+")"+Ms,Fd="(?:"+[Rs+oi+"?",oi,po,go,xd].join("|")+")",Cd=RegExp(co,"g"),Bd=RegExp(oi,"g"),vo=RegExp(ho+"(?="+ho+")|"+Fd+Ms,"g"),Td=RegExp([Pt+"?"+Ss+"+"+Fs+"(?="+[ws,Pt,"$"].join("|")+")",Sd+"+"+Cs+"(?="+[ws,Pt+Is,"$"].join("|")+")",Pt+"?"+Is+"+"+Fs,Pt+"+"+Cs,Od,Rd,As,Id].join("|"),"g"),Md=RegExp("["+Os+ui+vs+bs+"]"),Ld=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Hd=-1,pn={};pn[no]=pn[eo]=pn[to]=pn[ro]=pn[io]=pn[uo]=pn[oo]=pn[fo]=pn[ao]=!0,pn[Mt]=pn[ni]=pn[mr]=pn[cr]=pn[Lt]=pn[hr]=pn[ei]=pn[ti]=pn[se]=pn[pr]=pn[Re]=pn[gr]=pn[le]=pn[dr]=pn[vr]=!1;var hn={};hn[Mt]=hn[ni]=hn[mr]=hn[Lt]=hn[cr]=hn[hr]=hn[no]=hn[eo]=hn[to]=hn[ro]=hn[io]=hn[se]=hn[pr]=hn[Re]=hn[gr]=hn[le]=hn[dr]=hn[ri]=hn[uo]=hn[oo]=hn[fo]=hn[ao]=!0,hn[ei]=hn[ti]=hn[vr]=!1;var Dd={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},qd={"&":"&","<":"<",">":">",'"':""","'":"'"},Gd={"&":"&","<":"<",">":">",""":'"',"'":"'"},Nd={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yd=parseFloat,$d=parseInt,Ls=typeof cn=="object"&&cn&&cn.Object===Object&&cn,Xd=typeof self=="object"&&self&&self.Object===Object&&self,Fn=Ls||Xd||Function("return this")(),mo=u&&!u.nodeType&&u,lt=mo&&!0&&t&&!t.nodeType&&t,Ps=lt&<.exports===mo,_o=Ps&&Ls.process,Qn=function(){try{var b=lt&<.require&<.require("util").types;return b||_o&&_o.binding&&_o.binding("util")}catch{}}(),Hs=Qn&&Qn.isArrayBuffer,Ds=Qn&&Qn.isDate,qs=Qn&&Qn.isMap,Gs=Qn&&Qn.isRegExp,Ns=Qn&&Qn.isSet,Ys=Qn&&Qn.isTypedArray;function Wn(b,R,A){switch(A.length){case 0:return b.call(R);case 1:return b.call(R,A[0]);case 2:return b.call(R,A[0],A[1]);case 3:return b.call(R,A[0],A[1],A[2])}return b.apply(R,A)}function Wd(b,R,A,G){for(var k=-1,fn=b==null?0:b.length;++k-1}function yo(b,R,A){for(var G=-1,k=b==null?0:b.length;++G-1;);return A}function Vs(b,R){for(var A=b.length;A--&&Ht(R,b[A],0)>-1;);return A}function jd(b,R){for(var A=b.length,G=0;A--;)b[A]===R&&++G;return G}var n0=Ao(Dd),e0=Ao(qd);function t0(b){return"\\"+Nd[b]}function r0(b,R){return b==null?i:b[R]}function Dt(b){return Md.test(b)}function i0(b){return Ld.test(b)}function u0(b){for(var R,A=[];!(R=b.next()).done;)A.push(R.value);return A}function Oo(b){var R=-1,A=Array(b.size);return b.forEach(function(G,k){A[++R]=[k,G]}),A}function Zs(b,R){return function(A){return b(R(A))}}function We(b,R){for(var A=-1,G=b.length,k=0,fn=[];++A-1}function K0(n,e){var r=this.__data__,o=Si(r,n);return o<0?(++this.size,r.push([n,e])):r[o][1]=e,this}Oe.prototype.clear=$0,Oe.prototype.delete=X0,Oe.prototype.get=W0,Oe.prototype.has=U0,Oe.prototype.set=K0;function Ie(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function te(n,e,r,o,a,h){var v,_=e&w,x=e&C,O=e&F;if(r&&(v=a?r(n,o,a,h):r(n)),v!==i)return v;if(!dn(n))return n;var I=V(n);if(I){if(v=Zv(n),!_)return Nn(n,v)}else{var L=Mn(n),q=L==ti||L==ls;if(Ze(n))return Tl(n,_);if(L==Re||L==Mt||q&&!a){if(v=x||q?{}:Jl(n),!_)return x?Gv(n,av(v,n)):qv(n,al(v,n))}else{if(!hn[L])return a?n:{};v=Jv(n,L,_)}}h||(h=new he);var N=h.get(n);if(N)return N;h.set(n,v),Rc(n)?n.forEach(function(U){v.add(te(U,e,r,U,n,h))}):Sc(n)&&n.forEach(function(U,rn){v.set(rn,te(U,e,r,rn,n,h))});var W=O?x?jo:Qo:x?$n:En,J=I?i:W(n);return jn(J||n,function(U,rn){J&&(rn=U,U=n[rn]),Sr(v,rn,te(U,e,r,rn,n,h))}),v}function sv(n){var e=En(n);return function(r){return sl(r,n,e)}}function sl(n,e,r){var o=r.length;if(n==null)return!o;for(n=ln(n);o--;){var a=r[o],h=e[a],v=n[a];if(v===i&&!(a in n)||!h(v))return!1}return!0}function ll(n,e,r){if(typeof n!="function")throw new ne(p);return Br(function(){n.apply(i,r)},e)}function Er(n,e,r,o){var a=-1,h=fi,v=!0,_=n.length,x=[],O=e.length;if(!_)return x;r&&(e=gn(e,Un(r))),o?(h=yo,v=!1):e.length>=s&&(h=_r,v=!1,e=new pt(e));n:for(;++a<_;){var I=n[a],L=r==null?I:r(I);if(I=o||I!==0?I:0,v&&L===L){for(var q=O;q--;)if(e[q]===L)continue n;x.push(I)}else h(e,L,o)||x.push(I)}return x}var Ke=Dl(ye),cl=Dl(Po,!0);function lv(n,e){var r=!0;return Ke(n,function(o,a,h){return r=!!e(o,a,h),r}),r}function Ei(n,e,r){for(var o=-1,a=n.length;++oa?0:a+r),o=o===i||o>a?a:Z(o),o<0&&(o+=a),o=r>o?0:Ic(o);r0&&r(_)?e>1?Cn(_,e-1,r,o,a):Xe(a,_):o||(a[a.length]=_)}return a}var Lo=ql(),pl=ql(!0);function ye(n,e){return n&&Lo(n,e,En)}function Po(n,e){return n&&pl(n,e,En)}function Ri(n,e){return $e(e,function(r){return Me(n[r])})}function dt(n,e){e=ke(e,n);for(var r=0,o=e.length;n!=null&&re}function hv(n,e){return n!=null&&sn.call(n,e)}function pv(n,e){return n!=null&&e in ln(n)}function gv(n,e,r){return n>=Tn(e,r)&&n=120&&I.length>=120)?new pt(v&&I):i}I=n[0];var L=-1,q=_[0];n:for(;++L-1;)_!==n&&mi.call(_,x,1),mi.call(n,x,1);return n}function Sl(n,e){for(var r=n?e.length:0,o=r-1;r--;){var a=e[r];if(r==o||a!==h){var h=a;Te(a)?mi.call(n,a,1):Uo(n,a)}}return n}function $o(n,e){return n+bi(il()*(e-n+1))}function Ov(n,e,r,o){for(var a=-1,h=Sn(yi((e-n)/(r||1)),0),v=A(h);h--;)v[o?h:++a]=n,n+=r;return v}function Xo(n,e){var r="";if(!n||e<1||e>Gn)return r;do e%2&&(r+=n),e=bi(e/2),e&&(n+=n);while(e);return r}function Q(n,e){return ff(nc(n,e,Xn),n+"")}function Iv(n){return fl(kt(n))}function Fv(n,e){var r=kt(n);return Di(r,gt(e,0,r.length))}function Ir(n,e,r,o){if(!dn(n))return n;e=ke(e,n);for(var a=-1,h=e.length,v=h-1,_=n;_!=null&&++aa?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var h=A(a);++o>>1,v=n[h];v!==null&&!zn(v)&&(r?v<=e:v=s){var O=e?null:Xv(n);if(O)return si(O);v=!1,a=_r,x=new pt}else x=e?[]:_;n:for(;++o=o?n:re(n,e,r)}var Bl=b0||function(n){return Fn.clearTimeout(n)};function Tl(n,e){if(e)return n.slice();var r=n.length,o=js?js(r):new n.constructor(r);return n.copy(o),o}function Vo(n){var e=new n.constructor(n.byteLength);return new di(e).set(new di(n)),e}function Lv(n,e){var r=e?Vo(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function Pv(n){var e=new n.constructor(n.source,ds.exec(n));return e.lastIndex=n.lastIndex,e}function Hv(n){return Ar?ln(Ar.call(n)):{}}function Ml(n,e){var r=e?Vo(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Ll(n,e){if(n!==e){var r=n!==i,o=n===null,a=n===n,h=zn(n),v=e!==i,_=e===null,x=e===e,O=zn(e);if(!_&&!O&&!h&&n>e||h&&v&&x&&!_&&!O||o&&v&&x||!r&&x||!a)return 1;if(!o&&!h&&!O&&n=_)return x;var O=r[o];return x*(O=="desc"?-1:1)}}return n.index-e.index}function Pl(n,e,r,o){for(var a=-1,h=n.length,v=r.length,_=-1,x=e.length,O=Sn(h-v,0),I=A(x+O),L=!o;++_1?r[a-1]:i,v=a>2?r[2]:i;for(h=n.length>3&&typeof h=="function"?(a--,h):i,v&&Hn(r[0],r[1],v)&&(h=a<3?i:h,a=1),e=ln(e);++o-1?a[h?e[v]:v]:i}}function Yl(n){return Be(function(e){var r=e.length,o=r,a=ee.prototype.thru;for(n&&e.reverse();o--;){var h=e[o];if(typeof h!="function")throw new ne(p);if(a&&!v&&Pi(h)=="wrapper")var v=new ee([],!0)}for(o=v?o:r;++o1&&on.reverse(),I&&x_))return!1;var O=h.get(n),I=h.get(e);if(O&&I)return O==e&&I==n;var L=-1,q=!0,N=r&H?new pt:i;for(h.set(n,e),h.set(e,n);++L<_;){var W=n[L],J=e[L];if(o)var U=v?o(J,W,L,e,n,h):o(W,J,L,n,e,h);if(U!==i){if(U)continue;q=!1;break}if(N){if(!xo(e,function(rn,on){if(!_r(N,on)&&(W===rn||a(W,rn,r,o,h)))return N.push(on)})){q=!1;break}}else if(!(W===J||a(W,J,r,o,h))){q=!1;break}}return h.delete(n),h.delete(e),q}function Uv(n,e,r,o,a,h,v){switch(r){case Lt:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case mr:return!(n.byteLength!=e.byteLength||!h(new di(n),new di(e)));case cr:case hr:case pr:return pe(+n,+e);case ei:return n.name==e.name&&n.message==e.message;case gr:case dr:return n==e+"";case se:var _=Oo;case le:var x=o&M;if(_||(_=si),n.size!=e.size&&!x)return!1;var O=v.get(n);if(O)return O==e;o|=H,v.set(n,e);var I=kl(_(n),_(e),o,a,h,v);return v.delete(n),I;case ri:if(Ar)return Ar.call(n)==Ar.call(e)}return!1}function Kv(n,e,r,o,a,h){var v=r&M,_=Qo(n),x=_.length,O=Qo(e),I=O.length;if(x!=I&&!v)return!1;for(var L=x;L--;){var q=_[L];if(!(v?q in e:sn.call(e,q)))return!1}var N=h.get(n),W=h.get(e);if(N&&W)return N==e&&W==n;var J=!0;h.set(n,e),h.set(e,n);for(var U=v;++L1?"& ":"")+e[o],e=e.join(r>2?", ":" "),n.replace(nd,`{ -/* [wrapped with `+e+`] */ -`)}function jv(n){return V(n)||_t(n)||!!(tl&&n&&n[tl])}function Te(n,e){var r=typeof n;return e=e??Gn,!!e&&(r=="number"||r!="symbol"&&cd.test(n))&&n>-1&&n%1==0&&n0){if(++e>=me)return arguments[0]}else e=0;return n.apply(i,arguments)}}function Di(n,e){var r=-1,o=n.length,a=o-1;for(e=e===i?o:e;++r1?n[e-1]:i;return r=typeof r=="function"?(n.pop(),r):i,hc(n,r)});function pc(n){var e=l(n);return e.__chain__=!0,e}function lm(n,e){return e(n),n}function qi(n,e){return e(n)}var cm=Be(function(n){var e=n.length,r=e?n[0]:0,o=this.__wrapped__,a=function(h){return Mo(h,n)};return e>1||this.__actions__.length||!(o instanceof un)||!Te(r)?this.thru(a):(o=o.slice(r,+r+(e?1:0)),o.__actions__.push({func:qi,args:[a],thisArg:i}),new ee(o,this.__chain__).thru(function(h){return e&&!h.length&&h.push(i),h}))});function hm(){return pc(this)}function pm(){return new ee(this.value(),this.__chain__)}function gm(){this.__values__===i&&(this.__values__=Oc(this.value()));var n=this.__index__>=this.__values__.length,e=n?i:this.__values__[this.__index__++];return{done:n,value:e}}function dm(){return this}function vm(n){for(var e,r=this;r instanceof Ai;){var o=oc(r);o.__index__=0,o.__values__=i,e?a.__wrapped__=o:e=o;var a=o;r=r.__wrapped__}return a.__wrapped__=n,e}function mm(){var n=this.__wrapped__;if(n instanceof un){var e=n;return this.__actions__.length&&(e=new un(this)),e=e.reverse(),e.__actions__.push({func:qi,args:[af],thisArg:i}),new ee(e,this.__chain__)}return this.thru(af)}function _m(){return Fl(this.__wrapped__,this.__actions__)}var ym=Ci(function(n,e,r){sn.call(n,r)?++n[r]:Fe(n,r,1)});function bm(n,e,r){var o=V(n)?$s:lv;return r&&Hn(n,e,r)&&(e=i),o(n,X(e,3))}function xm(n,e){var r=V(n)?$e:hl;return r(n,X(e,3))}var wm=Nl(fc),Am=Nl(ac);function Sm(n,e){return Cn(Gi(n,e),1)}function Em(n,e){return Cn(Gi(n,e),ae)}function Rm(n,e,r){return r=r===i?1:Z(r),Cn(Gi(n,e),r)}function gc(n,e){var r=V(n)?jn:Ke;return r(n,X(e,3))}function dc(n,e){var r=V(n)?Ud:cl;return r(n,X(e,3))}var Om=Ci(function(n,e,r){sn.call(n,r)?n[r].push(e):Fe(n,r,[e])});function Im(n,e,r,o){n=Yn(n)?n:kt(n),r=r&&!o?Z(r):0;var a=n.length;return r<0&&(r=Sn(a+r,0)),Wi(n)?r<=a&&n.indexOf(e,r)>-1:!!a&&Ht(n,e,r)>-1}var Fm=Q(function(n,e,r){var o=-1,a=typeof e=="function",h=Yn(n)?A(n.length):[];return Ke(n,function(v){h[++o]=a?Wn(e,v,r):Rr(v,e,r)}),h}),Cm=Ci(function(n,e,r){Fe(n,r,e)});function Gi(n,e){var r=V(n)?gn:_l;return r(n,X(e,3))}function Bm(n,e,r,o){return n==null?[]:(V(e)||(e=e==null?[]:[e]),r=o?i:r,V(r)||(r=r==null?[]:[r]),wl(n,e,r))}var Tm=Ci(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function Mm(n,e,r){var o=V(n)?bo:Ks,a=arguments.length<3;return o(n,X(e,4),r,a,Ke)}function Lm(n,e,r){var o=V(n)?Kd:Ks,a=arguments.length<3;return o(n,X(e,4),r,a,cl)}function Pm(n,e){var r=V(n)?$e:hl;return r(n,$i(X(e,3)))}function Hm(n){var e=V(n)?fl:Iv;return e(n)}function Dm(n,e,r){(r?Hn(n,e,r):e===i)?e=1:e=Z(e);var o=V(n)?uv:Fv;return o(n,e)}function qm(n){var e=V(n)?ov:Bv;return e(n)}function Gm(n){if(n==null)return 0;if(Yn(n))return Wi(n)?qt(n):n.length;var e=Mn(n);return e==se||e==le?n.size:Go(n).length}function Nm(n,e,r){var o=V(n)?xo:Tv;return r&&Hn(n,e,r)&&(e=i),o(n,X(e,3))}var Ym=Q(function(n,e){if(n==null)return[];var r=e.length;return r>1&&Hn(n,e[0],e[1])?e=[]:r>2&&Hn(e[0],e[1],e[2])&&(e=[e[0]]),wl(n,Cn(e,1),[])}),Ni=x0||function(){return Fn.Date.now()};function $m(n,e){if(typeof e!="function")throw new ne(p);return n=Z(n),function(){if(--n<1)return e.apply(this,arguments)}}function vc(n,e,r){return e=r?i:e,e=n&&e==null?n.length:e,Ce(n,K,i,i,i,i,e)}function mc(n,e){var r;if(typeof e!="function")throw new ne(p);return n=Z(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=i),r}}var lf=Q(function(n,e,r){var o=E;if(r.length){var a=We(r,Kt(lf));o|=D}return Ce(n,o,e,r,a)}),_c=Q(function(n,e,r){var o=E|B;if(r.length){var a=We(r,Kt(_c));o|=D}return Ce(e,o,n,r,a)});function yc(n,e,r){e=r?i:e;var o=Ce(n,S,i,i,i,i,i,e);return o.placeholder=yc.placeholder,o}function bc(n,e,r){e=r?i:e;var o=Ce(n,P,i,i,i,i,i,e);return o.placeholder=bc.placeholder,o}function xc(n,e,r){var o,a,h,v,_,x,O=0,I=!1,L=!1,q=!0;if(typeof n!="function")throw new ne(p);e=ue(e)||0,dn(r)&&(I=!!r.leading,L="maxWait"in r,h=L?Sn(ue(r.maxWait)||0,e):h,q="trailing"in r?!!r.trailing:q);function N(xn){var ge=o,Pe=a;return o=a=i,O=xn,v=n.apply(Pe,ge),v}function W(xn){return O=xn,_=Br(rn,e),I?N(xn):v}function J(xn){var ge=xn-x,Pe=xn-O,Nc=e-ge;return L?Tn(Nc,h-Pe):Nc}function U(xn){var ge=xn-x,Pe=xn-O;return x===i||ge>=e||ge<0||L&&Pe>=h}function rn(){var xn=Ni();if(U(xn))return on(xn);_=Br(rn,J(xn))}function on(xn){return _=i,q&&o?N(xn):(o=a=i,v)}function kn(){_!==i&&Bl(_),O=0,o=x=a=_=i}function Dn(){return _===i?v:on(Ni())}function Vn(){var xn=Ni(),ge=U(xn);if(o=arguments,a=this,x=xn,ge){if(_===i)return W(x);if(L)return Bl(_),_=Br(rn,e),N(x)}return _===i&&(_=Br(rn,e)),v}return Vn.cancel=kn,Vn.flush=Dn,Vn}var Xm=Q(function(n,e){return ll(n,1,e)}),Wm=Q(function(n,e,r){return ll(n,ue(e)||0,r)});function Um(n){return Ce(n,mn)}function Yi(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new ne(p);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],h=r.cache;if(h.has(a))return h.get(a);var v=n.apply(this,o);return r.cache=h.set(a,v)||h,v};return r.cache=new(Yi.Cache||Ie),r}Yi.Cache=Ie;function $i(n){if(typeof n!="function")throw new ne(p);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function Km(n){return mc(2,n)}var zm=Mv(function(n,e){e=e.length==1&&V(e[0])?gn(e[0],Un(X())):gn(Cn(e,1),Un(X()));var r=e.length;return Q(function(o){for(var a=-1,h=Tn(o.length,r);++a=e}),_t=dl(function(){return arguments}())?dl:function(n){return _n(n)&&sn.call(n,"callee")&&!el.call(n,"callee")},V=A.isArray,a_=Hs?Un(Hs):vv;function Yn(n){return n!=null&&Xi(n.length)&&!Me(n)}function bn(n){return _n(n)&&Yn(n)}function s_(n){return n===!0||n===!1||_n(n)&&Pn(n)==cr}var Ze=A0||wf,l_=Ds?Un(Ds):mv;function c_(n){return _n(n)&&n.nodeType===1&&!Tr(n)}function h_(n){if(n==null)return!0;if(Yn(n)&&(V(n)||typeof n=="string"||typeof n.splice=="function"||Ze(n)||zt(n)||_t(n)))return!n.length;var e=Mn(n);if(e==se||e==le)return!n.size;if(Cr(n))return!Go(n).length;for(var r in n)if(sn.call(n,r))return!1;return!0}function p_(n,e){return Or(n,e)}function g_(n,e,r){r=typeof r=="function"?r:i;var o=r?r(n,e):i;return o===i?Or(n,e,i,r):!!o}function hf(n){if(!_n(n))return!1;var e=Pn(n);return e==ei||e==Dg||typeof n.message=="string"&&typeof n.name=="string"&&!Tr(n)}function d_(n){return typeof n=="number"&&rl(n)}function Me(n){if(!dn(n))return!1;var e=Pn(n);return e==ti||e==ls||e==Hg||e==Gg}function Ac(n){return typeof n=="number"&&n==Z(n)}function Xi(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Gn}function dn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function _n(n){return n!=null&&typeof n=="object"}var Sc=qs?Un(qs):yv;function v_(n,e){return n===e||qo(n,e,ef(e))}function m_(n,e,r){return r=typeof r=="function"?r:i,qo(n,e,ef(e),r)}function __(n){return Ec(n)&&n!=+n}function y_(n){if(t1(n))throw new k(c);return vl(n)}function b_(n){return n===null}function x_(n){return n==null}function Ec(n){return typeof n=="number"||_n(n)&&Pn(n)==pr}function Tr(n){if(!_n(n)||Pn(n)!=Re)return!1;var e=vi(n);if(e===null)return!0;var r=sn.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&hi.call(r)==m0}var pf=Gs?Un(Gs):bv;function w_(n){return Ac(n)&&n>=-Gn&&n<=Gn}var Rc=Ns?Un(Ns):xv;function Wi(n){return typeof n=="string"||!V(n)&&_n(n)&&Pn(n)==dr}function zn(n){return typeof n=="symbol"||_n(n)&&Pn(n)==ri}var zt=Ys?Un(Ys):wv;function A_(n){return n===i}function S_(n){return _n(n)&&Mn(n)==vr}function E_(n){return _n(n)&&Pn(n)==Yg}var R_=Li(No),O_=Li(function(n,e){return n<=e});function Oc(n){if(!n)return[];if(Yn(n))return Wi(n)?ce(n):Nn(n);if(yr&&n[yr])return u0(n[yr]());var e=Mn(n),r=e==se?Oo:e==le?si:kt;return r(n)}function Le(n){if(!n)return n===0?n:0;if(n=ue(n),n===ae||n===-ae){var e=n<0?-1:1;return e*Tt}return n===n?n:0}function Z(n){var e=Le(n),r=e%1;return e===e?r?e-r:e:0}function Ic(n){return n?gt(Z(n),0,_e):0}function ue(n){if(typeof n=="number")return n;if(zn(n))return st;if(dn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=dn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=zs(n);var r=ad.test(n);return r||ld.test(n)?$d(n.slice(2),r?2:8):fd.test(n)?st:+n}function Fc(n){return be(n,$n(n))}function I_(n){return n?gt(Z(n),-Gn,Gn):n===0?n:0}function an(n){return n==null?"":Kn(n)}var F_=Wt(function(n,e){if(Cr(e)||Yn(e)){be(e,En(e),n);return}for(var r in e)sn.call(e,r)&&Sr(n,r,e[r])}),Cc=Wt(function(n,e){be(e,$n(e),n)}),Ui=Wt(function(n,e,r,o){be(e,$n(e),n,o)}),C_=Wt(function(n,e,r,o){be(e,En(e),n,o)}),B_=Be(Mo);function T_(n,e){var r=Xt(n);return e==null?r:al(r,e)}var M_=Q(function(n,e){n=ln(n);var r=-1,o=e.length,a=o>2?e[2]:i;for(a&&Hn(e[0],e[1],a)&&(o=1);++r1),h}),be(n,jo(n),r),o&&(r=te(r,w|C|F,Wv));for(var a=e.length;a--;)Uo(r,e[a]);return r});function J_(n,e){return Tc(n,$i(X(e)))}var Q_=Be(function(n,e){return n==null?{}:Ev(n,e)});function Tc(n,e){if(n==null)return{};var r=gn(jo(n),function(o){return[o]});return e=X(e),Al(n,r,function(o,a){return e(o,a[0])})}function j_(n,e,r){e=ke(e,n);var o=-1,a=e.length;for(a||(a=1,n=i);++oe){var o=n;n=e,e=o}if(r||n%1||e%1){var a=il();return Tn(n+a*(e-n+Yd("1e-"+((a+"").length-1))),e)}return $o(n,e)}var ly=Ut(function(n,e,r){return e=e.toLowerCase(),n+(r?Pc(e):e)});function Pc(n){return vf(an(n).toLowerCase())}function Hc(n){return n=an(n),n&&n.replace(hd,n0).replace(Bd,"")}function cy(n,e,r){n=an(n),e=Kn(e);var o=n.length;r=r===i?o:gt(Z(r),0,o);var a=r;return r-=e.length,r>=0&&n.slice(r,a)==e}function hy(n){return n=an(n),n&&Kg.test(n)?n.replace(ps,e0):n}function py(n){return n=an(n),n&&Qg.test(n)?n.replace(so,"\\$&"):n}var gy=Ut(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),dy=Ut(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),vy=Gl("toLowerCase");function my(n,e,r){n=an(n),e=Z(e);var o=e?qt(n):0;if(!e||o>=e)return n;var a=(e-o)/2;return Mi(bi(a),r)+n+Mi(yi(a),r)}function _y(n,e,r){n=an(n),e=Z(e);var o=e?qt(n):0;return e&&o>>0,r?(n=an(n),n&&(typeof e=="string"||e!=null&&!pf(e))&&(e=Kn(e),!e&&Dt(n))?Ve(ce(n),0,r):n.split(e,r)):[]}var Ey=Ut(function(n,e,r){return n+(r?" ":"")+vf(e)});function Ry(n,e,r){return n=an(n),r=r==null?0:gt(Z(r),0,n.length),e=Kn(e),n.slice(r,r+e.length)==e}function Oy(n,e,r){var o=l.templateSettings;r&&Hn(n,e,r)&&(e=i),n=an(n),e=Ui({},e,o,Kl);var a=Ui({},e.imports,o.imports,Kl),h=En(a),v=Ro(a,h),_,x,O=0,I=e.interpolate||ii,L="__p += '",q=Io((e.escape||ii).source+"|"+I.source+"|"+(I===gs?od:ii).source+"|"+(e.evaluate||ii).source+"|$","g"),N="//# sourceURL="+(sn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Hd+"]")+` -`;n.replace(q,function(U,rn,on,kn,Dn,Vn){return on||(on=kn),L+=n.slice(O,Vn).replace(pd,t0),rn&&(_=!0,L+=`' + -__e(`+rn+`) + -'`),Dn&&(x=!0,L+=`'; -`+Dn+`; -__p += '`),on&&(L+=`' + -((__t = (`+on+`)) == null ? '' : __t) + -'`),O=Vn+U.length,U}),L+=`'; -`;var W=sn.call(e,"variable")&&e.variable;if(!W)L=`with (obj) { -`+L+` -} -`;else if(id.test(W))throw new k(g);L=(x?L.replace($g,""):L).replace(Xg,"$1").replace(Wg,"$1;"),L="function("+(W||"obj")+`) { -`+(W?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(_?", __e = _.escape":"")+(x?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+L+`return __p -}`;var J=qc(function(){return fn(h,N+"return "+L).apply(i,v)});if(J.source=L,hf(J))throw J;return J}function Iy(n){return an(n).toLowerCase()}function Fy(n){return an(n).toUpperCase()}function Cy(n,e,r){if(n=an(n),n&&(r||e===i))return zs(n);if(!n||!(e=Kn(e)))return n;var o=ce(n),a=ce(e),h=ks(o,a),v=Vs(o,a)+1;return Ve(o,h,v).join("")}function By(n,e,r){if(n=an(n),n&&(r||e===i))return n.slice(0,Js(n)+1);if(!n||!(e=Kn(e)))return n;var o=ce(n),a=Vs(o,ce(e))+1;return Ve(o,0,a).join("")}function Ty(n,e,r){if(n=an(n),n&&(r||e===i))return n.replace(lo,"");if(!n||!(e=Kn(e)))return n;var o=ce(n),a=ks(o,ce(e));return Ve(o,a).join("")}function My(n,e){var r=ve,o=Ee;if(dn(e)){var a="separator"in e?e.separator:a;r="length"in e?Z(e.length):r,o="omission"in e?Kn(e.omission):o}n=an(n);var h=n.length;if(Dt(n)){var v=ce(n);h=v.length}if(r>=h)return n;var _=r-qt(o);if(_<1)return o;var x=v?Ve(v,0,_).join(""):n.slice(0,_);if(a===i)return x+o;if(v&&(_+=x.length-_),pf(a)){if(n.slice(_).search(a)){var O,I=x;for(a.global||(a=Io(a.source,an(ds.exec(a))+"g")),a.lastIndex=0;O=a.exec(I);)var L=O.index;x=x.slice(0,L===i?_:L)}}else if(n.indexOf(Kn(a),_)!=_){var q=x.lastIndexOf(a);q>-1&&(x=x.slice(0,q))}return x+o}function Ly(n){return n=an(n),n&&Ug.test(n)?n.replace(hs,s0):n}var Py=Ut(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),vf=Gl("toUpperCase");function Dc(n,e,r){return n=an(n),e=r?i:e,e===i?i0(n)?h0(n):Vd(n):n.match(e)||[]}var qc=Q(function(n,e){try{return Wn(n,i,e)}catch(r){return hf(r)?r:new k(r)}}),Hy=Be(function(n,e){return jn(e,function(r){r=xe(r),Fe(n,r,lf(n[r],n))}),n});function Dy(n){var e=n==null?0:n.length,r=X();return n=e?gn(n,function(o){if(typeof o[1]!="function")throw new ne(p);return[r(o[0]),o[1]]}):[],Q(function(o){for(var a=-1;++aGn)return[];var r=_e,o=Tn(n,_e);e=X(e),n-=_e;for(var a=Eo(o,e);++r0||e<0)?new un(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==i&&(e=Z(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},un.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},un.prototype.toArray=function(){return this.take(_e)},ye(un.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),a=l[o?"take"+(e=="last"?"Right":""):e],h=o||/^find/.test(e);a&&(l.prototype[e]=function(){var v=this.__wrapped__,_=o?[1]:arguments,x=v instanceof un,O=_[0],I=x||V(v),L=function(rn){var on=a.apply(l,Xe([rn],_));return o&&q?on[0]:on};I&&r&&typeof O=="function"&&O.length!=1&&(x=I=!1);var q=this.__chain__,N=!!this.__actions__.length,W=h&&!q,J=x&&!N;if(!h&&I){v=J?v:new un(this);var U=n.apply(v,_);return U.__actions__.push({func:qi,args:[L],thisArg:i}),new ee(U,q)}return W&&J?n.apply(this,_):(U=this.thru(L),W?o?U.value()[0]:U.value():U)})}),jn(["pop","push","shift","sort","splice","unshift"],function(n){var e=li[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",o=/^(?:pop|shift)$/.test(n);l.prototype[n]=function(){var a=arguments;if(o&&!this.__chain__){var h=this.value();return e.apply(V(h)?h:[],a)}return this[r](function(v){return e.apply(V(v)?v:[],a)})}}),ye(un.prototype,function(n,e){var r=l[e];if(r){var o=r.name+"";sn.call($t,o)||($t[o]=[]),$t[o].push({name:e,func:r})}}),$t[Bi(i,B).name]=[{name:"wrapper",func:i}],un.prototype.clone=L0,un.prototype.reverse=P0,un.prototype.value=H0,l.prototype.at=cm,l.prototype.chain=hm,l.prototype.commit=pm,l.prototype.next=gm,l.prototype.plant=vm,l.prototype.reverse=mm,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=_m,l.prototype.first=l.prototype.head,yr&&(l.prototype[yr]=dm),l},Gt=p0();lt?((lt.exports=Gt)._=Gt,mo._=Gt):Fn._=Gt}).call(cn)}(Lr,Lr.exports);var vn=Lr.exports,Kc=function(){},zc=Kc(),Qe=function(t){return t!==zc&&t!==null},kc=Qe,Vc=Array.prototype.forEach,Zc=Object.create,Jc=function(t,u){var i;for(i in t)u[i]=t[i]},Sf=function(t){var u=Zc(null);return Vc.call(arguments,function(i){kc(i)&&Jc(Object(i),u)}),u},Qc=function(){var t=Math.sign;return typeof t!="function"?!1:t(10)===1&&t(-20)===-1},zi,Ef;function jc(){return Ef||(Ef=1,zi=function(t){return t=Number(t),isNaN(t)||t===0?t:t>0?1:-1}),zi}var nh=Qc()?Math.sign:jc(),eh=nh,th=Math.abs,rh=Math.floor,ih=function(t){return isNaN(t)?0:(t=Number(t),t===0||!isFinite(t)?t:eh(t)*rh(th(t)))},uh=ih,oh=Math.max,je=function(t){return oh(0,uh(t))},fh=je,Rf=function(t,u,i){var f;return isNaN(t)?(f=u,f>=0?i&&f?f-1:f:1):t===!1?!1:fh(t)},He=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");return t},ah=Qe,yt=function(t){if(!ah(t))throw new TypeError("Cannot use null or undefined");return t},sh=He,lh=yt,ch=Function.prototype.bind,Of=Function.prototype.call,hh=Object.keys,ph=Object.prototype.propertyIsEnumerable,gh=function(t,u){return function(i,f){var s,c=arguments[2],p=arguments[3];return i=Object(lh(i)),sh(f),s=hh(i),p&&s.sort(typeof p=="function"?ch.call(p,i):void 0),typeof t!="function"&&(t=s[t]),Of.call(t,s,function(g,m){return ph.call(i,g)?Of.call(f,c,i[g],g,i,m):u})}},Pr=gh("forEach"),nt={},If={exports:{}},dh=function(){var t=Object.assign,u;return typeof t!="function"?!1:(u={foo:"raz"},t(u,{bar:"dwa"},{trzy:"trzy"}),u.foo+u.bar+u.trzy==="razdwatrzy")},ki,Ff;function vh(){return Ff||(Ff=1,ki=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),ki}var Vi,Cf;function mh(){if(Cf)return Vi;Cf=1;var t=Qe,u=Object.keys;return Vi=function(i){return u(t(i)?Object(i):i)},Vi}var Zi,Bf;function _h(){return Bf||(Bf=1,Zi=vh()()?Object.keys:mh()),Zi}var Ji,Tf;function yh(){if(Tf)return Ji;Tf=1;var t=_h(),u=yt,i=Math.max;return Ji=function(f,s){var c,p,g=i(arguments.length,2),m;for(f=Object(u(f)),m=function(d){try{f[d]=s[d]}catch(y){c||(c=y)}},p=1;p-1},tu}var qh=Hh()?String.prototype.contains:Dh(),Hr=Xf,Uf=Ph,Kf=Mf,zf=Sf,Vt=qh,Gh=$f.exports=function(t,u){var i,f,s,c,p;return arguments.length<2||typeof t!="string"?(c=u,u=t,t=null):c=arguments[2],Hr(t)?(i=Vt.call(t,"c"),f=Vt.call(t,"e"),s=Vt.call(t,"w")):(i=s=!0,f=!1),p={value:u,configurable:i,enumerable:f,writable:s},c?Kf(zf(c),p):p};Gh.gs=function(t,u,i){var f,s,c,p;return typeof t!="string"?(c=i,i=u,u=t,t=null):c=arguments[3],Hr(u)?Uf(u)?Hr(i)?Uf(i)||(c=i,i=void 0):i=void 0:(c=u,u=i=void 0):u=void 0,Hr(t)?(f=Vt.call(t,"c"),s=Vt.call(t,"e")):(f=!0,s=!1),p={get:u,set:i,configurable:f,enumerable:s},c?Kf(zf(c),p):p};var et=$f.exports,ru={exports:{}};(function(t,u){var i=et,f=He,s=Function.prototype.apply,c=Function.prototype.call,p=Object.create,g=Object.defineProperty,m=Object.defineProperties,d=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0},w,C,F,M,H,E,B;w=function(T,S){var P;return f(S),d.call(this,"__ee__")?P=this.__ee__:(P=y.value=p(null),g(this,"__ee__",y),y.value=null),P[T]?typeof P[T]=="object"?P[T].push(S):P[T]=[P[T],S]:P[T]=S,this},C=function(T,S){var P,D;return f(S),D=this,w.call(this,T,P=function(){F.call(D,T,P),s.call(S,this,arguments)}),P.__eeOnceListener__=S,this},F=function(T,S){var P,D,Y,K;if(f(S),!d.call(this,"__ee__"))return this;if(P=this.__ee__,!P[T])return this;if(D=P[T],typeof D=="object")for(K=0;Y=D[K];++K)(Y===S||Y.__eeOnceListener__===S)&&(D.length===2?P[T]=D[K?0:1]:D.splice(K,1));else(D===S||D.__eeOnceListener__===S)&&delete P[T];return this},M=function(T){var S,P,D,Y,K;if(d.call(this,"__ee__")&&(Y=this.__ee__[T],!!Y))if(typeof Y=="object"){for(P=arguments.length,K=new Array(P-1),S=1;S=55296&&P<=56319&&(nn+=C[++E])),nn=F?d.call(F,M,nn,B):nn,H?(y.value=nn,w(T,B,y)):T[B]=nn,++B;S=B}}if(S===void 0)for(S=f(C.length),H&&(T=new H(S)),E=0;E=0?y=p(y):y=u(this.length)-p(c(y)),m=y;m"}},Yu}var $u,Da;function Lp(){if(Da)return $u;Da=1;var t=Mp(),u=/[\n\r\u2028\u2029]/g;return $u=function(i){var f=t(i);return f.length>100&&(f=f.slice(0,99)+"…"),f=f.replace(u,function(s){return JSON.stringify(s).slice(1,-1)}),f},$u}var Yr={exports:{}},qa;function Ga(){if(qa)return Yr.exports;qa=1,Yr.exports=t,Yr.exports.default=t;function t(u){return!!u&&(typeof u=="object"||typeof u=="function")&&typeof u.then=="function"}return Yr.exports}var Na;function Pp(){if(Na)return Ca;Na=1;var t=Oa(),u=Cp(),i=Tp(),f=Lp(),s=Ga(),c=Hu(),p=Object.create,g=u("then","then:finally","done","done:finally");return nt.promise=function(m,d){var y=p(null),w=p(null),C=p(null);if(m===!0)m=null;else if(m=i(m),!g[m])throw new TypeError("'"+f(m)+"' is not valid promise mode");d.on("set",function(F,M,H){var E=!1;if(!s(H)){w[F]=H,d.emit("setasync",F,1);return}y[F]=1,C[F]=H;var B=function(D){var Y=y[F];if(E)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) -Consider to rely on 'then' or 'done' mode instead.`);Y&&(delete y[F],w[F]=D,d.emit("setasync",F,Y))},T=function(){E=!0,y[F]&&(delete y[F],delete C[F],d.delete(F))},S=m;if(S||(S="then"),S==="then"){var P=function(){c(T)};H=H.then(function(D){c(B.bind(this,D))},P),typeof H.finally=="function"&&H.finally(P)}else if(S==="done"){if(typeof H.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");H.done(B,T)}else if(S==="done:finally"){if(typeof H.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof H.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");H.done(B),H.finally(T)}}),d.on("get",function(F,M,H){var E;if(y[F]){++y[F];return}E=C[F];var B=function(){d.emit("getasync",F,M,H)};s(E)?typeof E.done=="function"?E.done(B):E.then(function(){c(B)}):B()}),d.on("delete",function(F){if(delete C[F],y[F]){delete y[F];return}if(hasOwnProperty.call(w,F)){var M=w[F];delete w[F],d.emit("deleteasync",F,[M])}}),d.on("clear",function(){var F=w;w=p(null),y=p(null),C=p(null),d.emit("clearasync",t(F,function(M){return[M]}))})},Ca}var Ya={},$a;function Hp(){if($a)return Ya;$a=1;var t=He,u=Pr,i=nt,f=Function.prototype.apply;return i.dispose=function(s,c,p){var g;if(t(s),p.async&&i.async||p.promise&&i.promise){c.on("deleteasync",g=function(m,d){f.call(s,null,d)}),c.on("clearasync",function(m){u(m,function(d,y){g(y,d)})});return}c.on("delete",g=function(m,d){s(d)}),c.on("clear",function(m){u(m,function(d,y){g(y,d)})})},Ya}var Xa={},Xu,Wa;function Dp(){return Wa||(Wa=1,Xu=2147483647),Xu}var Wu,Ua;function qp(){if(Ua)return Wu;Ua=1;var t=je,u=Dp();return Wu=function(i){if(i=t(i),i>u)throw new TypeError(i+" exceeds maximum possible timeout");return i},Wu}var Ka;function Gp(){if(Ka)return Xa;Ka=1;var t=xu(),u=Pr,i=Hu(),f=Ga(),s=qp(),c=nt,p=Function.prototype,g=Math.max,m=Math.min,d=Object.create;return c.maxAge=function(y,w,C){var F,M,H,E;y=s(y),y&&(F=d(null),M=C.async&&c.async||C.promise&&c.promise?"async":"",w.on("set"+M,function(B){F[B]=setTimeout(function(){w.delete(B)},y),typeof F[B].unref=="function"&&F[B].unref(),E&&(E[B]&&E[B]!=="nextTick"&&clearTimeout(E[B]),E[B]=setTimeout(function(){delete E[B]},H),typeof E[B].unref=="function"&&E[B].unref())}),w.on("delete"+M,function(B){clearTimeout(F[B]),delete F[B],E&&(E[B]!=="nextTick"&&clearTimeout(E[B]),delete E[B])}),C.preFetch&&(C.preFetch===!0||isNaN(C.preFetch)?H=.333:H=g(m(Number(C.preFetch),1),0),H&&(E={},H=(1-H)*y,w.on("get"+M,function(B,T,S){E[B]||(E[B]="nextTick",i(function(){var P;E[B]==="nextTick"&&(delete E[B],w.delete(B),C.async&&(T=t(T),T.push(p)),P=w.memoized.apply(S,T),C.promise&&f(P)&&(typeof P.done=="function"?P.done(p,p):P.then(p,p)))}))}))),w.on("clear"+M,function(){u(F,function(B){clearTimeout(B)}),F={},E&&(u(E,function(B){B!=="nextTick"&&clearTimeout(B)}),E={})}))},Xa}var za={},Uu,ka;function Np(){if(ka)return Uu;ka=1;var t=je,u=Object.create,i=Object.prototype.hasOwnProperty;return Uu=function(f){var s=0,c=1,p=u(null),g=u(null),m=0,d;return f=t(f),{hit:function(y){var w=g[y],C=++m;if(p[C]=y,g[y]=C,!w)return++s,s<=f?void 0:(y=p[c],d(y),y);if(delete p[w],c===w)for(;!i.call(p,++c););},delete:d=function(y){var w=g[y];if(w&&(delete p[w],delete g[y],--s,c===w)){if(!s){m=0,c=1;return}for(;!i.call(p,++c););}},clear:function(){s=0,c=1,p=u(null),g=u(null),m=0}}},Uu}var Va;function Yp(){if(Va)return za;Va=1;var t=je,u=Np(),i=nt;return i.max=function(f,s,c){var p,g,m;f=t(f),f&&(g=u(f),p=c.async&&i.async||c.promise&&i.promise?"async":"",s.on("set"+p,m=function(d){d=g.hit(d),d!==void 0&&s.delete(d)}),s.on("get"+p,m),s.on("delete"+p,g.delete),s.on("clear"+p,g.clear))},za}var Za={},Ja;function $p(){if(Ja)return Za;Ja=1;var t=et,u=nt,i=Object.create,f=Object.defineProperties;return u.refCounter=function(s,c,p){var g,m;g=i(null),m=p.async&&u.async||p.promise&&u.promise?"async":"",c.on("set"+m,function(d,y){g[d]=y||1}),c.on("get"+m,function(d){++g[d]}),c.on("delete"+m,function(d){delete g[d]}),c.on("clear"+m,function(){g={}}),f(c.memoized,{deleteRef:t(function(){var d=c.get(arguments);return d===null||!g[d]?null:--g[d]?!1:(c.delete(d),!0)}),getRefCount:t(function(){var d=c.get(arguments);return d===null||!g[d]?0:g[d]})})},Za}var Xp=Sf,Wp=Rf,Up=bp,Kp=function(t){var u=Xp(arguments[1]),i;return u.normalizer||(i=u.length=Wp(u.length,t.length,u.async),i!==0&&(u.primitive?i===!1?u.normalizer=xp():i>1&&(u.normalizer=wp()(i)):i===!1?u.normalizer=Rp()():i===1?u.normalizer=Op()():u.normalizer=Ip()(i))),u.async&&Fp(),u.promise&&Pp(),u.dispose&&Hp(),u.maxAge&&Gp(),u.max&&Yp(),u.refCounter&&$p(),Up(t,u)},zp=wn(Kp);function kp(t,u,i,f,s){Qa(t,u,i||0,f||t.length-1,s||Vp)}function Qa(t,u,i,f,s){for(;f>i;){if(f-i>600){var c=f-i+1,p=u-i+1,g=Math.log(c),m=.5*Math.exp(2*g/3),d=.5*Math.sqrt(g*m*(c-m)/c)*(p-c/2<0?-1:1),y=Math.max(i,Math.floor(u-p*m/c+d)),w=Math.min(f,Math.floor(u+(c-p)*m/c+d));Qa(t,u,y,w,s)}var C=t[u],F=i,M=f;for(Jt(t,i,u),s(t[f],C)>0&&Jt(t,i,f);F0;)M--}s(t[i],C)===0?Jt(t,i,M):(M++,Jt(t,M,f)),M<=u&&(i=M+1),u<=M&&(f=M-1)}}function Jt(t,u,i){var f=t[u];t[u]=t[i],t[i]=f}function Vp(t,u){return tu?1:0}class Zp{constructor(u=9){this._maxEntries=Math.max(4,u),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(u){let i=this.data;const f=[];if(!Xr(u,i))return f;const s=this.toBBox,c=[];for(;i;){for(let p=0;p=0&&c[i].children.length>this._maxEntries;)this._split(c,i),i--;this._adjustParentBBoxes(s,c,i)}_split(u,i){const f=u[i],s=f.children.length,c=this._minEntries;this._chooseSplitAxis(f,c,s);const p=this._chooseSplitIndex(f,c,s),g=xt(f.children.splice(p,f.children.length-p));g.height=f.height,g.leaf=f.leaf,bt(f,this.toBBox),bt(g,this.toBBox),i?u[i-1].children.push(g):this._splitRoot(f,g)}_splitRoot(u,i){this.data=xt([u,i]),this.data.height=u.height+1,this.data.leaf=!1,bt(this.data,this.toBBox)}_chooseSplitIndex(u,i,f){let s,c=1/0,p=1/0;for(let g=i;g<=f-i;g++){const m=Qt(u,0,g,this.toBBox),d=Qt(u,g,f,this.toBBox),y=eg(m,d),w=Ku(m)+Ku(d);y=i;d--){const y=u.children[d];jt(g,u.leaf?c(y):y),m+=$r(g)}return m}_adjustParentBBoxes(u,i,f){for(let s=f;s>=0;s--)jt(i[s],u)}_condense(u){for(let i=u.length-1,f;i>=0;i--)u[i].children.length===0?i>0?(f=u[i-1].children,f.splice(f.indexOf(u[i]),1)):this.clear():bt(u[i],this.toBBox)}}function Jp(t,u,i){if(!i)return u.indexOf(t);for(let f=0;f=t.minX&&u.maxY>=t.minY}function xt(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ja(t,u,i,f,s){const c=[u,i];for(;c.length;){if(i=c.pop(),u=c.pop(),i-u<=f)continue;const p=u+Math.ceil((i-u)/f/2)*f;kp(t,p,u,i,s),c.push(u,p,p,i)}}class tg extends Zp{toBBox(u){return{minX:u.left,minY:u.top,maxX:u.right,maxY:u.bottom}}compareMinX(u,i){return u.left-i.left}compareMinY(u,i){return u.top-i.top}}const rg={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:1e3/60,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:2,minScale:1,dtMax:1.5,dtMin:1.1}};var ns={exports:{}};(function(t){var u=Object.prototype.hasOwnProperty,i="~";function f(){}Object.create&&(f.prototype=Object.create(null),new f().__proto__||(i=!1));function s(m,d,y){this.fn=m,this.context=d,this.once=y||!1}function c(m,d,y,w,C){if(typeof y!="function")throw new TypeError("The listener must be a function");var F=new s(y,w||m,C),M=i?i+d:d;return m._events[M]?m._events[M].fn?m._events[M]=[m._events[M],F]:m._events[M].push(F):(m._events[M]=F,m._eventsCount++),m}function p(m,d){--m._eventsCount===0?m._events=new f:delete m._events[d]}function g(){this._events=new f,this._eventsCount=0}g.prototype.eventNames=function(){var d=[],y,w;if(this._eventsCount===0)return d;for(w in y=this._events)u.call(y,w)&&d.push(i?w.slice(1):w);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(y)):d},g.prototype.listeners=function(d){var y=i?i+d:d,w=this._events[y];if(!w)return[];if(w.fn)return[w.fn];for(var C=0,F=w.length,M=new Array(F);C=6&&(i-=6),$(i<1?255*((u-t)*i+t):i<3?255*u:i<4?255*((u-t)*(4-i)+t):255*t)},On=function(t,u,i){u/=100;var f=(i/=100)<=.5?i*(u+1):i+u-i*u,s=2*i-f;return{r:Ju(s,f,(t/=60)+2),g:Ju(s,f,t),b:Ju(s,f,t-2)}},Qu=function(t,u,i,f){return{r:$(255*(1-t)*(f=1-f)),g:$(255*(1-u)*f),b:$(255*(1-i)*f)}},rs=function(t,u,i){t/=255,u/=255,i/=255;var f=1-Math.max(t,u,i),s=1-f,c=s&&(s-u)/s,p=s&&(s-i)/s;return{c:$(100*(s&&(s-t)/s)),m:$(100*c),y:$(100*p),k:$(100*f)}},At=function(t,u,i,f){f===void 0&&(f=1),t/=255,u/=255,i/=255,f=Math.min(f,1);var s=Math.max(t,u,i),c=Math.min(t,u,i),p=s-c,g=0,m=0,d=(s+c)/2;if(p!==0){switch(s){case t:g=(u-i)/p%6;break;case u:g=(i-t)/p+2;break;case i:g=(t-u)/p+4}(g=$(60*g))<0&&(g+=360),m=p/(1-Math.abs(2*d-1))}return{h:g,s:$(100*m),l:$(100*d),a:f}},is=function(t,u){if(t<0&&(t+=360),t>360&&(t-=360),t===360||t===0)return t;var i=[[0,120],[120,180],[180,240],[240,360]],f=[[0,60],[60,120],[120,240],[240,360]],s=u?f:i,c=0,p=0,g=0,m=0;return(u?i:f).find(function(d,y){return t>=d[0]&&t360||t<0)&&(t-=360*Math.floor(t/360)),t},Ln=function(t){return typeof t=="string"&&(t=wt.test(t)?Ur(t)/100:+t),isNaN(+t)||t>1?1:$(t)},St=function(t,u,i){return u.reduce(function(f,s){return ku(ku([],f,!0),[en(en({},t),{h:i===qn.ADDITIVE?ur(t.h+s):ur(is(is(t.h,!1)+s,!0))})],!1)},[en({},t)])},hg=function(t,u){return St(t,[30,-30],u)},pg=function(t,u){return St(t,[180],u)},gg=function(t,u){return St(t,[150,-150],u)},dg=function(t,u){return St(t,[120,-120],u)},vg=function(t,u){return St(t,[60,-120,180],u)},mg=function(t,u){return St(t,[90,-90,180],u)},Zn=function(t){return typeof t=="string"?function(u){var i;if(Object.keys(z).some(function(f){if(ir[f].test(u))return i=f,!0}),!i&&~es.indexOf(u)&&(i=z.HEX),!i)throw new Error(lg);return i}(t):function(u){var i,f=!1,s=ts(Object.keys(u));if(Vu[s]&&(i=Vu[s]),i&&i===z.RGB){var c=Object.entries(u).some(function(g){return!Zu.test("".concat(g[1]))}),p=Object.entries(u).some(function(g){return!(wt.test("".concat(g[1]))||!Zu.test("".concat(g[1]))&&!isNaN(+g[1])&&+g[1]<=255)});c&&p&&(f=!0),c||(i=z.HEX)}if(!i||f)throw new Error(cg);return i}(t)},_g=((tr={})[z.HEX]=function(t){var u=(~es.indexOf(t)?Wr[t]:t).match(ir.HEX),i={r:zr(u[1]||u[5]),g:zr(u[2]||u[6]),b:zr(u[3]||u[7])},f=u[4]||u[8];return f!==void 0&&(i.a=zr(f)/255),i},tr[z.RGB]=function(t){var u=t.match(ir.RGB),i=it(u[1]||u[5]),f=it(u[2]||u[6]),s=it(u[3]||u[7]),c=u[4]||u[8],p={r:Math.min(i,255),g:Math.min(f,255),b:Math.min(s,255)};return c!==void 0&&(p.a=Ln(c)),p},tr[z.HSL]=function(t){var u=t.match(ir.HSL),i=ur(u[1]||u[5]),f=Kr(u[2]||u[6]),s=Kr(u[3]||u[7]),c=u[4]||u[8],p=On(i,f,s);return c!==void 0&&(p.a=Ln(c)),p},tr[z.CMYK]=function(t){var u=t.match(ir.CMYK),i=De(u[1]||u[6]),f=De(u[2]||u[7]),s=De(u[3]||u[8]),c=De(u[4]||u[9]),p=u[5]||u[10],g=Qu(i,f,s,c);return p!==void 0&&(g.a=Ln(p)),g},tr),yg=((rr={})[z.HEX]=function(t){var u={r:it("".concat(t.r)),g:it("".concat(t.g)),b:it("".concat(t.b))};return Bn(t,"a")&&(u.a=Math.min(it("".concat(t.a),!0),1)),u},rr[z.RGB]=function(t){return this.HEX(t)},rr[z.HSL]=function(t){var u=Kr("".concat(t.s)),i=Kr("".concat(t.l)),f=On(ur(t.h),u,i);return Bn(t,"a")&&(f.a=Ln(t.a)),f},rr[z.CMYK]=function(t){var u=De("".concat(t.c)),i=De("".concat(t.m)),f=De("".concat(t.y)),s=De("".concat(t.k)),c=Qu(u,i,f,s);return Bn(t,"a")&&(c.a=Ln(t.a)),c},rr),ut=function(t,u){return u===void 0&&(u=Zn(t)),typeof t=="string"?_g[u](t):yg[u](t)},tn=((Se={})[z.HEX]=function(t){return{r:kr(t.r),g:kr(t.g),b:kr(t.b)}},Se.HEXA=function(t){var u=tn.HEX(t);return u.a=Bn(t,"a")?kr(255*t.a):"0xFF",u},Se[z.RGB]=function(t,u){return Bn(t,"a")&&delete t.a,ot(t,u)},Se.RGBA=function(t,u){return t.a=Bn(t,"a")?$(t.a):1,ot(t,u)},Se[z.HSL]=function(t,u){var i=At(t.r,t.g,t.b);return delete i.a,Ot(i,u)},Se.HSLA=function(t,u){var i=tn.HSL(t,u);return i.a=Bn(t,"a")?$(t.a,u):1,i},Se[z.CMYK]=function(t,u){return bg(rs(t.r,t.g,t.b),u)},Se.CMYKA=function(t,u){var i=tn.CMYK(t,u);return i.a=Bn(t,"a")?$(t.a,u):1,i},Se),us=function(t,u,i,f){var s=Zn(t),c=typeof t=="string",p=ut(t,s),g=typeof t=="string"&&Bn(p,"a")||typeof t!="string"&&Bn(t,"a"),m=At(p.r,p.g,p.b,p.a);g||delete m.a;var d=i?m.l/(u+1):(100-m.l)/(u+1),y=Array(u).fill(null).map(function(w,C){return en(en({},m),{l:m.l+d*(C+1)*(1-2*+i)})});switch(s){case z.HEX:default:return y.map(function(w){var C=On(w.h,w.s,w.l);return g&&(C.a=w.a),c?g?j.HEX(ot(en(en({},C),{a:$(255*C.a)}),f)):j.HEX(ot(C,f)):g?tn.HEXA(C):tn.HEX(C)});case z.RGB:return y.map(function(w){var C=On(w.h,w.s,w.l);return g&&(C.a=w.a),c?j.RGB(ot(C,f)):g?tn.RGBA(C,f):tn.RGB(C,f)});case z.HSL:return y.map(function(w){return c?j.HSL(Ot(w,f)):g?tn.HSLA(en(en({},On(w.h,w.s,w.l)),{a:w.a}),f):tn.HSL(On(w.h,w.s,w.l),f)})}},Et=((tt={buildHarmony:function(t,u,i,f){var s=Zn(t),c=ut(t,s),p=At(c.r,c.g,c.b,c.a),g=typeof t=="string"&&Bn(c,"a")||typeof t!="string"&&Bn(t,"a"),m=typeof t=="string";switch(s){case z.HEX:default:return g?this.HEXA(Ot(p,0),u,i,m):this.HEX(Ot(p,0),u,i,m);case z.HSL:return g?this.HSLA(p,u,i,m,f):this.HSL(p,u,i,m,f);case z.RGB:return g?this.RGBA(p,u,i,m,f):this.RGB(p,u,i,m,f)}}})[z.HEX]=function(t,u,i,f){return u(t,i).map(function(s){return f?j.HEX(On(s.h,s.s,s.l)):tn.HEX(On(s.h,s.s,s.l))})},tt.HEXA=function(t,u,i,f){return u(t,i).map(function(s){return f?j.HEX(en(en({},On(s.h,s.s,s.l)),{a:255*Ln(s.a)})):tn.HEXA(en(en({},On(s.h,s.s,s.l)),{a:Ln(s.a)}))})},tt[z.RGB]=function(t,u,i,f,s){return u(t,i).map(function(c){return f?j.RGB(ot(On(c.h,c.s,c.l),s)):tn.RGB(On(c.h,c.s,c.l),s)})},tt.RGBA=function(t,u,i,f,s){return u(t,i).map(function(c){return f?j.RGB(ot(en(en({},On(c.h,c.s,c.l)),{a:Ln(c.a)}),s)):tn.RGBA(en(en({},On(c.h,c.s,c.l)),{a:Ln(c.a)}),s)})},tt[z.HSL]=function(t,u,i,f,s){return u(t,i).map(function(c){return f?j.HSL(Ot({h:c.h,s:c.s,l:c.l},s)):tn.HSL(On(c.h,c.s,c.l),s)})},tt.HSLA=function(t,u,i,f,s){return u(t,i).map(function(c){return f?j.HSL(Ot(en(en({},c),{a:Ln(c.a)}),s)):tn.HSLA(en(en({},On(c.h,c.s,c.l)),{a:Ln(c.a)}),s)})},tt),Rt=((rt={mix:function(t,u){var i,f,s,c,p,g,m,d,y,w,C,F,M,H,E,B=t.map(function(D){var Y=Zn(D);return ut(D,Y)}),T=u===qn.SUBTRACTIVE?B.map(function(D){var Y,K,nn,mn,ve,Ee,me,ar,at,sr,lr,ae,Gn,Tt,st=(Y=D.r,K=D.g,nn=D.b,mn=Math.min(Y,K,nn),ve=Math.min(255-Y,255-K,255-nn),Ee=Y-mn,me=K-mn,ar=nn-mn,at=Math.min(Ee,me),sr=Ee-at,lr=(me+at)/2,ae=(ar+me-at)/2,Gn=Math.max(sr,lr,ae)/Math.max(Ee,me,ar),Tt=isNaN(Gn)||Gn===1/0||Gn<=0?1:Gn,{r:sr/Tt+ve,y:lr/Tt+ve,b:ae/Tt+ve});return Bn(D,"a")&&(st.a=D.a),st}):null;function S(D){var Y=u===qn.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return D.reduce(function(K,nn){var mn=Bn(nn,"a")?nn.a:1,ve={r:Math.min(K.r+nn.r*mn,255),b:Math.min(K.b+nn.b*mn,255),a:1-(1-mn)*(1-K.a)},Ee="g"in K?K.g:K.y,me="g"in nn?nn.g:nn.y;return en(en({},ve),u===qn.ADDITIVE?{g:Math.min(Ee+me*mn,255)}:{y:Math.min(Ee+me*mn,255)})},Y)}if(u===qn.ADDITIVE)i=S(B);else{var P=S(T);f=P.r,s=P.y,c=P.b,p=Math.min(f,s,c),g=Math.min(255-f,255-s,255-c),m=f-p,d=s-p,y=c-p,w=Math.min(d,y),C=m+d-w,F=d+w,M=2*(y-w),H=Math.max(C,F,M)/Math.max(m,d,y),E=isNaN(H)||H===1/0||H<=0?1:H,(i={r:C/E+g,g:F/E+g,b:M/E+g}).a=P.a}return{r:$(i.r),g:$(i.g),b:$(i.b),a:fe(i.a,0,1)}}})[z.HEX]=function(t,u,i){var f=this.mix(t,u);return delete f.a,i?j.HEX(f):tn.HEX(f)},rt.HEXA=function(t,u,i){var f=this.mix(t,u);return f.a=i?255*Ln(f.a):Ln(f.a),i?j.HEX(f):tn.HEXA(f)},rt[z.RGB]=function(t,u,i,f){var s=this.mix(t,u);return delete s.a,i?j.RGB(s):tn.RGB(s,f)},rt.RGBA=function(t,u,i,f){var s=this.mix(t,u);return i?j.RGB(s):tn.RGBA(s,f)},rt[z.HSL]=function(t,u,i,f){var s=this.mix(t,u),c=At(s.r,s.g,s.b);return delete s.a,delete c.a,i?j.HSL(c):tn.HSL(s,f)},rt.HSLA=function(t,u,i,f){var s=this.mix(t,u),c=At(s.r,s.g,s.b,s.a);return i?j.HSL(c):tn.HSLA(s,f)},rt),ot=function(t,u){return en({r:$(t.r,u),g:$(t.g,u),b:$(t.b,u)},Bn(t,"a")?{a:$(t.a,u)}:{})},Ot=function(t,u){return en({h:$(t.h,u),s:$(t.s,u),l:$(t.l,u)},Bn(t,"a")?{a:$(t.a,u)}:{})},bg=function(t,u){return{c:$(t.c,u),m:$(t.m,u),y:$(t.y,u),k:$(t.k,u)}},qe=function(t,u,i,f,s,c){var p=s(ut(t,u),f);return i?c(p):p},It=function(t,u,i,f,s,c,p){i<1&&(i=5);var g=function(m,d,y){var w=y-1,C=(d.r-m.r)/w,F=(d.g-m.g)/w,M=(d.b-m.b)/w,H=Ln(m.a),E=(Ln(d.a)-H)/w;return Array(y).fill(null).map(function(B,T){return T===0?m:T===w?d:{r:$(m.r+C*T),g:$(m.g+F*T),b:$(m.b+M*T),a:$(H+E*T)}})}(ut(t),ut(u),i);return g.map(function(m){var d=c(m,s);return f?p(d):d})},xg=function(){function t(u,i){i===void 0&&(i=6),this.rgb=ut(u),this._decimals=i,this.updateHSL(),this.updateCMYK()}return t.prototype.updateRGB=function(){this.rgb=en(en({},On(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},t.prototype.updateRGBFromCMYK=function(){this.rgb=en(en({},Qu(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},t.prototype.updateHSL=function(){this.hsl=At(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},t.prototype.updateCMYK=function(){this.cmyk=rs(this.rgb.r,this.rgb.g,this.rgb.b)},t.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},t.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},t.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},t.prototype.setDecimals=function(u){return this._decimals=u,this},t.prototype.setH=function(u){return this.hsl.h=ur(u),this.updateRGBAndCMYK()},t.prototype.setS=function(u){return this.hsl.s=fe(u,0,100),this.updateRGBAndCMYK()},t.prototype.setL=function(u){return this.hsl.l=fe(u,0,100),this.updateRGBAndCMYK()},t.prototype.setR=function(u){return this.rgb.r=fe(u,0,255),this.updateHSLAndCMYK()},t.prototype.setG=function(u){return this.rgb.g=fe(u,0,255),this.updateHSLAndCMYK()},t.prototype.setB=function(u){return this.rgb.b=fe(u,0,255),this.updateHSLAndCMYK()},t.prototype.setA=function(u){return this.hsl.a=this.rgb.a=fe(u,0,1),this},t.prototype.setC=function(u){return this.cmyk.c=fe(u,0,100),this.updateRGBAndHSL()},t.prototype.setM=function(u){return this.cmyk.m=fe(u,0,100),this.updateRGBAndHSL()},t.prototype.setY=function(u){return this.cmyk.y=fe(u,0,100),this.updateRGBAndHSL()},t.prototype.setK=function(u){return this.cmyk.k=fe(u,0,100),this.updateRGBAndHSL()},Object.defineProperty(t.prototype,"decimals",{get:function(){return this._decimals},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"H",{get:function(){return $(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"S",{get:function(){return $(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"L",{get:function(){return $(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"R",{get:function(){return $(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"G",{get:function(){return $(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"B",{get:function(){return $(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"A",{get:function(){return $(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"C",{get:function(){return $(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"M",{get:function(){return $(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Y",{get:function(){return $(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"K",{get:function(){return $(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXObject",{get:function(){return tn.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXAObject",{get:function(){return tn.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBAObject",{get:function(){return en(en({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLAObject",{get:function(){return en(en({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKAObject",{get:function(){return en(en({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEX",{get:function(){return j.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXA",{get:function(){return j.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGB",{get:function(){return j.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBA",{get:function(){return j.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSL",{get:function(){return j.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLA",{get:function(){return j.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYK",{get:function(){return j.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKA",{get:function(){return j.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),t.toHEX=function(u,i){i===void 0&&(i=!0);var f=Zn(u);return qe(u,f,i,0,tn.HEX,j.HEX)},t.toHEXA=function(u,i){i===void 0&&(i=!0);var f=Zn(u);return qe(u,f,i,0,tn.HEXA,j.HEX)},t.toRGB=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.RGB,j.RGB)},t.toRGBA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.RGBA,j.RGB)},t.toHSL=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.HSL,j.HSL)},t.toHSLA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.HSLA,j.HSL)},t.toCMYK=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.CMYK,j.CMYK)},t.toCMYKA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.CMYKA,j.CMYK)},t.getBlendHEX=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.HEX,j.HEX)},t.getBlendHEXA=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.HEXA,j.HEX)},t.getBlendRGB=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.RGB,j.RGB)},t.getBlendRGBA=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.RGBA,j.RGB)},t.getBlendHSL=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.HSL,j.HSL)},t.getBlendHSLA=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.HSLA,j.HSL)},t.getMixHEX=function(u,i,f){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),Rt.HEX(u,i,f)},t.getMixHEXA=function(u,i,f){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),Rt.HEXA(u,i,f)},t.getMixRGB=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.RGB(u,i,f,s)},t.getMixRGBA=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.RGBA(u,i,f,s)},t.getMixHSL=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.HSL(u,i,f,s)},t.getMixHSLA=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.HSLA(u,i,f,s)},t.getShades=function(u,i,f){return f===void 0&&(f=6),us(u,i,!0,f)},t.getTints=function(u,i,f){return f===void 0&&(f=6),us(u,i,!1,f)},t.getHarmony=function(u,i,f,s){return i===void 0&&(i=Ae.COMPLEMENTARY),f===void 0&&(f=qn.ADDITIVE),s===void 0&&(s=6),function(c,p,g,m){var d;return(d={},d[Ae.ANALOGOUS]=Et.buildHarmony(p,hg,m,g),d[Ae.COMPLEMENTARY]=Et.buildHarmony(p,pg,m,g),d[Ae.SPLIT_COMPLEMENTARY]=Et.buildHarmony(p,gg,m,g),d[Ae.TRIADIC]=Et.buildHarmony(p,dg,m,g),d[Ae.TETRADIC]=Et.buildHarmony(p,vg,m,g),d[Ae.SQUARE]=Et.buildHarmony(p,mg,m,g),d)[c]}(i,u,s,f)},t}();const wg={current:void 0,parent:void 0,events:void 0,color:{source:2533018,destination:15753874,expanding:16733986,updating:16733986,generating:16771899,closing:11583173,end:15483002},scale:10,fill:"#000000",alpha:1},{ceil:In,PI:Ag}=Math,or=(t,u)=>new xg(t).setA(u??wg.alpha).RGBA,Sg=(t,u)=>or(t,u);function Ge(t,u){return{width:t.width*u.scale.x,height:t.height*u.scale.y,x:t.x*u.scale.x+u.x,y:t.y*u.scale.y+u.y}}const ju={text:{draw(t,u,i){if(t.text){const f=Ge(t,{x:t.textX,y:t.textY,scale:{x:1,y:1}}),s=Ge(f,i);u.font=`${t.fontSize*i.scale.x}px Arial`,u.fillStyle=or(t.fontColor,t.alpha),u.fillText(t.text,s.x,s.y)}},test(t){return{left:-1/0,right:1/0,top:-1/0,bottom:1/0}}},path:{draw(t,u,i){const[f,...s]=t.points;u.beginPath(),u.lineCap="round",u.lineJoin="round",u.strokeStyle=Sg(t.fill,t.alpha);const{x:c,y:p,width:g}=Ge({...f,width:t.lineWidth,height:0},i);u.lineWidth=In(g),u.moveTo(In(c),In(p));for(const m of s){const{x:d,y}=Ge({...m,width:0,height:0},i);u.lineTo(In(d),In(y))}u.stroke()},test(t){var u,i,f,s;return{left:((u=vn.minBy(t.points,"x"))==null?void 0:u.x)??0-t.lineWidth??0,right:((i=vn.maxBy(t.points,"x"))==null?void 0:i.x)??0+t.lineWidth??0,top:((f=vn.minBy(t.points,"y"))==null?void 0:f.y)??0-t.lineWidth??0,bottom:((s=vn.maxBy(t.points,"y"))==null?void 0:s.y)??0+t.lineWidth??0}}},rect:{draw(t,u,i){const{x:f,y:s,width:c,height:p}=Ge(t,i);u.fillStyle=or(t.fill,t.alpha),u.fillRect(In(f),In(s),In(c)||1,In(p)||1)},test(t){return{left:t.x,right:t.x+t.width,top:t.y,bottom:t.y+t.height}}},polygon:{draw(t,u,i){const[f,...s]=t.points;u.beginPath(),u.fillStyle=or(t.fill,t.alpha);const{x:c,y:p}=Ge({...f,width:0,height:0},i);u.moveTo(In(c),In(p));for(const g of s){const{x:m,y:d}=Ge({...g,width:0,height:0},i);u.lineTo(In(m),In(d))}u.closePath(),u.fill()},test(t){var u,i,f,s;return{left:((u=vn.minBy(t.points,"x"))==null?void 0:u.x)??0,right:((i=vn.maxBy(t.points,"x"))==null?void 0:i.x)??0,top:((f=vn.minBy(t.points,"y"))==null?void 0:f.y)??0,bottom:((s=vn.maxBy(t.points,"y"))==null?void 0:s.y)??0}}},circle:{draw(t,u,i){u.fillStyle=or(t.fill,t.alpha),u.beginPath();const f=Ge({...t,width:t.radius,height:t.radius},i);u.ellipse(In(f.x),In(f.y),In(f.width),In(f.height),0,0,2*Ag),u.fill()},test(t){return{left:t.x-t.radius,right:t.x+t.radius,top:t.y-t.radius,bottom:t.y+t.radius}}}},Eg=t=>new Error(`The component ${t.$} is not supported by this renderer.`);function os(t,u,i,f){if(t in ju)ju[t].draw(u,i,f);else throw Eg(u)}const Rg=(t,u,i)=>{os(t.$,t,u,i),t.text&&os("text",t,u,i)},Og=({x:t,y:u})=>{const i=Math.abs(t),f=Math.abs(u),s=Math.max(i,f),c=2*s,p=Math.pow(c-1,2);return t==s&&u>-s?p+u-(-s+1):u==s?p+s-t+c-1:t==-s?p+s-u+2*c-1:u==-s?p+t+s+3*c-1:0},fs=JSON.stringify,{log2:Ig,max:Fg}=Math,as=t=>vn.floor(Ig(t+1));function Cg({right:t,left:u,bottom:i,top:f},s){const c=Fg(as(t-u),as(i-f))-s,p=2**c,g={left:vn.floor(u/p),right:vn.ceil((t+1)/p),top:vn.floor(f/p),bottom:vn.ceil((i+1)/p)};return{zoom:c,order:p,tiles:vn.shuffle(Uc({x:vn.range(g.left,g.right+1),y:vn.range(g.top,g.bottom+1)}).map(m=>{const d=m.x*p,y=m.y*p;return{tile:m,bounds:{left:d-p/2,right:d+p/2,top:y-p/2,bottom:y+p/2}}}))}}const Bg=200;class Tg extends og{constructor(){super(...arguments);oe(this,Jr);oe(this,ft);oe(this,Qr);oe(this,jr);oe(this,Jn,void 0);oe(this,Ft,void 0);oe(this,Ne,void 0);oe(this,Ye,void 0);oe(this,fr,void 0);oe(this,Ct,void 0);oe(this,Bt,void 0);de(this,Jn,rg),de(this,Ft,{bottom:256,top:0,left:0,right:256}),de(this,Ne,new tg(16)),de(this,Ye,{}),de(this,fr,0),de(this,Ct,{}),de(this,Bt,vn.once(()=>vn.debounce(()=>this.render(),yn(this,Jn).refreshInterval,{leading:!1,trailing:!0}))),this.renderTile=zp((i,f)=>Je(this,jr,Wc).call(this,i,f),{normalizer:JSON.stringify,max:Bg})}getView(){return{system:yn(this,Ne),world:yn(this,Ye)}}setFrustum(i){de(this,Ft,i),yn(this,Bt).call(this)()}setTileResolution(i){vn.isEqual(i,yn(this,Jn).tileResolution)||(Object.assign(yn(this,Jn),{tileResolution:i}),Je(this,ft,Mr).call(this))}add(i,f){const s=vn.map(i,c=>({...ju[c.$].test(c),component:c,index:Je(this,Jr,$c).call(this)}));yn(this,Ne).load(s),yn(this,Ye)[f]=s,Je(this,ft,Mr).call(this)}remove(i){for(const f of yn(this,Ye)[i])yn(this,Ne).remove(f);delete yn(this,Ye)[i],Je(this,ft,Mr).call(this)}setup(i){de(this,Jn,i),Je(this,ft,Mr).call(this)}async render(){for(const{tile:i,bounds:f}of Cg(yn(this,Ft),yn(this,Jn).tileSubdivision).tiles)if(Je(this,Qr,Xc).call(this,i)){const s=this.renderTile(f,yn(this,Jn).tileResolution);s&&this.emit("message",{action:"update",payload:{bounds:f,bitmap:s}},[])}}}Jn=new WeakMap,Ft=new WeakMap,Ne=new WeakMap,Ye=new WeakMap,fr=new WeakMap,Jr=new WeakSet,$c=function(){return Yc(this,fr)._++},Ct=new WeakMap,ft=new WeakSet,Mr=function(){this.renderTile.clear(),yn(this,Bt).call(this)()},Bt=new WeakMap,Qr=new WeakSet,Xc=function({x:i,y:f}){const{workerCount:s,workerIndex:c}=yn(this,Jn);return Og({x:i,y:f})%s===c},jr=new WeakSet,Wc=function(i,f){const{top:s,right:c,bottom:p,left:g}=i,m={x:f.width/(c-g),y:f.height/(p-s)},d=vn.sortBy(yn(this,Ne).search({minX:g,maxX:c,maxY:p,minY:s}),"index"),y=fs(vn.map(d,"index")),w=fs([s,c,p,g]),C=yn(this,Ct)[w];if(!C||y!==C.hash){const F=new OffscreenCanvas(f.width,f.height),M=F.getContext("2d",{alpha:!1});M.imageSmoothingEnabled=!1,M.fillStyle=yn(this,Jn).backgroundColor,M.fillRect(0,0,f.width,f.height);const H=f.width*.05,E=1;M.fillStyle="rgba(127,127,127,0.36)",M.fillRect((f.width-H)/2,(f.height-E)/2,H,E),M.fillRect((f.width-E)/2,(f.height-H)/2,E,H);for(const{component:T}of d)Rg(T,M,{scale:m,x:-g*m.x,y:-s*m.y});const B=F.transferToImageBitmap();return yn(this,Ct)[w]={hash:y,tile:B},B}else return C.tile};const ss=new Tg;ss.on("message",(t,u)=>self.postMessage(t,u)),self.onmessage=t=>{const{action:u,payload:i}=t.data;ss[u](...i)}})(); diff --git a/assets/index-7e38d485.js b/assets/index-f007fb49.js similarity index 86% rename from assets/index-7e38d485.js rename to assets/index-f007fb49.js index 6055057b..fec24339 100644 --- a/assets/index-7e38d485.js +++ b/assets/index-f007fb49.js @@ -14,7 +14,7 @@ var gie=Object.defineProperty;var vie=(e,t,n)=>t in e?gie(e,t,{enumerable:!0,con * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Die=I,Lie=Symbol.for("react.element"),Nie=Symbol.for("react.fragment"),Bie=Object.prototype.hasOwnProperty,$ie=Die.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Fie={key:!0,ref:!0,__self:!0,__source:!0};function vq(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Bie.call(t,r)&&!Fie.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Lie,type:e,key:o,ref:s,props:i,_owner:$ie.current}}qC.Fragment=Nie;qC.jsx=vq;qC.jsxs=vq;lq.exports=qC;var C=lq.exports;const zie={black:"#000",white:"#fff"},dg=zie,jie={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},qu=jie,Uie={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},yq=Uie,Hie={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},kh=Hie,Wie={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"},bq=Wie,Gie={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},Vie=Gie,qie={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Xu=qie,Xie={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Ah=Xie,Yie={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},Kie=Yie,Qie={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"},Jie=Qie,Zie={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Yu=Zie,eoe={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"},toe=eoe,noe={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"},roe=noe,ioe={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"},xq=ioe,ooe={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"},soe=ooe,aoe={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},zh=aoe,loe={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"},coe=loe,uoe={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"},doe=uoe,foe={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},y5=foe,hoe={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"},poe=hoe,wq=Object.freeze(Object.defineProperty({__proto__:null,amber:soe,blue:Xu,blueGrey:poe,brown:doe,common:dg,cyan:Kie,deepOrange:coe,deepPurple:bq,green:Yu,grey:y5,indigo:Vie,lightBlue:Ah,lightGreen:toe,lime:roe,orange:zh,pink:yq,purple:kh,red:qu,teal:Jie,yellow:xq},Symbol.toStringTag,{value:"Module"}));function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[n]=_q(e[n])}),t}function Uo(e,t,n={clone:!0}){const r=n.clone?$({},e):e;return jh(e)&&jh(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(jh(t[i])&&i in e&&jh(e[i])?r[i]=Uo(e[i],t[i],n):n.clone?r[i]=jh(t[i])?_q(t[i]):t[i]:r[i]=t[i])}),r}var Sq={exports:{}},moe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",goe=moe,voe=goe;function Eq(){}function Cq(){}Cq.resetWarningCache=Eq;var yoe=function(){function e(r,i,o,s,l,c){if(c!==voe){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Cq,resetWarningCache:Eq};return n.PropTypes=n,n};Sq.exports=yoe();var Vg=Sq.exports;const q0=js(Vg);function Od(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nn==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function XC(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function dS(e,t){var n,r;return I.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Ar(e){return e&&e.ownerDocument||document}function bu(e){return Ar(e).defaultView||window}function n$(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const boe=typeof window<"u"?I.useLayoutEffect:I.useEffect,Ao=boe;let o6=0;function xoe(e){const[t,n]=I.useState(e),r=e||t;return I.useEffect(()=>{t==null&&(o6+=1,n(`mui-${o6}`))},[t]),r}const s6=JS["useId".toString()];function b5(e){if(s6!==void 0){const t=s6();return e??t}return xoe(e)}function Ix({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=I.useRef(e!==void 0),[o,s]=I.useState(t),l=i?e:o,c=I.useCallback(d=>{i||s(d)},[]);return[l,c]}function Zi(e){const t=I.useRef(e);return Ao(()=>{t.current=e}),I.useCallback((...n)=>(0,t.current)(...n),[])}function mr(...e){return I.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{n$(n,t)})},e)}let YC=!0,r$=!1,a6;const woe={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function _oe(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&woe[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Soe(e){e.metaKey||e.altKey||e.ctrlKey||(YC=!0)}function vD(){YC=!1}function Eoe(){this.visibilityState==="hidden"&&r$&&(YC=!0)}function Coe(e){e.addEventListener("keydown",Soe,!0),e.addEventListener("mousedown",vD,!0),e.addEventListener("pointerdown",vD,!0),e.addEventListener("touchstart",vD,!0),e.addEventListener("visibilitychange",Eoe,!0)}function Toe(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return YC||_oe(t)}function x5(){const e=I.useCallback(i=>{i!=null&&Coe(i.ownerDocument)},[]),t=I.useRef(!1);function n(){return t.current?(r$=!0,window.clearTimeout(a6),a6=window.setTimeout(()=>{r$=!1},100),t.current=!1,!0):!1}function r(i){return Toe(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Tq(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let Vp;function kq(){if(Vp)return Vp;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Vp="reverse",e.scrollLeft>0?Vp="default":(e.scrollLeft=1,e.scrollLeft===0&&(Vp="negative")),document.body.removeChild(e),Vp}function koe(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(kq()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const Aoe={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Roe=Aoe;function w5(e,t){const n=$({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=$({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=$({},o),Object.keys(i).forEach(s=>{n[r][s]=w5(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function Et(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>{if(s){const l=t(s);l!==""&&o.push(l),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const l6=e=>e,Ioe=()=>{let e=l6;return{configure(t){e=t},generate(t){return e(t)},reset(){e=l6}}},Poe=Ioe(),Aq=Poe,Ooe={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _t(e,t,n="Mui"){const r=Ooe[t];return r?`${n}-${r}`:`${Aq.generate(e)}-${t}`}function Ct(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=_t(e,i,n)}),r}const ap="$$material";function Le(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Rq(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Moe=/^((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|download|draggable|encType|enterKeyHint|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)-.*))$/,Doe=Rq(function(e){return Moe.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function Loe(e){if(e.sheet)return e.sheet;for(var t=0;t0?$i(qg,--Yo):0,fg--,Vr===10&&(fg=1,QC--),Vr}function Rs(){return Vr=Yo2||Ox(Vr)>3?"":" "}function Xoe(e,t){for(;--t&&Rs()&&!(Vr<48||Vr>102||Vr>57&&Vr<65||Vr>70&&Vr<97););return F1(e,fS()+(t<6&&Bl()==32&&Rs()==32))}function o$(e){for(;Rs();)switch(Vr){case e:return Yo;case 34:case 39:e!==34&&e!==39&&o$(Vr);break;case 40:e===41&&o$(e);break;case 92:Rs();break}return Yo}function Yoe(e,t){for(;Rs()&&e+Vr!==47+10;)if(e+Vr===42+42&&Bl()===47)break;return"/*"+F1(t,Yo-1)+"*"+KC(e===47?e:Rs())}function Koe(e){for(;!Ox(Bl());)Rs();return F1(e,Yo)}function Qoe(e){return Lq(pS("",null,null,null,[""],e=Dq(e),0,[0],e))}function pS(e,t,n,r,i,o,s,l,c){for(var d=0,f=0,h=s,p=0,g=0,v=0,y=1,S=1,_=1,b=0,x="",E=i,A=o,R=r,k=x;S;)switch(v=b,b=Rs()){case 40:if(v!=108&&$i(k,h-1)==58){i$(k+=Rn(hS(b),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:k+=hS(b);break;case 9:case 10:case 13:case 32:k+=qoe(v);break;case 92:k+=Xoe(fS()-1,7);continue;case 47:switch(Bl()){case 42:case 47:Tw(Joe(Yoe(Rs(),fS()),t,n),c);break;default:k+="/"}break;case 123*y:l[d++]=Al(k)*_;case 125*y:case 59:case 0:switch(b){case 0:case 125:S=0;case 59+f:_==-1&&(k=Rn(k,/\f/g,"")),g>0&&Al(k)-h&&Tw(g>32?u6(k+";",r,n,h-1):u6(Rn(k," ","")+";",r,n,h-2),c);break;case 59:k+=";";default:if(Tw(R=c6(k,t,n,d,f,i,l,x,E=[],A=[],h),o),b===123)if(f===0)pS(k,t,R,R,E,o,h,l,A);else switch(p===99&&$i(k,3)===110?100:p){case 100:case 108:case 109:case 115:pS(e,R,R,r&&Tw(c6(e,R,R,0,0,i,l,x,i,E=[],h),A),i,A,h,l,r?E:A);break;default:pS(k,R,R,R,[""],A,0,l,A)}}d=f=g=0,y=_=1,x=k="",h=s;break;case 58:h=1+Al(k),g=v;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&Voe()==125)continue}switch(k+=KC(b),b*y){case 38:_=f>0?1:(k+="\f",-1);break;case 44:l[d++]=(Al(k)-1)*_,_=1;break;case 64:Bl()===45&&(k+=hS(Rs())),p=Bl(),f=h=Al(x=k+=Koe(fS())),b++;break;case 45:v===45&&Al(k)==2&&(y=0)}}return o}function c6(e,t,n,r,i,o,s,l,c,d,f){for(var h=i-1,p=i===0?o:[""],g=E5(p),v=0,y=0,S=0;v0?p[_]+" "+b:Rn(b,/&\f/g,p[_])))&&(c[S++]=x);return JC(e,t,n,i===0?_5:l,c,d,f)}function Joe(e,t,n){return JC(e,t,n,Iq,KC(Goe()),Px(e,2,-2),0)}function u6(e,t,n,r){return JC(e,t,n,S5,Px(e,0,r),Px(e,r+1,-1),r)}function Hm(e,t){for(var n="",r=E5(e),i=0;i6)switch($i(e,t+1)){case 109:if($i(e,t+4)!==45)break;case 102:return Rn(e,/(.+:)(.+)-([^]+)/,"$1"+An+"$2-$3$1"+ZS+($i(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~i$(e,"stretch")?Nq(Rn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if($i(e,t+1)!==115)break;case 6444:switch($i(e,Al(e)-3-(~i$(e,"!important")&&10))){case 107:return Rn(e,":",":"+An)+e;case 101:return Rn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+An+($i(e,14)===45?"inline-":"")+"box$3$1"+An+"$2$3$1"+Xi+"$2box$3")+e}break;case 5936:switch($i(e,t+11)){case 114:return An+e+Xi+Rn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return An+e+Xi+Rn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return An+e+Xi+Rn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return An+e+Xi+e+e}return e}var ase=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case S5:t.return=Nq(t.value,t.length);break;case Pq:return Hm([X0(t,{value:Rn(t.value,"@","@"+An)})],i);case _5:if(t.length)return Woe(t.props,function(o){switch(Hoe(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Hm([X0(t,{props:[Rn(o,/:(read-\w+)/,":"+ZS+"$1")]})],i);case"::placeholder":return Hm([X0(t,{props:[Rn(o,/:(plac\w+)/,":"+An+"input-$1")]}),X0(t,{props:[Rn(o,/:(plac\w+)/,":"+ZS+"$1")]}),X0(t,{props:[Rn(o,/:(plac\w+)/,Xi+"input-$1")]})],i)}return""})}},lse=[ase],cse=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var S=y.getAttribute("data-emotion");S.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||lse,o={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var S=y.getAttribute("data-emotion").split(" "),_=1;_{t[n]=_q(e[n])}),t}function Uo(e,t,n={clone:!0}){const r=n.clone?$({},e):e;return jh(e)&&jh(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(jh(t[i])&&i in e&&jh(e[i])?r[i]=Uo(e[i],t[i],n):n.clone?r[i]=jh(t[i])?_q(t[i]):t[i]:r[i]=t[i])}),r}var Sq={exports:{}},moe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",goe=moe,voe=goe;function Eq(){}function Cq(){}Cq.resetWarningCache=Eq;var yoe=function(){function e(r,i,o,s,l,c){if(c!==voe){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Cq,resetWarningCache:Eq};return n.PropTypes=n,n};Sq.exports=yoe();var Vg=Sq.exports;const q0=js(Vg);function Od(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nn==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function XC(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function dS(e,t){var n,r;return I.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Ar(e){return e&&e.ownerDocument||document}function bu(e){return Ar(e).defaultView||window}function n$(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const boe=typeof window<"u"?I.useLayoutEffect:I.useEffect,Ao=boe;let o6=0;function xoe(e){const[t,n]=I.useState(e),r=e||t;return I.useEffect(()=>{t==null&&(o6+=1,n(`mui-${o6}`))},[t]),r}const s6=JS["useId".toString()];function b5(e){if(s6!==void 0){const t=s6();return e??t}return xoe(e)}function Ix({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=I.useRef(e!==void 0),[o,s]=I.useState(t),l=i?e:o,c=I.useCallback(d=>{i||s(d)},[]);return[l,c]}function eo(e){const t=I.useRef(e);return Ao(()=>{t.current=e}),I.useCallback((...n)=>(0,t.current)(...n),[])}function mr(...e){return I.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{n$(n,t)})},e)}let YC=!0,r$=!1,a6;const woe={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function _oe(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&woe[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Soe(e){e.metaKey||e.altKey||e.ctrlKey||(YC=!0)}function vD(){YC=!1}function Eoe(){this.visibilityState==="hidden"&&r$&&(YC=!0)}function Coe(e){e.addEventListener("keydown",Soe,!0),e.addEventListener("mousedown",vD,!0),e.addEventListener("pointerdown",vD,!0),e.addEventListener("touchstart",vD,!0),e.addEventListener("visibilitychange",Eoe,!0)}function Toe(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return YC||_oe(t)}function x5(){const e=I.useCallback(i=>{i!=null&&Coe(i.ownerDocument)},[]),t=I.useRef(!1);function n(){return t.current?(r$=!0,window.clearTimeout(a6),a6=window.setTimeout(()=>{r$=!1},100),t.current=!1,!0):!1}function r(i){return Toe(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Tq(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let Vp;function kq(){if(Vp)return Vp;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Vp="reverse",e.scrollLeft>0?Vp="default":(e.scrollLeft=1,e.scrollLeft===0&&(Vp="negative")),document.body.removeChild(e),Vp}function koe(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(kq()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const Aoe={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Roe=Aoe;function w5(e,t){const n=$({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=$({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=$({},o),Object.keys(i).forEach(s=>{n[r][s]=w5(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function Et(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>{if(s){const l=t(s);l!==""&&o.push(l),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const l6=e=>e,Ioe=()=>{let e=l6;return{configure(t){e=t},generate(t){return e(t)},reset(){e=l6}}},Poe=Ioe(),Aq=Poe,Ooe={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _t(e,t,n="Mui"){const r=Ooe[t];return r?`${n}-${r}`:`${Aq.generate(e)}-${t}`}function Ct(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=_t(e,i,n)}),r}const ap="$$material";function Le(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Rq(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Moe=/^((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|download|draggable|encType|enterKeyHint|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)-.*))$/,Doe=Rq(function(e){return Moe.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function Loe(e){if(e.sheet)return e.sheet;for(var t=0;t0?$i(qg,--Yo):0,fg--,Vr===10&&(fg=1,QC--),Vr}function Rs(){return Vr=Yo2||Ox(Vr)>3?"":" "}function Xoe(e,t){for(;--t&&Rs()&&!(Vr<48||Vr>102||Vr>57&&Vr<65||Vr>70&&Vr<97););return F1(e,fS()+(t<6&&Bl()==32&&Rs()==32))}function o$(e){for(;Rs();)switch(Vr){case e:return Yo;case 34:case 39:e!==34&&e!==39&&o$(Vr);break;case 40:e===41&&o$(e);break;case 92:Rs();break}return Yo}function Yoe(e,t){for(;Rs()&&e+Vr!==47+10;)if(e+Vr===42+42&&Bl()===47)break;return"/*"+F1(t,Yo-1)+"*"+KC(e===47?e:Rs())}function Koe(e){for(;!Ox(Bl());)Rs();return F1(e,Yo)}function Qoe(e){return Lq(pS("",null,null,null,[""],e=Dq(e),0,[0],e))}function pS(e,t,n,r,i,o,s,l,c){for(var d=0,f=0,h=s,p=0,g=0,v=0,y=1,S=1,_=1,b=0,x="",E=i,A=o,R=r,k=x;S;)switch(v=b,b=Rs()){case 40:if(v!=108&&$i(k,h-1)==58){i$(k+=Rn(hS(b),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:k+=hS(b);break;case 9:case 10:case 13:case 32:k+=qoe(v);break;case 92:k+=Xoe(fS()-1,7);continue;case 47:switch(Bl()){case 42:case 47:Tw(Joe(Yoe(Rs(),fS()),t,n),c);break;default:k+="/"}break;case 123*y:l[d++]=Al(k)*_;case 125*y:case 59:case 0:switch(b){case 0:case 125:S=0;case 59+f:_==-1&&(k=Rn(k,/\f/g,"")),g>0&&Al(k)-h&&Tw(g>32?u6(k+";",r,n,h-1):u6(Rn(k," ","")+";",r,n,h-2),c);break;case 59:k+=";";default:if(Tw(R=c6(k,t,n,d,f,i,l,x,E=[],A=[],h),o),b===123)if(f===0)pS(k,t,R,R,E,o,h,l,A);else switch(p===99&&$i(k,3)===110?100:p){case 100:case 108:case 109:case 115:pS(e,R,R,r&&Tw(c6(e,R,R,0,0,i,l,x,i,E=[],h),A),i,A,h,l,r?E:A);break;default:pS(k,R,R,R,[""],A,0,l,A)}}d=f=g=0,y=_=1,x=k="",h=s;break;case 58:h=1+Al(k),g=v;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&Voe()==125)continue}switch(k+=KC(b),b*y){case 38:_=f>0?1:(k+="\f",-1);break;case 44:l[d++]=(Al(k)-1)*_,_=1;break;case 64:Bl()===45&&(k+=hS(Rs())),p=Bl(),f=h=Al(x=k+=Koe(fS())),b++;break;case 45:v===45&&Al(k)==2&&(y=0)}}return o}function c6(e,t,n,r,i,o,s,l,c,d,f){for(var h=i-1,p=i===0?o:[""],g=E5(p),v=0,y=0,S=0;v0?p[_]+" "+b:Rn(b,/&\f/g,p[_])))&&(c[S++]=x);return JC(e,t,n,i===0?_5:l,c,d,f)}function Joe(e,t,n){return JC(e,t,n,Iq,KC(Goe()),Px(e,2,-2),0)}function u6(e,t,n,r){return JC(e,t,n,S5,Px(e,0,r),Px(e,r+1,-1),r)}function Hm(e,t){for(var n="",r=E5(e),i=0;i6)switch($i(e,t+1)){case 109:if($i(e,t+4)!==45)break;case 102:return Rn(e,/(.+:)(.+)-([^]+)/,"$1"+An+"$2-$3$1"+ZS+($i(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~i$(e,"stretch")?Nq(Rn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if($i(e,t+1)!==115)break;case 6444:switch($i(e,Al(e)-3-(~i$(e,"!important")&&10))){case 107:return Rn(e,":",":"+An)+e;case 101:return Rn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+An+($i(e,14)===45?"inline-":"")+"box$3$1"+An+"$2$3$1"+Yi+"$2box$3")+e}break;case 5936:switch($i(e,t+11)){case 114:return An+e+Yi+Rn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return An+e+Yi+Rn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return An+e+Yi+Rn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return An+e+Yi+e+e}return e}var ase=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case S5:t.return=Nq(t.value,t.length);break;case Pq:return Hm([X0(t,{value:Rn(t.value,"@","@"+An)})],i);case _5:if(t.length)return Woe(t.props,function(o){switch(Hoe(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Hm([X0(t,{props:[Rn(o,/:(read-\w+)/,":"+ZS+"$1")]})],i);case"::placeholder":return Hm([X0(t,{props:[Rn(o,/:(plac\w+)/,":"+An+"input-$1")]}),X0(t,{props:[Rn(o,/:(plac\w+)/,":"+ZS+"$1")]}),X0(t,{props:[Rn(o,/:(plac\w+)/,Yi+"input-$1")]})],i)}return""})}},lse=[ase],cse=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var S=y.getAttribute("data-emotion");S.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||lse,o={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var S=y.getAttribute("data-emotion").split(" "),_=1;_t in e?gie(e,t,{enumerable:!0,con * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var dX=I,Ns=ece;function Oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u$=Object.prototype.hasOwnProperty,tce=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,D6={},L6={};function nce(e){return u$.call(L6,e)?!0:u$.call(D6,e)?!1:tce.test(e)?L6[e]=!0:(D6[e]=!0,!1)}function rce(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ice(e,t,n,r){if(t===null||typeof t>"u"||rce(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Io(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Gi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Gi[e]=new Io(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Gi[t]=new Io(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Gi[e]=new Io(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Gi[e]=new Io(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Gi[e]=new Io(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Gi[e]=new Io(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Gi[e]=new Io(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Gi[e]=new Io(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Gi[e]=new Io(e,5,!1,e.toLowerCase(),null,!1,!1)});var U5=/[\-:]([a-z])/g;function H5(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(U5,H5);Gi[t]=new Io(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(U5,H5);Gi[t]=new Io(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(U5,H5);Gi[t]=new Io(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Gi[e]=new Io(e,1,!1,e.toLowerCase(),null,!1,!1)});Gi.xlinkHref=new Io("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Gi[e]=new Io(e,1,!1,e.toLowerCase(),null,!0,!0)});function W5(e,t,n,r){var i=Gi.hasOwnProperty(t)?Gi[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u$=Object.prototype.hasOwnProperty,tce=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,D6={},L6={};function nce(e){return u$.call(L6,e)?!0:u$.call(D6,e)?!1:tce.test(e)?L6[e]=!0:(D6[e]=!0,!1)}function rce(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ice(e,t,n,r){if(t===null||typeof t>"u"||rce(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Io(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Vi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vi[e]=new Io(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vi[t]=new Io(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vi[e]=new Io(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vi[e]=new Io(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Vi[e]=new Io(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vi[e]=new Io(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vi[e]=new Io(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vi[e]=new Io(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vi[e]=new Io(e,5,!1,e.toLowerCase(),null,!1,!1)});var U5=/[\-:]([a-z])/g;function H5(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(U5,H5);Vi[t]=new Io(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(U5,H5);Vi[t]=new Io(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(U5,H5);Vi[t]=new Io(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vi[e]=new Io(e,1,!1,e.toLowerCase(),null,!1,!1)});Vi.xlinkHref=new Io("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vi[e]=new Io(e,1,!1,e.toLowerCase(),null,!0,!0)});function W5(e,t,n,r){var i=Vi.hasOwnProperty(t)?Vi[t]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var c=` `+i[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=l);break}}}finally{_D=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ob(e):""}function oce(e){switch(e.tag){case 5:return Ob(e.type);case 16:return Ob("Lazy");case 13:return Ob("Suspense");case 19:return Ob("SuspenseList");case 0:case 2:case 15:return e=SD(e.type,!1),e;case 11:return e=SD(e.type.render,!1),e;case 1:return e=SD(e.type,!0),e;default:return""}}function p$(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case wm:return"Fragment";case xm:return"Portal";case d$:return"Profiler";case G5:return"StrictMode";case f$:return"Suspense";case h$:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pX:return(e.displayName||"Context")+".Consumer";case hX:return(e._context.displayName||"Context")+".Provider";case V5:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q5:return t=e.displayName||null,t!==null?t:p$(e.type)||"Memo";case Ku:t=e._payload,e=e._init;try{return p$(e(t))}catch{}}return null}function sce(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return p$(t);case 8:return t===G5?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Dd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gX(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ace(e){var t=gX(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Aw(e){e._valueTracker||(e._valueTracker=ace(e))}function vX(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=gX(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function tE(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function m$(e,t){var n=t.checked;return Ir({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function B6(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Dd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function yX(e,t){t=t.checked,t!=null&&W5(e,"checked",t,!1)}function g$(e,t){yX(e,t);var n=Dd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?v$(e,t.type,n):t.hasOwnProperty("defaultValue")&&v$(e,t.type,Dd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $6(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function v$(e,t,n){(t!=="number"||tE(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Mb=Array.isArray;function Gm(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Rw.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Lx(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tx={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},lce=["Webkit","ms","Moz","O"];Object.keys(tx).forEach(function(e){lce.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tx[t]=tx[e]})});function _X(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||tx.hasOwnProperty(e)&&tx[e]?(""+t).trim():t+"px"}function SX(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_X(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var cce=Ir({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 x$(e,t){if(t){if(cce[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function w$(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 _$=null;function X5(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var S$=null,Vm=null,qm=null;function j6(e){if(e=H1(e)){if(typeof S$!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=$T(t),S$(e.stateNode,e.type,t))}}function EX(e){Vm?qm?qm.push(e):qm=[e]:Vm=e}function CX(){if(Vm){var e=Vm,t=qm;if(qm=Vm=null,j6(e),t)for(e=0;e>>=0,e===0?32:31-(xce(e)/wce|0)|0}var Iw=64,Pw=4194304;function Db(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function oE(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Db(l):(o&=s,o!==0&&(r=Db(o)))}else s=n&~i,s!==0?r=Db(s):o!==0&&(r=Db(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function j1(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-il(t),e[t]=n}function Cce(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=rx),K6=String.fromCharCode(32),Q6=!1;function GX(e,t){switch(e){case"keyup":return Zce.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VX(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _m=!1;function tue(e,t){switch(e){case"compositionend":return VX(t);case"keypress":return t.which!==32?null:(Q6=!0,K6);case"textInput":return e=t.data,e===K6&&Q6?null:e;default:return null}}function nue(e,t){if(_m)return e==="compositionend"||!n4&&GX(e,t)?(e=HX(),gS=Z5=cd=null,_m=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=tU(n)}}function KX(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?KX(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function QX(){for(var e=window,t=tE();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=tE(e.document)}return t}function r4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function due(e){var t=QX(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&KX(n.ownerDocument.documentElement,n)){if(r!==null&&r4(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=nU(n,o);var s=nU(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Sm=null,R$=null,ox=null,I$=!1;function rU(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;I$||Sm==null||Sm!==tE(r)||(r=Sm,"selectionStart"in r&&r4(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ox&&jx(ox,r)||(ox=r,r=lE(R$,"onSelect"),0Tm||(e.current=N$[Tm],N$[Tm]=null,Tm--)}function er(e,t){Tm++,N$[Tm]=e.current,e.current=t}var Ld={},no=Vd(Ld),Ho=Vd(!1),up=Ld;function pg(e,t){var n=e.type.contextTypes;if(!n)return Ld;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Wo(e){return e=e.childContextTypes,e!=null}function uE(){ur(Ho),ur(no)}function uU(e,t,n){if(no.current!==Ld)throw Error(Oe(168));er(no,t),er(Ho,n)}function sY(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,sce(e)||"Unknown",i));return Ir({},n,r)}function dE(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ld,up=no.current,er(no,e),er(Ho,Ho.current),!0}function dU(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=sY(e,t,up),r.__reactInternalMemoizedMergedChildContext=e,ur(Ho),ur(no),er(no,e)):ur(Ho),er(Ho,n)}var su=null,FT=!1,BD=!1;function aY(e){su===null?su=[e]:su.push(e)}function Sue(e){FT=!0,aY(e)}function qd(){if(!BD&&su!==null){BD=!0;var e=0,t=Nn;try{var n=su;for(Nn=1;e>=s,i-=s,uu=1<<32-il(t)+i|n<O?(L=k,k=null):L=k.sibling;var N=p(_,k,x[O],E);if(N===null){k===null&&(k=L);break}e&&k&&N.alternate===null&&t(_,k),b=o(N,b,O),R===null?A=N:R.sibling=N,R=N,k=L}if(O===x.length)return n(_,k),fr&&Rh(_,O),A;if(k===null){for(;OO?(L=k,k=null):L=k.sibling;var H=p(_,k,N.value,E);if(H===null){k===null&&(k=L);break}e&&k&&H.alternate===null&&t(_,k),b=o(H,b,O),R===null?A=H:R.sibling=H,R=H,k=L}if(N.done)return n(_,k),fr&&Rh(_,O),A;if(k===null){for(;!N.done;O++,N=x.next())N=h(_,N.value,E),N!==null&&(b=o(N,b,O),R===null?A=N:R.sibling=N,R=N);return fr&&Rh(_,O),A}for(k=r(_,k);!N.done;O++,N=x.next())N=g(k,_,O,N.value,E),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?O:N.key),b=o(N,b,O),R===null?A=N:R.sibling=N,R=N);return e&&k.forEach(function(W){return t(_,W)}),fr&&Rh(_,O),A}function S(_,b,x,E){if(typeof x=="object"&&x!==null&&x.type===wm&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case kw:e:{for(var A=x.key,R=b;R!==null;){if(R.key===A){if(A=x.type,A===wm){if(R.tag===7){n(_,R.sibling),b=i(R,x.props.children),b.return=_,_=b;break e}}else if(R.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Ku&&yU(A)===R.type){n(_,R.sibling),b=i(R,x.props),b.ref=tb(_,R,x),b.return=_,_=b;break e}n(_,R);break}else t(_,R);R=R.sibling}x.type===wm?(b=Jh(x.props.children,_.mode,E,x.key),b.return=_,_=b):(E=ES(x.type,x.key,x.props,null,_.mode,E),E.ref=tb(_,b,x),E.return=_,_=E)}return s(_);case xm:e:{for(R=x.key;b!==null;){if(b.key===R)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(_,b.sibling),b=i(b,x.children||[]),b.return=_,_=b;break e}else{n(_,b);break}else t(_,b);b=b.sibling}b=GD(x,_.mode,E),b.return=_,_=b}return s(_);case Ku:return R=x._init,S(_,b,R(x._payload),E)}if(Mb(x))return v(_,b,x,E);if(K0(x))return y(_,b,x,E);$w(_,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(_,b.sibling),b=i(b,x),b.return=_,_=b):(n(_,b),b=WD(x,_.mode,E),b.return=_,_=b),s(_)):n(_,b)}return S}var gg=mY(!0),gY=mY(!1),W1={},Fl=Vd(W1),Gx=Vd(W1),Vx=Vd(W1);function Gh(e){if(e===W1)throw Error(Oe(174));return e}function f4(e,t){switch(er(Vx,t),er(Gx,e),er(Fl,W1),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:b$(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=b$(t,e)}ur(Fl),er(Fl,t)}function vg(){ur(Fl),ur(Gx),ur(Vx)}function vY(e){Gh(Vx.current);var t=Gh(Fl.current),n=b$(t,e.type);t!==n&&(er(Gx,e),er(Fl,n))}function h4(e){Gx.current===e&&(ur(Fl),ur(Gx))}var Cr=Vd(0);function vE(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $D=[];function p4(){for(var e=0;e<$D.length;e++)$D[e]._workInProgressVersionPrimary=null;$D.length=0}var bS=Iu.ReactCurrentDispatcher,FD=Iu.ReactCurrentBatchConfig,fp=0,Rr=null,ci=null,gi=null,yE=!1,sx=!1,qx=0,Cue=0;function Vi(){throw Error(Oe(321))}function m4(e,t){if(t===null)return!1;for(var n=0;nn?n:4,e(!0);var r=FD.transition;FD.transition={};try{e(!1),t()}finally{Nn=n,FD.transition=r}}function MY(){return pa().memoizedState}function kue(e,t,n){var r=Ed(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DY(e))LY(t,n);else if(n=dY(e,t,n,r),n!==null){var i=To();ol(n,e,r,i),NY(n,t,r)}}function Aue(e,t,n){var r=Ed(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DY(e))LY(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,hl(l,s)){var c=t.interleaved;c===null?(i.next=i,u4(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=dY(e,t,i,r),n!==null&&(i=To(),ol(n,e,r,i),NY(n,t,r))}}function DY(e){var t=e.alternate;return e===Rr||t!==null&&t===Rr}function LY(e,t){sx=yE=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function NY(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,K5(e,n)}}var bE={readContext:ha,useCallback:Vi,useContext:Vi,useEffect:Vi,useImperativeHandle:Vi,useInsertionEffect:Vi,useLayoutEffect:Vi,useMemo:Vi,useReducer:Vi,useRef:Vi,useState:Vi,useDebugValue:Vi,useDeferredValue:Vi,useTransition:Vi,useMutableSource:Vi,useSyncExternalStore:Vi,useId:Vi,unstable_isNewReconciler:!1},Rue={readContext:ha,useCallback:function(e,t){return Tl().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:xU,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,xS(4194308,4,AY.bind(null,t,e),n)},useLayoutEffect:function(e,t){return xS(4194308,4,e,t)},useInsertionEffect:function(e,t){return xS(4,2,e,t)},useMemo:function(e,t){var n=Tl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Tl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=kue.bind(null,Rr,e),[r.memoizedState,e]},useRef:function(e){var t=Tl();return e={current:e},t.memoizedState=e},useState:bU,useDebugValue:b4,useDeferredValue:function(e){return Tl().memoizedState=e},useTransition:function(){var e=bU(!1),t=e[0];return e=Tue.bind(null,e[1]),Tl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Rr,i=Tl();if(fr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),bi===null)throw Error(Oe(349));fp&30||xY(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,xU(_Y.bind(null,r,o,e),[e]),r.flags|=2048,Yx(9,wY.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Tl(),t=bi.identifierPrefix;if(fr){var n=du,r=uu;n=(r&~(1<<32-il(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=qx++,0Tm||(e.current=N$[Tm],N$[Tm]=null,Tm--)}function er(e,t){Tm++,N$[Tm]=e.current,e.current=t}var Ld={},ro=Vd(Ld),Ho=Vd(!1),up=Ld;function pg(e,t){var n=e.type.contextTypes;if(!n)return Ld;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Wo(e){return e=e.childContextTypes,e!=null}function uE(){ur(Ho),ur(ro)}function uU(e,t,n){if(ro.current!==Ld)throw Error(Oe(168));er(ro,t),er(Ho,n)}function sY(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,sce(e)||"Unknown",i));return Ir({},n,r)}function dE(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ld,up=ro.current,er(ro,e),er(Ho,Ho.current),!0}function dU(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=sY(e,t,up),r.__reactInternalMemoizedMergedChildContext=e,ur(Ho),ur(ro),er(ro,e)):ur(Ho),er(Ho,n)}var su=null,FT=!1,BD=!1;function aY(e){su===null?su=[e]:su.push(e)}function Sue(e){FT=!0,aY(e)}function qd(){if(!BD&&su!==null){BD=!0;var e=0,t=Nn;try{var n=su;for(Nn=1;e>=s,i-=s,uu=1<<32-il(t)+i|n<O?(L=k,k=null):L=k.sibling;var N=p(_,k,x[O],E);if(N===null){k===null&&(k=L);break}e&&k&&N.alternate===null&&t(_,k),b=o(N,b,O),R===null?A=N:R.sibling=N,R=N,k=L}if(O===x.length)return n(_,k),fr&&Rh(_,O),A;if(k===null){for(;OO?(L=k,k=null):L=k.sibling;var H=p(_,k,N.value,E);if(H===null){k===null&&(k=L);break}e&&k&&H.alternate===null&&t(_,k),b=o(H,b,O),R===null?A=H:R.sibling=H,R=H,k=L}if(N.done)return n(_,k),fr&&Rh(_,O),A;if(k===null){for(;!N.done;O++,N=x.next())N=h(_,N.value,E),N!==null&&(b=o(N,b,O),R===null?A=N:R.sibling=N,R=N);return fr&&Rh(_,O),A}for(k=r(_,k);!N.done;O++,N=x.next())N=g(k,_,O,N.value,E),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?O:N.key),b=o(N,b,O),R===null?A=N:R.sibling=N,R=N);return e&&k.forEach(function(W){return t(_,W)}),fr&&Rh(_,O),A}function S(_,b,x,E){if(typeof x=="object"&&x!==null&&x.type===wm&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case kw:e:{for(var A=x.key,R=b;R!==null;){if(R.key===A){if(A=x.type,A===wm){if(R.tag===7){n(_,R.sibling),b=i(R,x.props.children),b.return=_,_=b;break e}}else if(R.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Ku&&yU(A)===R.type){n(_,R.sibling),b=i(R,x.props),b.ref=tb(_,R,x),b.return=_,_=b;break e}n(_,R);break}else t(_,R);R=R.sibling}x.type===wm?(b=Jh(x.props.children,_.mode,E,x.key),b.return=_,_=b):(E=ES(x.type,x.key,x.props,null,_.mode,E),E.ref=tb(_,b,x),E.return=_,_=E)}return s(_);case xm:e:{for(R=x.key;b!==null;){if(b.key===R)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(_,b.sibling),b=i(b,x.children||[]),b.return=_,_=b;break e}else{n(_,b);break}else t(_,b);b=b.sibling}b=GD(x,_.mode,E),b.return=_,_=b}return s(_);case Ku:return R=x._init,S(_,b,R(x._payload),E)}if(Mb(x))return v(_,b,x,E);if(K0(x))return y(_,b,x,E);$w(_,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(_,b.sibling),b=i(b,x),b.return=_,_=b):(n(_,b),b=WD(x,_.mode,E),b.return=_,_=b),s(_)):n(_,b)}return S}var gg=mY(!0),gY=mY(!1),W1={},Fl=Vd(W1),Gx=Vd(W1),Vx=Vd(W1);function Gh(e){if(e===W1)throw Error(Oe(174));return e}function f4(e,t){switch(er(Vx,t),er(Gx,e),er(Fl,W1),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:b$(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=b$(t,e)}ur(Fl),er(Fl,t)}function vg(){ur(Fl),ur(Gx),ur(Vx)}function vY(e){Gh(Vx.current);var t=Gh(Fl.current),n=b$(t,e.type);t!==n&&(er(Gx,e),er(Fl,n))}function h4(e){Gx.current===e&&(ur(Fl),ur(Gx))}var Cr=Vd(0);function vE(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $D=[];function p4(){for(var e=0;e<$D.length;e++)$D[e]._workInProgressVersionPrimary=null;$D.length=0}var bS=Iu.ReactCurrentDispatcher,FD=Iu.ReactCurrentBatchConfig,fp=0,Rr=null,ci=null,gi=null,yE=!1,sx=!1,qx=0,Cue=0;function qi(){throw Error(Oe(321))}function m4(e,t){if(t===null)return!1;for(var n=0;nn?n:4,e(!0);var r=FD.transition;FD.transition={};try{e(!1),t()}finally{Nn=n,FD.transition=r}}function MY(){return pa().memoizedState}function kue(e,t,n){var r=Ed(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DY(e))LY(t,n);else if(n=dY(e,t,n,r),n!==null){var i=ko();ol(n,e,r,i),NY(n,t,r)}}function Aue(e,t,n){var r=Ed(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DY(e))LY(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,hl(l,s)){var c=t.interleaved;c===null?(i.next=i,u4(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=dY(e,t,i,r),n!==null&&(i=ko(),ol(n,e,r,i),NY(n,t,r))}}function DY(e){var t=e.alternate;return e===Rr||t!==null&&t===Rr}function LY(e,t){sx=yE=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function NY(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,K5(e,n)}}var bE={readContext:ha,useCallback:qi,useContext:qi,useEffect:qi,useImperativeHandle:qi,useInsertionEffect:qi,useLayoutEffect:qi,useMemo:qi,useReducer:qi,useRef:qi,useState:qi,useDebugValue:qi,useDeferredValue:qi,useTransition:qi,useMutableSource:qi,useSyncExternalStore:qi,useId:qi,unstable_isNewReconciler:!1},Rue={readContext:ha,useCallback:function(e,t){return Tl().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:xU,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,xS(4194308,4,AY.bind(null,t,e),n)},useLayoutEffect:function(e,t){return xS(4194308,4,e,t)},useInsertionEffect:function(e,t){return xS(4,2,e,t)},useMemo:function(e,t){var n=Tl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Tl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=kue.bind(null,Rr,e),[r.memoizedState,e]},useRef:function(e){var t=Tl();return e={current:e},t.memoizedState=e},useState:bU,useDebugValue:b4,useDeferredValue:function(e){return Tl().memoizedState=e},useTransition:function(){var e=bU(!1),t=e[0];return e=Tue.bind(null,e[1]),Tl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Rr,i=Tl();if(fr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),bi===null)throw Error(Oe(349));fp&30||xY(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,xU(_Y.bind(null,r,o,e),[e]),r.flags|=2048,Yx(9,wY.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Tl(),t=bi.identifierPrefix;if(fr){var n=du,r=uu;n=(r&~(1<<32-il(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=qx++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ml]=t,e[Wx]=r,GY(e,t,!1,!1),t.stateNode=e;e:{switch(s=w$(n,r),n){case"dialog":cr("cancel",e),cr("close",e),i=r;break;case"iframe":case"object":case"embed":cr("load",e),i=r;break;case"video":case"audio":for(i=0;ibg&&(t.flags|=128,r=!0,nb(o,!1),t.lanes=4194304)}else{if(!r)if(e=vE(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),nb(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!fr)return qi(t),null}else 2*Hr()-o.renderingStartTime>bg&&n!==1073741824&&(t.flags|=128,r=!0,nb(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Hr(),t.sibling=null,n=Cr.current,er(Cr,r?n&1|2:n&1),t):(qi(t),null);case 22:case 23:return C4(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ws&1073741824&&(qi(t),t.subtreeFlags&6&&(t.flags|=8192)):qi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function Bue(e,t){switch(o4(t),t.tag){case 1:return Wo(t.type)&&uE(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vg(),ur(Ho),ur(no),p4(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return h4(t),null;case 13:if(ur(Cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));mg()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ur(Cr),null;case 4:return vg(),null;case 10:return c4(t.type._context),null;case 22:case 23:return C4(),null;case 24:return null;default:return null}}var zw=!1,Ki=!1,$ue=typeof WeakSet=="function"?WeakSet:Set,st=null;function Im(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Br(e,t,r)}else n.current=null}function Y$(e,t,n){try{n()}catch(r){Br(e,t,r)}}var RU=!1;function Fue(e,t){if(P$=sE,e=QX(),r4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,c=-1,d=0,f=0,h=e,p=null;t:for(;;){for(var g;h!==n||i!==0&&h.nodeType!==3||(l=s+i),h!==o||r!==0&&h.nodeType!==3||(c=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(g=h.firstChild)!==null;)p=h,h=g;for(;;){if(h===e)break t;if(p===n&&++d===i&&(l=s),p===o&&++f===r&&(c=s),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=g}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(O$={focusedElem:e,selectionRange:n},sE=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){t=st;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,S=v.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ga(t.type,y),S);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(E){Br(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}return v=RU,RU=!1,v}function ax(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Y$(t,n,o)}i=i.next}while(i!==r)}}function UT(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function K$(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function XY(e){var t=e.alternate;t!==null&&(e.alternate=null,XY(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ml],delete t[Wx],delete t[L$],delete t[wue],delete t[_ue])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function YY(e){return e.tag===5||e.tag===3||e.tag===4}function IU(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||YY(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Q$(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cE));else if(r!==4&&(e=e.child,e!==null))for(Q$(e,t,n),e=e.sibling;e!==null;)Q$(e,t,n),e=e.sibling}function J$(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(J$(e,t,n),e=e.sibling;e!==null;)J$(e,t,n),e=e.sibling}var Ni=null,qa=!1;function zu(e,t,n){for(n=n.child;n!==null;)KY(e,t,n),n=n.sibling}function KY(e,t,n){if($l&&typeof $l.onCommitFiberUnmount=="function")try{$l.onCommitFiberUnmount(DT,n)}catch{}switch(n.tag){case 5:Ki||Im(n,t);case 6:var r=Ni,i=qa;Ni=null,zu(e,t,n),Ni=r,qa=i,Ni!==null&&(qa?(e=Ni,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ni.removeChild(n.stateNode));break;case 18:Ni!==null&&(qa?(e=Ni,n=n.stateNode,e.nodeType===8?ND(e.parentNode,n):e.nodeType===1&&ND(e,n),Fx(e)):ND(Ni,n.stateNode));break;case 4:r=Ni,i=qa,Ni=n.stateNode.containerInfo,qa=!0,zu(e,t,n),Ni=r,qa=i;break;case 0:case 11:case 14:case 15:if(!Ki&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Y$(n,t,s),i=i.next}while(i!==r)}zu(e,t,n);break;case 1:if(!Ki&&(Im(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Br(n,t,l)}zu(e,t,n);break;case 21:zu(e,t,n);break;case 22:n.mode&1?(Ki=(r=Ki)||n.memoizedState!==null,zu(e,t,n),Ki=r):zu(e,t,n);break;default:zu(e,t,n)}}function PU(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new $ue),t.forEach(function(r){var i=Xue.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ba(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Hr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jue(r/1960))-r,10e?16:e,ud===null)var r=!1;else{if(e=ud,ud=null,_E=0,wn&6)throw Error(Oe(331));var i=wn;for(wn|=4,st=e.current;st!==null;){var o=st,s=o.child;if(st.flags&16){var l=o.deletions;if(l!==null){for(var c=0;cHr()-S4?Qh(e,0):_4|=n),Go(e,t)}function iK(e,t){t===0&&(e.mode&1?(t=Pw,Pw<<=1,!(Pw&130023424)&&(Pw=4194304)):t=1);var n=To();e=_u(e,t),e!==null&&(j1(e,t,n),Go(e,n))}function que(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),iK(e,n)}function Xue(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),iK(e,n)}var oK;oK=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ho.current)zo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zo=!1,Lue(e,t,n);zo=!!(e.flags&131072)}else zo=!1,fr&&t.flags&1048576&&lY(t,hE,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;wS(e,t),e=t.pendingProps;var i=pg(t,no.current);Ym(t,n),i=g4(null,t,r,e,i,n);var o=v4();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Wo(r)?(o=!0,dE(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,d4(t),i.updater=zT,t.stateNode=i,i._reactInternals=t,U$(t,r,e,n),t=G$(null,t,r,!0,o,n)):(t.tag=0,fr&&o&&i4(t),wo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(wS(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Kue(r),e=Ga(r,e),i){case 0:t=W$(null,t,r,e,n);break e;case 1:t=TU(null,t,r,e,n);break e;case 11:t=EU(null,t,r,e,n);break e;case 14:t=CU(null,t,r,Ga(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ga(r,i),W$(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ga(r,i),TU(e,t,r,i,n);case 3:e:{if(UY(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,fY(e,t),gE(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=yg(Error(Oe(423)),t),t=kU(e,t,r,n,i);break e}else if(r!==i){i=yg(Error(Oe(424)),t),t=kU(e,t,r,n,i);break e}else for(Ts=wd(t.stateNode.containerInfo.firstChild),Is=t,fr=!0,Ya=null,n=gY(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(mg(),r===i){t=Su(e,t,n);break e}wo(e,t,r,n)}t=t.child}return t;case 5:return vY(t),e===null&&F$(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,M$(r,i)?s=null:o!==null&&M$(r,o)&&(t.flags|=32),jY(e,t),wo(e,t,s,n),t.child;case 6:return e===null&&F$(t),null;case 13:return HY(e,t,n);case 4:return f4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=gg(t,null,r,n):wo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ga(r,i),EU(e,t,r,i,n);case 7:return wo(e,t,t.pendingProps,n),t.child;case 8:return wo(e,t,t.pendingProps.children,n),t.child;case 12:return wo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,er(pE,r._currentValue),r._currentValue=s,o!==null)if(hl(o.value,s)){if(o.children===i.children&&!Ho.current){t=Su(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=mu(-1,n&-n),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var f=d.pending;f===null?c.next=c:(c.next=f.next,f.next=c),d.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),z$(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Oe(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),z$(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}wo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ym(t,n),i=ha(i),r=r(i),t.flags|=1,wo(e,t,r,n),t.child;case 14:return r=t.type,i=Ga(r,t.pendingProps),i=Ga(r.type,i),CU(e,t,r,i,n);case 15:return FY(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ga(r,i),wS(e,t),t.tag=1,Wo(r)?(e=!0,dE(t)):e=!1,Ym(t,n),pY(t,r,i),U$(t,r,i,n),G$(null,t,r,!0,e,n);case 19:return WY(e,t,n);case 22:return zY(e,t,n)}throw Error(Oe(156,t.tag))};function sK(e,t){return OX(e,t)}function Yue(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function na(e,t,n,r){return new Yue(e,t,n,r)}function k4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kue(e){if(typeof e=="function")return k4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V5)return 11;if(e===q5)return 14}return 2}function Cd(e,t){var n=e.alternate;return n===null?(n=na(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ES(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")k4(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case wm:return Jh(n.children,i,o,t);case G5:s=8,i|=8;break;case d$:return e=na(12,n,t,i|2),e.elementType=d$,e.lanes=o,e;case f$:return e=na(13,n,t,i),e.elementType=f$,e.lanes=o,e;case h$:return e=na(19,n,t,i),e.elementType=h$,e.lanes=o,e;case mX:return WT(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case hX:s=10;break e;case pX:s=9;break e;case V5:s=11;break e;case q5:s=14;break e;case Ku:s=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=na(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Jh(e,t,n,r){return e=na(7,e,r,t),e.lanes=n,e}function WT(e,t,n,r){return e=na(22,e,r,t),e.elementType=mX,e.lanes=n,e.stateNode={isHidden:!1},e}function WD(e,t,n){return e=na(6,e,null,t),e.lanes=n,e}function GD(e,t,n){return t=na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Que(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=CD(0),this.expirationTimes=CD(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=CD(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function A4(e,t,n,r,i,o,s,l,c){return e=new Que(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=na(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},d4(o),e}function Jue(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uK)}catch(e){console.error(e)}}uK(),lX.exports=Hs;var Jg=lX.exports;const Om=js(Jg),FU={disabled:!1},CE=de.createContext(null);var rde=function(t){return t.scrollTop},Nb="unmounted",Ph="exited",Oh="entering",sm="entered",rF="exiting",Pu=function(e){MT(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,l=s&&!s.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?l?(c=Ph,o.appearStatus=Oh):c=sm:r.unmountOnExit||r.mountOnEnter?c=Nb:c=Ph,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Nb?{status:Ph}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Oh&&s!==sm&&(o=Oh):(s===Oh||s===sm)&&(o=rF)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,l;return o=s=l=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,l=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:l}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Oh){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Om.findDOMNode(this);s&&rde(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ph&&this.setState({status:Nb})},n.performEnter=function(i){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:i,c=this.props.nodeRef?[l]:[Om.findDOMNode(this),l],d=c[0],f=c[1],h=this.getTimeouts(),p=l?h.appear:h.enter;if(!i&&!s||FU.disabled){this.safeSetState({status:sm},function(){o.props.onEntered(d)});return}this.props.onEnter(d,f),this.safeSetState({status:Oh},function(){o.props.onEntering(d,f),o.onTransitionEnd(p,function(){o.safeSetState({status:sm},function(){o.props.onEntered(d,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:Om.findDOMNode(this);if(!o||FU.disabled){this.safeSetState({status:Ph},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:rF},function(){i.props.onExiting(l),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ph},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,o.nextCallback=null,i(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Om.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],d=c[0],f=c[1];this.props.addEndListener(d,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Nb)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=Le(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return de.createElement(CE.Provider,{value:null},typeof s=="function"?s(i,l):de.cloneElement(de.Children.only(s),l))},t}(de.Component);Pu.contextType=CE;Pu.propTypes={};function Xp(){}Pu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Xp,onEntering:Xp,onEntered:Xp,onExit:Xp,onExiting:Xp,onExited:Xp};Pu.UNMOUNTED=Nb;Pu.EXITED=Ph;Pu.ENTERING=Oh;Pu.ENTERED=sm;Pu.EXITING=rF;const O4=Pu;function ide(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M4(e,t){var n=function(o){return t&&I.isValidElement(o)?t(o):o},r=Object.create(null);return e&&I.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function ode(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,l={};for(var c in t){if(r[c])for(s=0;se.scrollTop;function xg(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}function dde(e){return _t("MuiCollapse",e)}Ct("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const fde=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],hde=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Et(r,dde,n)},pde=Ee("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>$({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&$({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),mde=Ee("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>$({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),gde=Ee("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>$({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),fK=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:l="0px",component:c,easing:d,in:f,onEnter:h,onEntered:p,onEntering:g,onExit:v,onExited:y,onExiting:S,orientation:_="vertical",style:b,timeout:x=oX.standard,TransitionComponent:E=O4}=r,A=Le(r,fde),R=$({},r,{orientation:_,collapsedSize:l}),k=hde(R),O=In(),L=I.useRef(),N=I.useRef(null),H=I.useRef(),W=typeof l=="number"?`${l}px`:l,z=_==="horizontal",D=z?"width":"height";I.useEffect(()=>()=>{clearTimeout(L.current)},[]);const F=I.useRef(null),j=mr(n,F),V=Q=>ae=>{if(Q){const le=F.current;ae===void 0?Q(le):Q(le,ae)}},G=()=>N.current?N.current[z?"clientWidth":"clientHeight"]:0,K=V((Q,ae)=>{N.current&&z&&(N.current.style.position="absolute"),Q.style[D]=W,h&&h(Q,ae)}),Y=V((Q,ae)=>{const le=G();N.current&&z&&(N.current.style.position="");const{duration:he,easing:pe}=xg({style:b,timeout:x,easing:d},{mode:"enter"});if(x==="auto"){const ve=O.transitions.getAutoHeightDuration(le);Q.style.transitionDuration=`${ve}ms`,H.current=ve}else Q.style.transitionDuration=typeof he=="string"?he:`${he}ms`;Q.style[D]=`${le}px`,Q.style.transitionTimingFunction=pe,g&&g(Q,ae)}),J=V((Q,ae)=>{Q.style[D]="auto",p&&p(Q,ae)}),ie=V(Q=>{Q.style[D]=`${G()}px`,v&&v(Q)}),ce=V(y),ue=V(Q=>{const ae=G(),{duration:le,easing:he}=xg({style:b,timeout:x,easing:d},{mode:"exit"});if(x==="auto"){const pe=O.transitions.getAutoHeightDuration(ae);Q.style.transitionDuration=`${pe}ms`,H.current=pe}else Q.style.transitionDuration=typeof le=="string"?le:`${le}ms`;Q.style[D]=W,Q.style.transitionTimingFunction=he,S&&S(Q)}),se=Q=>{x==="auto"&&(L.current=setTimeout(Q,H.current||0)),i&&i(F.current,Q)};return C.jsx(E,$({in:f,onEnter:K,onEntered:J,onEntering:Y,onExit:ie,onExited:ce,onExiting:ue,addEndListener:se,nodeRef:F,timeout:x==="auto"?null:x},A,{children:(Q,ae)=>C.jsx(pde,$({as:c,className:Fe(k.root,s,{entered:k.entered,exited:!f&&W==="0px"&&k.hidden}[Q]),style:$({[z?"minWidth":"minHeight"]:W},b),ownerState:$({},R,{state:Q}),ref:j},ae,{children:C.jsx(mde,{ownerState:$({},R,{state:Q}),className:k.wrapper,ref:N,children:C.jsx(gde,{ownerState:$({},R,{state:Q}),className:k.wrapperInner,children:o})})}))}))});fK.muiSupportAuto=!0;const VD=fK;function vde(e){return _t("MuiPaper",e)}Ct("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const yde=["className","component","elevation","square","variant"],bde=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Et(o,vde,i)},xde=Ee("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return $({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&$({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${_n("#fff",O6(t.elevation))}, ${_n("#fff",O6(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),wde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:l=!1,variant:c="elevation"}=r,d=Le(r,yde),f=$({},r,{component:o,elevation:s,square:l,variant:c}),h=bde(f);return C.jsx(xde,$({as:o,ownerState:f,className:Fe(h.root,i),ref:n},d))}),Zg=wde;function _de(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:l,onExited:c,timeout:d}=e,[f,h]=I.useState(!1),p=Fe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=Fe(n.child,f&&n.childLeaving,r&&n.childPulsate);return!l&&!f&&h(!0),I.useEffect(()=>{if(!l&&c!=null){const y=setTimeout(c,d);return()=>{clearTimeout(y)}}},[c,l,d]),C.jsx("span",{className:p,style:g,children:C.jsx("span",{className:v})})}const Sde=Ct("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ks=Sde,Ede=["center","classes","className"];let YT=e=>e,zU,jU,UU,HU;const iF=550,Cde=80,Tde=ec(zU||(zU=YT` +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function UD(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function H$(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Oue=typeof WeakMap=="function"?WeakMap:Map;function BY(e,t,n){n=mu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){wE||(wE=!0,Z$=r),H$(e,t)},n}function $Y(e,t,n){n=mu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){H$(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){H$(e,t),typeof r!="function"&&(Sd===null?Sd=new Set([this]):Sd.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function wU(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Oue;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Vue.bind(null,e,t,n),t.then(e,e))}function _U(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function SU(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=mu(-1,1),t.tag=2,_d(n,t,1))),n.lanes|=1),e)}var Mue=Iu.ReactCurrentOwner,zo=!1;function _o(e,t,n,r){t.child=e===null?gY(t,null,n,r):gg(t,e.child,n,r)}function EU(e,t,n,r,i){n=n.render;var o=t.ref;return Ym(t,i),r=g4(e,t,n,r,o,i),n=v4(),e!==null&&!zo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Su(e,t,i)):(fr&&n&&i4(t),t.flags|=1,_o(e,t,r,i),t.child)}function CU(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!k4(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,FY(e,t,o,r,i)):(e=ES(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:jx,n(s,r)&&e.ref===t.ref)return Su(e,t,i)}return t.flags|=1,e=Cd(o,r),e.ref=t.ref,e.return=t,t.child=e}function FY(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(jx(o,r)&&e.ref===t.ref)if(zo=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(zo=!0);else return t.lanes=e.lanes,Su(e,t,i)}return W$(e,t,n,r,i)}function zY(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},er(Pm,ws),ws|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,er(Pm,ws),ws|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,er(Pm,ws),ws|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,er(Pm,ws),ws|=r;return _o(e,t,i,n),t.child}function jY(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function W$(e,t,n,r,i){var o=Wo(n)?up:ro.current;return o=pg(t,o),Ym(t,i),n=g4(e,t,n,r,o,i),r=v4(),e!==null&&!zo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Su(e,t,i)):(fr&&r&&i4(t),t.flags|=1,_o(e,t,n,i),t.child)}function TU(e,t,n,r,i){if(Wo(n)){var o=!0;dE(t)}else o=!1;if(Ym(t,i),t.stateNode===null)wS(e,t),pY(t,n,r),U$(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var c=s.context,d=n.contextType;typeof d=="object"&&d!==null?d=ha(d):(d=Wo(n)?up:ro.current,d=pg(t,d));var f=n.getDerivedStateFromProps,h=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";h||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||c!==d)&&vU(t,s,r,d),Qu=!1;var p=t.memoizedState;s.state=p,gE(t,r,s,i),c=t.memoizedState,l!==r||p!==c||Ho.current||Qu?(typeof f=="function"&&(j$(t,n,f,r),c=t.memoizedState),(l=Qu||gU(t,n,l,r,p,c,d))?(h||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=d,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,fY(e,t),l=t.memoizedProps,d=t.type===t.elementType?l:Ga(t.type,l),s.props=d,h=t.pendingProps,p=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=ha(c):(c=Wo(n)?up:ro.current,c=pg(t,c));var g=n.getDerivedStateFromProps;(f=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==h||p!==c)&&vU(t,s,r,c),Qu=!1,p=t.memoizedState,s.state=p,gE(t,r,s,i);var v=t.memoizedState;l!==h||p!==v||Ho.current||Qu?(typeof g=="function"&&(j$(t,n,g,r),v=t.memoizedState),(d=Qu||gU(t,n,d,r,p,v,c)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=c,r=d):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return G$(e,t,n,r,o,i)}function G$(e,t,n,r,i,o){jY(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&dU(t,n,!1),Su(e,t,o);r=t.stateNode,Mue.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=gg(t,e.child,null,o),t.child=gg(t,null,l,o)):_o(e,t,l,o),t.memoizedState=r.state,i&&dU(t,n,!0),t.child}function UY(e){var t=e.stateNode;t.pendingContext?uU(e,t.pendingContext,t.pendingContext!==t.context):t.context&&uU(e,t.context,!1),f4(e,t.containerInfo)}function kU(e,t,n,r,i){return mg(),s4(i),t.flags|=256,_o(e,t,n,r),t.child}var V$={dehydrated:null,treeContext:null,retryLane:0};function q$(e){return{baseLanes:e,cachePool:null,transitions:null}}function HY(e,t,n){var r=t.pendingProps,i=Cr.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),er(Cr,i&1),e===null)return F$(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=WT(s,r,0,null),e=Jh(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=q$(n),t.memoizedState=V$,e):x4(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Due(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var c={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Cd(i,c),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=Cd(l,o):(o=Jh(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?q$(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=V$,r}return o=e.child,e=o.sibling,r=Cd(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function x4(e,t){return t=WT({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fw(e,t,n,r){return r!==null&&s4(r),gg(t,e.child,null,n),e=x4(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Due(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=UD(Error(Oe(422))),Fw(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=WT({mode:"visible",children:r.children},i,0,null),o=Jh(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&gg(t,e.child,null,s),t.child.memoizedState=q$(s),t.memoizedState=V$,o);if(!(t.mode&1))return Fw(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(Oe(419)),r=UD(o,r,void 0),Fw(e,t,s,r)}if(l=(s&e.childLanes)!==0,zo||l){if(r=bi,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,_u(e,i),ol(r,e,i,-1))}return T4(),r=UD(Error(Oe(421))),Fw(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=que.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ts=wd(i.nextSibling),Is=t,fr=!0,Ya=null,e!==null&&(Qs[Js++]=uu,Qs[Js++]=du,Qs[Js++]=dp,uu=e.id,du=e.overflow,dp=t),t=x4(t,r.children),t.flags|=4096,t)}function AU(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),z$(e.return,t,n)}function HD(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function WY(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(_o(e,t,r.children,n),r=Cr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&AU(e,n,t);else if(e.tag===19)AU(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(er(Cr,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&vE(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),HD(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&vE(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}HD(t,!0,n,null,o);break;case"together":HD(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function wS(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Su(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),hp|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Oe(153));if(t.child!==null){for(e=t.child,n=Cd(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Cd(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Lue(e,t,n){switch(t.tag){case 3:UY(t),mg();break;case 5:vY(t);break;case 1:Wo(t.type)&&dE(t);break;case 4:f4(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;er(pE,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(er(Cr,Cr.current&1),t.flags|=128,null):n&t.child.childLanes?HY(e,t,n):(er(Cr,Cr.current&1),e=Su(e,t,n),e!==null?e.sibling:null);er(Cr,Cr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return WY(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),er(Cr,Cr.current),r)break;return null;case 22:case 23:return t.lanes=0,zY(e,t,n)}return Su(e,t,n)}var GY,X$,VY,qY;GY=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};X$=function(){};VY=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Gh(Fl.current);var o=null;switch(n){case"input":i=m$(e,i),r=m$(e,r),o=[];break;case"select":i=Ir({},i,{value:void 0}),r=Ir({},r,{value:void 0}),o=[];break;case"textarea":i=y$(e,i),r=y$(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=cE)}x$(n,r);var s;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var l=i[d];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Dx.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in r){var c=r[d];if(l=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&c!==l&&(c!=null||l!=null))if(d==="style")if(l){for(s in l)!l.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&l[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(o||(o=[]),o.push(d,n)),n=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Dx.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&cr("scroll",e),o||l===c||(o=[])):(o=o||[]).push(d,c))}n&&(o=o||[]).push("style",n);var d=o;(t.updateQueue=d)&&(t.flags|=4)}};qY=function(e,t,n,r){n!==r&&(t.flags|=4)};function nb(e,t){if(!fr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Nue(e,t,n){var r=t.pendingProps;switch(o4(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xi(t),null;case 1:return Wo(t.type)&&uE(),Xi(t),null;case 3:return r=t.stateNode,vg(),ur(Ho),ur(ro),p4(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Bw(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ya!==null&&(nF(Ya),Ya=null))),X$(e,t),Xi(t),null;case 5:h4(t);var i=Gh(Vx.current);if(n=t.type,e!==null&&t.stateNode!=null)VY(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Oe(166));return Xi(t),null}if(e=Gh(Fl.current),Bw(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Ml]=t,r[Wx]=o,e=(t.mode&1)!==0,n){case"dialog":cr("cancel",r),cr("close",r);break;case"iframe":case"object":case"embed":cr("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ml]=t,e[Wx]=r,GY(e,t,!1,!1),t.stateNode=e;e:{switch(s=w$(n,r),n){case"dialog":cr("cancel",e),cr("close",e),i=r;break;case"iframe":case"object":case"embed":cr("load",e),i=r;break;case"video":case"audio":for(i=0;ibg&&(t.flags|=128,r=!0,nb(o,!1),t.lanes=4194304)}else{if(!r)if(e=vE(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),nb(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!fr)return Xi(t),null}else 2*Hr()-o.renderingStartTime>bg&&n!==1073741824&&(t.flags|=128,r=!0,nb(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Hr(),t.sibling=null,n=Cr.current,er(Cr,r?n&1|2:n&1),t):(Xi(t),null);case 22:case 23:return C4(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ws&1073741824&&(Xi(t),t.subtreeFlags&6&&(t.flags|=8192)):Xi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function Bue(e,t){switch(o4(t),t.tag){case 1:return Wo(t.type)&&uE(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vg(),ur(Ho),ur(ro),p4(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return h4(t),null;case 13:if(ur(Cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));mg()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ur(Cr),null;case 4:return vg(),null;case 10:return c4(t.type._context),null;case 22:case 23:return C4(),null;case 24:return null;default:return null}}var zw=!1,Qi=!1,$ue=typeof WeakSet=="function"?WeakSet:Set,st=null;function Im(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Br(e,t,r)}else n.current=null}function Y$(e,t,n){try{n()}catch(r){Br(e,t,r)}}var RU=!1;function Fue(e,t){if(P$=sE,e=QX(),r4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,c=-1,d=0,f=0,h=e,p=null;t:for(;;){for(var g;h!==n||i!==0&&h.nodeType!==3||(l=s+i),h!==o||r!==0&&h.nodeType!==3||(c=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(g=h.firstChild)!==null;)p=h,h=g;for(;;){if(h===e)break t;if(p===n&&++d===i&&(l=s),p===o&&++f===r&&(c=s),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=g}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(O$={focusedElem:e,selectionRange:n},sE=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){t=st;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,S=v.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ga(t.type,y),S);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(E){Br(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}return v=RU,RU=!1,v}function ax(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Y$(t,n,o)}i=i.next}while(i!==r)}}function UT(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function K$(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function XY(e){var t=e.alternate;t!==null&&(e.alternate=null,XY(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ml],delete t[Wx],delete t[L$],delete t[wue],delete t[_ue])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function YY(e){return e.tag===5||e.tag===3||e.tag===4}function IU(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||YY(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Q$(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cE));else if(r!==4&&(e=e.child,e!==null))for(Q$(e,t,n),e=e.sibling;e!==null;)Q$(e,t,n),e=e.sibling}function J$(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(J$(e,t,n),e=e.sibling;e!==null;)J$(e,t,n),e=e.sibling}var Ni=null,qa=!1;function zu(e,t,n){for(n=n.child;n!==null;)KY(e,t,n),n=n.sibling}function KY(e,t,n){if($l&&typeof $l.onCommitFiberUnmount=="function")try{$l.onCommitFiberUnmount(DT,n)}catch{}switch(n.tag){case 5:Qi||Im(n,t);case 6:var r=Ni,i=qa;Ni=null,zu(e,t,n),Ni=r,qa=i,Ni!==null&&(qa?(e=Ni,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ni.removeChild(n.stateNode));break;case 18:Ni!==null&&(qa?(e=Ni,n=n.stateNode,e.nodeType===8?ND(e.parentNode,n):e.nodeType===1&&ND(e,n),Fx(e)):ND(Ni,n.stateNode));break;case 4:r=Ni,i=qa,Ni=n.stateNode.containerInfo,qa=!0,zu(e,t,n),Ni=r,qa=i;break;case 0:case 11:case 14:case 15:if(!Qi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Y$(n,t,s),i=i.next}while(i!==r)}zu(e,t,n);break;case 1:if(!Qi&&(Im(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Br(n,t,l)}zu(e,t,n);break;case 21:zu(e,t,n);break;case 22:n.mode&1?(Qi=(r=Qi)||n.memoizedState!==null,zu(e,t,n),Qi=r):zu(e,t,n);break;default:zu(e,t,n)}}function PU(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new $ue),t.forEach(function(r){var i=Xue.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ba(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Hr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jue(r/1960))-r,10e?16:e,ud===null)var r=!1;else{if(e=ud,ud=null,_E=0,wn&6)throw Error(Oe(331));var i=wn;for(wn|=4,st=e.current;st!==null;){var o=st,s=o.child;if(st.flags&16){var l=o.deletions;if(l!==null){for(var c=0;cHr()-S4?Qh(e,0):_4|=n),Go(e,t)}function iK(e,t){t===0&&(e.mode&1?(t=Pw,Pw<<=1,!(Pw&130023424)&&(Pw=4194304)):t=1);var n=ko();e=_u(e,t),e!==null&&(j1(e,t,n),Go(e,n))}function que(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),iK(e,n)}function Xue(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),iK(e,n)}var oK;oK=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ho.current)zo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zo=!1,Lue(e,t,n);zo=!!(e.flags&131072)}else zo=!1,fr&&t.flags&1048576&&lY(t,hE,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;wS(e,t),e=t.pendingProps;var i=pg(t,ro.current);Ym(t,n),i=g4(null,t,r,e,i,n);var o=v4();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Wo(r)?(o=!0,dE(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,d4(t),i.updater=zT,t.stateNode=i,i._reactInternals=t,U$(t,r,e,n),t=G$(null,t,r,!0,o,n)):(t.tag=0,fr&&o&&i4(t),_o(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(wS(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Kue(r),e=Ga(r,e),i){case 0:t=W$(null,t,r,e,n);break e;case 1:t=TU(null,t,r,e,n);break e;case 11:t=EU(null,t,r,e,n);break e;case 14:t=CU(null,t,r,Ga(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ga(r,i),W$(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ga(r,i),TU(e,t,r,i,n);case 3:e:{if(UY(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,fY(e,t),gE(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=yg(Error(Oe(423)),t),t=kU(e,t,r,n,i);break e}else if(r!==i){i=yg(Error(Oe(424)),t),t=kU(e,t,r,n,i);break e}else for(Ts=wd(t.stateNode.containerInfo.firstChild),Is=t,fr=!0,Ya=null,n=gY(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(mg(),r===i){t=Su(e,t,n);break e}_o(e,t,r,n)}t=t.child}return t;case 5:return vY(t),e===null&&F$(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,M$(r,i)?s=null:o!==null&&M$(r,o)&&(t.flags|=32),jY(e,t),_o(e,t,s,n),t.child;case 6:return e===null&&F$(t),null;case 13:return HY(e,t,n);case 4:return f4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=gg(t,null,r,n):_o(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ga(r,i),EU(e,t,r,i,n);case 7:return _o(e,t,t.pendingProps,n),t.child;case 8:return _o(e,t,t.pendingProps.children,n),t.child;case 12:return _o(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,er(pE,r._currentValue),r._currentValue=s,o!==null)if(hl(o.value,s)){if(o.children===i.children&&!Ho.current){t=Su(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=mu(-1,n&-n),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var f=d.pending;f===null?c.next=c:(c.next=f.next,f.next=c),d.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),z$(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Oe(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),z$(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}_o(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ym(t,n),i=ha(i),r=r(i),t.flags|=1,_o(e,t,r,n),t.child;case 14:return r=t.type,i=Ga(r,t.pendingProps),i=Ga(r.type,i),CU(e,t,r,i,n);case 15:return FY(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ga(r,i),wS(e,t),t.tag=1,Wo(r)?(e=!0,dE(t)):e=!1,Ym(t,n),pY(t,r,i),U$(t,r,i,n),G$(null,t,r,!0,e,n);case 19:return WY(e,t,n);case 22:return zY(e,t,n)}throw Error(Oe(156,t.tag))};function sK(e,t){return OX(e,t)}function Yue(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function na(e,t,n,r){return new Yue(e,t,n,r)}function k4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kue(e){if(typeof e=="function")return k4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V5)return 11;if(e===q5)return 14}return 2}function Cd(e,t){var n=e.alternate;return n===null?(n=na(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ES(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")k4(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case wm:return Jh(n.children,i,o,t);case G5:s=8,i|=8;break;case d$:return e=na(12,n,t,i|2),e.elementType=d$,e.lanes=o,e;case f$:return e=na(13,n,t,i),e.elementType=f$,e.lanes=o,e;case h$:return e=na(19,n,t,i),e.elementType=h$,e.lanes=o,e;case mX:return WT(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case hX:s=10;break e;case pX:s=9;break e;case V5:s=11;break e;case q5:s=14;break e;case Ku:s=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=na(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Jh(e,t,n,r){return e=na(7,e,r,t),e.lanes=n,e}function WT(e,t,n,r){return e=na(22,e,r,t),e.elementType=mX,e.lanes=n,e.stateNode={isHidden:!1},e}function WD(e,t,n){return e=na(6,e,null,t),e.lanes=n,e}function GD(e,t,n){return t=na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Que(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=CD(0),this.expirationTimes=CD(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=CD(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function A4(e,t,n,r,i,o,s,l,c){return e=new Que(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=na(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},d4(o),e}function Jue(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uK)}catch(e){console.error(e)}}uK(),lX.exports=Hs;var Jg=lX.exports;const Om=js(Jg),FU={disabled:!1},CE=de.createContext(null);var rde=function(t){return t.scrollTop},Nb="unmounted",Ph="exited",Oh="entering",sm="entered",rF="exiting",Pu=function(e){MT(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,l=s&&!s.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?l?(c=Ph,o.appearStatus=Oh):c=sm:r.unmountOnExit||r.mountOnEnter?c=Nb:c=Ph,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Nb?{status:Ph}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Oh&&s!==sm&&(o=Oh):(s===Oh||s===sm)&&(o=rF)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,l;return o=s=l=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,l=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:l}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Oh){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Om.findDOMNode(this);s&&rde(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ph&&this.setState({status:Nb})},n.performEnter=function(i){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:i,c=this.props.nodeRef?[l]:[Om.findDOMNode(this),l],d=c[0],f=c[1],h=this.getTimeouts(),p=l?h.appear:h.enter;if(!i&&!s||FU.disabled){this.safeSetState({status:sm},function(){o.props.onEntered(d)});return}this.props.onEnter(d,f),this.safeSetState({status:Oh},function(){o.props.onEntering(d,f),o.onTransitionEnd(p,function(){o.safeSetState({status:sm},function(){o.props.onEntered(d,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:Om.findDOMNode(this);if(!o||FU.disabled){this.safeSetState({status:Ph},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:rF},function(){i.props.onExiting(l),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ph},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,o.nextCallback=null,i(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Om.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],d=c[0],f=c[1];this.props.addEndListener(d,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Nb)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=Le(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return de.createElement(CE.Provider,{value:null},typeof s=="function"?s(i,l):de.cloneElement(de.Children.only(s),l))},t}(de.Component);Pu.contextType=CE;Pu.propTypes={};function Xp(){}Pu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Xp,onEntering:Xp,onEntered:Xp,onExit:Xp,onExiting:Xp,onExited:Xp};Pu.UNMOUNTED=Nb;Pu.EXITED=Ph;Pu.ENTERING=Oh;Pu.ENTERED=sm;Pu.EXITING=rF;const O4=Pu;function ide(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M4(e,t){var n=function(o){return t&&I.isValidElement(o)?t(o):o},r=Object.create(null);return e&&I.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function ode(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,l={};for(var c in t){if(r[c])for(s=0;se.scrollTop;function xg(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}function dde(e){return _t("MuiCollapse",e)}Ct("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const fde=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],hde=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Et(r,dde,n)},pde=Ee("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>$({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&$({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),mde=Ee("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>$({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),gde=Ee("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>$({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),fK=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:l="0px",component:c,easing:d,in:f,onEnter:h,onEntered:p,onEntering:g,onExit:v,onExited:y,onExiting:S,orientation:_="vertical",style:b,timeout:x=oX.standard,TransitionComponent:E=O4}=r,A=Le(r,fde),R=$({},r,{orientation:_,collapsedSize:l}),k=hde(R),O=In(),L=I.useRef(),N=I.useRef(null),H=I.useRef(),W=typeof l=="number"?`${l}px`:l,z=_==="horizontal",D=z?"width":"height";I.useEffect(()=>()=>{clearTimeout(L.current)},[]);const F=I.useRef(null),j=mr(n,F),V=Q=>ae=>{if(Q){const le=F.current;ae===void 0?Q(le):Q(le,ae)}},G=()=>N.current?N.current[z?"clientWidth":"clientHeight"]:0,K=V((Q,ae)=>{N.current&&z&&(N.current.style.position="absolute"),Q.style[D]=W,h&&h(Q,ae)}),Y=V((Q,ae)=>{const le=G();N.current&&z&&(N.current.style.position="");const{duration:he,easing:pe}=xg({style:b,timeout:x,easing:d},{mode:"enter"});if(x==="auto"){const ve=O.transitions.getAutoHeightDuration(le);Q.style.transitionDuration=`${ve}ms`,H.current=ve}else Q.style.transitionDuration=typeof he=="string"?he:`${he}ms`;Q.style[D]=`${le}px`,Q.style.transitionTimingFunction=pe,g&&g(Q,ae)}),J=V((Q,ae)=>{Q.style[D]="auto",p&&p(Q,ae)}),ie=V(Q=>{Q.style[D]=`${G()}px`,v&&v(Q)}),ce=V(y),ue=V(Q=>{const ae=G(),{duration:le,easing:he}=xg({style:b,timeout:x,easing:d},{mode:"exit"});if(x==="auto"){const pe=O.transitions.getAutoHeightDuration(ae);Q.style.transitionDuration=`${pe}ms`,H.current=pe}else Q.style.transitionDuration=typeof le=="string"?le:`${le}ms`;Q.style[D]=W,Q.style.transitionTimingFunction=he,S&&S(Q)}),se=Q=>{x==="auto"&&(L.current=setTimeout(Q,H.current||0)),i&&i(F.current,Q)};return C.jsx(E,$({in:f,onEnter:K,onEntered:J,onEntering:Y,onExit:ie,onExited:ce,onExiting:ue,addEndListener:se,nodeRef:F,timeout:x==="auto"?null:x},A,{children:(Q,ae)=>C.jsx(pde,$({as:c,className:Fe(k.root,s,{entered:k.entered,exited:!f&&W==="0px"&&k.hidden}[Q]),style:$({[z?"minWidth":"minHeight"]:W},b),ownerState:$({},R,{state:Q}),ref:j},ae,{children:C.jsx(mde,{ownerState:$({},R,{state:Q}),className:k.wrapper,ref:N,children:C.jsx(gde,{ownerState:$({},R,{state:Q}),className:k.wrapperInner,children:o})})}))}))});fK.muiSupportAuto=!0;const VD=fK;function vde(e){return _t("MuiPaper",e)}Ct("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const yde=["className","component","elevation","square","variant"],bde=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Et(o,vde,i)},xde=Ee("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return $({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&$({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${_n("#fff",O6(t.elevation))}, ${_n("#fff",O6(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),wde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:l=!1,variant:c="elevation"}=r,d=Le(r,yde),f=$({},r,{component:o,elevation:s,square:l,variant:c}),h=bde(f);return C.jsx(xde,$({as:o,ownerState:f,className:Fe(h.root,i),ref:n},d))}),Zg=wde;function _de(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:l,onExited:c,timeout:d}=e,[f,h]=I.useState(!1),p=Fe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=Fe(n.child,f&&n.childLeaving,r&&n.childPulsate);return!l&&!f&&h(!0),I.useEffect(()=>{if(!l&&c!=null){const y=setTimeout(c,d);return()=>{clearTimeout(y)}}},[c,l,d]),C.jsx("span",{className:p,style:g,children:C.jsx("span",{className:v})})}const Sde=Ct("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ks=Sde,Ede=["center","classes","className"];let YT=e=>e,zU,jU,UU,HU;const iF=550,Cde=80,Tde=ec(zU||(zU=YT` 0% { transform: scale(0); opacity: 0.1; @@ -131,7 +131,7 @@ Error generating stack: `+o.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),Ks.rippleVisible,Tde,iF,({theme:e})=>e.transitions.easing.easeInOut,Ks.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Ks.child,Ks.childLeaving,kde,iF,({theme:e})=>e.transitions.easing.easeInOut,Ks.childPulsate,Ade,({theme:e})=>e.transitions.easing.easeInOut),Pde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,l=Le(r,Ede),[c,d]=I.useState([]),f=I.useRef(0),h=I.useRef(null);I.useEffect(()=>{h.current&&(h.current(),h.current=null)},[c]);const p=I.useRef(!1),g=I.useRef(0),v=I.useRef(null),y=I.useRef(null);I.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const S=I.useCallback(E=>{const{pulsate:A,rippleX:R,rippleY:k,rippleSize:O,cb:L}=E;d(N=>[...N,C.jsx(Ide,{classes:{ripple:Fe(o.ripple,Ks.ripple),rippleVisible:Fe(o.rippleVisible,Ks.rippleVisible),ripplePulsate:Fe(o.ripplePulsate,Ks.ripplePulsate),child:Fe(o.child,Ks.child),childLeaving:Fe(o.childLeaving,Ks.childLeaving),childPulsate:Fe(o.childPulsate,Ks.childPulsate)},timeout:iF,pulsate:A,rippleX:R,rippleY:k,rippleSize:O},f.current)]),f.current+=1,h.current=L},[o]),_=I.useCallback((E={},A={},R=()=>{})=>{const{pulsate:k=!1,center:O=i||A.pulsate,fakeElement:L=!1}=A;if((E==null?void 0:E.type)==="mousedown"&&p.current){p.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(p.current=!0);const N=L?null:y.current,H=N?N.getBoundingClientRect():{width:0,height:0,left:0,top:0};let W,z,D;if(O||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)W=Math.round(H.width/2),z=Math.round(H.height/2);else{const{clientX:F,clientY:j}=E.touches&&E.touches.length>0?E.touches[0]:E;W=Math.round(F-H.left),z=Math.round(j-H.top)}if(O)D=Math.sqrt((2*H.width**2+H.height**2)/3),D%2===0&&(D+=1);else{const F=Math.max(Math.abs((N?N.clientWidth:0)-W),W)*2+2,j=Math.max(Math.abs((N?N.clientHeight:0)-z),z)*2+2;D=Math.sqrt(F**2+j**2)}E!=null&&E.touches?v.current===null&&(v.current=()=>{S({pulsate:k,rippleX:W,rippleY:z,rippleSize:D,cb:R})},g.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},Cde)):S({pulsate:k,rippleX:W,rippleY:z,rippleSize:D,cb:R})},[i,S]),b=I.useCallback(()=>{_({},{pulsate:!0})},[_]),x=I.useCallback((E,A)=>{if(clearTimeout(g.current),(E==null?void 0:E.type)==="touchend"&&v.current){v.current(),v.current=null,g.current=setTimeout(()=>{x(E,A)});return}v.current=null,d(R=>R.length>0?R.slice(1):R),h.current=A},[]);return I.useImperativeHandle(n,()=>({pulsate:b,start:_,stop:x}),[b,_,x]),C.jsx(Rde,$({className:Fe(Ks.root,o.root,s),ref:y},l,{children:C.jsx(ude,{component:null,exit:!0,children:c})}))}),Ode=Pde;function Mde(e){return _t("MuiButtonBase",e)}const Dde=Ct("MuiButtonBase",["root","disabled","focusVisible"]),Lde=Dde,Nde=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Bde=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=Et({root:["root",t&&"disabled",n&&"focusVisible"]},Mde,i);return n&&r&&(s.root+=` ${r}`),s},$de=Ee("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Lde.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Fde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:l,component:c="button",disabled:d=!1,disableRipple:f=!1,disableTouchRipple:h=!1,focusRipple:p=!1,LinkComponent:g="a",onBlur:v,onClick:y,onContextMenu:S,onDragLeave:_,onFocus:b,onFocusVisible:x,onKeyDown:E,onKeyUp:A,onMouseDown:R,onMouseLeave:k,onMouseUp:O,onTouchEnd:L,onTouchMove:N,onTouchStart:H,tabIndex:W=0,TouchRippleProps:z,touchRippleRef:D,type:F}=r,j=Le(r,Nde),V=I.useRef(null),G=I.useRef(null),K=mr(G,D),{isFocusVisibleRef:Y,onFocus:J,onBlur:ie,ref:ce}=x5(),[ue,se]=I.useState(!1);d&&ue&&se(!1),I.useImperativeHandle(i,()=>({focusVisible:()=>{se(!0),V.current.focus()}}),[]);const[Q,ae]=I.useState(!1);I.useEffect(()=>{ae(!0)},[]);const le=Q&&!f&&!d;I.useEffect(()=>{ue&&p&&!f&&Q&&G.current.pulsate()},[f,p,ue,Q]);function he(Ne,Rt,ct=h){return Zi(Ae=>(Rt&&Rt(Ae),!ct&&G.current&&G.current[Ne](Ae),!0))}const pe=he("start",R),ve=he("stop",S),ye=he("stop",_),xe=he("stop",O),me=he("stop",Ne=>{ue&&Ne.preventDefault(),k&&k(Ne)}),be=he("start",H),Qe=he("stop",L),qe=he("stop",N),at=he("stop",Ne=>{ie(Ne),Y.current===!1&&se(!1),v&&v(Ne)},!1),Lt=Zi(Ne=>{V.current||(V.current=Ne.currentTarget),J(Ne),Y.current===!0&&(se(!0),x&&x(Ne)),b&&b(Ne)}),Ie=()=>{const Ne=V.current;return c&&c!=="button"&&!(Ne.tagName==="A"&&Ne.href)},ze=I.useRef(!1),it=Zi(Ne=>{p&&!ze.current&&ue&&G.current&&Ne.key===" "&&(ze.current=!0,G.current.stop(Ne,()=>{G.current.start(Ne)})),Ne.target===Ne.currentTarget&&Ie()&&Ne.key===" "&&Ne.preventDefault(),E&&E(Ne),Ne.target===Ne.currentTarget&&Ie()&&Ne.key==="Enter"&&!d&&(Ne.preventDefault(),y&&y(Ne))}),pt=Zi(Ne=>{p&&Ne.key===" "&&G.current&&ue&&!Ne.defaultPrevented&&(ze.current=!1,G.current.stop(Ne,()=>{G.current.pulsate(Ne)})),A&&A(Ne),y&&Ne.target===Ne.currentTarget&&Ie()&&Ne.key===" "&&!Ne.defaultPrevented&&y(Ne)});let mt=c;mt==="button"&&(j.href||j.to)&&(mt=g);const _e={};mt==="button"?(_e.type=F===void 0?"button":F,_e.disabled=d):(!j.href&&!j.to&&(_e.role="button"),d&&(_e["aria-disabled"]=d));const je=mr(n,ce,V),Ye=$({},r,{centerRipple:o,component:c,disabled:d,disableRipple:f,disableTouchRipple:h,focusRipple:p,tabIndex:W,focusVisible:ue}),$e=Bde(Ye);return C.jsxs($de,$({as:mt,className:Fe($e.root,l),ownerState:Ye,onBlur:at,onClick:y,onContextMenu:ve,onFocus:Lt,onKeyDown:it,onKeyUp:pt,onMouseDown:pe,onMouseLeave:me,onMouseUp:xe,onDragLeave:ye,onTouchEnd:Qe,onTouchMove:qe,onTouchStart:be,ref:je,tabIndex:d?-1:W,type:F},_e,j,{children:[s,le?C.jsx(Ode,$({ref:K,center:o},z)):null]}))}),Ou=Fde;function zde(e){return _t("MuiIconButton",e)}const jde=Ct("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Ude=jde,Hde=["edge","children","className","color","disabled","disableFocusRipple","size"],Wde=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${Me(r)}`,i&&`edge${Me(i)}`,`size${Me(o)}`]};return Et(s,zde,t)},Gde=Ee(Ou,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Me(n.color)}`],n.edge&&t[`edge${Me(n.edge)}`],t[`size${Me(n.size)}`]]}})(({theme:e,ownerState:t})=>$({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return $({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&$({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":$({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${Ude.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Vde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:l="default",disabled:c=!1,disableFocusRipple:d=!1,size:f="medium"}=r,h=Le(r,Hde),p=$({},r,{edge:i,color:l,disabled:c,disableFocusRipple:d,size:f}),g=Wde(p);return C.jsx(Gde,$({className:Fe(g.root,s),centerRipple:!0,focusRipple:!d,disabled:c,ref:n,ownerState:p},h,{children:o}))}),mp=Vde;function qde(e){return _t("MuiTypography",e)}Ct("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Xde=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Yde=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,l={root:["root",o,e.align!=="inherit"&&`align${Me(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Et(l,qde,s)},Kde=Ee("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Me(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>$({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),WU={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Qde={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Jde=e=>Qde[e]||e,Zde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTypography"}),i=Jde(r.color),o=N5($({},r,{color:i})),{align:s="inherit",className:l,component:c,gutterBottom:d=!1,noWrap:f=!1,paragraph:h=!1,variant:p="body1",variantMapping:g=WU}=o,v=Le(o,Xde),y=$({},o,{align:s,color:i,className:l,component:c,gutterBottom:d,noWrap:f,paragraph:h,variant:p,variantMapping:g}),S=c||(h?"p":g[p]||WU[p])||"span",_=Yde(y);return C.jsx(Kde,$({as:S,ref:n,ownerState:y,className:Fe(_.root,l)},v))}),zt=Zde;function efe(e){return _t("MuiAppBar",e)}Ct("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const tfe=["className","color","enableColorOnDark","position"],nfe=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${Me(t)}`,`position${Me(n)}`]};return Et(i,efe,r)},Hw=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,rfe=Ee(Zg,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Me(n.position)}`],t[`color${Me(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return $({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&$({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&$({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&$({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:Hw(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:Hw(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:Hw(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:Hw(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),ife=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:l="fixed"}=r,c=Le(r,tfe),d=$({},r,{color:o,position:l,enableColorOnDark:s}),f=nfe(d);return C.jsx(rfe,$({square:!0,component:"header",ownerState:d,elevation:4,className:Fe(f.root,i,l==="fixed"&&"mui-fixed"),ref:n},c))}),ofe=ife;function zl(e){return typeof e=="string"}function Bb(e,t,n){return e===void 0||zl(e)?t:$({},t,{ownerState:$({},t.ownerState,n)})}function sfe(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const afe={disableDefaultClasses:!1},lfe=I.createContext(afe);function cfe(e){const{disableDefaultClasses:t}=I.useContext(lfe);return n=>t?"":e(n)}function TE(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function ufe(e,t,n){return typeof e=="function"?e(t,n):e}function GU(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function dfe(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const g=Fe(i==null?void 0:i.className,r==null?void 0:r.className,o,n==null?void 0:n.className),v=$({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),y=$({},n,i,r);return g.length>0&&(y.className=g),Object.keys(v).length>0&&(y.style=v),{props:y,internalRef:void 0}}const s=TE($({},i,r)),l=GU(r),c=GU(i),d=t(s),f=Fe(d==null?void 0:d.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=$({},d==null?void 0:d.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),p=$({},d,n,c,l);return f.length>0&&(p.className=f),Object.keys(h).length>0&&(p.style=h),{props:p,internalRef:d.ref}}const ffe=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Wr(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Le(e,ffe),l=o?{}:ufe(r,i),{props:c,internalRef:d}=dfe($({},s,{externalSlotProps:l})),f=mr(d,l==null?void 0:l.ref,(t=e.additionalProps)==null?void 0:t.ref);return Bb(n,$({},c,{ref:f}),i)}function VU(e){return e.substring(2).toLowerCase()}function hfe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const f=mr(t.ref,l),h=Zi(v=>{const y=d.current;d.current=!1;const S=Ar(l.current);if(!c.current||!l.current||"clientX"in v&&hfe(v,S))return;if(s.current){s.current=!1;return}let _;v.composedPath?_=v.composedPath().indexOf(l.current)>-1:_=!S.documentElement.contains(v.target)||l.current.contains(v.target),!_&&(n||!y)&&i(v)}),p=v=>y=>{d.current=!0;const S=t.props[v];S&&S(y)},g={ref:f};return o!==!1&&(g[o]=p(o)),I.useEffect(()=>{if(o!==!1){const v=VU(o),y=Ar(l.current),S=()=>{s.current=!0};return y.addEventListener(v,h),y.addEventListener("touchmove",S),()=>{y.removeEventListener(v,h),y.removeEventListener("touchmove",S)}}},[h,o]),r!==!1&&(g[r]=p(r)),I.useEffect(()=>{if(r!==!1){const v=VU(r),y=Ar(l.current);return y.addEventListener(v,h),()=>{y.removeEventListener(v,h)}}},[h,r]),C.jsx(I.Fragment,{children:I.cloneElement(t,g)})}const mfe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function gfe(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function vfe(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function yfe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||vfe(e))}function bfe(e){const t=[],n=[];return Array.from(e.querySelectorAll(mfe)).forEach((r,i)=>{const o=gfe(r);o===-1||!yfe(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function xfe(){return!0}function wfe(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=bfe,isEnabled:s=xfe,open:l}=e,c=I.useRef(!1),d=I.useRef(null),f=I.useRef(null),h=I.useRef(null),p=I.useRef(null),g=I.useRef(!1),v=I.useRef(null),y=mr(t.ref,v),S=I.useRef(null);I.useEffect(()=>{!l||!v.current||(g.current=!n)},[n,l]),I.useEffect(()=>{if(!l||!v.current)return;const x=Ar(v.current);return v.current.contains(x.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),g.current&&v.current.focus()),()=>{i||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}},[l]),I.useEffect(()=>{if(!l||!v.current)return;const x=Ar(v.current),E=k=>{S.current=k,!(r||!s()||k.key!=="Tab")&&x.activeElement===v.current&&k.shiftKey&&(c.current=!0,f.current&&f.current.focus())},A=()=>{const k=v.current;if(k===null)return;if(!x.hasFocus()||!s()||c.current){c.current=!1;return}if(k.contains(x.activeElement)||r&&x.activeElement!==d.current&&x.activeElement!==f.current)return;if(x.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!g.current)return;let O=[];if((x.activeElement===d.current||x.activeElement===f.current)&&(O=o(v.current)),O.length>0){var L,N;const H=!!((L=S.current)!=null&&L.shiftKey&&((N=S.current)==null?void 0:N.key)==="Tab"),W=O[0],z=O[O.length-1];typeof W!="string"&&typeof z!="string"&&(H?z.focus():W.focus())}else k.focus()};x.addEventListener("focusin",A),x.addEventListener("keydown",E,!0);const R=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&A()},50);return()=>{clearInterval(R),x.removeEventListener("focusin",A),x.removeEventListener("keydown",E,!0)}},[n,r,i,s,l,o]);const _=x=>{h.current===null&&(h.current=x.relatedTarget),g.current=!0,p.current=x.target;const E=t.props.onFocus;E&&E(x)},b=x=>{h.current===null&&(h.current=x.relatedTarget),g.current=!0};return C.jsxs(I.Fragment,{children:[C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelStart"}),I.cloneElement(t,{ref:y,onFocus:_}),C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:f,"data-testid":"sentinelEnd"})]})}var Vo="top",ma="bottom",ga="right",qo="left",L4="auto",G1=[Vo,ma,ga,qo],wg="start",Qx="end",_fe="clippingParents",hK="viewport",ib="popper",Sfe="reference",qU=G1.reduce(function(e,t){return e.concat([t+"-"+wg,t+"-"+Qx])},[]),pK=[].concat(G1,[L4]).reduce(function(e,t){return e.concat([t,t+"-"+wg,t+"-"+Qx])},[]),Efe="beforeRead",Cfe="read",Tfe="afterRead",kfe="beforeMain",Afe="main",Rfe="afterMain",Ife="beforeWrite",Pfe="write",Ofe="afterWrite",Mfe=[Efe,Cfe,Tfe,kfe,Afe,Rfe,Ife,Pfe,Ofe];function Xl(e){return e?(e.nodeName||"").toLowerCase():null}function Bs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function gp(e){var t=Bs(e).Element;return e instanceof t||e instanceof Element}function ca(e){var t=Bs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function N4(e){if(typeof ShadowRoot>"u")return!1;var t=Bs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Dfe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ca(o)||!Xl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function Lfe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=s.reduce(function(c,d){return c[d]="",c},{});!ca(i)||!Xl(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const Nfe={name:"applyStyles",enabled:!0,phase:"write",fn:Dfe,effect:Lfe,requires:["computeStyles"]};function jl(e){return e.split("-")[0]}var Zh=Math.max,kE=Math.min,_g=Math.round;function oF(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function mK(){return!/^((?!chrome|android).)*safari/i.test(oF())}function Sg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ca(e)&&(i=e.offsetWidth>0&&_g(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&_g(r.height)/e.offsetHeight||1);var s=gp(e)?Bs(e):window,l=s.visualViewport,c=!mK()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,f=(r.top+(c&&l?l.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function B4(e){var t=Sg(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function gK(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&N4(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Bs(e).getComputedStyle(e)}function Bfe(e){return["table","td","th"].indexOf(Xl(e))>=0}function Xd(e){return((gp(e)?e.ownerDocument:e.document)||window.document).documentElement}function KT(e){return Xl(e)==="html"?e:e.assignedSlot||e.parentNode||(N4(e)?e.host:null)||Xd(e)}function XU(e){return!ca(e)||Eu(e).position==="fixed"?null:e.offsetParent}function $fe(e){var t=/firefox/i.test(oF()),n=/Trident/i.test(oF());if(n&&ca(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=KT(e);for(N4(i)&&(i=i.host);ca(i)&&["html","body"].indexOf(Xl(i))<0;){var o=Eu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function V1(e){for(var t=Bs(e),n=XU(e);n&&Bfe(n)&&Eu(n).position==="static";)n=XU(n);return n&&(Xl(n)==="html"||Xl(n)==="body"&&Eu(n).position==="static")?t:n||$fe(e)||t}function $4(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ux(e,t,n){return Zh(e,kE(t,n))}function Ffe(e,t,n){var r=ux(e,t,n);return r>n?n:r}function vK(){return{top:0,right:0,bottom:0,left:0}}function yK(e){return Object.assign({},vK(),e)}function bK(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var zfe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,yK(typeof t!="number"?t:bK(t,G1))};function jfe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=jl(n.placement),c=$4(l),d=[qo,ga].indexOf(l)>=0,f=d?"height":"width";if(!(!o||!s)){var h=zfe(i.padding,n),p=B4(o),g=c==="y"?Vo:qo,v=c==="y"?ma:ga,y=n.rects.reference[f]+n.rects.reference[c]-s[c]-n.rects.popper[f],S=s[c]-n.rects.reference[c],_=V1(o),b=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,x=y/2-S/2,E=h[g],A=b-p[f]-h[v],R=b/2-p[f]/2+x,k=ux(E,R,A),O=c;n.modifiersData[r]=(t={},t[O]=k,t.centerOffset=k-R,t)}}function Ufe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||gK(t.elements.popper,i)&&(t.elements.arrow=i))}const Hfe={name:"arrow",enabled:!0,phase:"main",fn:jfe,effect:Ufe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Eg(e){return e.split("-")[1]}var Wfe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gfe(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:_g(n*i)/i||0,y:_g(r*i)/i||0}}function YU(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=s.x,g=p===void 0?0:p,v=s.y,y=v===void 0?0:v,S=typeof f=="function"?f({x:g,y}):{x:g,y};g=S.x,y=S.y;var _=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),x=qo,E=Vo,A=window;if(d){var R=V1(n),k="clientHeight",O="clientWidth";if(R===Bs(n)&&(R=Xd(n),Eu(R).position!=="static"&&l==="absolute"&&(k="scrollHeight",O="scrollWidth")),R=R,i===Vo||(i===qo||i===ga)&&o===Qx){E=ma;var L=h&&R===A&&A.visualViewport?A.visualViewport.height:R[k];y-=L-r.height,y*=c?1:-1}if(i===qo||(i===Vo||i===ma)&&o===Qx){x=ga;var N=h&&R===A&&A.visualViewport?A.visualViewport.width:R[O];g-=N-r.width,g*=c?1:-1}}var H=Object.assign({position:l},d&&Wfe),W=f===!0?Gfe({x:g,y},Bs(n)):{x:g,y};if(g=W.x,y=W.y,c){var z;return Object.assign({},H,(z={},z[E]=b?"0":"",z[x]=_?"0":"",z.transform=(A.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",z))}return Object.assign({},H,(t={},t[E]=b?y+"px":"",t[x]=_?g+"px":"",t.transform="",t))}function Vfe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:jl(t.placement),variation:Eg(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,YU(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,YU(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const qfe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Vfe,data:{}};var Ww={passive:!0};function Xfe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=Bs(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",n.update,Ww)}),l&&c.addEventListener("resize",n.update,Ww),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",n.update,Ww)}),l&&c.removeEventListener("resize",n.update,Ww)}}const Yfe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Xfe,data:{}};var Kfe={left:"right",right:"left",bottom:"top",top:"bottom"};function CS(e){return e.replace(/left|right|bottom|top/g,function(t){return Kfe[t]})}var Qfe={start:"end",end:"start"};function KU(e){return e.replace(/start|end/g,function(t){return Qfe[t]})}function F4(e){var t=Bs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function z4(e){return Sg(Xd(e)).left+F4(e).scrollLeft}function Jfe(e,t){var n=Bs(e),r=Xd(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var d=mK();(d||!d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+z4(e),y:c}}function Zfe(e){var t,n=Xd(e),r=F4(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Zh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Zh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+z4(e),c=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(l+=Zh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function j4(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function xK(e){return["html","body","#document"].indexOf(Xl(e))>=0?e.ownerDocument.body:ca(e)&&j4(e)?e:xK(KT(e))}function dx(e,t){var n;t===void 0&&(t=[]);var r=xK(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Bs(r),s=i?[o].concat(o.visualViewport||[],j4(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(dx(KT(s)))}function sF(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ehe(e,t){var n=Sg(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function QU(e,t,n){return t===hK?sF(Jfe(e,n)):gp(t)?ehe(t,n):sF(Zfe(Xd(e)))}function the(e){var t=dx(KT(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&ca(e)?V1(e):e;return gp(r)?t.filter(function(i){return gp(i)&&gK(i,r)&&Xl(i)!=="body"}):[]}function nhe(e,t,n,r){var i=t==="clippingParents"?the(e):[].concat(t),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var f=QU(e,d,r);return c.top=Zh(f.top,c.top),c.right=kE(f.right,c.right),c.bottom=kE(f.bottom,c.bottom),c.left=Zh(f.left,c.left),c},QU(e,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function wK(e){var t=e.reference,n=e.element,r=e.placement,i=r?jl(r):null,o=r?Eg(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(i){case Vo:c={x:s,y:t.y-n.height};break;case ma:c={x:s,y:t.y+t.height};break;case ga:c={x:t.x+t.width,y:l};break;case qo:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=i?$4(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case wg:c[d]=c[d]-(t[f]/2-n[f]/2);break;case Qx:c[d]=c[d]+(t[f]/2-n[f]/2);break}}return c}function Jx(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?_fe:l,d=n.rootBoundary,f=d===void 0?hK:d,h=n.elementContext,p=h===void 0?ib:h,g=n.altBoundary,v=g===void 0?!1:g,y=n.padding,S=y===void 0?0:y,_=yK(typeof S!="number"?S:bK(S,G1)),b=p===ib?Sfe:ib,x=e.rects.popper,E=e.elements[v?b:p],A=nhe(gp(E)?E:E.contextElement||Xd(e.elements.popper),c,f,s),R=Sg(e.elements.reference),k=wK({reference:R,element:x,strategy:"absolute",placement:i}),O=sF(Object.assign({},x,k)),L=p===ib?O:R,N={top:A.top-L.top+_.top,bottom:L.bottom-A.bottom+_.bottom,left:A.left-L.left+_.left,right:L.right-A.right+_.right},H=e.modifiersData.offset;if(p===ib&&H){var W=H[i];Object.keys(N).forEach(function(z){var D=[ga,ma].indexOf(z)>=0?1:-1,F=[Vo,ma].indexOf(z)>=0?"y":"x";N[z]+=W[F]*D})}return N}function rhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?pK:c,f=Eg(r),h=f?l?qU:qU.filter(function(v){return Eg(v)===f}):G1,p=h.filter(function(v){return d.indexOf(v)>=0});p.length===0&&(p=h);var g=p.reduce(function(v,y){return v[y]=Jx(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[jl(y)],v},{});return Object.keys(g).sort(function(v,y){return g[v]-g[y]})}function ihe(e){if(jl(e)===L4)return[];var t=CS(e);return[KU(e),t,KU(t)]}function ohe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,d=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,v=g===void 0?!0:g,y=n.allowedAutoPlacements,S=t.options.placement,_=jl(S),b=_===S,x=c||(b||!v?[CS(S)]:ihe(S)),E=[S].concat(x).reduce(function(ue,se){return ue.concat(jl(se)===L4?rhe(t,{placement:se,boundary:f,rootBoundary:h,padding:d,flipVariations:v,allowedAutoPlacements:y}):se)},[]),A=t.rects.reference,R=t.rects.popper,k=new Map,O=!0,L=E[0],N=0;N=0,F=D?"width":"height",j=Jx(t,{placement:H,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),V=D?z?ga:qo:z?ma:Vo;A[F]>R[F]&&(V=CS(V));var G=CS(V),K=[];if(o&&K.push(j[W]<=0),l&&K.push(j[V]<=0,j[G]<=0),K.every(function(ue){return ue})){L=H,O=!1;break}k.set(H,K)}if(O)for(var Y=v?3:1,J=function(se){var Q=E.find(function(ae){var le=k.get(ae);if(le)return le.slice(0,se).every(function(he){return he})});if(Q)return L=Q,"break"},ie=Y;ie>0;ie--){var ce=J(ie);if(ce==="break")break}t.placement!==L&&(t.modifiersData[r]._skip=!0,t.placement=L,t.reset=!0)}}const she={name:"flip",enabled:!0,phase:"main",fn:ohe,requiresIfExists:["offset"],data:{_skip:!1}};function JU(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ZU(e){return[Vo,ga,ma,qo].some(function(t){return e[t]>=0})}function ahe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Jx(t,{elementContext:"reference"}),l=Jx(t,{altBoundary:!0}),c=JU(s,r),d=JU(l,i,o),f=ZU(c),h=ZU(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const lhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ahe};function che(e,t,n){var r=jl(e),i=[qo,Vo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[qo,ga].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function uhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=pK.reduce(function(f,h){return f[h]=che(h,t.rects,o),f},{}),l=s[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=s}const dhe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:uhe};function fhe(e){var t=e.state,n=e.name;t.modifiersData[n]=wK({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const hhe={name:"popperOffsets",enabled:!0,phase:"read",fn:fhe,data:{}};function phe(e){return e==="x"?"y":"x"}function mhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,g=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,S=Jx(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),_=jl(t.placement),b=Eg(t.placement),x=!b,E=$4(_),A=phe(E),R=t.modifiersData.popperOffsets,k=t.rects.reference,O=t.rects.popper,L=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,N=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(R){if(o){var z,D=E==="y"?Vo:qo,F=E==="y"?ma:ga,j=E==="y"?"height":"width",V=R[E],G=V+S[D],K=V-S[F],Y=g?-O[j]/2:0,J=b===wg?k[j]:O[j],ie=b===wg?-O[j]:-k[j],ce=t.elements.arrow,ue=g&&ce?B4(ce):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:vK(),Q=se[D],ae=se[F],le=ux(0,k[j],ue[j]),he=x?k[j]/2-Y-le-Q-N.mainAxis:J-le-Q-N.mainAxis,pe=x?-k[j]/2+Y+le+ae+N.mainAxis:ie+le+ae+N.mainAxis,ve=t.elements.arrow&&V1(t.elements.arrow),ye=ve?E==="y"?ve.clientTop||0:ve.clientLeft||0:0,xe=(z=H==null?void 0:H[E])!=null?z:0,me=V+he-xe-ye,be=V+pe-xe,Qe=ux(g?kE(G,me):G,V,g?Zh(K,be):K);R[E]=Qe,W[E]=Qe-V}if(l){var qe,at=E==="x"?Vo:qo,Lt=E==="x"?ma:ga,Ie=R[A],ze=A==="y"?"height":"width",it=Ie+S[at],pt=Ie-S[Lt],mt=[Vo,qo].indexOf(_)!==-1,_e=(qe=H==null?void 0:H[A])!=null?qe:0,je=mt?it:Ie-k[ze]-O[ze]-_e+N.altAxis,Ye=mt?Ie+k[ze]+O[ze]-_e-N.altAxis:pt,$e=g&&mt?Ffe(je,Ie,Ye):ux(g?je:it,Ie,g?Ye:pt);R[A]=$e,W[A]=$e-Ie}t.modifiersData[r]=W}}const ghe={name:"preventOverflow",enabled:!0,phase:"main",fn:mhe,requiresIfExists:["offset"]};function vhe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function yhe(e){return e===Bs(e)||!ca(e)?F4(e):vhe(e)}function bhe(e){var t=e.getBoundingClientRect(),n=_g(t.width)/e.offsetWidth||1,r=_g(t.height)/e.offsetHeight||1;return n!==1||r!==1}function xhe(e,t,n){n===void 0&&(n=!1);var r=ca(t),i=ca(t)&&bhe(t),o=Xd(t),s=Sg(e,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Xl(t)!=="body"||j4(o))&&(l=yhe(t)),ca(t)?(c=Sg(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=z4(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function whe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function _he(e){var t=whe(e);return Mfe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function She(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ehe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var e8={placement:"bottom",modifiers:[],strategy:"absolute"};function t8(){for(var e=arguments.length,t=new Array(e),n=0;n{o||l(Ahe(i)||document.body)},[i,o]),Ao(()=>{if(s&&!o)return n$(n,s),()=>{n$(n,null)}},[n,s,o]),o){if(I.isValidElement(r)){const d={ref:c};return I.cloneElement(r,d)}return C.jsx(I.Fragment,{children:r})}return C.jsx(I.Fragment,{children:s&&Jg.createPortal(r,s)})});function Rhe(e){return _t("MuiPopper",e)}Ct("MuiPopper",["root"]);const Ihe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Phe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Ohe(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function aF(e){return typeof e=="function"?e():e}function Mhe(e){return e.nodeType!==void 0}const Dhe=()=>Et({root:["root"]},cfe(Rhe)),Lhe={},Nhe=I.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:l,modifiers:c,open:d,placement:f,popperOptions:h,popperRef:p,slotProps:g={},slots:v={},TransitionProps:y}=t,S=Le(t,Ihe),_=I.useRef(null),b=mr(_,n),x=I.useRef(null),E=mr(x,p),A=I.useRef(E);Ao(()=>{A.current=E},[E]),I.useImperativeHandle(p,()=>x.current,[]);const R=Ohe(f,s),[k,O]=I.useState(R),[L,N]=I.useState(aF(i));I.useEffect(()=>{x.current&&x.current.forceUpdate()}),I.useEffect(()=>{i&&N(aF(i))},[i]),Ao(()=>{if(!L||!d)return;const F=G=>{O(G.placement)};let j=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:G})=>{F(G)}}];c!=null&&(j=j.concat(c)),h&&h.modifiers!=null&&(j=j.concat(h.modifiers));const V=khe(L,_.current,$({placement:R},h,{modifiers:j}));return A.current(V),()=>{V.destroy(),A.current(null)}},[L,l,c,d,h,R]);const H={placement:k};y!==null&&(H.TransitionProps=y);const W=Dhe(),z=(r=v.root)!=null?r:"div",D=Wr({elementType:z,externalSlotProps:g.root,externalForwardedProps:S,additionalProps:{role:"tooltip",ref:b},ownerState:t,className:W.root});return C.jsx(z,$({},D,{children:typeof o=="function"?o(H):o}))}),Bhe=I.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:d,open:f,placement:h="bottom",popperOptions:p=Lhe,popperRef:g,style:v,transition:y=!1,slotProps:S={},slots:_={}}=t,b=Le(t,Phe),[x,E]=I.useState(!0),A=()=>{E(!1)},R=()=>{E(!0)};if(!c&&!f&&(!y||x))return null;let k;if(o)k=o;else if(r){const N=aF(r);k=N&&Mhe(N)?Ar(N).body:Ar(null).body}const O=!f&&c&&(!y||x)?"none":void 0,L=y?{in:f,onEnter:A,onExited:R}:void 0;return C.jsx(_K,{disablePortal:l,container:k,children:C.jsx(Nhe,$({anchorEl:r,direction:s,disablePortal:l,modifiers:d,ref:n,open:y?!x:f,placement:h,popperOptions:p,popperRef:g,slotProps:S,slots:_},b,{style:$({position:"fixed",top:0,left:0,display:O},v),TransitionProps:L,children:i}))})});function $he(e){const t=Ar(e);return t.body===e?bu(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function fx(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function n8(e){return parseInt(bu(e).getComputedStyle(e).paddingRight,10)||0}function Fhe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function r8(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const l=o.indexOf(s)===-1,c=!Fhe(s);l&&c&&fx(s,i)})}function qD(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function zhe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if($he(r)){const s=Tq(Ar(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${n8(r)+s}px`;const l=Ar(r).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${n8(c)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Ar(r).body;else{const s=r.parentElement,l=bu(r);o=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:l})=>{o?s.style.setProperty(l,o):s.style.removeProperty(l)})}}function jhe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Uhe{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&fx(t.modalRef,!1);const i=jhe(n);r8(n,t.mount,t.modalRef,i,!0);const o=qD(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=qD(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=zhe(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=qD(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&fx(t.modalRef,n),r8(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&fx(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Hhe(e){return typeof e=="function"?e():e}function Whe(e){return e?e.props.hasOwnProperty("in"):!1}const Ghe=new Uhe;function Vhe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Ghe,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:d,open:f,rootRef:h}=e,p=I.useRef({}),g=I.useRef(null),v=I.useRef(null),y=mr(v,h),[S,_]=I.useState(!f),b=Whe(c);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const E=()=>Ar(g.current),A=()=>(p.current.modalRef=v.current,p.current.mount=g.current,p.current),R=()=>{i.mount(A(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},k=Zi(()=>{const j=Hhe(t)||E().body;i.add(A(),j),v.current&&R()}),O=I.useCallback(()=>i.isTopModal(A()),[i]),L=Zi(j=>{g.current=j,j&&(f&&O()?R():v.current&&fx(v.current,x))}),N=I.useCallback(()=>{i.remove(A(),x)},[x,i]);I.useEffect(()=>()=>{N()},[N]),I.useEffect(()=>{f?k():(!b||!o)&&N()},[f,N,b,o,k]);const H=j=>V=>{var G;(G=j.onKeyDown)==null||G.call(j,V),!(V.key!=="Escape"||!O())&&(n||(V.stopPropagation(),d&&d(V,"escapeKeyDown")))},W=j=>V=>{var G;(G=j.onClick)==null||G.call(j,V),V.target===V.currentTarget&&d&&d(V,"backdropClick")};return{getRootProps:(j={})=>{const V=TE(e);delete V.onTransitionEnter,delete V.onTransitionExited;const G=$({},V,j);return $({role:"presentation"},G,{onKeyDown:H(G),ref:y})},getBackdropProps:(j={})=>{const V=j;return $({"aria-hidden":!0},V,{onClick:W(V),open:f})},getTransitionProps:()=>{const j=()=>{_(!1),s&&s()},V=()=>{_(!0),l&&l(),o&&N()};return{onEnter:i6(j,c==null?void 0:c.props.onEnter),onExited:i6(V,c==null?void 0:c.props.onExited)}},rootRef:y,portalRef:L,isTopModal:O,exited:S,hasTransition:b}}const qhe=2;function SK(e,t){return e-t}function ob(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function i8(e,t){var n;const{index:r}=(n=e.reduce((i,o,s)=>{const l=Math.abs(t-o);return i===null||l({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},Jhe=e=>e;let Xw;function XD(){return Xw===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Xw=CSS.supports("touch-action","none"):Xw=!0),Xw}function Zhe(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:l=100,min:c=0,name:d,onChange:f,onChangeCommitted:h,orientation:p="horizontal",rootRef:g,scale:v=Jhe,step:y=1,tabIndex:S,value:_}=e,b=I.useRef(),[x,E]=I.useState(-1),[A,R]=I.useState(-1),[k,O]=I.useState(!1),L=I.useRef(0),[N,H]=Ix({controlled:_,default:n??c,name:"Slider"}),W=f&&((_e,je,Ye)=>{const $e=_e.nativeEvent||_e,Ne=new $e.constructor($e.type,$e);Object.defineProperty(Ne,"target",{writable:!0,value:{value:je,name:d}}),f(Ne,je,Ye)}),z=Array.isArray(N);let D=z?N.slice().sort(SK):[N];D=D.map(_e=>ob(_e,c,l));const F=s===!0&&y!==null?[...Array(Math.floor((l-c)/y)+1)].map((_e,je)=>({value:c+y*je})):s||[],j=F.map(_e=>_e.value),{isFocusVisibleRef:V,onBlur:G,onFocus:K,ref:Y}=x5(),[J,ie]=I.useState(-1),ce=I.useRef(),ue=mr(Y,ce),se=mr(g,ue),Q=_e=>je=>{var Ye;const $e=Number(je.currentTarget.getAttribute("data-index"));K(je),V.current===!0&&ie($e),R($e),_e==null||(Ye=_e.onFocus)==null||Ye.call(_e,je)},ae=_e=>je=>{var Ye;G(je),V.current===!1&&ie(-1),R(-1),_e==null||(Ye=_e.onBlur)==null||Ye.call(_e,je)};Ao(()=>{if(r&&ce.current.contains(document.activeElement)){var _e;(_e=document.activeElement)==null||_e.blur()}},[r]),r&&x!==-1&&E(-1),r&&J!==-1&&ie(-1);const le=_e=>je=>{var Ye;(Ye=_e.onChange)==null||Ye.call(_e,je);const $e=Number(je.currentTarget.getAttribute("data-index")),Ne=D[$e],Rt=j.indexOf(Ne);let ct=je.target.valueAsNumber;if(F&&y==null){const Ae=j[j.length-1];ct>Ae?ct=Ae:ct{const{current:Ye}=ce,{width:$e,height:Ne,bottom:Rt,left:ct}=Ye.getBoundingClientRect();let Ae;pe.indexOf("vertical")===0?Ae=(Rt-_e.y)/Ne:Ae=(_e.x-ct)/$e,pe.indexOf("-reverse")!==-1&&(Ae=1-Ae);let ot;if(ot=Xhe(Ae,c,l),y)ot=Khe(ot,y,c);else{const Re=i8(j,ot);ot=j[Re]}ot=ob(ot,c,l);let $t=0;if(z){je?$t=he.current:$t=i8(D,ot),i&&(ot=ob(ot,D[$t-1]||-1/0,D[$t+1]||1/0));const Re=ot;ot=o8({values:D,newValue:ot,index:$t}),i&&je||($t=ot.indexOf(Re),he.current=$t)}return{newValue:ot,activeIndex:$t}},ye=Zi(_e=>{const je=Gw(_e,b);if(!je)return;if(L.current+=1,_e.type==="mousemove"&&_e.buttons===0){xe(_e);return}const{newValue:Ye,activeIndex:$e}=ve({finger:je,move:!0});Vw({sliderRef:ce,activeIndex:$e,setActive:E}),H(Ye),!k&&L.current>qhe&&O(!0),W&&!qw(Ye,N)&&W(_e,Ye,$e)}),xe=Zi(_e=>{const je=Gw(_e,b);if(O(!1),!je)return;const{newValue:Ye}=ve({finger:je,move:!0});E(-1),_e.type==="touchend"&&R(-1),h&&h(_e,Ye),b.current=void 0,be()}),me=Zi(_e=>{if(r)return;XD()||_e.preventDefault();const je=_e.changedTouches[0];je!=null&&(b.current=je.identifier);const Ye=Gw(_e,b);if(Ye!==!1){const{newValue:Ne,activeIndex:Rt}=ve({finger:Ye});Vw({sliderRef:ce,activeIndex:Rt,setActive:E}),H(Ne),W&&!qw(Ne,N)&&W(_e,Ne,Rt)}L.current=0;const $e=Ar(ce.current);$e.addEventListener("touchmove",ye),$e.addEventListener("touchend",xe)}),be=I.useCallback(()=>{const _e=Ar(ce.current);_e.removeEventListener("mousemove",ye),_e.removeEventListener("mouseup",xe),_e.removeEventListener("touchmove",ye),_e.removeEventListener("touchend",xe)},[xe,ye]);I.useEffect(()=>{const{current:_e}=ce;return _e.addEventListener("touchstart",me,{passive:XD()}),()=>{_e.removeEventListener("touchstart",me,{passive:XD()}),be()}},[be,me]),I.useEffect(()=>{r&&be()},[r,be]);const Qe=_e=>je=>{var Ye;if((Ye=_e.onMouseDown)==null||Ye.call(_e,je),r||je.defaultPrevented||je.button!==0)return;je.preventDefault();const $e=Gw(je,b);if($e!==!1){const{newValue:Rt,activeIndex:ct}=ve({finger:$e});Vw({sliderRef:ce,activeIndex:ct,setActive:E}),H(Rt),W&&!qw(Rt,N)&&W(je,Rt,ct)}L.current=0;const Ne=Ar(ce.current);Ne.addEventListener("mousemove",ye),Ne.addEventListener("mouseup",xe)},qe=AE(z?D[0]:c,c,l),at=AE(D[D.length-1],c,l)-qe,Lt=(_e={})=>{const je={onMouseDown:Qe(_e||{})},Ye=$({},_e,je);return $({ref:se},Ye)},Ie=_e=>je=>{var Ye;(Ye=_e.onMouseOver)==null||Ye.call(_e,je);const $e=Number(je.currentTarget.getAttribute("data-index"));R($e)},ze=_e=>je=>{var Ye;(Ye=_e.onMouseLeave)==null||Ye.call(_e,je),R(-1)};return{active:x,axis:pe,axisProps:Qhe,dragging:k,focusedThumbIndex:J,getHiddenInputProps:(_e={})=>{var je;const Ye={onChange:le(_e||{}),onFocus:Q(_e||{}),onBlur:ae(_e||{})},$e=$({},_e,Ye);return $({tabIndex:S,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":v(l),"aria-valuemin":v(c),name:d,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(je=e.step)!=null?je:void 0,disabled:r},$e,{style:$({},Roe,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Lt,getThumbProps:(_e={})=>{const je={onMouseOver:Ie(_e||{}),onMouseLeave:ze(_e||{})};return $({},_e,je)},marks:F,open:A,range:z,rootRef:se,trackLeap:at,trackOffset:qe,values:D,getThumbStyle:_e=>({pointerEvents:x!==-1&&x!==_e?"none":void 0})}}function epe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=I.useRef();I.useEffect(()=>{if(!i)return;function _(b){b.defaultPrevented||(b.key==="Escape"||b.key==="Esc")&&(r==null||r(b,"escapeKeyDown"))}return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[i,r]);const l=Zi((_,b)=>{r==null||r(_,b)}),c=Zi(_=>{!r||_==null||(clearTimeout(s.current),s.current=setTimeout(()=>{l(null,"timeout")},_))});I.useEffect(()=>(i&&c(t),()=>{clearTimeout(s.current)}),[i,t,c]);const d=_=>{r==null||r(_,"clickaway")},f=()=>{clearTimeout(s.current)},h=I.useCallback(()=>{t!=null&&c(o??t*.5)},[t,o,c]),p=_=>b=>{const x=_.onBlur;x==null||x(b),h()},g=_=>b=>{const x=_.onFocus;x==null||x(b),f()},v=_=>b=>{const x=_.onMouseEnter;x==null||x(b),f()},y=_=>b=>{const x=_.onMouseLeave;x==null||x(b),h()};return I.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",h),window.addEventListener("blur",f),()=>{window.removeEventListener("focus",h),window.removeEventListener("blur",f)}},[n,h,i]),{getRootProps:(_={})=>{const b=$({},TE(e),TE(_));return $({role:"presentation"},_,b,{onBlur:p(b),onFocus:g(b),onMouseEnter:v(b),onMouseLeave:y(b)})},onClickAway:d}}const tpe=["onChange","maxRows","minRows","style","value"];function Yw(e){return parseInt(e,10)||0}const npe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function s8(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const rpe=I.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:l}=t,c=Le(t,tpe),{current:d}=I.useRef(l!=null),f=I.useRef(null),h=mr(n,f),p=I.useRef(null),g=I.useRef(0),[v,y]=I.useState({outerHeightStyle:0}),S=I.useCallback(()=>{const E=f.current,R=bu(E).getComputedStyle(E);if(R.width==="0px")return{outerHeightStyle:0};const k=p.current;k.style.width=R.width,k.value=E.value||t.placeholder||"x",k.value.slice(-1)===` +`),Ks.rippleVisible,Tde,iF,({theme:e})=>e.transitions.easing.easeInOut,Ks.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Ks.child,Ks.childLeaving,kde,iF,({theme:e})=>e.transitions.easing.easeInOut,Ks.childPulsate,Ade,({theme:e})=>e.transitions.easing.easeInOut),Pde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,l=Le(r,Ede),[c,d]=I.useState([]),f=I.useRef(0),h=I.useRef(null);I.useEffect(()=>{h.current&&(h.current(),h.current=null)},[c]);const p=I.useRef(!1),g=I.useRef(0),v=I.useRef(null),y=I.useRef(null);I.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const S=I.useCallback(E=>{const{pulsate:A,rippleX:R,rippleY:k,rippleSize:O,cb:L}=E;d(N=>[...N,C.jsx(Ide,{classes:{ripple:Fe(o.ripple,Ks.ripple),rippleVisible:Fe(o.rippleVisible,Ks.rippleVisible),ripplePulsate:Fe(o.ripplePulsate,Ks.ripplePulsate),child:Fe(o.child,Ks.child),childLeaving:Fe(o.childLeaving,Ks.childLeaving),childPulsate:Fe(o.childPulsate,Ks.childPulsate)},timeout:iF,pulsate:A,rippleX:R,rippleY:k,rippleSize:O},f.current)]),f.current+=1,h.current=L},[o]),_=I.useCallback((E={},A={},R=()=>{})=>{const{pulsate:k=!1,center:O=i||A.pulsate,fakeElement:L=!1}=A;if((E==null?void 0:E.type)==="mousedown"&&p.current){p.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(p.current=!0);const N=L?null:y.current,H=N?N.getBoundingClientRect():{width:0,height:0,left:0,top:0};let W,z,D;if(O||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)W=Math.round(H.width/2),z=Math.round(H.height/2);else{const{clientX:F,clientY:j}=E.touches&&E.touches.length>0?E.touches[0]:E;W=Math.round(F-H.left),z=Math.round(j-H.top)}if(O)D=Math.sqrt((2*H.width**2+H.height**2)/3),D%2===0&&(D+=1);else{const F=Math.max(Math.abs((N?N.clientWidth:0)-W),W)*2+2,j=Math.max(Math.abs((N?N.clientHeight:0)-z),z)*2+2;D=Math.sqrt(F**2+j**2)}E!=null&&E.touches?v.current===null&&(v.current=()=>{S({pulsate:k,rippleX:W,rippleY:z,rippleSize:D,cb:R})},g.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},Cde)):S({pulsate:k,rippleX:W,rippleY:z,rippleSize:D,cb:R})},[i,S]),b=I.useCallback(()=>{_({},{pulsate:!0})},[_]),x=I.useCallback((E,A)=>{if(clearTimeout(g.current),(E==null?void 0:E.type)==="touchend"&&v.current){v.current(),v.current=null,g.current=setTimeout(()=>{x(E,A)});return}v.current=null,d(R=>R.length>0?R.slice(1):R),h.current=A},[]);return I.useImperativeHandle(n,()=>({pulsate:b,start:_,stop:x}),[b,_,x]),C.jsx(Rde,$({className:Fe(Ks.root,o.root,s),ref:y},l,{children:C.jsx(ude,{component:null,exit:!0,children:c})}))}),Ode=Pde;function Mde(e){return _t("MuiButtonBase",e)}const Dde=Ct("MuiButtonBase",["root","disabled","focusVisible"]),Lde=Dde,Nde=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Bde=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=Et({root:["root",t&&"disabled",n&&"focusVisible"]},Mde,i);return n&&r&&(s.root+=` ${r}`),s},$de=Ee("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Lde.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Fde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:l,component:c="button",disabled:d=!1,disableRipple:f=!1,disableTouchRipple:h=!1,focusRipple:p=!1,LinkComponent:g="a",onBlur:v,onClick:y,onContextMenu:S,onDragLeave:_,onFocus:b,onFocusVisible:x,onKeyDown:E,onKeyUp:A,onMouseDown:R,onMouseLeave:k,onMouseUp:O,onTouchEnd:L,onTouchMove:N,onTouchStart:H,tabIndex:W=0,TouchRippleProps:z,touchRippleRef:D,type:F}=r,j=Le(r,Nde),V=I.useRef(null),G=I.useRef(null),K=mr(G,D),{isFocusVisibleRef:Y,onFocus:J,onBlur:ie,ref:ce}=x5(),[ue,se]=I.useState(!1);d&&ue&&se(!1),I.useImperativeHandle(i,()=>({focusVisible:()=>{se(!0),V.current.focus()}}),[]);const[Q,ae]=I.useState(!1);I.useEffect(()=>{ae(!0)},[]);const le=Q&&!f&&!d;I.useEffect(()=>{ue&&p&&!f&&Q&&G.current.pulsate()},[f,p,ue,Q]);function he(Ne,Rt,ct=h){return eo(Ae=>(Rt&&Rt(Ae),!ct&&G.current&&G.current[Ne](Ae),!0))}const pe=he("start",R),ve=he("stop",S),ye=he("stop",_),xe=he("stop",O),me=he("stop",Ne=>{ue&&Ne.preventDefault(),k&&k(Ne)}),be=he("start",H),Qe=he("stop",L),qe=he("stop",N),at=he("stop",Ne=>{ie(Ne),Y.current===!1&&se(!1),v&&v(Ne)},!1),Lt=eo(Ne=>{V.current||(V.current=Ne.currentTarget),J(Ne),Y.current===!0&&(se(!0),x&&x(Ne)),b&&b(Ne)}),Ie=()=>{const Ne=V.current;return c&&c!=="button"&&!(Ne.tagName==="A"&&Ne.href)},ze=I.useRef(!1),it=eo(Ne=>{p&&!ze.current&&ue&&G.current&&Ne.key===" "&&(ze.current=!0,G.current.stop(Ne,()=>{G.current.start(Ne)})),Ne.target===Ne.currentTarget&&Ie()&&Ne.key===" "&&Ne.preventDefault(),E&&E(Ne),Ne.target===Ne.currentTarget&&Ie()&&Ne.key==="Enter"&&!d&&(Ne.preventDefault(),y&&y(Ne))}),pt=eo(Ne=>{p&&Ne.key===" "&&G.current&&ue&&!Ne.defaultPrevented&&(ze.current=!1,G.current.stop(Ne,()=>{G.current.pulsate(Ne)})),A&&A(Ne),y&&Ne.target===Ne.currentTarget&&Ie()&&Ne.key===" "&&!Ne.defaultPrevented&&y(Ne)});let mt=c;mt==="button"&&(j.href||j.to)&&(mt=g);const _e={};mt==="button"?(_e.type=F===void 0?"button":F,_e.disabled=d):(!j.href&&!j.to&&(_e.role="button"),d&&(_e["aria-disabled"]=d));const je=mr(n,ce,V),Ye=$({},r,{centerRipple:o,component:c,disabled:d,disableRipple:f,disableTouchRipple:h,focusRipple:p,tabIndex:W,focusVisible:ue}),$e=Bde(Ye);return C.jsxs($de,$({as:mt,className:Fe($e.root,l),ownerState:Ye,onBlur:at,onClick:y,onContextMenu:ve,onFocus:Lt,onKeyDown:it,onKeyUp:pt,onMouseDown:pe,onMouseLeave:me,onMouseUp:xe,onDragLeave:ye,onTouchEnd:Qe,onTouchMove:qe,onTouchStart:be,ref:je,tabIndex:d?-1:W,type:F},_e,j,{children:[s,le?C.jsx(Ode,$({ref:K,center:o},z)):null]}))}),Ou=Fde;function zde(e){return _t("MuiIconButton",e)}const jde=Ct("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Ude=jde,Hde=["edge","children","className","color","disabled","disableFocusRipple","size"],Wde=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${Me(r)}`,i&&`edge${Me(i)}`,`size${Me(o)}`]};return Et(s,zde,t)},Gde=Ee(Ou,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Me(n.color)}`],n.edge&&t[`edge${Me(n.edge)}`],t[`size${Me(n.size)}`]]}})(({theme:e,ownerState:t})=>$({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return $({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&$({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":$({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${Ude.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Vde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:l="default",disabled:c=!1,disableFocusRipple:d=!1,size:f="medium"}=r,h=Le(r,Hde),p=$({},r,{edge:i,color:l,disabled:c,disableFocusRipple:d,size:f}),g=Wde(p);return C.jsx(Gde,$({className:Fe(g.root,s),centerRipple:!0,focusRipple:!d,disabled:c,ref:n,ownerState:p},h,{children:o}))}),mp=Vde;function qde(e){return _t("MuiTypography",e)}Ct("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Xde=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Yde=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,l={root:["root",o,e.align!=="inherit"&&`align${Me(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Et(l,qde,s)},Kde=Ee("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Me(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>$({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),WU={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Qde={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Jde=e=>Qde[e]||e,Zde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTypography"}),i=Jde(r.color),o=N5($({},r,{color:i})),{align:s="inherit",className:l,component:c,gutterBottom:d=!1,noWrap:f=!1,paragraph:h=!1,variant:p="body1",variantMapping:g=WU}=o,v=Le(o,Xde),y=$({},o,{align:s,color:i,className:l,component:c,gutterBottom:d,noWrap:f,paragraph:h,variant:p,variantMapping:g}),S=c||(h?"p":g[p]||WU[p])||"span",_=Yde(y);return C.jsx(Kde,$({as:S,ref:n,ownerState:y,className:Fe(_.root,l)},v))}),zt=Zde;function efe(e){return _t("MuiAppBar",e)}Ct("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const tfe=["className","color","enableColorOnDark","position"],nfe=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${Me(t)}`,`position${Me(n)}`]};return Et(i,efe,r)},Hw=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,rfe=Ee(Zg,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Me(n.position)}`],t[`color${Me(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return $({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&$({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&$({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&$({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:Hw(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:Hw(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:Hw(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:Hw(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),ife=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:l="fixed"}=r,c=Le(r,tfe),d=$({},r,{color:o,position:l,enableColorOnDark:s}),f=nfe(d);return C.jsx(rfe,$({square:!0,component:"header",ownerState:d,elevation:4,className:Fe(f.root,i,l==="fixed"&&"mui-fixed"),ref:n},c))}),ofe=ife;function zl(e){return typeof e=="string"}function Bb(e,t,n){return e===void 0||zl(e)?t:$({},t,{ownerState:$({},t.ownerState,n)})}function sfe(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const afe={disableDefaultClasses:!1},lfe=I.createContext(afe);function cfe(e){const{disableDefaultClasses:t}=I.useContext(lfe);return n=>t?"":e(n)}function TE(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function ufe(e,t,n){return typeof e=="function"?e(t,n):e}function GU(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function dfe(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const g=Fe(i==null?void 0:i.className,r==null?void 0:r.className,o,n==null?void 0:n.className),v=$({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),y=$({},n,i,r);return g.length>0&&(y.className=g),Object.keys(v).length>0&&(y.style=v),{props:y,internalRef:void 0}}const s=TE($({},i,r)),l=GU(r),c=GU(i),d=t(s),f=Fe(d==null?void 0:d.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=$({},d==null?void 0:d.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),p=$({},d,n,c,l);return f.length>0&&(p.className=f),Object.keys(h).length>0&&(p.style=h),{props:p,internalRef:d.ref}}const ffe=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Wr(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Le(e,ffe),l=o?{}:ufe(r,i),{props:c,internalRef:d}=dfe($({},s,{externalSlotProps:l})),f=mr(d,l==null?void 0:l.ref,(t=e.additionalProps)==null?void 0:t.ref);return Bb(n,$({},c,{ref:f}),i)}function VU(e){return e.substring(2).toLowerCase()}function hfe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const f=mr(t.ref,l),h=eo(v=>{const y=d.current;d.current=!1;const S=Ar(l.current);if(!c.current||!l.current||"clientX"in v&&hfe(v,S))return;if(s.current){s.current=!1;return}let _;v.composedPath?_=v.composedPath().indexOf(l.current)>-1:_=!S.documentElement.contains(v.target)||l.current.contains(v.target),!_&&(n||!y)&&i(v)}),p=v=>y=>{d.current=!0;const S=t.props[v];S&&S(y)},g={ref:f};return o!==!1&&(g[o]=p(o)),I.useEffect(()=>{if(o!==!1){const v=VU(o),y=Ar(l.current),S=()=>{s.current=!0};return y.addEventListener(v,h),y.addEventListener("touchmove",S),()=>{y.removeEventListener(v,h),y.removeEventListener("touchmove",S)}}},[h,o]),r!==!1&&(g[r]=p(r)),I.useEffect(()=>{if(r!==!1){const v=VU(r),y=Ar(l.current);return y.addEventListener(v,h),()=>{y.removeEventListener(v,h)}}},[h,r]),C.jsx(I.Fragment,{children:I.cloneElement(t,g)})}const mfe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function gfe(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function vfe(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function yfe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||vfe(e))}function bfe(e){const t=[],n=[];return Array.from(e.querySelectorAll(mfe)).forEach((r,i)=>{const o=gfe(r);o===-1||!yfe(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function xfe(){return!0}function wfe(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=bfe,isEnabled:s=xfe,open:l}=e,c=I.useRef(!1),d=I.useRef(null),f=I.useRef(null),h=I.useRef(null),p=I.useRef(null),g=I.useRef(!1),v=I.useRef(null),y=mr(t.ref,v),S=I.useRef(null);I.useEffect(()=>{!l||!v.current||(g.current=!n)},[n,l]),I.useEffect(()=>{if(!l||!v.current)return;const x=Ar(v.current);return v.current.contains(x.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),g.current&&v.current.focus()),()=>{i||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}},[l]),I.useEffect(()=>{if(!l||!v.current)return;const x=Ar(v.current),E=k=>{S.current=k,!(r||!s()||k.key!=="Tab")&&x.activeElement===v.current&&k.shiftKey&&(c.current=!0,f.current&&f.current.focus())},A=()=>{const k=v.current;if(k===null)return;if(!x.hasFocus()||!s()||c.current){c.current=!1;return}if(k.contains(x.activeElement)||r&&x.activeElement!==d.current&&x.activeElement!==f.current)return;if(x.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!g.current)return;let O=[];if((x.activeElement===d.current||x.activeElement===f.current)&&(O=o(v.current)),O.length>0){var L,N;const H=!!((L=S.current)!=null&&L.shiftKey&&((N=S.current)==null?void 0:N.key)==="Tab"),W=O[0],z=O[O.length-1];typeof W!="string"&&typeof z!="string"&&(H?z.focus():W.focus())}else k.focus()};x.addEventListener("focusin",A),x.addEventListener("keydown",E,!0);const R=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&A()},50);return()=>{clearInterval(R),x.removeEventListener("focusin",A),x.removeEventListener("keydown",E,!0)}},[n,r,i,s,l,o]);const _=x=>{h.current===null&&(h.current=x.relatedTarget),g.current=!0,p.current=x.target;const E=t.props.onFocus;E&&E(x)},b=x=>{h.current===null&&(h.current=x.relatedTarget),g.current=!0};return C.jsxs(I.Fragment,{children:[C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelStart"}),I.cloneElement(t,{ref:y,onFocus:_}),C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:f,"data-testid":"sentinelEnd"})]})}var Vo="top",ma="bottom",ga="right",qo="left",L4="auto",G1=[Vo,ma,ga,qo],wg="start",Qx="end",_fe="clippingParents",hK="viewport",ib="popper",Sfe="reference",qU=G1.reduce(function(e,t){return e.concat([t+"-"+wg,t+"-"+Qx])},[]),pK=[].concat(G1,[L4]).reduce(function(e,t){return e.concat([t,t+"-"+wg,t+"-"+Qx])},[]),Efe="beforeRead",Cfe="read",Tfe="afterRead",kfe="beforeMain",Afe="main",Rfe="afterMain",Ife="beforeWrite",Pfe="write",Ofe="afterWrite",Mfe=[Efe,Cfe,Tfe,kfe,Afe,Rfe,Ife,Pfe,Ofe];function Xl(e){return e?(e.nodeName||"").toLowerCase():null}function Bs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function gp(e){var t=Bs(e).Element;return e instanceof t||e instanceof Element}function ca(e){var t=Bs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function N4(e){if(typeof ShadowRoot>"u")return!1;var t=Bs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Dfe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ca(o)||!Xl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function Lfe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=s.reduce(function(c,d){return c[d]="",c},{});!ca(i)||!Xl(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const Nfe={name:"applyStyles",enabled:!0,phase:"write",fn:Dfe,effect:Lfe,requires:["computeStyles"]};function jl(e){return e.split("-")[0]}var Zh=Math.max,kE=Math.min,_g=Math.round;function oF(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function mK(){return!/^((?!chrome|android).)*safari/i.test(oF())}function Sg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ca(e)&&(i=e.offsetWidth>0&&_g(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&_g(r.height)/e.offsetHeight||1);var s=gp(e)?Bs(e):window,l=s.visualViewport,c=!mK()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,f=(r.top+(c&&l?l.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function B4(e){var t=Sg(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function gK(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&N4(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Bs(e).getComputedStyle(e)}function Bfe(e){return["table","td","th"].indexOf(Xl(e))>=0}function Xd(e){return((gp(e)?e.ownerDocument:e.document)||window.document).documentElement}function KT(e){return Xl(e)==="html"?e:e.assignedSlot||e.parentNode||(N4(e)?e.host:null)||Xd(e)}function XU(e){return!ca(e)||Eu(e).position==="fixed"?null:e.offsetParent}function $fe(e){var t=/firefox/i.test(oF()),n=/Trident/i.test(oF());if(n&&ca(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=KT(e);for(N4(i)&&(i=i.host);ca(i)&&["html","body"].indexOf(Xl(i))<0;){var o=Eu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function V1(e){for(var t=Bs(e),n=XU(e);n&&Bfe(n)&&Eu(n).position==="static";)n=XU(n);return n&&(Xl(n)==="html"||Xl(n)==="body"&&Eu(n).position==="static")?t:n||$fe(e)||t}function $4(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ux(e,t,n){return Zh(e,kE(t,n))}function Ffe(e,t,n){var r=ux(e,t,n);return r>n?n:r}function vK(){return{top:0,right:0,bottom:0,left:0}}function yK(e){return Object.assign({},vK(),e)}function bK(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var zfe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,yK(typeof t!="number"?t:bK(t,G1))};function jfe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=jl(n.placement),c=$4(l),d=[qo,ga].indexOf(l)>=0,f=d?"height":"width";if(!(!o||!s)){var h=zfe(i.padding,n),p=B4(o),g=c==="y"?Vo:qo,v=c==="y"?ma:ga,y=n.rects.reference[f]+n.rects.reference[c]-s[c]-n.rects.popper[f],S=s[c]-n.rects.reference[c],_=V1(o),b=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,x=y/2-S/2,E=h[g],A=b-p[f]-h[v],R=b/2-p[f]/2+x,k=ux(E,R,A),O=c;n.modifiersData[r]=(t={},t[O]=k,t.centerOffset=k-R,t)}}function Ufe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||gK(t.elements.popper,i)&&(t.elements.arrow=i))}const Hfe={name:"arrow",enabled:!0,phase:"main",fn:jfe,effect:Ufe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Eg(e){return e.split("-")[1]}var Wfe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gfe(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:_g(n*i)/i||0,y:_g(r*i)/i||0}}function YU(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=s.x,g=p===void 0?0:p,v=s.y,y=v===void 0?0:v,S=typeof f=="function"?f({x:g,y}):{x:g,y};g=S.x,y=S.y;var _=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),x=qo,E=Vo,A=window;if(d){var R=V1(n),k="clientHeight",O="clientWidth";if(R===Bs(n)&&(R=Xd(n),Eu(R).position!=="static"&&l==="absolute"&&(k="scrollHeight",O="scrollWidth")),R=R,i===Vo||(i===qo||i===ga)&&o===Qx){E=ma;var L=h&&R===A&&A.visualViewport?A.visualViewport.height:R[k];y-=L-r.height,y*=c?1:-1}if(i===qo||(i===Vo||i===ma)&&o===Qx){x=ga;var N=h&&R===A&&A.visualViewport?A.visualViewport.width:R[O];g-=N-r.width,g*=c?1:-1}}var H=Object.assign({position:l},d&&Wfe),W=f===!0?Gfe({x:g,y},Bs(n)):{x:g,y};if(g=W.x,y=W.y,c){var z;return Object.assign({},H,(z={},z[E]=b?"0":"",z[x]=_?"0":"",z.transform=(A.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",z))}return Object.assign({},H,(t={},t[E]=b?y+"px":"",t[x]=_?g+"px":"",t.transform="",t))}function Vfe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:jl(t.placement),variation:Eg(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,YU(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,YU(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const qfe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Vfe,data:{}};var Ww={passive:!0};function Xfe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=Bs(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",n.update,Ww)}),l&&c.addEventListener("resize",n.update,Ww),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",n.update,Ww)}),l&&c.removeEventListener("resize",n.update,Ww)}}const Yfe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Xfe,data:{}};var Kfe={left:"right",right:"left",bottom:"top",top:"bottom"};function CS(e){return e.replace(/left|right|bottom|top/g,function(t){return Kfe[t]})}var Qfe={start:"end",end:"start"};function KU(e){return e.replace(/start|end/g,function(t){return Qfe[t]})}function F4(e){var t=Bs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function z4(e){return Sg(Xd(e)).left+F4(e).scrollLeft}function Jfe(e,t){var n=Bs(e),r=Xd(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var d=mK();(d||!d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+z4(e),y:c}}function Zfe(e){var t,n=Xd(e),r=F4(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Zh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Zh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+z4(e),c=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(l+=Zh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function j4(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function xK(e){return["html","body","#document"].indexOf(Xl(e))>=0?e.ownerDocument.body:ca(e)&&j4(e)?e:xK(KT(e))}function dx(e,t){var n;t===void 0&&(t=[]);var r=xK(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Bs(r),s=i?[o].concat(o.visualViewport||[],j4(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(dx(KT(s)))}function sF(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ehe(e,t){var n=Sg(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function QU(e,t,n){return t===hK?sF(Jfe(e,n)):gp(t)?ehe(t,n):sF(Zfe(Xd(e)))}function the(e){var t=dx(KT(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&ca(e)?V1(e):e;return gp(r)?t.filter(function(i){return gp(i)&&gK(i,r)&&Xl(i)!=="body"}):[]}function nhe(e,t,n,r){var i=t==="clippingParents"?the(e):[].concat(t),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var f=QU(e,d,r);return c.top=Zh(f.top,c.top),c.right=kE(f.right,c.right),c.bottom=kE(f.bottom,c.bottom),c.left=Zh(f.left,c.left),c},QU(e,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function wK(e){var t=e.reference,n=e.element,r=e.placement,i=r?jl(r):null,o=r?Eg(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(i){case Vo:c={x:s,y:t.y-n.height};break;case ma:c={x:s,y:t.y+t.height};break;case ga:c={x:t.x+t.width,y:l};break;case qo:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=i?$4(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case wg:c[d]=c[d]-(t[f]/2-n[f]/2);break;case Qx:c[d]=c[d]+(t[f]/2-n[f]/2);break}}return c}function Jx(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?_fe:l,d=n.rootBoundary,f=d===void 0?hK:d,h=n.elementContext,p=h===void 0?ib:h,g=n.altBoundary,v=g===void 0?!1:g,y=n.padding,S=y===void 0?0:y,_=yK(typeof S!="number"?S:bK(S,G1)),b=p===ib?Sfe:ib,x=e.rects.popper,E=e.elements[v?b:p],A=nhe(gp(E)?E:E.contextElement||Xd(e.elements.popper),c,f,s),R=Sg(e.elements.reference),k=wK({reference:R,element:x,strategy:"absolute",placement:i}),O=sF(Object.assign({},x,k)),L=p===ib?O:R,N={top:A.top-L.top+_.top,bottom:L.bottom-A.bottom+_.bottom,left:A.left-L.left+_.left,right:L.right-A.right+_.right},H=e.modifiersData.offset;if(p===ib&&H){var W=H[i];Object.keys(N).forEach(function(z){var D=[ga,ma].indexOf(z)>=0?1:-1,F=[Vo,ma].indexOf(z)>=0?"y":"x";N[z]+=W[F]*D})}return N}function rhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?pK:c,f=Eg(r),h=f?l?qU:qU.filter(function(v){return Eg(v)===f}):G1,p=h.filter(function(v){return d.indexOf(v)>=0});p.length===0&&(p=h);var g=p.reduce(function(v,y){return v[y]=Jx(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[jl(y)],v},{});return Object.keys(g).sort(function(v,y){return g[v]-g[y]})}function ihe(e){if(jl(e)===L4)return[];var t=CS(e);return[KU(e),t,KU(t)]}function ohe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,d=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,v=g===void 0?!0:g,y=n.allowedAutoPlacements,S=t.options.placement,_=jl(S),b=_===S,x=c||(b||!v?[CS(S)]:ihe(S)),E=[S].concat(x).reduce(function(ue,se){return ue.concat(jl(se)===L4?rhe(t,{placement:se,boundary:f,rootBoundary:h,padding:d,flipVariations:v,allowedAutoPlacements:y}):se)},[]),A=t.rects.reference,R=t.rects.popper,k=new Map,O=!0,L=E[0],N=0;N=0,F=D?"width":"height",j=Jx(t,{placement:H,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),V=D?z?ga:qo:z?ma:Vo;A[F]>R[F]&&(V=CS(V));var G=CS(V),K=[];if(o&&K.push(j[W]<=0),l&&K.push(j[V]<=0,j[G]<=0),K.every(function(ue){return ue})){L=H,O=!1;break}k.set(H,K)}if(O)for(var Y=v?3:1,J=function(se){var Q=E.find(function(ae){var le=k.get(ae);if(le)return le.slice(0,se).every(function(he){return he})});if(Q)return L=Q,"break"},ie=Y;ie>0;ie--){var ce=J(ie);if(ce==="break")break}t.placement!==L&&(t.modifiersData[r]._skip=!0,t.placement=L,t.reset=!0)}}const she={name:"flip",enabled:!0,phase:"main",fn:ohe,requiresIfExists:["offset"],data:{_skip:!1}};function JU(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ZU(e){return[Vo,ga,ma,qo].some(function(t){return e[t]>=0})}function ahe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Jx(t,{elementContext:"reference"}),l=Jx(t,{altBoundary:!0}),c=JU(s,r),d=JU(l,i,o),f=ZU(c),h=ZU(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const lhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ahe};function che(e,t,n){var r=jl(e),i=[qo,Vo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[qo,ga].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function uhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=pK.reduce(function(f,h){return f[h]=che(h,t.rects,o),f},{}),l=s[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=s}const dhe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:uhe};function fhe(e){var t=e.state,n=e.name;t.modifiersData[n]=wK({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const hhe={name:"popperOffsets",enabled:!0,phase:"read",fn:fhe,data:{}};function phe(e){return e==="x"?"y":"x"}function mhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,g=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,S=Jx(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),_=jl(t.placement),b=Eg(t.placement),x=!b,E=$4(_),A=phe(E),R=t.modifiersData.popperOffsets,k=t.rects.reference,O=t.rects.popper,L=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,N=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(R){if(o){var z,D=E==="y"?Vo:qo,F=E==="y"?ma:ga,j=E==="y"?"height":"width",V=R[E],G=V+S[D],K=V-S[F],Y=g?-O[j]/2:0,J=b===wg?k[j]:O[j],ie=b===wg?-O[j]:-k[j],ce=t.elements.arrow,ue=g&&ce?B4(ce):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:vK(),Q=se[D],ae=se[F],le=ux(0,k[j],ue[j]),he=x?k[j]/2-Y-le-Q-N.mainAxis:J-le-Q-N.mainAxis,pe=x?-k[j]/2+Y+le+ae+N.mainAxis:ie+le+ae+N.mainAxis,ve=t.elements.arrow&&V1(t.elements.arrow),ye=ve?E==="y"?ve.clientTop||0:ve.clientLeft||0:0,xe=(z=H==null?void 0:H[E])!=null?z:0,me=V+he-xe-ye,be=V+pe-xe,Qe=ux(g?kE(G,me):G,V,g?Zh(K,be):K);R[E]=Qe,W[E]=Qe-V}if(l){var qe,at=E==="x"?Vo:qo,Lt=E==="x"?ma:ga,Ie=R[A],ze=A==="y"?"height":"width",it=Ie+S[at],pt=Ie-S[Lt],mt=[Vo,qo].indexOf(_)!==-1,_e=(qe=H==null?void 0:H[A])!=null?qe:0,je=mt?it:Ie-k[ze]-O[ze]-_e+N.altAxis,Ye=mt?Ie+k[ze]+O[ze]-_e-N.altAxis:pt,$e=g&&mt?Ffe(je,Ie,Ye):ux(g?je:it,Ie,g?Ye:pt);R[A]=$e,W[A]=$e-Ie}t.modifiersData[r]=W}}const ghe={name:"preventOverflow",enabled:!0,phase:"main",fn:mhe,requiresIfExists:["offset"]};function vhe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function yhe(e){return e===Bs(e)||!ca(e)?F4(e):vhe(e)}function bhe(e){var t=e.getBoundingClientRect(),n=_g(t.width)/e.offsetWidth||1,r=_g(t.height)/e.offsetHeight||1;return n!==1||r!==1}function xhe(e,t,n){n===void 0&&(n=!1);var r=ca(t),i=ca(t)&&bhe(t),o=Xd(t),s=Sg(e,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Xl(t)!=="body"||j4(o))&&(l=yhe(t)),ca(t)?(c=Sg(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=z4(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function whe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function _he(e){var t=whe(e);return Mfe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function She(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ehe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var e8={placement:"bottom",modifiers:[],strategy:"absolute"};function t8(){for(var e=arguments.length,t=new Array(e),n=0;n{o||l(Ahe(i)||document.body)},[i,o]),Ao(()=>{if(s&&!o)return n$(n,s),()=>{n$(n,null)}},[n,s,o]),o){if(I.isValidElement(r)){const d={ref:c};return I.cloneElement(r,d)}return C.jsx(I.Fragment,{children:r})}return C.jsx(I.Fragment,{children:s&&Jg.createPortal(r,s)})});function Rhe(e){return _t("MuiPopper",e)}Ct("MuiPopper",["root"]);const Ihe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Phe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Ohe(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function aF(e){return typeof e=="function"?e():e}function Mhe(e){return e.nodeType!==void 0}const Dhe=()=>Et({root:["root"]},cfe(Rhe)),Lhe={},Nhe=I.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:l,modifiers:c,open:d,placement:f,popperOptions:h,popperRef:p,slotProps:g={},slots:v={},TransitionProps:y}=t,S=Le(t,Ihe),_=I.useRef(null),b=mr(_,n),x=I.useRef(null),E=mr(x,p),A=I.useRef(E);Ao(()=>{A.current=E},[E]),I.useImperativeHandle(p,()=>x.current,[]);const R=Ohe(f,s),[k,O]=I.useState(R),[L,N]=I.useState(aF(i));I.useEffect(()=>{x.current&&x.current.forceUpdate()}),I.useEffect(()=>{i&&N(aF(i))},[i]),Ao(()=>{if(!L||!d)return;const F=G=>{O(G.placement)};let j=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:G})=>{F(G)}}];c!=null&&(j=j.concat(c)),h&&h.modifiers!=null&&(j=j.concat(h.modifiers));const V=khe(L,_.current,$({placement:R},h,{modifiers:j}));return A.current(V),()=>{V.destroy(),A.current(null)}},[L,l,c,d,h,R]);const H={placement:k};y!==null&&(H.TransitionProps=y);const W=Dhe(),z=(r=v.root)!=null?r:"div",D=Wr({elementType:z,externalSlotProps:g.root,externalForwardedProps:S,additionalProps:{role:"tooltip",ref:b},ownerState:t,className:W.root});return C.jsx(z,$({},D,{children:typeof o=="function"?o(H):o}))}),Bhe=I.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:d,open:f,placement:h="bottom",popperOptions:p=Lhe,popperRef:g,style:v,transition:y=!1,slotProps:S={},slots:_={}}=t,b=Le(t,Phe),[x,E]=I.useState(!0),A=()=>{E(!1)},R=()=>{E(!0)};if(!c&&!f&&(!y||x))return null;let k;if(o)k=o;else if(r){const N=aF(r);k=N&&Mhe(N)?Ar(N).body:Ar(null).body}const O=!f&&c&&(!y||x)?"none":void 0,L=y?{in:f,onEnter:A,onExited:R}:void 0;return C.jsx(_K,{disablePortal:l,container:k,children:C.jsx(Nhe,$({anchorEl:r,direction:s,disablePortal:l,modifiers:d,ref:n,open:y?!x:f,placement:h,popperOptions:p,popperRef:g,slotProps:S,slots:_},b,{style:$({position:"fixed",top:0,left:0,display:O},v),TransitionProps:L,children:i}))})});function $he(e){const t=Ar(e);return t.body===e?bu(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function fx(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function n8(e){return parseInt(bu(e).getComputedStyle(e).paddingRight,10)||0}function Fhe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function r8(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const l=o.indexOf(s)===-1,c=!Fhe(s);l&&c&&fx(s,i)})}function qD(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function zhe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if($he(r)){const s=Tq(Ar(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${n8(r)+s}px`;const l=Ar(r).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${n8(c)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Ar(r).body;else{const s=r.parentElement,l=bu(r);o=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:l})=>{o?s.style.setProperty(l,o):s.style.removeProperty(l)})}}function jhe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Uhe{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&fx(t.modalRef,!1);const i=jhe(n);r8(n,t.mount,t.modalRef,i,!0);const o=qD(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=qD(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=zhe(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=qD(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&fx(t.modalRef,n),r8(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&fx(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Hhe(e){return typeof e=="function"?e():e}function Whe(e){return e?e.props.hasOwnProperty("in"):!1}const Ghe=new Uhe;function Vhe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Ghe,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:d,open:f,rootRef:h}=e,p=I.useRef({}),g=I.useRef(null),v=I.useRef(null),y=mr(v,h),[S,_]=I.useState(!f),b=Whe(c);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const E=()=>Ar(g.current),A=()=>(p.current.modalRef=v.current,p.current.mount=g.current,p.current),R=()=>{i.mount(A(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},k=eo(()=>{const j=Hhe(t)||E().body;i.add(A(),j),v.current&&R()}),O=I.useCallback(()=>i.isTopModal(A()),[i]),L=eo(j=>{g.current=j,j&&(f&&O()?R():v.current&&fx(v.current,x))}),N=I.useCallback(()=>{i.remove(A(),x)},[x,i]);I.useEffect(()=>()=>{N()},[N]),I.useEffect(()=>{f?k():(!b||!o)&&N()},[f,N,b,o,k]);const H=j=>V=>{var G;(G=j.onKeyDown)==null||G.call(j,V),!(V.key!=="Escape"||!O())&&(n||(V.stopPropagation(),d&&d(V,"escapeKeyDown")))},W=j=>V=>{var G;(G=j.onClick)==null||G.call(j,V),V.target===V.currentTarget&&d&&d(V,"backdropClick")};return{getRootProps:(j={})=>{const V=TE(e);delete V.onTransitionEnter,delete V.onTransitionExited;const G=$({},V,j);return $({role:"presentation"},G,{onKeyDown:H(G),ref:y})},getBackdropProps:(j={})=>{const V=j;return $({"aria-hidden":!0},V,{onClick:W(V),open:f})},getTransitionProps:()=>{const j=()=>{_(!1),s&&s()},V=()=>{_(!0),l&&l(),o&&N()};return{onEnter:i6(j,c==null?void 0:c.props.onEnter),onExited:i6(V,c==null?void 0:c.props.onExited)}},rootRef:y,portalRef:L,isTopModal:O,exited:S,hasTransition:b}}const qhe=2;function SK(e,t){return e-t}function ob(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function i8(e,t){var n;const{index:r}=(n=e.reduce((i,o,s)=>{const l=Math.abs(t-o);return i===null||l({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},Jhe=e=>e;let Xw;function XD(){return Xw===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Xw=CSS.supports("touch-action","none"):Xw=!0),Xw}function Zhe(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:l=100,min:c=0,name:d,onChange:f,onChangeCommitted:h,orientation:p="horizontal",rootRef:g,scale:v=Jhe,step:y=1,tabIndex:S,value:_}=e,b=I.useRef(),[x,E]=I.useState(-1),[A,R]=I.useState(-1),[k,O]=I.useState(!1),L=I.useRef(0),[N,H]=Ix({controlled:_,default:n??c,name:"Slider"}),W=f&&((_e,je,Ye)=>{const $e=_e.nativeEvent||_e,Ne=new $e.constructor($e.type,$e);Object.defineProperty(Ne,"target",{writable:!0,value:{value:je,name:d}}),f(Ne,je,Ye)}),z=Array.isArray(N);let D=z?N.slice().sort(SK):[N];D=D.map(_e=>ob(_e,c,l));const F=s===!0&&y!==null?[...Array(Math.floor((l-c)/y)+1)].map((_e,je)=>({value:c+y*je})):s||[],j=F.map(_e=>_e.value),{isFocusVisibleRef:V,onBlur:G,onFocus:K,ref:Y}=x5(),[J,ie]=I.useState(-1),ce=I.useRef(),ue=mr(Y,ce),se=mr(g,ue),Q=_e=>je=>{var Ye;const $e=Number(je.currentTarget.getAttribute("data-index"));K(je),V.current===!0&&ie($e),R($e),_e==null||(Ye=_e.onFocus)==null||Ye.call(_e,je)},ae=_e=>je=>{var Ye;G(je),V.current===!1&&ie(-1),R(-1),_e==null||(Ye=_e.onBlur)==null||Ye.call(_e,je)};Ao(()=>{if(r&&ce.current.contains(document.activeElement)){var _e;(_e=document.activeElement)==null||_e.blur()}},[r]),r&&x!==-1&&E(-1),r&&J!==-1&&ie(-1);const le=_e=>je=>{var Ye;(Ye=_e.onChange)==null||Ye.call(_e,je);const $e=Number(je.currentTarget.getAttribute("data-index")),Ne=D[$e],Rt=j.indexOf(Ne);let ct=je.target.valueAsNumber;if(F&&y==null){const Ae=j[j.length-1];ct>Ae?ct=Ae:ct{const{current:Ye}=ce,{width:$e,height:Ne,bottom:Rt,left:ct}=Ye.getBoundingClientRect();let Ae;pe.indexOf("vertical")===0?Ae=(Rt-_e.y)/Ne:Ae=(_e.x-ct)/$e,pe.indexOf("-reverse")!==-1&&(Ae=1-Ae);let ot;if(ot=Xhe(Ae,c,l),y)ot=Khe(ot,y,c);else{const Re=i8(j,ot);ot=j[Re]}ot=ob(ot,c,l);let $t=0;if(z){je?$t=he.current:$t=i8(D,ot),i&&(ot=ob(ot,D[$t-1]||-1/0,D[$t+1]||1/0));const Re=ot;ot=o8({values:D,newValue:ot,index:$t}),i&&je||($t=ot.indexOf(Re),he.current=$t)}return{newValue:ot,activeIndex:$t}},ye=eo(_e=>{const je=Gw(_e,b);if(!je)return;if(L.current+=1,_e.type==="mousemove"&&_e.buttons===0){xe(_e);return}const{newValue:Ye,activeIndex:$e}=ve({finger:je,move:!0});Vw({sliderRef:ce,activeIndex:$e,setActive:E}),H(Ye),!k&&L.current>qhe&&O(!0),W&&!qw(Ye,N)&&W(_e,Ye,$e)}),xe=eo(_e=>{const je=Gw(_e,b);if(O(!1),!je)return;const{newValue:Ye}=ve({finger:je,move:!0});E(-1),_e.type==="touchend"&&R(-1),h&&h(_e,Ye),b.current=void 0,be()}),me=eo(_e=>{if(r)return;XD()||_e.preventDefault();const je=_e.changedTouches[0];je!=null&&(b.current=je.identifier);const Ye=Gw(_e,b);if(Ye!==!1){const{newValue:Ne,activeIndex:Rt}=ve({finger:Ye});Vw({sliderRef:ce,activeIndex:Rt,setActive:E}),H(Ne),W&&!qw(Ne,N)&&W(_e,Ne,Rt)}L.current=0;const $e=Ar(ce.current);$e.addEventListener("touchmove",ye),$e.addEventListener("touchend",xe)}),be=I.useCallback(()=>{const _e=Ar(ce.current);_e.removeEventListener("mousemove",ye),_e.removeEventListener("mouseup",xe),_e.removeEventListener("touchmove",ye),_e.removeEventListener("touchend",xe)},[xe,ye]);I.useEffect(()=>{const{current:_e}=ce;return _e.addEventListener("touchstart",me,{passive:XD()}),()=>{_e.removeEventListener("touchstart",me,{passive:XD()}),be()}},[be,me]),I.useEffect(()=>{r&&be()},[r,be]);const Qe=_e=>je=>{var Ye;if((Ye=_e.onMouseDown)==null||Ye.call(_e,je),r||je.defaultPrevented||je.button!==0)return;je.preventDefault();const $e=Gw(je,b);if($e!==!1){const{newValue:Rt,activeIndex:ct}=ve({finger:$e});Vw({sliderRef:ce,activeIndex:ct,setActive:E}),H(Rt),W&&!qw(Rt,N)&&W(je,Rt,ct)}L.current=0;const Ne=Ar(ce.current);Ne.addEventListener("mousemove",ye),Ne.addEventListener("mouseup",xe)},qe=AE(z?D[0]:c,c,l),at=AE(D[D.length-1],c,l)-qe,Lt=(_e={})=>{const je={onMouseDown:Qe(_e||{})},Ye=$({},_e,je);return $({ref:se},Ye)},Ie=_e=>je=>{var Ye;(Ye=_e.onMouseOver)==null||Ye.call(_e,je);const $e=Number(je.currentTarget.getAttribute("data-index"));R($e)},ze=_e=>je=>{var Ye;(Ye=_e.onMouseLeave)==null||Ye.call(_e,je),R(-1)};return{active:x,axis:pe,axisProps:Qhe,dragging:k,focusedThumbIndex:J,getHiddenInputProps:(_e={})=>{var je;const Ye={onChange:le(_e||{}),onFocus:Q(_e||{}),onBlur:ae(_e||{})},$e=$({},_e,Ye);return $({tabIndex:S,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":v(l),"aria-valuemin":v(c),name:d,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(je=e.step)!=null?je:void 0,disabled:r},$e,{style:$({},Roe,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Lt,getThumbProps:(_e={})=>{const je={onMouseOver:Ie(_e||{}),onMouseLeave:ze(_e||{})};return $({},_e,je)},marks:F,open:A,range:z,rootRef:se,trackLeap:at,trackOffset:qe,values:D,getThumbStyle:_e=>({pointerEvents:x!==-1&&x!==_e?"none":void 0})}}function epe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=I.useRef();I.useEffect(()=>{if(!i)return;function _(b){b.defaultPrevented||(b.key==="Escape"||b.key==="Esc")&&(r==null||r(b,"escapeKeyDown"))}return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[i,r]);const l=eo((_,b)=>{r==null||r(_,b)}),c=eo(_=>{!r||_==null||(clearTimeout(s.current),s.current=setTimeout(()=>{l(null,"timeout")},_))});I.useEffect(()=>(i&&c(t),()=>{clearTimeout(s.current)}),[i,t,c]);const d=_=>{r==null||r(_,"clickaway")},f=()=>{clearTimeout(s.current)},h=I.useCallback(()=>{t!=null&&c(o??t*.5)},[t,o,c]),p=_=>b=>{const x=_.onBlur;x==null||x(b),h()},g=_=>b=>{const x=_.onFocus;x==null||x(b),f()},v=_=>b=>{const x=_.onMouseEnter;x==null||x(b),f()},y=_=>b=>{const x=_.onMouseLeave;x==null||x(b),h()};return I.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",h),window.addEventListener("blur",f),()=>{window.removeEventListener("focus",h),window.removeEventListener("blur",f)}},[n,h,i]),{getRootProps:(_={})=>{const b=$({},TE(e),TE(_));return $({role:"presentation"},_,b,{onBlur:p(b),onFocus:g(b),onMouseEnter:v(b),onMouseLeave:y(b)})},onClickAway:d}}const tpe=["onChange","maxRows","minRows","style","value"];function Yw(e){return parseInt(e,10)||0}const npe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function s8(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const rpe=I.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:l}=t,c=Le(t,tpe),{current:d}=I.useRef(l!=null),f=I.useRef(null),h=mr(n,f),p=I.useRef(null),g=I.useRef(0),[v,y]=I.useState({outerHeightStyle:0}),S=I.useCallback(()=>{const E=f.current,R=bu(E).getComputedStyle(E);if(R.width==="0px")return{outerHeightStyle:0};const k=p.current;k.style.width=R.width,k.value=E.value||t.placeholder||"x",k.value.slice(-1)===` `&&(k.value+=" ");const O=R.boxSizing,L=Yw(R.paddingBottom)+Yw(R.paddingTop),N=Yw(R.borderBottomWidth)+Yw(R.borderTopWidth),H=k.scrollHeight;k.value="x";const W=k.scrollHeight;let z=H;o&&(z=Math.max(Number(o)*W,z)),i&&(z=Math.min(Number(i)*W,z)),z=Math.max(z,W);const D=z+(O==="border-box"?L+N:0),F=Math.abs(z-H)<=1;return{outerHeightStyle:D,overflow:F}},[i,o,t.placeholder]),_=(E,A)=>{const{outerHeightStyle:R,overflow:k}=A;return g.current<20&&(R>0&&Math.abs((E.outerHeightStyle||0)-R)>1||E.overflow!==k)?(g.current+=1,{overflow:k,outerHeightStyle:R}):E},b=I.useCallback(()=>{const E=S();s8(E)||y(A=>_(A,E))},[S]);Ao(()=>{const E=()=>{const H=S();s8(H)||Jg.flushSync(()=>{y(W=>_(W,H))})},A=()=>{g.current=0,E()};let R;const k=XC(A),O=f.current,L=bu(O);L.addEventListener("resize",k);let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(A),N.observe(O)),()=>{k.clear(),cancelAnimationFrame(R),L.removeEventListener("resize",k),N&&N.disconnect()}},[S]),Ao(()=>{b()}),I.useEffect(()=>{g.current=0},[l]);const x=E=>{g.current=0,d||b(),r&&r(E)};return C.jsxs(I.Fragment,{children:[C.jsx("textarea",$({value:l,onChange:x,ref:h,rows:o,style:$({height:v.outerHeightStyle,overflow:v.overflow?"hidden":void 0},s)},c)),C.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:$({},npe.shadow,s,{paddingTop:0,paddingBottom:0})})]})}),ipe=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],ope=Ee(Bhe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),spe=I.forwardRef(function(t,n){var r;const i=bT(),o=Tt({props:t,name:"MuiPopper"}),{anchorEl:s,component:l,components:c,componentsProps:d,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:_,transition:b,slots:x,slotProps:E}=o,A=Le(o,ipe),R=(r=x==null?void 0:x.root)!=null?r:c==null?void 0:c.Root,k=$({anchorEl:s,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:_,transition:b},A);return C.jsx(ope,$({as:l,direction:i==null?void 0:i.direction,slots:{root:R},slotProps:E??d},k,{ref:n}))}),EK=spe;function ape(e){return _t("MuiListSubheader",e)}Ct("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const lpe=["className","color","component","disableGutters","disableSticky","inset"],cpe=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${Me(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return Et(s,ape,t)},upe=Ee("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Me(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>$({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),CK=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:l=!1,disableSticky:c=!1,inset:d=!1}=r,f=Le(r,lpe),h=$({},r,{color:o,component:s,disableGutters:l,disableSticky:c,inset:d}),p=cpe(h);return C.jsx(upe,$({as:s,className:Fe(p.root,i),ref:n,ownerState:h},f))});CK.muiSkipListHighlight=!0;const dpe=CK;function Ip({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const fpe=I.createContext(void 0),U4=fpe;function Yd(){return I.useContext(U4)}function TK(e){return C.jsx(Bae,$({},e,{defaultTheme:_T,themeId:ap}))}function a8(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function RE(e,t=!1){return e&&(a8(e.value)&&e.value!==""||t&&a8(e.defaultValue)&&e.defaultValue!=="")}function hpe(e){return e.startAdornment}function ppe(e){return _t("MuiInputBase",e)}const mpe=Ct("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Cg=mpe,gpe=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],QT=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Me(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},JT=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},vpe=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:l,fullWidth:c,hiddenLabel:d,multiline:f,readOnly:h,size:p,startAdornment:g,type:v}=e,y={root:["root",`color${Me(n)}`,r&&"disabled",i&&"error",c&&"fullWidth",s&&"focused",l&&"formControl",p&&p!=="medium"&&`size${Me(p)}`,f&&"multiline",g&&"adornedStart",o&&"adornedEnd",d&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",f&&"inputMultiline",p==="small"&&"inputSizeSmall",d&&"inputHiddenLabel",g&&"inputAdornedStart",o&&"inputAdornedEnd",h&&"readOnly"]};return Et(y,ppe,t)},ZT=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:QT})(({theme:e,ownerState:t})=>$({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Cg.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&$({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),ek=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:JT})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=$({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),i={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return $({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Cg.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Cg.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),ype=C.jsx(TK,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),bpe=I.forwardRef(function(t,n){var r;const i=Tt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:l,className:c,components:d={},componentsProps:f={},defaultValue:h,disabled:p,disableInjectingGlobalStyles:g,endAdornment:v,fullWidth:y=!1,id:S,inputComponent:_="input",inputProps:b={},inputRef:x,maxRows:E,minRows:A,multiline:R=!1,name:k,onBlur:O,onChange:L,onClick:N,onFocus:H,onKeyDown:W,onKeyUp:z,placeholder:D,readOnly:F,renderSuffix:j,rows:V,slotProps:G={},slots:K={},startAdornment:Y,type:J="text",value:ie}=i,ce=Le(i,gpe),ue=b.value!=null?b.value:ie,{current:se}=I.useRef(ue!=null),Q=I.useRef(),ae=I.useCallback($e=>{},[]),le=mr(Q,x,b.ref,ae),[he,pe]=I.useState(!1),ve=Yd(),ye=Ip({props:i,muiFormControl:ve,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ye.focused=ve?ve.focused:he,I.useEffect(()=>{!ve&&p&&he&&(pe(!1),O&&O())},[ve,p,he,O]);const xe=ve&&ve.onFilled,me=ve&&ve.onEmpty,be=I.useCallback($e=>{RE($e)?xe&&xe():me&&me()},[xe,me]);Ao(()=>{se&&be({value:ue})},[ue,be,se]);const Qe=$e=>{if(ye.disabled){$e.stopPropagation();return}H&&H($e),b.onFocus&&b.onFocus($e),ve&&ve.onFocus?ve.onFocus($e):pe(!0)},qe=$e=>{O&&O($e),b.onBlur&&b.onBlur($e),ve&&ve.onBlur?ve.onBlur($e):pe(!1)},at=($e,...Ne)=>{if(!se){const Rt=$e.target||Q.current;if(Rt==null)throw new Error(Od(1));be({value:Rt.value})}b.onChange&&b.onChange($e,...Ne),L&&L($e,...Ne)};I.useEffect(()=>{be(Q.current)},[]);const Lt=$e=>{Q.current&&$e.currentTarget===$e.target&&Q.current.focus(),N&&N($e)};let Ie=_,ze=b;R&&Ie==="input"&&(V?ze=$({type:void 0,minRows:V,maxRows:V},ze):ze=$({type:void 0,maxRows:E,minRows:A},ze),Ie=rpe);const it=$e=>{be($e.animationName==="mui-auto-fill-cancel"?Q.current:{value:"x"})};I.useEffect(()=>{ve&&ve.setAdornedStart(!!Y)},[ve,Y]);const pt=$({},i,{color:ye.color||"primary",disabled:ye.disabled,endAdornment:v,error:ye.error,focused:ye.focused,formControl:ve,fullWidth:y,hiddenLabel:ye.hiddenLabel,multiline:R,size:ye.size,startAdornment:Y,type:J}),mt=vpe(pt),_e=K.root||d.Root||ZT,je=G.root||f.root||{},Ye=K.input||d.Input||ek;return ze=$({},ze,(r=G.input)!=null?r:f.input),C.jsxs(I.Fragment,{children:[!g&&ype,C.jsxs(_e,$({},je,!zl(_e)&&{ownerState:$({},pt,je.ownerState)},{ref:n,onClick:Lt},ce,{className:Fe(mt.root,je.className,c,F&&"MuiInputBase-readOnly"),children:[Y,C.jsx(U4.Provider,{value:null,children:C.jsx(Ye,$({ownerState:pt,"aria-invalid":ye.error,"aria-describedby":o,autoComplete:s,autoFocus:l,defaultValue:h,disabled:ye.disabled,id:S,onAnimationStart:it,name:k,placeholder:D,readOnly:F,required:ye.required,rows:V,value:ue,onKeyDown:W,onKeyUp:z,type:J},ze,!zl(Ye)&&{as:Ie,ownerState:$({},pt,ze.ownerState)},{ref:le,className:Fe(mt.input,ze.className,F&&"MuiInputBase-readOnly"),onBlur:qe,onChange:at,onFocus:Qe}))}),v,j?j($({},ye,{startAdornment:Y})):null]}))]})}),tk=bpe;function xpe(e){return _t("MuiInput",e)}const wpe=$({},Cg,Ct("MuiInput",["root","underline","input"])),sb=wpe;function _pe(e){return _t("MuiOutlinedInput",e)}const Spe=$({},Cg,Ct("MuiOutlinedInput",["root","notchedOutline","input"])),ju=Spe;function Epe(e){return _t("MuiFilledInput",e)}const Cpe=$({},Cg,Ct("MuiFilledInput",["root","underline","input"])),bh=Cpe,Tpe=Bt(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),kpe=Bt(C.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function Ape(e){return _t("MuiAvatar",e)}Ct("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Rpe=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],Ipe=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Et({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Ape,t)},Ppe=Ee("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&$({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),Ope=Ee("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Mpe=Ee(kpe,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function Dpe({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[i,o]=I.useState(!1);return I.useEffect(()=>{if(!n&&!r)return;o(!1);let s=!0;const l=new Image;return l.onload=()=>{s&&o("loaded")},l.onerror=()=>{s&&o("error")},l.crossOrigin=e,l.referrerPolicy=t,l.src=n,r&&(l.srcset=r),()=>{s=!1}},[e,t,n,r]),i}const Lpe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiAvatar"}),{alt:i,children:o,className:s,component:l="div",imgProps:c,sizes:d,src:f,srcSet:h,variant:p="circular"}=r,g=Le(r,Rpe);let v=null;const y=Dpe($({},c,{src:f,srcSet:h})),S=f||h,_=S&&y!=="error",b=$({},r,{colorDefault:!_,component:l,variant:p}),x=Ipe(b);return _?v=C.jsx(Ope,$({alt:i,srcSet:h,src:f,sizes:d,ownerState:b,className:x.img},c)):o!=null?v=o:S&&i?v=i[0]:v=C.jsx(Mpe,{ownerState:b,className:x.fallback}),C.jsx(Ppe,$({as:l,ownerState:b,className:Fe(x.root,s),ref:n},g,{children:v}))}),Npe=Lpe,Bpe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],$pe={entering:{opacity:1},entered:{opacity:1}},Fpe=I.forwardRef(function(t,n){const r=In(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,easing:c,in:d,onEnter:f,onEntered:h,onEntering:p,onExit:g,onExited:v,onExiting:y,style:S,timeout:_=i,TransitionComponent:b=O4}=t,x=Le(t,Bpe),E=I.useRef(null),A=mr(E,l.ref,n),R=D=>F=>{if(D){const j=E.current;F===void 0?D(j):D(j,F)}},k=R(p),O=R((D,F)=>{dK(D);const j=xg({style:S,timeout:_,easing:c},{mode:"enter"});D.style.webkitTransition=r.transitions.create("opacity",j),D.style.transition=r.transitions.create("opacity",j),f&&f(D,F)}),L=R(h),N=R(y),H=R(D=>{const F=xg({style:S,timeout:_,easing:c},{mode:"exit"});D.style.webkitTransition=r.transitions.create("opacity",F),D.style.transition=r.transitions.create("opacity",F),g&&g(D)}),W=R(v),z=D=>{o&&o(E.current,D)};return C.jsx(b,$({appear:s,in:d,nodeRef:E,onEnter:O,onEntered:L,onEntering:k,onExit:H,onExited:W,onExiting:N,addEndListener:z,timeout:_},x,{children:(D,F)=>I.cloneElement(l,$({style:$({opacity:0,visibility:D==="exited"&&!d?"hidden":void 0},$pe[D],S,l.props.style),ref:A},F))}))}),vp=Fpe;function zpe(e){return _t("MuiBackdrop",e)}Ct("MuiBackdrop",["root","invisible"]);const jpe=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Upe=e=>{const{classes:t,invisible:n}=e;return Et({root:["root",n&&"invisible"]},zpe,t)},Hpe=Ee("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>$({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),Wpe=I.forwardRef(function(t,n){var r,i,o;const s=Tt({props:t,name:"MuiBackdrop"}),{children:l,className:c,component:d="div",components:f={},componentsProps:h={},invisible:p=!1,open:g,slotProps:v={},slots:y={},TransitionComponent:S=vp,transitionDuration:_}=s,b=Le(s,jpe),x=$({},s,{component:d,invisible:p}),E=Upe(x),A=(r=v.root)!=null?r:h.root;return C.jsx(S,$({in:g,timeout:_},b,{children:C.jsx(Hpe,$({"aria-hidden":!0},A,{as:(i=(o=y.root)!=null?o:f.Root)!=null?i:d,className:Fe(E.root,c,A==null?void 0:A.className),ownerState:$({},x,A==null?void 0:A.ownerState),classes:E,ref:n,children:l}))}))}),nk=Wpe,Gpe=$5(),Vpe=jae({themeId:ap,defaultTheme:Gpe,defaultClassName:"MuiBox-root",generateClassName:Aq.generate}),dt=Vpe;function qpe(e){return _t("MuiButton",e)}const Xpe=Ct("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Kw=Xpe,Ype=I.createContext({}),Kpe=Ype,Qpe=I.createContext(void 0),Jpe=Qpe,Zpe=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],eme=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,l={root:["root",o,`${o}${Me(t)}`,`size${Me(i)}`,`${o}Size${Me(i)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Me(i)}`],endIcon:["endIcon",`iconSize${Me(i)}`]},c=Et(l,qpe,s);return $({},s,c)},kK=e=>$({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),tme=Ee(Ou,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Me(n.color)}`],t[`size${Me(n.size)}`],t[`${n.variant}Size${Me(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],o=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return $({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":$({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Kw.focusVisible}`]:$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Kw.disabled}`]:$({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${_n(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Kw.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Kw.disabled}`]:{boxShadow:"none"}}),nme=Ee("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Me(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},kK(e))),rme=Ee("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Me(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},kK(e))),ime=I.forwardRef(function(t,n){const r=I.useContext(Kpe),i=I.useContext(Jpe),o=w5(r,t),s=Tt({props:o,name:"MuiButton"}),{children:l,color:c="primary",component:d="button",className:f,disabled:h=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:v,focusVisibleClassName:y,fullWidth:S=!1,size:_="medium",startIcon:b,type:x,variant:E="text"}=s,A=Le(s,Zpe),R=$({},s,{color:c,component:d,disabled:h,disableElevation:p,disableFocusRipple:g,fullWidth:S,size:_,type:x,variant:E}),k=eme(R),O=b&&C.jsx(nme,{className:k.startIcon,ownerState:R,children:b}),L=v&&C.jsx(rme,{className:k.endIcon,ownerState:R,children:v}),N=i||"";return C.jsxs(tme,$({ownerState:R,className:Fe(r.className,k.root,f,N),component:d,disabled:h,focusRipple:!g,focusVisibleClassName:Fe(k.focusVisible,y),ref:n,type:x},A,{classes:k,children:[O,l,L]}))}),AK=ime;function ome(e){return _t("MuiCard",e)}Ct("MuiCard",["root"]);const sme=["className","raised"],ame=e=>{const{classes:t}=e;return Et({root:["root"]},ome,t)},lme=Ee(Zg,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),cme=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Le(r,sme),l=$({},r,{raised:o}),c=ame(l);return C.jsx(lme,$({className:Fe(c.root,i),elevation:o?8:void 0,ref:n,ownerState:l},s))}),ume=cme;function dme(e){return _t("PrivateSwitchBase",e)}Ct("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const fme=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],hme=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${Me(i)}`],input:["input"]};return Et(o,dme,t)},pme=Ee(Ou)(({ownerState:e})=>$({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),mme=Ee("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),gme=I.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:l,disabled:c,disableFocusRipple:d=!1,edge:f=!1,icon:h,id:p,inputProps:g,inputRef:v,name:y,onBlur:S,onChange:_,onFocus:b,readOnly:x,required:E=!1,tabIndex:A,type:R,value:k}=t,O=Le(t,fme),[L,N]=Ix({controlled:i,default:!!l,name:"SwitchBase",state:"checked"}),H=Yd(),W=K=>{b&&b(K),H&&H.onFocus&&H.onFocus(K)},z=K=>{S&&S(K),H&&H.onBlur&&H.onBlur(K)},D=K=>{if(K.nativeEvent.defaultPrevented)return;const Y=K.target.checked;N(Y),_&&_(K,Y)};let F=c;H&&typeof F>"u"&&(F=H.disabled);const j=R==="checkbox"||R==="radio",V=$({},t,{checked:L,disabled:F,disableFocusRipple:d,edge:f}),G=hme(V);return C.jsxs(pme,$({component:"span",className:Fe(G.root,s),centerRipple:!0,focusRipple:!d,disabled:F,tabIndex:null,role:void 0,onFocus:W,onBlur:z,ownerState:V,ref:n},O,{children:[C.jsx(mme,$({autoFocus:r,checked:i,defaultChecked:l,className:G.input,disabled:F,id:j?p:void 0,name:y,onChange:D,readOnly:x,ref:v,required:E,ownerState:V,tabIndex:A,type:R},R==="checkbox"&&k===void 0?{}:{value:k},g)),L?o:h]}))}),RK=gme,vme=Bt(C.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),yme=Bt(C.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),bme=Bt(C.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function xme(e){return _t("MuiCheckbox",e)}const wme=Ct("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),YD=wme,_me=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Sme=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${Me(r)}`,`size${Me(i)}`]},s=Et(o,xme,t);return $({},t,s)},Eme=Ee(RK,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,n.color!=="default"&&t[`color${Me(n.color)}`]]}})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${YD.checked}, &.${YD.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${YD.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),Cme=C.jsx(yme,{}),Tme=C.jsx(vme,{}),kme=C.jsx(bme,{}),Ame=I.forwardRef(function(t,n){var r,i;const o=Tt({props:t,name:"MuiCheckbox"}),{checkedIcon:s=Cme,color:l="primary",icon:c=Tme,indeterminate:d=!1,indeterminateIcon:f=kme,inputProps:h,size:p="medium",className:g}=o,v=Le(o,_me),y=d?f:c,S=d?f:s,_=$({},o,{color:l,indeterminate:d,size:p}),b=Sme(_);return C.jsx(Eme,$({type:"checkbox",inputProps:$({"data-indeterminate":d},h),icon:I.cloneElement(y,{fontSize:(r=y.props.fontSize)!=null?r:p}),checkedIcon:I.cloneElement(S,{fontSize:(i=S.props.fontSize)!=null?i:p}),ownerState:_,ref:n,className:Fe(b.root,g)},v,{classes:b}))}),Rme=Ame;function Ime(e){return _t("MuiCircularProgress",e)}Ct("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Pme=["className","color","disableShrink","size","style","thickness","value","variant"];let rk=e=>e,l8,c8,u8,d8;const Uu=44,Ome=ec(l8||(l8=rk` 0% { transform: rotate(0deg); @@ -262,16 +262,16 @@ Error generating stack: `+o.message+` right: 0; top: 0; } - `),_0e,(t.vars||t).palette.action.hover)),E0e=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSkeleton"}),{animation:i="pulse",className:o,component:s="span",height:l,style:c,variant:d="text",width:f}=r,h=Le(r,b0e),p=$({},r,{animation:i,component:s,variant:d,hasChildren:!!h.children}),g=x0e(p);return C.jsx(S0e,$({as:s,ref:n,className:Fe(g.root,o),ownerState:p},h,{style:$({width:f,height:l},c)}))}),C0e=E0e,T0e=e=>!e||!zl(e),k0e=T0e;function A0e(e){return _t("MuiSlider",e)}const R0e=Ct("MuiSlider",["root","active","colorPrimary","colorSecondary","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),tl=R0e,I0e=e=>{const{open:t}=e;return{offset:Fe(t&&tl.valueLabelOpen),circle:tl.valueLabelCircle,label:tl.valueLabelLabel}};function P0e(e){const{children:t,className:n,value:r}=e,i=I0e(e);return t?I.cloneElement(t,{className:Fe(t.props.className)},C.jsxs(I.Fragment,{children:[t.props.children,C.jsx("span",{className:Fe(i.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:i.circle,children:C.jsx("span",{className:i.label,children:r})})})]})):null}const O0e=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function M8(e){return e}const M0e=Ee("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Me(n.color)}`],n.size!=="medium"&&t[`size${Me(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>$({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(e.vars||e).palette[t.color].main,WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&$({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},t.size==="small"&&{height:2},t.marked&&{marginBottom:20}),t.orientation==="vertical"&&$({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},t.size==="small"&&{width:2},t.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${tl.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${tl.dragging}`]:{[`& .${tl.thumb}, & .${tl.track}`]:{transition:"none"}}})),D0e=Ee("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>$({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),L0e=Ee("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?Yg(e.palette[t.color].main,.62):Xg(e.palette[t.color].main,.5);return $({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{border:"none"},t.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track===!1&&{display:"none"},t.track==="inverted"&&{backgroundColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n})}),N0e=Ee("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Me(n.color)}`],n.size!=="medium"&&t[`thumbSize${Me(n.size)}`]]}})(({theme:e,ownerState:t})=>$({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{width:12,height:12},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":$({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},t.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${tl.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:_n(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${tl.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:_n(e.palette[t.color].main,.16)}`},[`&.${tl.disabled}`]:{"&:hover":{boxShadow:"none"}}})),B0e=Ee(P0e,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>$({[`&.${tl.valueLabelOpen}`]:{transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(1)`},zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(0)`,position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},t.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},t.orientation==="vertical"&&{right:t.size==="small"?"20px":"30px",top:"50%",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},t.size==="small"&&{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),$0e=Ee("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>F5(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({theme:e,ownerState:t,markActive:n})=>$({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},n&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),F0e=Ee("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>F5(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:n})=>$({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},t.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},n&&{color:(e.vars||e).palette.text.primary})),z0e=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:l,size:c}=e,d={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",l&&`color${Me(l)}`,c&&`size${Me(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${Me(c)}`,l&&`thumbColor${Me(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Et(d,A0e,s)},j0e=({children:e})=>e,U0e=I.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,A,R,k,O,L,N;const H=Tt({props:t,name:"MuiSlider"}),z=In().direction==="rtl",{"aria-label":D,"aria-valuetext":F,"aria-labelledby":j,component:V="span",components:G={},componentsProps:K={},color:Y="primary",classes:J,className:ie,disableSwap:ce=!1,disabled:ue=!1,getAriaLabel:se,getAriaValueText:Q,marks:ae=!1,max:le=100,min:he=0,orientation:pe="horizontal",size:ve="medium",step:ye=1,scale:xe=M8,slotProps:me,slots:be,track:Qe="normal",valueLabelDisplay:qe="off",valueLabelFormat:at=M8}=H,Lt=Le(H,O0e),Ie=$({},H,{isRtl:z,max:le,min:he,classes:J,disabled:ue,disableSwap:ce,orientation:pe,marks:ae,color:Y,size:ve,step:ye,scale:xe,track:Qe,valueLabelDisplay:qe,valueLabelFormat:at}),{axisProps:ze,getRootProps:it,getHiddenInputProps:pt,getThumbProps:mt,open:_e,active:je,axis:Ye,focusedThumbIndex:$e,range:Ne,dragging:Rt,marks:ct,values:Ae,trackOffset:ot,trackLeap:$t,getThumbStyle:Re}=Zhe($({},Ie,{rootRef:n}));Ie.marked=ct.length>0&&ct.some(Hn=>Hn.label),Ie.dragging=Rt,Ie.focusedThumbIndex=$e;const Ue=z0e(Ie),yt=(r=(i=be==null?void 0:be.root)!=null?i:G.Root)!=null?r:M0e,Wt=(o=(s=be==null?void 0:be.rail)!=null?s:G.Rail)!=null?o:D0e,pn=(l=(c=be==null?void 0:be.track)!=null?c:G.Track)!=null?l:L0e,$r=(d=(f=be==null?void 0:be.thumb)!=null?f:G.Thumb)!=null?d:N0e,Or=(h=(p=be==null?void 0:be.valueLabel)!=null?p:G.ValueLabel)!=null?h:B0e,Mr=(g=(v=be==null?void 0:be.mark)!=null?v:G.Mark)!=null?g:$0e,Fr=(y=(S=be==null?void 0:be.markLabel)!=null?S:G.MarkLabel)!=null?y:F0e,Jr=(_=(b=be==null?void 0:be.input)!=null?b:G.Input)!=null?_:"input",Zo=(x=me==null?void 0:me.root)!=null?x:K.root,$u=(E=me==null?void 0:me.rail)!=null?E:K.rail,Gs=(A=me==null?void 0:me.track)!=null?A:K.track,ac=(R=me==null?void 0:me.thumb)!=null?R:K.thumb,lc=(k=me==null?void 0:me.valueLabel)!=null?k:K.valueLabel,sf=(O=me==null?void 0:me.mark)!=null?O:K.mark,es=(L=me==null?void 0:me.markLabel)!=null?L:K.markLabel,af=(N=me==null?void 0:me.input)!=null?N:K.input,oo=Wr({elementType:yt,getSlotProps:it,externalSlotProps:Zo,externalForwardedProps:Lt,additionalProps:$({},k0e(yt)&&{as:V}),ownerState:$({},Ie,Zo==null?void 0:Zo.ownerState),className:[Ue.root,ie]}),cc=Wr({elementType:Wt,externalSlotProps:$u,ownerState:Ie,className:Ue.rail}),Si=Wr({elementType:pn,externalSlotProps:Gs,additionalProps:{style:$({},ze[Ye].offset(ot),ze[Ye].leap($t))},ownerState:$({},Ie,Gs==null?void 0:Gs.ownerState),className:Ue.track}),ts=Wr({elementType:$r,getSlotProps:mt,externalSlotProps:ac,ownerState:$({},Ie,ac==null?void 0:ac.ownerState),className:Ue.thumb}),lf=Wr({elementType:Or,externalSlotProps:lc,ownerState:$({},Ie,lc==null?void 0:lc.ownerState),className:Ue.valueLabel}),ns=Wr({elementType:Mr,externalSlotProps:sf,ownerState:Ie,className:Ue.mark}),wa=Wr({elementType:Fr,externalSlotProps:es,ownerState:Ie,className:Ue.markLabel}),Fu=Wr({elementType:Jr,getSlotProps:pt,externalSlotProps:af,ownerState:Ie});return C.jsxs(yt,$({},oo,{children:[C.jsx(Wt,$({},cc)),C.jsx(pn,$({},Si)),ct.filter(Hn=>Hn.value>=he&&Hn.value<=le).map((Hn,Jn)=>{const bl=AE(Hn.value,he,le),xl=ze[Ye].offset(bl);let so;return Qe===!1?so=Ae.indexOf(Hn.value)!==-1:so=Qe==="normal"&&(Ne?Hn.value>=Ae[0]&&Hn.value<=Ae[Ae.length-1]:Hn.value<=Ae[0])||Qe==="inverted"&&(Ne?Hn.value<=Ae[0]||Hn.value>=Ae[Ae.length-1]:Hn.value>=Ae[0]),C.jsxs(I.Fragment,{children:[C.jsx(Mr,$({"data-index":Jn},ns,!zl(Mr)&&{markActive:so},{style:$({},xl,ns.style),className:Fe(ns.className,so&&Ue.markActive)})),Hn.label!=null?C.jsx(Fr,$({"aria-hidden":!0,"data-index":Jn},wa,!zl(Fr)&&{markLabelActive:so},{style:$({},xl,wa.style),className:Fe(Ue.markLabel,wa.className,so&&Ue.markLabelActive),children:Hn.label})):null]},Jn)}),Ae.map((Hn,Jn)=>{const bl=AE(Hn,he,le),xl=ze[Ye].offset(bl),so=qe==="off"?j0e:Or;return C.jsx(so,$({},!zl(so)&&{valueLabelFormat:at,valueLabelDisplay:qe,value:typeof at=="function"?at(xe(Hn),Jn):at,index:Jn,open:_e===Jn||je===Jn||qe==="on",disabled:ue},lf,{children:C.jsx($r,$({"data-index":Jn},ts,{className:Fe(Ue.thumb,ts.className,je===Jn&&Ue.active,$e===Jn&&Ue.focusVisible),style:$({},xl,Re(Jn),ts.style),children:C.jsx(Jr,$({"data-index":Jn,"aria-label":se?se(Jn):D,"aria-valuenow":xe(Hn),"aria-labelledby":j,"aria-valuetext":Q?Q(xe(Hn),Jn):F,value:Ae[Jn]},Fu))}))}),Jn)})]}))}),H0e=U0e;function W0e(e){return _t("MuiSnackbarContent",e)}Ct("MuiSnackbarContent",["root","message","action"]);const G0e=["action","className","message","role"],V0e=e=>{const{classes:t}=e;return Et({root:["root"],action:["action"],message:["message"]},W0e,t)},q0e=Ee(Zg,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=nle(e.palette.background.default,t);return $({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),X0e=Ee("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),Y0e=Ee("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),K0e=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:l="alert"}=r,c=Le(r,G0e),d=r,f=V0e(d);return C.jsxs(q0e,$({role:l,square:!0,elevation:6,className:Fe(f.root,o),ownerState:d,ref:n},c,{children:[C.jsx(X0e,{className:f.message,ownerState:d,children:s}),i?C.jsx(Y0e,{className:f.action,ownerState:d,children:i}):null]}))}),Q0e=K0e;function J0e(e){return _t("MuiSnackbar",e)}Ct("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const Z0e=["onEnter","onExited"],ebe=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],tbe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Me(n.vertical)}${Me(n.horizontal)}`]};return Et(r,J0e,t)},D8=Ee("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Me(n.anchorOrigin.vertical)}${Me(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return $({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:$({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),nbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSnackbar"}),i=In(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:l,horizontal:c}={vertical:"bottom",horizontal:"left"},autoHideDuration:d=null,children:f,className:h,ClickAwayListenerProps:p,ContentProps:g,disableWindowBlurListener:v=!1,message:y,open:S,TransitionComponent:_=IE,transitionDuration:b=o,TransitionProps:{onEnter:x,onExited:E}={}}=r,A=Le(r.TransitionProps,Z0e),R=Le(r,ebe),k=$({},r,{anchorOrigin:{vertical:l,horizontal:c},autoHideDuration:d,disableWindowBlurListener:v,TransitionComponent:_,transitionDuration:b}),O=tbe(k),{getRootProps:L,onClickAway:N}=epe($({},k)),[H,W]=I.useState(!0),z=Wr({elementType:D8,getSlotProps:L,externalForwardedProps:R,ownerState:k,additionalProps:{ref:n},className:[O.root,h]}),D=j=>{W(!0),E&&E(j)},F=(j,V)=>{W(!1),x&&x(j,V)};return!S&&H?null:C.jsx(pfe,$({onClickAway:N},p,{children:C.jsx(D8,$({},z,{children:C.jsx(_,$({appear:!0,in:S,timeout:b,direction:l==="top"?"down":"up",onEnter:F,onExited:D},A,{children:f||C.jsx(Q0e,$({message:y,action:s},g))}))}))}))}),rbe=nbe;function ibe(e){return _t("MuiTooltip",e)}const obe=Ct("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),dd=obe,sbe=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function abe(e){return Math.round(e*1e5)/1e5}const lbe=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${Me(o.split("-")[0])}`],arrow:["arrow"]};return Et(s,ibe,t)},cbe=Ee(EK,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>$({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${dd.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${dd.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${dd.arrow}`]:$({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${dd.arrow}`]:$({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),ube=Ee("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Me(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>$({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:_n(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${abe(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${dd.popper}[data-popper-placement*="left"] &`]:$({transformOrigin:"right center"},t.isRtl?$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):$({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${dd.popper}[data-popper-placement*="right"] &`]:$({transformOrigin:"left center"},t.isRtl?$({marginRight:"14px"},t.touch&&{marginRight:"24px"}):$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${dd.popper}[data-popper-placement*="top"] &`]:$({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${dd.popper}[data-popper-placement*="bottom"] &`]:$({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),dbe=Ee("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:_n(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Qw=!1,eL=null,ub={x:0,y:0};function Jw(e,t){return n=>{t&&t(n),e(n)}}const fbe=I.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,A;const R=Tt({props:t,name:"MuiTooltip"}),{arrow:k=!1,children:O,components:L={},componentsProps:N={},describeChild:H=!1,disableFocusListener:W=!1,disableHoverListener:z=!1,disableInteractive:D=!1,disableTouchListener:F=!1,enterDelay:j=100,enterNextDelay:V=0,enterTouchDelay:G=700,followCursor:K=!1,id:Y,leaveDelay:J=0,leaveTouchDelay:ie=1500,onClose:ce,onOpen:ue,open:se,placement:Q="bottom",PopperComponent:ae,PopperProps:le={},slotProps:he={},slots:pe={},title:ve,TransitionComponent:ye=IE,TransitionProps:xe}=R,me=Le(R,sbe),be=I.isValidElement(O)?O:C.jsx("span",{children:O}),Qe=In(),qe=Qe.direction==="rtl",[at,Lt]=I.useState(),[Ie,ze]=I.useState(null),it=I.useRef(!1),pt=D||K,mt=I.useRef(),_e=I.useRef(),je=I.useRef(),Ye=I.useRef(),[$e,Ne]=Ix({controlled:se,default:!1,name:"Tooltip",state:"open"});let Rt=$e;const ct=b5(Y),Ae=I.useRef(),ot=I.useCallback(()=>{Ae.current!==void 0&&(document.body.style.WebkitUserSelect=Ae.current,Ae.current=void 0),clearTimeout(Ye.current)},[]);I.useEffect(()=>()=>{clearTimeout(mt.current),clearTimeout(_e.current),clearTimeout(je.current),ot()},[ot]);const $t=Qt=>{clearTimeout(eL),Qw=!0,Ne(!0),ue&&!Rt&&ue(Qt)},Re=Zi(Qt=>{clearTimeout(eL),eL=setTimeout(()=>{Qw=!1},800+J),Ne(!1),ce&&Rt&&ce(Qt),clearTimeout(mt.current),mt.current=setTimeout(()=>{it.current=!1},Qe.transitions.duration.shortest)}),Ue=Qt=>{it.current&&Qt.type!=="touchstart"||(at&&at.removeAttribute("title"),clearTimeout(_e.current),clearTimeout(je.current),j||Qw&&V?_e.current=setTimeout(()=>{$t(Qt)},Qw?V:j):$t(Qt))},yt=Qt=>{clearTimeout(_e.current),clearTimeout(je.current),je.current=setTimeout(()=>{Re(Qt)},J)},{isFocusVisibleRef:Wt,onBlur:pn,onFocus:$r,ref:Or}=x5(),[,Mr]=I.useState(!1),Fr=Qt=>{pn(Qt),Wt.current===!1&&(Mr(!1),yt(Qt))},Jr=Qt=>{at||Lt(Qt.currentTarget),$r(Qt),Wt.current===!0&&(Mr(!0),Ue(Qt))},Zo=Qt=>{it.current=!0;const vr=be.props;vr.onTouchStart&&vr.onTouchStart(Qt)},$u=Ue,Gs=yt,ac=Qt=>{Zo(Qt),clearTimeout(je.current),clearTimeout(mt.current),ot(),Ae.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ye.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ae.current,Ue(Qt)},G)},lc=Qt=>{be.props.onTouchEnd&&be.props.onTouchEnd(Qt),ot(),clearTimeout(je.current),je.current=setTimeout(()=>{Re(Qt)},ie)};I.useEffect(()=>{if(!Rt)return;function Qt(vr){(vr.key==="Escape"||vr.key==="Esc")&&Re(vr)}return document.addEventListener("keydown",Qt),()=>{document.removeEventListener("keydown",Qt)}},[Re,Rt]);const sf=mr(be.ref,Or,Lt,n);!ve&&ve!==0&&(Rt=!1);const es=I.useRef(),af=Qt=>{const vr=be.props;vr.onMouseMove&&vr.onMouseMove(Qt),ub={x:Qt.clientX,y:Qt.clientY},es.current&&es.current.update()},oo={},cc=typeof ve=="string";H?(oo.title=!Rt&&cc&&!z?ve:null,oo["aria-describedby"]=Rt?ct:null):(oo["aria-label"]=cc?ve:null,oo["aria-labelledby"]=Rt&&!cc?ct:null);const Si=$({},oo,me,be.props,{className:Fe(me.className,be.props.className),onTouchStart:Zo,ref:sf},K?{onMouseMove:af}:{}),ts={};F||(Si.onTouchStart=ac,Si.onTouchEnd=lc),z||(Si.onMouseOver=Jw($u,Si.onMouseOver),Si.onMouseLeave=Jw(Gs,Si.onMouseLeave),pt||(ts.onMouseOver=$u,ts.onMouseLeave=Gs)),W||(Si.onFocus=Jw(Jr,Si.onFocus),Si.onBlur=Jw(Fr,Si.onBlur),pt||(ts.onFocus=Jr,ts.onBlur=Fr));const lf=I.useMemo(()=>{var Qt;let vr=[{name:"arrow",enabled:!!Ie,options:{element:Ie,padding:4}}];return(Qt=le.popperOptions)!=null&&Qt.modifiers&&(vr=vr.concat(le.popperOptions.modifiers)),$({},le.popperOptions,{modifiers:vr})},[Ie,le]),ns=$({},R,{isRtl:qe,arrow:k,disableInteractive:pt,placement:Q,PopperComponentProp:ae,touch:it.current}),wa=lbe(ns),Fu=(r=(i=pe.popper)!=null?i:L.Popper)!=null?r:cbe,Hn=(o=(s=(l=pe.transition)!=null?l:L.Transition)!=null?s:ye)!=null?o:IE,Jn=(c=(d=pe.tooltip)!=null?d:L.Tooltip)!=null?c:ube,bl=(f=(h=pe.arrow)!=null?h:L.Arrow)!=null?f:dbe,xl=Bb(Fu,$({},le,(p=he.popper)!=null?p:N.popper,{className:Fe(wa.popper,le==null?void 0:le.className,(g=(v=he.popper)!=null?v:N.popper)==null?void 0:g.className)}),ns),so=Bb(Hn,$({},xe,(y=he.transition)!=null?y:N.transition),ns),xv=Bb(Jn,$({},(S=he.tooltip)!=null?S:N.tooltip,{className:Fe(wa.tooltip,(_=(b=he.tooltip)!=null?b:N.tooltip)==null?void 0:_.className)}),ns),wv=Bb(bl,$({},(x=he.arrow)!=null?x:N.arrow,{className:Fe(wa.arrow,(E=(A=he.arrow)!=null?A:N.arrow)==null?void 0:E.className)}),ns);return C.jsxs(I.Fragment,{children:[I.cloneElement(be,Si),C.jsx(Fu,$({as:ae??EK,placement:Q,anchorEl:K?{getBoundingClientRect:()=>({top:ub.y,left:ub.x,right:ub.x,bottom:ub.y,width:0,height:0})}:at,popperRef:es,open:at?Rt:!1,id:ct,transition:!0},ts,xl,{popperOptions:lf,children:({TransitionProps:Qt})=>C.jsx(Hn,$({timeout:Qe.transitions.duration.shorter},Qt,so,{children:C.jsxs(Jn,$({},xv,{children:[ve,k?C.jsx(bl,$({},wv,{ref:ze})):null]}))}))}))]})}),Kd=fbe;function hbe(e){return _t("MuiSwitch",e)}const pbe=Ct("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),xo=pbe,mbe=["className","color","edge","size","sx"],gbe=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,l={root:["root",n&&`edge${Me(n)}`,`size${Me(r)}`],switchBase:["switchBase",`color${Me(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=Et(l,hbe,t);return $({},t,c)},vbe=Ee("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Me(n.edge)}`],t[`size${Me(n.size)}`]]}})(({ownerState:e})=>$({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},e.edge==="start"&&{marginLeft:-8},e.edge==="end"&&{marginRight:-8},e.size==="small"&&{width:40,height:24,padding:7,[`& .${xo.thumb}`]:{width:16,height:16},[`& .${xo.switchBase}`]:{padding:4,[`&.${xo.checked}`]:{transform:"translateX(16px)"}}})),ybe=Ee(RK,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${xo.input}`]:t.input},n.color!=="default"&&t[`color${Me(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${xo.checked}`]:{transform:"translateX(20px)"},[`&.${xo.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${xo.checked} + .${xo.track}`]:{opacity:.5},[`&.${xo.disabled} + .${xo.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${xo.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>$({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${xo.checked}`]:{color:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${xo.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?Yg(e.palette[t.color].main,.62):Xg(e.palette[t.color].main,.55)}`}},[`&.${xo.checked} + .${xo.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),bbe=Ee("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),xbe=Ee("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),wbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:l="medium",sx:c}=r,d=Le(r,mbe),f=$({},r,{color:o,edge:s,size:l}),h=gbe(f),p=C.jsx(xbe,{className:h.thumb,ownerState:f});return C.jsxs(vbe,{className:Fe(h.root,i),sx:c,ownerState:f,children:[C.jsx(ybe,$({type:"checkbox",icon:p,checkedIcon:p,ref:n,ownerState:f},d,{classes:$({},h,{root:h.switchBase})})),C.jsx(bbe,{className:h.track,ownerState:f})]})}),Tg=wbe;function _be(e){return _t("MuiTab",e)}const Sbe=Ct("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),xh=Sbe,Ebe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Cbe=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:l,disabled:c}=e,d={root:["root",o&&s&&"labelIcon",`textColor${Me(n)}`,r&&"fullWidth",i&&"wrapped",l&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return Et(d,_be,t)},Tbe=Ee(Ou,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Me(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>$({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${xh.iconWrapper}`]:$({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${xh.selected}`]:{opacity:1},[`&.${xh.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${xh.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${xh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${xh.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${xh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),kbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:l,icon:c,iconPosition:d="top",indicator:f,label:h,onChange:p,onClick:g,onFocus:v,selected:y,selectionFollowsFocus:S,textColor:_="inherit",value:b,wrapped:x=!1}=r,E=Le(r,Ebe),A=$({},r,{disabled:o,disableFocusRipple:s,selected:y,icon:!!c,iconPosition:d,label:!!h,fullWidth:l,textColor:_,wrapped:x}),R=Cbe(A),k=c&&h&&I.isValidElement(c)?I.cloneElement(c,{className:Fe(R.iconWrapper,c.props.className)}):c,O=N=>{!y&&p&&p(N,b),g&&g(N)},L=N=>{S&&!y&&p&&p(N,b),v&&v(N)};return C.jsxs(Tbe,$({focusRipple:!s,className:Fe(R.root,i),ref:n,role:"tab","aria-selected":y,disabled:o,onClick:O,onFocus:L,ownerState:A,tabIndex:y?0:-1},E,{children:[d==="top"||d==="start"?C.jsxs(I.Fragment,{children:[k,h]}):C.jsxs(I.Fragment,{children:[h,k]}),f]}))}),Mm=kbe;function Abe(e){return _t("MuiToolbar",e)}Ct("MuiToolbar",["root","gutters","regular","dense"]);const Rbe=["className","component","disableGutters","variant"],Ibe=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Et({root:["root",!n&&"gutters",r]},Abe,t)},Pbe=Ee("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),Obe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:l="regular"}=r,c=Le(r,Rbe),d=$({},r,{component:o,disableGutters:s,variant:l}),f=Ibe(d);return C.jsx(Pbe,$({as:o,className:Fe(f.root,i),ref:n,ownerState:d},c))}),Mbe=Obe,Dbe=Bt(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Lbe=Bt(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Nbe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Bbe(e,t,n,r={},i=()=>{}){const{ease:o=Nbe,duration:s=300}=r;let l=null;const c=t[e];let d=!1;const f=()=>{d=!0},h=p=>{if(d){i(new Error("Animation cancelled"));return}l===null&&(l=p);const g=Math.min(1,(p-l)/s);if(t[e]=o(g)*(n-c)+c,g>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(h)};return c===n?(i(new Error("Element already at target position")),f):(requestAnimationFrame(h),f)}const $be=["onChange"],Fbe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function zbe(e){const{onChange:t}=e,n=Le(e,$be),r=I.useRef(),i=I.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Ao(()=>{const s=XC(()=>{const c=r.current;o(),c!==r.current&&t(r.current)}),l=bu(i.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),I.useEffect(()=>{o(),t(r.current)},[t]),C.jsx("div",$({style:Fbe,ref:i},n))}function jbe(e){return _t("MuiTabScrollButton",e)}const Ube=Ct("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Hbe=Ube,Wbe=["className","slots","slotProps","direction","orientation","disabled"],Gbe=e=>{const{classes:t,orientation:n,disabled:r}=e;return Et({root:["root",n,r&&"disabled"]},jbe,t)},Vbe=Ee(Ou,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>$({width:40,flexShrink:0,opacity:.8,[`&.${Hbe.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),qbe=I.forwardRef(function(t,n){var r,i;const o=Tt({props:t,name:"MuiTabScrollButton"}),{className:s,slots:l={},slotProps:c={},direction:d}=o,f=Le(o,Wbe),p=In().direction==="rtl",g=$({isRtl:p},o),v=Gbe(g),y=(r=l.StartScrollButtonIcon)!=null?r:Dbe,S=(i=l.EndScrollButtonIcon)!=null?i:Lbe,_=Wr({elementType:y,externalSlotProps:c.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g}),b=Wr({elementType:S,externalSlotProps:c.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g});return C.jsx(Vbe,$({component:"div",className:Fe(v.root,s),ref:n,role:null,ownerState:g,tabIndex:null},f,{children:d==="left"?C.jsx(y,$({},_)):C.jsx(S,$({},b))}))}),Xbe=qbe;function Ybe(e){return _t("MuiTabs",e)}const Kbe=Ct("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),tL=Kbe,Qbe=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],L8=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,N8=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Zw=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const o=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||o)i=n(e,i);else{i.focus();return}}},Jbe=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:l,classes:c}=e;return Et({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Ybe,c)},Zbe=Ee("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${tL.scrollButtons}`]:t.scrollButtons},{[`& .${tL.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>$({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${tL.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),exe=Ee("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>$({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),txe=Ee("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>$({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),nxe=Ee("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>$({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),rxe=Ee(zbe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),B8={},ixe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTabs"}),i=In(),o=i.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:c,centered:d=!1,children:f,className:h,component:p="div",allowScrollButtonsMobile:g=!1,indicatorColor:v="primary",onChange:y,orientation:S="horizontal",ScrollButtonComponent:_=Xbe,scrollButtons:b="auto",selectionFollowsFocus:x,slots:E={},slotProps:A={},TabIndicatorProps:R={},TabScrollButtonProps:k={},textColor:O="primary",value:L,variant:N="standard",visibleScrollbar:H=!1}=r,W=Le(r,Qbe),z=N==="scrollable",D=S==="vertical",F=D?"scrollTop":"scrollLeft",j=D?"top":"left",V=D?"bottom":"right",G=D?"clientHeight":"clientWidth",K=D?"height":"width",Y=$({},r,{component:p,allowScrollButtonsMobile:g,indicatorColor:v,orientation:S,vertical:D,scrollButtons:b,textColor:O,variant:N,visibleScrollbar:H,fixed:!z,hideScrollbar:z&&!H,scrollableX:z&&!D,scrollableY:z&&D,centered:d&&!z,scrollButtonsHideMobile:!g}),J=Jbe(Y),ie=Wr({elementType:E.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:Y}),ce=Wr({elementType:E.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:Y}),[ue,se]=I.useState(!1),[Q,ae]=I.useState(B8),[le,he]=I.useState(!1),[pe,ve]=I.useState(!1),[ye,xe]=I.useState(!1),[me,be]=I.useState({overflow:"hidden",scrollbarWidth:0}),Qe=new Map,qe=I.useRef(null),at=I.useRef(null),Lt=()=>{const Re=qe.current;let Ue;if(Re){const Wt=Re.getBoundingClientRect();Ue={clientWidth:Re.clientWidth,scrollLeft:Re.scrollLeft,scrollTop:Re.scrollTop,scrollLeftNormalized:koe(Re,i.direction),scrollWidth:Re.scrollWidth,top:Wt.top,bottom:Wt.bottom,left:Wt.left,right:Wt.right}}let yt;if(Re&&L!==!1){const Wt=at.current.children;if(Wt.length>0){const pn=Wt[Qe.get(L)];yt=pn?pn.getBoundingClientRect():null}}return{tabsMeta:Ue,tabMeta:yt}},Ie=Zi(()=>{const{tabsMeta:Re,tabMeta:Ue}=Lt();let yt=0,Wt;if(D)Wt="top",Ue&&Re&&(yt=Ue.top-Re.top+Re.scrollTop);else if(Wt=o?"right":"left",Ue&&Re){const $r=o?Re.scrollLeftNormalized+Re.clientWidth-Re.scrollWidth:Re.scrollLeft;yt=(o?-1:1)*(Ue[Wt]-Re[Wt]+$r)}const pn={[Wt]:yt,[K]:Ue?Ue[K]:0};if(isNaN(Q[Wt])||isNaN(Q[K]))ae(pn);else{const $r=Math.abs(Q[Wt]-pn[Wt]),Or=Math.abs(Q[K]-pn[K]);($r>=1||Or>=1)&&ae(pn)}}),ze=(Re,{animation:Ue=!0}={})=>{Ue?Bbe(F,qe.current,Re,{duration:i.transitions.duration.standard}):qe.current[F]=Re},it=Re=>{let Ue=qe.current[F];D?Ue+=Re:(Ue+=Re*(o?-1:1),Ue*=o&&kq()==="reverse"?-1:1),ze(Ue)},pt=()=>{const Re=qe.current[G];let Ue=0;const yt=Array.from(at.current.children);for(let Wt=0;WtRe){Wt===0&&(Ue=Re);break}Ue+=pn[G]}return Ue},mt=()=>{it(-1*pt())},_e=()=>{it(pt())},je=I.useCallback(Re=>{be({overflow:null,scrollbarWidth:Re})},[]),Ye=()=>{const Re={};Re.scrollbarSizeListener=z?C.jsx(rxe,{onChange:je,className:Fe(J.scrollableX,J.hideScrollbar)}):null;const yt=z&&(b==="auto"&&(le||pe)||b===!0);return Re.scrollButtonStart=yt?C.jsx(_,$({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:ie},orientation:S,direction:o?"right":"left",onClick:mt,disabled:!le},k,{className:Fe(J.scrollButtons,k.className)})):null,Re.scrollButtonEnd=yt?C.jsx(_,$({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ce},orientation:S,direction:o?"left":"right",onClick:_e,disabled:!pe},k,{className:Fe(J.scrollButtons,k.className)})):null,Re},$e=Zi(Re=>{const{tabsMeta:Ue,tabMeta:yt}=Lt();if(!(!yt||!Ue)){if(yt[j]Ue[V]){const Wt=Ue[F]+(yt[V]-Ue[V]);ze(Wt,{animation:Re})}}}),Ne=Zi(()=>{z&&b!==!1&&xe(!ye)});I.useEffect(()=>{const Re=XC(()=>{qe.current&&Ie()}),Ue=bu(qe.current);Ue.addEventListener("resize",Re);let yt;return typeof ResizeObserver<"u"&&(yt=new ResizeObserver(Re),Array.from(at.current.children).forEach(Wt=>{yt.observe(Wt)})),()=>{Re.clear(),Ue.removeEventListener("resize",Re),yt&&yt.disconnect()}},[Ie]),I.useEffect(()=>{const Re=Array.from(at.current.children),Ue=Re.length;if(typeof IntersectionObserver<"u"&&Ue>0&&z&&b!==!1){const yt=Re[0],Wt=Re[Ue-1],pn={root:qe.current,threshold:.99},$r=Jr=>{he(!Jr[0].isIntersecting)},Or=new IntersectionObserver($r,pn);Or.observe(yt);const Mr=Jr=>{ve(!Jr[0].isIntersecting)},Fr=new IntersectionObserver(Mr,pn);return Fr.observe(Wt),()=>{Or.disconnect(),Fr.disconnect()}}},[z,b,ye,f==null?void 0:f.length]),I.useEffect(()=>{se(!0)},[]),I.useEffect(()=>{Ie()}),I.useEffect(()=>{$e(B8!==Q)},[$e,Q]),I.useImperativeHandle(c,()=>({updateIndicator:Ie,updateScrollButtons:Ne}),[Ie,Ne]);const Rt=C.jsx(nxe,$({},R,{className:Fe(J.indicator,R.className),ownerState:Y,style:$({},Q,R.style)}));let ct=0;const Ae=I.Children.map(f,Re=>{if(!I.isValidElement(Re))return null;const Ue=Re.props.value===void 0?ct:Re.props.value;Qe.set(Ue,ct);const yt=Ue===L;return ct+=1,I.cloneElement(Re,$({fullWidth:N==="fullWidth",indicator:yt&&!ue&&Rt,selected:yt,selectionFollowsFocus:x,onChange:y,textColor:O,value:Ue},ct===1&&L===!1&&!Re.props.tabIndex?{tabIndex:0}:{}))}),ot=Re=>{const Ue=at.current,yt=Ar(Ue).activeElement;if(yt.getAttribute("role")!=="tab")return;let pn=S==="horizontal"?"ArrowLeft":"ArrowUp",$r=S==="horizontal"?"ArrowRight":"ArrowDown";switch(S==="horizontal"&&o&&(pn="ArrowRight",$r="ArrowLeft"),Re.key){case pn:Re.preventDefault(),Zw(Ue,yt,N8);break;case $r:Re.preventDefault(),Zw(Ue,yt,L8);break;case"Home":Re.preventDefault(),Zw(Ue,null,L8);break;case"End":Re.preventDefault(),Zw(Ue,null,N8);break}},$t=Ye();return C.jsxs(Zbe,$({className:Fe(J.root,h),ownerState:Y,ref:n,as:p},W,{children:[$t.scrollButtonStart,$t.scrollbarSizeListener,C.jsxs(exe,{className:J.scroller,ownerState:Y,style:{overflow:me.overflow,[D?`margin${o?"Left":"Right"}`:"marginBottom"]:H?void 0:-me.scrollbarWidth},ref:qe,children:[C.jsx(txe,{"aria-label":s,"aria-labelledby":l,"aria-orientation":S==="vertical"?"vertical":null,className:J.flexContainer,ownerState:Y,onKeyDown:ot,ref:at,role:"tablist",children:Ae}),ue&&Rt]}),$t.scrollButtonEnd]}))}),oxe=ixe;function sxe(e){return _t("MuiTextField",e)}Ct("MuiTextField",["root"]);const axe=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],lxe={standard:BK,filled:MK,outlined:WK},cxe=e=>{const{classes:t}=e;return Et({root:["root"]},sxe,t)},uxe=Ee(_ge,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),dxe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:l,color:c="primary",defaultValue:d,disabled:f=!1,error:h=!1,FormHelperTextProps:p,fullWidth:g=!1,helperText:v,id:y,InputLabelProps:S,inputProps:_,InputProps:b,inputRef:x,label:E,maxRows:A,minRows:R,multiline:k=!1,name:O,onBlur:L,onChange:N,onFocus:H,placeholder:W,required:z=!1,rows:D,select:F=!1,SelectProps:j,type:V,value:G,variant:K="outlined"}=r,Y=Le(r,axe),J=$({},r,{autoFocus:o,color:c,disabled:f,error:h,fullWidth:g,multiline:k,required:z,select:F,variant:K}),ie=cxe(J),ce={};K==="outlined"&&(S&&typeof S.shrink<"u"&&(ce.notched=S.shrink),ce.label=E),F&&((!j||!j.native)&&(ce.id=void 0),ce["aria-describedby"]=void 0);const ue=b5(y),se=v&&ue?`${ue}-helper-text`:void 0,Q=E&&ue?`${ue}-label`:void 0,ae=lxe[K],le=C.jsx(ae,$({"aria-describedby":se,autoComplete:i,autoFocus:o,defaultValue:d,fullWidth:g,multiline:k,name:O,rows:D,maxRows:A,minRows:R,type:V,value:G,id:ue,inputRef:x,onBlur:L,onChange:N,onFocus:H,placeholder:W,inputProps:_},ce,b));return C.jsxs(uxe,$({className:Fe(ie.root,l),disabled:f,error:h,fullWidth:g,ref:n,required:z,color:c,variant:K,ownerState:J},Y,{children:[E!=null&&E!==""&&C.jsx(ave,$({htmlFor:ue,id:Q},S,{children:E})),F?C.jsx(v0e,$({"aria-describedby":se,id:ue,labelId:Q,value:G,input:le},j,{children:s})):le,v&&C.jsx($ge,$({id:se},p,{children:v}))]}))}),X1=dxe;function bn({vertical:e,...t}){return C.jsx(dt,{position:"relative",height:"100%",width:"100%",display:"flex",flexDirection:e?"column":"row",...t})}const VK=Bt(C.jsx("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z"}),"AccountTreeOutlined"),fxe=Bt(C.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),hxe=Bt(C.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),pxe=Bt(C.jsx("path",{d:"M6 7c0 .55.45 1 1 1h7.59l-8.88 8.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L16 9.41V17c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1z"}),"ArrowOutwardRounded"),mxe=Bt(C.jsx("path",{d:"M10 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM7 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-3-3c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3-6c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-1.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm3 6c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-4c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm2-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-3.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"}),"BlurCircularOutlined"),gxe=Bt(C.jsx("path",{d:"M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"}),"BlurOnOutlined"),vxe=Bt(C.jsx("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-4 4v3c0 .22-.03.47-.07.7l-.1.65-.37.65c-.72 1.24-2.04 2-3.46 2s-2.74-.77-3.46-2l-.37-.64-.1-.65C8.03 15.48 8 15.23 8 15v-4c0-.23.03-.48.07-.7l.1-.65.37-.65c.3-.52.72-.97 1.21-1.31l.57-.39.74-.18c.31-.08.63-.12.94-.12.32 0 .63.04.95.12l.68.16.61.42c.5.34.91.78 1.21 1.31l.38.65.1.65c.04.22.07.47.07.69v1zm-6 2h4v2h-4zm0-4h4v2h-4z"}),"BugReportOutlined"),yxe=Bt(C.jsx("path",{d:"M17 12c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5 5-2.24 5-5zm-5 3c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm-7 0H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z"}),"CenterFocusStrongOutlined"),bxe=Bt(C.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightOutlined"),xxe=Bt(C.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}),"ClearOutlined"),qK=Bt(C.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}),"CloseOutlined"),wxe=Bt(C.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"}),"CodeOutlined"),_xe=Bt(C.jsx("path",{d:"M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm2 10H3v4c0 1.1.9 2 2 2h4v-2H5v-4zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2z"}),"CropFreeOutlined"),Sxe=Bt(C.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}),"DragHandleOutlined"),ok=Bt(C.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"}),"EditOutlined"),Exe=Bt(C.jsx("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),XK=Bt(C.jsx("path",{d:"M15 22H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h8l6 6v6h-2V9h-5V4H6v16h9v2zm4-.34v-2.24l2.95 2.95 1.41-1.41L20.41 18h2.24v-2H17v5.66h2z"}),"FileOpenOutlined"),Cxe=Bt(C.jsx("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub"),Txe=Bt(C.jsx("path",{d:"M2.81 2.81 1.39 4.22l2.27 2.27C2.61 8.07 2 9.96 2 12c0 5.52 4.48 10 10 10 2.04 0 3.93-.61 5.51-1.66l2.27 2.27 1.41-1.41L2.81 2.81zM12 20c-4.41 0-8-3.59-8-8 0-1.48.41-2.86 1.12-4.06l10.94 10.94C14.86 19.59 13.48 20 12 20zM7.94 5.12 6.49 3.66C8.07 2.61 9.96 2 12 2c5.52 0 10 4.48 10 10 0 2.04-.61 3.93-1.66 5.51l-1.46-1.46C19.59 14.86 20 13.48 20 12c0-4.41-3.59-8-8-8-1.48 0-2.86.41-4.06 1.12z"}),"HideSourceOutlined"),kxe=Bt(C.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined"),Axe=Bt(C.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined"),Rxe=Bt(C.jsx("path",{d:"M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16zM16 17H5V7h11l3.55 5L16 17z"}),"LabelOutlined"),tv=Bt(C.jsx("path",{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16zm0-11.47L17.74 9 12 13.47 6.26 9 12 4.53z"}),"LayersOutlined"),YK=Bt(C.jsx("path",{d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7zm-4 6h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"}),"ListOutlined"),Ixe=Bt(C.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVertOutlined"),Pxe=Bt(C.jsx("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),"PauseOutlined"),Oxe=Bt(C.jsx("path",{d:"M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z"}),"PlaceOutlined"),Mxe=Bt(C.jsx("path",{d:"M10 8.64 15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z"}),"PlayArrowOutlined"),KK=Bt(C.jsx("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"}),"ReplayOutlined"),Dxe=Bt(C.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"SearchOutlined"),Lxe=Bt(C.jsx("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}),"SettingsOutlined"),Nxe=Bt(C.jsx("path",{d:"m6 18 8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z"}),"SkipNextOutlined"),Bxe=Bt(C.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6l-8.5 6zm6.5 2.14L12.97 12 16 9.86v4.28z"}),"SkipPreviousOutlined"),TS=Bt(C.jsx("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortOutlined"),$xe=Bt(C.jsx("path",{d:"M16 8v8H8V8h8m2-2H6v12h12V6z"}),"StopOutlined"),Fxe=Bt(C.jsx("path",{d:"M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"}),"TripOriginOutlined"),$8=Bt(C.jsx("path",{d:"M19 13H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm0 6H5v-4h14v4zm0-16H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 6H5V5h14v4z"}),"ViewAgendaOutlined"),QK=Bt(C.jsx("path",{d:"M3 4c0-.55.45-1 1-1h2V1H4C2.34 1 1 2.34 1 4v2h2V4zm0 16v-2H1v2c0 1.66 1.34 3 3 3h2v-2H4c-.55 0-1-.45-1-1zM20 1h-2v2h2c.55 0 1 .45 1 1v2h2V4c0-1.66-1.34-3-3-3zm1 19c0 .55-.45 1-1 1h-2v2h2c1.66 0 3-1.34 3-3v-2h-2v2zm-2-5.13V9.13c0-.72-.38-1.38-1-1.73l-5-2.88c-.31-.18-.65-.27-1-.27s-.69.09-1 .27L6 7.39c-.62.36-1 1.02-1 1.74v5.74c0 .72.38 1.38 1 1.73l5 2.88c.31.18.65.27 1 .27s.69-.09 1-.27l5-2.88c.62-.35 1-1.01 1-1.73zm-8 2.3-4-2.3v-4.63l4 2.33v4.6zm1-6.33L8.04 8.53 12 6.25l3.96 2.28L12 10.84zm5 4.03-4 2.3v-4.6l4-2.33v4.63z"}),"ViewInArOutlined"),zxe=Bt(C.jsx("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"}),"VisibilityOutlined"),jxe=Bt(C.jsx("path",{d:"m16.66 4.52 2.83 2.83-2.83 2.83-2.83-2.83 2.83-2.83M9 5v4H5V5h4m10 10v4h-4v-4h4M9 15v4H5v-4h4m7.66-13.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65zM11 3H3v8h8V3zm10 10h-8v8h8v-8zm-10 0H3v8h8v-8z"}),"WidgetsOutlined"),V4=Bt(C.jsx("path",{d:"M6 15c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6-8c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2C9.8 3 8 4.8 8 7s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6 12c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z"}),"WorkspacesOutlined");var DE={exports:{}};/** + `),_0e,(t.vars||t).palette.action.hover)),E0e=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSkeleton"}),{animation:i="pulse",className:o,component:s="span",height:l,style:c,variant:d="text",width:f}=r,h=Le(r,b0e),p=$({},r,{animation:i,component:s,variant:d,hasChildren:!!h.children}),g=x0e(p);return C.jsx(S0e,$({as:s,ref:n,className:Fe(g.root,o),ownerState:p},h,{style:$({width:f,height:l},c)}))}),C0e=E0e,T0e=e=>!e||!zl(e),k0e=T0e;function A0e(e){return _t("MuiSlider",e)}const R0e=Ct("MuiSlider",["root","active","colorPrimary","colorSecondary","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),tl=R0e,I0e=e=>{const{open:t}=e;return{offset:Fe(t&&tl.valueLabelOpen),circle:tl.valueLabelCircle,label:tl.valueLabelLabel}};function P0e(e){const{children:t,className:n,value:r}=e,i=I0e(e);return t?I.cloneElement(t,{className:Fe(t.props.className)},C.jsxs(I.Fragment,{children:[t.props.children,C.jsx("span",{className:Fe(i.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:i.circle,children:C.jsx("span",{className:i.label,children:r})})})]})):null}const O0e=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function M8(e){return e}const M0e=Ee("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Me(n.color)}`],n.size!=="medium"&&t[`size${Me(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>$({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(e.vars||e).palette[t.color].main,WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&$({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},t.size==="small"&&{height:2},t.marked&&{marginBottom:20}),t.orientation==="vertical"&&$({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},t.size==="small"&&{width:2},t.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${tl.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${tl.dragging}`]:{[`& .${tl.thumb}, & .${tl.track}`]:{transition:"none"}}})),D0e=Ee("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>$({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),L0e=Ee("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?Yg(e.palette[t.color].main,.62):Xg(e.palette[t.color].main,.5);return $({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{border:"none"},t.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track===!1&&{display:"none"},t.track==="inverted"&&{backgroundColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n})}),N0e=Ee("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Me(n.color)}`],n.size!=="medium"&&t[`thumbSize${Me(n.size)}`]]}})(({theme:e,ownerState:t})=>$({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{width:12,height:12},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":$({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},t.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${tl.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:_n(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${tl.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:_n(e.palette[t.color].main,.16)}`},[`&.${tl.disabled}`]:{"&:hover":{boxShadow:"none"}}})),B0e=Ee(P0e,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>$({[`&.${tl.valueLabelOpen}`]:{transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(1)`},zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(0)`,position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},t.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},t.orientation==="vertical"&&{right:t.size==="small"?"20px":"30px",top:"50%",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},t.size==="small"&&{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),$0e=Ee("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>F5(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({theme:e,ownerState:t,markActive:n})=>$({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},n&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),F0e=Ee("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>F5(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:n})=>$({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},t.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},n&&{color:(e.vars||e).palette.text.primary})),z0e=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:l,size:c}=e,d={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",l&&`color${Me(l)}`,c&&`size${Me(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${Me(c)}`,l&&`thumbColor${Me(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Et(d,A0e,s)},j0e=({children:e})=>e,U0e=I.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,A,R,k,O,L,N;const H=Tt({props:t,name:"MuiSlider"}),z=In().direction==="rtl",{"aria-label":D,"aria-valuetext":F,"aria-labelledby":j,component:V="span",components:G={},componentsProps:K={},color:Y="primary",classes:J,className:ie,disableSwap:ce=!1,disabled:ue=!1,getAriaLabel:se,getAriaValueText:Q,marks:ae=!1,max:le=100,min:he=0,orientation:pe="horizontal",size:ve="medium",step:ye=1,scale:xe=M8,slotProps:me,slots:be,track:Qe="normal",valueLabelDisplay:qe="off",valueLabelFormat:at=M8}=H,Lt=Le(H,O0e),Ie=$({},H,{isRtl:z,max:le,min:he,classes:J,disabled:ue,disableSwap:ce,orientation:pe,marks:ae,color:Y,size:ve,step:ye,scale:xe,track:Qe,valueLabelDisplay:qe,valueLabelFormat:at}),{axisProps:ze,getRootProps:it,getHiddenInputProps:pt,getThumbProps:mt,open:_e,active:je,axis:Ye,focusedThumbIndex:$e,range:Ne,dragging:Rt,marks:ct,values:Ae,trackOffset:ot,trackLeap:$t,getThumbStyle:Re}=Zhe($({},Ie,{rootRef:n}));Ie.marked=ct.length>0&&ct.some(Hn=>Hn.label),Ie.dragging=Rt,Ie.focusedThumbIndex=$e;const Ue=z0e(Ie),yt=(r=(i=be==null?void 0:be.root)!=null?i:G.Root)!=null?r:M0e,Wt=(o=(s=be==null?void 0:be.rail)!=null?s:G.Rail)!=null?o:D0e,pn=(l=(c=be==null?void 0:be.track)!=null?c:G.Track)!=null?l:L0e,$r=(d=(f=be==null?void 0:be.thumb)!=null?f:G.Thumb)!=null?d:N0e,Or=(h=(p=be==null?void 0:be.valueLabel)!=null?p:G.ValueLabel)!=null?h:B0e,Mr=(g=(v=be==null?void 0:be.mark)!=null?v:G.Mark)!=null?g:$0e,Fr=(y=(S=be==null?void 0:be.markLabel)!=null?S:G.MarkLabel)!=null?y:F0e,Jr=(_=(b=be==null?void 0:be.input)!=null?b:G.Input)!=null?_:"input",Zo=(x=me==null?void 0:me.root)!=null?x:K.root,$u=(E=me==null?void 0:me.rail)!=null?E:K.rail,Gs=(A=me==null?void 0:me.track)!=null?A:K.track,ac=(R=me==null?void 0:me.thumb)!=null?R:K.thumb,lc=(k=me==null?void 0:me.valueLabel)!=null?k:K.valueLabel,sf=(O=me==null?void 0:me.mark)!=null?O:K.mark,es=(L=me==null?void 0:me.markLabel)!=null?L:K.markLabel,af=(N=me==null?void 0:me.input)!=null?N:K.input,so=Wr({elementType:yt,getSlotProps:it,externalSlotProps:Zo,externalForwardedProps:Lt,additionalProps:$({},k0e(yt)&&{as:V}),ownerState:$({},Ie,Zo==null?void 0:Zo.ownerState),className:[Ue.root,ie]}),cc=Wr({elementType:Wt,externalSlotProps:$u,ownerState:Ie,className:Ue.rail}),Si=Wr({elementType:pn,externalSlotProps:Gs,additionalProps:{style:$({},ze[Ye].offset(ot),ze[Ye].leap($t))},ownerState:$({},Ie,Gs==null?void 0:Gs.ownerState),className:Ue.track}),ts=Wr({elementType:$r,getSlotProps:mt,externalSlotProps:ac,ownerState:$({},Ie,ac==null?void 0:ac.ownerState),className:Ue.thumb}),lf=Wr({elementType:Or,externalSlotProps:lc,ownerState:$({},Ie,lc==null?void 0:lc.ownerState),className:Ue.valueLabel}),ns=Wr({elementType:Mr,externalSlotProps:sf,ownerState:Ie,className:Ue.mark}),wa=Wr({elementType:Fr,externalSlotProps:es,ownerState:Ie,className:Ue.markLabel}),Fu=Wr({elementType:Jr,getSlotProps:pt,externalSlotProps:af,ownerState:Ie});return C.jsxs(yt,$({},so,{children:[C.jsx(Wt,$({},cc)),C.jsx(pn,$({},Si)),ct.filter(Hn=>Hn.value>=he&&Hn.value<=le).map((Hn,Jn)=>{const bl=AE(Hn.value,he,le),xl=ze[Ye].offset(bl);let ao;return Qe===!1?ao=Ae.indexOf(Hn.value)!==-1:ao=Qe==="normal"&&(Ne?Hn.value>=Ae[0]&&Hn.value<=Ae[Ae.length-1]:Hn.value<=Ae[0])||Qe==="inverted"&&(Ne?Hn.value<=Ae[0]||Hn.value>=Ae[Ae.length-1]:Hn.value>=Ae[0]),C.jsxs(I.Fragment,{children:[C.jsx(Mr,$({"data-index":Jn},ns,!zl(Mr)&&{markActive:ao},{style:$({},xl,ns.style),className:Fe(ns.className,ao&&Ue.markActive)})),Hn.label!=null?C.jsx(Fr,$({"aria-hidden":!0,"data-index":Jn},wa,!zl(Fr)&&{markLabelActive:ao},{style:$({},xl,wa.style),className:Fe(Ue.markLabel,wa.className,ao&&Ue.markLabelActive),children:Hn.label})):null]},Jn)}),Ae.map((Hn,Jn)=>{const bl=AE(Hn,he,le),xl=ze[Ye].offset(bl),ao=qe==="off"?j0e:Or;return C.jsx(ao,$({},!zl(ao)&&{valueLabelFormat:at,valueLabelDisplay:qe,value:typeof at=="function"?at(xe(Hn),Jn):at,index:Jn,open:_e===Jn||je===Jn||qe==="on",disabled:ue},lf,{children:C.jsx($r,$({"data-index":Jn},ts,{className:Fe(Ue.thumb,ts.className,je===Jn&&Ue.active,$e===Jn&&Ue.focusVisible),style:$({},xl,Re(Jn),ts.style),children:C.jsx(Jr,$({"data-index":Jn,"aria-label":se?se(Jn):D,"aria-valuenow":xe(Hn),"aria-labelledby":j,"aria-valuetext":Q?Q(xe(Hn),Jn):F,value:Ae[Jn]},Fu))}))}),Jn)})]}))}),H0e=U0e;function W0e(e){return _t("MuiSnackbarContent",e)}Ct("MuiSnackbarContent",["root","message","action"]);const G0e=["action","className","message","role"],V0e=e=>{const{classes:t}=e;return Et({root:["root"],action:["action"],message:["message"]},W0e,t)},q0e=Ee(Zg,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=nle(e.palette.background.default,t);return $({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),X0e=Ee("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),Y0e=Ee("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),K0e=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:l="alert"}=r,c=Le(r,G0e),d=r,f=V0e(d);return C.jsxs(q0e,$({role:l,square:!0,elevation:6,className:Fe(f.root,o),ownerState:d,ref:n},c,{children:[C.jsx(X0e,{className:f.message,ownerState:d,children:s}),i?C.jsx(Y0e,{className:f.action,ownerState:d,children:i}):null]}))}),Q0e=K0e;function J0e(e){return _t("MuiSnackbar",e)}Ct("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const Z0e=["onEnter","onExited"],ebe=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],tbe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Me(n.vertical)}${Me(n.horizontal)}`]};return Et(r,J0e,t)},D8=Ee("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Me(n.anchorOrigin.vertical)}${Me(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return $({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:$({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),nbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSnackbar"}),i=In(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:l,horizontal:c}={vertical:"bottom",horizontal:"left"},autoHideDuration:d=null,children:f,className:h,ClickAwayListenerProps:p,ContentProps:g,disableWindowBlurListener:v=!1,message:y,open:S,TransitionComponent:_=IE,transitionDuration:b=o,TransitionProps:{onEnter:x,onExited:E}={}}=r,A=Le(r.TransitionProps,Z0e),R=Le(r,ebe),k=$({},r,{anchorOrigin:{vertical:l,horizontal:c},autoHideDuration:d,disableWindowBlurListener:v,TransitionComponent:_,transitionDuration:b}),O=tbe(k),{getRootProps:L,onClickAway:N}=epe($({},k)),[H,W]=I.useState(!0),z=Wr({elementType:D8,getSlotProps:L,externalForwardedProps:R,ownerState:k,additionalProps:{ref:n},className:[O.root,h]}),D=j=>{W(!0),E&&E(j)},F=(j,V)=>{W(!1),x&&x(j,V)};return!S&&H?null:C.jsx(pfe,$({onClickAway:N},p,{children:C.jsx(D8,$({},z,{children:C.jsx(_,$({appear:!0,in:S,timeout:b,direction:l==="top"?"down":"up",onEnter:F,onExited:D},A,{children:f||C.jsx(Q0e,$({message:y,action:s},g))}))}))}))}),rbe=nbe;function ibe(e){return _t("MuiTooltip",e)}const obe=Ct("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),dd=obe,sbe=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function abe(e){return Math.round(e*1e5)/1e5}const lbe=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${Me(o.split("-")[0])}`],arrow:["arrow"]};return Et(s,ibe,t)},cbe=Ee(EK,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>$({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${dd.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${dd.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${dd.arrow}`]:$({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${dd.arrow}`]:$({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),ube=Ee("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Me(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>$({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:_n(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${abe(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${dd.popper}[data-popper-placement*="left"] &`]:$({transformOrigin:"right center"},t.isRtl?$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):$({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${dd.popper}[data-popper-placement*="right"] &`]:$({transformOrigin:"left center"},t.isRtl?$({marginRight:"14px"},t.touch&&{marginRight:"24px"}):$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${dd.popper}[data-popper-placement*="top"] &`]:$({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${dd.popper}[data-popper-placement*="bottom"] &`]:$({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),dbe=Ee("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:_n(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Qw=!1,eL=null,ub={x:0,y:0};function Jw(e,t){return n=>{t&&t(n),e(n)}}const fbe=I.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,A;const R=Tt({props:t,name:"MuiTooltip"}),{arrow:k=!1,children:O,components:L={},componentsProps:N={},describeChild:H=!1,disableFocusListener:W=!1,disableHoverListener:z=!1,disableInteractive:D=!1,disableTouchListener:F=!1,enterDelay:j=100,enterNextDelay:V=0,enterTouchDelay:G=700,followCursor:K=!1,id:Y,leaveDelay:J=0,leaveTouchDelay:ie=1500,onClose:ce,onOpen:ue,open:se,placement:Q="bottom",PopperComponent:ae,PopperProps:le={},slotProps:he={},slots:pe={},title:ve,TransitionComponent:ye=IE,TransitionProps:xe}=R,me=Le(R,sbe),be=I.isValidElement(O)?O:C.jsx("span",{children:O}),Qe=In(),qe=Qe.direction==="rtl",[at,Lt]=I.useState(),[Ie,ze]=I.useState(null),it=I.useRef(!1),pt=D||K,mt=I.useRef(),_e=I.useRef(),je=I.useRef(),Ye=I.useRef(),[$e,Ne]=Ix({controlled:se,default:!1,name:"Tooltip",state:"open"});let Rt=$e;const ct=b5(Y),Ae=I.useRef(),ot=I.useCallback(()=>{Ae.current!==void 0&&(document.body.style.WebkitUserSelect=Ae.current,Ae.current=void 0),clearTimeout(Ye.current)},[]);I.useEffect(()=>()=>{clearTimeout(mt.current),clearTimeout(_e.current),clearTimeout(je.current),ot()},[ot]);const $t=Qt=>{clearTimeout(eL),Qw=!0,Ne(!0),ue&&!Rt&&ue(Qt)},Re=eo(Qt=>{clearTimeout(eL),eL=setTimeout(()=>{Qw=!1},800+J),Ne(!1),ce&&Rt&&ce(Qt),clearTimeout(mt.current),mt.current=setTimeout(()=>{it.current=!1},Qe.transitions.duration.shortest)}),Ue=Qt=>{it.current&&Qt.type!=="touchstart"||(at&&at.removeAttribute("title"),clearTimeout(_e.current),clearTimeout(je.current),j||Qw&&V?_e.current=setTimeout(()=>{$t(Qt)},Qw?V:j):$t(Qt))},yt=Qt=>{clearTimeout(_e.current),clearTimeout(je.current),je.current=setTimeout(()=>{Re(Qt)},J)},{isFocusVisibleRef:Wt,onBlur:pn,onFocus:$r,ref:Or}=x5(),[,Mr]=I.useState(!1),Fr=Qt=>{pn(Qt),Wt.current===!1&&(Mr(!1),yt(Qt))},Jr=Qt=>{at||Lt(Qt.currentTarget),$r(Qt),Wt.current===!0&&(Mr(!0),Ue(Qt))},Zo=Qt=>{it.current=!0;const vr=be.props;vr.onTouchStart&&vr.onTouchStart(Qt)},$u=Ue,Gs=yt,ac=Qt=>{Zo(Qt),clearTimeout(je.current),clearTimeout(mt.current),ot(),Ae.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ye.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ae.current,Ue(Qt)},G)},lc=Qt=>{be.props.onTouchEnd&&be.props.onTouchEnd(Qt),ot(),clearTimeout(je.current),je.current=setTimeout(()=>{Re(Qt)},ie)};I.useEffect(()=>{if(!Rt)return;function Qt(vr){(vr.key==="Escape"||vr.key==="Esc")&&Re(vr)}return document.addEventListener("keydown",Qt),()=>{document.removeEventListener("keydown",Qt)}},[Re,Rt]);const sf=mr(be.ref,Or,Lt,n);!ve&&ve!==0&&(Rt=!1);const es=I.useRef(),af=Qt=>{const vr=be.props;vr.onMouseMove&&vr.onMouseMove(Qt),ub={x:Qt.clientX,y:Qt.clientY},es.current&&es.current.update()},so={},cc=typeof ve=="string";H?(so.title=!Rt&&cc&&!z?ve:null,so["aria-describedby"]=Rt?ct:null):(so["aria-label"]=cc?ve:null,so["aria-labelledby"]=Rt&&!cc?ct:null);const Si=$({},so,me,be.props,{className:Fe(me.className,be.props.className),onTouchStart:Zo,ref:sf},K?{onMouseMove:af}:{}),ts={};F||(Si.onTouchStart=ac,Si.onTouchEnd=lc),z||(Si.onMouseOver=Jw($u,Si.onMouseOver),Si.onMouseLeave=Jw(Gs,Si.onMouseLeave),pt||(ts.onMouseOver=$u,ts.onMouseLeave=Gs)),W||(Si.onFocus=Jw(Jr,Si.onFocus),Si.onBlur=Jw(Fr,Si.onBlur),pt||(ts.onFocus=Jr,ts.onBlur=Fr));const lf=I.useMemo(()=>{var Qt;let vr=[{name:"arrow",enabled:!!Ie,options:{element:Ie,padding:4}}];return(Qt=le.popperOptions)!=null&&Qt.modifiers&&(vr=vr.concat(le.popperOptions.modifiers)),$({},le.popperOptions,{modifiers:vr})},[Ie,le]),ns=$({},R,{isRtl:qe,arrow:k,disableInteractive:pt,placement:Q,PopperComponentProp:ae,touch:it.current}),wa=lbe(ns),Fu=(r=(i=pe.popper)!=null?i:L.Popper)!=null?r:cbe,Hn=(o=(s=(l=pe.transition)!=null?l:L.Transition)!=null?s:ye)!=null?o:IE,Jn=(c=(d=pe.tooltip)!=null?d:L.Tooltip)!=null?c:ube,bl=(f=(h=pe.arrow)!=null?h:L.Arrow)!=null?f:dbe,xl=Bb(Fu,$({},le,(p=he.popper)!=null?p:N.popper,{className:Fe(wa.popper,le==null?void 0:le.className,(g=(v=he.popper)!=null?v:N.popper)==null?void 0:g.className)}),ns),ao=Bb(Hn,$({},xe,(y=he.transition)!=null?y:N.transition),ns),xv=Bb(Jn,$({},(S=he.tooltip)!=null?S:N.tooltip,{className:Fe(wa.tooltip,(_=(b=he.tooltip)!=null?b:N.tooltip)==null?void 0:_.className)}),ns),wv=Bb(bl,$({},(x=he.arrow)!=null?x:N.arrow,{className:Fe(wa.arrow,(E=(A=he.arrow)!=null?A:N.arrow)==null?void 0:E.className)}),ns);return C.jsxs(I.Fragment,{children:[I.cloneElement(be,Si),C.jsx(Fu,$({as:ae??EK,placement:Q,anchorEl:K?{getBoundingClientRect:()=>({top:ub.y,left:ub.x,right:ub.x,bottom:ub.y,width:0,height:0})}:at,popperRef:es,open:at?Rt:!1,id:ct,transition:!0},ts,xl,{popperOptions:lf,children:({TransitionProps:Qt})=>C.jsx(Hn,$({timeout:Qe.transitions.duration.shorter},Qt,ao,{children:C.jsxs(Jn,$({},xv,{children:[ve,k?C.jsx(bl,$({},wv,{ref:ze})):null]}))}))}))]})}),Kd=fbe;function hbe(e){return _t("MuiSwitch",e)}const pbe=Ct("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),wo=pbe,mbe=["className","color","edge","size","sx"],gbe=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,l={root:["root",n&&`edge${Me(n)}`,`size${Me(r)}`],switchBase:["switchBase",`color${Me(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=Et(l,hbe,t);return $({},t,c)},vbe=Ee("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Me(n.edge)}`],t[`size${Me(n.size)}`]]}})(({ownerState:e})=>$({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},e.edge==="start"&&{marginLeft:-8},e.edge==="end"&&{marginRight:-8},e.size==="small"&&{width:40,height:24,padding:7,[`& .${wo.thumb}`]:{width:16,height:16},[`& .${wo.switchBase}`]:{padding:4,[`&.${wo.checked}`]:{transform:"translateX(16px)"}}})),ybe=Ee(RK,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${wo.input}`]:t.input},n.color!=="default"&&t[`color${Me(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${wo.checked}`]:{transform:"translateX(20px)"},[`&.${wo.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${wo.checked} + .${wo.track}`]:{opacity:.5},[`&.${wo.disabled} + .${wo.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${wo.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>$({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${wo.checked}`]:{color:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${wo.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?Yg(e.palette[t.color].main,.62):Xg(e.palette[t.color].main,.55)}`}},[`&.${wo.checked} + .${wo.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),bbe=Ee("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),xbe=Ee("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),wbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:l="medium",sx:c}=r,d=Le(r,mbe),f=$({},r,{color:o,edge:s,size:l}),h=gbe(f),p=C.jsx(xbe,{className:h.thumb,ownerState:f});return C.jsxs(vbe,{className:Fe(h.root,i),sx:c,ownerState:f,children:[C.jsx(ybe,$({type:"checkbox",icon:p,checkedIcon:p,ref:n,ownerState:f},d,{classes:$({},h,{root:h.switchBase})})),C.jsx(bbe,{className:h.track,ownerState:f})]})}),Tg=wbe;function _be(e){return _t("MuiTab",e)}const Sbe=Ct("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),xh=Sbe,Ebe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Cbe=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:l,disabled:c}=e,d={root:["root",o&&s&&"labelIcon",`textColor${Me(n)}`,r&&"fullWidth",i&&"wrapped",l&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return Et(d,_be,t)},Tbe=Ee(Ou,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Me(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>$({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${xh.iconWrapper}`]:$({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${xh.selected}`]:{opacity:1},[`&.${xh.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${xh.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${xh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${xh.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${xh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),kbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:l,icon:c,iconPosition:d="top",indicator:f,label:h,onChange:p,onClick:g,onFocus:v,selected:y,selectionFollowsFocus:S,textColor:_="inherit",value:b,wrapped:x=!1}=r,E=Le(r,Ebe),A=$({},r,{disabled:o,disableFocusRipple:s,selected:y,icon:!!c,iconPosition:d,label:!!h,fullWidth:l,textColor:_,wrapped:x}),R=Cbe(A),k=c&&h&&I.isValidElement(c)?I.cloneElement(c,{className:Fe(R.iconWrapper,c.props.className)}):c,O=N=>{!y&&p&&p(N,b),g&&g(N)},L=N=>{S&&!y&&p&&p(N,b),v&&v(N)};return C.jsxs(Tbe,$({focusRipple:!s,className:Fe(R.root,i),ref:n,role:"tab","aria-selected":y,disabled:o,onClick:O,onFocus:L,ownerState:A,tabIndex:y?0:-1},E,{children:[d==="top"||d==="start"?C.jsxs(I.Fragment,{children:[k,h]}):C.jsxs(I.Fragment,{children:[h,k]}),f]}))}),Mm=kbe;function Abe(e){return _t("MuiToolbar",e)}Ct("MuiToolbar",["root","gutters","regular","dense"]);const Rbe=["className","component","disableGutters","variant"],Ibe=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Et({root:["root",!n&&"gutters",r]},Abe,t)},Pbe=Ee("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),Obe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:l="regular"}=r,c=Le(r,Rbe),d=$({},r,{component:o,disableGutters:s,variant:l}),f=Ibe(d);return C.jsx(Pbe,$({as:o,className:Fe(f.root,i),ref:n,ownerState:d},c))}),Mbe=Obe,Dbe=Bt(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Lbe=Bt(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Nbe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Bbe(e,t,n,r={},i=()=>{}){const{ease:o=Nbe,duration:s=300}=r;let l=null;const c=t[e];let d=!1;const f=()=>{d=!0},h=p=>{if(d){i(new Error("Animation cancelled"));return}l===null&&(l=p);const g=Math.min(1,(p-l)/s);if(t[e]=o(g)*(n-c)+c,g>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(h)};return c===n?(i(new Error("Element already at target position")),f):(requestAnimationFrame(h),f)}const $be=["onChange"],Fbe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function zbe(e){const{onChange:t}=e,n=Le(e,$be),r=I.useRef(),i=I.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Ao(()=>{const s=XC(()=>{const c=r.current;o(),c!==r.current&&t(r.current)}),l=bu(i.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),I.useEffect(()=>{o(),t(r.current)},[t]),C.jsx("div",$({style:Fbe,ref:i},n))}function jbe(e){return _t("MuiTabScrollButton",e)}const Ube=Ct("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Hbe=Ube,Wbe=["className","slots","slotProps","direction","orientation","disabled"],Gbe=e=>{const{classes:t,orientation:n,disabled:r}=e;return Et({root:["root",n,r&&"disabled"]},jbe,t)},Vbe=Ee(Ou,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>$({width:40,flexShrink:0,opacity:.8,[`&.${Hbe.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),qbe=I.forwardRef(function(t,n){var r,i;const o=Tt({props:t,name:"MuiTabScrollButton"}),{className:s,slots:l={},slotProps:c={},direction:d}=o,f=Le(o,Wbe),p=In().direction==="rtl",g=$({isRtl:p},o),v=Gbe(g),y=(r=l.StartScrollButtonIcon)!=null?r:Dbe,S=(i=l.EndScrollButtonIcon)!=null?i:Lbe,_=Wr({elementType:y,externalSlotProps:c.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g}),b=Wr({elementType:S,externalSlotProps:c.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g});return C.jsx(Vbe,$({component:"div",className:Fe(v.root,s),ref:n,role:null,ownerState:g,tabIndex:null},f,{children:d==="left"?C.jsx(y,$({},_)):C.jsx(S,$({},b))}))}),Xbe=qbe;function Ybe(e){return _t("MuiTabs",e)}const Kbe=Ct("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),tL=Kbe,Qbe=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],L8=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,N8=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Zw=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const o=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||o)i=n(e,i);else{i.focus();return}}},Jbe=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:l,classes:c}=e;return Et({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Ybe,c)},Zbe=Ee("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${tL.scrollButtons}`]:t.scrollButtons},{[`& .${tL.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>$({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${tL.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),exe=Ee("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>$({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),txe=Ee("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>$({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),nxe=Ee("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>$({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),rxe=Ee(zbe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),B8={},ixe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTabs"}),i=In(),o=i.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:c,centered:d=!1,children:f,className:h,component:p="div",allowScrollButtonsMobile:g=!1,indicatorColor:v="primary",onChange:y,orientation:S="horizontal",ScrollButtonComponent:_=Xbe,scrollButtons:b="auto",selectionFollowsFocus:x,slots:E={},slotProps:A={},TabIndicatorProps:R={},TabScrollButtonProps:k={},textColor:O="primary",value:L,variant:N="standard",visibleScrollbar:H=!1}=r,W=Le(r,Qbe),z=N==="scrollable",D=S==="vertical",F=D?"scrollTop":"scrollLeft",j=D?"top":"left",V=D?"bottom":"right",G=D?"clientHeight":"clientWidth",K=D?"height":"width",Y=$({},r,{component:p,allowScrollButtonsMobile:g,indicatorColor:v,orientation:S,vertical:D,scrollButtons:b,textColor:O,variant:N,visibleScrollbar:H,fixed:!z,hideScrollbar:z&&!H,scrollableX:z&&!D,scrollableY:z&&D,centered:d&&!z,scrollButtonsHideMobile:!g}),J=Jbe(Y),ie=Wr({elementType:E.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:Y}),ce=Wr({elementType:E.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:Y}),[ue,se]=I.useState(!1),[Q,ae]=I.useState(B8),[le,he]=I.useState(!1),[pe,ve]=I.useState(!1),[ye,xe]=I.useState(!1),[me,be]=I.useState({overflow:"hidden",scrollbarWidth:0}),Qe=new Map,qe=I.useRef(null),at=I.useRef(null),Lt=()=>{const Re=qe.current;let Ue;if(Re){const Wt=Re.getBoundingClientRect();Ue={clientWidth:Re.clientWidth,scrollLeft:Re.scrollLeft,scrollTop:Re.scrollTop,scrollLeftNormalized:koe(Re,i.direction),scrollWidth:Re.scrollWidth,top:Wt.top,bottom:Wt.bottom,left:Wt.left,right:Wt.right}}let yt;if(Re&&L!==!1){const Wt=at.current.children;if(Wt.length>0){const pn=Wt[Qe.get(L)];yt=pn?pn.getBoundingClientRect():null}}return{tabsMeta:Ue,tabMeta:yt}},Ie=eo(()=>{const{tabsMeta:Re,tabMeta:Ue}=Lt();let yt=0,Wt;if(D)Wt="top",Ue&&Re&&(yt=Ue.top-Re.top+Re.scrollTop);else if(Wt=o?"right":"left",Ue&&Re){const $r=o?Re.scrollLeftNormalized+Re.clientWidth-Re.scrollWidth:Re.scrollLeft;yt=(o?-1:1)*(Ue[Wt]-Re[Wt]+$r)}const pn={[Wt]:yt,[K]:Ue?Ue[K]:0};if(isNaN(Q[Wt])||isNaN(Q[K]))ae(pn);else{const $r=Math.abs(Q[Wt]-pn[Wt]),Or=Math.abs(Q[K]-pn[K]);($r>=1||Or>=1)&&ae(pn)}}),ze=(Re,{animation:Ue=!0}={})=>{Ue?Bbe(F,qe.current,Re,{duration:i.transitions.duration.standard}):qe.current[F]=Re},it=Re=>{let Ue=qe.current[F];D?Ue+=Re:(Ue+=Re*(o?-1:1),Ue*=o&&kq()==="reverse"?-1:1),ze(Ue)},pt=()=>{const Re=qe.current[G];let Ue=0;const yt=Array.from(at.current.children);for(let Wt=0;WtRe){Wt===0&&(Ue=Re);break}Ue+=pn[G]}return Ue},mt=()=>{it(-1*pt())},_e=()=>{it(pt())},je=I.useCallback(Re=>{be({overflow:null,scrollbarWidth:Re})},[]),Ye=()=>{const Re={};Re.scrollbarSizeListener=z?C.jsx(rxe,{onChange:je,className:Fe(J.scrollableX,J.hideScrollbar)}):null;const yt=z&&(b==="auto"&&(le||pe)||b===!0);return Re.scrollButtonStart=yt?C.jsx(_,$({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:ie},orientation:S,direction:o?"right":"left",onClick:mt,disabled:!le},k,{className:Fe(J.scrollButtons,k.className)})):null,Re.scrollButtonEnd=yt?C.jsx(_,$({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ce},orientation:S,direction:o?"left":"right",onClick:_e,disabled:!pe},k,{className:Fe(J.scrollButtons,k.className)})):null,Re},$e=eo(Re=>{const{tabsMeta:Ue,tabMeta:yt}=Lt();if(!(!yt||!Ue)){if(yt[j]Ue[V]){const Wt=Ue[F]+(yt[V]-Ue[V]);ze(Wt,{animation:Re})}}}),Ne=eo(()=>{z&&b!==!1&&xe(!ye)});I.useEffect(()=>{const Re=XC(()=>{qe.current&&Ie()}),Ue=bu(qe.current);Ue.addEventListener("resize",Re);let yt;return typeof ResizeObserver<"u"&&(yt=new ResizeObserver(Re),Array.from(at.current.children).forEach(Wt=>{yt.observe(Wt)})),()=>{Re.clear(),Ue.removeEventListener("resize",Re),yt&&yt.disconnect()}},[Ie]),I.useEffect(()=>{const Re=Array.from(at.current.children),Ue=Re.length;if(typeof IntersectionObserver<"u"&&Ue>0&&z&&b!==!1){const yt=Re[0],Wt=Re[Ue-1],pn={root:qe.current,threshold:.99},$r=Jr=>{he(!Jr[0].isIntersecting)},Or=new IntersectionObserver($r,pn);Or.observe(yt);const Mr=Jr=>{ve(!Jr[0].isIntersecting)},Fr=new IntersectionObserver(Mr,pn);return Fr.observe(Wt),()=>{Or.disconnect(),Fr.disconnect()}}},[z,b,ye,f==null?void 0:f.length]),I.useEffect(()=>{se(!0)},[]),I.useEffect(()=>{Ie()}),I.useEffect(()=>{$e(B8!==Q)},[$e,Q]),I.useImperativeHandle(c,()=>({updateIndicator:Ie,updateScrollButtons:Ne}),[Ie,Ne]);const Rt=C.jsx(nxe,$({},R,{className:Fe(J.indicator,R.className),ownerState:Y,style:$({},Q,R.style)}));let ct=0;const Ae=I.Children.map(f,Re=>{if(!I.isValidElement(Re))return null;const Ue=Re.props.value===void 0?ct:Re.props.value;Qe.set(Ue,ct);const yt=Ue===L;return ct+=1,I.cloneElement(Re,$({fullWidth:N==="fullWidth",indicator:yt&&!ue&&Rt,selected:yt,selectionFollowsFocus:x,onChange:y,textColor:O,value:Ue},ct===1&&L===!1&&!Re.props.tabIndex?{tabIndex:0}:{}))}),ot=Re=>{const Ue=at.current,yt=Ar(Ue).activeElement;if(yt.getAttribute("role")!=="tab")return;let pn=S==="horizontal"?"ArrowLeft":"ArrowUp",$r=S==="horizontal"?"ArrowRight":"ArrowDown";switch(S==="horizontal"&&o&&(pn="ArrowRight",$r="ArrowLeft"),Re.key){case pn:Re.preventDefault(),Zw(Ue,yt,N8);break;case $r:Re.preventDefault(),Zw(Ue,yt,L8);break;case"Home":Re.preventDefault(),Zw(Ue,null,L8);break;case"End":Re.preventDefault(),Zw(Ue,null,N8);break}},$t=Ye();return C.jsxs(Zbe,$({className:Fe(J.root,h),ownerState:Y,ref:n,as:p},W,{children:[$t.scrollButtonStart,$t.scrollbarSizeListener,C.jsxs(exe,{className:J.scroller,ownerState:Y,style:{overflow:me.overflow,[D?`margin${o?"Left":"Right"}`:"marginBottom"]:H?void 0:-me.scrollbarWidth},ref:qe,children:[C.jsx(txe,{"aria-label":s,"aria-labelledby":l,"aria-orientation":S==="vertical"?"vertical":null,className:J.flexContainer,ownerState:Y,onKeyDown:ot,ref:at,role:"tablist",children:Ae}),ue&&Rt]}),$t.scrollButtonEnd]}))}),oxe=ixe;function sxe(e){return _t("MuiTextField",e)}Ct("MuiTextField",["root"]);const axe=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],lxe={standard:BK,filled:MK,outlined:WK},cxe=e=>{const{classes:t}=e;return Et({root:["root"]},sxe,t)},uxe=Ee(_ge,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),dxe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:l,color:c="primary",defaultValue:d,disabled:f=!1,error:h=!1,FormHelperTextProps:p,fullWidth:g=!1,helperText:v,id:y,InputLabelProps:S,inputProps:_,InputProps:b,inputRef:x,label:E,maxRows:A,minRows:R,multiline:k=!1,name:O,onBlur:L,onChange:N,onFocus:H,placeholder:W,required:z=!1,rows:D,select:F=!1,SelectProps:j,type:V,value:G,variant:K="outlined"}=r,Y=Le(r,axe),J=$({},r,{autoFocus:o,color:c,disabled:f,error:h,fullWidth:g,multiline:k,required:z,select:F,variant:K}),ie=cxe(J),ce={};K==="outlined"&&(S&&typeof S.shrink<"u"&&(ce.notched=S.shrink),ce.label=E),F&&((!j||!j.native)&&(ce.id=void 0),ce["aria-describedby"]=void 0);const ue=b5(y),se=v&&ue?`${ue}-helper-text`:void 0,Q=E&&ue?`${ue}-label`:void 0,ae=lxe[K],le=C.jsx(ae,$({"aria-describedby":se,autoComplete:i,autoFocus:o,defaultValue:d,fullWidth:g,multiline:k,name:O,rows:D,maxRows:A,minRows:R,type:V,value:G,id:ue,inputRef:x,onBlur:L,onChange:N,onFocus:H,placeholder:W,inputProps:_},ce,b));return C.jsxs(uxe,$({className:Fe(ie.root,l),disabled:f,error:h,fullWidth:g,ref:n,required:z,color:c,variant:K,ownerState:J},Y,{children:[E!=null&&E!==""&&C.jsx(ave,$({htmlFor:ue,id:Q},S,{children:E})),F?C.jsx(v0e,$({"aria-describedby":se,id:ue,labelId:Q,value:G,input:le},j,{children:s})):le,v&&C.jsx($ge,$({id:se},p,{children:v}))]}))}),X1=dxe;function bn({vertical:e,...t}){return C.jsx(dt,{position:"relative",height:"100%",width:"100%",display:"flex",flexDirection:e?"column":"row",...t})}const VK=Bt(C.jsx("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z"}),"AccountTreeOutlined"),fxe=Bt(C.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),hxe=Bt(C.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),pxe=Bt(C.jsx("path",{d:"M6 7c0 .55.45 1 1 1h7.59l-8.88 8.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L16 9.41V17c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1z"}),"ArrowOutwardRounded"),mxe=Bt(C.jsx("path",{d:"M10 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM7 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-3-3c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3-6c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-1.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm3 6c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-4c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm2-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-3.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"}),"BlurCircularOutlined"),gxe=Bt(C.jsx("path",{d:"M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"}),"BlurOnOutlined"),vxe=Bt(C.jsx("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-4 4v3c0 .22-.03.47-.07.7l-.1.65-.37.65c-.72 1.24-2.04 2-3.46 2s-2.74-.77-3.46-2l-.37-.64-.1-.65C8.03 15.48 8 15.23 8 15v-4c0-.23.03-.48.07-.7l.1-.65.37-.65c.3-.52.72-.97 1.21-1.31l.57-.39.74-.18c.31-.08.63-.12.94-.12.32 0 .63.04.95.12l.68.16.61.42c.5.34.91.78 1.21 1.31l.38.65.1.65c.04.22.07.47.07.69v1zm-6 2h4v2h-4zm0-4h4v2h-4z"}),"BugReportOutlined"),yxe=Bt(C.jsx("path",{d:"M17 12c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5 5-2.24 5-5zm-5 3c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm-7 0H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z"}),"CenterFocusStrongOutlined"),bxe=Bt(C.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightOutlined"),xxe=Bt(C.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}),"ClearOutlined"),qK=Bt(C.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}),"CloseOutlined"),wxe=Bt(C.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"}),"CodeOutlined"),_xe=Bt(C.jsx("path",{d:"M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm2 10H3v4c0 1.1.9 2 2 2h4v-2H5v-4zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2z"}),"CropFreeOutlined"),Sxe=Bt(C.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}),"DragHandleOutlined"),ok=Bt(C.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"}),"EditOutlined"),Exe=Bt(C.jsx("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),XK=Bt(C.jsx("path",{d:"M15 22H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h8l6 6v6h-2V9h-5V4H6v16h9v2zm4-.34v-2.24l2.95 2.95 1.41-1.41L20.41 18h2.24v-2H17v5.66h2z"}),"FileOpenOutlined"),Cxe=Bt(C.jsx("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub"),Txe=Bt(C.jsx("path",{d:"M2.81 2.81 1.39 4.22l2.27 2.27C2.61 8.07 2 9.96 2 12c0 5.52 4.48 10 10 10 2.04 0 3.93-.61 5.51-1.66l2.27 2.27 1.41-1.41L2.81 2.81zM12 20c-4.41 0-8-3.59-8-8 0-1.48.41-2.86 1.12-4.06l10.94 10.94C14.86 19.59 13.48 20 12 20zM7.94 5.12 6.49 3.66C8.07 2.61 9.96 2 12 2c5.52 0 10 4.48 10 10 0 2.04-.61 3.93-1.66 5.51l-1.46-1.46C19.59 14.86 20 13.48 20 12c0-4.41-3.59-8-8-8-1.48 0-2.86.41-4.06 1.12z"}),"HideSourceOutlined"),kxe=Bt(C.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined"),Axe=Bt(C.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined"),Rxe=Bt(C.jsx("path",{d:"M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16zM16 17H5V7h11l3.55 5L16 17z"}),"LabelOutlined"),tv=Bt(C.jsx("path",{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16zm0-11.47L17.74 9 12 13.47 6.26 9 12 4.53z"}),"LayersOutlined"),YK=Bt(C.jsx("path",{d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7zm-4 6h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"}),"ListOutlined"),Ixe=Bt(C.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVertOutlined"),Pxe=Bt(C.jsx("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),"PauseOutlined"),Oxe=Bt(C.jsx("path",{d:"M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z"}),"PlaceOutlined"),Mxe=Bt(C.jsx("path",{d:"M10 8.64 15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z"}),"PlayArrowOutlined"),KK=Bt(C.jsx("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"}),"ReplayOutlined"),Dxe=Bt(C.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"SearchOutlined"),Lxe=Bt(C.jsx("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}),"SettingsOutlined"),Nxe=Bt(C.jsx("path",{d:"m6 18 8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z"}),"SkipNextOutlined"),Bxe=Bt(C.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6l-8.5 6zm6.5 2.14L12.97 12 16 9.86v4.28z"}),"SkipPreviousOutlined"),TS=Bt(C.jsx("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortOutlined"),$xe=Bt(C.jsx("path",{d:"M16 8v8H8V8h8m2-2H6v12h12V6z"}),"StopOutlined"),Fxe=Bt(C.jsx("path",{d:"M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"}),"TripOriginOutlined"),$8=Bt(C.jsx("path",{d:"M19 13H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm0 6H5v-4h14v4zm0-16H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 6H5V5h14v4z"}),"ViewAgendaOutlined"),QK=Bt(C.jsx("path",{d:"M3 4c0-.55.45-1 1-1h2V1H4C2.34 1 1 2.34 1 4v2h2V4zm0 16v-2H1v2c0 1.66 1.34 3 3 3h2v-2H4c-.55 0-1-.45-1-1zM20 1h-2v2h2c.55 0 1 .45 1 1v2h2V4c0-1.66-1.34-3-3-3zm1 19c0 .55-.45 1-1 1h-2v2h2c1.66 0 3-1.34 3-3v-2h-2v2zm-2-5.13V9.13c0-.72-.38-1.38-1-1.73l-5-2.88c-.31-.18-.65-.27-1-.27s-.69.09-1 .27L6 7.39c-.62.36-1 1.02-1 1.74v5.74c0 .72.38 1.38 1 1.73l5 2.88c.31.18.65.27 1 .27s.69-.09 1-.27l5-2.88c.62-.35 1-1.01 1-1.73zm-8 2.3-4-2.3v-4.63l4 2.33v4.6zm1-6.33L8.04 8.53 12 6.25l3.96 2.28L12 10.84zm5 4.03-4 2.3v-4.6l4-2.33v4.63z"}),"ViewInArOutlined"),zxe=Bt(C.jsx("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"}),"VisibilityOutlined"),jxe=Bt(C.jsx("path",{d:"m16.66 4.52 2.83 2.83-2.83 2.83-2.83-2.83 2.83-2.83M9 5v4H5V5h4m10 10v4h-4v-4h4M9 15v4H5v-4h4m7.66-13.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65zM11 3H3v8h8V3zm10 10h-8v8h8v-8zm-10 0H3v8h8v-8z"}),"WidgetsOutlined"),V4=Bt(C.jsx("path",{d:"M6 15c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6-8c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2C9.8 3 8 4.8 8 7s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6 12c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z"}),"WorkspacesOutlined");var DE={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */DE.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,g=4,v=1,y=2,S=1,_=2,b=4,x=8,E=16,A=32,R=64,k=128,O=256,L=512,N=30,H="...",W=800,z=16,D=1,F=2,j=3,V=1/0,G=9007199254740991,K=17976931348623157e292,Y=0/0,J=4294967295,ie=J-1,ce=J>>>1,ue=[["ary",k],["bind",S],["bindKey",_],["curry",x],["curryRight",E],["flip",L],["partial",A],["partialRight",R],["rearg",O]],se="[object Arguments]",Q="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",me="[object Map]",be="[object Number]",Qe="[object Null]",qe="[object Object]",at="[object Promise]",Lt="[object Proxy]",Ie="[object RegExp]",ze="[object Set]",it="[object String]",pt="[object Symbol]",mt="[object Undefined]",_e="[object WeakMap]",je="[object WeakSet]",Ye="[object ArrayBuffer]",$e="[object DataView]",Ne="[object Float32Array]",Rt="[object Float64Array]",ct="[object Int8Array]",Ae="[object Int16Array]",ot="[object Int32Array]",$t="[object Uint8Array]",Re="[object Uint8ClampedArray]",Ue="[object Uint16Array]",yt="[object Uint32Array]",Wt=/\b__p \+= '';/g,pn=/\b(__p \+=) '' \+/g,$r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Or=/&(?:amp|lt|gt|quot|#39);/g,Mr=/[&<>"']/g,Fr=RegExp(Or.source),Jr=RegExp(Mr.source),Zo=/<%-([\s\S]+?)%>/g,$u=/<%([\s\S]+?)%>/g,Gs=/<%=([\s\S]+?)%>/g,ac=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lc=/^\w*$/,sf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,es=/[\\^$.*+?()[\]{}|]/g,af=RegExp(es.source),oo=/^\s+/,cc=/\s/,Si=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ts=/\{\n\/\* \[wrapped with (.+)\] \*/,lf=/,? & /,ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wa=/[()=,{}\[\]\/\s]/,Fu=/\\(\\)?/g,Hn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jn=/\w*$/,bl=/^[-+]0x[0-9a-f]+$/i,xl=/^0b[01]+$/i,so=/^\[object .+?Constructor\]$/,xv=/^0o[0-7]+$/i,wv=/^(?:0|[1-9]\d*)$/,Qt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,aA=/['\n\r\u2028\u2029\\]/g,uc="\\ud800-\\udfff",lA="\\u0300-\\u036f",cA="\\ufe20-\\ufe2f",uA="\\u20d0-\\u20ff",_v=lA+cA+uA,Sv="\\u2700-\\u27bf",Ev="a-z\\xdf-\\xf6\\xf8-\\xff",dA="\\xac\\xb1\\xd7\\xf7",fA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hA="\\u2000-\\u206f",pA=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Cv="A-Z\\xc0-\\xd6\\xd8-\\xde",Tv="\\ufe0e\\ufe0f",kv=dA+fA+hA+pA,cf="['’]",mA="["+uc+"]",Av="["+kv+"]",dc="["+_v+"]",Rv="\\d+",gA="["+Sv+"]",Iv="["+Ev+"]",Pv="[^"+uc+kv+Rv+Sv+Ev+Cv+"]",uf="\\ud83c[\\udffb-\\udfff]",vA="(?:"+dc+"|"+uf+")",Ov="[^"+uc+"]",df="(?:\\ud83c[\\udde6-\\uddff]){2}",ff="[\\ud800-\\udbff][\\udc00-\\udfff]",rs="["+Cv+"]",Mv="\\u200d",Dv="(?:"+Iv+"|"+Pv+")",yA="(?:"+rs+"|"+Pv+")",Lv="(?:"+cf+"(?:d|ll|m|re|s|t|ve))?",Nv="(?:"+cf+"(?:D|LL|M|RE|S|T|VE))?",Bv=vA+"?",$v="["+Tv+"]?",bA="(?:"+Mv+"(?:"+[Ov,df,ff].join("|")+")"+$v+Bv+")*",xA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fv=$v+Bv+bA,_A="(?:"+[gA,df,ff].join("|")+")"+Fv,SA="(?:"+[Ov+dc+"?",dc,df,ff,mA].join("|")+")",EA=RegExp(cf,"g"),CA=RegExp(dc,"g"),hf=RegExp(uf+"(?="+uf+")|"+SA+Fv,"g"),TA=RegExp([rs+"?"+Iv+"+"+Lv+"(?="+[Av,rs,"$"].join("|")+")",yA+"+"+Nv+"(?="+[Av,rs+Dv,"$"].join("|")+")",rs+"?"+Dv+"+"+Lv,rs+"+"+Nv,wA,xA,Rv,_A].join("|"),"g"),kA=RegExp("["+Mv+uc+_v+Tv+"]"),AA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,RA=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],IA=-1,Pt={};Pt[Ne]=Pt[Rt]=Pt[ct]=Pt[Ae]=Pt[ot]=Pt[$t]=Pt[Re]=Pt[Ue]=Pt[yt]=!0,Pt[se]=Pt[Q]=Pt[Ye]=Pt[le]=Pt[$e]=Pt[he]=Pt[ve]=Pt[ye]=Pt[me]=Pt[be]=Pt[qe]=Pt[Ie]=Pt[ze]=Pt[it]=Pt[_e]=!1;var kt={};kt[se]=kt[Q]=kt[Ye]=kt[$e]=kt[le]=kt[he]=kt[Ne]=kt[Rt]=kt[ct]=kt[Ae]=kt[ot]=kt[me]=kt[be]=kt[qe]=kt[Ie]=kt[ze]=kt[it]=kt[pt]=kt[$t]=kt[Re]=kt[Ue]=kt[yt]=!0,kt[ve]=kt[ye]=kt[_e]=!1;var PA={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},OA={"&":"&","<":"<",">":">",'"':""","'":"'"},MA={"&":"&","<":"<",">":">",""":'"',"'":"'"},DA={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},LA=parseFloat,NA=parseInt,zv=typeof Nt=="object"&&Nt&&Nt.Object===Object&&Nt,BA=typeof self=="object"&&self&&self.Object===Object&&self,dn=zv||BA||Function("return this")(),pf=t&&!t.nodeType&&t,ao=pf&&!0&&e&&!e.nodeType&&e,jv=ao&&ao.exports===pf,mf=jv&&zv.process,tr=function(){try{var q=ao&&ao.require&&ao.require("util").types;return q||mf&&mf.binding&&mf.binding("util")}catch{}}(),Uv=tr&&tr.isArrayBuffer,Hv=tr&&tr.isDate,Wv=tr&&tr.isMap,Gv=tr&&tr.isRegExp,Vv=tr&&tr.isSet,qv=tr&&tr.isTypedArray;function Wn(q,te,Z){switch(Z.length){case 0:return q.call(te);case 1:return q.call(te,Z[0]);case 2:return q.call(te,Z[0],Z[1]);case 3:return q.call(te,Z[0],Z[1],Z[2])}return q.apply(te,Z)}function $A(q,te,Z,ge){for(var De=-1,ut=q==null?0:q.length;++De-1}function gf(q,te,Z){for(var ge=-1,De=q==null?0:q.length;++ge-1;);return Z}function ty(q,te){for(var Z=q.length;Z--&&is(te,q[Z],0)>-1;);return Z}function qA(q,te){for(var Z=q.length,ge=0;Z--;)q[Z]===te&&++ge;return ge}var XA=xf(PA),YA=xf(OA);function KA(q){return"\\"+DA[q]}function QA(q,te){return q==null?n:q[te]}function os(q){return kA.test(q)}function JA(q){return AA.test(q)}function ZA(q){for(var te,Z=[];!(te=q.next()).done;)Z.push(te.value);return Z}function Ef(q){var te=-1,Z=Array(q.size);return q.forEach(function(ge,De){Z[++te]=[De,ge]}),Z}function ny(q,te){return function(Z){return q(te(Z))}}function Ti(q,te){for(var Z=-1,ge=q.length,De=0,ut=[];++Z-1}function zR(a,u){var m=this.__data__,w=Rc(m,a);return w<0?(++this.size,m.push([a,u])):m[w][1]=u,this}Zr.prototype.clear=NR,Zr.prototype.delete=BR,Zr.prototype.get=$R,Zr.prototype.has=FR,Zr.prototype.set=zR;function ei(a){var u=-1,m=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function or(a,u,m,w,T,M){var B,U=u&h,X=u&p,ne=u&g;if(m&&(B=T?m(a,w,T,M):m(a)),B!==n)return B;if(!Ft(a))return a;var re=Be(a);if(re){if(B=WI(a),!U)return On(a,B)}else{var oe=vn(a),fe=oe==ye||oe==xe;if(Oi(a))return $y(a,U);if(oe==qe||oe==se||fe&&!T){if(B=X||fe?{}:r0(a),!U)return X?MI(a,nI(B,a)):OI(a,py(B,a))}else{if(!kt[oe])return T?a:{};B=GI(a,oe,U)}}M||(M=new br);var we=M.get(a);if(we)return we;M.set(a,B),O0(a)?a.forEach(function(ke){B.add(or(ke,u,m,ke,a,M))}):I0(a)&&a.forEach(function(ke,Ke){B.set(Ke,or(ke,u,m,Ke,a,M))});var Te=ne?X?Kf:Yf:X?Dn:nn,Ve=re?n:Te(a);return nr(Ve||a,function(ke,Ke){Ve&&(Ke=ke,ke=a[Ke]),Aa(B,Ke,or(ke,u,m,Ke,a,M))}),B}function rI(a){var u=nn(a);return function(m){return my(m,a,u)}}function my(a,u,m){var w=m.length;if(a==null)return!w;for(a=wt(a);w--;){var T=m[w],M=u[T],B=a[T];if(B===n&&!(T in a)||!M(B))return!1}return!0}function gy(a,u,m){if(typeof a!="function")throw new rr(s);return La(function(){a.apply(n,m)},u)}function Ra(a,u,m,w){var T=-1,M=fc,B=!0,U=a.length,X=[],ne=u.length;if(!U)return X;m&&(u=Dt(u,Gn(m))),w?(M=gf,B=!1):u.length>=i&&(M=_a,B=!1,u=new uo(u));e:for(;++TT?0:T+m),w=w===n||w>T?T:We(w),w<0&&(w+=T),w=m>w?0:D0(w);m0&&m(U)?u>1?fn(U,u-1,m,w,T):Ci(T,U):w||(T[T.length]=U)}return T}var Pf=Wy(),by=Wy(!0);function zr(a,u){return a&&Pf(a,u,nn)}function Of(a,u){return a&&by(a,u,nn)}function Pc(a,u){return Ei(u,function(m){return oi(a[m])})}function ho(a,u){u=Ii(u,a);for(var m=0,w=u.length;a!=null&&mu}function sI(a,u){return a!=null&&vt.call(a,u)}function aI(a,u){return a!=null&&u in wt(a)}function lI(a,u,m){return a>=gn(u,m)&&a=120&&re.length>=120)?new uo(B&&re):n}re=a[0];var oe=-1,fe=U[0];e:for(;++oe-1;)U!==a&&_c.call(U,X,1),_c.call(a,X,1);return a}function Iy(a,u){for(var m=a?u.length:0,w=m-1;m--;){var T=u[m];if(m==w||T!==M){var M=T;ii(T)?_c.call(a,T,1):Uf(a,T)}}return a}function Ff(a,u){return a+Cc(uy()*(u-a+1))}function wI(a,u,m,w){for(var T=-1,M=Zt(Ec((u-a)/(m||1)),0),B=Z(M);M--;)B[w?M:++T]=a,a+=m;return B}function zf(a,u){var m="";if(!a||u<1||u>G)return m;do u%2&&(m+=a),u=Cc(u/2),u&&(a+=a);while(u);return m}function Xe(a,u){return rh(s0(a,u,Ln),a+"")}function _I(a){return hy(gs(a))}function SI(a,u){var m=gs(a);return Uc(m,fo(u,0,m.length))}function Oa(a,u,m,w){if(!Ft(a))return a;u=Ii(u,a);for(var T=-1,M=u.length,B=M-1,U=a;U!=null&&++TT?0:T+u),m=m>T?T:m,m<0&&(m+=T),T=u>m?0:m-u>>>0,u>>>=0;for(var M=Z(T);++w>>1,B=a[M];B!==null&&!qn(B)&&(m?B<=u:B=i){var ne=u?null:BI(a);if(ne)return pc(ne);B=!1,T=_a,X=new uo}else X=u?[]:U;e:for(;++w=w?a:sr(a,u,m)}var By=pR||function(a){return dn.clearTimeout(a)};function $y(a,u){if(u)return a.slice();var m=a.length,w=oy?oy(m):new a.constructor(m);return a.copy(w),w}function Vf(a){var u=new a.constructor(a.byteLength);return new xc(u).set(new xc(a)),u}function AI(a,u){var m=u?Vf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}function RI(a){var u=new a.constructor(a.source,Jn.exec(a));return u.lastIndex=a.lastIndex,u}function II(a){return ka?wt(ka.call(a)):{}}function Fy(a,u){var m=u?Vf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.length)}function zy(a,u){if(a!==u){var m=a!==n,w=a===null,T=a===a,M=qn(a),B=u!==n,U=u===null,X=u===u,ne=qn(u);if(!U&&!ne&&!M&&a>u||M&&B&&X&&!U&&!ne||w&&B&&X||!m&&X||!T)return 1;if(!w&&!M&&!ne&&a=U)return X;var ne=m[w];return X*(ne=="desc"?-1:1)}}return a.index-u.index}function jy(a,u,m,w){for(var T=-1,M=a.length,B=m.length,U=-1,X=u.length,ne=Zt(M-B,0),re=Z(X+ne),oe=!w;++U1?m[T-1]:n,B=T>2?m[2]:n;for(M=a.length>3&&typeof M=="function"?(T--,M):n,B&&Tn(m[0],m[1],B)&&(M=T<3?n:M,T=1),u=wt(u);++w-1?T[M?u[B]:B]:n}}function qy(a){return ri(function(u){var m=u.length,w=m,T=ir.prototype.thru;for(a&&u.reverse();w--;){var M=u[w];if(typeof M!="function")throw new rr(s);if(T&&!B&&zc(M)=="wrapper")var B=new ir([],!0)}for(w=B?w:m;++w1&&nt.reverse(),re&&XU))return!1;var ne=M.get(a),re=M.get(u);if(ne&&re)return ne==u&&re==a;var oe=-1,fe=!0,we=m&y?new uo:n;for(M.set(a,u),M.set(u,a);++oe1?"& ":"")+u[w],u=u.join(m>2?", ":" "),a.replace(Si,`{ + */DE.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,g=4,v=1,y=2,S=1,_=2,b=4,x=8,E=16,A=32,R=64,k=128,O=256,L=512,N=30,H="...",W=800,z=16,D=1,F=2,j=3,V=1/0,G=9007199254740991,K=17976931348623157e292,Y=0/0,J=4294967295,ie=J-1,ce=J>>>1,ue=[["ary",k],["bind",S],["bindKey",_],["curry",x],["curryRight",E],["flip",L],["partial",A],["partialRight",R],["rearg",O]],se="[object Arguments]",Q="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",me="[object Map]",be="[object Number]",Qe="[object Null]",qe="[object Object]",at="[object Promise]",Lt="[object Proxy]",Ie="[object RegExp]",ze="[object Set]",it="[object String]",pt="[object Symbol]",mt="[object Undefined]",_e="[object WeakMap]",je="[object WeakSet]",Ye="[object ArrayBuffer]",$e="[object DataView]",Ne="[object Float32Array]",Rt="[object Float64Array]",ct="[object Int8Array]",Ae="[object Int16Array]",ot="[object Int32Array]",$t="[object Uint8Array]",Re="[object Uint8ClampedArray]",Ue="[object Uint16Array]",yt="[object Uint32Array]",Wt=/\b__p \+= '';/g,pn=/\b(__p \+=) '' \+/g,$r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Or=/&(?:amp|lt|gt|quot|#39);/g,Mr=/[&<>"']/g,Fr=RegExp(Or.source),Jr=RegExp(Mr.source),Zo=/<%-([\s\S]+?)%>/g,$u=/<%([\s\S]+?)%>/g,Gs=/<%=([\s\S]+?)%>/g,ac=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lc=/^\w*$/,sf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,es=/[\\^$.*+?()[\]{}|]/g,af=RegExp(es.source),so=/^\s+/,cc=/\s/,Si=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ts=/\{\n\/\* \[wrapped with (.+)\] \*/,lf=/,? & /,ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wa=/[()=,{}\[\]\/\s]/,Fu=/\\(\\)?/g,Hn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jn=/\w*$/,bl=/^[-+]0x[0-9a-f]+$/i,xl=/^0b[01]+$/i,ao=/^\[object .+?Constructor\]$/,xv=/^0o[0-7]+$/i,wv=/^(?:0|[1-9]\d*)$/,Qt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,aA=/['\n\r\u2028\u2029\\]/g,uc="\\ud800-\\udfff",lA="\\u0300-\\u036f",cA="\\ufe20-\\ufe2f",uA="\\u20d0-\\u20ff",_v=lA+cA+uA,Sv="\\u2700-\\u27bf",Ev="a-z\\xdf-\\xf6\\xf8-\\xff",dA="\\xac\\xb1\\xd7\\xf7",fA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hA="\\u2000-\\u206f",pA=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Cv="A-Z\\xc0-\\xd6\\xd8-\\xde",Tv="\\ufe0e\\ufe0f",kv=dA+fA+hA+pA,cf="['’]",mA="["+uc+"]",Av="["+kv+"]",dc="["+_v+"]",Rv="\\d+",gA="["+Sv+"]",Iv="["+Ev+"]",Pv="[^"+uc+kv+Rv+Sv+Ev+Cv+"]",uf="\\ud83c[\\udffb-\\udfff]",vA="(?:"+dc+"|"+uf+")",Ov="[^"+uc+"]",df="(?:\\ud83c[\\udde6-\\uddff]){2}",ff="[\\ud800-\\udbff][\\udc00-\\udfff]",rs="["+Cv+"]",Mv="\\u200d",Dv="(?:"+Iv+"|"+Pv+")",yA="(?:"+rs+"|"+Pv+")",Lv="(?:"+cf+"(?:d|ll|m|re|s|t|ve))?",Nv="(?:"+cf+"(?:D|LL|M|RE|S|T|VE))?",Bv=vA+"?",$v="["+Tv+"]?",bA="(?:"+Mv+"(?:"+[Ov,df,ff].join("|")+")"+$v+Bv+")*",xA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fv=$v+Bv+bA,_A="(?:"+[gA,df,ff].join("|")+")"+Fv,SA="(?:"+[Ov+dc+"?",dc,df,ff,mA].join("|")+")",EA=RegExp(cf,"g"),CA=RegExp(dc,"g"),hf=RegExp(uf+"(?="+uf+")|"+SA+Fv,"g"),TA=RegExp([rs+"?"+Iv+"+"+Lv+"(?="+[Av,rs,"$"].join("|")+")",yA+"+"+Nv+"(?="+[Av,rs+Dv,"$"].join("|")+")",rs+"?"+Dv+"+"+Lv,rs+"+"+Nv,wA,xA,Rv,_A].join("|"),"g"),kA=RegExp("["+Mv+uc+_v+Tv+"]"),AA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,RA=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],IA=-1,Pt={};Pt[Ne]=Pt[Rt]=Pt[ct]=Pt[Ae]=Pt[ot]=Pt[$t]=Pt[Re]=Pt[Ue]=Pt[yt]=!0,Pt[se]=Pt[Q]=Pt[Ye]=Pt[le]=Pt[$e]=Pt[he]=Pt[ve]=Pt[ye]=Pt[me]=Pt[be]=Pt[qe]=Pt[Ie]=Pt[ze]=Pt[it]=Pt[_e]=!1;var kt={};kt[se]=kt[Q]=kt[Ye]=kt[$e]=kt[le]=kt[he]=kt[Ne]=kt[Rt]=kt[ct]=kt[Ae]=kt[ot]=kt[me]=kt[be]=kt[qe]=kt[Ie]=kt[ze]=kt[it]=kt[pt]=kt[$t]=kt[Re]=kt[Ue]=kt[yt]=!0,kt[ve]=kt[ye]=kt[_e]=!1;var PA={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},OA={"&":"&","<":"<",">":">",'"':""","'":"'"},MA={"&":"&","<":"<",">":">",""":'"',"'":"'"},DA={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},LA=parseFloat,NA=parseInt,zv=typeof Nt=="object"&&Nt&&Nt.Object===Object&&Nt,BA=typeof self=="object"&&self&&self.Object===Object&&self,dn=zv||BA||Function("return this")(),pf=t&&!t.nodeType&&t,lo=pf&&!0&&e&&!e.nodeType&&e,jv=lo&&lo.exports===pf,mf=jv&&zv.process,tr=function(){try{var q=lo&&lo.require&&lo.require("util").types;return q||mf&&mf.binding&&mf.binding("util")}catch{}}(),Uv=tr&&tr.isArrayBuffer,Hv=tr&&tr.isDate,Wv=tr&&tr.isMap,Gv=tr&&tr.isRegExp,Vv=tr&&tr.isSet,qv=tr&&tr.isTypedArray;function Wn(q,te,Z){switch(Z.length){case 0:return q.call(te);case 1:return q.call(te,Z[0]);case 2:return q.call(te,Z[0],Z[1]);case 3:return q.call(te,Z[0],Z[1],Z[2])}return q.apply(te,Z)}function $A(q,te,Z,ge){for(var De=-1,ut=q==null?0:q.length;++De-1}function gf(q,te,Z){for(var ge=-1,De=q==null?0:q.length;++ge-1;);return Z}function ty(q,te){for(var Z=q.length;Z--&&is(te,q[Z],0)>-1;);return Z}function qA(q,te){for(var Z=q.length,ge=0;Z--;)q[Z]===te&&++ge;return ge}var XA=xf(PA),YA=xf(OA);function KA(q){return"\\"+DA[q]}function QA(q,te){return q==null?n:q[te]}function os(q){return kA.test(q)}function JA(q){return AA.test(q)}function ZA(q){for(var te,Z=[];!(te=q.next()).done;)Z.push(te.value);return Z}function Ef(q){var te=-1,Z=Array(q.size);return q.forEach(function(ge,De){Z[++te]=[De,ge]}),Z}function ny(q,te){return function(Z){return q(te(Z))}}function Ti(q,te){for(var Z=-1,ge=q.length,De=0,ut=[];++Z-1}function zR(a,u){var m=this.__data__,w=Rc(m,a);return w<0?(++this.size,m.push([a,u])):m[w][1]=u,this}Zr.prototype.clear=NR,Zr.prototype.delete=BR,Zr.prototype.get=$R,Zr.prototype.has=FR,Zr.prototype.set=zR;function ei(a){var u=-1,m=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function or(a,u,m,w,T,M){var B,U=u&h,X=u&p,ne=u&g;if(m&&(B=T?m(a,w,T,M):m(a)),B!==n)return B;if(!Ft(a))return a;var re=Be(a);if(re){if(B=WI(a),!U)return On(a,B)}else{var oe=vn(a),fe=oe==ye||oe==xe;if(Oi(a))return $y(a,U);if(oe==qe||oe==se||fe&&!T){if(B=X||fe?{}:r0(a),!U)return X?MI(a,nI(B,a)):OI(a,py(B,a))}else{if(!kt[oe])return T?a:{};B=GI(a,oe,U)}}M||(M=new br);var we=M.get(a);if(we)return we;M.set(a,B),O0(a)?a.forEach(function(ke){B.add(or(ke,u,m,ke,a,M))}):I0(a)&&a.forEach(function(ke,Ke){B.set(Ke,or(ke,u,m,Ke,a,M))});var Te=ne?X?Kf:Yf:X?Dn:nn,Ve=re?n:Te(a);return nr(Ve||a,function(ke,Ke){Ve&&(Ke=ke,ke=a[Ke]),Aa(B,Ke,or(ke,u,m,Ke,a,M))}),B}function rI(a){var u=nn(a);return function(m){return my(m,a,u)}}function my(a,u,m){var w=m.length;if(a==null)return!w;for(a=wt(a);w--;){var T=m[w],M=u[T],B=a[T];if(B===n&&!(T in a)||!M(B))return!1}return!0}function gy(a,u,m){if(typeof a!="function")throw new rr(s);return La(function(){a.apply(n,m)},u)}function Ra(a,u,m,w){var T=-1,M=fc,B=!0,U=a.length,X=[],ne=u.length;if(!U)return X;m&&(u=Dt(u,Gn(m))),w?(M=gf,B=!1):u.length>=i&&(M=_a,B=!1,u=new fo(u));e:for(;++TT?0:T+m),w=w===n||w>T?T:We(w),w<0&&(w+=T),w=m>w?0:D0(w);m0&&m(U)?u>1?fn(U,u-1,m,w,T):Ci(T,U):w||(T[T.length]=U)}return T}var Pf=Wy(),by=Wy(!0);function zr(a,u){return a&&Pf(a,u,nn)}function Of(a,u){return a&&by(a,u,nn)}function Pc(a,u){return Ei(u,function(m){return oi(a[m])})}function po(a,u){u=Ii(u,a);for(var m=0,w=u.length;a!=null&&mu}function sI(a,u){return a!=null&&vt.call(a,u)}function aI(a,u){return a!=null&&u in wt(a)}function lI(a,u,m){return a>=gn(u,m)&&a=120&&re.length>=120)?new fo(B&&re):n}re=a[0];var oe=-1,fe=U[0];e:for(;++oe-1;)U!==a&&_c.call(U,X,1),_c.call(a,X,1);return a}function Iy(a,u){for(var m=a?u.length:0,w=m-1;m--;){var T=u[m];if(m==w||T!==M){var M=T;ii(T)?_c.call(a,T,1):Uf(a,T)}}return a}function Ff(a,u){return a+Cc(uy()*(u-a+1))}function wI(a,u,m,w){for(var T=-1,M=Zt(Ec((u-a)/(m||1)),0),B=Z(M);M--;)B[w?M:++T]=a,a+=m;return B}function zf(a,u){var m="";if(!a||u<1||u>G)return m;do u%2&&(m+=a),u=Cc(u/2),u&&(a+=a);while(u);return m}function Xe(a,u){return rh(s0(a,u,Ln),a+"")}function _I(a){return hy(gs(a))}function SI(a,u){var m=gs(a);return Uc(m,ho(u,0,m.length))}function Oa(a,u,m,w){if(!Ft(a))return a;u=Ii(u,a);for(var T=-1,M=u.length,B=M-1,U=a;U!=null&&++TT?0:T+u),m=m>T?T:m,m<0&&(m+=T),T=u>m?0:m-u>>>0,u>>>=0;for(var M=Z(T);++w>>1,B=a[M];B!==null&&!qn(B)&&(m?B<=u:B=i){var ne=u?null:BI(a);if(ne)return pc(ne);B=!1,T=_a,X=new fo}else X=u?[]:U;e:for(;++w=w?a:sr(a,u,m)}var By=pR||function(a){return dn.clearTimeout(a)};function $y(a,u){if(u)return a.slice();var m=a.length,w=oy?oy(m):new a.constructor(m);return a.copy(w),w}function Vf(a){var u=new a.constructor(a.byteLength);return new xc(u).set(new xc(a)),u}function AI(a,u){var m=u?Vf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}function RI(a){var u=new a.constructor(a.source,Jn.exec(a));return u.lastIndex=a.lastIndex,u}function II(a){return ka?wt(ka.call(a)):{}}function Fy(a,u){var m=u?Vf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.length)}function zy(a,u){if(a!==u){var m=a!==n,w=a===null,T=a===a,M=qn(a),B=u!==n,U=u===null,X=u===u,ne=qn(u);if(!U&&!ne&&!M&&a>u||M&&B&&X&&!U&&!ne||w&&B&&X||!m&&X||!T)return 1;if(!w&&!M&&!ne&&a=U)return X;var ne=m[w];return X*(ne=="desc"?-1:1)}}return a.index-u.index}function jy(a,u,m,w){for(var T=-1,M=a.length,B=m.length,U=-1,X=u.length,ne=Zt(M-B,0),re=Z(X+ne),oe=!w;++U1?m[T-1]:n,B=T>2?m[2]:n;for(M=a.length>3&&typeof M=="function"?(T--,M):n,B&&Tn(m[0],m[1],B)&&(M=T<3?n:M,T=1),u=wt(u);++w-1?T[M?u[B]:B]:n}}function qy(a){return ri(function(u){var m=u.length,w=m,T=ir.prototype.thru;for(a&&u.reverse();w--;){var M=u[w];if(typeof M!="function")throw new rr(s);if(T&&!B&&zc(M)=="wrapper")var B=new ir([],!0)}for(w=B?w:m;++w1&&nt.reverse(),re&&XU))return!1;var ne=M.get(a),re=M.get(u);if(ne&&re)return ne==u&&re==a;var oe=-1,fe=!0,we=m&y?new fo:n;for(M.set(a,u),M.set(u,a);++oe1?"& ":"")+u[w],u=u.join(m>2?", ":" "),a.replace(Si,`{ /* [wrapped with `+u+`] */ -`)}function qI(a){return Be(a)||go(a)||!!(ly&&a&&a[ly])}function ii(a,u){var m=typeof a;return u=u??G,!!u&&(m=="number"||m!="symbol"&&wv.test(a))&&a>-1&&a%1==0&&a0){if(++u>=W)return arguments[0]}else u=0;return a.apply(n,arguments)}}function Uc(a,u){var m=-1,w=a.length,T=w-1;for(u=u===n?w:u;++m1?a[u-1]:n;return m=typeof m=="function"?(a.pop(),m):n,y0(a,m)});function b0(a){var u=P(a);return u.__chain__=!0,u}function i2(a,u){return u(a),a}function Hc(a,u){return u(a)}var o2=ri(function(a){var u=a.length,m=u?a[0]:0,w=this.__wrapped__,T=function(M){return If(M,a)};return u>1||this.__actions__.length||!(w instanceof Je)||!ii(m)?this.thru(T):(w=w.slice(m,+m+(u?1:0)),w.__actions__.push({func:Hc,args:[T],thisArg:n}),new ir(w,this.__chain__).thru(function(M){return u&&!M.length&&M.push(n),M}))});function s2(){return b0(this)}function a2(){return new ir(this.value(),this.__chain__)}function l2(){this.__values__===n&&(this.__values__=M0(this.value()));var a=this.__index__>=this.__values__.length,u=a?n:this.__values__[this.__index__++];return{done:a,value:u}}function c2(){return this}function u2(a){for(var u,m=this;m instanceof Ac;){var w=f0(m);w.__index__=0,w.__values__=n,u?T.__wrapped__=w:u=w;var T=w;m=m.__wrapped__}return T.__wrapped__=a,u}function d2(){var a=this.__wrapped__;if(a instanceof Je){var u=a;return this.__actions__.length&&(u=new Je(this)),u=u.reverse(),u.__actions__.push({func:Hc,args:[ih],thisArg:n}),new ir(u,this.__chain__)}return this.thru(ih)}function f2(){return Ly(this.__wrapped__,this.__actions__)}var h2=Lc(function(a,u,m){vt.call(a,m)?++a[m]:ti(a,m,1)});function p2(a,u,m){var w=Be(a)?Xv:iI;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}function m2(a,u){var m=Be(a)?Ei:yy;return m(a,Ce(u,3))}var g2=Vy(h0),v2=Vy(p0);function y2(a,u){return fn(Wc(a,u),1)}function b2(a,u){return fn(Wc(a,u),V)}function x2(a,u,m){return m=m===n?1:We(m),fn(Wc(a,u),m)}function x0(a,u){var m=Be(a)?nr:Ai;return m(a,Ce(u,3))}function w0(a,u){var m=Be(a)?FA:vy;return m(a,Ce(u,3))}var w2=Lc(function(a,u,m){vt.call(a,m)?a[m].push(u):ti(a,m,[u])});function _2(a,u,m,w){a=Mn(a)?a:gs(a),m=m&&!w?We(m):0;var T=a.length;return m<0&&(m=Zt(T+m,0)),Yc(a)?m<=T&&a.indexOf(u,m)>-1:!!T&&is(a,u,m)>-1}var S2=Xe(function(a,u,m){var w=-1,T=typeof u=="function",M=Mn(a)?Z(a.length):[];return Ai(a,function(B){M[++w]=T?Wn(u,B,m):Ia(B,u,m)}),M}),E2=Lc(function(a,u,m){ti(a,m,u)});function Wc(a,u){var m=Be(a)?Dt:Ey;return m(a,Ce(u,3))}function C2(a,u,m,w){return a==null?[]:(Be(u)||(u=u==null?[]:[u]),m=w?n:m,Be(m)||(m=m==null?[]:[m]),Ay(a,u,m))}var T2=Lc(function(a,u,m){a[m?0:1].push(u)},function(){return[[],[]]});function k2(a,u,m){var w=Be(a)?vf:Jv,T=arguments.length<3;return w(a,Ce(u,4),m,T,Ai)}function A2(a,u,m){var w=Be(a)?zA:Jv,T=arguments.length<3;return w(a,Ce(u,4),m,T,vy)}function R2(a,u){var m=Be(a)?Ei:yy;return m(a,qc(Ce(u,3)))}function I2(a){var u=Be(a)?hy:_I;return u(a)}function P2(a,u,m){(m?Tn(a,u,m):u===n)?u=1:u=We(u);var w=Be(a)?ZR:SI;return w(a,u)}function O2(a){var u=Be(a)?eI:CI;return u(a)}function M2(a){if(a==null)return 0;if(Mn(a))return Yc(a)?ss(a):a.length;var u=vn(a);return u==me||u==ze?a.size:Nf(a).length}function D2(a,u,m){var w=Be(a)?yf:TI;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}var L2=Xe(function(a,u){if(a==null)return[];var m=u.length;return m>1&&Tn(a,u[0],u[1])?u=[]:m>2&&Tn(u[0],u[1],u[2])&&(u=[u[0]]),Ay(a,fn(u,1),[])}),Gc=mR||function(){return dn.Date.now()};function N2(a,u){if(typeof u!="function")throw new rr(s);return a=We(a),function(){if(--a<1)return u.apply(this,arguments)}}function _0(a,u,m){return u=m?n:u,u=a&&u==null?a.length:u,ni(a,k,n,n,n,n,u)}function S0(a,u){var m;if(typeof u!="function")throw new rr(s);return a=We(a),function(){return--a>0&&(m=u.apply(this,arguments)),a<=1&&(u=n),m}}var sh=Xe(function(a,u,m){var w=S;if(m.length){var T=Ti(m,ps(sh));w|=A}return ni(a,w,u,m,T)}),E0=Xe(function(a,u,m){var w=S|_;if(m.length){var T=Ti(m,ps(E0));w|=A}return ni(u,w,a,m,T)});function C0(a,u,m){u=m?n:u;var w=ni(a,x,n,n,n,n,n,u);return w.placeholder=C0.placeholder,w}function T0(a,u,m){u=m?n:u;var w=ni(a,E,n,n,n,n,n,u);return w.placeholder=T0.placeholder,w}function k0(a,u,m){var w,T,M,B,U,X,ne=0,re=!1,oe=!1,fe=!0;if(typeof a!="function")throw new rr(s);u=lr(u)||0,Ft(m)&&(re=!!m.leading,oe="maxWait"in m,M=oe?Zt(lr(m.maxWait)||0,u):M,fe="trailing"in m?!!m.trailing:fe);function we(Yt){var wr=w,ai=T;return w=T=n,ne=Yt,B=a.apply(ai,wr),B}function Te(Yt){return ne=Yt,U=La(Ke,u),re?we(Yt):B}function Ve(Yt){var wr=Yt-X,ai=Yt-ne,V0=u-wr;return oe?gn(V0,M-ai):V0}function ke(Yt){var wr=Yt-X,ai=Yt-ne;return X===n||wr>=u||wr<0||oe&&ai>=M}function Ke(){var Yt=Gc();if(ke(Yt))return nt(Yt);U=La(Ke,Ve(Yt))}function nt(Yt){return U=n,fe&&w?we(Yt):(w=T=n,B)}function Xn(){U!==n&&By(U),ne=0,w=X=T=U=n}function kn(){return U===n?B:nt(Gc())}function Yn(){var Yt=Gc(),wr=ke(Yt);if(w=arguments,T=this,X=Yt,wr){if(U===n)return Te(X);if(oe)return By(U),U=La(Ke,u),we(X)}return U===n&&(U=La(Ke,u)),B}return Yn.cancel=Xn,Yn.flush=kn,Yn}var B2=Xe(function(a,u){return gy(a,1,u)}),$2=Xe(function(a,u,m){return gy(a,lr(u)||0,m)});function F2(a){return ni(a,L)}function Vc(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new rr(s);var m=function(){var w=arguments,T=u?u.apply(this,w):w[0],M=m.cache;if(M.has(T))return M.get(T);var B=a.apply(this,w);return m.cache=M.set(T,B)||M,B};return m.cache=new(Vc.Cache||ei),m}Vc.Cache=ei;function qc(a){if(typeof a!="function")throw new rr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}function z2(a){return S0(2,a)}var j2=kI(function(a,u){u=u.length==1&&Be(u[0])?Dt(u[0],Gn(Ce())):Dt(fn(u,1),Gn(Ce()));var m=u.length;return Xe(function(w){for(var T=-1,M=gn(w.length,m);++T=u}),go=wy(function(){return arguments}())?wy:function(a){return jt(a)&&vt.call(a,"callee")&&!ay.call(a,"callee")},Be=Z.isArray,nO=Uv?Gn(Uv):uI;function Mn(a){return a!=null&&Xc(a.length)&&!oi(a)}function Xt(a){return jt(a)&&Mn(a)}function rO(a){return a===!0||a===!1||jt(a)&&Cn(a)==le}var Oi=vR||yh,iO=Hv?Gn(Hv):dI;function oO(a){return jt(a)&&a.nodeType===1&&!Na(a)}function sO(a){if(a==null)return!0;if(Mn(a)&&(Be(a)||typeof a=="string"||typeof a.splice=="function"||Oi(a)||ms(a)||go(a)))return!a.length;var u=vn(a);if(u==me||u==ze)return!a.size;if(Da(a))return!Nf(a).length;for(var m in a)if(vt.call(a,m))return!1;return!0}function aO(a,u){return Pa(a,u)}function lO(a,u,m){m=typeof m=="function"?m:n;var w=m?m(a,u):n;return w===n?Pa(a,u,n,m):!!w}function lh(a){if(!jt(a))return!1;var u=Cn(a);return u==ve||u==pe||typeof a.message=="string"&&typeof a.name=="string"&&!Na(a)}function cO(a){return typeof a=="number"&&cy(a)}function oi(a){if(!Ft(a))return!1;var u=Cn(a);return u==ye||u==xe||u==ae||u==Lt}function R0(a){return typeof a=="number"&&a==We(a)}function Xc(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=G}function Ft(a){var u=typeof a;return a!=null&&(u=="object"||u=="function")}function jt(a){return a!=null&&typeof a=="object"}var I0=Wv?Gn(Wv):hI;function uO(a,u){return a===u||Lf(a,u,Jf(u))}function dO(a,u,m){return m=typeof m=="function"?m:n,Lf(a,u,Jf(u),m)}function fO(a){return P0(a)&&a!=+a}function hO(a){if(KI(a))throw new De(o);return _y(a)}function pO(a){return a===null}function mO(a){return a==null}function P0(a){return typeof a=="number"||jt(a)&&Cn(a)==be}function Na(a){if(!jt(a)||Cn(a)!=qe)return!1;var u=wc(a);if(u===null)return!0;var m=vt.call(u,"constructor")&&u.constructor;return typeof m=="function"&&m instanceof m&&vc.call(m)==dR}var ch=Gv?Gn(Gv):pI;function gO(a){return R0(a)&&a>=-G&&a<=G}var O0=Vv?Gn(Vv):mI;function Yc(a){return typeof a=="string"||!Be(a)&&jt(a)&&Cn(a)==it}function qn(a){return typeof a=="symbol"||jt(a)&&Cn(a)==pt}var ms=qv?Gn(qv):gI;function vO(a){return a===n}function yO(a){return jt(a)&&vn(a)==_e}function bO(a){return jt(a)&&Cn(a)==je}var xO=Fc(Bf),wO=Fc(function(a,u){return a<=u});function M0(a){if(!a)return[];if(Mn(a))return Yc(a)?yr(a):On(a);if(Sa&&a[Sa])return ZA(a[Sa]());var u=vn(a),m=u==me?Ef:u==ze?pc:gs;return m(a)}function si(a){if(!a)return a===0?a:0;if(a=lr(a),a===V||a===-V){var u=a<0?-1:1;return u*K}return a===a?a:0}function We(a){var u=si(a),m=u%1;return u===u?m?u-m:u:0}function D0(a){return a?fo(We(a),0,J):0}function lr(a){if(typeof a=="number")return a;if(qn(a))return Y;if(Ft(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Ft(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=Zv(a);var m=xl.test(a);return m||xv.test(a)?NA(a.slice(2),m?2:8):bl.test(a)?Y:+a}function L0(a){return jr(a,Dn(a))}function _O(a){return a?fo(We(a),-G,G):a===0?a:0}function ft(a){return a==null?"":Vn(a)}var SO=fs(function(a,u){if(Da(u)||Mn(u)){jr(u,nn(u),a);return}for(var m in u)vt.call(u,m)&&Aa(a,m,u[m])}),N0=fs(function(a,u){jr(u,Dn(u),a)}),Kc=fs(function(a,u,m,w){jr(u,Dn(u),a,w)}),EO=fs(function(a,u,m,w){jr(u,nn(u),a,w)}),CO=ri(If);function TO(a,u){var m=ds(a);return u==null?m:py(m,u)}var kO=Xe(function(a,u){a=wt(a);var m=-1,w=u.length,T=w>2?u[2]:n;for(T&&Tn(u[0],u[1],T)&&(w=1);++m1),M}),jr(a,Kf(a),m),w&&(m=or(m,h|p|g,$I));for(var T=u.length;T--;)Uf(m,u[T]);return m});function GO(a,u){return $0(a,qc(Ce(u)))}var VO=ri(function(a,u){return a==null?{}:bI(a,u)});function $0(a,u){if(a==null)return{};var m=Dt(Kf(a),function(w){return[w]});return u=Ce(u),Ry(a,m,function(w,T){return u(w,T[0])})}function qO(a,u,m){u=Ii(u,a);var w=-1,T=u.length;for(T||(T=1,a=n);++wu){var w=a;a=u,u=w}if(m||a%1||u%1){var T=uy();return gn(a+T*(u-a+LA("1e-"+((T+"").length-1))),u)}return Ff(a,u)}var iM=hs(function(a,u,m){return u=u.toLowerCase(),a+(m?j0(u):u)});function j0(a){return fh(ft(a).toLowerCase())}function U0(a){return a=ft(a),a&&a.replace(Qt,XA).replace(CA,"")}function oM(a,u,m){a=ft(a),u=Vn(u);var w=a.length;m=m===n?w:fo(We(m),0,w);var T=m;return m-=u.length,m>=0&&a.slice(m,T)==u}function sM(a){return a=ft(a),a&&Jr.test(a)?a.replace(Mr,YA):a}function aM(a){return a=ft(a),a&&af.test(a)?a.replace(es,"\\$&"):a}var lM=hs(function(a,u,m){return a+(m?"-":"")+u.toLowerCase()}),cM=hs(function(a,u,m){return a+(m?" ":"")+u.toLowerCase()}),uM=Gy("toLowerCase");function dM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;if(!u||w>=u)return a;var T=(u-w)/2;return $c(Cc(T),m)+a+$c(Ec(T),m)}function fM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;return u&&w>>0,m?(a=ft(a),a&&(typeof u=="string"||u!=null&&!ch(u))&&(u=Vn(u),!u&&os(a))?Pi(yr(a),0,m):a.split(u,m)):[]}var bM=hs(function(a,u,m){return a+(m?" ":"")+fh(u)});function xM(a,u,m){return a=ft(a),m=m==null?0:fo(We(m),0,a.length),u=Vn(u),a.slice(m,m+u.length)==u}function wM(a,u,m){var w=P.templateSettings;m&&Tn(a,u,m)&&(u=n),a=ft(a),u=Kc({},u,w,Jy);var T=Kc({},u.imports,w.imports,Jy),M=nn(T),B=Sf(T,M),U,X,ne=0,re=u.interpolate||vr,oe="__p += '",fe=Cf((u.escape||vr).source+"|"+re.source+"|"+(re===Gs?Hn:vr).source+"|"+(u.evaluate||vr).source+"|$","g"),we="//# sourceURL="+(vt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++IA+"]")+` +`)}function qI(a){return Be(a)||vo(a)||!!(ly&&a&&a[ly])}function ii(a,u){var m=typeof a;return u=u??G,!!u&&(m=="number"||m!="symbol"&&wv.test(a))&&a>-1&&a%1==0&&a0){if(++u>=W)return arguments[0]}else u=0;return a.apply(n,arguments)}}function Uc(a,u){var m=-1,w=a.length,T=w-1;for(u=u===n?w:u;++m1?a[u-1]:n;return m=typeof m=="function"?(a.pop(),m):n,y0(a,m)});function b0(a){var u=P(a);return u.__chain__=!0,u}function i2(a,u){return u(a),a}function Hc(a,u){return u(a)}var o2=ri(function(a){var u=a.length,m=u?a[0]:0,w=this.__wrapped__,T=function(M){return If(M,a)};return u>1||this.__actions__.length||!(w instanceof Je)||!ii(m)?this.thru(T):(w=w.slice(m,+m+(u?1:0)),w.__actions__.push({func:Hc,args:[T],thisArg:n}),new ir(w,this.__chain__).thru(function(M){return u&&!M.length&&M.push(n),M}))});function s2(){return b0(this)}function a2(){return new ir(this.value(),this.__chain__)}function l2(){this.__values__===n&&(this.__values__=M0(this.value()));var a=this.__index__>=this.__values__.length,u=a?n:this.__values__[this.__index__++];return{done:a,value:u}}function c2(){return this}function u2(a){for(var u,m=this;m instanceof Ac;){var w=f0(m);w.__index__=0,w.__values__=n,u?T.__wrapped__=w:u=w;var T=w;m=m.__wrapped__}return T.__wrapped__=a,u}function d2(){var a=this.__wrapped__;if(a instanceof Je){var u=a;return this.__actions__.length&&(u=new Je(this)),u=u.reverse(),u.__actions__.push({func:Hc,args:[ih],thisArg:n}),new ir(u,this.__chain__)}return this.thru(ih)}function f2(){return Ly(this.__wrapped__,this.__actions__)}var h2=Lc(function(a,u,m){vt.call(a,m)?++a[m]:ti(a,m,1)});function p2(a,u,m){var w=Be(a)?Xv:iI;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}function m2(a,u){var m=Be(a)?Ei:yy;return m(a,Ce(u,3))}var g2=Vy(h0),v2=Vy(p0);function y2(a,u){return fn(Wc(a,u),1)}function b2(a,u){return fn(Wc(a,u),V)}function x2(a,u,m){return m=m===n?1:We(m),fn(Wc(a,u),m)}function x0(a,u){var m=Be(a)?nr:Ai;return m(a,Ce(u,3))}function w0(a,u){var m=Be(a)?FA:vy;return m(a,Ce(u,3))}var w2=Lc(function(a,u,m){vt.call(a,m)?a[m].push(u):ti(a,m,[u])});function _2(a,u,m,w){a=Mn(a)?a:gs(a),m=m&&!w?We(m):0;var T=a.length;return m<0&&(m=Zt(T+m,0)),Yc(a)?m<=T&&a.indexOf(u,m)>-1:!!T&&is(a,u,m)>-1}var S2=Xe(function(a,u,m){var w=-1,T=typeof u=="function",M=Mn(a)?Z(a.length):[];return Ai(a,function(B){M[++w]=T?Wn(u,B,m):Ia(B,u,m)}),M}),E2=Lc(function(a,u,m){ti(a,m,u)});function Wc(a,u){var m=Be(a)?Dt:Ey;return m(a,Ce(u,3))}function C2(a,u,m,w){return a==null?[]:(Be(u)||(u=u==null?[]:[u]),m=w?n:m,Be(m)||(m=m==null?[]:[m]),Ay(a,u,m))}var T2=Lc(function(a,u,m){a[m?0:1].push(u)},function(){return[[],[]]});function k2(a,u,m){var w=Be(a)?vf:Jv,T=arguments.length<3;return w(a,Ce(u,4),m,T,Ai)}function A2(a,u,m){var w=Be(a)?zA:Jv,T=arguments.length<3;return w(a,Ce(u,4),m,T,vy)}function R2(a,u){var m=Be(a)?Ei:yy;return m(a,qc(Ce(u,3)))}function I2(a){var u=Be(a)?hy:_I;return u(a)}function P2(a,u,m){(m?Tn(a,u,m):u===n)?u=1:u=We(u);var w=Be(a)?ZR:SI;return w(a,u)}function O2(a){var u=Be(a)?eI:CI;return u(a)}function M2(a){if(a==null)return 0;if(Mn(a))return Yc(a)?ss(a):a.length;var u=vn(a);return u==me||u==ze?a.size:Nf(a).length}function D2(a,u,m){var w=Be(a)?yf:TI;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}var L2=Xe(function(a,u){if(a==null)return[];var m=u.length;return m>1&&Tn(a,u[0],u[1])?u=[]:m>2&&Tn(u[0],u[1],u[2])&&(u=[u[0]]),Ay(a,fn(u,1),[])}),Gc=mR||function(){return dn.Date.now()};function N2(a,u){if(typeof u!="function")throw new rr(s);return a=We(a),function(){if(--a<1)return u.apply(this,arguments)}}function _0(a,u,m){return u=m?n:u,u=a&&u==null?a.length:u,ni(a,k,n,n,n,n,u)}function S0(a,u){var m;if(typeof u!="function")throw new rr(s);return a=We(a),function(){return--a>0&&(m=u.apply(this,arguments)),a<=1&&(u=n),m}}var sh=Xe(function(a,u,m){var w=S;if(m.length){var T=Ti(m,ps(sh));w|=A}return ni(a,w,u,m,T)}),E0=Xe(function(a,u,m){var w=S|_;if(m.length){var T=Ti(m,ps(E0));w|=A}return ni(u,w,a,m,T)});function C0(a,u,m){u=m?n:u;var w=ni(a,x,n,n,n,n,n,u);return w.placeholder=C0.placeholder,w}function T0(a,u,m){u=m?n:u;var w=ni(a,E,n,n,n,n,n,u);return w.placeholder=T0.placeholder,w}function k0(a,u,m){var w,T,M,B,U,X,ne=0,re=!1,oe=!1,fe=!0;if(typeof a!="function")throw new rr(s);u=lr(u)||0,Ft(m)&&(re=!!m.leading,oe="maxWait"in m,M=oe?Zt(lr(m.maxWait)||0,u):M,fe="trailing"in m?!!m.trailing:fe);function we(Xt){var wr=w,ai=T;return w=T=n,ne=Xt,B=a.apply(ai,wr),B}function Te(Xt){return ne=Xt,U=La(Ke,u),re?we(Xt):B}function Ve(Xt){var wr=Xt-X,ai=Xt-ne,V0=u-wr;return oe?gn(V0,M-ai):V0}function ke(Xt){var wr=Xt-X,ai=Xt-ne;return X===n||wr>=u||wr<0||oe&&ai>=M}function Ke(){var Xt=Gc();if(ke(Xt))return nt(Xt);U=La(Ke,Ve(Xt))}function nt(Xt){return U=n,fe&&w?we(Xt):(w=T=n,B)}function Xn(){U!==n&&By(U),ne=0,w=X=T=U=n}function kn(){return U===n?B:nt(Gc())}function Yn(){var Xt=Gc(),wr=ke(Xt);if(w=arguments,T=this,X=Xt,wr){if(U===n)return Te(X);if(oe)return By(U),U=La(Ke,u),we(X)}return U===n&&(U=La(Ke,u)),B}return Yn.cancel=Xn,Yn.flush=kn,Yn}var B2=Xe(function(a,u){return gy(a,1,u)}),$2=Xe(function(a,u,m){return gy(a,lr(u)||0,m)});function F2(a){return ni(a,L)}function Vc(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new rr(s);var m=function(){var w=arguments,T=u?u.apply(this,w):w[0],M=m.cache;if(M.has(T))return M.get(T);var B=a.apply(this,w);return m.cache=M.set(T,B)||M,B};return m.cache=new(Vc.Cache||ei),m}Vc.Cache=ei;function qc(a){if(typeof a!="function")throw new rr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}function z2(a){return S0(2,a)}var j2=kI(function(a,u){u=u.length==1&&Be(u[0])?Dt(u[0],Gn(Ce())):Dt(fn(u,1),Gn(Ce()));var m=u.length;return Xe(function(w){for(var T=-1,M=gn(w.length,m);++T=u}),vo=wy(function(){return arguments}())?wy:function(a){return jt(a)&&vt.call(a,"callee")&&!ay.call(a,"callee")},Be=Z.isArray,nO=Uv?Gn(Uv):uI;function Mn(a){return a!=null&&Xc(a.length)&&!oi(a)}function qt(a){return jt(a)&&Mn(a)}function rO(a){return a===!0||a===!1||jt(a)&&Cn(a)==le}var Oi=vR||yh,iO=Hv?Gn(Hv):dI;function oO(a){return jt(a)&&a.nodeType===1&&!Na(a)}function sO(a){if(a==null)return!0;if(Mn(a)&&(Be(a)||typeof a=="string"||typeof a.splice=="function"||Oi(a)||ms(a)||vo(a)))return!a.length;var u=vn(a);if(u==me||u==ze)return!a.size;if(Da(a))return!Nf(a).length;for(var m in a)if(vt.call(a,m))return!1;return!0}function aO(a,u){return Pa(a,u)}function lO(a,u,m){m=typeof m=="function"?m:n;var w=m?m(a,u):n;return w===n?Pa(a,u,n,m):!!w}function lh(a){if(!jt(a))return!1;var u=Cn(a);return u==ve||u==pe||typeof a.message=="string"&&typeof a.name=="string"&&!Na(a)}function cO(a){return typeof a=="number"&&cy(a)}function oi(a){if(!Ft(a))return!1;var u=Cn(a);return u==ye||u==xe||u==ae||u==Lt}function R0(a){return typeof a=="number"&&a==We(a)}function Xc(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=G}function Ft(a){var u=typeof a;return a!=null&&(u=="object"||u=="function")}function jt(a){return a!=null&&typeof a=="object"}var I0=Wv?Gn(Wv):hI;function uO(a,u){return a===u||Lf(a,u,Jf(u))}function dO(a,u,m){return m=typeof m=="function"?m:n,Lf(a,u,Jf(u),m)}function fO(a){return P0(a)&&a!=+a}function hO(a){if(KI(a))throw new De(o);return _y(a)}function pO(a){return a===null}function mO(a){return a==null}function P0(a){return typeof a=="number"||jt(a)&&Cn(a)==be}function Na(a){if(!jt(a)||Cn(a)!=qe)return!1;var u=wc(a);if(u===null)return!0;var m=vt.call(u,"constructor")&&u.constructor;return typeof m=="function"&&m instanceof m&&vc.call(m)==dR}var ch=Gv?Gn(Gv):pI;function gO(a){return R0(a)&&a>=-G&&a<=G}var O0=Vv?Gn(Vv):mI;function Yc(a){return typeof a=="string"||!Be(a)&&jt(a)&&Cn(a)==it}function qn(a){return typeof a=="symbol"||jt(a)&&Cn(a)==pt}var ms=qv?Gn(qv):gI;function vO(a){return a===n}function yO(a){return jt(a)&&vn(a)==_e}function bO(a){return jt(a)&&Cn(a)==je}var xO=Fc(Bf),wO=Fc(function(a,u){return a<=u});function M0(a){if(!a)return[];if(Mn(a))return Yc(a)?yr(a):On(a);if(Sa&&a[Sa])return ZA(a[Sa]());var u=vn(a),m=u==me?Ef:u==ze?pc:gs;return m(a)}function si(a){if(!a)return a===0?a:0;if(a=lr(a),a===V||a===-V){var u=a<0?-1:1;return u*K}return a===a?a:0}function We(a){var u=si(a),m=u%1;return u===u?m?u-m:u:0}function D0(a){return a?ho(We(a),0,J):0}function lr(a){if(typeof a=="number")return a;if(qn(a))return Y;if(Ft(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Ft(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=Zv(a);var m=xl.test(a);return m||xv.test(a)?NA(a.slice(2),m?2:8):bl.test(a)?Y:+a}function L0(a){return jr(a,Dn(a))}function _O(a){return a?ho(We(a),-G,G):a===0?a:0}function ft(a){return a==null?"":Vn(a)}var SO=fs(function(a,u){if(Da(u)||Mn(u)){jr(u,nn(u),a);return}for(var m in u)vt.call(u,m)&&Aa(a,m,u[m])}),N0=fs(function(a,u){jr(u,Dn(u),a)}),Kc=fs(function(a,u,m,w){jr(u,Dn(u),a,w)}),EO=fs(function(a,u,m,w){jr(u,nn(u),a,w)}),CO=ri(If);function TO(a,u){var m=ds(a);return u==null?m:py(m,u)}var kO=Xe(function(a,u){a=wt(a);var m=-1,w=u.length,T=w>2?u[2]:n;for(T&&Tn(u[0],u[1],T)&&(w=1);++m1),M}),jr(a,Kf(a),m),w&&(m=or(m,h|p|g,$I));for(var T=u.length;T--;)Uf(m,u[T]);return m});function GO(a,u){return $0(a,qc(Ce(u)))}var VO=ri(function(a,u){return a==null?{}:bI(a,u)});function $0(a,u){if(a==null)return{};var m=Dt(Kf(a),function(w){return[w]});return u=Ce(u),Ry(a,m,function(w,T){return u(w,T[0])})}function qO(a,u,m){u=Ii(u,a);var w=-1,T=u.length;for(T||(T=1,a=n);++wu){var w=a;a=u,u=w}if(m||a%1||u%1){var T=uy();return gn(a+T*(u-a+LA("1e-"+((T+"").length-1))),u)}return Ff(a,u)}var iM=hs(function(a,u,m){return u=u.toLowerCase(),a+(m?j0(u):u)});function j0(a){return fh(ft(a).toLowerCase())}function U0(a){return a=ft(a),a&&a.replace(Qt,XA).replace(CA,"")}function oM(a,u,m){a=ft(a),u=Vn(u);var w=a.length;m=m===n?w:ho(We(m),0,w);var T=m;return m-=u.length,m>=0&&a.slice(m,T)==u}function sM(a){return a=ft(a),a&&Jr.test(a)?a.replace(Mr,YA):a}function aM(a){return a=ft(a),a&&af.test(a)?a.replace(es,"\\$&"):a}var lM=hs(function(a,u,m){return a+(m?"-":"")+u.toLowerCase()}),cM=hs(function(a,u,m){return a+(m?" ":"")+u.toLowerCase()}),uM=Gy("toLowerCase");function dM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;if(!u||w>=u)return a;var T=(u-w)/2;return $c(Cc(T),m)+a+$c(Ec(T),m)}function fM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;return u&&w>>0,m?(a=ft(a),a&&(typeof u=="string"||u!=null&&!ch(u))&&(u=Vn(u),!u&&os(a))?Pi(yr(a),0,m):a.split(u,m)):[]}var bM=hs(function(a,u,m){return a+(m?" ":"")+fh(u)});function xM(a,u,m){return a=ft(a),m=m==null?0:ho(We(m),0,a.length),u=Vn(u),a.slice(m,m+u.length)==u}function wM(a,u,m){var w=P.templateSettings;m&&Tn(a,u,m)&&(u=n),a=ft(a),u=Kc({},u,w,Jy);var T=Kc({},u.imports,w.imports,Jy),M=nn(T),B=Sf(T,M),U,X,ne=0,re=u.interpolate||vr,oe="__p += '",fe=Cf((u.escape||vr).source+"|"+re.source+"|"+(re===Gs?Hn:vr).source+"|"+(u.evaluate||vr).source+"|$","g"),we="//# sourceURL="+(vt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++IA+"]")+` `;a.replace(fe,function(ke,Ke,nt,Xn,kn,Yn){return nt||(nt=Xn),oe+=a.slice(ne,Yn).replace(aA,KA),Ke&&(U=!0,oe+=`' + __e(`+Ke+`) + '`),kn&&(X=!0,oe+=`'; @@ -288,7 +288,7 @@ __p += '`),nt&&(oe+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+oe+`return __p -}`;var Ve=W0(function(){return ut(M,we+"return "+oe).apply(n,B)});if(Ve.source=oe,lh(Ve))throw Ve;return Ve}function _M(a){return ft(a).toLowerCase()}function SM(a){return ft(a).toUpperCase()}function EM(a,u,m){if(a=ft(a),a&&(m||u===n))return Zv(a);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=yr(u),M=ey(w,T),B=ty(w,T)+1;return Pi(w,M,B).join("")}function CM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.slice(0,ry(a)+1);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ty(w,yr(u))+1;return Pi(w,0,T).join("")}function TM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.replace(oo,"");if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ey(w,yr(u));return Pi(w,T).join("")}function kM(a,u){var m=N,w=H;if(Ft(u)){var T="separator"in u?u.separator:T;m="length"in u?We(u.length):m,w="omission"in u?Vn(u.omission):w}a=ft(a);var M=a.length;if(os(a)){var B=yr(a);M=B.length}if(m>=M)return a;var U=m-ss(w);if(U<1)return w;var X=B?Pi(B,0,U).join(""):a.slice(0,U);if(T===n)return X+w;if(B&&(U+=X.length-U),ch(T)){if(a.slice(U).search(T)){var ne,re=X;for(T.global||(T=Cf(T.source,ft(Jn.exec(T))+"g")),T.lastIndex=0;ne=T.exec(re);)var oe=ne.index;X=X.slice(0,oe===n?U:oe)}}else if(a.indexOf(Vn(T),U)!=U){var fe=X.lastIndexOf(T);fe>-1&&(X=X.slice(0,fe))}return X+w}function AM(a){return a=ft(a),a&&Fr.test(a)?a.replace(Or,rR):a}var RM=hs(function(a,u,m){return a+(m?" ":"")+u.toUpperCase()}),fh=Gy("toUpperCase");function H0(a,u,m){return a=ft(a),u=m?n:u,u===n?JA(a)?sR(a):HA(a):a.match(u)||[]}var W0=Xe(function(a,u){try{return Wn(a,n,u)}catch(m){return lh(m)?m:new De(m)}}),IM=ri(function(a,u){return nr(u,function(m){m=Ur(m),ti(a,m,sh(a[m],a))}),a});function PM(a){var u=a==null?0:a.length,m=Ce();return a=u?Dt(a,function(w){if(typeof w[1]!="function")throw new rr(s);return[m(w[0]),w[1]]}):[],Xe(function(w){for(var T=-1;++TG)return[];var m=J,w=gn(a,J);u=Ce(u),a-=J;for(var T=_f(w,u);++m0||u<0)?new Je(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),u!==n&&(u=We(u),m=u<0?m.dropRight(-u):m.take(u-a)),m)},Je.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Je.prototype.toArray=function(){return this.take(J)},zr(Je.prototype,function(a,u){var m=/^(?:filter|find|map|reject)|While$/.test(u),w=/^(?:head|last)$/.test(u),T=P[w?"take"+(u=="last"?"Right":""):u],M=w||/^find/.test(u);T&&(P.prototype[u]=function(){var B=this.__wrapped__,U=w?[1]:arguments,X=B instanceof Je,ne=U[0],re=X||Be(B),oe=function(Ke){var nt=T.apply(P,Ci([Ke],U));return w&&fe?nt[0]:nt};re&&m&&typeof ne=="function"&&ne.length!=1&&(X=re=!1);var fe=this.__chain__,we=!!this.__actions__.length,Te=M&&!fe,Ve=X&&!we;if(!M&&re){B=Ve?B:new Je(this);var ke=a.apply(B,U);return ke.__actions__.push({func:Hc,args:[oe],thisArg:n}),new ir(ke,fe)}return Te&&Ve?a.apply(this,U):(ke=this.thru(oe),Te?w?ke.value()[0]:ke.value():ke)})}),nr(["pop","push","shift","sort","splice","unshift"],function(a){var u=mc[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",w=/^(?:pop|shift)$/.test(a);P.prototype[a]=function(){var T=arguments;if(w&&!this.__chain__){var M=this.value();return u.apply(Be(M)?M:[],T)}return this[m](function(B){return u.apply(Be(B)?B:[],T)})}}),zr(Je.prototype,function(a,u){var m=P[u];if(m){var w=m.name+"";vt.call(us,w)||(us[w]=[]),us[w].push({name:u,func:m})}}),us[Nc(n,_).name]=[{name:"wrapper",func:n}],Je.prototype.clone=AR,Je.prototype.reverse=RR,Je.prototype.value=IR,P.prototype.at=o2,P.prototype.chain=s2,P.prototype.commit=a2,P.prototype.next=l2,P.prototype.plant=u2,P.prototype.reverse=d2,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=f2,P.prototype.first=P.prototype.head,Sa&&(P.prototype[Sa]=c2),P},as=aR();ao?((ao.exports=as)._=as,pf._=as):dn._=as}).call(Nt)})(DE,DE.exports);var ee=DE.exports;function Kr(e){return C.jsx(dt,{px:.5,display:"inline-block",...e})}function q4({primary:e,secondary:t}){return C.jsxs(bn,{children:[C.jsx(dt,{children:e}),C.jsx(Kr,{}),C.jsx(dt,{sx:{opacity:.56},children:t})]})}/*! ***************************************************************************** +}`;var Ve=W0(function(){return ut(M,we+"return "+oe).apply(n,B)});if(Ve.source=oe,lh(Ve))throw Ve;return Ve}function _M(a){return ft(a).toLowerCase()}function SM(a){return ft(a).toUpperCase()}function EM(a,u,m){if(a=ft(a),a&&(m||u===n))return Zv(a);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=yr(u),M=ey(w,T),B=ty(w,T)+1;return Pi(w,M,B).join("")}function CM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.slice(0,ry(a)+1);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ty(w,yr(u))+1;return Pi(w,0,T).join("")}function TM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.replace(so,"");if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ey(w,yr(u));return Pi(w,T).join("")}function kM(a,u){var m=N,w=H;if(Ft(u)){var T="separator"in u?u.separator:T;m="length"in u?We(u.length):m,w="omission"in u?Vn(u.omission):w}a=ft(a);var M=a.length;if(os(a)){var B=yr(a);M=B.length}if(m>=M)return a;var U=m-ss(w);if(U<1)return w;var X=B?Pi(B,0,U).join(""):a.slice(0,U);if(T===n)return X+w;if(B&&(U+=X.length-U),ch(T)){if(a.slice(U).search(T)){var ne,re=X;for(T.global||(T=Cf(T.source,ft(Jn.exec(T))+"g")),T.lastIndex=0;ne=T.exec(re);)var oe=ne.index;X=X.slice(0,oe===n?U:oe)}}else if(a.indexOf(Vn(T),U)!=U){var fe=X.lastIndexOf(T);fe>-1&&(X=X.slice(0,fe))}return X+w}function AM(a){return a=ft(a),a&&Fr.test(a)?a.replace(Or,rR):a}var RM=hs(function(a,u,m){return a+(m?" ":"")+u.toUpperCase()}),fh=Gy("toUpperCase");function H0(a,u,m){return a=ft(a),u=m?n:u,u===n?JA(a)?sR(a):HA(a):a.match(u)||[]}var W0=Xe(function(a,u){try{return Wn(a,n,u)}catch(m){return lh(m)?m:new De(m)}}),IM=ri(function(a,u){return nr(u,function(m){m=Ur(m),ti(a,m,sh(a[m],a))}),a});function PM(a){var u=a==null?0:a.length,m=Ce();return a=u?Dt(a,function(w){if(typeof w[1]!="function")throw new rr(s);return[m(w[0]),w[1]]}):[],Xe(function(w){for(var T=-1;++TG)return[];var m=J,w=gn(a,J);u=Ce(u),a-=J;for(var T=_f(w,u);++m0||u<0)?new Je(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),u!==n&&(u=We(u),m=u<0?m.dropRight(-u):m.take(u-a)),m)},Je.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Je.prototype.toArray=function(){return this.take(J)},zr(Je.prototype,function(a,u){var m=/^(?:filter|find|map|reject)|While$/.test(u),w=/^(?:head|last)$/.test(u),T=P[w?"take"+(u=="last"?"Right":""):u],M=w||/^find/.test(u);T&&(P.prototype[u]=function(){var B=this.__wrapped__,U=w?[1]:arguments,X=B instanceof Je,ne=U[0],re=X||Be(B),oe=function(Ke){var nt=T.apply(P,Ci([Ke],U));return w&&fe?nt[0]:nt};re&&m&&typeof ne=="function"&&ne.length!=1&&(X=re=!1);var fe=this.__chain__,we=!!this.__actions__.length,Te=M&&!fe,Ve=X&&!we;if(!M&&re){B=Ve?B:new Je(this);var ke=a.apply(B,U);return ke.__actions__.push({func:Hc,args:[oe],thisArg:n}),new ir(ke,fe)}return Te&&Ve?a.apply(this,U):(ke=this.thru(oe),Te?w?ke.value()[0]:ke.value():ke)})}),nr(["pop","push","shift","sort","splice","unshift"],function(a){var u=mc[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",w=/^(?:pop|shift)$/.test(a);P.prototype[a]=function(){var T=arguments;if(w&&!this.__chain__){var M=this.value();return u.apply(Be(M)?M:[],T)}return this[m](function(B){return u.apply(Be(B)?B:[],T)})}}),zr(Je.prototype,function(a,u){var m=P[u];if(m){var w=m.name+"";vt.call(us,w)||(us[w]=[]),us[w].push({name:u,func:m})}}),us[Nc(n,_).name]=[{name:"wrapper",func:n}],Je.prototype.clone=AR,Je.prototype.reverse=RR,Je.prototype.value=IR,P.prototype.at=o2,P.prototype.chain=s2,P.prototype.commit=a2,P.prototype.next=l2,P.prototype.plant=u2,P.prototype.reverse=d2,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=f2,P.prototype.first=P.prototype.head,Sa&&(P.prototype[Sa]=c2),P},as=aR();lo?((lo.exports=as)._=as,pf._=as):dn._=as}).call(Nt)})(DE,DE.exports);var ee=DE.exports;function Kr(e){return C.jsx(dt,{px:.5,display:"inline-block",...e})}function q4({primary:e,secondary:t}){return C.jsxs(bn,{children:[C.jsx(dt,{children:e}),C.jsx(Kr,{}),C.jsx(dt,{sx:{opacity:.56},children:t})]})}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -309,7 +309,7 @@ PERFORMANCE OF THIS SOFTWARE. * https://github.com/KingSora * * Released under the MIT license. - */function En(e,t){if(lk(e))for(let n=0;nt(e[n],n,e));return e}function Qi(e,t){const n=Qd(t);if($s(t)||n){let i=n?"":{};if(e){const o=window.getComputedStyle(e,null);i=n?H8(e,o,t):t.reduce((s,l)=>(s[l]=H8(e,o,l),s),i)}return i}e&&En(Fs(t),i=>O1e(e,i,t[i]))}const Ja=(e,t)=>{const{o:n,u:r,_:i}=e;let o=n,s;const l=(f,h)=>{const p=o,g=f,v=h||(r?!r(p,g):p!==g);return(v||i)&&(o=g,s=p),[o,v,s]};return[t?f=>l(t(o,s),f):l,f=>[o,!!f,s]]},Y1=()=>typeof window<"u",rQ=Y1()&&Node.ELEMENT_NODE,{toString:v1e,hasOwnProperty:nL}=Object.prototype,Mu=e=>e===void 0,ak=e=>e===null,y1e=e=>Mu(e)||ak(e)?`${e}`:v1e.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Td=e=>typeof e=="number",Qd=e=>typeof e=="string",Y4=e=>typeof e=="boolean",pl=e=>typeof e=="function",$s=e=>Array.isArray(e),e1=e=>typeof e=="object"&&!$s(e)&&!ak(e),lk=e=>{const t=!!e&&e.length,n=Td(t)&&t>-1&&t%1==0;return $s(e)||!pl(e)&&n?t>0&&e1(e)?t-1 in e:!0:!1},dF=e=>{if(!e||!e1(e)||y1e(e)!=="object")return!1;let t;const n="constructor",r=e[n],i=r&&r.prototype,o=nL.call(e,n),s=i&&nL.call(i,"isPrototypeOf");if(r&&!o&&!s)return!1;for(t in e);return Mu(t)||nL.call(e,t)},px=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===rQ:!1},ck=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===rQ:!1},uk=(e,t,n)=>e.indexOf(t,n),Fn=(e,t,n)=>(!n&&!Qd(t)&&lk(t)?Array.prototype.push.apply(e,t):e.push(t),e),bp=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Fn(n,r)}):En(e,r=>{Fn(n,r)}),n)},K4=e=>!!e&&e.length===0,rc=(e,t,n)=>{En(e,i=>i&&i.apply(void 0,t||[])),!n&&(e.length=0)},dk=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Fs=e=>e?Object.keys(e):[],Tr=(e,t,n,r,i,o,s)=>{const l=[t,n,r,i,o,s];return(typeof e!="object"||ak(e))&&!pl(e)&&(e={}),En(l,c=>{En(Fs(c),d=>{const f=c[d];if(e===f)return!0;const h=$s(f);if(f&&dF(f)){const p=e[d];let g=p;h&&!$s(p)?g=[]:!h&&!dF(p)&&(g={}),e[d]=Tr(g,f)}else e[d]=h?f.slice():f})}),e},Q4=e=>{for(const t in e)return!1;return!0},iQ=(e,t,n,r)=>{if(Mu(r))return n?n[e]:t;n&&(Qd(r)||Td(r))&&(n[e]=r)},_o=(e,t,n)=>{if(Mu(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},oQ=(e,t)=>new Set((_o(e,t)||"").split(" ")),Oo=(e,t)=>{e&&e.removeAttribute(t)},ep=(e,t,n,r)=>{if(n){const i=oQ(e,t);i[r?"add":"delete"](n);const o=bp(i).join(" ").trim();_o(e,t,o)}},b1e=(e,t,n)=>oQ(e,t).has(n),al=(e,t)=>iQ("scrollLeft",0,e,t),vu=(e,t)=>iQ("scrollTop",0,e,t),fF=Y1()&&Element.prototype,sQ=(e,t)=>{const n=[],r=t?ck(t)&&t:document;return r?Fn(n,r.querySelectorAll(e)):n},x1e=(e,t)=>{const n=t?ck(t)&&t:document;return n?n.querySelector(e):null},NE=(e,t)=>ck(e)?(fF.matches||fF.msMatchesSelector).call(e,t):!1,J4=e=>e?bp(e.childNodes):[],Cu=e=>e&&e.parentElement,Dm=(e,t)=>{if(ck(e)){const n=fF.closest;if(n)return n.call(e,t);do{if(NE(e,t))return e;e=Cu(e)}while(e)}},w1e=(e,t,n)=>{const r=Dm(e,t),i=e&&x1e(n,r),o=Dm(i,t)===r;return r&&i?r===e||i===e||o&&Dm(Dm(e,n),t)!==r:!1},Z4=(e,t,n)=>{if(n&&e){let r=t,i;lk(n)?(i=document.createDocumentFragment(),En(n,o=>{o===r&&(r=o.previousSibling),i.appendChild(o)})):i=n,t&&(r?r!==t&&(r=r.nextSibling):r=e.firstChild),e.insertBefore(i,r||null)}},ra=(e,t)=>{Z4(e,null,t)},_1e=(e,t)=>{Z4(Cu(e),e,t)},z8=(e,t)=>{Z4(Cu(e),e&&e.nextSibling,t)},Yl=e=>{if(lk(e))En(bp(e),t=>Yl(t));else if(e){const t=Cu(e);t&&t.removeChild(e)}},tp=e=>{const t=document.createElement("div");return e&&_o(t,"class",e),t},aQ=e=>{const t=tp();return t.innerHTML=e.trim(),En(J4(t),n=>Yl(n))},hF=e=>e.charAt(0).toUpperCase()+e.slice(1),S1e=()=>tp().style,E1e=["-webkit-","-moz-","-o-","-ms-"],C1e=["WebKit","Moz","O","MS","webkit","moz","o","ms"],rL={},iL={},T1e=e=>{let t=iL[e];if(dk(iL,e))return t;const n=hF(e),r=S1e();return En(E1e,i=>{const o=i.replace(/-/g,"");return!(t=[e,i+e,o+n,hF(o)+n].find(l=>r[l]!==void 0))}),iL[e]=t||""},nv=e=>{if(Y1()){let t=rL[e]||window[e];return dk(rL,e)||(En(C1e,n=>(t=t||window[n+hF(e)],!t)),rL[e]=t),t}},k1e=nv("MutationObserver"),j8=nv("IntersectionObserver"),Lm=nv("ResizeObserver"),lQ=nv("cancelAnimationFrame"),cQ=nv("requestAnimationFrame"),pF=nv("ScrollTimeline"),BE=Y1()&&window.setTimeout,mF=Y1()&&window.clearTimeout,A1e=/[^\x20\t\r\n\f]+/g,uQ=(e,t,n)=>{const r=e&&e.classList;let i,o=0,s=!1;if(r&&t&&Qd(t)){const l=t.match(A1e)||[];for(s=l.length>0;i=l[o++];)s=!!n(r,i)&&s}return s},ez=(e,t)=>{uQ(e,t,(n,r)=>n.remove(r))},Bd=(e,t)=>(uQ(e,t,(n,r)=>n.add(r)),ez.bind(0,e,t)),fk=(e,t,n,r)=>{if(e&&t){let i=!0;return En(n,o=>{const s=r?r(e[o]):e[o],l=r?r(t[o]):t[o];s!==l&&(i=!1)}),i}return!1},dQ=(e,t)=>fk(e,t,["w","h"]),fQ=(e,t)=>fk(e,t,["x","y"]),R1e=(e,t)=>fk(e,t,["t","r","b","l"]),U8=(e,t,n)=>fk(e,t,["width","height"],n&&(r=>Math.round(r))),Es=()=>{},Mh=e=>{let t;const n=e?BE:cQ,r=e?mF:lQ;return[i=>{r(t),t=n(i,pl(e)?e():e)},()=>r(t)]},tz=(e,t)=>{let n,r,i,o=Es;const{g:s,v:l,p:c}=t||{},d=function(v){o(),mF(n),n=r=void 0,o=Es,e.apply(this,v)},f=g=>c&&r?c(r,g):g,h=()=>{o!==Es&&d(f(i)||i)},p=function(){const v=bp(arguments),y=pl(s)?s():s;if(Td(y)&&y>=0){const _=pl(l)?l():l,b=Td(_)&&_>=0,x=y>0?BE:cQ,E=y>0?mF:lQ,R=f(v)||v,k=d.bind(0,R);o();const O=x(k,y);o=()=>E(O),b&&!n&&(n=BE(h,_)),r=i=R}else d(v)};return p.m=h,p},I1e={opacity:1,zIndex:1},e_=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},P1e=(e,t)=>!I1e[e]&&Td(t)?`${t}px`:t,H8=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),O1e=(e,t,n)=>{try{const{style:r}=e;Mu(r[t])?r.setProperty(t,n):r[t]=P1e(t,n)}catch{}},kg=e=>Qi(e,"direction")==="rtl",W8=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,l=`${r}bottom${i}`,c=`${r}left${i}`,d=Qi(e,[o,s,l,c]);return{t:e_(d[o],!0),r:e_(d[s],!0),b:e_(d[l],!0),l:e_(d[c],!0)}},Ag=(e,t)=>`translate${$s(e)?`(${e[0]},${e[1]})`:`${t?"X":"Y"}(${e})`}`,{round:G8}=Math,nz={w:0,h:0},t1=e=>e?{w:e.offsetWidth,h:e.offsetHeight}:nz,kS=e=>e?{w:e.clientWidth,h:e.clientHeight}:nz,$E=e=>e?{w:e.scrollWidth,h:e.scrollHeight}:nz,FE=e=>{const t=parseFloat(Qi(e,"height"))||0,n=parseFloat(Qi(e,"width"))||0;return{w:n-G8(n),h:t-G8(t)}},Dl=e=>e.getBoundingClientRect(),Nm=e=>!!(e&&(e.height||e.width));let t_;const M1e=()=>{if(Mu(t_)){t_=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){t_=!0}}))}catch{}}return t_},hQ=e=>e.split(" "),D1e=(e,t,n,r)=>{En(hQ(t),i=>{e.removeEventListener(i,n,r)})},qr=(e,t,n,r)=>{var i;const o=M1e(),s=(i=o&&r&&r.S)!=null?i:o,l=r&&r.$||!1,c=r&&r.C||!1,d=[],f=o?{passive:s,capture:l}:l;return En(hQ(t),h=>{const p=c?g=>{e.removeEventListener(h,p,l),n&&n(g)}:n;Fn(d,D1e.bind(null,e,h,p,l)),e.addEventListener(h,p,f)}),rc.bind(0,d)},pQ=e=>e.stopPropagation(),mQ=e=>e.preventDefault(),L1e={x:0,y:0},oL=e=>{const t=e?Dl(e):0;return t?{x:t.left+window.pageYOffset,y:t.top+window.pageXOffset}:L1e},V8=(e,t)=>{En($s(t)?t:[t],e)},rz=e=>{const t=new Map,n=(o,s)=>{if(o){const l=t.get(o);V8(c=>{l&&l[c?"delete":"clear"](c)},s)}else t.forEach(l=>{l.clear()}),t.clear()},r=(o,s)=>{if(Qd(o)){const d=t.get(o)||new Set;return t.set(o,d),V8(f=>{pl(f)&&d.add(f)},s),n.bind(0,o,s)}Y4(s)&&s&&n();const l=Fs(o),c=[];return En(l,d=>{const f=o[d];f&&Fn(c,r(d,f))}),rc.bind(0,c)},i=(o,s)=>{const l=t.get(o);En(bp(l),c=>{s&&!K4(s)?c.apply(0,s):c()})};return r(e||{}),[r,n,i]},q8=e=>JSON.stringify(e,(t,n)=>{if(pl(n))throw new Error;return n}),N1e={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},gQ=(e,t)=>{const n={},r=Fs(t).concat(Fs(e));return En(r,i=>{const o=e[i],s=t[i];if(e1(o)&&e1(s))Tr(n[i]={},gQ(o,s)),Q4(n[i])&&delete n[i];else if(dk(t,i)&&s!==o){let l=!0;if($s(o)||$s(s))try{q8(o)===q8(s)&&(l=!1)}catch{}l&&(n[i]=s)}}),n},K1="data-overlayscrollbars",vQ="os-environment",yQ=`${vQ}-flexbox-glue`,B1e=`${yQ}-max`,bQ="os-scrollbar-hidden",sL=`${K1}-initialize`,Za=K1,xQ=`${Za}-overflow-x`,wQ=`${Za}-overflow-y`,Jm="overflowVisible",$1e="scrollbarHidden",X8="scrollbarPressed",zE="updating",Ju=`${K1}-viewport`,aL="arrange",_Q="scrollbarHidden",Zm=Jm,gF=`${K1}-padding`,F1e=Zm,Y8=`${K1}-content`,iz="os-size-observer",z1e=`${iz}-appear`,j1e=`${iz}-listener`,U1e="os-trinsic-observer",H1e="os-no-css-vars",W1e="os-theme-none",Qo="os-scrollbar",G1e=`${Qo}-rtl`,V1e=`${Qo}-horizontal`,q1e=`${Qo}-vertical`,SQ=`${Qo}-track`,oz=`${Qo}-handle`,X1e=`${Qo}-visible`,Y1e=`${Qo}-cornerless`,K8=`${Qo}-transitionless`,Q8=`${Qo}-interaction`,J8=`${Qo}-unusable`,vF=`${Qo}-auto-hide`,Z8=`${vF}-hidden`,eH=`${Qo}-wheel`,K1e=`${SQ}-interactive`,Q1e=`${oz}-interactive`,EQ={},xp=()=>EQ,J1e=e=>{const t=[];return En($s(e)?e:[e],n=>{const r=Fs(n);En(r,i=>{Fn(t,EQ[i]=n[i])})}),t},Z1e="__osOptionsValidationPlugin",ewe="__osSizeObserverPlugin",sz="__osScrollbarsHidingPlugin",twe="__osClickScrollPlugin";let lL;const tH=(e,t,n,r)=>{ra(e,t);const i=kS(t),o=t1(t),s=FE(n);return r&&Yl(t),{x:o.h-i.h+s.h,y:o.w-i.w+s.w}},nwe=e=>{let t=!1;const n=Bd(e,bQ);try{t=Qi(e,T1e("scrollbar-width"))==="none"||window.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},rwe=(e,t)=>{const n="hidden";Qi(e,{overflowX:n,overflowY:n,direction:"rtl"}),al(e,0);const r=oL(e),i=oL(t);al(e,-999);const o=oL(t);return{i:r.x===i.x,n:i.x!==o.x}},iwe=(e,t)=>{const n=Bd(e,yQ),r=Dl(e),i=Dl(t),o=U8(i,r,!0),s=Bd(e,B1e),l=Dl(e),c=Dl(t),d=U8(c,l,!0);return n(),s(),o&&d},owe=()=>{const{body:e}=document,n=aQ(`
`)[0],r=n.firstChild,[i,,o]=rz(),[s,l]=Ja({o:tH(e,n,r),u:fQ},tH.bind(0,e,n,r,!0)),[c]=l(),d=nwe(n),f={x:c.x===0,y:c.y===0},h={elements:{host:null,padding:!d,viewport:b=>d&&b===b.ownerDocument.body&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},p=Tr({},N1e),g=Tr.bind(0,{},p),v=Tr.bind(0,{},h),y={k:c,I:f,A:d,H:Qi(n,"zIndex")==="-1",B:!!pF,V:rwe(n,r),Y:iwe(n,r),j:i.bind(0,"z"),N:i.bind(0,"r"),q:v,F:b=>Tr(h,b)&&v(),G:g,X:b=>Tr(p,b)&&g(),U:Tr({},h),W:Tr({},p)},S=window.addEventListener,_=tz(b=>o(b?"z":"r"),{g:33,v:99});if(Oo(n,"style"),Yl(n),S("resize",_.bind(0,!1)),!d&&(!f.x||!f.y)){let b;S("resize",()=>{const x=xp()[sz];b=b||x&&x.R(),b&&b(y,s,_.bind(0,!0))})}return y},Jo=()=>(lL||(lL=owe()),lL),az=(e,t)=>pl(t)?t.apply(0,e):t,swe=(e,t,n,r)=>{const i=Mu(r)?n:r;return az(e,i)||t.apply(0,e)},CQ=(e,t,n,r)=>{const i=Mu(r)?n:r,o=az(e,i);return!!o&&(px(o)?o:t.apply(0,e))},awe=(e,t,n)=>{const{nativeScrollbarsOverlaid:r,body:i}=n||{},{I:o,A:s}=Jo(),{nativeScrollbarsOverlaid:l,body:c}=t,d=r??l,f=Mu(i)?c:i,h=(o.x||o.y)&&d,p=e&&(ak(f)?!s:f);return!!h||!!p},lz=new WeakMap,lwe=(e,t)=>{lz.set(e,t)},cwe=e=>{lz.delete(e)},TQ=e=>lz.get(e),nH=(e,t)=>e?t.split(".").reduce((n,r)=>n&&dk(n,r)?n[r]:void 0,e):void 0,yF=(e,t,n)=>r=>[nH(e,r),n||nH(t,r)!==void 0],kQ=e=>{let t=e;return[()=>t,n=>{t=Tr({},t,n)}]},n_="tabindex",r_=tp.bind(0,""),cL=e=>{ra(Cu(e),J4(e)),Yl(e)},uwe=e=>{const t=Jo(),{q:n,A:r}=t,i=xp()[sz],o=i&&i.T,{elements:s}=n(),{host:l,padding:c,viewport:d,content:f}=s,h=px(e),p=h?{}:e,{elements:g}=p,{host:v,padding:y,viewport:S,content:_}=g||{},b=h?e:p.target,x=NE(b,"textarea"),E=b.ownerDocument,A=E.documentElement,R=b===E.body,k=E.defaultView,O=swe.bind(0,[b]),L=CQ.bind(0,[b]),N=az.bind(0,[b]),H=O.bind(0,r_,d),W=L.bind(0,r_,f),z=H(S),D=z===b,F=D&&R,j=!D&&W(_),V=!D&&px(z)&&z===j,G=V&&!!N(f),K=G?H():z,Y=G?j:W(),ie=F?A:V?K:z,ce=x?O(r_,l,v):b,ue=F?ie:ce,se=V?Y:j,Q=E.activeElement,ae=!D&&k.top===k&&Q===b,le={Z:b,J:ue,K:ie,tt:!D&&L(r_,c,y),nt:se,ot:!D&&!r&&o&&o(t),st:F?A:ie,et:F?E:ie,ct:k,rt:E,lt:x,it:R,ut:h,ft:D,dt:V,_t:(it,pt)=>b1e(ie,D?Za:Ju,D?pt:it),ht:(it,pt,mt)=>ep(ie,D?Za:Ju,D?pt:it,mt)},he=Fs(le).reduce((it,pt)=>{const mt=le[pt];return Fn(it,mt&&px(mt)&&!Cu(mt)?mt:!1)},[]),pe=it=>it?uk(he,it)>-1:null,{Z:ve,J:ye,tt:xe,K:me,nt:be,ot:Qe}=le,qe=[()=>{Oo(ye,Za),Oo(ye,sL),Oo(ve,sL),R&&(Oo(A,Za),Oo(A,sL))}],at=x&&pe(ye);let Lt=x?ve:J4([be,me,xe,ye,ve].find(it=>pe(it)===!1));const Ie=F?ve:be||me;return[le,()=>{_o(ye,Za,D?"viewport":"host"),_o(xe,gF,""),_o(be,Y8,""),D||_o(me,Ju,"");const it=R&&!D?Bd(Cu(b),bQ):Es;if(at&&(z8(ve,ye),Fn(qe,()=>{z8(ye,ve),Yl(ye)})),ra(Ie,Lt),ra(ye,xe),ra(xe||ye,!D&&me),ra(me,be),Fn(qe,()=>{it(),Oo(xe,gF),Oo(be,Y8),Oo(me,xQ),Oo(me,wQ),Oo(me,Ju),pe(be)&&cL(be),pe(me)&&cL(me),pe(xe)&&cL(xe)}),r&&!D&&(ep(me,Ju,_Q,!0),Fn(qe,Oo.bind(0,me,Ju))),Qe&&(_1e(me,Qe),Fn(qe,Yl.bind(0,Qe))),ae){const pt=_o(me,n_);_o(me,n_,"-1"),me.focus();const mt=()=>pt?_o(me,n_,pt):Oo(me,n_),_e=qr(E,"pointerdown keydown",()=>{mt(),_e()});Fn(qe,[mt,_e])}else Q&&Q.focus&&Q.focus();Lt=0},rc.bind(0,qe)]},dwe=(e,t)=>{const{nt:n}=e,[r]=t;return i=>{const{Y:o}=Jo(),{gt:s}=r(),{vt:l}=i,c=(n||!o)&&l;return c&&Qi(n,{height:s?"":"100%"}),{wt:c,bt:c}}},fwe=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ft:l}=e,[c,d]=Ja({u:R1e,o:W8()},W8.bind(0,i,"padding",""));return(f,h,p)=>{let[g,v]=d(p);const{A:y,Y:S}=Jo(),{yt:_}=n(),{wt:b,bt:x,St:E}=f,[A,R]=h("paddingAbsolute");(b||v||!S&&x)&&([g,v]=c(p));const O=!l&&(R||E||v);if(O){const L=!A||!o&&!y,N=g.r+g.l,H=g.t+g.b,W={marginRight:L&&!_?-N:0,marginBottom:L?-H:0,marginLeft:L&&_?-N:0,top:L?-g.t:0,right:L?_?-g.r:"auto":0,left:L?_?"auto":-g.l:0,width:L?`calc(100% + ${N}px)`:""},z={paddingTop:L?g.t:0,paddingRight:L?g.r:0,paddingBottom:L?g.b:0,paddingLeft:L?g.l:0};Qi(o||s,W),Qi(s,z),r({tt:g,$t:!L,P:o?z:Tr({},W,z)})}return{xt:O}}},{max:bF}=Math,Zu=bF.bind(0,0),AQ="visible",rH="hidden",hwe=42,i_={u:dQ,o:{w:0,h:0}},pwe={u:fQ,o:{x:rH,y:rH}},mwe=(e,t)=>{const n=window.devicePixelRatio%1!==0?1:0,r={w:Zu(e.w-t.w),h:Zu(e.h-t.h)};return{w:r.w>n?r.w:0,h:r.h>n?r.h:0}},o_=e=>e.indexOf(AQ)===0,gwe=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ot:l,ft:c,ht:d,it:f,ct:h}=e,{k:p,Y:g,A:v,I:y}=Jo(),S=xp()[sz],_=!c&&!v&&(y.x||y.y),b=f&&c,[x,E]=Ja(i_,FE.bind(0,s)),[A,R]=Ja(i_,$E.bind(0,s)),[k,O]=Ja(i_),[L,N]=Ja(i_),[H]=Ja(pwe),W=(G,K)=>{if(Qi(s,{height:""}),K){const{$t:Y,tt:J}=n(),{Ct:ie,M:ce}=G,ue=FE(i),se=kS(i),Q=Qi(s,"boxSizing")==="content-box",ae=Y||Q?J.b+J.t:0,le=!(y.x&&Q);Qi(s,{height:se.h+ue.h+(ie.x&&le?ce.x:0)-ae})}},z=(G,K)=>{const Y=!v&&!G?hwe:0,J=(pe,ve,ye)=>{const xe=Qi(s,pe),be=(K?K[pe]:xe)==="scroll";return[xe,be,be&&!v?ve?Y:ye:0,ve&&!!Y]},[ie,ce,ue,se]=J("overflowX",y.x,p.x),[Q,ae,le,he]=J("overflowY",y.y,p.y);return{Ot:{x:ie,y:Q},Ct:{x:ce,y:ae},M:{x:ue,y:le},D:{x:se,y:he}}},D=(G,K,Y,J)=>{const ie=(ae,le)=>{const he=o_(ae),pe=le&&he&&ae.replace(`${AQ}-`,"")||"";return[le&&!he?ae:"",o_(pe)?"hidden":pe]},[ce,ue]=ie(Y.x,K.x),[se,Q]=ie(Y.y,K.y);return J.overflowX=ue&&se?ue:ce,J.overflowY=Q&&ce?Q:se,z(G,J)},F=(G,K,Y,J)=>{const{M:ie,D:ce}=G,{x:ue,y:se}=ce,{x:Q,y:ae}=ie,{P:le}=n(),he=K?"marginLeft":"marginRight",pe=K?"paddingLeft":"paddingRight",ve=le[he],ye=le.marginBottom,xe=le[pe],me=le.paddingBottom;J.width=`calc(100% + ${ae+ve*-1}px)`,J[he]=-ae+ve,J.marginBottom=-Q+ye,Y&&(J[pe]=xe+(se?ae:0),J.paddingBottom=me+(ue?Q:0))},[j,V]=S?S.L(_,g,s,l,n,z,F):[()=>_,()=>[Es]];return(G,K,Y)=>{const{wt:J,Tt:ie,bt:ce,xt:ue,vt:se,St:Q}=G,{gt:ae,yt:le}=n(),[he,pe]=K("showNativeOverlaidScrollbars"),[ve,ye]=K("overflow"),xe=he&&y.x&&y.y,me=!c&&!g&&(J||ce||ie||pe||se),be=o_(ve.x),Qe=o_(ve.y),qe=be||Qe;let at=E(Y),Lt=R(Y),Ie=O(Y),ze=N(Y),it;if(pe&&v&&d(_Q,$1e,!xe),me&&(it=z(xe),W(it,ae)),J||ue||ce||Q||pe){qe&&d(Zm,Jm,!1);const[Re,Ue]=V(xe,le,it),[yt,Wt]=at=x(Y),[pn,$r]=Lt=A(Y),Or=kS(s);let Mr=pn,Fr=Or;Re(),($r||Wt||pe)&&Ue&&!xe&&j(Ue,pn,yt,le)&&(Fr=kS(s),Mr=$E(s));const Jr={w:Zu(bF(pn.w,Mr.w)+yt.w),h:Zu(bF(pn.h,Mr.h)+yt.h)},Zo={w:Zu((b?h.innerWidth:Fr.w+Zu(Or.w-pn.w))+yt.w),h:Zu((b?h.innerHeight+yt.h:Fr.h+Zu(Or.h-pn.h))+yt.h)};ze=L(Zo),Ie=k(mwe(Jr,Zo),Y)}const[pt,mt]=ze,[_e,je]=Ie,[Ye,$e]=Lt,[Ne,Rt]=at,ct={x:_e.w>0,y:_e.h>0},Ae=be&&Qe&&(ct.x||ct.y)||be&&ct.x&&!ct.y||Qe&&ct.y&&!ct.x;if(ue||Q||Rt||$e||mt||je||ye||pe||me){const Re={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},Ue=D(xe,ct,ve,Re),yt=j(Ue,Ye,Ne,le);c||F(Ue,le,yt,Re),me&&W(Ue,ae),c?(_o(i,xQ,Re.overflowX),_o(i,wQ,Re.overflowY)):Qi(s,Re)}ep(i,Za,Jm,Ae),ep(o,gF,F1e,Ae),c||ep(s,Ju,Zm,qe);const[ot,$t]=H(z(xe).Ot);return r({Ot:ot,zt:{x:pt.w,y:pt.h},Et:{x:_e.w,y:_e.h},At:ct}),{It:$t,Ht:mt,Lt:je}}},iH=(e,t,n)=>{const r={},i=t||{},o=Fs(e).concat(Fs(i));return En(o,s=>{const l=e[s],c=i[s];r[s]=!!(n||l||c)}),r},vwe=(e,t)=>{const{Z:n,K:r,ht:i,ft:o}=e,{A:s,I:l,Y:c}=Jo(),d=!s&&(l.x||l.y),f=[dwe(e,t),fwe(e,t),gwe(e,t)];return(h,p,g)=>{const v=iH(Tr({wt:!1,xt:!1,St:!1,vt:!1,Ht:!1,Lt:!1,It:!1,Tt:!1,bt:!1,Pt:!1},p),{},g),y=d||!c,S=y&&al(r),_=y&&vu(r);i("",zE,!0);let b=v;return En(f,x=>{b=iH(b,x(b,h,!!g)||{},g)}),al(r,S),vu(r,_),i("",zE),o||(al(n,0),vu(n,0)),b}},ywe=(e,t,n)=>{let r,i=!1;const o=()=>{i=!0},s=l=>{if(n){const c=n.reduce((d,f)=>{if(f){const[h,p]=f,g=p&&h&&(l?l(h):sQ(h,e));g&&g.length&&p&&Qd(p)&&Fn(d,[g,p.trim()],!0)}return d},[]);En(c,d=>En(d[0],f=>{const h=d[1],p=r.get(f)||[];if(e.contains(f)){const v=qr(f,h,y=>{i?(v(),r.delete(f)):t(y)});r.set(f,Fn(p,v))}else rc(p),r.delete(f)}))}};return n&&(r=new WeakMap,s()),[o,s]},oH=(e,t,n,r)=>{let i=!1;const{Mt:o,Dt:s,Rt:l,kt:c,Bt:d,Vt:f}=r||{},h=tz(()=>i&&n(!0),{g:33,v:99}),[p,g]=ywe(e,h,l),v=o||[],y=s||[],S=v.concat(y),_=(x,E)=>{const A=d||Es,R=f||Es,k=new Set,O=new Set;let L=!1,N=!1;if(En(x,H=>{const{attributeName:W,target:z,type:D,oldValue:F,addedNodes:j,removedNodes:V}=H,G=D==="attributes",K=D==="childList",Y=e===z,J=G&&Qd(W)?_o(z,W):0,ie=J!==0&&F!==J,ce=uk(y,W)>-1&&ie;if(t&&(K||!Y)){const ue=!G,se=G&&ie,Q=se&&c&&NE(z,c),le=(Q?!A(z,W,F,J):ue||se)&&!R(H,!!Q,e,r);En(j,he=>k.add(he)),En(V,he=>k.add(he)),N=N||le}!t&&Y&&ie&&!A(z,W,F,J)&&(O.add(W),L=L||ce)}),k.size>0&&g(H=>bp(k).reduce((W,z)=>(Fn(W,sQ(H,z)),NE(z,H)?Fn(W,z):W),[])),t)return!E&&N&&n(!1),[!1];if(O.size>0||L){const H=[bp(O),L];return!E&&n.apply(0,H),H}},b=new k1e(x=>_(x));return b.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:S,subtree:t,childList:t,characterData:t}),i=!0,[()=>{i&&(p(),b.disconnect(),i=!1)},()=>{if(i){h.m();const x=b.takeRecords();return!K4(x)&&_(x,!0)}}]},s_=3333333,RQ=(e,t,n)=>{const{Yt:r,Pt:i}=n||{},o=xp()[ewe],{V:s}=Jo(),c=aQ(`
`)[0],d=c.firstChild,f=kg.bind(0,e),[h]=Ja({o:!1,_:!0,u:(v,y)=>!(!v||!Nm(v)&&Nm(y))}),p=v=>{const y=$s(v)&&v.length>0&&e1(v[0]),S=!y&&Y4(v[0]);let _=!1,b=!1,x=!0;if(y){const[E,,A]=h(v.pop().contentRect),R=Nm(E),k=Nm(A);_=!A&&!!k||!R,b=!k&&R,x=!_}else S?[,x]=v:b=v===!0;if(r&&x){const E=S?v[0]:kg(c);al(c,E?s.n?-s_:s.i?0:s_:s_),vu(c,s_)}_||t({wt:!S,jt:S?v:void 0,Pt:!!b})},g=[];return[()=>{rc(g),Yl(c)},()=>{let v=i&&p;if(Lm){const y=new Lm(p);y.observe(d),Fn(g,()=>{y.disconnect()})}else if(o){const[y,S]=o.O(d,p,i);v=y,Fn(g,S)}if(r){const[y]=Ja({o:void 0},f);Fn(g,qr(c,"scroll",S=>{const _=y(),[b,x,E]=_;x&&(ez(d,"ltr rtl"),Bd(d,b?"rtl":"ltr"),p([!!b,x,E])),pQ(S)}))}v&&(Bd(c,z1e),Fn(g,qr(c,"animationstart",v,{C:!!Lm}))),(Lm||o)&&ra(e,c)}]},bwe=e=>e.h===0||e.isIntersecting||e.intersectionRatio>0,xwe=(e,t)=>{let n;const r=tp(U1e),i=[],[o]=Ja({o:!1}),s=(c,d)=>{if(c){const f=o(bwe(c)),[,h]=f;return h&&!d&&t(f)&&[f]}},l=(c,d)=>c&&c.length>0&&s(c.pop(),d);return[()=>{rc(i),Yl(r)},()=>{if(j8)n=new j8(c=>l(c),{root:e}),n.observe(r),Fn(i,()=>{n.disconnect()});else{const c=()=>{const h=t1(r);s(h)},[d,f]=RQ(r,c);Fn(i,d),f(),c()}ra(e,r)},()=>n&&l(n.takeRecords(),!0)]},sH=`[${Za}]`,wwe=`[${Ju}]`,uL=["tabindex"],aH=["wrap","cols","rows"],dL=["id","class","style","open"],_we=(e,t,n)=>{let r,i,o;const{J:s,K:l,nt:c,lt:d,ft:f,_t:h,ht:p}=e,{Y:g}=Jo(),[v]=Ja({u:dQ,o:{w:0,h:0}},()=>{const F=h(Zm,Jm),j=h(aL,""),V=j&&al(l),G=j&&vu(l);p(Zm,Jm),p(aL,""),p("",zE,!0);const K=$E(c),Y=$E(l),J=FE(l);return p(Zm,Jm,F),p(aL,"",j),p("",zE),al(l,V),vu(l,G),{w:Y.w+K.w+J.w,h:Y.h+K.h+J.h}}),y=d?aH:dL.concat(aH),S=tz(n,{g:()=>r,v:()=>i,p(F,j){const[V]=F,[G]=j;return[Fs(V).concat(Fs(G)).reduce((K,Y)=>(K[Y]=V[Y]||G[Y],K),{})]}}),_=F=>{En(F||uL,j=>{if(uk(uL,j)>-1){const V=_o(s,j);Qd(V)?_o(l,j,V):Oo(l,j)}})},b=(F,j)=>{const[V,G]=F,K={vt:G};return t({gt:V}),!j&&n(K),K},x=({wt:F,jt:j,Pt:V})=>{const G=!F||V?n:S;let K=!1;if(j){const[Y,J]=j;K=J,t({yt:Y})}G({wt:F,Pt:V,St:K})},E=(F,j)=>{const[,V]=v(),G={bt:V};return V&&!j&&(F?n:S)(G),G},A=(F,j,V)=>{const G={Tt:j};return j?!V&&S(G):f||_(F),G},[R,k,O]=c||!g?xwe(s,b):[Es,Es,Es],[L,N]=f?[Es,Es]:RQ(s,x,{Pt:!0,Yt:!0}),[H,W]=oH(s,!1,A,{Dt:dL,Mt:dL.concat(uL)});let z;const D=f&&Lm&&new Lm(F=>{const j=F[F.length-1].contentRect,V=Nm(j),K=!Nm(z)&&V;x({wt:!0,Pt:K}),z=j});return[()=>{R(),L(),o&&o[0](),D&&D.disconnect(),H()},()=>{D&&D.observe(s),_(),N(),k()},()=>{const F={},j=W(),V=O(),G=o&&o[1]();return j&&Tr(F,A.apply(0,Fn(j,!0))),V&&Tr(F,b.apply(0,Fn(V,!0))),G&&Tr(F,E.apply(0,Fn(G,!0))),F},F=>{const[j]=F("update.ignoreMutation"),[V,G]=F("update.attributes"),[K,Y]=F("update.elementEvents"),[J,ie]=F("update.debounce"),ce=Y||G,ue=se=>pl(j)&&j(se);if(ce&&(o&&(o[1](),o[0]()),o=oH(c||l,!0,E,{Mt:y.concat(V||[]),Rt:K,kt:sH,Vt:(se,Q)=>{const{target:ae,attributeName:le}=se;return(!Q&&le&&!f?w1e(ae,sH,wwe):!1)||!!Dm(ae,`.${Qo}`)||!!ue(se)}})),ie)if(S.m(),$s(J)){const se=J[0],Q=J[1];r=Td(se)&&se,i=Td(Q)&&Q}else Td(J)?(r=J,i=!1):(r=!1,i=!1)}]},lH={x:0,y:0},Swe=e=>({tt:{t:0,r:0,b:0,l:0},$t:!1,P:{marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},zt:lH,Et:lH,Ot:{x:"hidden",y:"hidden"},At:{x:!1,y:!1},gt:!1,yt:kg(e.J)}),Ewe=(e,t)=>{const n=yF(t,{}),[r,i,o]=rz(),[s,l,c]=uwe(e),d=kQ(Swe(s)),[f,h]=d,p=vwe(s,d),g=(x,E,A)=>{const k=Fs(x).some(O=>!!x[O])||!Q4(E)||A;return k&&o("u",[x,E,A]),k},[v,y,S,_]=_we(s,h,x=>g(p(n,x),{},!1)),b=f.bind(0);return b.Nt=x=>r("u",x),b.qt=()=>{const{Z:x,K:E,rt:A,it:R}=s,k=R?A.documentElement:x,O=al(k),L=vu(k);y(),l(),al(E,O),vu(E,L)},b.Ft=s,[(x,E)=>{const A=yF(t,x,E);return _(A),g(p(A,S(),E),x,!!E)},b,()=>{i(),v(),c()}]},{round:cH}=Math,Cwe=e=>{const{width:t,height:n}=Dl(e),{w:r,h:i}=t1(e);return{x:cH(t)/r||1,y:cH(n)/i||1}},Twe=(e,t,n)=>{const r=t.scrollbars,{button:i,isPrimary:o,pointerType:s}=e,{pointers:l}=r;return i===0&&o&&r[n?"dragScroll":"clickScroll"]&&(l||[]).includes(s)},uH="pointerup pointerleave pointercancel lostpointercapture",kwe=(e,t)=>qr(e,"mousedown",qr.bind(0,t,"click",pQ,{C:!0,$:!0}),{$:!0}),Awe=(e,t,n,r,i,o,s)=>{const{V:l}=Jo(),{Gt:c,Xt:d,Ut:f}=r,h=`scroll${s?"Left":"Top"}`,p=`client${s?"X":"Y"}`,g=s?"width":"height",v=s?"left":"top",y=s?"w":"h",S=s?"x":"y",_=(b,x)=>E=>{const{Et:A}=o(),R=t1(d)[y]-t1(c)[y],O=x*E/R*A[S],N=kg(f)&&s?l.n||l.i?1:-1:1;i[h]=b+O*N};return qr(d,"pointerdown",b=>{const x=Dm(b.target,`.${oz}`)===c,E=x?c:d;if(ep(t,Za,X8,!0),Twe(b,e,x)){const A=!x&&b.shiftKey,R=()=>Dl(c),k=()=>Dl(d),O=(K,Y)=>(K||R())[v]-(Y||k())[v],L=_(i[h]||0,1/Cwe(i)[S]),N=b[p],H=R(),W=k(),z=H[g],D=O(H,W)+z/2,F=N-W[v],j=x?0:F-D,V=K=>{rc(G),E.releasePointerCapture(K.pointerId)},G=[ep.bind(0,t,Za,X8),qr(n,uH,V),qr(n,"selectstart",K=>mQ(K),{S:!1}),qr(d,uH,V),qr(d,"pointermove",K=>{const Y=K[p]-N;(x||A)&&L(j+Y)})];if(A)L(j);else if(!x){const K=xp()[twe];K&&Fn(G,K.O(L,O,j,z,F))}E.setPointerCapture(b.pointerId)}})},Rwe=(e,t)=>(n,r,i,o,s,l,c)=>{const{Ut:d}=n,[f,h]=Mh(333),p=!!s.scrollBy;let g=!0;return rc.bind(0,[qr(d,"pointerenter",()=>{r(Q8,!0)}),qr(d,"pointerleave pointercancel",()=>{r(Q8)}),qr(d,"wheel",v=>{const{deltaX:y,deltaY:S,deltaMode:_}=v;p&&g&&_===0&&Cu(d)===o&&s.scrollBy({left:y,top:S,behavior:"smooth"}),g=!1,r(eH,!0),f(()=>{g=!0,r(eH)}),mQ(v)},{S:!1,$:!0}),kwe(d,i),Awe(e,o,i,n,s,t,c),h])},{min:jE,max:xF,round:Iwe}=Math,IQ=(e,t,n,r)=>{if(r){const l=n?"x":"y",{Et:c,zt:d}=r,f=d[l],h=c[l];return xF(0,jE(1,f/(f+h)))}const i=n?"width":"height",o=Dl(e)[i],s=Dl(t)[i];return xF(0,jE(1,o/s))},Pwe=(e,t,n,r,i,o)=>{const{V:s}=Jo(),l=o?"x":"y",c=o?"Left":"Top",{Et:d}=r,f=Iwe(d[l]),h=jE(f,xF(0,n[`scroll${c}`])),p=o&&i,g=s.i?h:f-h,y=jE(1,(p?g:h)/f),S=IQ(e,t,o);return 1/S*(1-S)*y},PQ=(e,t,n,r)=>t&&e.animate(n,{timeline:t,composite:r}),Owe=(e,t)=>({transform:[Ag("0%",t),Ag(t&&e?"100%":"-100%",t)],[t?e?"right":"left":"top"]:["0%","100%"]}),Mwe=e=>`${Math.max(0,e-.5)}px`,dH=(e,t,n,r)=>PQ(e,t,{transform:[Ag("0px",r),Ag(Mwe(n),r)]},"add"),fH=(e,t)=>pF?new pF({source:e,axis:t}):null,Dwe=(e,t,n)=>{const{q:r,H:i}=Jo(),{scrollbars:o}=r(),{slot:s}=o,{rt:l,Z:c,J:d,K:f,ut:h,st:p,it:g,ft:v}=t,{scrollbars:y}=h?{}:e,{slot:S}=y||{},_=new Map,b=fH(p,"x"),x=fH(p,"y"),E=CQ([c,d,f],()=>v&&g?c:d,s,S),A=se=>v&&!g&&Cu(se)===f,R=se=>{_.forEach((Q,ae)=>{(se?uk($s(se)?se:[se],ae)>-1:!0)&&((Q||[]).forEach(he=>{he&&he.cancel()}),_.delete(ae))})},k=(se,Q,ae)=>{const le=ae?Bd:ez;En(se,he=>{le(he.Ut,Q)})},O=(se,Q)=>{En(se,ae=>{const[le,he]=Q(ae);Qi(le,he)})},L=(se,Q,ae)=>{O(se,le=>{const{Gt:he,Xt:pe}=le;return[he,{[ae?"width":"height"]:`${(IQ(he,pe,ae,Q)*100).toFixed(3)}%`}]})},N=(se,Q,ae)=>{!x&&!x&&O(se,le=>{const{Gt:he,Xt:pe,Ut:ve}=le,ye=Pwe(he,pe,p,Q,kg(ve),ae);return[he,{transform:ye===ye?Ag(`${(ye*100).toFixed(3)}%`,ae):""}]})},H=se=>{const{Ut:Q}=se,ae=A(Q)&&Q;return[ae,{transform:ae?Ag([`${al(p)}px`,`${vu(p)}px`]):""}]},W=[],z=[],D=[],F=(se,Q,ae)=>{const le=Y4(ae),he=le?ae:!0,pe=le?!ae:!0;he&&k(z,se,Q),pe&&k(D,se,Q)},j=se=>{L(z,se,!0),L(D,se)},V=se=>{N(z,se,!0),N(D,se)},G=()=>{const se=(Q,{Ut:ae,Gt:le})=>{R(le),_.set(le,[PQ(le,Q?b:x,Owe(Q&&kg(ae),Q))])};z.forEach(se.bind(0,!0)),D.forEach(se.bind(0,!1))},K=()=>{!x&&!x&&(v&&O(z,H),v&&O(D,H))},Y=({Et:se})=>{D.concat(z).forEach(({Ut:Q})=>{R(Q),A(Q)&&_.set(Q,[dH(Q,b,se.x,!0),dH(Q,x,se.y)])})},J=se=>{const Q=se?V1e:q1e,ae=se?z:D,le=K4(ae)?K8:"",he=tp(`${Qo} ${Q} ${le}`),pe=tp(SQ),ve=tp(oz),ye={Ut:he,Xt:pe,Gt:ve};return i||Bd(he,H1e),ra(he,pe),ra(pe,ve),Fn(ae,ye),Fn(W,[Yl.bind(0,he),R,n(ye,F,l,d,p,se?b:x,se)]),ye},ie=J.bind(0,!0),ce=J.bind(0,!1),ue=()=>{ra(E,z[0].Ut),ra(E,D[0].Ut),BE(()=>{F(K8)},300)};return ie(),ce(),[{Wt:j,Zt:V,Jt:G,Kt:Y,Qt:K,tn:F,nn:{B:b,sn:z,en:ie,cn:O.bind(0,z)},rn:{B:x,sn:D,en:ce,cn:O.bind(0,D)}},ue,rc.bind(0,W)]},fL=e=>e.pointerType==="mouse",Lwe=(e,t,n,r)=>{let i,o,s,l,c,d=Es,f=0;const h=kQ({}),[p]=h,[g,v]=Mh(),[y,S]=Mh(),[_,b]=Mh(100),[x,E]=Mh(100),[A,R]=Mh(100),[k,O]=Mh(()=>f),[L,N,H]=Dwe(e,n.Ft,Rwe(t,n)),{J:W,et:z,it:D}=n.Ft,{tn:F,Wt:j,Zt:V,Jt:G,Kt:K,Qt:Y}=L,J=Q=>{F(vF,Q,!0),F(vF,Q,!1)},ie=(Q,ae)=>{if(O(),Q)F(Z8);else{const le=()=>F(Z8,!0);f>0&&!ae?k(le):le()}},ce=Q=>{fL(Q)&&(l=o,l&&ie(!0))},ue=[b,O,E,R,S,v,H,qr(W,"pointerover",ce,{C:!0}),qr(W,"pointerenter",ce),qr(W,"pointerleave",Q=>{fL(Q)&&(l=!1,o&&ie(!1))}),qr(W,"pointermove",Q=>{fL(Q)&&i&&g(()=>{b(),ie(!0),x(()=>{i&&ie(!1)})})}),qr(z,"scroll",Q=>{y(()=>{V(n()),s&&ie(!0),_(()=>{s&&!l&&ie(!1)})}),r(Q),Y()})],se=p.bind(0);return se.Ft=L,se.qt=N,[(Q,ae,le)=>{const{Ht:he,Lt:pe,It:ve,St:ye,Pt:xe}=le,{I:me}=Jo(),be=yF(t,Q,ae),Qe=n(),{Et:qe,Ot:at,yt:Lt,At:Ie}=Qe,[ze,it]=be("showNativeOverlaidScrollbars"),[pt,mt]=be("scrollbars.theme"),[_e,je]=be("scrollbars.visibility"),[Ye,$e]=be("scrollbars.autoHide"),[Ne,Rt]=be("scrollbars.autoHideSuspend"),[ct]=be("scrollbars.autoHideDelay"),[Ae,ot]=be("scrollbars.dragScroll"),[$t,Re]=be("scrollbars.clickScroll"),Ue=xe&&!ae,yt=Ie.x||Ie.y,Wt=he||pe||ye,pn=ve||je,$r=ze&&me.x&&me.y,Or=(Mr,Fr)=>{const Jr=_e==="visible"||_e==="auto"&&Mr==="scroll";return F(X1e,Jr,Fr),Jr};if(f=ct,Ue&&(Ne&&yt?(J(!1),d(),A(()=>{d=qr(z,"scroll",J.bind(0,!0),{C:!0})})):J(!0)),it&&F(W1e,$r),mt&&(F(c),F(pt,!0),c=pt),Rt&&!Ne&&J(!0),$e&&(i=Ye==="move",o=Ye==="leave",s=Ye!=="never",ie(!s,!0)),ot&&F(Q1e,Ae),Re&&F(K1e,$t),pn){const Mr=Or(at.x,!0),Fr=Or(at.y,!1);F(Y1e,!(Mr&&Fr))}Wt&&(j(Qe),V(Qe),G(Qe),K(Qe),Y(),F(J8,!qe.x,!0),F(J8,!qe.y,!1),F(G1e,Lt&&!D))},se,()=>{rc(ue),d()}]},OQ=(e,t,n)=>{pl(e)&&e(t||void 0,n||void 0)},fd=(e,t,n)=>{const{G:r,q:i,j:o,N:s}=Jo(),l=xp(),c=px(e),d=c?e:e.target,f=TQ(d);if(t&&!f){let h=!1;const p=z=>{const D=xp()[Z1e],F=D&&D.O;return F?F(z,!0):z},g=Tr({},r(),p(t)),[v,y,S]=rz(n),[_,b,x]=Ewe(e,g),[E,A,R]=Lwe(e,g,b,z=>S("scroll",[W,z])),k=(z,D)=>_(z,!!D),O=k.bind(0,{},!0),L=o(O),N=s(O),H=z=>{cwe(d),L(),N(),R(),x(),h=!0,S("destroyed",[W,!!z]),y()},W={options(z,D){if(z){const F=D?r():{},j=gQ(g,Tr(F,p(z)));Q4(j)||(Tr(g,j),k(j))}return Tr({},g)},on:v,off:(z,D)=>{z&&D&&y(z,D)},state(){const{zt:z,Et:D,Ot:F,At:j,tt:V,$t:G,yt:K}=b();return Tr({},{overflowEdge:z,overflowAmount:D,overflowStyle:F,hasOverflow:j,padding:V,paddingAbsolute:G,directionRTL:K,destroyed:h})},elements(){const{Z:z,J:D,tt:F,K:j,nt:V,st:G,et:K}=b.Ft,{nn:Y,rn:J}=A.Ft,ie=ue=>{const{Gt:se,Xt:Q,Ut:ae}=ue;return{scrollbar:ae,track:Q,handle:se}},ce=ue=>{const{sn:se,en:Q}=ue,ae=ie(se[0]);return Tr({},ae,{clone:()=>{const le=ie(Q());return E({},!0,{}),le}})};return Tr({},{target:z,host:D,padding:F||j,viewport:j,content:V||j,scrollOffsetElement:G,scrollEventElement:K,scrollbarHorizontal:ce(Y),scrollbarVertical:ce(J)})},update:z=>k({},z),destroy:H.bind(0)};return b.Nt((z,D,F)=>{E(D,F,z)}),lwe(d,W),En(Fs(l),z=>OQ(l[z],0,W)),awe(b.Ft.it,i().cancel,!c&&e.cancel)?(H(!0),W):(b.qt(),A.qt(),S("initialized",[W]),b.Nt((z,D,F)=>{const{wt:j,St:V,vt:G,Ht:K,Lt:Y,It:J,bt:ie,Tt:ce}=z;S("updated",[W,{updateHints:{sizeChanged:j,directionChanged:V,heightIntrinsicChanged:G,overflowEdgeChanged:K,overflowAmountChanged:Y,overflowStyleChanged:J,contentMutation:ie,hostMutation:ce},changedOptions:D,force:F}])}),W.update(!0),W)}return f};fd.plugin=e=>{En(J1e(e),t=>OQ(t,fd))};fd.valid=e=>{const t=e&&e.elements,n=pl(t)&&t();return dF(n)&&!!TQ(n.target)};fd.env=()=>{const{k:e,I:t,A:n,V:r,Y:i,H:o,B:s,U:l,W:c,q:d,F:f,G:h,X:p}=Jo();return Tr({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:i,cssCustomProperties:o,scrollTimeline:s,staticDefaultInitialization:l,staticDefaultOptions:c,getDefaultInitialization:d,setDefaultInitialization:f,getDefaultOptions:h,setDefaultOptions:p})};const Nwe=()=>{if(typeof window>"u"){const d=()=>{};return[d,d]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",i=n.requestAnimationFrame,o=n.cancelAnimationFrame,s=r?n.requestIdleCallback:i,l=r?n.cancelIdleCallback:o,c=()=>{l(e),o(t)};return[(d,f)=>{c(),e=s(r?()=>{c(),t=i(d)}:d,typeof f=="object"?f:{timeout:2233})},c]},MQ=e=>{const{options:t,events:n,defer:r}=e||{},[i,o]=I.useMemo(Nwe,[]),s=I.useRef(null),l=I.useRef(r),c=I.useRef(t),d=I.useRef(n);return I.useEffect(()=>{l.current=r},[r]),I.useEffect(()=>{const{current:f}=s;c.current=t,fd.valid(f)&&f.options(t||{},!0)},[t]),I.useEffect(()=>{const{current:f}=s;d.current=n,fd.valid(f)&&f.on(n||{},!0)},[n]),I.useEffect(()=>()=>{var f;o(),(f=s.current)==null||f.destroy()},[]),I.useMemo(()=>[f=>{const h=s.current;if(fd.valid(h))return;const p=l.current,g=c.current||{},v=d.current||{},y=()=>s.current=fd(f,g,v);p?i(y,p):y()},()=>s.current],[])},Bwe=(e,t)=>{const{element:n="div",options:r,events:i,defer:o,children:s,...l}=e,c=n,d=I.useRef(null),f=I.useRef(null),[h,p]=I.useState(!1),[g,v]=MQ({options:r,events:i,defer:o});return I.useEffect(()=>{p(!0)},[]),I.useEffect(()=>{const{current:y}=d,{current:S}=f;return h&&y&&S&&g({target:y,elements:{viewport:S,content:S}}),()=>{var _;return(_=v())==null?void 0:_.destroy()}},[h,g,n]),I.useImperativeHandle(t,()=>({osInstance:v,getElement:()=>d.current}),[]),de.createElement(c,{"data-overlayscrollbars-initialize":"",ref:d,...l},h?de.createElement("div",{ref:f,"data-overlayscrollbars-contents":!0},s):s)},$we=I.forwardRef(Bwe),rv=I.forwardRef(({children:e,x:t,y:n,px:r=6,...i},o)=>{const{palette:s,spacing:l}=In(),c=Zx({"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${l(r)})`,marginTop:l(r)}}),d=I.useCallback(f=>{if(o&&f){const h=f.elements().viewport;h&&(typeof o=="function"?o(h):o.current=h)}},[o]);return C.jsx($we,{options:{overflow:{x:t?"scroll":"hidden",y:n?"scroll":"hidden"},scrollbars:{autoHide:"move",theme:s.mode==="dark"?"os-theme-light":"os-theme-dark"}},...i,className:`${c} ${i.className}`,events:{initialized:d},children:e})});var DQ={exports:{}},Qn={};/** @license React v17.0.2 + */function En(e,t){if(lk(e))for(let n=0;nt(e[n],n,e));return e}function Ji(e,t){const n=Qd(t);if($s(t)||n){let i=n?"":{};if(e){const o=window.getComputedStyle(e,null);i=n?H8(e,o,t):t.reduce((s,l)=>(s[l]=H8(e,o,l),s),i)}return i}e&&En(Fs(t),i=>O1e(e,i,t[i]))}const Ja=(e,t)=>{const{o:n,u:r,_:i}=e;let o=n,s;const l=(f,h)=>{const p=o,g=f,v=h||(r?!r(p,g):p!==g);return(v||i)&&(o=g,s=p),[o,v,s]};return[t?f=>l(t(o,s),f):l,f=>[o,!!f,s]]},Y1=()=>typeof window<"u",rQ=Y1()&&Node.ELEMENT_NODE,{toString:v1e,hasOwnProperty:nL}=Object.prototype,Mu=e=>e===void 0,ak=e=>e===null,y1e=e=>Mu(e)||ak(e)?`${e}`:v1e.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Td=e=>typeof e=="number",Qd=e=>typeof e=="string",Y4=e=>typeof e=="boolean",pl=e=>typeof e=="function",$s=e=>Array.isArray(e),e1=e=>typeof e=="object"&&!$s(e)&&!ak(e),lk=e=>{const t=!!e&&e.length,n=Td(t)&&t>-1&&t%1==0;return $s(e)||!pl(e)&&n?t>0&&e1(e)?t-1 in e:!0:!1},dF=e=>{if(!e||!e1(e)||y1e(e)!=="object")return!1;let t;const n="constructor",r=e[n],i=r&&r.prototype,o=nL.call(e,n),s=i&&nL.call(i,"isPrototypeOf");if(r&&!o&&!s)return!1;for(t in e);return Mu(t)||nL.call(e,t)},px=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===rQ:!1},ck=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===rQ:!1},uk=(e,t,n)=>e.indexOf(t,n),Fn=(e,t,n)=>(!n&&!Qd(t)&&lk(t)?Array.prototype.push.apply(e,t):e.push(t),e),bp=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Fn(n,r)}):En(e,r=>{Fn(n,r)}),n)},K4=e=>!!e&&e.length===0,rc=(e,t,n)=>{En(e,i=>i&&i.apply(void 0,t||[])),!n&&(e.length=0)},dk=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Fs=e=>e?Object.keys(e):[],Tr=(e,t,n,r,i,o,s)=>{const l=[t,n,r,i,o,s];return(typeof e!="object"||ak(e))&&!pl(e)&&(e={}),En(l,c=>{En(Fs(c),d=>{const f=c[d];if(e===f)return!0;const h=$s(f);if(f&&dF(f)){const p=e[d];let g=p;h&&!$s(p)?g=[]:!h&&!dF(p)&&(g={}),e[d]=Tr(g,f)}else e[d]=h?f.slice():f})}),e},Q4=e=>{for(const t in e)return!1;return!0},iQ=(e,t,n,r)=>{if(Mu(r))return n?n[e]:t;n&&(Qd(r)||Td(r))&&(n[e]=r)},So=(e,t,n)=>{if(Mu(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},oQ=(e,t)=>new Set((So(e,t)||"").split(" ")),Oo=(e,t)=>{e&&e.removeAttribute(t)},ep=(e,t,n,r)=>{if(n){const i=oQ(e,t);i[r?"add":"delete"](n);const o=bp(i).join(" ").trim();So(e,t,o)}},b1e=(e,t,n)=>oQ(e,t).has(n),al=(e,t)=>iQ("scrollLeft",0,e,t),vu=(e,t)=>iQ("scrollTop",0,e,t),fF=Y1()&&Element.prototype,sQ=(e,t)=>{const n=[],r=t?ck(t)&&t:document;return r?Fn(n,r.querySelectorAll(e)):n},x1e=(e,t)=>{const n=t?ck(t)&&t:document;return n?n.querySelector(e):null},NE=(e,t)=>ck(e)?(fF.matches||fF.msMatchesSelector).call(e,t):!1,J4=e=>e?bp(e.childNodes):[],Cu=e=>e&&e.parentElement,Dm=(e,t)=>{if(ck(e)){const n=fF.closest;if(n)return n.call(e,t);do{if(NE(e,t))return e;e=Cu(e)}while(e)}},w1e=(e,t,n)=>{const r=Dm(e,t),i=e&&x1e(n,r),o=Dm(i,t)===r;return r&&i?r===e||i===e||o&&Dm(Dm(e,n),t)!==r:!1},Z4=(e,t,n)=>{if(n&&e){let r=t,i;lk(n)?(i=document.createDocumentFragment(),En(n,o=>{o===r&&(r=o.previousSibling),i.appendChild(o)})):i=n,t&&(r?r!==t&&(r=r.nextSibling):r=e.firstChild),e.insertBefore(i,r||null)}},ra=(e,t)=>{Z4(e,null,t)},_1e=(e,t)=>{Z4(Cu(e),e,t)},z8=(e,t)=>{Z4(Cu(e),e&&e.nextSibling,t)},Yl=e=>{if(lk(e))En(bp(e),t=>Yl(t));else if(e){const t=Cu(e);t&&t.removeChild(e)}},tp=e=>{const t=document.createElement("div");return e&&So(t,"class",e),t},aQ=e=>{const t=tp();return t.innerHTML=e.trim(),En(J4(t),n=>Yl(n))},hF=e=>e.charAt(0).toUpperCase()+e.slice(1),S1e=()=>tp().style,E1e=["-webkit-","-moz-","-o-","-ms-"],C1e=["WebKit","Moz","O","MS","webkit","moz","o","ms"],rL={},iL={},T1e=e=>{let t=iL[e];if(dk(iL,e))return t;const n=hF(e),r=S1e();return En(E1e,i=>{const o=i.replace(/-/g,"");return!(t=[e,i+e,o+n,hF(o)+n].find(l=>r[l]!==void 0))}),iL[e]=t||""},nv=e=>{if(Y1()){let t=rL[e]||window[e];return dk(rL,e)||(En(C1e,n=>(t=t||window[n+hF(e)],!t)),rL[e]=t),t}},k1e=nv("MutationObserver"),j8=nv("IntersectionObserver"),Lm=nv("ResizeObserver"),lQ=nv("cancelAnimationFrame"),cQ=nv("requestAnimationFrame"),pF=nv("ScrollTimeline"),BE=Y1()&&window.setTimeout,mF=Y1()&&window.clearTimeout,A1e=/[^\x20\t\r\n\f]+/g,uQ=(e,t,n)=>{const r=e&&e.classList;let i,o=0,s=!1;if(r&&t&&Qd(t)){const l=t.match(A1e)||[];for(s=l.length>0;i=l[o++];)s=!!n(r,i)&&s}return s},ez=(e,t)=>{uQ(e,t,(n,r)=>n.remove(r))},Bd=(e,t)=>(uQ(e,t,(n,r)=>n.add(r)),ez.bind(0,e,t)),fk=(e,t,n,r)=>{if(e&&t){let i=!0;return En(n,o=>{const s=r?r(e[o]):e[o],l=r?r(t[o]):t[o];s!==l&&(i=!1)}),i}return!1},dQ=(e,t)=>fk(e,t,["w","h"]),fQ=(e,t)=>fk(e,t,["x","y"]),R1e=(e,t)=>fk(e,t,["t","r","b","l"]),U8=(e,t,n)=>fk(e,t,["width","height"],n&&(r=>Math.round(r))),Es=()=>{},Mh=e=>{let t;const n=e?BE:cQ,r=e?mF:lQ;return[i=>{r(t),t=n(i,pl(e)?e():e)},()=>r(t)]},tz=(e,t)=>{let n,r,i,o=Es;const{g:s,v:l,p:c}=t||{},d=function(v){o(),mF(n),n=r=void 0,o=Es,e.apply(this,v)},f=g=>c&&r?c(r,g):g,h=()=>{o!==Es&&d(f(i)||i)},p=function(){const v=bp(arguments),y=pl(s)?s():s;if(Td(y)&&y>=0){const _=pl(l)?l():l,b=Td(_)&&_>=0,x=y>0?BE:cQ,E=y>0?mF:lQ,R=f(v)||v,k=d.bind(0,R);o();const O=x(k,y);o=()=>E(O),b&&!n&&(n=BE(h,_)),r=i=R}else d(v)};return p.m=h,p},I1e={opacity:1,zIndex:1},e_=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},P1e=(e,t)=>!I1e[e]&&Td(t)?`${t}px`:t,H8=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),O1e=(e,t,n)=>{try{const{style:r}=e;Mu(r[t])?r.setProperty(t,n):r[t]=P1e(t,n)}catch{}},kg=e=>Ji(e,"direction")==="rtl",W8=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,l=`${r}bottom${i}`,c=`${r}left${i}`,d=Ji(e,[o,s,l,c]);return{t:e_(d[o],!0),r:e_(d[s],!0),b:e_(d[l],!0),l:e_(d[c],!0)}},Ag=(e,t)=>`translate${$s(e)?`(${e[0]},${e[1]})`:`${t?"X":"Y"}(${e})`}`,{round:G8}=Math,nz={w:0,h:0},t1=e=>e?{w:e.offsetWidth,h:e.offsetHeight}:nz,kS=e=>e?{w:e.clientWidth,h:e.clientHeight}:nz,$E=e=>e?{w:e.scrollWidth,h:e.scrollHeight}:nz,FE=e=>{const t=parseFloat(Ji(e,"height"))||0,n=parseFloat(Ji(e,"width"))||0;return{w:n-G8(n),h:t-G8(t)}},Dl=e=>e.getBoundingClientRect(),Nm=e=>!!(e&&(e.height||e.width));let t_;const M1e=()=>{if(Mu(t_)){t_=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){t_=!0}}))}catch{}}return t_},hQ=e=>e.split(" "),D1e=(e,t,n,r)=>{En(hQ(t),i=>{e.removeEventListener(i,n,r)})},qr=(e,t,n,r)=>{var i;const o=M1e(),s=(i=o&&r&&r.S)!=null?i:o,l=r&&r.$||!1,c=r&&r.C||!1,d=[],f=o?{passive:s,capture:l}:l;return En(hQ(t),h=>{const p=c?g=>{e.removeEventListener(h,p,l),n&&n(g)}:n;Fn(d,D1e.bind(null,e,h,p,l)),e.addEventListener(h,p,f)}),rc.bind(0,d)},pQ=e=>e.stopPropagation(),mQ=e=>e.preventDefault(),L1e={x:0,y:0},oL=e=>{const t=e?Dl(e):0;return t?{x:t.left+window.pageYOffset,y:t.top+window.pageXOffset}:L1e},V8=(e,t)=>{En($s(t)?t:[t],e)},rz=e=>{const t=new Map,n=(o,s)=>{if(o){const l=t.get(o);V8(c=>{l&&l[c?"delete":"clear"](c)},s)}else t.forEach(l=>{l.clear()}),t.clear()},r=(o,s)=>{if(Qd(o)){const d=t.get(o)||new Set;return t.set(o,d),V8(f=>{pl(f)&&d.add(f)},s),n.bind(0,o,s)}Y4(s)&&s&&n();const l=Fs(o),c=[];return En(l,d=>{const f=o[d];f&&Fn(c,r(d,f))}),rc.bind(0,c)},i=(o,s)=>{const l=t.get(o);En(bp(l),c=>{s&&!K4(s)?c.apply(0,s):c()})};return r(e||{}),[r,n,i]},q8=e=>JSON.stringify(e,(t,n)=>{if(pl(n))throw new Error;return n}),N1e={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},gQ=(e,t)=>{const n={},r=Fs(t).concat(Fs(e));return En(r,i=>{const o=e[i],s=t[i];if(e1(o)&&e1(s))Tr(n[i]={},gQ(o,s)),Q4(n[i])&&delete n[i];else if(dk(t,i)&&s!==o){let l=!0;if($s(o)||$s(s))try{q8(o)===q8(s)&&(l=!1)}catch{}l&&(n[i]=s)}}),n},K1="data-overlayscrollbars",vQ="os-environment",yQ=`${vQ}-flexbox-glue`,B1e=`${yQ}-max`,bQ="os-scrollbar-hidden",sL=`${K1}-initialize`,Za=K1,xQ=`${Za}-overflow-x`,wQ=`${Za}-overflow-y`,Jm="overflowVisible",$1e="scrollbarHidden",X8="scrollbarPressed",zE="updating",Ju=`${K1}-viewport`,aL="arrange",_Q="scrollbarHidden",Zm=Jm,gF=`${K1}-padding`,F1e=Zm,Y8=`${K1}-content`,iz="os-size-observer",z1e=`${iz}-appear`,j1e=`${iz}-listener`,U1e="os-trinsic-observer",H1e="os-no-css-vars",W1e="os-theme-none",Qo="os-scrollbar",G1e=`${Qo}-rtl`,V1e=`${Qo}-horizontal`,q1e=`${Qo}-vertical`,SQ=`${Qo}-track`,oz=`${Qo}-handle`,X1e=`${Qo}-visible`,Y1e=`${Qo}-cornerless`,K8=`${Qo}-transitionless`,Q8=`${Qo}-interaction`,J8=`${Qo}-unusable`,vF=`${Qo}-auto-hide`,Z8=`${vF}-hidden`,eH=`${Qo}-wheel`,K1e=`${SQ}-interactive`,Q1e=`${oz}-interactive`,EQ={},xp=()=>EQ,J1e=e=>{const t=[];return En($s(e)?e:[e],n=>{const r=Fs(n);En(r,i=>{Fn(t,EQ[i]=n[i])})}),t},Z1e="__osOptionsValidationPlugin",ewe="__osSizeObserverPlugin",sz="__osScrollbarsHidingPlugin",twe="__osClickScrollPlugin";let lL;const tH=(e,t,n,r)=>{ra(e,t);const i=kS(t),o=t1(t),s=FE(n);return r&&Yl(t),{x:o.h-i.h+s.h,y:o.w-i.w+s.w}},nwe=e=>{let t=!1;const n=Bd(e,bQ);try{t=Ji(e,T1e("scrollbar-width"))==="none"||window.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},rwe=(e,t)=>{const n="hidden";Ji(e,{overflowX:n,overflowY:n,direction:"rtl"}),al(e,0);const r=oL(e),i=oL(t);al(e,-999);const o=oL(t);return{i:r.x===i.x,n:i.x!==o.x}},iwe=(e,t)=>{const n=Bd(e,yQ),r=Dl(e),i=Dl(t),o=U8(i,r,!0),s=Bd(e,B1e),l=Dl(e),c=Dl(t),d=U8(c,l,!0);return n(),s(),o&&d},owe=()=>{const{body:e}=document,n=aQ(`
`)[0],r=n.firstChild,[i,,o]=rz(),[s,l]=Ja({o:tH(e,n,r),u:fQ},tH.bind(0,e,n,r,!0)),[c]=l(),d=nwe(n),f={x:c.x===0,y:c.y===0},h={elements:{host:null,padding:!d,viewport:b=>d&&b===b.ownerDocument.body&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},p=Tr({},N1e),g=Tr.bind(0,{},p),v=Tr.bind(0,{},h),y={k:c,I:f,A:d,H:Ji(n,"zIndex")==="-1",B:!!pF,V:rwe(n,r),Y:iwe(n,r),j:i.bind(0,"z"),N:i.bind(0,"r"),q:v,F:b=>Tr(h,b)&&v(),G:g,X:b=>Tr(p,b)&&g(),U:Tr({},h),W:Tr({},p)},S=window.addEventListener,_=tz(b=>o(b?"z":"r"),{g:33,v:99});if(Oo(n,"style"),Yl(n),S("resize",_.bind(0,!1)),!d&&(!f.x||!f.y)){let b;S("resize",()=>{const x=xp()[sz];b=b||x&&x.R(),b&&b(y,s,_.bind(0,!0))})}return y},Jo=()=>(lL||(lL=owe()),lL),az=(e,t)=>pl(t)?t.apply(0,e):t,swe=(e,t,n,r)=>{const i=Mu(r)?n:r;return az(e,i)||t.apply(0,e)},CQ=(e,t,n,r)=>{const i=Mu(r)?n:r,o=az(e,i);return!!o&&(px(o)?o:t.apply(0,e))},awe=(e,t,n)=>{const{nativeScrollbarsOverlaid:r,body:i}=n||{},{I:o,A:s}=Jo(),{nativeScrollbarsOverlaid:l,body:c}=t,d=r??l,f=Mu(i)?c:i,h=(o.x||o.y)&&d,p=e&&(ak(f)?!s:f);return!!h||!!p},lz=new WeakMap,lwe=(e,t)=>{lz.set(e,t)},cwe=e=>{lz.delete(e)},TQ=e=>lz.get(e),nH=(e,t)=>e?t.split(".").reduce((n,r)=>n&&dk(n,r)?n[r]:void 0,e):void 0,yF=(e,t,n)=>r=>[nH(e,r),n||nH(t,r)!==void 0],kQ=e=>{let t=e;return[()=>t,n=>{t=Tr({},t,n)}]},n_="tabindex",r_=tp.bind(0,""),cL=e=>{ra(Cu(e),J4(e)),Yl(e)},uwe=e=>{const t=Jo(),{q:n,A:r}=t,i=xp()[sz],o=i&&i.T,{elements:s}=n(),{host:l,padding:c,viewport:d,content:f}=s,h=px(e),p=h?{}:e,{elements:g}=p,{host:v,padding:y,viewport:S,content:_}=g||{},b=h?e:p.target,x=NE(b,"textarea"),E=b.ownerDocument,A=E.documentElement,R=b===E.body,k=E.defaultView,O=swe.bind(0,[b]),L=CQ.bind(0,[b]),N=az.bind(0,[b]),H=O.bind(0,r_,d),W=L.bind(0,r_,f),z=H(S),D=z===b,F=D&&R,j=!D&&W(_),V=!D&&px(z)&&z===j,G=V&&!!N(f),K=G?H():z,Y=G?j:W(),ie=F?A:V?K:z,ce=x?O(r_,l,v):b,ue=F?ie:ce,se=V?Y:j,Q=E.activeElement,ae=!D&&k.top===k&&Q===b,le={Z:b,J:ue,K:ie,tt:!D&&L(r_,c,y),nt:se,ot:!D&&!r&&o&&o(t),st:F?A:ie,et:F?E:ie,ct:k,rt:E,lt:x,it:R,ut:h,ft:D,dt:V,_t:(it,pt)=>b1e(ie,D?Za:Ju,D?pt:it),ht:(it,pt,mt)=>ep(ie,D?Za:Ju,D?pt:it,mt)},he=Fs(le).reduce((it,pt)=>{const mt=le[pt];return Fn(it,mt&&px(mt)&&!Cu(mt)?mt:!1)},[]),pe=it=>it?uk(he,it)>-1:null,{Z:ve,J:ye,tt:xe,K:me,nt:be,ot:Qe}=le,qe=[()=>{Oo(ye,Za),Oo(ye,sL),Oo(ve,sL),R&&(Oo(A,Za),Oo(A,sL))}],at=x&&pe(ye);let Lt=x?ve:J4([be,me,xe,ye,ve].find(it=>pe(it)===!1));const Ie=F?ve:be||me;return[le,()=>{So(ye,Za,D?"viewport":"host"),So(xe,gF,""),So(be,Y8,""),D||So(me,Ju,"");const it=R&&!D?Bd(Cu(b),bQ):Es;if(at&&(z8(ve,ye),Fn(qe,()=>{z8(ye,ve),Yl(ye)})),ra(Ie,Lt),ra(ye,xe),ra(xe||ye,!D&&me),ra(me,be),Fn(qe,()=>{it(),Oo(xe,gF),Oo(be,Y8),Oo(me,xQ),Oo(me,wQ),Oo(me,Ju),pe(be)&&cL(be),pe(me)&&cL(me),pe(xe)&&cL(xe)}),r&&!D&&(ep(me,Ju,_Q,!0),Fn(qe,Oo.bind(0,me,Ju))),Qe&&(_1e(me,Qe),Fn(qe,Yl.bind(0,Qe))),ae){const pt=So(me,n_);So(me,n_,"-1"),me.focus();const mt=()=>pt?So(me,n_,pt):Oo(me,n_),_e=qr(E,"pointerdown keydown",()=>{mt(),_e()});Fn(qe,[mt,_e])}else Q&&Q.focus&&Q.focus();Lt=0},rc.bind(0,qe)]},dwe=(e,t)=>{const{nt:n}=e,[r]=t;return i=>{const{Y:o}=Jo(),{gt:s}=r(),{vt:l}=i,c=(n||!o)&&l;return c&&Ji(n,{height:s?"":"100%"}),{wt:c,bt:c}}},fwe=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ft:l}=e,[c,d]=Ja({u:R1e,o:W8()},W8.bind(0,i,"padding",""));return(f,h,p)=>{let[g,v]=d(p);const{A:y,Y:S}=Jo(),{yt:_}=n(),{wt:b,bt:x,St:E}=f,[A,R]=h("paddingAbsolute");(b||v||!S&&x)&&([g,v]=c(p));const O=!l&&(R||E||v);if(O){const L=!A||!o&&!y,N=g.r+g.l,H=g.t+g.b,W={marginRight:L&&!_?-N:0,marginBottom:L?-H:0,marginLeft:L&&_?-N:0,top:L?-g.t:0,right:L?_?-g.r:"auto":0,left:L?_?"auto":-g.l:0,width:L?`calc(100% + ${N}px)`:""},z={paddingTop:L?g.t:0,paddingRight:L?g.r:0,paddingBottom:L?g.b:0,paddingLeft:L?g.l:0};Ji(o||s,W),Ji(s,z),r({tt:g,$t:!L,P:o?z:Tr({},W,z)})}return{xt:O}}},{max:bF}=Math,Zu=bF.bind(0,0),AQ="visible",rH="hidden",hwe=42,i_={u:dQ,o:{w:0,h:0}},pwe={u:fQ,o:{x:rH,y:rH}},mwe=(e,t)=>{const n=window.devicePixelRatio%1!==0?1:0,r={w:Zu(e.w-t.w),h:Zu(e.h-t.h)};return{w:r.w>n?r.w:0,h:r.h>n?r.h:0}},o_=e=>e.indexOf(AQ)===0,gwe=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ot:l,ft:c,ht:d,it:f,ct:h}=e,{k:p,Y:g,A:v,I:y}=Jo(),S=xp()[sz],_=!c&&!v&&(y.x||y.y),b=f&&c,[x,E]=Ja(i_,FE.bind(0,s)),[A,R]=Ja(i_,$E.bind(0,s)),[k,O]=Ja(i_),[L,N]=Ja(i_),[H]=Ja(pwe),W=(G,K)=>{if(Ji(s,{height:""}),K){const{$t:Y,tt:J}=n(),{Ct:ie,M:ce}=G,ue=FE(i),se=kS(i),Q=Ji(s,"boxSizing")==="content-box",ae=Y||Q?J.b+J.t:0,le=!(y.x&&Q);Ji(s,{height:se.h+ue.h+(ie.x&&le?ce.x:0)-ae})}},z=(G,K)=>{const Y=!v&&!G?hwe:0,J=(pe,ve,ye)=>{const xe=Ji(s,pe),be=(K?K[pe]:xe)==="scroll";return[xe,be,be&&!v?ve?Y:ye:0,ve&&!!Y]},[ie,ce,ue,se]=J("overflowX",y.x,p.x),[Q,ae,le,he]=J("overflowY",y.y,p.y);return{Ot:{x:ie,y:Q},Ct:{x:ce,y:ae},M:{x:ue,y:le},D:{x:se,y:he}}},D=(G,K,Y,J)=>{const ie=(ae,le)=>{const he=o_(ae),pe=le&&he&&ae.replace(`${AQ}-`,"")||"";return[le&&!he?ae:"",o_(pe)?"hidden":pe]},[ce,ue]=ie(Y.x,K.x),[se,Q]=ie(Y.y,K.y);return J.overflowX=ue&&se?ue:ce,J.overflowY=Q&&ce?Q:se,z(G,J)},F=(G,K,Y,J)=>{const{M:ie,D:ce}=G,{x:ue,y:se}=ce,{x:Q,y:ae}=ie,{P:le}=n(),he=K?"marginLeft":"marginRight",pe=K?"paddingLeft":"paddingRight",ve=le[he],ye=le.marginBottom,xe=le[pe],me=le.paddingBottom;J.width=`calc(100% + ${ae+ve*-1}px)`,J[he]=-ae+ve,J.marginBottom=-Q+ye,Y&&(J[pe]=xe+(se?ae:0),J.paddingBottom=me+(ue?Q:0))},[j,V]=S?S.L(_,g,s,l,n,z,F):[()=>_,()=>[Es]];return(G,K,Y)=>{const{wt:J,Tt:ie,bt:ce,xt:ue,vt:se,St:Q}=G,{gt:ae,yt:le}=n(),[he,pe]=K("showNativeOverlaidScrollbars"),[ve,ye]=K("overflow"),xe=he&&y.x&&y.y,me=!c&&!g&&(J||ce||ie||pe||se),be=o_(ve.x),Qe=o_(ve.y),qe=be||Qe;let at=E(Y),Lt=R(Y),Ie=O(Y),ze=N(Y),it;if(pe&&v&&d(_Q,$1e,!xe),me&&(it=z(xe),W(it,ae)),J||ue||ce||Q||pe){qe&&d(Zm,Jm,!1);const[Re,Ue]=V(xe,le,it),[yt,Wt]=at=x(Y),[pn,$r]=Lt=A(Y),Or=kS(s);let Mr=pn,Fr=Or;Re(),($r||Wt||pe)&&Ue&&!xe&&j(Ue,pn,yt,le)&&(Fr=kS(s),Mr=$E(s));const Jr={w:Zu(bF(pn.w,Mr.w)+yt.w),h:Zu(bF(pn.h,Mr.h)+yt.h)},Zo={w:Zu((b?h.innerWidth:Fr.w+Zu(Or.w-pn.w))+yt.w),h:Zu((b?h.innerHeight+yt.h:Fr.h+Zu(Or.h-pn.h))+yt.h)};ze=L(Zo),Ie=k(mwe(Jr,Zo),Y)}const[pt,mt]=ze,[_e,je]=Ie,[Ye,$e]=Lt,[Ne,Rt]=at,ct={x:_e.w>0,y:_e.h>0},Ae=be&&Qe&&(ct.x||ct.y)||be&&ct.x&&!ct.y||Qe&&ct.y&&!ct.x;if(ue||Q||Rt||$e||mt||je||ye||pe||me){const Re={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},Ue=D(xe,ct,ve,Re),yt=j(Ue,Ye,Ne,le);c||F(Ue,le,yt,Re),me&&W(Ue,ae),c?(So(i,xQ,Re.overflowX),So(i,wQ,Re.overflowY)):Ji(s,Re)}ep(i,Za,Jm,Ae),ep(o,gF,F1e,Ae),c||ep(s,Ju,Zm,qe);const[ot,$t]=H(z(xe).Ot);return r({Ot:ot,zt:{x:pt.w,y:pt.h},Et:{x:_e.w,y:_e.h},At:ct}),{It:$t,Ht:mt,Lt:je}}},iH=(e,t,n)=>{const r={},i=t||{},o=Fs(e).concat(Fs(i));return En(o,s=>{const l=e[s],c=i[s];r[s]=!!(n||l||c)}),r},vwe=(e,t)=>{const{Z:n,K:r,ht:i,ft:o}=e,{A:s,I:l,Y:c}=Jo(),d=!s&&(l.x||l.y),f=[dwe(e,t),fwe(e,t),gwe(e,t)];return(h,p,g)=>{const v=iH(Tr({wt:!1,xt:!1,St:!1,vt:!1,Ht:!1,Lt:!1,It:!1,Tt:!1,bt:!1,Pt:!1},p),{},g),y=d||!c,S=y&&al(r),_=y&&vu(r);i("",zE,!0);let b=v;return En(f,x=>{b=iH(b,x(b,h,!!g)||{},g)}),al(r,S),vu(r,_),i("",zE),o||(al(n,0),vu(n,0)),b}},ywe=(e,t,n)=>{let r,i=!1;const o=()=>{i=!0},s=l=>{if(n){const c=n.reduce((d,f)=>{if(f){const[h,p]=f,g=p&&h&&(l?l(h):sQ(h,e));g&&g.length&&p&&Qd(p)&&Fn(d,[g,p.trim()],!0)}return d},[]);En(c,d=>En(d[0],f=>{const h=d[1],p=r.get(f)||[];if(e.contains(f)){const v=qr(f,h,y=>{i?(v(),r.delete(f)):t(y)});r.set(f,Fn(p,v))}else rc(p),r.delete(f)}))}};return n&&(r=new WeakMap,s()),[o,s]},oH=(e,t,n,r)=>{let i=!1;const{Mt:o,Dt:s,Rt:l,kt:c,Bt:d,Vt:f}=r||{},h=tz(()=>i&&n(!0),{g:33,v:99}),[p,g]=ywe(e,h,l),v=o||[],y=s||[],S=v.concat(y),_=(x,E)=>{const A=d||Es,R=f||Es,k=new Set,O=new Set;let L=!1,N=!1;if(En(x,H=>{const{attributeName:W,target:z,type:D,oldValue:F,addedNodes:j,removedNodes:V}=H,G=D==="attributes",K=D==="childList",Y=e===z,J=G&&Qd(W)?So(z,W):0,ie=J!==0&&F!==J,ce=uk(y,W)>-1&&ie;if(t&&(K||!Y)){const ue=!G,se=G&&ie,Q=se&&c&&NE(z,c),le=(Q?!A(z,W,F,J):ue||se)&&!R(H,!!Q,e,r);En(j,he=>k.add(he)),En(V,he=>k.add(he)),N=N||le}!t&&Y&&ie&&!A(z,W,F,J)&&(O.add(W),L=L||ce)}),k.size>0&&g(H=>bp(k).reduce((W,z)=>(Fn(W,sQ(H,z)),NE(z,H)?Fn(W,z):W),[])),t)return!E&&N&&n(!1),[!1];if(O.size>0||L){const H=[bp(O),L];return!E&&n.apply(0,H),H}},b=new k1e(x=>_(x));return b.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:S,subtree:t,childList:t,characterData:t}),i=!0,[()=>{i&&(p(),b.disconnect(),i=!1)},()=>{if(i){h.m();const x=b.takeRecords();return!K4(x)&&_(x,!0)}}]},s_=3333333,RQ=(e,t,n)=>{const{Yt:r,Pt:i}=n||{},o=xp()[ewe],{V:s}=Jo(),c=aQ(`
`)[0],d=c.firstChild,f=kg.bind(0,e),[h]=Ja({o:!1,_:!0,u:(v,y)=>!(!v||!Nm(v)&&Nm(y))}),p=v=>{const y=$s(v)&&v.length>0&&e1(v[0]),S=!y&&Y4(v[0]);let _=!1,b=!1,x=!0;if(y){const[E,,A]=h(v.pop().contentRect),R=Nm(E),k=Nm(A);_=!A&&!!k||!R,b=!k&&R,x=!_}else S?[,x]=v:b=v===!0;if(r&&x){const E=S?v[0]:kg(c);al(c,E?s.n?-s_:s.i?0:s_:s_),vu(c,s_)}_||t({wt:!S,jt:S?v:void 0,Pt:!!b})},g=[];return[()=>{rc(g),Yl(c)},()=>{let v=i&&p;if(Lm){const y=new Lm(p);y.observe(d),Fn(g,()=>{y.disconnect()})}else if(o){const[y,S]=o.O(d,p,i);v=y,Fn(g,S)}if(r){const[y]=Ja({o:void 0},f);Fn(g,qr(c,"scroll",S=>{const _=y(),[b,x,E]=_;x&&(ez(d,"ltr rtl"),Bd(d,b?"rtl":"ltr"),p([!!b,x,E])),pQ(S)}))}v&&(Bd(c,z1e),Fn(g,qr(c,"animationstart",v,{C:!!Lm}))),(Lm||o)&&ra(e,c)}]},bwe=e=>e.h===0||e.isIntersecting||e.intersectionRatio>0,xwe=(e,t)=>{let n;const r=tp(U1e),i=[],[o]=Ja({o:!1}),s=(c,d)=>{if(c){const f=o(bwe(c)),[,h]=f;return h&&!d&&t(f)&&[f]}},l=(c,d)=>c&&c.length>0&&s(c.pop(),d);return[()=>{rc(i),Yl(r)},()=>{if(j8)n=new j8(c=>l(c),{root:e}),n.observe(r),Fn(i,()=>{n.disconnect()});else{const c=()=>{const h=t1(r);s(h)},[d,f]=RQ(r,c);Fn(i,d),f(),c()}ra(e,r)},()=>n&&l(n.takeRecords(),!0)]},sH=`[${Za}]`,wwe=`[${Ju}]`,uL=["tabindex"],aH=["wrap","cols","rows"],dL=["id","class","style","open"],_we=(e,t,n)=>{let r,i,o;const{J:s,K:l,nt:c,lt:d,ft:f,_t:h,ht:p}=e,{Y:g}=Jo(),[v]=Ja({u:dQ,o:{w:0,h:0}},()=>{const F=h(Zm,Jm),j=h(aL,""),V=j&&al(l),G=j&&vu(l);p(Zm,Jm),p(aL,""),p("",zE,!0);const K=$E(c),Y=$E(l),J=FE(l);return p(Zm,Jm,F),p(aL,"",j),p("",zE),al(l,V),vu(l,G),{w:Y.w+K.w+J.w,h:Y.h+K.h+J.h}}),y=d?aH:dL.concat(aH),S=tz(n,{g:()=>r,v:()=>i,p(F,j){const[V]=F,[G]=j;return[Fs(V).concat(Fs(G)).reduce((K,Y)=>(K[Y]=V[Y]||G[Y],K),{})]}}),_=F=>{En(F||uL,j=>{if(uk(uL,j)>-1){const V=So(s,j);Qd(V)?So(l,j,V):Oo(l,j)}})},b=(F,j)=>{const[V,G]=F,K={vt:G};return t({gt:V}),!j&&n(K),K},x=({wt:F,jt:j,Pt:V})=>{const G=!F||V?n:S;let K=!1;if(j){const[Y,J]=j;K=J,t({yt:Y})}G({wt:F,Pt:V,St:K})},E=(F,j)=>{const[,V]=v(),G={bt:V};return V&&!j&&(F?n:S)(G),G},A=(F,j,V)=>{const G={Tt:j};return j?!V&&S(G):f||_(F),G},[R,k,O]=c||!g?xwe(s,b):[Es,Es,Es],[L,N]=f?[Es,Es]:RQ(s,x,{Pt:!0,Yt:!0}),[H,W]=oH(s,!1,A,{Dt:dL,Mt:dL.concat(uL)});let z;const D=f&&Lm&&new Lm(F=>{const j=F[F.length-1].contentRect,V=Nm(j),K=!Nm(z)&&V;x({wt:!0,Pt:K}),z=j});return[()=>{R(),L(),o&&o[0](),D&&D.disconnect(),H()},()=>{D&&D.observe(s),_(),N(),k()},()=>{const F={},j=W(),V=O(),G=o&&o[1]();return j&&Tr(F,A.apply(0,Fn(j,!0))),V&&Tr(F,b.apply(0,Fn(V,!0))),G&&Tr(F,E.apply(0,Fn(G,!0))),F},F=>{const[j]=F("update.ignoreMutation"),[V,G]=F("update.attributes"),[K,Y]=F("update.elementEvents"),[J,ie]=F("update.debounce"),ce=Y||G,ue=se=>pl(j)&&j(se);if(ce&&(o&&(o[1](),o[0]()),o=oH(c||l,!0,E,{Mt:y.concat(V||[]),Rt:K,kt:sH,Vt:(se,Q)=>{const{target:ae,attributeName:le}=se;return(!Q&&le&&!f?w1e(ae,sH,wwe):!1)||!!Dm(ae,`.${Qo}`)||!!ue(se)}})),ie)if(S.m(),$s(J)){const se=J[0],Q=J[1];r=Td(se)&&se,i=Td(Q)&&Q}else Td(J)?(r=J,i=!1):(r=!1,i=!1)}]},lH={x:0,y:0},Swe=e=>({tt:{t:0,r:0,b:0,l:0},$t:!1,P:{marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},zt:lH,Et:lH,Ot:{x:"hidden",y:"hidden"},At:{x:!1,y:!1},gt:!1,yt:kg(e.J)}),Ewe=(e,t)=>{const n=yF(t,{}),[r,i,o]=rz(),[s,l,c]=uwe(e),d=kQ(Swe(s)),[f,h]=d,p=vwe(s,d),g=(x,E,A)=>{const k=Fs(x).some(O=>!!x[O])||!Q4(E)||A;return k&&o("u",[x,E,A]),k},[v,y,S,_]=_we(s,h,x=>g(p(n,x),{},!1)),b=f.bind(0);return b.Nt=x=>r("u",x),b.qt=()=>{const{Z:x,K:E,rt:A,it:R}=s,k=R?A.documentElement:x,O=al(k),L=vu(k);y(),l(),al(E,O),vu(E,L)},b.Ft=s,[(x,E)=>{const A=yF(t,x,E);return _(A),g(p(A,S(),E),x,!!E)},b,()=>{i(),v(),c()}]},{round:cH}=Math,Cwe=e=>{const{width:t,height:n}=Dl(e),{w:r,h:i}=t1(e);return{x:cH(t)/r||1,y:cH(n)/i||1}},Twe=(e,t,n)=>{const r=t.scrollbars,{button:i,isPrimary:o,pointerType:s}=e,{pointers:l}=r;return i===0&&o&&r[n?"dragScroll":"clickScroll"]&&(l||[]).includes(s)},uH="pointerup pointerleave pointercancel lostpointercapture",kwe=(e,t)=>qr(e,"mousedown",qr.bind(0,t,"click",pQ,{C:!0,$:!0}),{$:!0}),Awe=(e,t,n,r,i,o,s)=>{const{V:l}=Jo(),{Gt:c,Xt:d,Ut:f}=r,h=`scroll${s?"Left":"Top"}`,p=`client${s?"X":"Y"}`,g=s?"width":"height",v=s?"left":"top",y=s?"w":"h",S=s?"x":"y",_=(b,x)=>E=>{const{Et:A}=o(),R=t1(d)[y]-t1(c)[y],O=x*E/R*A[S],N=kg(f)&&s?l.n||l.i?1:-1:1;i[h]=b+O*N};return qr(d,"pointerdown",b=>{const x=Dm(b.target,`.${oz}`)===c,E=x?c:d;if(ep(t,Za,X8,!0),Twe(b,e,x)){const A=!x&&b.shiftKey,R=()=>Dl(c),k=()=>Dl(d),O=(K,Y)=>(K||R())[v]-(Y||k())[v],L=_(i[h]||0,1/Cwe(i)[S]),N=b[p],H=R(),W=k(),z=H[g],D=O(H,W)+z/2,F=N-W[v],j=x?0:F-D,V=K=>{rc(G),E.releasePointerCapture(K.pointerId)},G=[ep.bind(0,t,Za,X8),qr(n,uH,V),qr(n,"selectstart",K=>mQ(K),{S:!1}),qr(d,uH,V),qr(d,"pointermove",K=>{const Y=K[p]-N;(x||A)&&L(j+Y)})];if(A)L(j);else if(!x){const K=xp()[twe];K&&Fn(G,K.O(L,O,j,z,F))}E.setPointerCapture(b.pointerId)}})},Rwe=(e,t)=>(n,r,i,o,s,l,c)=>{const{Ut:d}=n,[f,h]=Mh(333),p=!!s.scrollBy;let g=!0;return rc.bind(0,[qr(d,"pointerenter",()=>{r(Q8,!0)}),qr(d,"pointerleave pointercancel",()=>{r(Q8)}),qr(d,"wheel",v=>{const{deltaX:y,deltaY:S,deltaMode:_}=v;p&&g&&_===0&&Cu(d)===o&&s.scrollBy({left:y,top:S,behavior:"smooth"}),g=!1,r(eH,!0),f(()=>{g=!0,r(eH)}),mQ(v)},{S:!1,$:!0}),kwe(d,i),Awe(e,o,i,n,s,t,c),h])},{min:jE,max:xF,round:Iwe}=Math,IQ=(e,t,n,r)=>{if(r){const l=n?"x":"y",{Et:c,zt:d}=r,f=d[l],h=c[l];return xF(0,jE(1,f/(f+h)))}const i=n?"width":"height",o=Dl(e)[i],s=Dl(t)[i];return xF(0,jE(1,o/s))},Pwe=(e,t,n,r,i,o)=>{const{V:s}=Jo(),l=o?"x":"y",c=o?"Left":"Top",{Et:d}=r,f=Iwe(d[l]),h=jE(f,xF(0,n[`scroll${c}`])),p=o&&i,g=s.i?h:f-h,y=jE(1,(p?g:h)/f),S=IQ(e,t,o);return 1/S*(1-S)*y},PQ=(e,t,n,r)=>t&&e.animate(n,{timeline:t,composite:r}),Owe=(e,t)=>({transform:[Ag("0%",t),Ag(t&&e?"100%":"-100%",t)],[t?e?"right":"left":"top"]:["0%","100%"]}),Mwe=e=>`${Math.max(0,e-.5)}px`,dH=(e,t,n,r)=>PQ(e,t,{transform:[Ag("0px",r),Ag(Mwe(n),r)]},"add"),fH=(e,t)=>pF?new pF({source:e,axis:t}):null,Dwe=(e,t,n)=>{const{q:r,H:i}=Jo(),{scrollbars:o}=r(),{slot:s}=o,{rt:l,Z:c,J:d,K:f,ut:h,st:p,it:g,ft:v}=t,{scrollbars:y}=h?{}:e,{slot:S}=y||{},_=new Map,b=fH(p,"x"),x=fH(p,"y"),E=CQ([c,d,f],()=>v&&g?c:d,s,S),A=se=>v&&!g&&Cu(se)===f,R=se=>{_.forEach((Q,ae)=>{(se?uk($s(se)?se:[se],ae)>-1:!0)&&((Q||[]).forEach(he=>{he&&he.cancel()}),_.delete(ae))})},k=(se,Q,ae)=>{const le=ae?Bd:ez;En(se,he=>{le(he.Ut,Q)})},O=(se,Q)=>{En(se,ae=>{const[le,he]=Q(ae);Ji(le,he)})},L=(se,Q,ae)=>{O(se,le=>{const{Gt:he,Xt:pe}=le;return[he,{[ae?"width":"height"]:`${(IQ(he,pe,ae,Q)*100).toFixed(3)}%`}]})},N=(se,Q,ae)=>{!x&&!x&&O(se,le=>{const{Gt:he,Xt:pe,Ut:ve}=le,ye=Pwe(he,pe,p,Q,kg(ve),ae);return[he,{transform:ye===ye?Ag(`${(ye*100).toFixed(3)}%`,ae):""}]})},H=se=>{const{Ut:Q}=se,ae=A(Q)&&Q;return[ae,{transform:ae?Ag([`${al(p)}px`,`${vu(p)}px`]):""}]},W=[],z=[],D=[],F=(se,Q,ae)=>{const le=Y4(ae),he=le?ae:!0,pe=le?!ae:!0;he&&k(z,se,Q),pe&&k(D,se,Q)},j=se=>{L(z,se,!0),L(D,se)},V=se=>{N(z,se,!0),N(D,se)},G=()=>{const se=(Q,{Ut:ae,Gt:le})=>{R(le),_.set(le,[PQ(le,Q?b:x,Owe(Q&&kg(ae),Q))])};z.forEach(se.bind(0,!0)),D.forEach(se.bind(0,!1))},K=()=>{!x&&!x&&(v&&O(z,H),v&&O(D,H))},Y=({Et:se})=>{D.concat(z).forEach(({Ut:Q})=>{R(Q),A(Q)&&_.set(Q,[dH(Q,b,se.x,!0),dH(Q,x,se.y)])})},J=se=>{const Q=se?V1e:q1e,ae=se?z:D,le=K4(ae)?K8:"",he=tp(`${Qo} ${Q} ${le}`),pe=tp(SQ),ve=tp(oz),ye={Ut:he,Xt:pe,Gt:ve};return i||Bd(he,H1e),ra(he,pe),ra(pe,ve),Fn(ae,ye),Fn(W,[Yl.bind(0,he),R,n(ye,F,l,d,p,se?b:x,se)]),ye},ie=J.bind(0,!0),ce=J.bind(0,!1),ue=()=>{ra(E,z[0].Ut),ra(E,D[0].Ut),BE(()=>{F(K8)},300)};return ie(),ce(),[{Wt:j,Zt:V,Jt:G,Kt:Y,Qt:K,tn:F,nn:{B:b,sn:z,en:ie,cn:O.bind(0,z)},rn:{B:x,sn:D,en:ce,cn:O.bind(0,D)}},ue,rc.bind(0,W)]},fL=e=>e.pointerType==="mouse",Lwe=(e,t,n,r)=>{let i,o,s,l,c,d=Es,f=0;const h=kQ({}),[p]=h,[g,v]=Mh(),[y,S]=Mh(),[_,b]=Mh(100),[x,E]=Mh(100),[A,R]=Mh(100),[k,O]=Mh(()=>f),[L,N,H]=Dwe(e,n.Ft,Rwe(t,n)),{J:W,et:z,it:D}=n.Ft,{tn:F,Wt:j,Zt:V,Jt:G,Kt:K,Qt:Y}=L,J=Q=>{F(vF,Q,!0),F(vF,Q,!1)},ie=(Q,ae)=>{if(O(),Q)F(Z8);else{const le=()=>F(Z8,!0);f>0&&!ae?k(le):le()}},ce=Q=>{fL(Q)&&(l=o,l&&ie(!0))},ue=[b,O,E,R,S,v,H,qr(W,"pointerover",ce,{C:!0}),qr(W,"pointerenter",ce),qr(W,"pointerleave",Q=>{fL(Q)&&(l=!1,o&&ie(!1))}),qr(W,"pointermove",Q=>{fL(Q)&&i&&g(()=>{b(),ie(!0),x(()=>{i&&ie(!1)})})}),qr(z,"scroll",Q=>{y(()=>{V(n()),s&&ie(!0),_(()=>{s&&!l&&ie(!1)})}),r(Q),Y()})],se=p.bind(0);return se.Ft=L,se.qt=N,[(Q,ae,le)=>{const{Ht:he,Lt:pe,It:ve,St:ye,Pt:xe}=le,{I:me}=Jo(),be=yF(t,Q,ae),Qe=n(),{Et:qe,Ot:at,yt:Lt,At:Ie}=Qe,[ze,it]=be("showNativeOverlaidScrollbars"),[pt,mt]=be("scrollbars.theme"),[_e,je]=be("scrollbars.visibility"),[Ye,$e]=be("scrollbars.autoHide"),[Ne,Rt]=be("scrollbars.autoHideSuspend"),[ct]=be("scrollbars.autoHideDelay"),[Ae,ot]=be("scrollbars.dragScroll"),[$t,Re]=be("scrollbars.clickScroll"),Ue=xe&&!ae,yt=Ie.x||Ie.y,Wt=he||pe||ye,pn=ve||je,$r=ze&&me.x&&me.y,Or=(Mr,Fr)=>{const Jr=_e==="visible"||_e==="auto"&&Mr==="scroll";return F(X1e,Jr,Fr),Jr};if(f=ct,Ue&&(Ne&&yt?(J(!1),d(),A(()=>{d=qr(z,"scroll",J.bind(0,!0),{C:!0})})):J(!0)),it&&F(W1e,$r),mt&&(F(c),F(pt,!0),c=pt),Rt&&!Ne&&J(!0),$e&&(i=Ye==="move",o=Ye==="leave",s=Ye!=="never",ie(!s,!0)),ot&&F(Q1e,Ae),Re&&F(K1e,$t),pn){const Mr=Or(at.x,!0),Fr=Or(at.y,!1);F(Y1e,!(Mr&&Fr))}Wt&&(j(Qe),V(Qe),G(Qe),K(Qe),Y(),F(J8,!qe.x,!0),F(J8,!qe.y,!1),F(G1e,Lt&&!D))},se,()=>{rc(ue),d()}]},OQ=(e,t,n)=>{pl(e)&&e(t||void 0,n||void 0)},fd=(e,t,n)=>{const{G:r,q:i,j:o,N:s}=Jo(),l=xp(),c=px(e),d=c?e:e.target,f=TQ(d);if(t&&!f){let h=!1;const p=z=>{const D=xp()[Z1e],F=D&&D.O;return F?F(z,!0):z},g=Tr({},r(),p(t)),[v,y,S]=rz(n),[_,b,x]=Ewe(e,g),[E,A,R]=Lwe(e,g,b,z=>S("scroll",[W,z])),k=(z,D)=>_(z,!!D),O=k.bind(0,{},!0),L=o(O),N=s(O),H=z=>{cwe(d),L(),N(),R(),x(),h=!0,S("destroyed",[W,!!z]),y()},W={options(z,D){if(z){const F=D?r():{},j=gQ(g,Tr(F,p(z)));Q4(j)||(Tr(g,j),k(j))}return Tr({},g)},on:v,off:(z,D)=>{z&&D&&y(z,D)},state(){const{zt:z,Et:D,Ot:F,At:j,tt:V,$t:G,yt:K}=b();return Tr({},{overflowEdge:z,overflowAmount:D,overflowStyle:F,hasOverflow:j,padding:V,paddingAbsolute:G,directionRTL:K,destroyed:h})},elements(){const{Z:z,J:D,tt:F,K:j,nt:V,st:G,et:K}=b.Ft,{nn:Y,rn:J}=A.Ft,ie=ue=>{const{Gt:se,Xt:Q,Ut:ae}=ue;return{scrollbar:ae,track:Q,handle:se}},ce=ue=>{const{sn:se,en:Q}=ue,ae=ie(se[0]);return Tr({},ae,{clone:()=>{const le=ie(Q());return E({},!0,{}),le}})};return Tr({},{target:z,host:D,padding:F||j,viewport:j,content:V||j,scrollOffsetElement:G,scrollEventElement:K,scrollbarHorizontal:ce(Y),scrollbarVertical:ce(J)})},update:z=>k({},z),destroy:H.bind(0)};return b.Nt((z,D,F)=>{E(D,F,z)}),lwe(d,W),En(Fs(l),z=>OQ(l[z],0,W)),awe(b.Ft.it,i().cancel,!c&&e.cancel)?(H(!0),W):(b.qt(),A.qt(),S("initialized",[W]),b.Nt((z,D,F)=>{const{wt:j,St:V,vt:G,Ht:K,Lt:Y,It:J,bt:ie,Tt:ce}=z;S("updated",[W,{updateHints:{sizeChanged:j,directionChanged:V,heightIntrinsicChanged:G,overflowEdgeChanged:K,overflowAmountChanged:Y,overflowStyleChanged:J,contentMutation:ie,hostMutation:ce},changedOptions:D,force:F}])}),W.update(!0),W)}return f};fd.plugin=e=>{En(J1e(e),t=>OQ(t,fd))};fd.valid=e=>{const t=e&&e.elements,n=pl(t)&&t();return dF(n)&&!!TQ(n.target)};fd.env=()=>{const{k:e,I:t,A:n,V:r,Y:i,H:o,B:s,U:l,W:c,q:d,F:f,G:h,X:p}=Jo();return Tr({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:i,cssCustomProperties:o,scrollTimeline:s,staticDefaultInitialization:l,staticDefaultOptions:c,getDefaultInitialization:d,setDefaultInitialization:f,getDefaultOptions:h,setDefaultOptions:p})};const Nwe=()=>{if(typeof window>"u"){const d=()=>{};return[d,d]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",i=n.requestAnimationFrame,o=n.cancelAnimationFrame,s=r?n.requestIdleCallback:i,l=r?n.cancelIdleCallback:o,c=()=>{l(e),o(t)};return[(d,f)=>{c(),e=s(r?()=>{c(),t=i(d)}:d,typeof f=="object"?f:{timeout:2233})},c]},MQ=e=>{const{options:t,events:n,defer:r}=e||{},[i,o]=I.useMemo(Nwe,[]),s=I.useRef(null),l=I.useRef(r),c=I.useRef(t),d=I.useRef(n);return I.useEffect(()=>{l.current=r},[r]),I.useEffect(()=>{const{current:f}=s;c.current=t,fd.valid(f)&&f.options(t||{},!0)},[t]),I.useEffect(()=>{const{current:f}=s;d.current=n,fd.valid(f)&&f.on(n||{},!0)},[n]),I.useEffect(()=>()=>{var f;o(),(f=s.current)==null||f.destroy()},[]),I.useMemo(()=>[f=>{const h=s.current;if(fd.valid(h))return;const p=l.current,g=c.current||{},v=d.current||{},y=()=>s.current=fd(f,g,v);p?i(y,p):y()},()=>s.current],[])},Bwe=(e,t)=>{const{element:n="div",options:r,events:i,defer:o,children:s,...l}=e,c=n,d=I.useRef(null),f=I.useRef(null),[h,p]=I.useState(!1),[g,v]=MQ({options:r,events:i,defer:o});return I.useEffect(()=>{p(!0)},[]),I.useEffect(()=>{const{current:y}=d,{current:S}=f;return h&&y&&S&&g({target:y,elements:{viewport:S,content:S}}),()=>{var _;return(_=v())==null?void 0:_.destroy()}},[h,g,n]),I.useImperativeHandle(t,()=>({osInstance:v,getElement:()=>d.current}),[]),de.createElement(c,{"data-overlayscrollbars-initialize":"",ref:d,...l},h?de.createElement("div",{ref:f,"data-overlayscrollbars-contents":!0},s):s)},$we=I.forwardRef(Bwe),rv=I.forwardRef(({children:e,x:t,y:n,px:r=6,...i},o)=>{const{palette:s,spacing:l}=In(),c=Zx({"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${l(r)})`,marginTop:l(r)}}),d=I.useCallback(f=>{if(o&&f){const h=f.elements().viewport;h&&(typeof o=="function"?o(h):o.current=h)}},[o]);return C.jsx($we,{options:{overflow:{x:t?"scroll":"hidden",y:n?"scroll":"hidden"},scrollbars:{autoHide:"move",theme:s.mode==="dark"?"os-theme-light":"os-theme-dark"}},...i,className:`${c} ${i.className}`,events:{initialized:d},children:e})});var DQ={exports:{}},Qn={};/** @license React v17.0.2 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. @@ -418,12 +418,12 @@ PERFORMANCE OF THIS SOFTWARE. .__dbk__dragger.Dark { background: #434252; } -/* ====== */`);const Ywe=de.forwardRef(({className:e,theme:t,draggerClassName:n,direction:r=Er.Vertical,onDragging:i},o)=>{const s=`__dbk__gutter ${r} ${e||t}`,l=`__dbk__dragger ${r} ${n||t}`;return C.jsx("div",Object.assign({className:s,ref:o,dir:r,onMouseDown:i,onTouchStart:AS?i:void 0},{children:C.jsx("div",{className:l},void 0)}),void 0)});var ea;function wF(e,t,n){let r,i;return t?(r=e/2,i=e):n?(r=e,i=e/2):(r=e,i=e),{aGutterSize:r,bGutterSize:i}}function Kwe(e,t){switch(t.type){case ea.SetIsReadyToCompute:return Object.assign(Object.assign({},e),{isReady:t.payload.isReady});case ea.CreatePairs:{const{direction:n,children:r,gutters:i}=t.payload,o=r[0].parentNode;if(!o)throw new Error("Cannot create pairs - parent is undefined.");const s=UE(n,o);if(s===void 0)throw new Error(`Cannot create pairs - parent has undefined or zero size: ${s}.`);const l=[];return r.forEach((c,d)=>{if(d>0){const f=r[d-1],h=r[d],p=i[d-1],g=n===Er.Horizontal?f.getBoundingClientRect().left:f.getBoundingClientRect().top,v=n===Er.Horizontal?h.getBoundingClientRect().right:h.getBoundingClientRect().bottom,y=n===Er.Horizontal?f.getBoundingClientRect().width+p.getBoundingClientRect().width+h.getBoundingClientRect().width:f.getBoundingClientRect().height+p.getBoundingClientRect().height+h.getBoundingClientRect().height,S=n===Er.Horizontal?p.getBoundingClientRect().width:p.getBoundingClientRect().height,_={idx:d-1,a:f,b:h,gutter:p,parent:o,start:g,end:v,size:y,gutterSize:S,aSizePct:100/r.length,bSizePct:100/r.length};l.push(_)}}),Object.assign(Object.assign({},e),{pairs:l})}case ea.StartDragging:{const{gutterIdx:n}=t.payload;return Object.assign(Object.assign({},e),{isDragging:!0,draggingIdx:n})}case ea.StopDragging:return Object.assign(Object.assign({},e),{isDragging:!1});case ea.CalculateSizes:{const{direction:n,gutterIdx:r}=t.payload,i=e.pairs[r],o=UE(n,i.parent);if(!o)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const s=i.gutter[n===Er.Horizontal?"clientWidth":"clientHeight"],l=r===0,c=r===e.pairs.length-1,{aGutterSize:d,bGutterSize:f}=wF(s,l,c);let h,p,g,v,y;return n===Er.Horizontal?(h=i.a.getBoundingClientRect().left,p=i.b.getBoundingClientRect().right,v=(i.a.getBoundingClientRect().width+d)/o*100,y=(i.b.getBoundingClientRect().width+f)/o*100,g=i.a.getBoundingClientRect().width+d+f+i.b.getBoundingClientRect().width):(h=i.a.getBoundingClientRect().top,p=i.b.getBoundingClientRect().bottom,v=(i.a.getBoundingClientRect().height+d)/o*100,y=(i.b.getBoundingClientRect().height+f)/o*100,g=i.a.getBoundingClientRect().height+d+f+i.b.getBoundingClientRect().height),e.pairs[r]=Object.assign(Object.assign({},i),{start:h,end:p,size:g,aSizePct:v,bSizePct:y,gutterSize:s}),Object.assign({},e)}default:return e}}function jQ(e,t=0,n=[]){return I.Children.toArray(e).reduce((r,i,o)=>(zQ.isFragment(i)?r.push.apply(r,jQ(i.props.children,t+1,n.concat(i.key||o))):I.isValidElement(i)?r.push(I.cloneElement(i,{key:n.concat(String(i.key)).join(".")})):typeof i!="string"&&typeof i!="number"||r.push(i),r),[])}(function(e){e[e.SetIsReadyToCompute=0]="SetIsReadyToCompute",e[e.CreatePairs=1]="CreatePairs",e[e.CalculateSizes=2]="CalculateSizes",e[e.StartDragging=3]="StartDragging",e[e.StopDragging=4]="StopDragging"})(ea||(ea={}));const hH=e=>"changedTouches"in e;var Er,_F;(function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"})(Er||(Er={})),function(e){e.Light="Light",e.Dark="Dark"}(_F||(_F={}));const AS=typeof window<"u"&&"ontouchstart"in window;function hL(e){return e===Er.Horizontal?"col-resize":"row-resize"}const Qwe={isReady:!1,isDragging:!1,pairs:[]};function Jwe({direction:e=Er.Horizontal,minWidths:t=[],minHeights:n=[],initialSizes:r,gutterTheme:i=_F.Dark,gutterClassName:o,draggerClassName:s,children:l,onResizeStarted:c,onResizeFinished:d,classes:f=[]}){const h=jQ(l),[p,g]=I.useReducer(Kwe,Qwe),v=I.useRef(null),y=I.useRef([]),S=I.useRef([]);y.current=[],S.current=[];const _=de.useCallback(W=>{g({type:ea.SetIsReadyToCompute,payload:{isReady:W}})},[]),b=de.useCallback((W,z)=>{g({type:ea.StartDragging,payload:{gutterIdx:z}});const D=p.pairs[z];c==null||c(D.idx),D.a.style.userSelect="none",D.b.style.userSelect="none",D.gutter.style.cursor=hL(W),D.parent.style.cursor=hL(W),document.body.style.cursor=hL(W)},[p.pairs]),x=de.useCallback(()=>{g({type:ea.StopDragging});const W=[];for(let D=0;D{g({type:ea.CalculateSizes,payload:{direction:W,gutterIdx:z}})},[]),A=de.useCallback((W,z,D)=>{g({type:ea.CreatePairs,payload:{direction:W,children:z,gutters:D}})},[]),R=de.useCallback((W,z,D,F)=>{const j=z[0].parentNode;if(!j)throw new Error("Cannot set initial sizes - parent is undefined");if(UE(W,j)===void 0)throw new Error("Cannot set initial sizes - parent has undefined size");z.forEach((V,G)=>{const K=G===0,Y=G===z.length-1;let J,ie=0;z.length>1&&(ie=D[Y?G-1:G].getBoundingClientRect()[W===Er.Horizontal?"width":"height"],ie=K||Y?ie/2:ie),J=F&&G{if(p.draggingIdx===void 0)throw new Error("Cannot adjust size - 'draggingIdx' is undefined");const D=p.pairs[p.draggingIdx];if(D.size===void 0)throw new Error("Cannot adjust size - 'pair.size' is undefined");if(D.gutterSize===void 0)throw new Error("Cannot adjust size - 'pair.gutterSize' is undefined");const F=D.aSizePct+D.bSizePct,j=z/D.size*F,V=F-z/D.size*F,G=p.draggingIdx===0,K=p.draggingIdx===p.pairs.length-1,{aGutterSize:Y,bGutterSize:J}=wF(D.gutterSize,G,K),ie=`calc(${j}% - ${Y}px)`,ce=`calc(${V}% - ${J}px)`;W===Er.Horizontal?(D.a.style.width=ie,D.b.style.width=ce):(D.a.style.height=ie,D.b.style.height=ce)},[p.draggingIdx,p.pairs,e]),O=de.useCallback((W,z,D)=>{if(!p.isDragging)return;if(p.draggingIdx===void 0)throw new Error("Cannot drag - 'draggingIdx' is undefined");const F=p.pairs[p.draggingIdx];if(F.start===void 0)throw new Error("Cannot drag - 'pair.start' is undefined");if(F.size===void 0)throw new Error("Cannot drag - 'pair.size' is undefined");if(F.gutterSize===void 0)throw new Error("Cannot drag - 'pair.gutterSize' is undefined");let j=function(K,Y){const J=hH(Y)?Y.changedTouches[0]:Y;return K===Er.Horizontal?J.clientX:J.clientY}(z,W)-F.start,V=16,G=16;D.length>p.draggingIdx&&(V=D[p.draggingIdx]),D.length>=p.draggingIdx+1&&(G=D[p.draggingIdx+1]),j=F.size-(F.gutterSize+G)&&(j=F.size-(F.gutterSize+G)),k(z,j)},[p.isDragging,p.draggingIdx,p.pairs,k]),L=()=>{if(p.isDragging){if(p.draggingIdx===void 0)throw new Error("Cannot calculate sizes after dragging = 'state.draggingIdx' is undefined");E(e,p.draggingIdx),x()}},N=W=>{p.isDragging&&(hH(W)&&W.preventDefault(),O(W,e,e===Er.Horizontal?t:n))};function H(W,z){if(!W.current)throw new Error("Can't add element to ref object - ref isn't initialized");z&&!W.current.includes(z)&&W.current.push(z)}return a_("mouseup",L,[p.isDragging,x]),a_("mousemove",N,[e,p.isDragging,O,t,n]),a_("touchend",L,[p.isDragging,x],{condition:AS}),a_("touchmove",N,[e,p.isDragging,O,t,n],{condition:AS,passive:!AS}),I.useEffect(function(){if(!v.current)return;const W=v.current.parentElement;if(!W)return;const z=new ResizeObserver(()=>{const D=getComputedStyle(W),F=e===Er.Horizontal?W.clientWidth:W.clientHeight;_(!!D&&!!F)});return z.observe(W),()=>{z.disconnect()}},[v.current,e]),I.useEffect(function(){if(p.isReady&&(!y.current||y.current[0].offsetParent)){if(!y.current||!S.current)throw new Error("Cannot create pairs - either variable 'childRefs' or 'gutterRefs' is undefined");h.length<=1?R(e,y.current,S.current,r):(R(e,y.current,S.current,r),A(e,y.current,S.current))}},[l,p.isReady,e,R,A,r]),C.jsx("div",Object.assign({className:`__dbk__container ${e}`,ref:v},{children:p.isReady&&h.map((W,z)=>C.jsxs(de.Fragment,{children:[C.jsx("div",Object.assign({ref:D=>H(y,D),className:"__dbk__child-wrapper "+(zH(S,D),className:o,theme:i,draggerClassName:s,direction:e,onDragging:()=>{return E(e,D=z),void b(e,D);var D}},void 0)]},z))}),void 0)}let Do=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");function db(e){if(typeof window>"u")return e;const t=I.useRef(null);return I.useLayoutEffect(()=>{t.current=e}),I.useCallback((...n)=>{var r;(r=t.current)===null||r===void 0||r.call(t,...n)},[])}const pH={};function Zwe(e,t){pH[e]||(pH[e]=!0,console.error("[material-ui-popup-state] WARNING",t))}const e_e={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function t_e({parentPopupState:e,popupId:t,variant:n,disableAutoFocus:r}){const i=I.useRef(!0);I.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const[o,s]=I.useState(e_e),l=I.useCallback(b=>{i.current&&s(b)},[]),c=I.useCallback(b=>l(x=>({...x,setAnchorElUsed:!0,anchorEl:b??void 0})),[]),d=db(b=>(o.isOpen?p(b):f(b),o)),f=db(b=>{const x=b instanceof Element?void 0:b,E=b instanceof Element?b:(b==null?void 0:b.currentTarget)instanceof Element?b.currentTarget:void 0;if((x==null?void 0:x.type)==="touchstart"){l(L=>({...L,_deferNextOpen:!0}));return}const A=x==null?void 0:x.clientX,R=x==null?void 0:x.clientY,k=typeof A=="number"&&typeof R=="number"?{left:A,top:R}:void 0,O=L=>{if(!b&&!L.setAnchorElUsed&&n!=="dialog"&&Zwe("missingEventOrAnchorEl","eventOrAnchorEl should be defined if setAnchorEl is not used"),e){if(!e.isOpen)return L;setTimeout(()=>e._setChildPopupState(_))}const N={...L,isOpen:!0,anchorPosition:k,hovered:(x==null?void 0:x.type)==="mouseover"||L.hovered,focused:(x==null?void 0:x.type)==="focus"||L.focused,_openEventType:x==null?void 0:x.type};return x!=null&&x.currentTarget?L.setAnchorElUsed||(N.anchorEl=x==null?void 0:x.currentTarget):E&&(N.anchorEl=E),N};l(L=>L._deferNextOpen?(setTimeout(()=>l(O),0),{...L,_deferNextOpen:!1}):O(L))}),h=b=>{const{_childPopupState:x}=b;return setTimeout(()=>{x==null||x.close(),e==null||e._setChildPopupState(null)}),{...b,isOpen:!1,hovered:!1,focused:!1}},p=db(b=>{const x=b instanceof Element?void 0:b;if((x==null?void 0:x.type)==="touchstart"){l(E=>({...E,_deferNextClose:!0}));return}l(E=>E._deferNextClose?(setTimeout(()=>l(h),0),{...E,_deferNextClose:!1}):h(E))}),g=I.useCallback((b,x)=>{b?f(x):p(x)},[]),v=db(b=>{const{relatedTarget:x}=b;l(E=>E.hovered&&!(x instanceof Element&&SF(x,_))?E.focused?{...E,hovered:!1}:h(E):E)}),y=db(b=>{if(!b)return;const{relatedTarget:x}=b;l(E=>E.focused&&!(x instanceof Element&&SF(x,_))?E.hovered?{...E,focused:!1}:h(E):E)}),S=I.useCallback(b=>l(x=>({...x,_childPopupState:b})),[]),_={...o,setAnchorEl:c,popupId:t,variant:n,open:f,close:p,toggle:d,setOpen:g,onBlur:y,onMouseLeave:v,disableAutoFocus:r??!!(o.hovered||o.focused),_setChildPopupState:S};return _}function n_e({isOpen:e,popupId:t,variant:n}){return{...n==="popover"?{"aria-haspopup":!0,"aria-controls":e&&t!=null?t:void 0}:n==="popper"?{"aria-describedby":e&&t!=null?t:void 0}:void 0}}function mk(e){return{...n_e(e),onClick:e.open,onTouchStart:e.open}}function sw({isOpen:e,anchorEl:t,anchorPosition:n,close:r,popupId:i,onMouseLeave:o,disableAutoFocus:s,_openEventType:l}){return{id:i,anchorEl:t,anchorPosition:n,anchorReference:l==="contextmenu"?"anchorPosition":"anchorEl",open:e,onClose:r,onMouseLeave:o,...s&&{autoFocus:!1,disableAutoFocusItem:!0,disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0}}}function r_e(e,{popupId:t}){if(!t)return null;const n=typeof e.getRootNode=="function"?e.getRootNode():document;return typeof n.getElementById=="function"?n.getElementById(t):null}function SF(e,t){const{anchorEl:n,_childPopupState:r}=t;return mH(n,e)||mH(r_e(e,t),e)||r!=null&&SF(e,r)}function mH(e,t){if(!e)return!1;for(;t;){if(t===e)return!0;t=t.parentElement}return!1}function Op({children:e,popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}){const o=t_e({popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}),s=e(o);return s??null}Op.propTypes={children:q0.func.isRequired,popupId:q0.string,variant:q0.oneOf(["popover","popper"]).isRequired,parentPopupState:q0.object,disableAutoFocus:q0.bool};function i_e({onSplitHorizontal:e,onClose:t,onSplitVertical:n,closeDisabled:r,splitHorizontalDisabled:i,splitVerticalDisabled:o}){return C.jsx(Op,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(Nd,{sx:{m:1},children:C.jsx(Kd,{title:"Panel Options",children:C.jsx(mp,{size:"small",...mk(s),children:C.jsx(Ixe,{fontSize:"small"})})})}),C.jsxs(Pp,{...sw(s),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[C.jsxs(gu,{onClick:n,disabled:o,children:[C.jsx(Ul,{children:C.jsx($8,{fontSize:"small"})}),C.jsx(sl,{children:"Split Vertical"})]}),C.jsxs(gu,{onClick:e,disabled:i,children:[C.jsx(Ul,{children:C.jsx($8,{fontSize:"small",sx:{transform:"rotate(90deg)"}})}),C.jsx(sl,{children:"Split Horizontal"})]}),C.jsx(tc,{}),C.jsxs(gu,{onClick:t,disabled:r,children:[C.jsx(Ul,{children:C.jsx(qK,{fontSize:"small"})}),C.jsx(sl,{children:"Close Panel"})]})]})]})})}function ko(e,t){const n=ee.clone(e);return t(n),n}function gH(e,t){return t(ee.clone(e))}function Rg(e){return t=>I.createElement(e,{...t,produce:n=>{var r;return(r=t==null?void 0:t.onChange)==null?void 0:r.call(t,i=>ko(i,n))}})}const UQ=I.createContext({});function Du(){return I.useContext(UQ)}function HQ({root:e={type:"leaf",key:""},renderLeaf:t,onChange:n,onClose:r,depth:i=0}){const{palette:o,spacing:s,transitions:l}=In(),c=Zx({"div&":{background:o.text.secondary,opacity:1-o.action.activatedOpacity,transition:l.create("opacity"),"&.Horizontal":{width:"3px"},"&.Vertical":{height:"3px"}}}),d=Zx({"div&":{background:o.background.default,[`&:hover .${c}`]:{opacity:1},"&.Horizontal":{padding:0},"&.Vertical":{padding:0}}}),f=g=>Number(s(g).slice(0,-2));function h(g){const v=100-ee.sumBy(g,"size"),y=ee.filter(g,S=>!S.size).length;return y?v/y:0}const p=I.useMemo(()=>{const g=v=>n==null?void 0:n(gH(e,y=>({key:Do(),type:"branch",orientation:v,children:[{...structuredClone(y),size:50,key:Do()},{...structuredClone(y),size:50,key:Do()}]})));return e.type==="leaf"?{state:e.content,controls:C.jsx(i_e,{onClose:r,closeDisabled:!i,onSplitHorizontal:()=>g("horizontal"),onSplitVertical:()=>g("vertical")}),onChange:v=>n==null?void 0:n(ko(e,y=>{y.content={...y.content,...v}}))}:{}},[n,r,i,e]);return C.jsx(C.Fragment,{children:e.type==="leaf"?C.jsx(bn,{children:C.jsx(bn,{sx:{borderRadius:g=>g.spacing(1),overflow:"hidden"},children:C.jsx(UQ.Provider,{value:p,children:t==null?void 0:t(e)})})}):C.jsx(Jwe,{gutterClassName:d,draggerClassName:c,onResizeFinished:(g,v)=>n==null?void 0:n(ko(e,y=>{ee.forEach(v,(S,_)=>{y.children[_].size=S})})),minHeights:ee.map(e.children,()=>f(6)-8),minWidths:ee.map(e.children,()=>f(32)),initialSizes:ee.map(e.children,(g,v,y)=>g.size??h(y)),direction:{vertical:Er.Vertical,horizontal:Er.Horizontal}[e.orientation],children:ee.map(e.children,(g,v)=>C.jsx(HQ,{depth:i+1,renderLeaf:t,root:g,onChange:y=>n==null?void 0:n(ko(e,S=>S.children[v]=y)),onClose:()=>n==null?void 0:n(gH(e,y=>(y.children.splice(v,1),y.children.length===1?y.children[0].type==="leaf"?{type:"leaf",key:Do(),content:y.children[0].content}:y.children[0]:(ee.forEach(y.children,(S,_,b)=>S.size=100/b.length),y))))},g.key))})})}function n1(){return n1=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var s_e=["PropTypes"],a_e=function(t,n){return I.Children.toArray(t).reduce(function(r,i){if(I.isValidElement(i)){var o=i.type.displayName;n!=null&&n.includes(o)&&(r[o]=i.props)}return r},{})},l_e=function(t,n){var r=I.Children.toArray(t).filter(function(i){if(I.isValidElement(i)){var o=i.type.displayName;return!(n!=null&&n.includes(o))}return!0});return r.length>0?r:void 0},c_e=function(t){return typeof t=="string"&&!s_e.includes(t)&&t.match(/^[A-Z0-9]/)},u_e=function(t){var n=I.memo(function(r){var i=r.children,o=r.propagateSlotProps,s=r.slotKeys,l=s===void 0?[]:s,c=o_e(r,["children","propagateSlotProps","slotKeys"]),d=I.useMemo(function(){return a_e(i,l)},[l,i]),f=I.useMemo(function(){return l_e(i,l)},[l,i]),h=I.useMemo(function(){return n1({},c,{slotProps:n1({},o,d)})},[c,d,o]);return I.createElement(t,h,f)});return n},d_e=function(t){var n=I.memo(u_e(t));n.displayName="WithSlots("+(t.displayName||t.name)+")";var r=new Proxy(n,{get:function(o,s,l){var c;if(s in o||typeof s=="symbol"||!c_e(s))return Reflect.get(o,s,l);var d=((c=Reflect.get(o,"defaultProps"))==null?void 0:c.slotKeys)||[],f=Reflect.get(o,s);if(!f){var h=function(){return null};h.displayName=s,Reflect.set(o,s,h)}return Reflect.set(o,"defaultProps",n1({},o.defaultProps,{slotKeys:[].concat(d,[s])})),Reflect.get(o,s,l)}});return r};function uz(){const e=In();return Qge(e.breakpoints.down("sm"))}const f_e=e=>e?48:36,h_e=8;function p_e({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Option"}){const o=uz(),s=ee.max([ee.findIndex(t,{value:n}),0])??0;return C.jsx(Op,{variant:"popover",children:l=>C.jsxs(C.Fragment,{children:[C.jsx(Kd,{title:i,children:C.jsx("span",{children:e==null?void 0:e(mk(l))})}),C.jsx(Pp,{...sw(l),anchorOrigin:{horizontal:"center",vertical:-f_e(o)*s-h_e},transformOrigin:{vertical:"top",horizontal:"center"},children:ee.map(t,({value:c,label:d,disabled:f})=>C.jsx(gu,{disabled:f,value:c,selected:c===n,onClick:()=>{l.close(),r==null||r(c)},children:d},c))})]})})}function mx(e){const{placeholder:t,value:n,items:r=[],onChange:i}=e;return C.jsx(X1,{sx:{minWidth:120},select:!0,label:t,value:n,variant:"filled",...e,onChange:o=>i==null?void 0:i(o.target.value),children:ee.map(r,o=>C.jsx(gu,{value:o.value,children:o.label},o.value))})}function $d({children:e,icon:t,showArrow:n,...r}){return C.jsx(AK,{...r,startIcon:t,endIcon:n&&C.jsx(Axe,{sx:{ml:-.5,color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1}}),children:C.jsx(dt,{sx:{color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1},children:e})})}function Xo({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,disabled:s,ButtonProps:l}){const c=ee.find(r,{id:t});return C.jsx(p_e,{placeholder:ee.startCase(e),trigger:d=>C.jsx($d,{...d,...l,disabled:!(r!=null&&r.length)||s,icon:i,showArrow:o,children:(c==null?void 0:c.name)??e}),items:ee.map(r,({id:d,name:f,description:h,hidden:p})=>({value:d,label:C.jsxs(C.Fragment,{children:[C.jsx(zt,{children:f}),C.jsx(Kr,{}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:h})]}),disabled:p})),value:c==null?void 0:c.id,onChange:n})}const WQ=[{url:"https://cdn.jsdelivr.net/gh/path-visualiser/app@adapter-warthog-wasm-dist/warthog-wasm.mjs",transport:"ipc",key:"default-ipc"}],GQ=[{url:"internal://d2-renderer/",key:"d2-renderer",transport:"native"}],cm=1,m_e={renderer:GQ,remote:WQ,playbackRate:cm,theme:"dark",acrylic:!0,accentColor:"blue"},[Lu,g_e]=nc({},p1e("settings",m_e)),{common:sVe,...v_e}=wq,y_e=` +/* ====== */`);const Ywe=de.forwardRef(({className:e,theme:t,draggerClassName:n,direction:r=Er.Vertical,onDragging:i},o)=>{const s=`__dbk__gutter ${r} ${e||t}`,l=`__dbk__dragger ${r} ${n||t}`;return C.jsx("div",Object.assign({className:s,ref:o,dir:r,onMouseDown:i,onTouchStart:AS?i:void 0},{children:C.jsx("div",{className:l},void 0)}),void 0)});var ea;function wF(e,t,n){let r,i;return t?(r=e/2,i=e):n?(r=e,i=e/2):(r=e,i=e),{aGutterSize:r,bGutterSize:i}}function Kwe(e,t){switch(t.type){case ea.SetIsReadyToCompute:return Object.assign(Object.assign({},e),{isReady:t.payload.isReady});case ea.CreatePairs:{const{direction:n,children:r,gutters:i}=t.payload,o=r[0].parentNode;if(!o)throw new Error("Cannot create pairs - parent is undefined.");const s=UE(n,o);if(s===void 0)throw new Error(`Cannot create pairs - parent has undefined or zero size: ${s}.`);const l=[];return r.forEach((c,d)=>{if(d>0){const f=r[d-1],h=r[d],p=i[d-1],g=n===Er.Horizontal?f.getBoundingClientRect().left:f.getBoundingClientRect().top,v=n===Er.Horizontal?h.getBoundingClientRect().right:h.getBoundingClientRect().bottom,y=n===Er.Horizontal?f.getBoundingClientRect().width+p.getBoundingClientRect().width+h.getBoundingClientRect().width:f.getBoundingClientRect().height+p.getBoundingClientRect().height+h.getBoundingClientRect().height,S=n===Er.Horizontal?p.getBoundingClientRect().width:p.getBoundingClientRect().height,_={idx:d-1,a:f,b:h,gutter:p,parent:o,start:g,end:v,size:y,gutterSize:S,aSizePct:100/r.length,bSizePct:100/r.length};l.push(_)}}),Object.assign(Object.assign({},e),{pairs:l})}case ea.StartDragging:{const{gutterIdx:n}=t.payload;return Object.assign(Object.assign({},e),{isDragging:!0,draggingIdx:n})}case ea.StopDragging:return Object.assign(Object.assign({},e),{isDragging:!1});case ea.CalculateSizes:{const{direction:n,gutterIdx:r}=t.payload,i=e.pairs[r],o=UE(n,i.parent);if(!o)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const s=i.gutter[n===Er.Horizontal?"clientWidth":"clientHeight"],l=r===0,c=r===e.pairs.length-1,{aGutterSize:d,bGutterSize:f}=wF(s,l,c);let h,p,g,v,y;return n===Er.Horizontal?(h=i.a.getBoundingClientRect().left,p=i.b.getBoundingClientRect().right,v=(i.a.getBoundingClientRect().width+d)/o*100,y=(i.b.getBoundingClientRect().width+f)/o*100,g=i.a.getBoundingClientRect().width+d+f+i.b.getBoundingClientRect().width):(h=i.a.getBoundingClientRect().top,p=i.b.getBoundingClientRect().bottom,v=(i.a.getBoundingClientRect().height+d)/o*100,y=(i.b.getBoundingClientRect().height+f)/o*100,g=i.a.getBoundingClientRect().height+d+f+i.b.getBoundingClientRect().height),e.pairs[r]=Object.assign(Object.assign({},i),{start:h,end:p,size:g,aSizePct:v,bSizePct:y,gutterSize:s}),Object.assign({},e)}default:return e}}function jQ(e,t=0,n=[]){return I.Children.toArray(e).reduce((r,i,o)=>(zQ.isFragment(i)?r.push.apply(r,jQ(i.props.children,t+1,n.concat(i.key||o))):I.isValidElement(i)?r.push(I.cloneElement(i,{key:n.concat(String(i.key)).join(".")})):typeof i!="string"&&typeof i!="number"||r.push(i),r),[])}(function(e){e[e.SetIsReadyToCompute=0]="SetIsReadyToCompute",e[e.CreatePairs=1]="CreatePairs",e[e.CalculateSizes=2]="CalculateSizes",e[e.StartDragging=3]="StartDragging",e[e.StopDragging=4]="StopDragging"})(ea||(ea={}));const hH=e=>"changedTouches"in e;var Er,_F;(function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"})(Er||(Er={})),function(e){e.Light="Light",e.Dark="Dark"}(_F||(_F={}));const AS=typeof window<"u"&&"ontouchstart"in window;function hL(e){return e===Er.Horizontal?"col-resize":"row-resize"}const Qwe={isReady:!1,isDragging:!1,pairs:[]};function Jwe({direction:e=Er.Horizontal,minWidths:t=[],minHeights:n=[],initialSizes:r,gutterTheme:i=_F.Dark,gutterClassName:o,draggerClassName:s,children:l,onResizeStarted:c,onResizeFinished:d,classes:f=[]}){const h=jQ(l),[p,g]=I.useReducer(Kwe,Qwe),v=I.useRef(null),y=I.useRef([]),S=I.useRef([]);y.current=[],S.current=[];const _=de.useCallback(W=>{g({type:ea.SetIsReadyToCompute,payload:{isReady:W}})},[]),b=de.useCallback((W,z)=>{g({type:ea.StartDragging,payload:{gutterIdx:z}});const D=p.pairs[z];c==null||c(D.idx),D.a.style.userSelect="none",D.b.style.userSelect="none",D.gutter.style.cursor=hL(W),D.parent.style.cursor=hL(W),document.body.style.cursor=hL(W)},[p.pairs]),x=de.useCallback(()=>{g({type:ea.StopDragging});const W=[];for(let D=0;D{g({type:ea.CalculateSizes,payload:{direction:W,gutterIdx:z}})},[]),A=de.useCallback((W,z,D)=>{g({type:ea.CreatePairs,payload:{direction:W,children:z,gutters:D}})},[]),R=de.useCallback((W,z,D,F)=>{const j=z[0].parentNode;if(!j)throw new Error("Cannot set initial sizes - parent is undefined");if(UE(W,j)===void 0)throw new Error("Cannot set initial sizes - parent has undefined size");z.forEach((V,G)=>{const K=G===0,Y=G===z.length-1;let J,ie=0;z.length>1&&(ie=D[Y?G-1:G].getBoundingClientRect()[W===Er.Horizontal?"width":"height"],ie=K||Y?ie/2:ie),J=F&&G{if(p.draggingIdx===void 0)throw new Error("Cannot adjust size - 'draggingIdx' is undefined");const D=p.pairs[p.draggingIdx];if(D.size===void 0)throw new Error("Cannot adjust size - 'pair.size' is undefined");if(D.gutterSize===void 0)throw new Error("Cannot adjust size - 'pair.gutterSize' is undefined");const F=D.aSizePct+D.bSizePct,j=z/D.size*F,V=F-z/D.size*F,G=p.draggingIdx===0,K=p.draggingIdx===p.pairs.length-1,{aGutterSize:Y,bGutterSize:J}=wF(D.gutterSize,G,K),ie=`calc(${j}% - ${Y}px)`,ce=`calc(${V}% - ${J}px)`;W===Er.Horizontal?(D.a.style.width=ie,D.b.style.width=ce):(D.a.style.height=ie,D.b.style.height=ce)},[p.draggingIdx,p.pairs,e]),O=de.useCallback((W,z,D)=>{if(!p.isDragging)return;if(p.draggingIdx===void 0)throw new Error("Cannot drag - 'draggingIdx' is undefined");const F=p.pairs[p.draggingIdx];if(F.start===void 0)throw new Error("Cannot drag - 'pair.start' is undefined");if(F.size===void 0)throw new Error("Cannot drag - 'pair.size' is undefined");if(F.gutterSize===void 0)throw new Error("Cannot drag - 'pair.gutterSize' is undefined");let j=function(K,Y){const J=hH(Y)?Y.changedTouches[0]:Y;return K===Er.Horizontal?J.clientX:J.clientY}(z,W)-F.start,V=16,G=16;D.length>p.draggingIdx&&(V=D[p.draggingIdx]),D.length>=p.draggingIdx+1&&(G=D[p.draggingIdx+1]),j=F.size-(F.gutterSize+G)&&(j=F.size-(F.gutterSize+G)),k(z,j)},[p.isDragging,p.draggingIdx,p.pairs,k]),L=()=>{if(p.isDragging){if(p.draggingIdx===void 0)throw new Error("Cannot calculate sizes after dragging = 'state.draggingIdx' is undefined");E(e,p.draggingIdx),x()}},N=W=>{p.isDragging&&(hH(W)&&W.preventDefault(),O(W,e,e===Er.Horizontal?t:n))};function H(W,z){if(!W.current)throw new Error("Can't add element to ref object - ref isn't initialized");z&&!W.current.includes(z)&&W.current.push(z)}return a_("mouseup",L,[p.isDragging,x]),a_("mousemove",N,[e,p.isDragging,O,t,n]),a_("touchend",L,[p.isDragging,x],{condition:AS}),a_("touchmove",N,[e,p.isDragging,O,t,n],{condition:AS,passive:!AS}),I.useEffect(function(){if(!v.current)return;const W=v.current.parentElement;if(!W)return;const z=new ResizeObserver(()=>{const D=getComputedStyle(W),F=e===Er.Horizontal?W.clientWidth:W.clientHeight;_(!!D&&!!F)});return z.observe(W),()=>{z.disconnect()}},[v.current,e]),I.useEffect(function(){if(p.isReady&&(!y.current||y.current[0].offsetParent)){if(!y.current||!S.current)throw new Error("Cannot create pairs - either variable 'childRefs' or 'gutterRefs' is undefined");h.length<=1?R(e,y.current,S.current,r):(R(e,y.current,S.current,r),A(e,y.current,S.current))}},[l,p.isReady,e,R,A,r]),C.jsx("div",Object.assign({className:`__dbk__container ${e}`,ref:v},{children:p.isReady&&h.map((W,z)=>C.jsxs(de.Fragment,{children:[C.jsx("div",Object.assign({ref:D=>H(y,D),className:"__dbk__child-wrapper "+(zH(S,D),className:o,theme:i,draggerClassName:s,direction:e,onDragging:()=>{return E(e,D=z),void b(e,D);var D}},void 0)]},z))}),void 0)}let Do=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");function db(e){if(typeof window>"u")return e;const t=I.useRef(null);return I.useLayoutEffect(()=>{t.current=e}),I.useCallback((...n)=>{var r;(r=t.current)===null||r===void 0||r.call(t,...n)},[])}const pH={};function Zwe(e,t){pH[e]||(pH[e]=!0,console.error("[material-ui-popup-state] WARNING",t))}const e_e={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function t_e({parentPopupState:e,popupId:t,variant:n,disableAutoFocus:r}){const i=I.useRef(!0);I.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const[o,s]=I.useState(e_e),l=I.useCallback(b=>{i.current&&s(b)},[]),c=I.useCallback(b=>l(x=>({...x,setAnchorElUsed:!0,anchorEl:b??void 0})),[]),d=db(b=>(o.isOpen?p(b):f(b),o)),f=db(b=>{const x=b instanceof Element?void 0:b,E=b instanceof Element?b:(b==null?void 0:b.currentTarget)instanceof Element?b.currentTarget:void 0;if((x==null?void 0:x.type)==="touchstart"){l(L=>({...L,_deferNextOpen:!0}));return}const A=x==null?void 0:x.clientX,R=x==null?void 0:x.clientY,k=typeof A=="number"&&typeof R=="number"?{left:A,top:R}:void 0,O=L=>{if(!b&&!L.setAnchorElUsed&&n!=="dialog"&&Zwe("missingEventOrAnchorEl","eventOrAnchorEl should be defined if setAnchorEl is not used"),e){if(!e.isOpen)return L;setTimeout(()=>e._setChildPopupState(_))}const N={...L,isOpen:!0,anchorPosition:k,hovered:(x==null?void 0:x.type)==="mouseover"||L.hovered,focused:(x==null?void 0:x.type)==="focus"||L.focused,_openEventType:x==null?void 0:x.type};return x!=null&&x.currentTarget?L.setAnchorElUsed||(N.anchorEl=x==null?void 0:x.currentTarget):E&&(N.anchorEl=E),N};l(L=>L._deferNextOpen?(setTimeout(()=>l(O),0),{...L,_deferNextOpen:!1}):O(L))}),h=b=>{const{_childPopupState:x}=b;return setTimeout(()=>{x==null||x.close(),e==null||e._setChildPopupState(null)}),{...b,isOpen:!1,hovered:!1,focused:!1}},p=db(b=>{const x=b instanceof Element?void 0:b;if((x==null?void 0:x.type)==="touchstart"){l(E=>({...E,_deferNextClose:!0}));return}l(E=>E._deferNextClose?(setTimeout(()=>l(h),0),{...E,_deferNextClose:!1}):h(E))}),g=I.useCallback((b,x)=>{b?f(x):p(x)},[]),v=db(b=>{const{relatedTarget:x}=b;l(E=>E.hovered&&!(x instanceof Element&&SF(x,_))?E.focused?{...E,hovered:!1}:h(E):E)}),y=db(b=>{if(!b)return;const{relatedTarget:x}=b;l(E=>E.focused&&!(x instanceof Element&&SF(x,_))?E.hovered?{...E,focused:!1}:h(E):E)}),S=I.useCallback(b=>l(x=>({...x,_childPopupState:b})),[]),_={...o,setAnchorEl:c,popupId:t,variant:n,open:f,close:p,toggle:d,setOpen:g,onBlur:y,onMouseLeave:v,disableAutoFocus:r??!!(o.hovered||o.focused),_setChildPopupState:S};return _}function n_e({isOpen:e,popupId:t,variant:n}){return{...n==="popover"?{"aria-haspopup":!0,"aria-controls":e&&t!=null?t:void 0}:n==="popper"?{"aria-describedby":e&&t!=null?t:void 0}:void 0}}function mk(e){return{...n_e(e),onClick:e.open,onTouchStart:e.open}}function sw({isOpen:e,anchorEl:t,anchorPosition:n,close:r,popupId:i,onMouseLeave:o,disableAutoFocus:s,_openEventType:l}){return{id:i,anchorEl:t,anchorPosition:n,anchorReference:l==="contextmenu"?"anchorPosition":"anchorEl",open:e,onClose:r,onMouseLeave:o,...s&&{autoFocus:!1,disableAutoFocusItem:!0,disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0}}}function r_e(e,{popupId:t}){if(!t)return null;const n=typeof e.getRootNode=="function"?e.getRootNode():document;return typeof n.getElementById=="function"?n.getElementById(t):null}function SF(e,t){const{anchorEl:n,_childPopupState:r}=t;return mH(n,e)||mH(r_e(e,t),e)||r!=null&&SF(e,r)}function mH(e,t){if(!e)return!1;for(;t;){if(t===e)return!0;t=t.parentElement}return!1}function Op({children:e,popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}){const o=t_e({popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}),s=e(o);return s??null}Op.propTypes={children:q0.func.isRequired,popupId:q0.string,variant:q0.oneOf(["popover","popper"]).isRequired,parentPopupState:q0.object,disableAutoFocus:q0.bool};function i_e({onSplitHorizontal:e,onClose:t,onSplitVertical:n,closeDisabled:r,splitHorizontalDisabled:i,splitVerticalDisabled:o}){return C.jsx(Op,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(Nd,{sx:{m:1},children:C.jsx(Kd,{title:"Panel Options",children:C.jsx(mp,{size:"small",...mk(s),children:C.jsx(Ixe,{fontSize:"small"})})})}),C.jsxs(Pp,{...sw(s),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[C.jsxs(gu,{onClick:n,disabled:o,children:[C.jsx(Ul,{children:C.jsx($8,{fontSize:"small"})}),C.jsx(sl,{children:"Split Vertical"})]}),C.jsxs(gu,{onClick:e,disabled:i,children:[C.jsx(Ul,{children:C.jsx($8,{fontSize:"small",sx:{transform:"rotate(90deg)"}})}),C.jsx(sl,{children:"Split Horizontal"})]}),C.jsx(tc,{}),C.jsxs(gu,{onClick:t,disabled:r,children:[C.jsx(Ul,{children:C.jsx(qK,{fontSize:"small"})}),C.jsx(sl,{children:"Close Panel"})]})]})]})})}function Ui(e,t){const n=ee.clone(e);return t(n),n}function gH(e,t){return t(ee.clone(e))}function Rg(e){return t=>I.createElement(e,{...t,produce:n=>{var r;return(r=t==null?void 0:t.onChange)==null?void 0:r.call(t,i=>Ui(i,n))}})}const UQ=I.createContext({});function Du(){return I.useContext(UQ)}function HQ({root:e={type:"leaf",key:""},renderLeaf:t,onChange:n,onClose:r,depth:i=0}){const{palette:o,spacing:s,transitions:l}=In(),c=Zx({"div&":{background:o.text.secondary,opacity:1-o.action.activatedOpacity,transition:l.create("opacity"),"&.Horizontal":{width:"3px"},"&.Vertical":{height:"3px"}}}),d=Zx({"div&":{background:o.background.default,[`&:hover .${c}`]:{opacity:1},"&.Horizontal":{padding:0},"&.Vertical":{padding:0}}}),f=g=>Number(s(g).slice(0,-2));function h(g){const v=100-ee.sumBy(g,"size"),y=ee.filter(g,S=>!S.size).length;return y?v/y:0}const p=I.useMemo(()=>{const g=v=>n==null?void 0:n(gH(e,y=>({key:Do(),type:"branch",orientation:v,children:[{...structuredClone(y),size:50,key:Do()},{...structuredClone(y),size:50,key:Do()}]})));return e.type==="leaf"?{state:e.content,controls:C.jsx(i_e,{onClose:r,closeDisabled:!i,onSplitHorizontal:()=>g("horizontal"),onSplitVertical:()=>g("vertical")}),onChange:v=>n==null?void 0:n(Ui(e,y=>{y.content={...y.content,...v}}))}:{}},[n,r,i,e]);return C.jsx(C.Fragment,{children:e.type==="leaf"?C.jsx(bn,{children:C.jsx(bn,{sx:{borderRadius:g=>g.spacing(1),overflow:"hidden"},children:C.jsx(UQ.Provider,{value:p,children:t==null?void 0:t(e)})})}):C.jsx(Jwe,{gutterClassName:d,draggerClassName:c,onResizeFinished:(g,v)=>n==null?void 0:n(Ui(e,y=>{ee.forEach(v,(S,_)=>{y.children[_].size=S})})),minHeights:ee.map(e.children,()=>f(6)-8),minWidths:ee.map(e.children,()=>f(32)),initialSizes:ee.map(e.children,(g,v,y)=>g.size??h(y)),direction:{vertical:Er.Vertical,horizontal:Er.Horizontal}[e.orientation],children:ee.map(e.children,(g,v)=>C.jsx(HQ,{depth:i+1,renderLeaf:t,root:g,onChange:y=>n==null?void 0:n(Ui(e,S=>S.children[v]=y)),onClose:()=>n==null?void 0:n(gH(e,y=>(y.children.splice(v,1),y.children.length===1?y.children[0].type==="leaf"?{type:"leaf",key:Do(),content:y.children[0].content}:y.children[0]:(ee.forEach(y.children,(S,_,b)=>S.size=100/b.length),y))))},g.key))})})}function n1(){return n1=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var s_e=["PropTypes"],a_e=function(t,n){return I.Children.toArray(t).reduce(function(r,i){if(I.isValidElement(i)){var o=i.type.displayName;n!=null&&n.includes(o)&&(r[o]=i.props)}return r},{})},l_e=function(t,n){var r=I.Children.toArray(t).filter(function(i){if(I.isValidElement(i)){var o=i.type.displayName;return!(n!=null&&n.includes(o))}return!0});return r.length>0?r:void 0},c_e=function(t){return typeof t=="string"&&!s_e.includes(t)&&t.match(/^[A-Z0-9]/)},u_e=function(t){var n=I.memo(function(r){var i=r.children,o=r.propagateSlotProps,s=r.slotKeys,l=s===void 0?[]:s,c=o_e(r,["children","propagateSlotProps","slotKeys"]),d=I.useMemo(function(){return a_e(i,l)},[l,i]),f=I.useMemo(function(){return l_e(i,l)},[l,i]),h=I.useMemo(function(){return n1({},c,{slotProps:n1({},o,d)})},[c,d,o]);return I.createElement(t,h,f)});return n},d_e=function(t){var n=I.memo(u_e(t));n.displayName="WithSlots("+(t.displayName||t.name)+")";var r=new Proxy(n,{get:function(o,s,l){var c;if(s in o||typeof s=="symbol"||!c_e(s))return Reflect.get(o,s,l);var d=((c=Reflect.get(o,"defaultProps"))==null?void 0:c.slotKeys)||[],f=Reflect.get(o,s);if(!f){var h=function(){return null};h.displayName=s,Reflect.set(o,s,h)}return Reflect.set(o,"defaultProps",n1({},o.defaultProps,{slotKeys:[].concat(d,[s])})),Reflect.get(o,s,l)}});return r};function uz(){const e=In();return Qge(e.breakpoints.down("sm"))}const f_e=e=>e?48:36,h_e=8;function p_e({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Option"}){const o=uz(),s=ee.max([ee.findIndex(t,{value:n}),0])??0;return C.jsx(Op,{variant:"popover",children:l=>C.jsxs(C.Fragment,{children:[C.jsx(Kd,{title:i,children:C.jsx("span",{children:e==null?void 0:e(mk(l))})}),C.jsx(Pp,{...sw(l),anchorOrigin:{horizontal:"center",vertical:-f_e(o)*s-h_e},transformOrigin:{vertical:"top",horizontal:"center"},children:ee.map(t,({value:c,label:d,disabled:f})=>C.jsx(gu,{disabled:f,value:c,selected:c===n,onClick:()=>{l.close(),r==null||r(c)},children:d},c))})]})})}function mx(e){const{placeholder:t,value:n,items:r=[],onChange:i}=e;return C.jsx(X1,{sx:{minWidth:120},select:!0,label:t,value:n,variant:"filled",...e,onChange:o=>i==null?void 0:i(o.target.value),children:ee.map(r,o=>C.jsx(gu,{value:o.value,children:o.label},o.value))})}function $d({children:e,icon:t,showArrow:n,...r}){return C.jsx(AK,{...r,startIcon:t,endIcon:n&&C.jsx(Axe,{sx:{ml:-.5,color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1}}),children:C.jsx(dt,{sx:{color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1},children:e})})}function Xo({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,disabled:s,ButtonProps:l}){const c=ee.find(r,{id:t});return C.jsx(p_e,{placeholder:ee.startCase(e),trigger:d=>C.jsx($d,{...d,...l,disabled:!(r!=null&&r.length)||s,icon:i,showArrow:o,children:(c==null?void 0:c.name)??e}),items:ee.map(r,({id:d,name:f,description:h,hidden:p})=>({value:d,label:C.jsxs(C.Fragment,{children:[C.jsx(zt,{children:f}),C.jsx(Kr,{}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:h})]}),disabled:p})),value:c==null?void 0:c.id,onChange:n})}const WQ=[{url:"https://cdn.jsdelivr.net/gh/path-visualiser/app@adapter-warthog-wasm-dist/warthog-wasm.mjs",transport:"ipc",key:"default-ipc"}],GQ=[{url:"internal://d2-renderer/",key:"d2-renderer",transport:"native"}],cm=1,m_e={renderer:GQ,remote:WQ,playbackRate:cm,theme:"dark",acrylic:!0,accentColor:"blue"},[Lu,g_e]=nc({},p1e("settings",m_e)),{common:aVe,...v_e}=wq,y_e=` 0px 8px 18px -1px rgb(0 0 0 / 8%), 0px 10px 48px 0px rgb(0 0 0 / 1%), 0px 20px 96px 0px rgb(0 0 0 / 0.5%) `,vH=`"Inter", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", - "Droid Sans", "Helvetica Neue", "Arial", sans-serif`,b_e=(e,t)=>$5({palette:{primary:{main:wq[t][e==="dark"?"A100":"A700"]},mode:e,background:e==="dark"?{default:"#1c2128",paper:"#22272e"}:{default:"#f6f8fa",paper:"#ffffff"}},typography:{allVariants:{fontFamily:vH},button:{textTransform:"none",fontWeight:400,letterSpacing:0,backgroundColor:"background.paper"}},components:{MuiPopover:{styleOverrides:{paper:{backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06))"}}},MuiTooltip:{styleOverrides:{tooltip:{backgroundImage:"linear-gradient(#1c2128, #1c2128)",fontFamily:vH}}},MuiTypography:{styleOverrides:{body1:{fontWeight:400,fontSize:"0.875rem"},overline:{fontWeight:400,textTransform:"none",letterSpacing:0,fontSize:"0.875rem"},h6:{fontWeight:500,letterSpacing:-.4}}}},shadows:["",...ee.times(24,ee.constant(y_e))]});function dz(){const[{acrylic:e}]=Lu();return e?{backdropFilter:"blur(10px)",background:({palette:t})=>_n(t.background.paper,.75)}:{backdropFilter:"blur(0px)",background:({palette:t})=>t.background.paper}}const x_e=C.jsx(tc,{orientation:"vertical",flexItem:!0,sx:{m:1,height:e=>e.spacing(3),alignSelf:"auto"}}),Sn=d_e(({slotProps:e,onChange:t,stack:n})=>{var i,o,s,l;const r=dz();return C.jsxs(bn,{vertical:!0,children:[C.jsx(bn,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:C.jsx(vp,{in:!0,children:C.jsx(dt,{sx:{width:"100%",height:"100%",bgcolor:"background.paper"},children:(i=e.Content)==null?void 0:i.children})})}),C.jsxs(bn,{sx:{height:c=>c.spacing(6)},children:[C.jsx(bn,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:6,...r},children:C.jsx(rv,{x:!0,children:C.jsxs(bn,{sx:{width:"max-content",height:c=>c.spacing(6),alignItems:"center",p:1},children:[C.jsx(Xo,{showArrow:!0,label:"Page",onChange:c=>t==null?void 0:t({...n,type:c}),icon:(o=h5[n.type])==null?void 0:o.icon,value:n==null?void 0:n.type,items:ee.values(h5)}),((s=e.Options)==null?void 0:s.children)&&C.jsxs(C.Fragment,{children:[x_e,e.Options.children]})]})})}),C.jsx(Kr,{sx:{mx:"auto"}}),(l=e.Extras)==null?void 0:l.children]})]})}),VQ=""+new URL("logo512-23eace97.png",import.meta.url).href,EF="Visualiser",w_e="1.1.0",__e="1.1.0; mid November 2023",S_e="https://github.com/path-visualiser/app",E_e="https://github.com/path-visualiser/app/blob/master/docs",C_e=[{name:"Dr Daniel Harabor",email:"daniel.harabor@monash.edu"},{name:"Dr Michael Wybrow",email:"michael.wybrow@monash.edu"},{name:"Karan Batta",email:"krnbatta@gmail.com"},{name:"Jay Wingate",email:"jaypeterwingate@gmail.com"},{name:"Kevin Zheng",email:"kzhe0012@student.monash.edu"},{name:"Leo Whitehead",email:"leo@whiteheadsoftware.dev"},{name:"Can Wang",email:"camwang@outlook.com"},{name:"Rory Tobin-Underwood",email:"rorytu@gmail.com"}];function T_e(){const{controls:e,onChange:t,state:n}=Du();function r(i,o){return C.jsxs(dt,{sx:{pt:2},children:[C.jsx(zt,{variant:"overline",color:"text.secondary",children:i}),C.jsx(zt,{variant:"body2",children:o})]})}return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsxs(bn,{children:[" ",C.jsx(rv,{y:!0,children:C.jsxs(dt,{sx:{p:2},children:[C.jsx(dt,{sx:{pt:6,pb:2},children:C.jsx("img",{src:VQ,height:"64"})}),C.jsx(zt,{variant:"h6",children:EF}),r("Build Info",C.jsx(C.Fragment,{children:__e})),r("About this App",C.jsxs(C.Fragment,{children:[EF," is a visualising debugging tool for pathfinding search. It can be used to visualise progression of search and debug pathfinding algorithms. It can handle range of different types of algorithms (demos are provided in the home page). This tool is highly customizable and provide flexibility to visualise any algorithm trace that you can augment using our docs."]})),r("Team",C.jsxs(C.Fragment,{children:["Our team is made up of present/past Monash students and Professors Dr Daniel Harabor:",C.jsx(yp,{sx:{mx:-2},children:C_e.map(({name:i,email:o},s)=>C.jsxs(PE,{href:`mailto:${o}`,children:[C.jsx(Jve,{children:C.jsx(Npe,{children:ee.head(i)})}),C.jsx(sl,{primary:i,secondary:o})]},s))})]})),r("Resources",C.jsx(C.Fragment,{children:C.jsx(yp,{sx:{mx:-2},children:C.jsxs(PE,{target:"_blank",href:"https://github.com/path-visualiser",children:[C.jsx(Ul,{children:C.jsx(Cxe,{})}),C.jsx(sl,{primary:"Repository",secondary:"https://github.com/path-visualiser"})]})})}))]})})]})}),C.jsx(Sn.Extras,{children:e})]})}const qQ=I.createContext(null);function k_e(){const[e,t]=I.useState(null);return I.useEffect(()=>{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function XQ(e){const{children:t,value:n}=e,r=k_e(),i=I.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return C.jsx(qQ.Provider,{value:i,children:t})}function YQ(){return I.useContext(qQ)}function KQ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function QQ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}const A_e=["children"],R_e=I.forwardRef(function(t,n){const{children:r}=t,i=Le(t,A_e),o=YQ();if(o===null)throw new TypeError("No TabContext provided");const s=I.Children.map(r,l=>I.isValidElement(l)?I.cloneElement(l,{"aria-controls":KQ(o,l.props.value),id:QQ(o,l.props.value)}):null);return C.jsx(oxe,$({},i,{ref:n,value:o.value,children:s}))}),JQ=R_e;function I_e(e){return _t("MuiTabPanel",e)}Ct("MuiTabPanel",["root"]);const P_e=["children","className","value"],O_e=e=>{const{classes:t}=e;return Et({root:["root"]},I_e,t)},M_e=Ee("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),D_e=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTabPanel"}),{children:i,className:o,value:s}=r,l=Le(r,P_e),c=$({},r),d=O_e(c),f=YQ();if(f===null)throw new TypeError("No TabContext provided");const h=KQ(f,s),p=QQ(f,s);return C.jsx(M_e,$({"aria-labelledby":p,className:Fe(d.root,o),hidden:s!==f.value,id:h,ref:n,role:"tabpanel",ownerState:c},l,{children:s===f.value&&i}))}),Bm=D_e;var ZQ={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ZQ);var fz=ZQ.exports;function CF({label:e=C.jsx(C.Fragment,{}),...t}){return C.jsx(Pge,{control:C.jsx(Tg,{defaultChecked:!0,...t}),label:e})}function L_e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bH(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function B_e(e,t){if(e==null)return{};var n=N_e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $_e(e,t){return F_e(e)||z_e(e,t)||j_e(e,t)||U_e()}function F_e(e){if(Array.isArray(e))return e}function z_e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),l;!(r=(l=s.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,o=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function j_e(e,t){if(e){if(typeof e=="string")return xH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xH(e,t)}}function xH(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n$5({palette:{primary:{main:wq[t][e==="dark"?"A100":"A700"]},mode:e,background:e==="dark"?{default:"#1c2128",paper:"#22272e"}:{default:"#f6f8fa",paper:"#ffffff"}},typography:{allVariants:{fontFamily:vH},button:{textTransform:"none",fontWeight:400,letterSpacing:0,backgroundColor:"background.paper"}},components:{MuiPopover:{styleOverrides:{paper:{backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06))"}}},MuiTooltip:{styleOverrides:{tooltip:{backgroundImage:"linear-gradient(#1c2128, #1c2128)",fontFamily:vH}}},MuiTypography:{styleOverrides:{body1:{fontWeight:400,fontSize:"0.875rem"},overline:{fontWeight:400,textTransform:"none",letterSpacing:0,fontSize:"0.875rem"},h6:{fontWeight:500,letterSpacing:-.4}}}},shadows:["",...ee.times(24,ee.constant(y_e))]});function dz(){const[{acrylic:e}]=Lu();return e?{backdropFilter:"blur(10px)",background:({palette:t})=>_n(t.background.paper,.75)}:{backdropFilter:"blur(0px)",background:({palette:t})=>t.background.paper}}const x_e=C.jsx(tc,{orientation:"vertical",flexItem:!0,sx:{m:1,height:e=>e.spacing(3),alignSelf:"auto"}}),Sn=d_e(({slotProps:e,onChange:t,stack:n})=>{var i,o,s,l;const r=dz();return C.jsxs(bn,{vertical:!0,children:[C.jsx(bn,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:C.jsx(vp,{in:!0,children:C.jsx(dt,{sx:{width:"100%",height:"100%",bgcolor:"background.paper"},children:(i=e.Content)==null?void 0:i.children})})}),C.jsxs(bn,{sx:{height:c=>c.spacing(6)},children:[C.jsx(bn,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:6,...r},children:C.jsx(rv,{x:!0,children:C.jsxs(bn,{sx:{width:"max-content",height:c=>c.spacing(6),alignItems:"center",p:1},children:[C.jsx(Xo,{showArrow:!0,label:"Page",onChange:c=>t==null?void 0:t({...n,type:c}),icon:(o=h5[n.type])==null?void 0:o.icon,value:n==null?void 0:n.type,items:ee.values(h5)}),((s=e.Options)==null?void 0:s.children)&&C.jsxs(C.Fragment,{children:[x_e,e.Options.children]})]})})}),C.jsx(Kr,{sx:{mx:"auto"}}),(l=e.Extras)==null?void 0:l.children]})]})}),VQ=""+new URL("logo512-23eace97.png",import.meta.url).href,EF="Visualiser",w_e="1.1.1",__e="1.1.1; early December 2023",S_e="https://github.com/path-visualiser/app",E_e="https://github.com/path-visualiser/app/blob/master/docs",C_e=[{name:"Dr Daniel Harabor",email:"daniel.harabor@monash.edu"},{name:"Dr Michael Wybrow",email:"michael.wybrow@monash.edu"},{name:"Karan Batta",email:"krnbatta@gmail.com"},{name:"Jay Wingate",email:"jaypeterwingate@gmail.com"},{name:"Kevin Zheng",email:"kzhe0012@student.monash.edu"},{name:"Leo Whitehead",email:"leo@whiteheadsoftware.dev"},{name:"Can Wang",email:"camwang@outlook.com"},{name:"Rory Tobin-Underwood",email:"rorytu@gmail.com"}];function T_e(){const{controls:e,onChange:t,state:n}=Du();function r(i,o){return C.jsxs(dt,{sx:{pt:2},children:[C.jsx(zt,{variant:"overline",color:"text.secondary",children:i}),C.jsx(zt,{variant:"body2",children:o})]})}return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsxs(bn,{children:[" ",C.jsx(rv,{y:!0,children:C.jsxs(dt,{sx:{p:2},children:[C.jsx(dt,{sx:{pt:6,pb:2},children:C.jsx("img",{src:VQ,height:"64"})}),C.jsx(zt,{variant:"h6",children:EF}),r("Build Info",C.jsx(C.Fragment,{children:__e})),r("About this App",C.jsxs(C.Fragment,{children:[EF," is a visualising debugging tool for pathfinding search. It can be used to visualise progression of search and debug pathfinding algorithms. It can handle range of different types of algorithms (demos are provided in the home page). This tool is highly customizable and provide flexibility to visualise any algorithm trace that you can augment using our docs."]})),r("Team",C.jsxs(C.Fragment,{children:["Our team is made up of present/past Monash students and Professors Dr Daniel Harabor:",C.jsx(yp,{sx:{mx:-2},children:C_e.map(({name:i,email:o},s)=>C.jsxs(PE,{href:`mailto:${o}`,children:[C.jsx(Jve,{children:C.jsx(Npe,{children:ee.head(i)})}),C.jsx(sl,{primary:i,secondary:o})]},s))})]})),r("Resources",C.jsx(C.Fragment,{children:C.jsx(yp,{sx:{mx:-2},children:C.jsxs(PE,{target:"_blank",href:"https://github.com/path-visualiser",children:[C.jsx(Ul,{children:C.jsx(Cxe,{})}),C.jsx(sl,{primary:"Repository",secondary:"https://github.com/path-visualiser"})]})})}))]})})]})}),C.jsx(Sn.Extras,{children:e})]})}const qQ=I.createContext(null);function k_e(){const[e,t]=I.useState(null);return I.useEffect(()=>{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function XQ(e){const{children:t,value:n}=e,r=k_e(),i=I.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return C.jsx(qQ.Provider,{value:i,children:t})}function YQ(){return I.useContext(qQ)}function KQ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function QQ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}const A_e=["children"],R_e=I.forwardRef(function(t,n){const{children:r}=t,i=Le(t,A_e),o=YQ();if(o===null)throw new TypeError("No TabContext provided");const s=I.Children.map(r,l=>I.isValidElement(l)?I.cloneElement(l,{"aria-controls":KQ(o,l.props.value),id:QQ(o,l.props.value)}):null);return C.jsx(oxe,$({},i,{ref:n,value:o.value,children:s}))}),JQ=R_e;function I_e(e){return _t("MuiTabPanel",e)}Ct("MuiTabPanel",["root"]);const P_e=["children","className","value"],O_e=e=>{const{classes:t}=e;return Et({root:["root"]},I_e,t)},M_e=Ee("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),D_e=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTabPanel"}),{children:i,className:o,value:s}=r,l=Le(r,P_e),c=$({},r),d=O_e(c),f=YQ();if(f===null)throw new TypeError("No TabContext provided");const h=KQ(f,s),p=QQ(f,s);return C.jsx(M_e,$({"aria-labelledby":p,className:Fe(d.root,o),hidden:s!==f.value,id:h,ref:n,role:"tabpanel",ownerState:c},l,{children:s===f.value&&i}))}),Bm=D_e;var ZQ={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ZQ);var fz=ZQ.exports;function CF({label:e=C.jsx(C.Fragment,{}),...t}){return C.jsx(Pge,{control:C.jsx(Tg,{defaultChecked:!0,...t}),label:e})}function L_e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bH(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function B_e(e,t){if(e==null)return{};var n=N_e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $_e(e,t){return F_e(e)||z_e(e,t)||j_e(e,t)||U_e()}function F_e(e){if(Array.isArray(e))return e}function z_e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),l;!(r=(l=s.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,o=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function j_e(e,t){if(e){if(typeof e=="string")return xH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xH(e,t)}}function xH(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?e.apply(this,i):function(){for(var s=arguments.length,l=new Array(s),c=0;c1&&arguments[1]!==void 0?arguments[1]:{};l_.initial(e),l_.handler(t);var n={current:e},r=Fb(nSe)(n,t),i=Fb(tSe)(n),o=Fb(l_.changes)(e),s=Fb(eSe)(n);function l(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return l_.selector(d),d(n.current)}function c(d){W_e(r,i,o,s)(d)}return[l,c]}function eSe(e,t){return r1(t)?t(e.current):t}function tSe(e,t){return e.current=_H(_H({},e.current),t),t}function nSe(e,t,n){return r1(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var rSe={create:Z_e},iSe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function oSe(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o=e.length?e.apply(this,i):function(){for(var s=arguments.length,l=new Array(s),c=0;cee.join([USe(t),HSe(t)],` `)),` -`)}const GSe={name:"shouldBreak",description:"Define in what situations the debugger should break, in addition to the conditions defined in the standard options.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"}],defaultReturnValue:!1,returnType:"boolean"},VSe={name:"shouldRender",description:"Define which objects the renderer should display.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"}],defaultReturnValue:!0,returnType:"boolean"},cJ={shouldRender:VSe,shouldBreak:GSe},[uJ,qSe]=nc({code:WSe(ee.values(cJ)),busy:{}}),XSe=2500;function YSe(){const[{code:e},t]=uJ(),n=In();return C.jsx(bn,{height:"100%",overflow:"hidden",children:C.jsx(vk,{children:({width:r,height:i})=>C.jsx(lJ,{theme:n.palette.mode==="dark"?"vs-dark":"light",width:r,loading:C.jsx(q1,{variant:"indeterminate"}),height:i,language:"javascript",defaultValue:e,onChange:ee.debounce(o=>t(()=>({code:o})),XSe),options:{minimap:{enabled:!1}}})})})}function KSe(e){const t=In();return C.jsx(bn,{height:"100%",overflow:"hidden",children:C.jsx(vk,{children:({width:n,height:r})=>C.jsx(lJ,{theme:t.palette.mode==="dark"?"vs-dark":"light",width:n,loading:C.jsx(q1,{variant:"indeterminate"}),height:r,language:"javascript",...e,options:{minimap:{enabled:!1},...e.options}})})})}const[Ig,QSe]=nc([],{reduce:eQ}),[WE,JSe]=nc({algorithms:[],maps:[],formats:[]}),[yk,ZSe]=nc({specimen:0,connections:0,features:0,map:0,general:0},{reduce:(e,{action:t,key:n})=>ko(e,r=>{switch(t){case"start":r[n]+=1;break;case"end":r[n]-=1}return r})});function eEe(){const[e]=yk();return ee.some(ee.values(e))}function Jd(e="general"){const[,t]=yk();return I.useCallback(async n=>{t(()=>({action:"start",key:e}));const r=await n();return t(()=>({action:"end",key:e})),r},[e,t])}let dJ=class extends Error{},tEe=class extends dJ{},nEe=class extends dJ{};const rEe=(e,t=",")=>e.join(t),iEe={accept:"*",multiple:!1,strict:!1},hz=e=>{const{accept:t,multiple:n,strict:r}={...iEe,...e},i=aEe({multiple:n,accept:Array.isArray(t)?rEe(t):t});return new Promise(o=>{i.onchange=()=>{o(oEe(i.files,n,r)),i.remove()},i.click()})},oEe=(e,t,n)=>new Promise((r,i)=>{if(!e)return i(new tEe);const o=sEe(e,t,n);if(!o)return i(new nEe);r(o)}),sEe=(e,t,n)=>!t&&n?e.length===1?e[0]:null:e.length?e:null,aEe=({accept:e,multiple:t})=>{const n=document.createElement("input");return n.type="file",n.multiple=t,n.accept=e,n},lEe=""+new URL("hash.worker-76266fd6.js",import.meta.url).href,cEe=""+new URL("ipc.worker-78007631.js",import.meta.url).href,uEe=""+new URL("compress.worker-5a39bbab.js",import.meta.url).href,dEe=""+new URL("compressBinary.worker-0e5dbf65.js",import.meta.url).href,fEe=""+new URL("decompressBinary.worker-e2ab768a.js",import.meta.url).href,hEe=""+new URL("parseYaml.worker-858dc2e2.js",import.meta.url).href;class pEe extends Worker{constructor(){super(lEe,{type:"module"})}}class mEe extends Worker{constructor(){super(uEe,{type:"module"})}}class gEe extends Worker{constructor(){super(dEe,{type:"module"})}}class vEe extends Worker{constructor(){super(fEe,{type:"module"})}}class yEe extends Worker{constructor(){super(cEe,{type:"module"})}}class bEe extends Worker{constructor(){super(hEe,{type:"module"})}}var xEe=function(){},wEe=xEe(),Mp=function(e){return e!==wEe&&e!==null},_Ee=Mp,SEe=Array.prototype.forEach,EEe=Object.create,CEe=function(e,t){var n;for(n in e)t[n]=e[n]},fJ=function(e){var t=EEe(null);return SEe.call(arguments,function(n){_Ee(n)&&CEe(Object(n),t)}),t},TEe=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1},bL,kH;function kEe(){return kH||(kH=1,bL=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}),bL}var AEe=TEe()?Math.sign:kEe(),REe=AEe,IEe=Math.abs,PEe=Math.floor,OEe=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:REe(e)*PEe(IEe(e)))},MEe=OEe,DEe=Math.max,Dp=function(e){return DEe(0,MEe(e))},LEe=Dp,hJ=function(e,t,n){var r;return isNaN(e)?(r=t,r>=0?n&&r?r-1:r:1):e===!1?!1:LEe(e)},Zd=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},NEe=Mp,iv=function(e){if(!NEe(e))throw new TypeError("Cannot use null or undefined");return e},BEe=Zd,$Ee=iv,FEe=Function.prototype.bind,AH=Function.prototype.call,zEe=Object.keys,jEe=Object.prototype.propertyIsEnumerable,UEe=function(e,t){return function(n,r){var i,o=arguments[2],s=arguments[3];return n=Object($Ee(n)),BEe(r),i=zEe(n),s&&i.sort(typeof s=="function"?FEe.call(s,n):void 0),typeof e!="function"&&(e=i[e]),AH.call(e,i,function(l,c){return jEe.call(n,l)?AH.call(r,o,n[l],l,n,c):t})}},bk=UEe("forEach"),Lp={},pJ={exports:{}},HEe=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")},xL,RH;function WEe(){return RH||(RH=1,xL=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),xL}var wL,IH;function GEe(){if(IH)return wL;IH=1;var e=Mp,t=Object.keys;return wL=function(n){return t(e(n)?Object(n):n)},wL}var _L,PH;function VEe(){return PH||(PH=1,_L=WEe()()?Object.keys:GEe()),_L}var SL,OH;function qEe(){if(OH)return SL;OH=1;var e=VEe(),t=iv,n=Math.max;return SL=function(r,i){var o,s,l=n(arguments.length,2),c;for(r=Object(t(r)),c=function(d){try{r[d]=i[d]}catch(f){o||(o=f)}},s=1;s-1},kL}var fCe=uCe()?String.prototype.contains:dCe(),RS=xJ,FH=cCe,wJ=mJ,_J=fJ,vx=fCe,hCe=bJ.exports=function(e,t){var n,r,i,o,s;return arguments.length<2||typeof e!="string"?(o=t,t=e,e=null):o=arguments[2],RS(e)?(n=vx.call(e,"c"),r=vx.call(e,"e"),i=vx.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?wJ(_J(o),s):s};hCe.gs=function(e,t,n){var r,i,o,s;return typeof e!="string"?(o=n,n=t,t=e,e=null):o=arguments[3],RS(t)?FH(t)?RS(n)?FH(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,RS(e)?(r=vx.call(e,"c"),i=vx.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?wJ(_J(o),s):s};var Np=bJ.exports,RF={exports:{}};(function(e,t){var n=Np,r=Zd,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,l=Object.defineProperty,c=Object.defineProperties,d=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,_;h=function(b,x){var E;return r(x),d.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),l(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,A;return r(x),A=this,h.call(this,b,E=function(){g.call(A,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,A,R,k;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(A=E[b],typeof A=="object")for(k=0;R=A[k];++k)(R===x||R.__eeOnceListener__===x)&&(A.length===2?E[b]=A[k?0:1]:A.splice(k,1));else(A===x||A.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,A,R,k;if(d.call(this,"__ee__")&&(R=this.__ee__[b],!!R))if(typeof R=="object"){for(E=arguments.length,k=new Array(E-1),x=1;x=55296&&E<=56319&&(O+=p[++S])),O=g?d.call(g,v,O,_):O,y?(f.value=O,h(b,_,f)):b[_]=O,++_;x=_}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=0?f=s(f):f=t(this.length)-s(o(f)),c=f;c"}},lN}var cN,EW;function lTe(){if(EW)return cN;EW=1;var e=aTe(),t=/[\n\r\u2028\u2029]/g;return cN=function(n){var r=e(n);return r.length>100&&(r=r.slice(0,99)+"…"),r=r.replace(t,function(i){return JSON.stringify(i).slice(1,-1)}),r},cN}var h_={exports:{}},CW;function AJ(){if(CW)return h_.exports;CW=1,h_.exports=e,h_.exports.default=e;function e(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}return h_.exports}var TW;function cTe(){if(TW)return yW;TW=1;var e=TJ(),t=iTe(),n=sTe(),r=lTe(),i=AJ(),o=gz(),s=Object.create,l=t("then","then:finally","done","done:finally");return Lp.promise=function(c,d){var f=s(null),h=s(null),p=s(null);if(c===!0)c=null;else if(c=n(c),!l[c])throw new TypeError("'"+r(c)+"' is not valid promise mode");d.on("set",function(g,v,y){var S=!1;if(!i(y)){h[g]=y,d.emit("setasync",g,1);return}f[g]=1,p[g]=y;var _=function(A){var R=f[g];if(S)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) -Consider to rely on 'then' or 'done' mode instead.`);R&&(delete f[g],h[g]=A,d.emit("setasync",g,R))},b=function(){S=!0,f[g]&&(delete f[g],delete p[g],d.delete(g))},x=c;if(x||(x="then"),x==="then"){var E=function(){o(b)};y=y.then(function(A){o(_.bind(this,A))},E),typeof y.finally=="function"&&y.finally(E)}else if(x==="done"){if(typeof y.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");y.done(_,b)}else if(x==="done:finally"){if(typeof y.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof y.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");y.done(_),y.finally(b)}}),d.on("get",function(g,v,y){var S;if(f[g]){++f[g];return}S=p[g];var _=function(){d.emit("getasync",g,v,y)};i(S)?typeof S.done=="function"?S.done(_):S.then(function(){o(_)}):_()}),d.on("delete",function(g){if(delete p[g],f[g]){delete f[g];return}if(hasOwnProperty.call(h,g)){var v=h[g];delete h[g],d.emit("deleteasync",g,[v])}}),d.on("clear",function(){var g=h;h=s(null),f=s(null),p=s(null),d.emit("clearasync",e(g,function(v){return[v]}))})},yW}var kW={},AW;function uTe(){if(AW)return kW;AW=1;var e=Zd,t=bk,n=Lp,r=Function.prototype.apply;return n.dispose=function(i,o,s){var l;if(e(i),s.async&&n.async||s.promise&&n.promise){o.on("deleteasync",l=function(c,d){r.call(i,null,d)}),o.on("clearasync",function(c){t(c,function(d,f){l(f,d)})});return}o.on("delete",l=function(c,d){i(d)}),o.on("clear",function(c){t(c,function(d,f){l(f,d)})})},kW}var RW={},uN,IW;function dTe(){return IW||(IW=1,uN=2147483647),uN}var dN,PW;function fTe(){if(PW)return dN;PW=1;var e=Dp,t=dTe();return dN=function(n){if(n=e(n),n>t)throw new TypeError(n+" exceeds maximum possible timeout");return n},dN}var OW;function hTe(){if(OW)return RW;OW=1;var e=pz(),t=bk,n=gz(),r=AJ(),i=fTe(),o=Lp,s=Function.prototype,l=Math.max,c=Math.min,d=Object.create;return o.maxAge=function(f,h,p){var g,v,y,S;f=i(f),f&&(g=d(null),v=p.async&&o.async||p.promise&&o.promise?"async":"",h.on("set"+v,function(_){g[_]=setTimeout(function(){h.delete(_)},f),typeof g[_].unref=="function"&&g[_].unref(),S&&(S[_]&&S[_]!=="nextTick"&&clearTimeout(S[_]),S[_]=setTimeout(function(){delete S[_]},y),typeof S[_].unref=="function"&&S[_].unref())}),h.on("delete"+v,function(_){clearTimeout(g[_]),delete g[_],S&&(S[_]!=="nextTick"&&clearTimeout(S[_]),delete S[_])}),p.preFetch&&(p.preFetch===!0||isNaN(p.preFetch)?y=.333:y=l(c(Number(p.preFetch),1),0),y&&(S={},y=(1-y)*f,h.on("get"+v,function(_,b,x){S[_]||(S[_]="nextTick",n(function(){var E;S[_]==="nextTick"&&(delete S[_],h.delete(_),p.async&&(b=e(b),b.push(s)),E=h.memoized.apply(x,b),p.promise&&r(E)&&(typeof E.done=="function"?E.done(s,s):E.then(s,s)))}))}))),h.on("clear"+v,function(){t(g,function(_){clearTimeout(_)}),g={},S&&(t(S,function(_){_!=="nextTick"&&clearTimeout(_)}),S={})}))},RW}var MW={},fN,DW;function pTe(){if(DW)return fN;DW=1;var e=Dp,t=Object.create,n=Object.prototype.hasOwnProperty;return fN=function(r){var i=0,o=1,s=t(null),l=t(null),c=0,d;return r=e(r),{hit:function(f){var h=l[f],p=++c;if(s[p]=f,l[f]=p,!h)return++i,i<=r?void 0:(f=s[o],d(f),f);if(delete s[h],o===h)for(;!n.call(s,++o););},delete:d=function(f){var h=l[f];if(h&&(delete s[h],delete l[f],--i,o===h)){if(!i){c=0,o=1;return}for(;!n.call(s,++o););}},clear:function(){i=0,o=1,s=t(null),l=t(null),c=0}}},fN}var LW;function mTe(){if(LW)return MW;LW=1;var e=Dp,t=pTe(),n=Lp;return n.max=function(r,i,o){var s,l,c;r=e(r),r&&(l=t(r),s=o.async&&n.async||o.promise&&n.promise?"async":"",i.on("set"+s,c=function(d){d=l.hit(d),d!==void 0&&i.delete(d)}),i.on("get"+s,c),i.on("delete"+s,l.delete),i.on("clear"+s,l.clear))},MW}var NW={},BW;function gTe(){if(BW)return NW;BW=1;var e=Np,t=Lp,n=Object.create,r=Object.defineProperties;return t.refCounter=function(i,o,s){var l,c;l=n(null),c=s.async&&t.async||s.promise&&t.promise?"async":"",o.on("set"+c,function(d,f){l[d]=f||1}),o.on("get"+c,function(d){++l[d]}),o.on("delete"+c,function(d){delete l[d]}),o.on("clear"+c,function(){l={}}),r(o.memoized,{deleteRef:e(function(){var d=o.get(arguments);return d===null||!l[d]?null:--l[d]?!1:(o.delete(d),!0)}),getRefCount:e(function(){var d=o.get(arguments);return d===null||!l[d]?0:l[d]})})},NW}var vTe=fJ,yTe=hJ,bTe=XCe,xTe=function(e){var t=vTe(arguments[1]),n;return t.normalizer||(n=t.length=yTe(t.length,e.length,t.async),n!==0&&(t.primitive?n===!1?t.normalizer=YCe():n>1&&(t.normalizer=KCe()(n)):n===!1?t.normalizer=eTe()():n===1?t.normalizer=tTe()():t.normalizer=nTe()(n))),t.async&&rTe(),t.promise&&cTe(),t.dispose&&uTe(),t.maxAge&&hTe(),t.max&&mTe(),t.refCounter&&gTe(),bTe(e,t)};const Nu=js(xTe),wTe=e=>async t=>{const n=new e,r=await t(n);return n.terminate(),r},ov=e=>t=>wTe(e)(n=>(n.postMessage(t),new Promise((r,i)=>{n.onmessage=o=>{r(o.data)},n.onerror=i}))),sv=(e,t={async:!0,length:1})=>Nu(ov(e),t);ee.memoize(ov(pEe));ee.memoize(ov(mEe));const _Te=ee.memoize(ov(gEe)),STe=ee.memoize(ov(vEe)),RJ=ee.memoize(ov(bEe));function yx(e){return e.split(".").pop()}function IJ(e){return e.split(".").shift()}const $W="internal/custom",IF="json",PF=e=>({name:(e==null?void 0:e.id)===$W?`Imported Map - ${e==null?void 0:e.name}`:"Import Map",description:"Internal",id:$W}),ETe=e=>({name:(e==null?void 0:e.type)===IF?`Imported Trace - ${e==null?void 0:e.name}`:"Import Trace",description:"Internal",id:IF}),FW=["json","yaml"];async function CTe(){const e=await hz({accept:FW.map(t=>`.trace.${t}`),strict:!0});if(e)return{file:e,read:async()=>{if(FW.includes(yx(e.name))){const t=await e.text(),n=await RJ(t);return{...ETe(),format:n==null?void 0:n.format,content:n,name:ee.startCase(IJ(e.name)),type:IF}}else throw new Error(`The format (${yx(e.name)}) is unsupported.`)}}}async function TTe(e){const t=await hz({accept:e.map(({id:n})=>`.${n}`),strict:!0});if(t)return{file:t,read:async()=>{if(ee.find(e,{id:yx(t.name)}))return{...PF(),format:yx(t.name),content:await t.text(),name:ee.startCase(IJ(t.name))};throw new Error(`The format (${yx(t.name)}) is unsupported.`)}}}const PJ=20*1024*1024,[OJ,kTe]=nc({},{reduce:(e,t)=>ee.omitBy(sk(e,t),ee.isUndefined)});function ATe(e){return new Promise(t=>ee.delay(t,e))}function vz(e){const[,t]=OJ();return I.useCallback(async(n,r)=>{t(()=>({[e]:r})),ATe(300);const i=await n();return t(()=>({[e]:void 0})),i},[e,t])}function yz(e){return`${(e/(1024*1024)).toFixed(2)} MB`}function RTe({onChange:e,value:t}){const n=ba(),r=Jd("map"),i=vz("map"),[o]=Ig(),[{maps:s,formats:l}]=WE();return C.jsx(Xo,{showArrow:!0,icon:C.jsx(XK,{}),label:"Choose Map",value:t==null?void 0:t.id,items:[PF(t),...s.map(c=>{var d;return{...c,description:(d=ee.find(o,{url:c.source}))==null?void 0:d.name}})],onChange:async c=>{switch(c){case PF().id:try{const d=await TTe(l);d&&r(async()=>{n("Opening map...");const f=d.file.size>PJ?await i(d.read,`Opening map (${yz(d.file.size)})`):await d.read();f&&(e==null||e(f))})}catch(d){n(`${d}`)}break;default:e==null||e(ee.find(s,{id:c}));break}}})}function ITe({onChange:e,value:t}){const n=ba(),r=Jd("specimen"),i=vz("specimen");return C.jsx($d,{icon:C.jsx(XK,{}),onClick:async()=>{try{const o=await CTe();o&&r(async()=>{n("Opening trace...");const s=o.file.size>PJ?await i(o.read,`Opening trace (${yz(o.file.size)})`):await o.read();s&&(e==null||e(s))})}catch(o){n(`${o}`)}},children:t!=null&&t.id?`Uploaded Trace - ${t.name}`:"Choose File"})}const MJ=({label:e})=>C.jsx(zt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:e}),PTe=({label:e})=>C.jsx(zt,{variant:"body1",children:e}),i1=({label:e,content:t})=>C.jsxs(bn,{alignItems:"center",children:[C.jsx(PTe,{label:e}),C.jsx(Kr,{flex:1}),t]}),wk=({variables:e},{x:t,y:n})=>(e==null?void 0:e.x)===t&&(e==null?void 0:e.y)===n,OTe=""+new URL("parseGrid.worker-d5269b43.js",import.meta.url).href;class MTe extends Worker{constructor(){super(OTe,{type:"module"})}}const DTe=sv(MTe),{floor:zW}=Math;function jW(e,t,n){return e>=t&&e({...await DTe({map:e,options:t})}),{normalizer:JSON.stringify}),NTe=e=>{const{width:t,height:n}=e.bounds;return{...e,snap:({x:r,y:i},o=1)=>{const[s,l]=[zW(r+o/2),zW(i+o/2)];if(jW(s,0,t)&&jW(l,0,n))return{x:s,y:l}},nodeAt:r=>{const{x:i,y:o}=r;return o*t+i},pointOf:r=>({x:r%t,y:~~(r/t)}),matchNode:wk}},BTe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:NTe,parse:LTe},Symbol.toStringTag,{value:"Module"})),$Te=""+new URL("parseMesh.worker-114081b8.js",import.meta.url).href;class FTe extends Worker{constructor(){super($Te,{type:"module"})}}const zTe=sv(FTe),jTe=Nu(async(e="",t)=>await zTe({map:e,options:t}),{normalizer:JSON.stringify}),UTe=e=>({...e,snap:ee.identity,nodeAt:ee.constant(0),pointOf:ee.constant({x:0,y:0}),matchNode:wk}),HTe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:UTe,parse:jTe},Symbol.toStringTag,{value:"Module"})),WTe=""+new URL("parseNetwork.worker-0345a67d.js",import.meta.url).href;class GTe extends Worker{constructor(){super(WTe,{type:"module"})}}const VTe=sv(GTe),qTe=Nu(async(e="",t)=>await VTe({map:e,options:t}),{normalizer:JSON.stringify}),XTe=e=>({...e,snap:ee.identity,nodeAt:ee.constant(0),pointOf:ee.constant({x:0,y:0}),matchNode:wk}),YTe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:XTe,parse:qTe},Symbol.toStringTag,{value:"Module"})),KTe=""+new URL("parsePoly.worker-bf1460fa.js",import.meta.url).href;class QTe extends Worker{constructor(){super(KTe,{type:"module"})}}const JTe=sv(QTe),ZTe=Nu(async(e="",t)=>await JTe({map:e,options:t}),{normalizer:JSON.stringify}),eke=e=>({...e,snap:ee.identity,nodeAt:ee.constant(0),pointOf:ee.constant({x:0,y:0}),matchNode:wk}),tke=Object.freeze(Object.defineProperty({__proto__:null,hydrate:eke,parse:ZTe},Symbol.toStringTag,{value:"Module"})),bz={grid:BTe,xy:YTe,mesh:HTe,poly:tke};function xz(e=""){return bz[e]}function eg({label:e,icon:t=C.jsx(jxe,{}),...n}){return C.jsxs(bn,{justifyContent:"center",alignItems:"center",color:"text.secondary",bgcolor:"background.paper",textAlign:"center",vertical:!0,pt:6,...n,children:[I.cloneElement(t,{sx:{mb:2},fontSize:"large"}),C.jsx(zt,{children:e})]})}const zb="500";function nke(e){return parseInt(e.replace("#","0x"))}const wz={source:Yu.A400,destination:qu.A400,updating:zh[zb],expanding:bq[zb],generating:xq[zb],closing:yq[zb],end:Xu.A400};ee.mapValues(wz,nke);function Pg(e){return(e&&wz[e])??y5[zb]}function rke(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function ike(){return this.eachAfter(rke)}function oke(e){var t=this,n,r=[t],i,o,s;do for(n=r.reverse(),r=[];t=n.pop();)if(e(t),i=t.children,i)for(o=0,s=i.length;o=0;--i)n.push(r[i]);return this}function ake(e){for(var t=this,n=[t],r=[],i,o,s;t=n.pop();)if(r.push(t),i=t.children,i)for(o=0,s=i.length;o=0;)n+=r[i].value;t.value=n})}function cke(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function uke(e){for(var t=this,n=dke(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function dke(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function fke(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function hke(){var e=[];return this.each(function(t){e.push(t)}),e}function pke(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function mke(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function _z(e,t){var n=new o1(e),r=+e.value&&(n.value=e.value),i,o=[n],s,l,c,d;for(t==null&&(t=vke);i=o.pop();)if(r&&(i.value=+i.data.value),(l=t(i.data))&&(d=l.length))for(i.children=new Array(d),c=d-1;c>=0;--c)o.push(s=i.children[c]=new o1(l[c])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(bke)}function gke(){return _z(this).eachBefore(yke)}function vke(e){return e.children}function yke(e){e.data=e.data.data}function bke(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function o1(e){this.data=e,this.depth=this.height=0,this.parent=null}o1.prototype=_z.prototype={constructor:o1,count:ike,each:oke,eachAfter:ake,eachBefore:ske,sum:lke,sort:cke,path:uke,ancestors:fke,descendants:hke,leaves:pke,links:mke,copy:gke};function xke(e,t){return e.parent===t.parent?1:2}function hN(e){var t=e.children;return t?t[0]:e.t}function pN(e){var t=e.children;return t?t[t.length-1]:e.t}function wke(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function _ke(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function Ske(e,t,n){return e.a.parent===t.parent?e.a:n}function IS(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}IS.prototype=Object.create(o1.prototype);function Eke(e){for(var t=new IS(e,0),n,r=[t],i,o,s,l;n=r.pop();)if(o=n._.children)for(n.children=new Array(l=o.length),s=l-1;s>=0;--s)r.push(i=n.children[s]=new IS(o[s],s)),i.parent=n;return(t.parent=new IS(null,0)).children=[t],t}function Cke(){var e=xke,t=1,n=1,r=null;function i(d){var f=Eke(d);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(s),r)d.eachBefore(c);else{var h=d,p=d,g=d;d.eachBefore(function(b){b.xp.x&&(p=b),b.depth>g.depth&&(g=b)});var v=h===p?1:e(h,p)/2,y=v-h.x,S=t/(p.x+v+y),_=n/(g.depth||1);d.eachBefore(function(b){b.x=(b.x+y)*S,b.y=b.depth*_})}return d}function o(d){var f=d.children,h=d.parent.children,p=d.i?h[d.i-1]:null;if(f){_ke(d);var g=(f[0].z+f[f.length-1].z)/2;p?(d.z=p.z+e(d._,p._),d.m=d.z-g):d.z=g}else p&&(d.z=p.z+e(d._,p._));d.parent.A=l(d,p,d.parent.A||h[0])}function s(d){d._.x=d.z+d.parent.m,d.m+=d.parent.m}function l(d,f,h){if(f){for(var p=d,g=d,v=f,y=p.parent.children[0],S=p.m,_=g.m,b=v.m,x=y.m,E;v=pN(v),p=hN(p),v&&p;)y=hN(y),g=pN(g),g.a=d,E=v.z+b-p.z-S+e(v._,p._),E>0&&(wke(Ske(v,d,h),d,E),S+=E,_+=E),b+=v.m,S+=p.m,x+=y.m,_+=g.m;v&&!pN(g)&&(g.t=v,g.m+=b-_),p&&!hN(y)&&(y.t=p,y.m+=S-x,h=d)}return h}function c(d){d.x*=t,d.y=d.depth*n}return i.separation=function(d){return arguments.length?(e=d,i):e},i.size=function(d){return arguments.length?(r=!1,t=+d[0],n=+d[1],i):r?null:[t,n]},i.nodeSize=function(d){return arguments.length?(r=!0,t=+d[0],n=+d[1],i):r?[t,n]:null},i}var OF="http://www.w3.org/1999/xhtml";const UW={svg:"http://www.w3.org/2000/svg",xhtml:OF,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _k(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),UW.hasOwnProperty(t)?{space:UW[t],local:e}:e}function Tke(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===OF&&t.documentElement.namespaceURI===OF?t.createElement(e):t.createElementNS(n,e)}}function kke(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function DJ(e){var t=_k(e);return(t.local?kke:Tke)(t)}function Ake(){}function Sz(e){return e==null?Ake:function(){return this.querySelector(e)}}function Rke(e){typeof e!="function"&&(e=Sz(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=x&&(x=b+1);!(A=S[x])&&++x=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function eAe(e){e||(e=tAe);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var n=this._groups,r=n.length,i=new Array(r),o=0;ot?1:e>=t?0:NaN}function nAe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function rAe(){return Array.from(this)}function iAe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?mAe:typeof t=="function"?vAe:gAe)(e,t,n??"")):Og(this.node(),e)}function Og(e,t){return e.style.getPropertyValue(t)||FJ(e).getComputedStyle(e,null).getPropertyValue(t)}function bAe(e){return function(){delete this[e]}}function xAe(e,t){return function(){this[e]=t}}function wAe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function _Ae(e,t){return arguments.length>1?this.each((t==null?bAe:typeof t=="function"?wAe:xAe)(e,t)):this.node()[e]}function zJ(e){return e.trim().split(/^|\s+/)}function Ez(e){return e.classList||new jJ(e)}function jJ(e){this._node=e,this._names=zJ(e.getAttribute("class")||"")}jJ.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function UJ(e,t){for(var n=Ez(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function KAe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n{}};function Cz(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}PS.prototype=Cz.prototype={constructor:PS,on:function(e,t){var n=this._,r=sRe(e+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o0)for(var n=new Array(i),r=0,i,o;r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?p_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?p_(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=dRe.exec(e))?new jo(t[1],t[2],t[3],1):(t=fRe.exec(e))?new jo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=hRe.exec(e))?p_(t[1],t[2],t[3],t[4]):(t=pRe.exec(e))?p_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=mRe.exec(e))?KW(t[1],t[2]/100,t[3]/100,1):(t=gRe.exec(e))?KW(t[1],t[2]/100,t[3]/100,t[4]):WW.hasOwnProperty(e)?qW(WW[e]):e==="transparent"?new jo(NaN,NaN,NaN,0):null}function qW(e){return new jo(e>>16&255,e>>8&255,e&255,1)}function p_(e,t,n,r){return r<=0&&(e=t=n=NaN),new jo(e,t,n,r)}function bRe(e){return e instanceof cw||(e=l1(e)),e?(e=e.rgb(),new jo(e.r,e.g,e.b,e.opacity)):new jo}function LF(e,t,n,r){return arguments.length===1?bRe(e):new jo(e,t,n,r??1)}function jo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Tz(jo,LF,VJ(cw,{brighter(e){return e=e==null?VE:Math.pow(VE,e),new jo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?s1:Math.pow(s1,e),new jo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new jo(np(this.r),np(this.g),np(this.b),qE(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:XW,formatHex:XW,formatHex8:xRe,formatRgb:YW,toString:YW}));function XW(){return`#${qh(this.r)}${qh(this.g)}${qh(this.b)}`}function xRe(){return`#${qh(this.r)}${qh(this.g)}${qh(this.b)}${qh((isNaN(this.opacity)?1:this.opacity)*255)}`}function YW(){const e=qE(this.opacity);return`${e===1?"rgb(":"rgba("}${np(this.r)}, ${np(this.g)}, ${np(this.b)}${e===1?")":`, ${e})`}`}function qE(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function np(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qh(e){return e=np(e),(e<16?"0":"")+e.toString(16)}function KW(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new el(e,t,n,r)}function qJ(e){if(e instanceof el)return new el(e.h,e.s,e.l,e.opacity);if(e instanceof cw||(e=l1(e)),!e)return new el;if(e instanceof el)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,l=o-i,c=(o+i)/2;return l?(t===o?s=(n-r)/l+(n0&&c<1?0:s,new el(s,l,c,e.opacity)}function wRe(e,t,n,r){return arguments.length===1?qJ(e):new el(e,t,n,r??1)}function el(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Tz(el,wRe,VJ(cw,{brighter(e){return e=e==null?VE:Math.pow(VE,e),new el(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?s1:Math.pow(s1,e),new el(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new jo(mN(e>=240?e-240:e+120,i,r),mN(e,i,r),mN(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new el(QW(this.h),m_(this.s),m_(this.l),qE(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=qE(this.opacity);return`${e===1?"hsl(":"hsla("}${QW(this.h)}, ${m_(this.s)*100}%, ${m_(this.l)*100}%${e===1?")":`, ${e})`}`}}));function QW(e){return e=(e||0)%360,e<0?e+360:e}function m_(e){return Math.max(0,Math.min(1,e||0))}function mN(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const XJ=e=>()=>e;function _Re(e,t){return function(n){return e+n*t}}function SRe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function ERe(e){return(e=+e)==1?YJ:function(t,n){return n-t?SRe(t,n,e):XJ(isNaN(t)?n:t)}}function YJ(e,t){var n=t-e;return n?_Re(e,n):XJ(isNaN(e)?t:e)}const JW=function e(t){var n=ERe(t);function r(i,o){var s=n((i=LF(i)).r,(o=LF(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),d=YJ(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=l(f),i.b=c(f),i.opacity=d(f),i+""}}return r.gamma=e,r}(1);function ed(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var NF=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gN=new RegExp(NF.source,"g");function CRe(e){return function(){return e}}function TRe(e){return function(t){return e(t)+""}}function kRe(e,t){var n=NF.lastIndex=gN.lastIndex=0,r,i,o,s=-1,l=[],c=[];for(e=e+"",t=t+"";(r=NF.exec(e))&&(i=gN.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:ed(r,i)})),n=gN.lastIndex;return n180?f+=360:f-d>180&&(d+=360),p.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ed(d,f)})):f&&h.push(i(h)+"rotate("+f+r)}function l(d,f,h,p){d!==f?p.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ed(d,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(d,f,h,p,g,v){if(d!==h||f!==p){var y=g.push(i(g)+"scale(",null,",",null,")");v.push({i:y-4,x:ed(d,h)},{i:y-2,x:ed(f,p)})}else(h!==1||p!==1)&&g.push(i(g)+"scale("+h+","+p+")")}return function(d,f){var h=[],p=[];return d=e(d),f=e(f),o(d.translateX,d.translateY,f.translateX,f.translateY,h,p),s(d.rotate,f.rotate,h,p),l(d.skewX,f.skewX,h,p),c(d.scaleX,d.scaleY,f.scaleX,f.scaleY,h,p),d=f=null,function(g){for(var v=-1,y=p.length,S;++v=0&&e._call.call(void 0,t),e=e._next;--Mg}function tG(){wp=(YE=c1.now())+Sk,Mg=jb=0;try{BRe()}finally{Mg=0,FRe(),wp=0}}function $Re(){var e=c1.now(),t=e-YE;t>JJ&&(Sk-=t,YE=e)}function FRe(){for(var e,t=XE,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:XE=n);Ub=e,$F(r)}function $F(e){if(!Mg){jb&&(jb=clearTimeout(jb));var t=e-wp;t>24?(e<1/0&&(jb=setTimeout(tG,e-c1.now()-Sk)),hb&&(hb=clearInterval(hb))):(hb||(YE=c1.now(),hb=setInterval($Re,JJ)),Mg=1,ZJ(tG))}}function nG(e,t,n){var r=new KE;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var zRe=Cz("start","end","cancel","interrupt"),jRe=[],tZ=0,rG=1,FF=2,OS=3,iG=4,zF=5,MS=6;function Ek(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;URe(e,n,{name:t,index:r,group:i,on:zRe,tween:jRe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:tZ})}function Az(e,t){var n=vl(e,t);if(n.state>tZ)throw new Error("too late; already scheduled");return n}function ic(e,t){var n=vl(e,t);if(n.state>OS)throw new Error("too late; already running");return n}function vl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function URe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=eZ(o,0,n.time);function o(d){n.state=rG,n.timer.restart(s,n.delay,n.time),n.delay<=d&&s(d-n.delay)}function s(d){var f,h,p,g;if(n.state!==rG)return c();for(f in r)if(g=r[f],g.name===n.name){if(g.state===OS)return nG(s);g.state===iG?(g.state=MS,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[f]):+fFF&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function yIe(e,t,n){var r,i,o=vIe(t)?Az:ic;return function(){var s=o(this,e),l=s.on;l!==r&&(i=(r=l).copy()).on(t,n),s.on=i}}function bIe(e,t){var n=this._id;return arguments.length<2?vl(this.node(),n).on.on(e):this.each(yIe(n,e,t))}function xIe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function wIe(){return this.on("end.remove",xIe(this._id))}function _Ie(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Sz(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s()=>e;function qIe(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function fu(e,t,n){this.k=e,this.x=t,this.y=n}fu.prototype={constructor:fu,scale:function(e){return e===1?this:new fu(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new fu(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var QE=new fu(1,0,0);fu.prototype;function vN(e){e.stopImmediatePropagation()}function pb(e){e.preventDefault(),e.stopImmediatePropagation()}function XIe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function YIe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function oG(){return this.__zoom||QE}function KIe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function QIe(){return navigator.maxTouchPoints||"ontouchstart"in this}function JIe(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function yN(){var e=XIe,t=YIe,n=JIe,r=KIe,i=QIe,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=LRe,d=Cz("start","zoom","end"),f,h,p,g=500,v=150,y=0,S=10;function _(D){D.property("__zoom",oG).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",N).filter(i).on("touchstart.zoom",H).on("touchmove.zoom",W).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(D,F,j,V){var G=D.selection?D.selection():D;G.property("__zoom",oG),D!==G?A(D,F,j,V):G.interrupt().each(function(){R(this,arguments).event(V).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},_.scaleBy=function(D,F,j,V){_.scaleTo(D,function(){var G=this.__zoom.k,K=typeof F=="function"?F.apply(this,arguments):F;return G*K},j,V)},_.scaleTo=function(D,F,j,V){_.transform(D,function(){var G=t.apply(this,arguments),K=this.__zoom,Y=j==null?E(G):typeof j=="function"?j.apply(this,arguments):j,J=K.invert(Y),ie=typeof F=="function"?F.apply(this,arguments):F;return n(x(b(K,ie),Y,J),G,s)},j,V)},_.translateBy=function(D,F,j,V){_.transform(D,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof j=="function"?j.apply(this,arguments):j),t.apply(this,arguments),s)},null,V)},_.translateTo=function(D,F,j,V,G){_.transform(D,function(){var K=t.apply(this,arguments),Y=this.__zoom,J=V==null?E(K):typeof V=="function"?V.apply(this,arguments):V;return n(QE.translate(J[0],J[1]).scale(Y.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof j=="function"?-j.apply(this,arguments):-j),K,s)},V,G)};function b(D,F){return F=Math.max(o[0],Math.min(o[1],F)),F===D.k?D:new fu(F,D.x,D.y)}function x(D,F,j){var V=F[0]-j[0]*D.k,G=F[1]-j[1]*D.k;return V===D.x&&G===D.y?D:new fu(D.k,V,G)}function E(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function A(D,F,j,V){D.on("start.zoom",function(){R(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(V).end()}).tween("zoom",function(){var G=this,K=arguments,Y=R(G,K).event(V),J=t.apply(G,K),ie=j==null?E(J):typeof j=="function"?j.apply(G,K):j,ce=Math.max(J[1][0]-J[0][0],J[1][1]-J[0][1]),ue=G.__zoom,se=typeof F=="function"?F.apply(G,K):F,Q=c(ue.invert(ie).concat(ce/ue.k),se.invert(ie).concat(ce/se.k));return function(ae){if(ae===1)ae=se;else{var le=Q(ae),he=ce/le[2];ae=new fu(he,ie[0]-le[0]*he,ie[1]-le[1]*he)}Y.zoom(null,ae)}})}function R(D,F,j){return!j&&D.__zooming||new k(D,F)}function k(D,F){this.that=D,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,F),this.taps=0}k.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,F){return this.mouse&&D!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var F=Eo(this.that).datum();d.call(D,this.that,new qIe(D,{sourceEvent:this.sourceEvent,target:_,type:D,transform:this.that.__zoom,dispatch:d}),F)}};function O(D,...F){if(!e.apply(this,arguments))return;var j=R(this,F).event(D),V=this.__zoom,G=Math.max(o[0],Math.min(o[1],V.k*Math.pow(2,r.apply(this,arguments)))),K=wh(D);if(j.wheel)(j.mouse[0][0]!==K[0]||j.mouse[0][1]!==K[1])&&(j.mouse[1]=V.invert(j.mouse[0]=K)),clearTimeout(j.wheel);else{if(V.k===G)return;j.mouse=[K,V.invert(K)],DS(this),j.start()}pb(D),j.wheel=setTimeout(Y,v),j.zoom("mouse",n(x(b(V,G),j.mouse[0],j.mouse[1]),j.extent,s));function Y(){j.wheel=null,j.end()}}function L(D,...F){if(p||!e.apply(this,arguments))return;var j=D.currentTarget,V=R(this,F,!0).event(D),G=Eo(D.view).on("mousemove.zoom",ie,!0).on("mouseup.zoom",ce,!0),K=wh(D,j),Y=D.clientX,J=D.clientY;lRe(D.view),vN(D),V.mouse=[K,this.__zoom.invert(K)],DS(this),V.start();function ie(ue){if(pb(ue),!V.moved){var se=ue.clientX-Y,Q=ue.clientY-J;V.moved=se*se+Q*Q>y}V.event(ue).zoom("mouse",n(x(V.that.__zoom,V.mouse[0]=wh(ue,j),V.mouse[1]),V.extent,s))}function ce(ue){G.on("mousemove.zoom mouseup.zoom",null),cRe(ue.view,V.moved),pb(ue),V.event(ue).end()}}function N(D,...F){if(e.apply(this,arguments)){var j=this.__zoom,V=wh(D.changedTouches?D.changedTouches[0]:D,this),G=j.invert(V),K=j.k*(D.shiftKey?.5:2),Y=n(x(b(j,K),V,G),t.apply(this,F),s);pb(D),l>0?Eo(this).transition().duration(l).call(A,Y,V,D):Eo(this).call(_.transform,Y,V,D)}}function H(D,...F){if(e.apply(this,arguments)){var j=D.touches,V=j.length,G=R(this,F,D.changedTouches.length===V).event(D),K,Y,J,ie;for(vN(D),Y=0;Y"u"&&(g=!0),typeof v>"u"&&(v=1/0);function E(A,R){if(A===null)return null;if(R===0)return A;var k,O;if(typeof A!="object")return A;if(n(A,r))k=new r;else if(n(A,i))k=new i;else if(n(A,o))k=new o(function(V,G){A.then(function(K){V(E(K,R-1))},function(K){G(E(K,R-1))})});else if(s.__isArray(A))k=[];else if(s.__isRegExp(A))k=new RegExp(A.source,h(A)),A.lastIndex&&(k.lastIndex=A.lastIndex);else if(s.__isDate(A))k=new Date(A.getTime());else{if(x&&Buffer.isBuffer(A))return Buffer.allocUnsafe?k=Buffer.allocUnsafe(A.length):k=new Buffer(A.length),A.copy(k),k;n(A,Error)?k=Object.create(A):typeof y>"u"?(O=Object.getPrototypeOf(A),k=Object.create(O)):(k=Object.create(y),O=y)}if(g){var L=_.indexOf(A);if(L!=-1)return b[L];_.push(A),b.push(k)}n(A,r)&&A.forEach(function(V,G){var K=E(G,R-1),Y=E(V,R-1);k.set(K,Y)}),n(A,i)&&A.forEach(function(V){var G=E(V,R-1);k.add(G)});for(var N in A){var H;O&&(H=Object.getOwnPropertyDescriptor(O,N)),!(H&&H.set==null)&&(k[N]=E(A[N],R-1))}if(Object.getOwnPropertySymbols)for(var W=Object.getOwnPropertySymbols(A),N=0;N1&&arguments[1]!==void 0?arguments[1]:0,n=(Li[e[t+0]]+Li[e[t+1]]+Li[e[t+2]]+Li[e[t+3]]+"-"+Li[e[t+4]]+Li[e[t+5]]+"-"+Li[e[t+6]]+Li[e[t+7]]+"-"+Li[e[t+8]]+Li[e[t+9]]+"-"+Li[e[t+10]]+Li[e[t+11]]+Li[e[t+12]]+Li[e[t+13]]+Li[e[t+14]]+Li[e[t+15]]).toLowerCase();if(!rPe(n))throw TypeError("Stringified UUID is invalid");return n}function xN(e,t,n){e=e||{};var r=e.random||(e.rng||tPe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return iPe(r)}var jF={exports:{}},UF={exports:{}},oPe=function(){for(var t=arguments.length,n=[],r=0;rC.jsx(lJ,{theme:n.palette.mode==="dark"?"vs-dark":"light",width:r,loading:C.jsx(q1,{variant:"indeterminate"}),height:i,language:"javascript",defaultValue:e,onChange:ee.debounce(o=>t(()=>({code:o})),XSe),options:{minimap:{enabled:!1}}})})})}function KSe(e){const t=In();return C.jsx(bn,{height:"100%",overflow:"hidden",children:C.jsx(vk,{children:({width:n,height:r})=>C.jsx(lJ,{theme:t.palette.mode==="dark"?"vs-dark":"light",width:n,loading:C.jsx(q1,{variant:"indeterminate"}),height:r,language:"javascript",...e,options:{minimap:{enabled:!1},...e.options}})})})}const[Ig,QSe]=nc([],{reduce:eQ}),[WE,JSe]=nc({algorithms:[],maps:[],formats:[]}),[yk,ZSe]=nc({specimen:0,connections:0,features:0,map:0,general:0},{reduce:(e,{action:t,key:n})=>Ui(e,r=>{switch(t){case"start":r[n]+=1;break;case"end":r[n]-=1}return r})});function eEe(){const[e]=yk();return ee.some(ee.values(e))}function Jd(e="general"){const[,t]=yk();return I.useCallback(async n=>{t(()=>({action:"start",key:e}));const r=await n();return t(()=>({action:"end",key:e})),r},[e,t])}let dJ=class extends Error{},tEe=class extends dJ{},nEe=class extends dJ{};const rEe=(e,t=",")=>e.join(t),iEe={accept:"*",multiple:!1,strict:!1},hz=e=>{const{accept:t,multiple:n,strict:r}={...iEe,...e},i=aEe({multiple:n,accept:Array.isArray(t)?rEe(t):t});return new Promise(o=>{i.onchange=()=>{o(oEe(i.files,n,r)),i.remove()},i.click()})},oEe=(e,t,n)=>new Promise((r,i)=>{if(!e)return i(new tEe);const o=sEe(e,t,n);if(!o)return i(new nEe);r(o)}),sEe=(e,t,n)=>!t&&n?e.length===1?e[0]:null:e.length?e:null,aEe=({accept:e,multiple:t})=>{const n=document.createElement("input");return n.type="file",n.multiple=t,n.accept=e,n},lEe=""+new URL("hash.worker-76266fd6.js",import.meta.url).href,cEe=""+new URL("ipc.worker-78007631.js",import.meta.url).href,uEe=""+new URL("compress.worker-5a39bbab.js",import.meta.url).href,dEe=""+new URL("compressBinary.worker-0e5dbf65.js",import.meta.url).href,fEe=""+new URL("decompressBinary.worker-e2ab768a.js",import.meta.url).href,hEe=""+new URL("parseYaml.worker-858dc2e2.js",import.meta.url).href;class pEe extends Worker{constructor(){super(lEe,{type:"module"})}}class mEe extends Worker{constructor(){super(uEe,{type:"module"})}}class gEe extends Worker{constructor(){super(dEe,{type:"module"})}}class vEe extends Worker{constructor(){super(fEe,{type:"module"})}}class yEe extends Worker{constructor(){super(cEe,{type:"module"})}}class bEe extends Worker{constructor(){super(hEe,{type:"module"})}}var xEe=function(){},wEe=xEe(),Mp=function(e){return e!==wEe&&e!==null},_Ee=Mp,SEe=Array.prototype.forEach,EEe=Object.create,CEe=function(e,t){var n;for(n in e)t[n]=e[n]},fJ=function(e){var t=EEe(null);return SEe.call(arguments,function(n){_Ee(n)&&CEe(Object(n),t)}),t},TEe=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1},bL,kH;function kEe(){return kH||(kH=1,bL=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}),bL}var AEe=TEe()?Math.sign:kEe(),REe=AEe,IEe=Math.abs,PEe=Math.floor,OEe=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:REe(e)*PEe(IEe(e)))},MEe=OEe,DEe=Math.max,Dp=function(e){return DEe(0,MEe(e))},LEe=Dp,hJ=function(e,t,n){var r;return isNaN(e)?(r=t,r>=0?n&&r?r-1:r:1):e===!1?!1:LEe(e)},Zd=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},NEe=Mp,iv=function(e){if(!NEe(e))throw new TypeError("Cannot use null or undefined");return e},BEe=Zd,$Ee=iv,FEe=Function.prototype.bind,AH=Function.prototype.call,zEe=Object.keys,jEe=Object.prototype.propertyIsEnumerable,UEe=function(e,t){return function(n,r){var i,o=arguments[2],s=arguments[3];return n=Object($Ee(n)),BEe(r),i=zEe(n),s&&i.sort(typeof s=="function"?FEe.call(s,n):void 0),typeof e!="function"&&(e=i[e]),AH.call(e,i,function(l,c){return jEe.call(n,l)?AH.call(r,o,n[l],l,n,c):t})}},bk=UEe("forEach"),Lp={},pJ={exports:{}},HEe=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")},xL,RH;function WEe(){return RH||(RH=1,xL=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),xL}var wL,IH;function GEe(){if(IH)return wL;IH=1;var e=Mp,t=Object.keys;return wL=function(n){return t(e(n)?Object(n):n)},wL}var _L,PH;function VEe(){return PH||(PH=1,_L=WEe()()?Object.keys:GEe()),_L}var SL,OH;function qEe(){if(OH)return SL;OH=1;var e=VEe(),t=iv,n=Math.max;return SL=function(r,i){var o,s,l=n(arguments.length,2),c;for(r=Object(t(r)),c=function(d){try{r[d]=i[d]}catch(f){o||(o=f)}},s=1;s-1},kL}var fCe=uCe()?String.prototype.contains:dCe(),RS=xJ,FH=cCe,wJ=mJ,_J=fJ,vx=fCe,hCe=bJ.exports=function(e,t){var n,r,i,o,s;return arguments.length<2||typeof e!="string"?(o=t,t=e,e=null):o=arguments[2],RS(e)?(n=vx.call(e,"c"),r=vx.call(e,"e"),i=vx.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?wJ(_J(o),s):s};hCe.gs=function(e,t,n){var r,i,o,s;return typeof e!="string"?(o=n,n=t,t=e,e=null):o=arguments[3],RS(t)?FH(t)?RS(n)?FH(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,RS(e)?(r=vx.call(e,"c"),i=vx.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?wJ(_J(o),s):s};var Np=bJ.exports,RF={exports:{}};(function(e,t){var n=Np,r=Zd,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,l=Object.defineProperty,c=Object.defineProperties,d=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,_;h=function(b,x){var E;return r(x),d.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),l(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,A;return r(x),A=this,h.call(this,b,E=function(){g.call(A,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,A,R,k;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(A=E[b],typeof A=="object")for(k=0;R=A[k];++k)(R===x||R.__eeOnceListener__===x)&&(A.length===2?E[b]=A[k?0:1]:A.splice(k,1));else(A===x||A.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,A,R,k;if(d.call(this,"__ee__")&&(R=this.__ee__[b],!!R))if(typeof R=="object"){for(E=arguments.length,k=new Array(E-1),x=1;x=55296&&E<=56319&&(O+=p[++S])),O=g?d.call(g,v,O,_):O,y?(f.value=O,h(b,_,f)):b[_]=O,++_;x=_}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=0?f=s(f):f=t(this.length)-s(o(f)),c=f;c"}},lN}var cN,EW;function lTe(){if(EW)return cN;EW=1;var e=aTe(),t=/[\n\r\u2028\u2029]/g;return cN=function(n){var r=e(n);return r.length>100&&(r=r.slice(0,99)+"…"),r=r.replace(t,function(i){return JSON.stringify(i).slice(1,-1)}),r},cN}var h_={exports:{}},CW;function AJ(){if(CW)return h_.exports;CW=1,h_.exports=e,h_.exports.default=e;function e(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}return h_.exports}var TW;function cTe(){if(TW)return yW;TW=1;var e=TJ(),t=iTe(),n=sTe(),r=lTe(),i=AJ(),o=gz(),s=Object.create,l=t("then","then:finally","done","done:finally");return Lp.promise=function(c,d){var f=s(null),h=s(null),p=s(null);if(c===!0)c=null;else if(c=n(c),!l[c])throw new TypeError("'"+r(c)+"' is not valid promise mode");d.on("set",function(g,v,y){var S=!1;if(!i(y)){h[g]=y,d.emit("setasync",g,1);return}f[g]=1,p[g]=y;var _=function(A){var R=f[g];if(S)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) +Consider to rely on 'then' or 'done' mode instead.`);R&&(delete f[g],h[g]=A,d.emit("setasync",g,R))},b=function(){S=!0,f[g]&&(delete f[g],delete p[g],d.delete(g))},x=c;if(x||(x="then"),x==="then"){var E=function(){o(b)};y=y.then(function(A){o(_.bind(this,A))},E),typeof y.finally=="function"&&y.finally(E)}else if(x==="done"){if(typeof y.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");y.done(_,b)}else if(x==="done:finally"){if(typeof y.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof y.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");y.done(_),y.finally(b)}}),d.on("get",function(g,v,y){var S;if(f[g]){++f[g];return}S=p[g];var _=function(){d.emit("getasync",g,v,y)};i(S)?typeof S.done=="function"?S.done(_):S.then(function(){o(_)}):_()}),d.on("delete",function(g){if(delete p[g],f[g]){delete f[g];return}if(hasOwnProperty.call(h,g)){var v=h[g];delete h[g],d.emit("deleteasync",g,[v])}}),d.on("clear",function(){var g=h;h=s(null),f=s(null),p=s(null),d.emit("clearasync",e(g,function(v){return[v]}))})},yW}var kW={},AW;function uTe(){if(AW)return kW;AW=1;var e=Zd,t=bk,n=Lp,r=Function.prototype.apply;return n.dispose=function(i,o,s){var l;if(e(i),s.async&&n.async||s.promise&&n.promise){o.on("deleteasync",l=function(c,d){r.call(i,null,d)}),o.on("clearasync",function(c){t(c,function(d,f){l(f,d)})});return}o.on("delete",l=function(c,d){i(d)}),o.on("clear",function(c){t(c,function(d,f){l(f,d)})})},kW}var RW={},uN,IW;function dTe(){return IW||(IW=1,uN=2147483647),uN}var dN,PW;function fTe(){if(PW)return dN;PW=1;var e=Dp,t=dTe();return dN=function(n){if(n=e(n),n>t)throw new TypeError(n+" exceeds maximum possible timeout");return n},dN}var OW;function hTe(){if(OW)return RW;OW=1;var e=pz(),t=bk,n=gz(),r=AJ(),i=fTe(),o=Lp,s=Function.prototype,l=Math.max,c=Math.min,d=Object.create;return o.maxAge=function(f,h,p){var g,v,y,S;f=i(f),f&&(g=d(null),v=p.async&&o.async||p.promise&&o.promise?"async":"",h.on("set"+v,function(_){g[_]=setTimeout(function(){h.delete(_)},f),typeof g[_].unref=="function"&&g[_].unref(),S&&(S[_]&&S[_]!=="nextTick"&&clearTimeout(S[_]),S[_]=setTimeout(function(){delete S[_]},y),typeof S[_].unref=="function"&&S[_].unref())}),h.on("delete"+v,function(_){clearTimeout(g[_]),delete g[_],S&&(S[_]!=="nextTick"&&clearTimeout(S[_]),delete S[_])}),p.preFetch&&(p.preFetch===!0||isNaN(p.preFetch)?y=.333:y=l(c(Number(p.preFetch),1),0),y&&(S={},y=(1-y)*f,h.on("get"+v,function(_,b,x){S[_]||(S[_]="nextTick",n(function(){var E;S[_]==="nextTick"&&(delete S[_],h.delete(_),p.async&&(b=e(b),b.push(s)),E=h.memoized.apply(x,b),p.promise&&r(E)&&(typeof E.done=="function"?E.done(s,s):E.then(s,s)))}))}))),h.on("clear"+v,function(){t(g,function(_){clearTimeout(_)}),g={},S&&(t(S,function(_){_!=="nextTick"&&clearTimeout(_)}),S={})}))},RW}var MW={},fN,DW;function pTe(){if(DW)return fN;DW=1;var e=Dp,t=Object.create,n=Object.prototype.hasOwnProperty;return fN=function(r){var i=0,o=1,s=t(null),l=t(null),c=0,d;return r=e(r),{hit:function(f){var h=l[f],p=++c;if(s[p]=f,l[f]=p,!h)return++i,i<=r?void 0:(f=s[o],d(f),f);if(delete s[h],o===h)for(;!n.call(s,++o););},delete:d=function(f){var h=l[f];if(h&&(delete s[h],delete l[f],--i,o===h)){if(!i){c=0,o=1;return}for(;!n.call(s,++o););}},clear:function(){i=0,o=1,s=t(null),l=t(null),c=0}}},fN}var LW;function mTe(){if(LW)return MW;LW=1;var e=Dp,t=pTe(),n=Lp;return n.max=function(r,i,o){var s,l,c;r=e(r),r&&(l=t(r),s=o.async&&n.async||o.promise&&n.promise?"async":"",i.on("set"+s,c=function(d){d=l.hit(d),d!==void 0&&i.delete(d)}),i.on("get"+s,c),i.on("delete"+s,l.delete),i.on("clear"+s,l.clear))},MW}var NW={},BW;function gTe(){if(BW)return NW;BW=1;var e=Np,t=Lp,n=Object.create,r=Object.defineProperties;return t.refCounter=function(i,o,s){var l,c;l=n(null),c=s.async&&t.async||s.promise&&t.promise?"async":"",o.on("set"+c,function(d,f){l[d]=f||1}),o.on("get"+c,function(d){++l[d]}),o.on("delete"+c,function(d){delete l[d]}),o.on("clear"+c,function(){l={}}),r(o.memoized,{deleteRef:e(function(){var d=o.get(arguments);return d===null||!l[d]?null:--l[d]?!1:(o.delete(d),!0)}),getRefCount:e(function(){var d=o.get(arguments);return d===null||!l[d]?0:l[d]})})},NW}var vTe=fJ,yTe=hJ,bTe=XCe,xTe=function(e){var t=vTe(arguments[1]),n;return t.normalizer||(n=t.length=yTe(t.length,e.length,t.async),n!==0&&(t.primitive?n===!1?t.normalizer=YCe():n>1&&(t.normalizer=KCe()(n)):n===!1?t.normalizer=eTe()():n===1?t.normalizer=tTe()():t.normalizer=nTe()(n))),t.async&&rTe(),t.promise&&cTe(),t.dispose&&uTe(),t.maxAge&&hTe(),t.max&&mTe(),t.refCounter&&gTe(),bTe(e,t)};const Nu=js(xTe),wTe=e=>async t=>{const n=new e,r=await t(n);return n.terminate(),r},ov=e=>t=>wTe(e)(n=>(n.postMessage(t),new Promise((r,i)=>{n.onmessage=o=>{r(o.data)},n.onerror=i}))),sv=(e,t={async:!0,length:1})=>Nu(ov(e),t);ee.memoize(ov(pEe));ee.memoize(ov(mEe));const _Te=ee.memoize(ov(gEe)),STe=ee.memoize(ov(vEe)),RJ=ee.memoize(ov(bEe));function yx(e){return e.split(".").pop()}function IJ(e){return e.split(".").shift()}const $W="internal/custom",IF="json",PF=e=>({name:(e==null?void 0:e.id)===$W?`Imported Map - ${e==null?void 0:e.name}`:"Import Map",description:"Internal",id:$W}),ETe=e=>({name:(e==null?void 0:e.type)===IF?`Imported Trace - ${e==null?void 0:e.name}`:"Import Trace",description:"Internal",id:IF}),FW=["json","yaml"];async function CTe(){const e=await hz({accept:FW.map(t=>`.trace.${t}`),strict:!0});if(e)return{file:e,read:async()=>{if(FW.includes(yx(e.name))){const t=await e.text(),n=await RJ(t);return{...ETe(),format:n==null?void 0:n.format,content:n,name:ee.startCase(IJ(e.name)),type:IF}}else throw new Error(`The format (${yx(e.name)}) is unsupported.`)}}}async function TTe(e){const t=await hz({accept:e.map(({id:n})=>`.${n}`),strict:!0});if(t)return{file:t,read:async()=>{if(ee.find(e,{id:yx(t.name)}))return{...PF(),format:yx(t.name),content:await t.text(),name:ee.startCase(IJ(t.name))};throw new Error(`The format (${yx(t.name)}) is unsupported.`)}}}const PJ=20*1024*1024,[OJ,kTe]=nc({},{reduce:(e,t)=>ee.omitBy(sk(e,t),ee.isUndefined)});function ATe(e){return new Promise(t=>ee.delay(t,e))}function vz(e){const[,t]=OJ();return I.useCallback(async(n,r)=>{t(()=>({[e]:r})),ATe(300);const i=await n();return t(()=>({[e]:void 0})),i},[e,t])}function yz(e){return`${(e/(1024*1024)).toFixed(2)} MB`}function RTe({onChange:e,value:t}){const n=ba(),r=Jd("map"),i=vz("map"),[o]=Ig(),[{maps:s,formats:l}]=WE();return C.jsx(Xo,{showArrow:!0,icon:C.jsx(XK,{}),label:"Choose Map",value:t==null?void 0:t.id,items:[PF(t),...s.map(c=>{var d;return{...c,description:(d=ee.find(o,{url:c.source}))==null?void 0:d.name}})],onChange:async c=>{switch(c){case PF().id:try{const d=await TTe(l);d&&r(async()=>{n("Opening map...");const f=d.file.size>PJ?await i(d.read,`Opening map (${yz(d.file.size)})`):await d.read();f&&(e==null||e(f))})}catch(d){n(`${d}`)}break;default:e==null||e(ee.find(s,{id:c}));break}}})}function ITe({onChange:e,value:t}){const n=ba(),r=Jd("specimen"),i=vz("specimen");return C.jsx($d,{icon:C.jsx(XK,{}),onClick:async()=>{try{const o=await CTe();o&&r(async()=>{n("Opening trace...");const s=o.file.size>PJ?await i(o.read,`Opening trace (${yz(o.file.size)})`):await o.read();s&&(e==null||e(s))})}catch(o){n(`${o}`)}},children:t!=null&&t.id?`Uploaded Trace - ${t.name}`:"Choose File"})}const MJ=({label:e})=>C.jsx(zt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:e}),PTe=({label:e})=>C.jsx(zt,{variant:"body1",children:e}),i1=({label:e,content:t})=>C.jsxs(bn,{alignItems:"center",children:[C.jsx(PTe,{label:e}),C.jsx(Kr,{flex:1}),t]}),wk=({variables:e},{x:t,y:n})=>(e==null?void 0:e.x)===t&&(e==null?void 0:e.y)===n,OTe=""+new URL("parseGrid.worker-d5269b43.js",import.meta.url).href;class MTe extends Worker{constructor(){super(OTe,{type:"module"})}}const DTe=sv(MTe),{floor:zW}=Math;function jW(e,t,n){return e>=t&&e({...await DTe({map:e,options:t})}),{normalizer:JSON.stringify}),NTe=e=>{const{width:t,height:n}=e.bounds;return{...e,snap:({x:r,y:i},o=1)=>{const[s,l]=[zW(r+o/2),zW(i+o/2)];if(jW(s,0,t)&&jW(l,0,n))return{x:s,y:l}},nodeAt:r=>{const{x:i,y:o}=r;return o*t+i},pointOf:r=>({x:r%t,y:~~(r/t)}),matchNode:wk}},BTe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:NTe,parse:LTe},Symbol.toStringTag,{value:"Module"})),$Te=""+new URL("parseMesh.worker-114081b8.js",import.meta.url).href;class FTe extends Worker{constructor(){super($Te,{type:"module"})}}const zTe=sv(FTe),jTe=Nu(async(e="",t)=>await zTe({map:e,options:t}),{normalizer:JSON.stringify}),UTe=e=>({...e,snap:ee.identity,nodeAt:ee.constant(0),pointOf:ee.constant({x:0,y:0}),matchNode:wk}),HTe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:UTe,parse:jTe},Symbol.toStringTag,{value:"Module"})),WTe=""+new URL("parseNetwork.worker-0345a67d.js",import.meta.url).href;class GTe extends Worker{constructor(){super(WTe,{type:"module"})}}const VTe=sv(GTe),qTe=Nu(async(e="",t)=>await VTe({map:e,options:t}),{normalizer:JSON.stringify}),XTe=e=>({...e,snap:ee.identity,nodeAt:ee.constant(0),pointOf:ee.constant({x:0,y:0}),matchNode:wk}),YTe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:XTe,parse:qTe},Symbol.toStringTag,{value:"Module"})),KTe=""+new URL("parsePoly.worker-bf1460fa.js",import.meta.url).href;class QTe extends Worker{constructor(){super(KTe,{type:"module"})}}const JTe=sv(QTe),ZTe=Nu(async(e="",t)=>await JTe({map:e,options:t}),{normalizer:JSON.stringify}),eke=e=>({...e,snap:ee.identity,nodeAt:ee.constant(0),pointOf:ee.constant({x:0,y:0}),matchNode:wk}),tke=Object.freeze(Object.defineProperty({__proto__:null,hydrate:eke,parse:ZTe},Symbol.toStringTag,{value:"Module"})),bz={grid:BTe,xy:YTe,mesh:HTe,poly:tke};function xz(e=""){return bz[e]}function eg({label:e,icon:t=C.jsx(jxe,{}),...n}){return C.jsxs(bn,{justifyContent:"center",alignItems:"center",color:"text.secondary",bgcolor:"background.paper",textAlign:"center",vertical:!0,pt:6,...n,children:[I.cloneElement(t,{sx:{mb:2},fontSize:"large"}),C.jsx(zt,{children:e})]})}const zb="500";function nke(e){return parseInt(e.replace("#","0x"))}const wz={source:Yu.A400,destination:qu.A400,updating:zh[zb],expanding:bq[zb],generating:xq[zb],closing:yq[zb],end:Xu.A400};ee.mapValues(wz,nke);function Pg(e){return(e&&wz[e])??y5[zb]}function rke(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function ike(){return this.eachAfter(rke)}function oke(e){var t=this,n,r=[t],i,o,s;do for(n=r.reverse(),r=[];t=n.pop();)if(e(t),i=t.children,i)for(o=0,s=i.length;o=0;--i)n.push(r[i]);return this}function ake(e){for(var t=this,n=[t],r=[],i,o,s;t=n.pop();)if(r.push(t),i=t.children,i)for(o=0,s=i.length;o=0;)n+=r[i].value;t.value=n})}function cke(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function uke(e){for(var t=this,n=dke(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function dke(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function fke(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function hke(){var e=[];return this.each(function(t){e.push(t)}),e}function pke(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function mke(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function _z(e,t){var n=new o1(e),r=+e.value&&(n.value=e.value),i,o=[n],s,l,c,d;for(t==null&&(t=vke);i=o.pop();)if(r&&(i.value=+i.data.value),(l=t(i.data))&&(d=l.length))for(i.children=new Array(d),c=d-1;c>=0;--c)o.push(s=i.children[c]=new o1(l[c])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(bke)}function gke(){return _z(this).eachBefore(yke)}function vke(e){return e.children}function yke(e){e.data=e.data.data}function bke(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function o1(e){this.data=e,this.depth=this.height=0,this.parent=null}o1.prototype=_z.prototype={constructor:o1,count:ike,each:oke,eachAfter:ake,eachBefore:ske,sum:lke,sort:cke,path:uke,ancestors:fke,descendants:hke,leaves:pke,links:mke,copy:gke};function xke(e,t){return e.parent===t.parent?1:2}function hN(e){var t=e.children;return t?t[0]:e.t}function pN(e){var t=e.children;return t?t[t.length-1]:e.t}function wke(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function _ke(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function Ske(e,t,n){return e.a.parent===t.parent?e.a:n}function IS(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}IS.prototype=Object.create(o1.prototype);function Eke(e){for(var t=new IS(e,0),n,r=[t],i,o,s,l;n=r.pop();)if(o=n._.children)for(n.children=new Array(l=o.length),s=l-1;s>=0;--s)r.push(i=n.children[s]=new IS(o[s],s)),i.parent=n;return(t.parent=new IS(null,0)).children=[t],t}function Cke(){var e=xke,t=1,n=1,r=null;function i(d){var f=Eke(d);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(s),r)d.eachBefore(c);else{var h=d,p=d,g=d;d.eachBefore(function(b){b.xp.x&&(p=b),b.depth>g.depth&&(g=b)});var v=h===p?1:e(h,p)/2,y=v-h.x,S=t/(p.x+v+y),_=n/(g.depth||1);d.eachBefore(function(b){b.x=(b.x+y)*S,b.y=b.depth*_})}return d}function o(d){var f=d.children,h=d.parent.children,p=d.i?h[d.i-1]:null;if(f){_ke(d);var g=(f[0].z+f[f.length-1].z)/2;p?(d.z=p.z+e(d._,p._),d.m=d.z-g):d.z=g}else p&&(d.z=p.z+e(d._,p._));d.parent.A=l(d,p,d.parent.A||h[0])}function s(d){d._.x=d.z+d.parent.m,d.m+=d.parent.m}function l(d,f,h){if(f){for(var p=d,g=d,v=f,y=p.parent.children[0],S=p.m,_=g.m,b=v.m,x=y.m,E;v=pN(v),p=hN(p),v&&p;)y=hN(y),g=pN(g),g.a=d,E=v.z+b-p.z-S+e(v._,p._),E>0&&(wke(Ske(v,d,h),d,E),S+=E,_+=E),b+=v.m,S+=p.m,x+=y.m,_+=g.m;v&&!pN(g)&&(g.t=v,g.m+=b-_),p&&!hN(y)&&(y.t=p,y.m+=S-x,h=d)}return h}function c(d){d.x*=t,d.y=d.depth*n}return i.separation=function(d){return arguments.length?(e=d,i):e},i.size=function(d){return arguments.length?(r=!1,t=+d[0],n=+d[1],i):r?null:[t,n]},i.nodeSize=function(d){return arguments.length?(r=!0,t=+d[0],n=+d[1],i):r?[t,n]:null},i}var OF="http://www.w3.org/1999/xhtml";const UW={svg:"http://www.w3.org/2000/svg",xhtml:OF,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _k(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),UW.hasOwnProperty(t)?{space:UW[t],local:e}:e}function Tke(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===OF&&t.documentElement.namespaceURI===OF?t.createElement(e):t.createElementNS(n,e)}}function kke(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function DJ(e){var t=_k(e);return(t.local?kke:Tke)(t)}function Ake(){}function Sz(e){return e==null?Ake:function(){return this.querySelector(e)}}function Rke(e){typeof e!="function"&&(e=Sz(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=x&&(x=b+1);!(A=S[x])&&++x=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function eAe(e){e||(e=tAe);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var n=this._groups,r=n.length,i=new Array(r),o=0;ot?1:e>=t?0:NaN}function nAe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function rAe(){return Array.from(this)}function iAe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?mAe:typeof t=="function"?vAe:gAe)(e,t,n??"")):Og(this.node(),e)}function Og(e,t){return e.style.getPropertyValue(t)||FJ(e).getComputedStyle(e,null).getPropertyValue(t)}function bAe(e){return function(){delete this[e]}}function xAe(e,t){return function(){this[e]=t}}function wAe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function _Ae(e,t){return arguments.length>1?this.each((t==null?bAe:typeof t=="function"?wAe:xAe)(e,t)):this.node()[e]}function zJ(e){return e.trim().split(/^|\s+/)}function Ez(e){return e.classList||new jJ(e)}function jJ(e){this._node=e,this._names=zJ(e.getAttribute("class")||"")}jJ.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function UJ(e,t){for(var n=Ez(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function KAe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n{}};function Cz(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}PS.prototype=Cz.prototype={constructor:PS,on:function(e,t){var n=this._,r=sRe(e+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o0)for(var n=new Array(i),r=0,i,o;r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?p_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?p_(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=dRe.exec(e))?new jo(t[1],t[2],t[3],1):(t=fRe.exec(e))?new jo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=hRe.exec(e))?p_(t[1],t[2],t[3],t[4]):(t=pRe.exec(e))?p_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=mRe.exec(e))?KW(t[1],t[2]/100,t[3]/100,1):(t=gRe.exec(e))?KW(t[1],t[2]/100,t[3]/100,t[4]):WW.hasOwnProperty(e)?qW(WW[e]):e==="transparent"?new jo(NaN,NaN,NaN,0):null}function qW(e){return new jo(e>>16&255,e>>8&255,e&255,1)}function p_(e,t,n,r){return r<=0&&(e=t=n=NaN),new jo(e,t,n,r)}function bRe(e){return e instanceof cw||(e=l1(e)),e?(e=e.rgb(),new jo(e.r,e.g,e.b,e.opacity)):new jo}function LF(e,t,n,r){return arguments.length===1?bRe(e):new jo(e,t,n,r??1)}function jo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Tz(jo,LF,VJ(cw,{brighter(e){return e=e==null?VE:Math.pow(VE,e),new jo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?s1:Math.pow(s1,e),new jo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new jo(np(this.r),np(this.g),np(this.b),qE(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:XW,formatHex:XW,formatHex8:xRe,formatRgb:YW,toString:YW}));function XW(){return`#${qh(this.r)}${qh(this.g)}${qh(this.b)}`}function xRe(){return`#${qh(this.r)}${qh(this.g)}${qh(this.b)}${qh((isNaN(this.opacity)?1:this.opacity)*255)}`}function YW(){const e=qE(this.opacity);return`${e===1?"rgb(":"rgba("}${np(this.r)}, ${np(this.g)}, ${np(this.b)}${e===1?")":`, ${e})`}`}function qE(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function np(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qh(e){return e=np(e),(e<16?"0":"")+e.toString(16)}function KW(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new el(e,t,n,r)}function qJ(e){if(e instanceof el)return new el(e.h,e.s,e.l,e.opacity);if(e instanceof cw||(e=l1(e)),!e)return new el;if(e instanceof el)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,l=o-i,c=(o+i)/2;return l?(t===o?s=(n-r)/l+(n0&&c<1?0:s,new el(s,l,c,e.opacity)}function wRe(e,t,n,r){return arguments.length===1?qJ(e):new el(e,t,n,r??1)}function el(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Tz(el,wRe,VJ(cw,{brighter(e){return e=e==null?VE:Math.pow(VE,e),new el(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?s1:Math.pow(s1,e),new el(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new jo(mN(e>=240?e-240:e+120,i,r),mN(e,i,r),mN(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new el(QW(this.h),m_(this.s),m_(this.l),qE(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=qE(this.opacity);return`${e===1?"hsl(":"hsla("}${QW(this.h)}, ${m_(this.s)*100}%, ${m_(this.l)*100}%${e===1?")":`, ${e})`}`}}));function QW(e){return e=(e||0)%360,e<0?e+360:e}function m_(e){return Math.max(0,Math.min(1,e||0))}function mN(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const XJ=e=>()=>e;function _Re(e,t){return function(n){return e+n*t}}function SRe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function ERe(e){return(e=+e)==1?YJ:function(t,n){return n-t?SRe(t,n,e):XJ(isNaN(t)?n:t)}}function YJ(e,t){var n=t-e;return n?_Re(e,n):XJ(isNaN(e)?t:e)}const JW=function e(t){var n=ERe(t);function r(i,o){var s=n((i=LF(i)).r,(o=LF(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),d=YJ(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=l(f),i.b=c(f),i.opacity=d(f),i+""}}return r.gamma=e,r}(1);function ed(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var NF=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gN=new RegExp(NF.source,"g");function CRe(e){return function(){return e}}function TRe(e){return function(t){return e(t)+""}}function kRe(e,t){var n=NF.lastIndex=gN.lastIndex=0,r,i,o,s=-1,l=[],c=[];for(e=e+"",t=t+"";(r=NF.exec(e))&&(i=gN.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:ed(r,i)})),n=gN.lastIndex;return n180?f+=360:f-d>180&&(d+=360),p.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ed(d,f)})):f&&h.push(i(h)+"rotate("+f+r)}function l(d,f,h,p){d!==f?p.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ed(d,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(d,f,h,p,g,v){if(d!==h||f!==p){var y=g.push(i(g)+"scale(",null,",",null,")");v.push({i:y-4,x:ed(d,h)},{i:y-2,x:ed(f,p)})}else(h!==1||p!==1)&&g.push(i(g)+"scale("+h+","+p+")")}return function(d,f){var h=[],p=[];return d=e(d),f=e(f),o(d.translateX,d.translateY,f.translateX,f.translateY,h,p),s(d.rotate,f.rotate,h,p),l(d.skewX,f.skewX,h,p),c(d.scaleX,d.scaleY,f.scaleX,f.scaleY,h,p),d=f=null,function(g){for(var v=-1,y=p.length,S;++v=0&&e._call.call(void 0,t),e=e._next;--Mg}function tG(){wp=(YE=c1.now())+Sk,Mg=jb=0;try{BRe()}finally{Mg=0,FRe(),wp=0}}function $Re(){var e=c1.now(),t=e-YE;t>JJ&&(Sk-=t,YE=e)}function FRe(){for(var e,t=XE,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:XE=n);Ub=e,$F(r)}function $F(e){if(!Mg){jb&&(jb=clearTimeout(jb));var t=e-wp;t>24?(e<1/0&&(jb=setTimeout(tG,e-c1.now()-Sk)),hb&&(hb=clearInterval(hb))):(hb||(YE=c1.now(),hb=setInterval($Re,JJ)),Mg=1,ZJ(tG))}}function nG(e,t,n){var r=new KE;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var zRe=Cz("start","end","cancel","interrupt"),jRe=[],tZ=0,rG=1,FF=2,OS=3,iG=4,zF=5,MS=6;function Ek(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;URe(e,n,{name:t,index:r,group:i,on:zRe,tween:jRe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:tZ})}function Az(e,t){var n=vl(e,t);if(n.state>tZ)throw new Error("too late; already scheduled");return n}function ic(e,t){var n=vl(e,t);if(n.state>OS)throw new Error("too late; already running");return n}function vl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function URe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=eZ(o,0,n.time);function o(d){n.state=rG,n.timer.restart(s,n.delay,n.time),n.delay<=d&&s(d-n.delay)}function s(d){var f,h,p,g;if(n.state!==rG)return c();for(f in r)if(g=r[f],g.name===n.name){if(g.state===OS)return nG(s);g.state===iG?(g.state=MS,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[f]):+fFF&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function yIe(e,t,n){var r,i,o=vIe(t)?Az:ic;return function(){var s=o(this,e),l=s.on;l!==r&&(i=(r=l).copy()).on(t,n),s.on=i}}function bIe(e,t){var n=this._id;return arguments.length<2?vl(this.node(),n).on.on(e):this.each(yIe(n,e,t))}function xIe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function wIe(){return this.on("end.remove",xIe(this._id))}function _Ie(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Sz(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s()=>e;function qIe(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function fu(e,t,n){this.k=e,this.x=t,this.y=n}fu.prototype={constructor:fu,scale:function(e){return e===1?this:new fu(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new fu(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var QE=new fu(1,0,0);fu.prototype;function vN(e){e.stopImmediatePropagation()}function pb(e){e.preventDefault(),e.stopImmediatePropagation()}function XIe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function YIe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function oG(){return this.__zoom||QE}function KIe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function QIe(){return navigator.maxTouchPoints||"ontouchstart"in this}function JIe(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function yN(){var e=XIe,t=YIe,n=JIe,r=KIe,i=QIe,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=LRe,d=Cz("start","zoom","end"),f,h,p,g=500,v=150,y=0,S=10;function _(D){D.property("__zoom",oG).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",N).filter(i).on("touchstart.zoom",H).on("touchmove.zoom",W).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(D,F,j,V){var G=D.selection?D.selection():D;G.property("__zoom",oG),D!==G?A(D,F,j,V):G.interrupt().each(function(){R(this,arguments).event(V).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},_.scaleBy=function(D,F,j,V){_.scaleTo(D,function(){var G=this.__zoom.k,K=typeof F=="function"?F.apply(this,arguments):F;return G*K},j,V)},_.scaleTo=function(D,F,j,V){_.transform(D,function(){var G=t.apply(this,arguments),K=this.__zoom,Y=j==null?E(G):typeof j=="function"?j.apply(this,arguments):j,J=K.invert(Y),ie=typeof F=="function"?F.apply(this,arguments):F;return n(x(b(K,ie),Y,J),G,s)},j,V)},_.translateBy=function(D,F,j,V){_.transform(D,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof j=="function"?j.apply(this,arguments):j),t.apply(this,arguments),s)},null,V)},_.translateTo=function(D,F,j,V,G){_.transform(D,function(){var K=t.apply(this,arguments),Y=this.__zoom,J=V==null?E(K):typeof V=="function"?V.apply(this,arguments):V;return n(QE.translate(J[0],J[1]).scale(Y.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof j=="function"?-j.apply(this,arguments):-j),K,s)},V,G)};function b(D,F){return F=Math.max(o[0],Math.min(o[1],F)),F===D.k?D:new fu(F,D.x,D.y)}function x(D,F,j){var V=F[0]-j[0]*D.k,G=F[1]-j[1]*D.k;return V===D.x&&G===D.y?D:new fu(D.k,V,G)}function E(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function A(D,F,j,V){D.on("start.zoom",function(){R(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(V).end()}).tween("zoom",function(){var G=this,K=arguments,Y=R(G,K).event(V),J=t.apply(G,K),ie=j==null?E(J):typeof j=="function"?j.apply(G,K):j,ce=Math.max(J[1][0]-J[0][0],J[1][1]-J[0][1]),ue=G.__zoom,se=typeof F=="function"?F.apply(G,K):F,Q=c(ue.invert(ie).concat(ce/ue.k),se.invert(ie).concat(ce/se.k));return function(ae){if(ae===1)ae=se;else{var le=Q(ae),he=ce/le[2];ae=new fu(he,ie[0]-le[0]*he,ie[1]-le[1]*he)}Y.zoom(null,ae)}})}function R(D,F,j){return!j&&D.__zooming||new k(D,F)}function k(D,F){this.that=D,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,F),this.taps=0}k.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,F){return this.mouse&&D!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var F=Co(this.that).datum();d.call(D,this.that,new qIe(D,{sourceEvent:this.sourceEvent,target:_,type:D,transform:this.that.__zoom,dispatch:d}),F)}};function O(D,...F){if(!e.apply(this,arguments))return;var j=R(this,F).event(D),V=this.__zoom,G=Math.max(o[0],Math.min(o[1],V.k*Math.pow(2,r.apply(this,arguments)))),K=wh(D);if(j.wheel)(j.mouse[0][0]!==K[0]||j.mouse[0][1]!==K[1])&&(j.mouse[1]=V.invert(j.mouse[0]=K)),clearTimeout(j.wheel);else{if(V.k===G)return;j.mouse=[K,V.invert(K)],DS(this),j.start()}pb(D),j.wheel=setTimeout(Y,v),j.zoom("mouse",n(x(b(V,G),j.mouse[0],j.mouse[1]),j.extent,s));function Y(){j.wheel=null,j.end()}}function L(D,...F){if(p||!e.apply(this,arguments))return;var j=D.currentTarget,V=R(this,F,!0).event(D),G=Co(D.view).on("mousemove.zoom",ie,!0).on("mouseup.zoom",ce,!0),K=wh(D,j),Y=D.clientX,J=D.clientY;lRe(D.view),vN(D),V.mouse=[K,this.__zoom.invert(K)],DS(this),V.start();function ie(ue){if(pb(ue),!V.moved){var se=ue.clientX-Y,Q=ue.clientY-J;V.moved=se*se+Q*Q>y}V.event(ue).zoom("mouse",n(x(V.that.__zoom,V.mouse[0]=wh(ue,j),V.mouse[1]),V.extent,s))}function ce(ue){G.on("mousemove.zoom mouseup.zoom",null),cRe(ue.view,V.moved),pb(ue),V.event(ue).end()}}function N(D,...F){if(e.apply(this,arguments)){var j=this.__zoom,V=wh(D.changedTouches?D.changedTouches[0]:D,this),G=j.invert(V),K=j.k*(D.shiftKey?.5:2),Y=n(x(b(j,K),V,G),t.apply(this,F),s);pb(D),l>0?Co(this).transition().duration(l).call(A,Y,V,D):Co(this).call(_.transform,Y,V,D)}}function H(D,...F){if(e.apply(this,arguments)){var j=D.touches,V=j.length,G=R(this,F,D.changedTouches.length===V).event(D),K,Y,J,ie;for(vN(D),Y=0;Y"u"&&(g=!0),typeof v>"u"&&(v=1/0);function E(A,R){if(A===null)return null;if(R===0)return A;var k,O;if(typeof A!="object")return A;if(n(A,r))k=new r;else if(n(A,i))k=new i;else if(n(A,o))k=new o(function(V,G){A.then(function(K){V(E(K,R-1))},function(K){G(E(K,R-1))})});else if(s.__isArray(A))k=[];else if(s.__isRegExp(A))k=new RegExp(A.source,h(A)),A.lastIndex&&(k.lastIndex=A.lastIndex);else if(s.__isDate(A))k=new Date(A.getTime());else{if(x&&Buffer.isBuffer(A))return Buffer.allocUnsafe?k=Buffer.allocUnsafe(A.length):k=new Buffer(A.length),A.copy(k),k;n(A,Error)?k=Object.create(A):typeof y>"u"?(O=Object.getPrototypeOf(A),k=Object.create(O)):(k=Object.create(y),O=y)}if(g){var L=_.indexOf(A);if(L!=-1)return b[L];_.push(A),b.push(k)}n(A,r)&&A.forEach(function(V,G){var K=E(G,R-1),Y=E(V,R-1);k.set(K,Y)}),n(A,i)&&A.forEach(function(V){var G=E(V,R-1);k.add(G)});for(var N in A){var H;O&&(H=Object.getOwnPropertyDescriptor(O,N)),!(H&&H.set==null)&&(k[N]=E(A[N],R-1))}if(Object.getOwnPropertySymbols)for(var W=Object.getOwnPropertySymbols(A),N=0;N1&&arguments[1]!==void 0?arguments[1]:0,n=(Li[e[t+0]]+Li[e[t+1]]+Li[e[t+2]]+Li[e[t+3]]+"-"+Li[e[t+4]]+Li[e[t+5]]+"-"+Li[e[t+6]]+Li[e[t+7]]+"-"+Li[e[t+8]]+Li[e[t+9]]+"-"+Li[e[t+10]]+Li[e[t+11]]+Li[e[t+12]]+Li[e[t+13]]+Li[e[t+14]]+Li[e[t+15]]).toLowerCase();if(!rPe(n))throw TypeError("Stringified UUID is invalid");return n}function xN(e,t,n){e=e||{};var r=e.random||(e.rng||tPe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return iPe(r)}var jF={exports:{}},UF={exports:{}},oPe=function(){for(var t=arguments.length,n=[],r=0;re.enableLegacyTransitions?de.createElement(PPe.TransitionGroup,{component:e.component,className:e.className,transform:e.transform},e.children):de.createElement("g",{className:e.className,transform:e.transform},e.children),MPe=15,uG={title:{textAnchor:"start",x:40},attribute:{x:40,dy:"1.2em"}},DPe=({nodeDatum:e,toggleNode:t,onNodeClick:n,onNodeMouseOver:r,onNodeMouseOut:i})=>de.createElement(de.Fragment,null,de.createElement("circle",{r:MPe,onClick:o=>{t(),n(o)},onMouseOver:r,onMouseOut:i}),de.createElement("g",{className:"rd3t-label"},de.createElement("text",Object.assign({className:"rd3t-label__title"},uG.title),e.name),de.createElement("text",{className:"rd3t-label__attributes"},e.attributes&&Object.entries(e.attributes).map(([o,s],l)=>de.createElement("tspan",Object.assign({key:`${o}-${l}`},uG.attribute),o,": ",typeof s=="boolean"?s.toString():s)))));let LPe=class extends de.Component{constructor(){super(...arguments),this.nodeRef=null,this.state={transform:this.setTransform(this.props.position,this.props.parent,this.props.orientation,!0),initialStyle:{opacity:0},wasClicked:!1},this.shouldNodeTransform=(t,n,r,i)=>n.subscriptions!==t.subscriptions||n.position.x!==t.position.x||n.position.y!==t.position.y||n.orientation!==t.orientation||i.wasClicked!==r.wasClicked,this.renderNodeElement=()=>{const{data:t,hierarchyPointNode:n,renderCustomNodeElement:r}=this.props,i=typeof r=="function"?r:DPe,o={hierarchyPointNode:n,nodeDatum:t,toggleNode:this.handleNodeToggle,onNodeClick:this.handleOnClick,onNodeMouseOver:this.handleOnMouseOver,onNodeMouseOut:this.handleOnMouseOut,addChildren:this.handleAddChildren};return i(o)},this.handleNodeToggle=()=>{this.setState({wasClicked:!0}),this.props.onNodeToggle(this.props.data.__rd3t.id)},this.handleOnClick=t=>{this.setState({wasClicked:!0}),this.props.onNodeClick(this.props.hierarchyPointNode,t)},this.handleOnMouseOver=t=>{this.props.onNodeMouseOver(this.props.hierarchyPointNode,t)},this.handleOnMouseOut=t=>{this.props.onNodeMouseOut(this.props.hierarchyPointNode,t)},this.handleAddChildren=t=>{this.props.handleAddChildrenToNode(this.props.data.__rd3t.id,t)}}componentDidMount(){this.commitTransform()}componentDidUpdate(){this.state.wasClicked&&(this.props.centerNode(this.props.hierarchyPointNode),this.setState({wasClicked:!1})),this.commitTransform()}shouldComponentUpdate(t,n){return this.shouldNodeTransform(this.props,t,this.state,n)}setTransform(t,n,r,i=!1){if(i){const o=n!=null,s=o?n.x:0,l=o?n.y:0;return r==="horizontal"?`translate(${l},${s})`:`translate(${s},${l})`}return r==="horizontal"?`translate(${t.y},${t.x})`:`translate(${t.x},${t.y})`}applyTransform(t,n,r=1,i=()=>{}){this.props.enableLegacyTransitions?Eo(this.nodeRef).transition().duration(n).attr("transform",t).style("opacity",r).on("end",i):(Eo(this.nodeRef).attr("transform",t).style("opacity",r),i())}commitTransform(){const{orientation:t,transitionDuration:n,position:r,parent:i}=this.props,o=this.setTransform(r,i,t);this.applyTransform(o,n)}componentWillLeave(t){const{orientation:n,transitionDuration:r,position:i,parent:o}=this.props,s=this.setTransform(i,o,n,!0);this.applyTransform(s,r,0,t)}render(){const{data:t,nodeClassName:n}=this.props;return de.createElement("g",{id:t.__rd3t.id,ref:r=>{this.nodeRef=r},style:this.state.initialStyle,className:[t.children&&t.children.length>0?"rd3t-node":"rd3t-leaf-node",n].join(" ").trim(),transform:this.state.transform},this.renderNodeElement())}};var VF=Math.PI,qF=2*VF,Dh=1e-6,NPe=qF-Dh;function XF(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function yZ(){return new XF}XF.prototype=yZ.prototype={constructor:XF,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,l=n-e,c=r-t,d=o-e,f=s-t,h=d*d+f*f;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>Dh)if(!(Math.abs(f*l-c*d)>Dh)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=n-o,g=r-s,v=l*l+c*c,y=p*p+g*g,S=Math.sqrt(v),_=Math.sqrt(h),b=i*Math.tan((VF-Math.acos((v+h-y)/(2*S*_)))/2),x=b/_,E=b/S;Math.abs(x-1)>Dh&&(this._+="L"+(e+x*d)+","+(t+x*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>d*g)+","+(this._x1=e+E*l)+","+(this._y1=t+E*c)}},arc:function(e,t,n,r,i,o){e=+e,t=+t,n=+n,o=!!o;var s=n*Math.cos(r),l=n*Math.sin(r),c=e+s,d=t+l,f=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+c+","+d:(Math.abs(this._x1-c)>Dh||Math.abs(this._y1-d)>Dh)&&(this._+="L"+c+","+d),n&&(h<0&&(h=h%qF+qF),h>NPe?this._+="A"+n+","+n+",0,1,"+f+","+(e-s)+","+(t-l)+"A"+n+","+n+",0,1,"+f+","+(this._x1=c)+","+(this._y1=d):h>Dh&&(this._+="A"+n+","+n+",0,"+ +(h>=VF)+","+f+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function dG(e){return function(){return e}}function BPe(e){return e[0]}function $Pe(e){return e[1]}var FPe=Array.prototype.slice;function zPe(e){return e.source}function jPe(e){return e.target}function bZ(e){var t=zPe,n=jPe,r=BPe,i=$Pe,o=null;function s(){var l,c=FPe.call(arguments),d=t.apply(this,c),f=n.apply(this,c);if(o||(o=l=yZ()),e(o,+r.apply(this,(c[0]=d,c)),+i.apply(this,c),+r.apply(this,(c[0]=f,c)),+i.apply(this,c)),l)return o=null,l+""||null}return s.source=function(l){return arguments.length?(t=l,s):t},s.target=function(l){return arguments.length?(n=l,s):n},s.x=function(l){return arguments.length?(r=typeof l=="function"?l:dG(+l),s):r},s.y=function(l){return arguments.length?(i=typeof l=="function"?l:dG(+l),s):i},s.context=function(l){return arguments.length?(o=l??null,s):o},s}function UPe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function HPe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function WPe(){return bZ(UPe)}function GPe(){return bZ(HPe)}class VPe extends de.PureComponent{constructor(){super(...arguments),this.linkRef=null,this.state={initialStyle:{opacity:0}},this.handleOnClick=t=>{this.props.onClick(this.props.linkData.source,this.props.linkData.target,t)},this.handleOnMouseOver=t=>{this.props.onMouseOver(this.props.linkData.source,this.props.linkData.target,t)},this.handleOnMouseOut=t=>{this.props.onMouseOut(this.props.linkData.source,this.props.linkData.target,t)}}componentDidMount(){this.applyOpacity(1,this.props.transitionDuration)}componentWillLeave(t){this.applyOpacity(0,this.props.transitionDuration,t)}applyOpacity(t,n,r=()=>{}){this.props.enableLegacyTransitions?Eo(this.linkRef).transition().duration(n).style("opacity",t).on("end",r):(Eo(this.linkRef).style("opacity",t),r())}drawStepPath(t,n){const{source:r,target:i}=t,o=i.y-r.y;return n==="horizontal"?`M${r.y},${r.x} H${r.y+o/2} V${i.x} H${i.y}`:`M${r.x},${r.y} V${r.y+o/2} H${i.x} V${i.y}`}drawDiagonalPath(t,n){const{source:r,target:i}=t;return n==="horizontal"?WPe()({source:[r.y,r.x],target:[i.y,i.x]}):GPe()({source:[r.x,r.y],target:[i.x,i.y]})}drawStraightPath(t,n){const{source:r,target:i}=t;return n==="horizontal"?`M${r.y},${r.x}L${i.y},${i.x}`:`M${r.x},${r.y}L${i.x},${i.y}`}drawElbowPath(t,n){return n==="horizontal"?`M${t.source.y},${t.source.x}V${t.target.x}H${t.target.y}`:`M${t.source.x},${t.source.y}V${t.target.y}H${t.target.x}`}drawPath(){const{linkData:t,orientation:n,pathFunc:r}=this.props;return typeof r=="function"?r(t,n):r==="elbow"?this.drawElbowPath(t,n):r==="straight"?this.drawStraightPath(t,n):r==="step"?this.drawStepPath(t,n):this.drawDiagonalPath(t,n)}getClassNames(){const{linkData:t,orientation:n,pathClassFunc:r}=this.props,i=["rd3t-link"];return typeof r=="function"&&i.push(r(t,n)),i.join(" ").trim()}render(){const{linkData:t}=this.props;return de.createElement("path",{ref:n=>{this.linkRef=n},style:Object.assign({},this.state.initialStyle),className:this.getClassNames(),d:this.drawPath(),onClick:this.handleOnClick,onMouseOver:this.handleOnMouseOver,onMouseOut:this.handleOnMouseOut,"data-source-id":t.source.id,"data-target-id":t.target.id})}}const qPe=` +https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=sZ,t.componentWillReceiveProps=aZ),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=lZ;var l=t.componentDidUpdate;t.componentDidUpdate=function(d,f,h){var p=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:h;l.call(this,d,f,p)}}return e}const cPe=Object.freeze(Object.defineProperty({__proto__:null,polyfill:lPe},Symbol.toStringTag,{value:"Module"})),uPe=aq(cPe);var Ck={};Ck.__esModule=!0;Ck.getChildMapping=fPe;Ck.mergeChildMappings=hPe;var dPe=I;function fPe(e){if(!e)return e;var t={};return dPe.Children.map(e,function(n){return n}).forEach(function(n){t[n.key]=n}),t}function hPe(e,t){e=e||{},t=t||{};function n(f){return t.hasOwnProperty(f)?t[f]:e[f]}var r={},i=[];for(var o in e)t.hasOwnProperty(o)?i.length&&(r[o]=i,i=[]):i.push(o);var s=void 0,l={};for(var c in t){if(r.hasOwnProperty(c))for(s=0;se.enableLegacyTransitions?de.createElement(PPe.TransitionGroup,{component:e.component,className:e.className,transform:e.transform},e.children):de.createElement("g",{className:e.className,transform:e.transform},e.children),MPe=15,uG={title:{textAnchor:"start",x:40},attribute:{x:40,dy:"1.2em"}},DPe=({nodeDatum:e,toggleNode:t,onNodeClick:n,onNodeMouseOver:r,onNodeMouseOut:i})=>de.createElement(de.Fragment,null,de.createElement("circle",{r:MPe,onClick:o=>{t(),n(o)},onMouseOver:r,onMouseOut:i}),de.createElement("g",{className:"rd3t-label"},de.createElement("text",Object.assign({className:"rd3t-label__title"},uG.title),e.name),de.createElement("text",{className:"rd3t-label__attributes"},e.attributes&&Object.entries(e.attributes).map(([o,s],l)=>de.createElement("tspan",Object.assign({key:`${o}-${l}`},uG.attribute),o,": ",typeof s=="boolean"?s.toString():s)))));let LPe=class extends de.Component{constructor(){super(...arguments),this.nodeRef=null,this.state={transform:this.setTransform(this.props.position,this.props.parent,this.props.orientation,!0),initialStyle:{opacity:0},wasClicked:!1},this.shouldNodeTransform=(t,n,r,i)=>n.subscriptions!==t.subscriptions||n.position.x!==t.position.x||n.position.y!==t.position.y||n.orientation!==t.orientation||i.wasClicked!==r.wasClicked,this.renderNodeElement=()=>{const{data:t,hierarchyPointNode:n,renderCustomNodeElement:r}=this.props,i=typeof r=="function"?r:DPe,o={hierarchyPointNode:n,nodeDatum:t,toggleNode:this.handleNodeToggle,onNodeClick:this.handleOnClick,onNodeMouseOver:this.handleOnMouseOver,onNodeMouseOut:this.handleOnMouseOut,addChildren:this.handleAddChildren};return i(o)},this.handleNodeToggle=()=>{this.setState({wasClicked:!0}),this.props.onNodeToggle(this.props.data.__rd3t.id)},this.handleOnClick=t=>{this.setState({wasClicked:!0}),this.props.onNodeClick(this.props.hierarchyPointNode,t)},this.handleOnMouseOver=t=>{this.props.onNodeMouseOver(this.props.hierarchyPointNode,t)},this.handleOnMouseOut=t=>{this.props.onNodeMouseOut(this.props.hierarchyPointNode,t)},this.handleAddChildren=t=>{this.props.handleAddChildrenToNode(this.props.data.__rd3t.id,t)}}componentDidMount(){this.commitTransform()}componentDidUpdate(){this.state.wasClicked&&(this.props.centerNode(this.props.hierarchyPointNode),this.setState({wasClicked:!1})),this.commitTransform()}shouldComponentUpdate(t,n){return this.shouldNodeTransform(this.props,t,this.state,n)}setTransform(t,n,r,i=!1){if(i){const o=n!=null,s=o?n.x:0,l=o?n.y:0;return r==="horizontal"?`translate(${l},${s})`:`translate(${s},${l})`}return r==="horizontal"?`translate(${t.y},${t.x})`:`translate(${t.x},${t.y})`}applyTransform(t,n,r=1,i=()=>{}){this.props.enableLegacyTransitions?Co(this.nodeRef).transition().duration(n).attr("transform",t).style("opacity",r).on("end",i):(Co(this.nodeRef).attr("transform",t).style("opacity",r),i())}commitTransform(){const{orientation:t,transitionDuration:n,position:r,parent:i}=this.props,o=this.setTransform(r,i,t);this.applyTransform(o,n)}componentWillLeave(t){const{orientation:n,transitionDuration:r,position:i,parent:o}=this.props,s=this.setTransform(i,o,n,!0);this.applyTransform(s,r,0,t)}render(){const{data:t,nodeClassName:n}=this.props;return de.createElement("g",{id:t.__rd3t.id,ref:r=>{this.nodeRef=r},style:this.state.initialStyle,className:[t.children&&t.children.length>0?"rd3t-node":"rd3t-leaf-node",n].join(" ").trim(),transform:this.state.transform},this.renderNodeElement())}};var VF=Math.PI,qF=2*VF,Dh=1e-6,NPe=qF-Dh;function XF(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function yZ(){return new XF}XF.prototype=yZ.prototype={constructor:XF,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,l=n-e,c=r-t,d=o-e,f=s-t,h=d*d+f*f;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>Dh)if(!(Math.abs(f*l-c*d)>Dh)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=n-o,g=r-s,v=l*l+c*c,y=p*p+g*g,S=Math.sqrt(v),_=Math.sqrt(h),b=i*Math.tan((VF-Math.acos((v+h-y)/(2*S*_)))/2),x=b/_,E=b/S;Math.abs(x-1)>Dh&&(this._+="L"+(e+x*d)+","+(t+x*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>d*g)+","+(this._x1=e+E*l)+","+(this._y1=t+E*c)}},arc:function(e,t,n,r,i,o){e=+e,t=+t,n=+n,o=!!o;var s=n*Math.cos(r),l=n*Math.sin(r),c=e+s,d=t+l,f=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+c+","+d:(Math.abs(this._x1-c)>Dh||Math.abs(this._y1-d)>Dh)&&(this._+="L"+c+","+d),n&&(h<0&&(h=h%qF+qF),h>NPe?this._+="A"+n+","+n+",0,1,"+f+","+(e-s)+","+(t-l)+"A"+n+","+n+",0,1,"+f+","+(this._x1=c)+","+(this._y1=d):h>Dh&&(this._+="A"+n+","+n+",0,"+ +(h>=VF)+","+f+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function dG(e){return function(){return e}}function BPe(e){return e[0]}function $Pe(e){return e[1]}var FPe=Array.prototype.slice;function zPe(e){return e.source}function jPe(e){return e.target}function bZ(e){var t=zPe,n=jPe,r=BPe,i=$Pe,o=null;function s(){var l,c=FPe.call(arguments),d=t.apply(this,c),f=n.apply(this,c);if(o||(o=l=yZ()),e(o,+r.apply(this,(c[0]=d,c)),+i.apply(this,c),+r.apply(this,(c[0]=f,c)),+i.apply(this,c)),l)return o=null,l+""||null}return s.source=function(l){return arguments.length?(t=l,s):t},s.target=function(l){return arguments.length?(n=l,s):n},s.x=function(l){return arguments.length?(r=typeof l=="function"?l:dG(+l),s):r},s.y=function(l){return arguments.length?(i=typeof l=="function"?l:dG(+l),s):i},s.context=function(l){return arguments.length?(o=l??null,s):o},s}function UPe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function HPe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function WPe(){return bZ(UPe)}function GPe(){return bZ(HPe)}class VPe extends de.PureComponent{constructor(){super(...arguments),this.linkRef=null,this.state={initialStyle:{opacity:0}},this.handleOnClick=t=>{this.props.onClick(this.props.linkData.source,this.props.linkData.target,t)},this.handleOnMouseOver=t=>{this.props.onMouseOver(this.props.linkData.source,this.props.linkData.target,t)},this.handleOnMouseOut=t=>{this.props.onMouseOut(this.props.linkData.source,this.props.linkData.target,t)}}componentDidMount(){this.applyOpacity(1,this.props.transitionDuration)}componentWillLeave(t){this.applyOpacity(0,this.props.transitionDuration,t)}applyOpacity(t,n,r=()=>{}){this.props.enableLegacyTransitions?Co(this.linkRef).transition().duration(n).style("opacity",t).on("end",r):(Co(this.linkRef).style("opacity",t),r())}drawStepPath(t,n){const{source:r,target:i}=t,o=i.y-r.y;return n==="horizontal"?`M${r.y},${r.x} H${r.y+o/2} V${i.x} H${i.y}`:`M${r.x},${r.y} V${r.y+o/2} H${i.x} V${i.y}`}drawDiagonalPath(t,n){const{source:r,target:i}=t;return n==="horizontal"?WPe()({source:[r.y,r.x],target:[i.y,i.x]}):GPe()({source:[r.x,r.y],target:[i.x,i.y]})}drawStraightPath(t,n){const{source:r,target:i}=t;return n==="horizontal"?`M${r.y},${r.x}L${i.y},${i.x}`:`M${r.x},${r.y}L${i.x},${i.y}`}drawElbowPath(t,n){return n==="horizontal"?`M${t.source.y},${t.source.x}V${t.target.x}H${t.target.y}`:`M${t.source.x},${t.source.y}V${t.target.y}H${t.target.x}`}drawPath(){const{linkData:t,orientation:n,pathFunc:r}=this.props;return typeof r=="function"?r(t,n):r==="elbow"?this.drawElbowPath(t,n):r==="straight"?this.drawStraightPath(t,n):r==="step"?this.drawStepPath(t,n):this.drawDiagonalPath(t,n)}getClassNames(){const{linkData:t,orientation:n,pathClassFunc:r}=this.props,i=["rd3t-link"];return typeof r=="function"&&i.push(r(t,n)),i.join(" ").trim()}render(){const{linkData:t}=this.props;return de.createElement("path",{ref:n=>{this.linkRef=n},style:Object.assign({},this.state.initialStyle),className:this.getClassNames(),d:this.drawPath(),onClick:this.handleOnClick,onMouseOver:this.handleOnMouseOver,onMouseOut:this.handleOnMouseOut,"data-source-id":t.source.id,"data-target-id":t.target.id})}}const qPe=` /* Tree */ .rd3t-tree-container { width: 100%; @@ -499,18 +499,18 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat fill: none; stroke: #000; } -`;let xZ=class za extends de.Component{constructor(){super(...arguments),this.state={dataRef:this.props.data,data:za.assignInternalProperties(vo(this.props.data)),d3:za.calculateD3Geometry(this.props),isTransitioning:!1,isInitialRenderForDataset:!0,dataKey:this.props.dataKey},this.internalState={targetNode:null,isTransitioning:!1},this.svgInstanceRef=`rd3t-svg-${xN()}`,this.gInstanceRef=`rd3t-g-${xN()}`,this.handleNodeToggle=t=>{const n=vo(this.state.data),i=this.findNodesById(t,n,[])[0];this.props.collapsible&&!this.state.isTransitioning&&(i.__rd3t.collapsed?(za.expandNode(i),this.props.shouldCollapseNeighborNodes&&this.collapseNeighborNodes(i,n)):za.collapseNode(i),this.props.enableLegacyTransitions?(this.setState({data:n,isTransitioning:!0}),setTimeout(()=>this.setState({isTransitioning:!1}),this.props.transitionDuration+10)):this.setState({data:n}),this.internalState.targetNode=i)},this.handleAddChildrenToNode=(t,n)=>{const r=vo(this.state.data),i=this.findNodesById(t,r,[]);if(i.length>0){const o=i[0],s=o.__rd3t.depth,l=vo(n).map(c=>za.assignInternalProperties([c],s+1));o.children.push(...l.flat()),this.setState({data:r})}},this.handleOnNodeClickCb=(t,n)=>{const{onNodeClick:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(vo(t),n))},this.handleOnLinkClickCb=(t,n,r)=>{const{onLinkClick:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(vo(t),vo(n),r))},this.handleOnNodeMouseOverCb=(t,n)=>{const{onNodeMouseOver:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(vo(t),n))},this.handleOnLinkMouseOverCb=(t,n,r)=>{const{onLinkMouseOver:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(vo(t),vo(n),r))},this.handleOnNodeMouseOutCb=(t,n)=>{const{onNodeMouseOut:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(vo(t),n))},this.handleOnLinkMouseOutCb=(t,n,r)=>{const{onLinkMouseOut:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(vo(t),vo(n),r))},this.centerNode=t=>{const{dimensions:n,orientation:r,zoom:i,centeringTransitionDuration:o}=this.props;if(n){const s=Eo(`.${this.gInstanceRef}`),l=Eo(`.${this.svgInstanceRef}`),c=this.state.d3.scale;let d,f;r==="horizontal"?(f=-t.x*c+n.height/2,d=-t.y*c+n.width/2):(d=-t.x*c+n.width/2,f=-t.y*c+n.height/2),s.transition().duration(o).attr("transform","translate("+d+","+f+")scale("+c+")"),l.call(yN().transform,QE.translate(d,f).scale(i))}},this.getNodeClassName=(t,n)=>{const{rootNodeClassName:r,branchNodeClassName:i,leafNodeClassName:o}=this.props;return t!=null?n.children?i:o:r}}static getDerivedStateFromProps(t,n){let r=null;const i=!t.dataKey||n.dataKey!==t.dataKey;t.data!==n.dataRef&&i&&(r={dataRef:t.data,data:za.assignInternalProperties(vo(t.data)),isInitialRenderForDataset:!0,dataKey:t.dataKey});const o=za.calculateD3Geometry(t);return bx(o,n.d3)||(r=r||{},r.d3=o),r}componentDidMount(){this.bindZoomListener(this.props),this.setState({isInitialRenderForDataset:!1})}componentDidUpdate(t){this.props.data!==t.data&&this.setState({isInitialRenderForDataset:!1}),(!bx(this.props.translate,t.translate)||!bx(this.props.scaleExtent,t.scaleExtent)||this.props.zoomable!==t.zoomable||this.props.draggable!==t.draggable||this.props.zoom!==t.zoom||this.props.enableLegacyTransitions!==t.enableLegacyTransitions)&&this.bindZoomListener(this.props),typeof this.props.onUpdate=="function"&&this.props.onUpdate({node:this.internalState.targetNode?vo(this.internalState.targetNode):null,zoom:this.state.d3.scale,translate:this.state.d3.translate}),this.internalState.targetNode=null}setInitialTreeDepth(t,n){t.forEach(r=>{r.data.__rd3t.collapsed=r.depth>=n})}bindZoomListener(t){const{zoomable:n,scaleExtent:r,translate:i,zoom:o,onUpdate:s,hasInteractiveNodes:l}=t,c=Eo(`.${this.svgInstanceRef}`),d=Eo(`.${this.gInstanceRef}`);c.call(yN().transform,QE.translate(i.x,i.y).scale(o)),c.call(yN().scaleExtent(n?[r.min,r.max]:[o,o]).filter(f=>l?f.target.classList.contains(this.svgInstanceRef)||f.target.classList.contains(this.gInstanceRef)||f.shiftKey:!0).on("zoom",f=>{!this.props.draggable&&["mousemove","touchmove","dblclick"].includes(f.sourceEvent.type)||(d.attr("transform",f.transform),typeof s=="function"&&(s({node:null,zoom:f.transform.k,translate:{x:f.transform.x,y:f.transform.y}}),this.state.d3.scale=f.transform.k,this.state.d3.translate={x:f.transform.x,y:f.transform.y}))}))}static assignInternalProperties(t,n=0){return(Array.isArray(t)?t:[t]).map(i=>{const o=i;return o.__rd3t={id:null,depth:null,collapsed:!1},o.__rd3t.id=xN(),o.__rd3t.depth=n,o.children&&o.children.length>0&&(o.children=za.assignInternalProperties(o.children,n+1)),o})}findNodesById(t,n,r){return r.length>0||(r=r.concat(n.filter(i=>i.__rd3t.id===t)),n.forEach(i=>{i.children&&i.children.length>0&&(r=this.findNodesById(t,i.children,r))})),r}findNodesAtDepth(t,n,r){return r=r.concat(n.filter(i=>i.__rd3t.depth===t)),n.forEach(i=>{i.children&&i.children.length>0&&(r=this.findNodesAtDepth(t,i.children,r))}),r}static collapseNode(t){t.__rd3t.collapsed=!0,t.children&&t.children.length>0&&t.children.forEach(n=>{za.collapseNode(n)})}static expandNode(t){t.__rd3t.collapsed=!1}collapseNeighborNodes(t,n){this.findNodesAtDepth(t.__rd3t.depth,n,[]).filter(i=>i.__rd3t.id!==t.__rd3t.id).forEach(i=>za.collapseNode(i))}generateTree(){const{initialDepth:t,depthFactor:n,separation:r,nodeSize:i,orientation:o}=this.props,{isInitialRenderForDataset:s}=this.state,c=Cke().nodeSize(o==="horizontal"?[i.y,i.x]:[i.x,i.y]).separation((h,p)=>h.parent.data.__rd3t.id===p.parent.data.__rd3t.id?r.siblings:r.nonSiblings)(_z(this.state.data[0],h=>h.__rd3t.collapsed?null:h.children));let d=c.descendants();const f=c.links();return t!==void 0&&s&&this.setInitialTreeDepth(d,t),n&&d.forEach(h=>{h.y=h.depth*n}),{nodes:d,links:f}}static calculateD3Geometry(t){let n;return t.zoom>t.scaleExtent.max?n=t.scaleExtent.max:t.zoomde.createElement(VPe,{key:"link-"+b,orientation:i,pathFunc:o,pathClassFunc:g,linkData:_,onClick:this.handleOnLinkClickCb,onMouseOver:this.handleOnLinkMouseOverCb,onMouseOut:this.handleOnLinkMouseOutCb,enableLegacyTransitions:h,transitionDuration:s})),t.map((_,b)=>{const{data:x,x:E,y:A,parent:R}=_;return de.createElement(LPe,{key:"node-"+b,data:x,position:{x:E,y:A},hierarchyPointNode:_,parent:R,nodeClassName:this.getNodeClassName(R,x),renderCustomNodeElement:r,nodeSize:l,orientation:i,enableLegacyTransitions:h,transitionDuration:s,onNodeToggle:this.handleNodeToggle,onNodeClick:this.handleOnNodeClickCb,onNodeMouseOver:this.handleOnNodeMouseOverCb,onNodeMouseOut:this.handleOnNodeMouseOutCb,handleAddChildrenToNode:this.handleAddChildrenToNode,subscriptions:S,centerNode:this.centerNode})}))))}};xZ.defaultProps={onNodeClick:void 0,onNodeMouseOver:void 0,onNodeMouseOut:void 0,onLinkClick:void 0,onLinkMouseOver:void 0,onLinkMouseOut:void 0,onUpdate:void 0,orientation:"horizontal",translate:{x:0,y:0},pathFunc:"diagonal",pathClassFunc:void 0,transitionDuration:500,depthFactor:void 0,collapsible:!0,initialDepth:void 0,zoomable:!0,draggable:!0,zoom:1,scaleExtent:{min:.1,max:1},nodeSize:{x:140,y:140},separation:{siblings:1,nonSiblings:2},shouldCollapseNeighborNodes:!1,svgClassName:"",rootNodeClassName:"",branchNodeClassName:"",leafNodeClassName:"",renderCustomNodeElement:void 0,enableLegacyTransitions:!1,hasInteractiveNodes:!1,dimensions:void 0,centeringTransitionDuration:800,dataKey:void 0};const XPe=ee.constant(!0),[Bp,YPe]=nc({layers:[]});function Kl(e,t=XPe){const[n,r]=I.useState(e),[{layers:i},o]=Bp(),s=ee.filter(i,t),l=n?ee.find(s,{key:n}):ee.head(s);return I.useEffect(()=>{r(e)},[e]),I.useEffect(()=>{l&&l.key!==n&&r(l.key)},[l,n,r]),I.useMemo(()=>({key:l==null?void 0:l.key,setKey:r,layer:l,setLayer:c=>{const d={...l,...c};o(({layers:f})=>({layers:ee.map(f,h=>h.key===d.key?d:h)}))},layers:s}),[l,o,s])}function u1(){return u1=Object.assign||function(e){for(var t=1;tawait d2e(e),[e])}function h2e(e,t){const n=I.useMemo(()=>e,t);return f2e(n)}const p2e=C.jsx(tc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),m2e=xZ;function SZ(e,t=!1){const[n,r]=I.useState();return I.useEffect(()=>{t||e&&r(e)},[e,t]),n}const hG={small:{value:0,name:"Current",description:"Show the current node and its parents"},medium:{value:4,name:"Nearby",description:"Show nodes with ≤4 degrees of separation"},infinite:{value:void 0,name:"All",description:"Show all nodes, may impact performance"}};function g2e(){var _,b,x,E,A;const{palette:e}=In(),{key:t,setKey:n,layer:r,setLayer:i,layers:o}=Kl(),s=ZK(((_=r==null?void 0:r.source)==null?void 0:_.step)??0,600),{controls:l,onChange:c,state:d}=Du(),[f,h]=I.useState("small"),p=Zx({"&.rd3t-link":{stroke:_n(e.text.primary,e.action.disabledOpacity)}}),{result:g,loading:v}=h2e({trace:(x=(b=r==null?void 0:r.source)==null?void 0:b.trace)==null?void 0:x.content,step:s,radius:hG[f].value},[s,r,f]),y=SZ(g,v),S=I.useCallback(()=>p,[p]);return C.jsxs(Sn,{onChange:c,stack:d,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{children:(A=(E=r==null?void 0:r.source)==null?void 0:E.trace)!=null&&A.content&&(y!=null&&y.tree)?C.jsx(vk,{children:({width:R,height:k})=>C.jsx(dt,{width:R,height:k,children:C.jsx(m2e,{scaleExtent:{max:10,min:.01},translate:{x:R/2,y:R/2},data:y.tree,dimensions:{width:R,height:k},separation:{siblings:.4,nonSiblings:.4},pathClassFunc:S,renderCustomNodeElement:({nodeDatum:O,onNodeClick:L})=>{var N;return C.jsx(v2e,{node:O,onClick:()=>L==null?void 0:L({}),step:(N=r==null?void 0:r.source)==null?void 0:N.step,onStep:H=>i(ko(r,W=>{ee.set(W,"source.step",H)}))})}})})}):C.jsx(eg,{icon:C.jsx(VK,{}),label:"Tree"})})})," ",C.jsxs(Sn.Options,{children:[C.jsx(Xo,{icon:C.jsx(tv,{}),label:"Layer",value:t,items:ee.map(o,R=>({id:R.key,name:$o(R)})),onChange:n,showArrow:!0}),p2e,C.jsx(Xo,{icon:C.jsx(zxe,{}),label:"Radius",value:f,onChange:R=>h(R),items:ee.map(ee.entries(hG),([R,k])=>({id:R,...k})),showArrow:!0})]}),C.jsx(Sn.Extras,{children:l})]})}const mb=16,Zc=4;function v2e({onClick:e,node:t,step:n=0,onStep:r}){var f;const{palette:i,spacing:o,shape:s}=In(),l=ee.findLast(t==null?void 0:t.events,h=>h.step<=n),c=!!ee.find(t==null?void 0:t.events,h=>h.step===n),d=Pg((f=l==null?void 0:l.data)==null?void 0:f.type);return C.jsx(Op,{variant:"popover",children:h=>{var p,g;return C.jsxs(C.Fragment,{children:[C.jsx(Kd,{title:`f: ${((p=l==null?void 0:l.data)==null?void 0:p.f)??"unknown"}, g: ${((g=l==null?void 0:l.data)==null?void 0:g.g)??"unknown"}`,children:C.jsxs("g",{onClick:v=>{h.open(v)},children:[C.jsx("clipPath",{id:"clipPath",children:C.jsx("rect",{y:o(-Zc/2),x:o(-.25),strokeWidth:0,width:o(mb),height:o(Zc),rx:s.borderRadius})}),C.jsx("rect",{y:o(-Zc/2),x:o(-.25),strokeWidth:0,fill:i.background.default,width:o(mb),height:o(Zc),clipPath:"url(#clipPath)"}),c&&C.jsx("rect",{y:o(-Zc/2),x:o(-.25),strokeWidth:0,fill:_n(i.primary.main,i.action.selectedOpacity),width:o(mb),height:o(Zc),clipPath:"url(#clipPath)"}),C.jsx("rect",{x:o(-.25),y:o(-Zc/2),height:o(Zc),width:o(.5),fill:d,strokeWidth:0,clipPath:"url(#clipPath)"}),C.jsx("text",{strokeWidth:0,height:o(4),fill:i.text.primary,y:0,fontWeight:500,fontSize:"0.875rem",x:o(2-.25),alignmentBaseline:"central",children:t==null?void 0:t.name}),!!(t!=null&&t.cumulativeChildCount)&&C.jsxs(C.Fragment,{children:[C.jsx("text",{strokeWidth:0,height:o(4),fill:i.text.secondary,y:0,x:o(mb-2.25-1),textAnchor:"end",fontWeight:400,fontSize:"0.875rem",alignmentBaseline:"central",children:t==null?void 0:t.cumulativeChildCount}),C.jsx(bxe,{width:o(2),height:o(2),x:o(mb-2-1),y:o(-Zc/2+1),strokeWidth:0,fill:i.text.primary,opacity:i.action.disabledOpacity})]})]})}),C.jsx(Pp,{anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"},...sw(h),children:C.jsx(ik,{dense:!0,sx:{p:0},children:ee.map(t==null?void 0:t.events,v=>C.jsx(gu,{selected:v.step===n,sx:{borderLeft:`4px solid ${Pg(v.data.type)}`},onClick:()=>{h.close(),e==null||e(),ee.delay(()=>r==null?void 0:r(v.step),150)},children:C.jsx(q4,{primary:ee.startCase(v.data.type),secondary:`Step ${v.step}`})}))})})]})}})}function y2e({selection:e,onClose:t}){const n=b2e(),r=SZ(e),{client:i}=e??{};return C.jsx(Pp,{open:!!e,anchorReference:"anchorPosition",anchorPosition:{top:(i==null?void 0:i.y)??0,left:(i==null?void 0:i.x)??0},onClose:t,keepMounted:!0,children:C.jsx(ik,{dense:!0,sx:{py:0},children:C.jsx(n,{event:r,children:o=>{const s=ee.entries(o);return s.length?ee.chain(s).sortBy(([,l])=>l.index).map(([,{items:l,primary:c}],d)=>C.jsxs(C.Fragment,{children:[!!d&&C.jsx(tc,{sx:{my:1,mx:2}}),c&&C.jsx(Qm,{sx:{py:0},children:C.jsx(zt,{color:"text.secondary",variant:"overline",children:c})}),ee.chain(l).entries().sortBy(([,f])=>f.index).map(([f,{action:h,icon:p,primary:g,secondary:v}])=>h?C.jsxs(gu,{onClick:()=>{h(),t==null||t()},children:[p&&C.jsx(Ul,{children:p}),C.jsx(sl,{primary:g,sx:{mr:4}}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:v})]},f):C.jsxs(Qm,{children:[p&&C.jsx(Ul,{children:p}),C.jsx(sl,{primary:g,sx:{mr:4}}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:v})]},f)).value()]})).value():C.jsx(C.Fragment,{children:C.jsx(Qm,{children:C.jsx(zt,{children:"No info to show."})})})}})})})}const pG=({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e({})});function b2e(){const[{layers:e}]=Bp();return I.useMemo(()=>ee.chain(e).reduce((t,n)=>{var i;const r=((i=GZ(n))==null?void 0:i.getSelectionInfo)??pG;return({children:o,event:s})=>C.jsx(r,{layer:n.key,event:s,children:l=>C.jsx(t,{event:s,children:c=>o==null?void 0:o(ee.merge(l,c))})})},pG).value(),[e])}const[Tk,x2e]=nc([],{reduce:eQ}),w2e={tileSubdivision:1,workerCount:8,tileResolution:{width:ee.round(256*devicePixelRatio),height:ee.round(256*devicePixelRatio)}},EZ=I.createContext({});function _2e(){return I.useContext(EZ)}function S2e(e,{width:t,height:n}={}){const r=In(),[i]=Tk(),o=I.useRef(null),[s,l]=I.useState(""),[c,d]=I.useState();return I.useEffect(()=>{if(l(""),o.current&&t&&n&&e){const f=ee.find(i,h=>h.renderer.meta.id===e);if(f){const h=new f.renderer.constructor;return h.setup({...w2e,screenSize:{width:t,height:n},backgroundColor:r.palette.background.paper,accentColor:r.palette.primary.main}),o.current.append(h.getView()),d(h),()=>{var p,g;try{(g=(p=o.current)==null?void 0:p.removeChild)==null||g.call(p,h.getView()),d(void 0)}catch(v){console.warn(v)}finally{h.destroy()}}}}},[o.current,ee.map,e,i,r,l,d]),l1e(()=>{c&&t&&n&&c.setOptions({screenSize:{width:t,height:n}})},r.transitions.duration.standard,[c,t,n]),{instance:c,ref:o,error:s}}function E2e(){const[{map:e,specimen:t}]=yk();return!!(e||t)&&C.jsx(q1,{sx:{position:"absolute",top:n=>n.spacing(6+2),right:n=>n.spacing(2)}})}function C2e({width:e,height:t,renderer:n,rendererRef:r,layers:i}){const{instance:o,error:s,ref:l}=S2e(n,{width:e,height:t}),[c,d]=I.useState();I.useEffect(()=>{if(o){const h=(p,g)=>{const v=p;d({client:{x:v.clientX,y:v.clientY},world:g.world,info:{point:g.world,components:g.components}})};return o.on("click",h),()=>void o.off("click",h)}},[o]);const f=I.useMemo(()=>({renderer:o}),[o]);return I.useEffect(()=>r==null?void 0:r(o),[o,r]),C.jsxs(C.Fragment,{children:[C.jsx(E2e,{}),C.jsx(EZ.Provider,{value:f,children:i!=null&&i.length?s?C.jsxs(dt,{sx:{display:"flex",flexDirection:"column",width:e,height:t,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[C.jsx(gxe,{sx:{mb:2},fontSize:"large"}),s]}):C.jsx(C.Fragment,{children:C.jsx(dt,{ref:l,children:i.map(h=>C.jsx(aDe,{layer:h},h.key))})}):C.jsx(eg,{icon:C.jsx(QK,{}),label:"No layers to render",width:e,height:t})}),C.jsx(y2e,{selection:c,onClose:()=>d(void 0)})]})}function d1({nodes:e}){const{renderer:t}=_2e();return I.useEffect(()=>{if(t&&(e!=null&&e.length))return t.add(e.flat())},[t,e]),C.jsx(C.Fragment,{})}function T2e({nodes:e,step:t}){const r=ee.floor((t??0)/200)*200,i=I.useMemo(()=>ee.slice(e,0,r),[e,r]),o=I.useMemo(()=>ee.slice(e,r,(t??0)+1),[e,r,t]);return C.jsxs(C.Fragment,{children:[!!r&&C.jsx(d1,{nodes:i}),C.jsx(d1,{nodes:o})]})}const CZ=(e,t,n)=>{const r=I.useRef(n||[]),o=r.current===n||!r.current.every((l,c)=>l===n[c]);r.current=n;const s=t.map(()=>null);return I.useEffect(o?()=>void e():()=>{},o?t:s)};function k2e(e,t){return ee.zip(e,t).every(([n,r])=>n===r)}const A2e=(e,t=[],n=[])=>{const[r,i]=I.useState(t),[o,s]=I.useState(n);return I.useEffect(()=>{k2e(o,n)||(i(t),s(n))},[t,n,o]),_Z(e,[...r,...o])};function Lz(){const[e]=Ig();return I.useCallback(t=>ee.find(e,t),[e])}function R2e(e){return Lz()({url:e})}function I2e(e){const t=ba(),n=Jd("map"),r=Lz(),i=I.useMemo(()=>Nu(async({source:c,id:d}={})=>{if(c&&d){const f=r({url:c});if(f){t("Fetching map...");const h=await f.call("features/map",{id:d});return h==null?void 0:h.content}}},{normalizer:JSON.stringify}),[r,t]),{content:o,source:s,id:l}=e??{};return lv(()=>n(async()=>{if(l)return{...e,content:o||await i({source:s,id:l})}}),[i,o,s,l])}function P2e(e){const t=ba(),n=In(),r=Jd("map"),{format:i,content:o}=e??{};return lv(()=>r(async()=>{var l,c;const s=n.palette.mode==="dark"?Yg:Xg;if(i&&o){t("Processing map...");const d=await((c=(l=xz(i))==null?void 0:l.parse)==null?void 0:c.call(l,o,{color:s(n.palette.background.paper,1-n.palette.action.hoverOpacity)}))??{nodes:[]};return t("Map loaded",`${d.nodes.length} elements, ${d.log.join(", ")}`),d}}),[i,o,n])}const O2e={key:"map",inferName:e=>{var t;return(t=e==null?void 0:e.source)!=null&&t.map?`${e.source.map.name} (${ee.startCase(e.source.map.format)})`:"Untitled Map"},editor:Rg(({value:e,produce:t})=>{var n;return C.jsx(C.Fragment,{children:C.jsx(i1,{label:"Source",content:C.jsx(RTe,{value:(n=e==null?void 0:e.source)==null?void 0:n.map,onChange:r=>t(i=>ee.set(i,"source.map",r))})})})}),renderer:({layer:e})=>{var r;const{nodes:t}=((r=e==null?void 0:e.source)==null?void 0:r.parsedMap)??{},n=I.useMemo(()=>[t??[]],[t]);return C.jsx(d1,{nodes:n})},steps:({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e([])}),service:Rg(({value:e,produce:t})=>{var i;const{result:n}=I2e((i=e==null?void 0:e.source)==null?void 0:i.map),{result:r}=P2e(n);return CZ(()=>void t(o=>ee.set(o,"source.parsedMap",r)),[r,t],[r]),C.jsx(C.Fragment,{})}),getSelectionInfo:({children:e,event:t,layer:n})=>{const{layer:r,setLayer:i,layers:o}=Kl(n),{parsedMap:s}=(r==null?void 0:r.source)??{},{point:l,node:c}=I.useMemo(()=>{var f,h,p,g;if(s&&t){const v=(g=(p=xz((h=(f=r==null?void 0:r.source)==null?void 0:f.map)==null?void 0:h.format))==null?void 0:p.hydrate)==null?void 0:g.call(p,s);if(v){const y=(t==null?void 0:t.world)&&v.snap(t.world);if(y){const S=(t==null?void 0:t.world)&&v.nodeAt(y);return{point:y,node:S}}}}return{}},[s,t]),d=I.useMemo(()=>({...r&&l&&!ee.isUndefined(c)&&{[r.key]:{primary:$o(r),items:{point:{primary:"Point",secondary:`(${ee.round(l.x,2)}, ${ee.round(l.y,2)})`}}}}}),[l,c,r,o,i]);return C.jsx(C.Fragment,{children:e==null?void 0:e(d)})}};var _N=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,bo,LS,M2e={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},Vu;function SN(e){return _N.lastIndex=0,_N.test(e)?'"'+e.replace(_N,function(t){var n=M2e[t];return typeof n=="string"?n:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function NS(e,t,n){var r,i,o,s,l=bo,c,d=t[e];switch(d&&typeof d=="object"&&typeof d.toJSON=="function"&&(d=d.toJSON(e)),typeof Vu=="function"&&(d=Vu.call(t,e,d)),typeof d){case"string":return SN(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(bo+=LS,c=[],Object.prototype.toString.apply(d)==="[object Array]"){for(s=d.length,r=0;rn?`[ -`+bo+c.join(`, -`+bo)+` -`+l+"]":"[ "+c.join(", ")+" ]":"["+c.join(",")+"]",bo=l,o}if(Vu&&typeof Vu=="object")for(s=Vu.length,r=0;rn?`{ -`+bo+c.join(`, -`+bo)+` -`+l+"}":"{ "+c.join(", ")+" }":"{"+c.join(",")+"}",bo=l,o}}function D2e(e,t,n,r){var i;if(bo="",LS="",r||(r=0),typeof r!="number")throw new Error("beaufifier: limit must be a number");if(typeof n=="number")for(i=0;inew Function("params",`${e}; return ${t}.apply(null, params);`));function $2e(e,t,n){try{return B2e(e,t)(n)}catch{return cJ[t].defaultReturnValue}}function F2e(e){const{layer:t}=Kl(e),{monotonicF:n,monotonicG:r,breakpoints:i,code:o,trace:s}=(t==null?void 0:t.source)??{};return I.useMemo(()=>{var c;const l=ee.keyBy((c=s==null?void 0:s.content)==null?void 0:c.events,"id");return Nu(d=>{var h,p,g,v;const f=(p=(h=s==null?void 0:s.content)==null?void 0:h.events)==null?void 0:p[d];if(f)try{if(d){for(const y of[n&&"f",r&&"g"])if(y&&ee.get(l[`${f.pId}`],y)>ee.get(f,y))return{result:`Monotonicity violation on ${y}`}}for(const{active:y,condition:S,type:_,property:b="",reference:x=0}of i??[]){const E=!_||_===f.type,A=(g=S==null?void 0:S.apply)==null?void 0:g.call(S,ee.get(f,b),x);if(y&&E&&A)return{result:`${b} ${ee.toLower(ee.startCase(S==null?void 0:S.key))} ${x}`}}if($2e(o??"","shouldBreak",[d,f,((v=s==null?void 0:s.content)==null?void 0:v.events)??[]]))return{result:"Script editor"}}catch(y){return{error:`${y}`}}return{result:""}})},[o,s==null?void 0:s.content,i,n,r])}function Nz(e){ba();const{layer:t,setLayer:n}=Kl(e),{playback:r,playbackTo:i,step:o=0}=(t==null?void 0:t.source)??{},s=ee.min([i,o])??0,l=!!i,c=r==="playing",[d,f]=[0,(i??1)-1];return I.useMemo(()=>{function h(y){n(ko(t,S=>ee.set(S,"source",{...S==null?void 0:S.source,...y})))}const p={start:d,end:f,step:s,canPlay:l&&!c&&s0},g=y=>ee.clamp(s+y,d,f);return{playing:r==="playing",...p,...{play:()=>{h({playback:"playing",step:g(1)})},pause:(y=0)=>{h({playback:"paused",step:g(y)})},stepTo:(y=0)=>h({step:y}),stop:()=>h({step:d,playback:"paused"}),stepForward:()=>h({step:g(1)}),stepBackward:()=>h({step:g(-1)}),tick:(y=1)=>h({playback:"playing",step:g(y)})}}},[f,r,c,l,d,s,n])}function z2e(e,t){let n=!1;return requestAnimationFrame(async()=>{const r=await e();n||t(r)}),()=>{n=!0}}function j2e({children:e,value:t}){const{step:n,tick:r,end:i,playing:o,pause:s}=Nz(t==null?void 0:t.key),l=ba(),[{playbackRate:c=1}]=Lu(),d=F2e(t==null?void 0:t.key),f=I.useCallback((h,p)=>C.jsx(q4,{primary:h,secondary:`Step ${n+p}`}),[n]);return I.useEffect(()=>{if(o){let h=ee.noop;const p=setInterval(()=>{n{for(const g of ee.range(c)){const v=d(n+g);if(v.result||v.error)return{...v,offset:g}}return{result:"",offset:0,error:void 0}},({result:g,offset:v,error:y})=>{y?(l(`${ee.trimEnd(y,".")}`,`${v}`),s()):g?(l(`Breakpoint hit: ${g}`,`${v}`),s(v)):r(c)}):s()},1e3/60);return()=>{h(),clearInterval(p)}}},[f,o,i,n,s,r,l,d,c]),C.jsx(C.Fragment,{children:e})}function U2e({layer:e}){const{playing:t,canPause:n,canPlay:r,canStepBackward:i,canStepForward:o,canStop:s,pause:l,play:c,stepBackward:d,stepForward:f,stop:h}=Nz(e==null?void 0:e.key);return C.jsxs(C.Fragment,{children:[C.jsx(Fm,{label:"step-backward",icon:C.jsx(Bxe,{}),onClick:d,disabled:!i}),C.jsx(Fm,{...t?{label:"pause",icon:C.jsx(Pxe,{}),onClick:()=>l(),disabled:!n}:{label:"play",icon:C.jsx(Mxe,{}),onClick:()=>c(),disabled:!r,color:"primary"}}),C.jsx(Fm,{label:"step-forward",icon:C.jsx(Nxe,{}),onClick:f,disabled:!o}),C.jsx(Fm,{label:"stop",icon:C.jsx($xe,{}),onClick:h,disabled:!s})]})}function mG(e){switch(typeof e){case"number":case"string":return`${e}`;case"undefined":return"null";default:return C.jsx("code",{children:ee.truncate(JSON.stringify(e).replace(` +`;let xZ=class za extends de.Component{constructor(){super(...arguments),this.state={dataRef:this.props.data,data:za.assignInternalProperties(yo(this.props.data)),d3:za.calculateD3Geometry(this.props),isTransitioning:!1,isInitialRenderForDataset:!0,dataKey:this.props.dataKey},this.internalState={targetNode:null,isTransitioning:!1},this.svgInstanceRef=`rd3t-svg-${xN()}`,this.gInstanceRef=`rd3t-g-${xN()}`,this.handleNodeToggle=t=>{const n=yo(this.state.data),i=this.findNodesById(t,n,[])[0];this.props.collapsible&&!this.state.isTransitioning&&(i.__rd3t.collapsed?(za.expandNode(i),this.props.shouldCollapseNeighborNodes&&this.collapseNeighborNodes(i,n)):za.collapseNode(i),this.props.enableLegacyTransitions?(this.setState({data:n,isTransitioning:!0}),setTimeout(()=>this.setState({isTransitioning:!1}),this.props.transitionDuration+10)):this.setState({data:n}),this.internalState.targetNode=i)},this.handleAddChildrenToNode=(t,n)=>{const r=yo(this.state.data),i=this.findNodesById(t,r,[]);if(i.length>0){const o=i[0],s=o.__rd3t.depth,l=yo(n).map(c=>za.assignInternalProperties([c],s+1));o.children.push(...l.flat()),this.setState({data:r})}},this.handleOnNodeClickCb=(t,n)=>{const{onNodeClick:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(yo(t),n))},this.handleOnLinkClickCb=(t,n,r)=>{const{onLinkClick:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(yo(t),yo(n),r))},this.handleOnNodeMouseOverCb=(t,n)=>{const{onNodeMouseOver:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(yo(t),n))},this.handleOnLinkMouseOverCb=(t,n,r)=>{const{onLinkMouseOver:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(yo(t),yo(n),r))},this.handleOnNodeMouseOutCb=(t,n)=>{const{onNodeMouseOut:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(yo(t),n))},this.handleOnLinkMouseOutCb=(t,n,r)=>{const{onLinkMouseOut:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(yo(t),yo(n),r))},this.centerNode=t=>{const{dimensions:n,orientation:r,zoom:i,centeringTransitionDuration:o}=this.props;if(n){const s=Co(`.${this.gInstanceRef}`),l=Co(`.${this.svgInstanceRef}`),c=this.state.d3.scale;let d,f;r==="horizontal"?(f=-t.x*c+n.height/2,d=-t.y*c+n.width/2):(d=-t.x*c+n.width/2,f=-t.y*c+n.height/2),s.transition().duration(o).attr("transform","translate("+d+","+f+")scale("+c+")"),l.call(yN().transform,QE.translate(d,f).scale(i))}},this.getNodeClassName=(t,n)=>{const{rootNodeClassName:r,branchNodeClassName:i,leafNodeClassName:o}=this.props;return t!=null?n.children?i:o:r}}static getDerivedStateFromProps(t,n){let r=null;const i=!t.dataKey||n.dataKey!==t.dataKey;t.data!==n.dataRef&&i&&(r={dataRef:t.data,data:za.assignInternalProperties(yo(t.data)),isInitialRenderForDataset:!0,dataKey:t.dataKey});const o=za.calculateD3Geometry(t);return bx(o,n.d3)||(r=r||{},r.d3=o),r}componentDidMount(){this.bindZoomListener(this.props),this.setState({isInitialRenderForDataset:!1})}componentDidUpdate(t){this.props.data!==t.data&&this.setState({isInitialRenderForDataset:!1}),(!bx(this.props.translate,t.translate)||!bx(this.props.scaleExtent,t.scaleExtent)||this.props.zoomable!==t.zoomable||this.props.draggable!==t.draggable||this.props.zoom!==t.zoom||this.props.enableLegacyTransitions!==t.enableLegacyTransitions)&&this.bindZoomListener(this.props),typeof this.props.onUpdate=="function"&&this.props.onUpdate({node:this.internalState.targetNode?yo(this.internalState.targetNode):null,zoom:this.state.d3.scale,translate:this.state.d3.translate}),this.internalState.targetNode=null}setInitialTreeDepth(t,n){t.forEach(r=>{r.data.__rd3t.collapsed=r.depth>=n})}bindZoomListener(t){const{zoomable:n,scaleExtent:r,translate:i,zoom:o,onUpdate:s,hasInteractiveNodes:l}=t,c=Co(`.${this.svgInstanceRef}`),d=Co(`.${this.gInstanceRef}`);c.call(yN().transform,QE.translate(i.x,i.y).scale(o)),c.call(yN().scaleExtent(n?[r.min,r.max]:[o,o]).filter(f=>l?f.target.classList.contains(this.svgInstanceRef)||f.target.classList.contains(this.gInstanceRef)||f.shiftKey:!0).on("zoom",f=>{!this.props.draggable&&["mousemove","touchmove","dblclick"].includes(f.sourceEvent.type)||(d.attr("transform",f.transform),typeof s=="function"&&(s({node:null,zoom:f.transform.k,translate:{x:f.transform.x,y:f.transform.y}}),this.state.d3.scale=f.transform.k,this.state.d3.translate={x:f.transform.x,y:f.transform.y}))}))}static assignInternalProperties(t,n=0){return(Array.isArray(t)?t:[t]).map(i=>{const o=i;return o.__rd3t={id:null,depth:null,collapsed:!1},o.__rd3t.id=xN(),o.__rd3t.depth=n,o.children&&o.children.length>0&&(o.children=za.assignInternalProperties(o.children,n+1)),o})}findNodesById(t,n,r){return r.length>0||(r=r.concat(n.filter(i=>i.__rd3t.id===t)),n.forEach(i=>{i.children&&i.children.length>0&&(r=this.findNodesById(t,i.children,r))})),r}findNodesAtDepth(t,n,r){return r=r.concat(n.filter(i=>i.__rd3t.depth===t)),n.forEach(i=>{i.children&&i.children.length>0&&(r=this.findNodesAtDepth(t,i.children,r))}),r}static collapseNode(t){t.__rd3t.collapsed=!0,t.children&&t.children.length>0&&t.children.forEach(n=>{za.collapseNode(n)})}static expandNode(t){t.__rd3t.collapsed=!1}collapseNeighborNodes(t,n){this.findNodesAtDepth(t.__rd3t.depth,n,[]).filter(i=>i.__rd3t.id!==t.__rd3t.id).forEach(i=>za.collapseNode(i))}generateTree(){const{initialDepth:t,depthFactor:n,separation:r,nodeSize:i,orientation:o}=this.props,{isInitialRenderForDataset:s}=this.state,c=Cke().nodeSize(o==="horizontal"?[i.y,i.x]:[i.x,i.y]).separation((h,p)=>h.parent.data.__rd3t.id===p.parent.data.__rd3t.id?r.siblings:r.nonSiblings)(_z(this.state.data[0],h=>h.__rd3t.collapsed?null:h.children));let d=c.descendants();const f=c.links();return t!==void 0&&s&&this.setInitialTreeDepth(d,t),n&&d.forEach(h=>{h.y=h.depth*n}),{nodes:d,links:f}}static calculateD3Geometry(t){let n;return t.zoom>t.scaleExtent.max?n=t.scaleExtent.max:t.zoomde.createElement(VPe,{key:"link-"+b,orientation:i,pathFunc:o,pathClassFunc:g,linkData:_,onClick:this.handleOnLinkClickCb,onMouseOver:this.handleOnLinkMouseOverCb,onMouseOut:this.handleOnLinkMouseOutCb,enableLegacyTransitions:h,transitionDuration:s})),t.map((_,b)=>{const{data:x,x:E,y:A,parent:R}=_;return de.createElement(LPe,{key:"node-"+b,data:x,position:{x:E,y:A},hierarchyPointNode:_,parent:R,nodeClassName:this.getNodeClassName(R,x),renderCustomNodeElement:r,nodeSize:l,orientation:i,enableLegacyTransitions:h,transitionDuration:s,onNodeToggle:this.handleNodeToggle,onNodeClick:this.handleOnNodeClickCb,onNodeMouseOver:this.handleOnNodeMouseOverCb,onNodeMouseOut:this.handleOnNodeMouseOutCb,handleAddChildrenToNode:this.handleAddChildrenToNode,subscriptions:S,centerNode:this.centerNode})}))))}};xZ.defaultProps={onNodeClick:void 0,onNodeMouseOver:void 0,onNodeMouseOut:void 0,onLinkClick:void 0,onLinkMouseOver:void 0,onLinkMouseOut:void 0,onUpdate:void 0,orientation:"horizontal",translate:{x:0,y:0},pathFunc:"diagonal",pathClassFunc:void 0,transitionDuration:500,depthFactor:void 0,collapsible:!0,initialDepth:void 0,zoomable:!0,draggable:!0,zoom:1,scaleExtent:{min:.1,max:1},nodeSize:{x:140,y:140},separation:{siblings:1,nonSiblings:2},shouldCollapseNeighborNodes:!1,svgClassName:"",rootNodeClassName:"",branchNodeClassName:"",leafNodeClassName:"",renderCustomNodeElement:void 0,enableLegacyTransitions:!1,hasInteractiveNodes:!1,dimensions:void 0,centeringTransitionDuration:800,dataKey:void 0};const XPe=ee.constant(!0),[Bp,YPe]=nc({layers:[]});function Kl(e,t=XPe){const[n,r]=I.useState(e),[{layers:i},o]=Bp(),s=ee.filter(i,t),l=n?ee.find(s,{key:n}):ee.head(s);return I.useEffect(()=>{r(e)},[e]),I.useEffect(()=>{l&&l.key!==n&&r(l.key)},[l,n,r]),I.useMemo(()=>({key:l==null?void 0:l.key,setKey:r,layer:l,setLayer:c=>{const d={...l,...c};o(({layers:f})=>({layers:ee.map(f,h=>h.key===d.key?d:h)}))},layers:s}),[l,o,s])}function u1(){return u1=Object.assign||function(e){for(var t=1;tawait d2e(e),[e])}function h2e(e,t){const n=I.useMemo(()=>e,t);return f2e(n)}const p2e=C.jsx(tc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),m2e=xZ;function SZ(e,t=!1){const[n,r]=I.useState();return I.useEffect(()=>{t||e&&r(e)},[e,t]),n}const hG={small:{value:0,name:"Current",description:"Show the current node and its parents"},medium:{value:4,name:"Nearby",description:"Show nodes with ≤4 degrees of separation"},infinite:{value:void 0,name:"All",description:"Show all nodes, may impact performance"}};function g2e(){var _,b,x,E,A;const{palette:e}=In(),{key:t,setKey:n,layer:r,setLayer:i,layers:o}=Kl(),s=ZK(((_=r==null?void 0:r.source)==null?void 0:_.step)??0,600),{controls:l,onChange:c,state:d}=Du(),[f,h]=I.useState("small"),p=Zx({"&.rd3t-link":{stroke:_n(e.text.primary,e.action.disabledOpacity)}}),{result:g,loading:v}=h2e({trace:(x=(b=r==null?void 0:r.source)==null?void 0:b.trace)==null?void 0:x.content,step:s,radius:hG[f].value},[s,r,f]),y=SZ(g,v),S=I.useCallback(()=>p,[p]);return C.jsxs(Sn,{onChange:c,stack:d,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{children:(A=(E=r==null?void 0:r.source)==null?void 0:E.trace)!=null&&A.content&&(y!=null&&y.tree)?C.jsx(vk,{children:({width:R,height:k})=>C.jsx(dt,{width:R,height:k,children:C.jsx(m2e,{scaleExtent:{max:10,min:.01},translate:{x:R/2,y:R/2},data:y.tree,dimensions:{width:R,height:k},separation:{siblings:.4,nonSiblings:.4},pathClassFunc:S,renderCustomNodeElement:({nodeDatum:O,onNodeClick:L})=>{var N;return C.jsx(v2e,{node:O,onClick:()=>L==null?void 0:L({}),step:(N=r==null?void 0:r.source)==null?void 0:N.step,onStep:H=>i(Ui(r,W=>{ee.set(W,"source.step",H)}))})}})})}):C.jsx(eg,{icon:C.jsx(VK,{}),label:"Tree"})})})," ",C.jsxs(Sn.Options,{children:[C.jsx(Xo,{icon:C.jsx(tv,{}),label:"Layer",value:t,items:ee.map(o,R=>({id:R.key,name:$o(R)})),onChange:n,showArrow:!0}),p2e,C.jsx(Xo,{icon:C.jsx(zxe,{}),label:"Radius",value:f,onChange:R=>h(R),items:ee.map(ee.entries(hG),([R,k])=>({id:R,...k})),showArrow:!0})]}),C.jsx(Sn.Extras,{children:l})]})}const mb=16,Zc=4;function v2e({onClick:e,node:t,step:n=0,onStep:r}){var f;const{palette:i,spacing:o,shape:s}=In(),l=ee.findLast(t==null?void 0:t.events,h=>h.step<=n),c=!!ee.find(t==null?void 0:t.events,h=>h.step===n),d=Pg((f=l==null?void 0:l.data)==null?void 0:f.type);return C.jsx(Op,{variant:"popover",children:h=>{var p,g;return C.jsxs(C.Fragment,{children:[C.jsx(Kd,{title:`f: ${((p=l==null?void 0:l.data)==null?void 0:p.f)??"unknown"}, g: ${((g=l==null?void 0:l.data)==null?void 0:g.g)??"unknown"}`,children:C.jsxs("g",{onClick:v=>{h.open(v)},children:[C.jsx("clipPath",{id:"clipPath",children:C.jsx("rect",{y:o(-Zc/2),x:o(-.25),strokeWidth:0,width:o(mb),height:o(Zc),rx:s.borderRadius})}),C.jsx("rect",{y:o(-Zc/2),x:o(-.25),strokeWidth:0,fill:i.background.default,width:o(mb),height:o(Zc),clipPath:"url(#clipPath)"}),c&&C.jsx("rect",{y:o(-Zc/2),x:o(-.25),strokeWidth:0,fill:_n(i.primary.main,i.action.selectedOpacity),width:o(mb),height:o(Zc),clipPath:"url(#clipPath)"}),C.jsx("rect",{x:o(-.25),y:o(-Zc/2),height:o(Zc),width:o(.5),fill:d,strokeWidth:0,clipPath:"url(#clipPath)"}),C.jsx("text",{strokeWidth:0,height:o(4),fill:i.text.primary,y:0,fontWeight:500,fontSize:"0.875rem",x:o(2-.25),alignmentBaseline:"central",children:t==null?void 0:t.name}),!!(t!=null&&t.cumulativeChildCount)&&C.jsxs(C.Fragment,{children:[C.jsx("text",{strokeWidth:0,height:o(4),fill:i.text.secondary,y:0,x:o(mb-2.25-1),textAnchor:"end",fontWeight:400,fontSize:"0.875rem",alignmentBaseline:"central",children:t==null?void 0:t.cumulativeChildCount}),C.jsx(bxe,{width:o(2),height:o(2),x:o(mb-2-1),y:o(-Zc/2+1),strokeWidth:0,fill:i.text.primary,opacity:i.action.disabledOpacity})]})]})}),C.jsx(Pp,{anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"},...sw(h),children:C.jsx(ik,{dense:!0,sx:{p:0},children:ee.map(t==null?void 0:t.events,v=>C.jsx(gu,{selected:v.step===n,sx:{borderLeft:`4px solid ${Pg(v.data.type)}`},onClick:()=>{h.close(),e==null||e(),ee.delay(()=>r==null?void 0:r(v.step),150)},children:C.jsx(q4,{primary:ee.startCase(v.data.type),secondary:`Step ${v.step}`})}))})})]})}})}function y2e({selection:e,onClose:t}){const n=b2e(),r=SZ(e),{client:i}=e??{};return C.jsx(Pp,{open:!!e,anchorReference:"anchorPosition",anchorPosition:{top:(i==null?void 0:i.y)??0,left:(i==null?void 0:i.x)??0},onClose:t,keepMounted:!0,children:C.jsx(ik,{dense:!0,sx:{py:0},children:C.jsx(n,{event:r,children:o=>{const s=ee.entries(o);return s.length?ee.chain(s).sortBy(([,l])=>l.index).map(([,{items:l,primary:c}],d)=>C.jsxs(C.Fragment,{children:[!!d&&C.jsx(tc,{sx:{my:1,mx:2}}),c&&C.jsx(Qm,{sx:{py:0},children:C.jsx(zt,{color:"text.secondary",variant:"overline",children:c})}),ee.chain(l).entries().sortBy(([,f])=>f.index).map(([f,{action:h,icon:p,primary:g,secondary:v}])=>h?C.jsxs(gu,{onClick:()=>{h(),t==null||t()},children:[p&&C.jsx(Ul,{children:p}),C.jsx(sl,{primary:g,sx:{mr:4}}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:v})]},f):C.jsxs(Qm,{children:[p&&C.jsx(Ul,{children:p}),C.jsx(sl,{primary:g,sx:{mr:4}}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:v})]},f)).value()]})).value():C.jsx(C.Fragment,{children:C.jsx(Qm,{children:C.jsx(zt,{children:"No info to show."})})})}})})})}const pG=({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e({})});function b2e(){const[{layers:e}]=Bp();return I.useMemo(()=>ee.chain(e).reduce((t,n)=>{var i;const r=((i=GZ(n))==null?void 0:i.getSelectionInfo)??pG;return({children:o,event:s})=>C.jsx(r,{layer:n.key,event:s,children:l=>C.jsx(t,{event:s,children:c=>o==null?void 0:o(ee.merge(l,c))})})},pG).value(),[e])}const[Tk,x2e]=nc([],{reduce:eQ}),w2e={tileSubdivision:1,workerCount:8,tileResolution:{width:ee.round(256*devicePixelRatio),height:ee.round(256*devicePixelRatio)}},EZ=I.createContext({});function _2e(){return I.useContext(EZ)}function S2e(e,{width:t,height:n}={}){const r=In(),[i]=Tk(),o=I.useRef(null),[s,l]=I.useState(""),[c,d]=I.useState();return I.useEffect(()=>{if(l(""),o.current&&t&&n&&e){const f=ee.find(i,h=>h.renderer.meta.id===e);if(f){const h=new f.renderer.constructor;return h.setup({...w2e,screenSize:{width:t,height:n},backgroundColor:r.palette.background.paper,accentColor:r.palette.primary.main}),o.current.append(h.getView()),d(h),()=>{var p,g;try{(g=(p=o.current)==null?void 0:p.removeChild)==null||g.call(p,h.getView()),d(void 0)}catch(v){console.warn(v)}finally{h.destroy()}}}}},[o.current,ee.map,e,i,r,l,d]),l1e(()=>{c&&t&&n&&c.setOptions({screenSize:{width:t,height:n}})},r.transitions.duration.standard,[c,t,n]),{instance:c,ref:o,error:s}}function E2e(){const[{map:e,specimen:t}]=yk();return!!(e||t)&&C.jsx(q1,{sx:{position:"absolute",top:n=>n.spacing(6+2),right:n=>n.spacing(2)}})}function C2e({width:e,height:t,renderer:n,rendererRef:r,layers:i}){const{instance:o,error:s,ref:l}=S2e(n,{width:e,height:t}),[c,d]=I.useState();I.useEffect(()=>{if(o){const h=(p,g)=>{const v=p;d({client:{x:v.clientX,y:v.clientY},world:g.world,info:{point:g.world,components:g.components}})};return o.on("click",h),()=>void o.off("click",h)}},[o]);const f=I.useMemo(()=>({renderer:o}),[o]);return I.useEffect(()=>r==null?void 0:r(o),[o,r]),C.jsxs(C.Fragment,{children:[C.jsx(E2e,{}),C.jsx(EZ.Provider,{value:f,children:i!=null&&i.length?s?C.jsxs(dt,{sx:{display:"flex",flexDirection:"column",width:e,height:t,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[C.jsx(gxe,{sx:{mb:2},fontSize:"large"}),s]}):C.jsx(C.Fragment,{children:C.jsx(dt,{ref:l,children:i.map((h,p)=>C.jsx(aDe,{index:p,layer:h},h.key))})}):C.jsx(eg,{icon:C.jsx(QK,{}),label:"No layers to render",width:e,height:t})}),C.jsx(y2e,{selection:c,onClose:()=>d(void 0)})]})}function d1({nodes:e}){const{renderer:t}=_2e();return I.useEffect(()=>{if(t&&(e!=null&&e.length))return t.add(e.flat())},[t,e]),C.jsx(C.Fragment,{})}function T2e({nodes:e,step:t}){const r=ee.floor((t??0)/200)*200,i=I.useMemo(()=>ee.slice(e,0,r),[e,r]),o=I.useMemo(()=>ee.slice(e,r,(t??0)+1),[e,r,t]);return C.jsxs(C.Fragment,{children:[!!r&&C.jsx(d1,{nodes:i}),C.jsx(d1,{nodes:o})]})}const CZ=(e,t,n)=>{const r=I.useRef(n||[]),o=r.current===n||!r.current.every((l,c)=>l===n[c]);r.current=n;const s=t.map(()=>null);return I.useEffect(o?()=>void e():()=>{},o?t:s)};function k2e(e,t){return ee.zip(e,t).every(([n,r])=>n===r)}const A2e=(e,t=[],n=[])=>{const[r,i]=I.useState(t),[o,s]=I.useState(n);return I.useEffect(()=>{k2e(o,n)||(i(t),s(n))},[t,n,o]),_Z(e,[...r,...o])};function Lz(){const[e]=Ig();return I.useCallback(t=>ee.find(e,t),[e])}function R2e(e){return Lz()({url:e})}function I2e(e){const t=ba(),n=Jd("map"),r=Lz(),i=I.useMemo(()=>Nu(async({source:c,id:d}={})=>{if(c&&d){const f=r({url:c});if(f){t("Fetching map...");const h=await f.call("features/map",{id:d});return h==null?void 0:h.content}}},{normalizer:JSON.stringify}),[r,t]),{content:o,source:s,id:l}=e??{};return lv(()=>n(async()=>{if(l)return{...e,content:o||await i({source:s,id:l})}}),[i,o,s,l])}function P2e(e){const t=ba(),n=In(),r=Jd("map"),{format:i,content:o}=e??{};return lv(()=>r(async()=>{var l,c;const s=n.palette.mode==="dark"?Yg:Xg;if(i&&o){t("Processing map...");const d=await((c=(l=xz(i))==null?void 0:l.parse)==null?void 0:c.call(l,o,{color:s(n.palette.background.paper,1-n.palette.action.hoverOpacity)}))??{nodes:[]};return t("Map loaded",`${d.nodes.length} elements, ${d.log.join(", ")}`),d}}),[i,o,n])}const O2e={key:"map",inferName:e=>{var t;return(t=e==null?void 0:e.source)!=null&&t.map?`${e.source.map.name} (${ee.startCase(e.source.map.format)})`:"Untitled Map"},editor:Rg(({value:e,produce:t})=>{var n;return C.jsx(C.Fragment,{children:C.jsx(i1,{label:"Source",content:C.jsx(RTe,{value:(n=e==null?void 0:e.source)==null?void 0:n.map,onChange:r=>t(i=>ee.set(i,"source.map",r))})})})}),renderer:({layer:e,index:t})=>{var i;const{nodes:n}=((i=e==null?void 0:e.source)==null?void 0:i.parsedMap)??{},r=I.useMemo(()=>[ee.map(n,o=>({...o,meta:{...o.meta,sourceLayerIndex:t,sourceLayerAlpha:1-.01*+((e==null?void 0:e.transparency)??0),sourceLayerDisplayMode:(e==null?void 0:e.displayMode)??"source-over"}}))],[n,t,e==null?void 0:e.transparency,e==null?void 0:e.displayMode]);return C.jsx(d1,{nodes:r})},steps:({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e([])}),service:Rg(({value:e,produce:t})=>{var i;const{result:n}=I2e((i=e==null?void 0:e.source)==null?void 0:i.map),{result:r}=P2e(n);return CZ(()=>void t(o=>ee.set(o,"source.parsedMap",r)),[r,t],[r]),C.jsx(C.Fragment,{})}),getSelectionInfo:({children:e,event:t,layer:n})=>{const{layer:r,setLayer:i,layers:o}=Kl(n),{parsedMap:s}=(r==null?void 0:r.source)??{},{point:l,node:c}=I.useMemo(()=>{var f,h,p,g;if(s&&t){const v=(g=(p=xz((h=(f=r==null?void 0:r.source)==null?void 0:f.map)==null?void 0:h.format))==null?void 0:p.hydrate)==null?void 0:g.call(p,s);if(v){const y=(t==null?void 0:t.world)&&v.snap(t.world);if(y){const S=(t==null?void 0:t.world)&&v.nodeAt(y);return{point:y,node:S}}}}return{}},[s,t]),d=I.useMemo(()=>({...r&&l&&!ee.isUndefined(c)&&{[r.key]:{primary:$o(r),items:{point:{primary:"Point",secondary:`(${ee.round(l.x,2)}, ${ee.round(l.y,2)})`}}}}}),[l,c,r,o,i]);return C.jsx(C.Fragment,{children:e==null?void 0:e(d)})}};var _N=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,xo,LS,M2e={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},Vu;function SN(e){return _N.lastIndex=0,_N.test(e)?'"'+e.replace(_N,function(t){var n=M2e[t];return typeof n=="string"?n:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function NS(e,t,n){var r,i,o,s,l=xo,c,d=t[e];switch(d&&typeof d=="object"&&typeof d.toJSON=="function"&&(d=d.toJSON(e)),typeof Vu=="function"&&(d=Vu.call(t,e,d)),typeof d){case"string":return SN(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(xo+=LS,c=[],Object.prototype.toString.apply(d)==="[object Array]"){for(s=d.length,r=0;rn?`[ +`+xo+c.join(`, +`+xo)+` +`+l+"]":"[ "+c.join(", ")+" ]":"["+c.join(",")+"]",xo=l,o}if(Vu&&typeof Vu=="object")for(s=Vu.length,r=0;rn?`{ +`+xo+c.join(`, +`+xo)+` +`+l+"}":"{ "+c.join(", ")+" }":"{"+c.join(",")+"}",xo=l,o}}function D2e(e,t,n,r){var i;if(xo="",LS="",r||(r=0),typeof r!="number")throw new Error("beaufifier: limit must be a number");if(typeof n=="number")for(i=0;inew Function("params",`${e}; return ${t}.apply(null, params);`));function $2e(e,t,n){try{return B2e(e,t)(n)}catch{return cJ[t].defaultReturnValue}}function F2e(e){const{layer:t}=Kl(e),{monotonicF:n,monotonicG:r,breakpoints:i,code:o,trace:s}=(t==null?void 0:t.source)??{};return I.useMemo(()=>{var c;const l=ee.keyBy((c=s==null?void 0:s.content)==null?void 0:c.events,"id");return Nu(d=>{var h,p,g,v;const f=(p=(h=s==null?void 0:s.content)==null?void 0:h.events)==null?void 0:p[d];if(f)try{if(d){for(const y of[n&&"f",r&&"g"])if(y&&ee.get(l[`${f.pId}`],y)>ee.get(f,y))return{result:`Monotonicity violation on ${y}`}}for(const{active:y,condition:S,type:_,property:b="",reference:x=0}of i??[]){const E=!_||_===f.type,A=(g=S==null?void 0:S.apply)==null?void 0:g.call(S,ee.get(f,b),x);if(y&&E&&A)return{result:`${b} ${ee.toLower(ee.startCase(S==null?void 0:S.key))} ${x}`}}if($2e(o??"","shouldBreak",[d,f,((v=s==null?void 0:s.content)==null?void 0:v.events)??[]]))return{result:"Script editor"}}catch(y){return{error:`${y}`}}return{result:""}})},[o,s==null?void 0:s.content,i,n,r])}function Nz(e){ba();const{layer:t,setLayer:n}=Kl(e),{playback:r,playbackTo:i,step:o=0}=(t==null?void 0:t.source)??{},s=ee.min([i,o])??0,l=!!i,c=r==="playing",[d,f]=[0,(i??1)-1];return I.useMemo(()=>{function h(y){n(Ui(t,S=>ee.set(S,"source",{...S==null?void 0:S.source,...y})))}const p={start:d,end:f,step:s,canPlay:l&&!c&&s0},g=y=>ee.clamp(s+y,d,f);return{playing:r==="playing",...p,...{play:()=>{h({playback:"playing",step:g(1)})},pause:(y=0)=>{h({playback:"paused",step:g(y)})},stepTo:(y=0)=>h({step:y}),stop:()=>h({step:d,playback:"paused"}),stepForward:()=>h({step:g(1)}),stepBackward:()=>h({step:g(-1)}),tick:(y=1)=>h({playback:"playing",step:g(y)})}}},[f,r,c,l,d,s,n])}function z2e(e,t){let n=!1;return requestAnimationFrame(async()=>{const r=await e();n||t(r)}),()=>{n=!0}}function j2e({children:e,value:t}){const{step:n,tick:r,end:i,playing:o,pause:s}=Nz(t==null?void 0:t.key),l=ba(),[{playbackRate:c=1}]=Lu(),d=F2e(t==null?void 0:t.key),f=I.useCallback((h,p)=>C.jsx(q4,{primary:h,secondary:`Step ${n+p}`}),[n]);return I.useEffect(()=>{if(o){let h=ee.noop;const p=setInterval(()=>{n{for(const g of ee.range(c)){const v=d(n+g);if(v.result||v.error)return{...v,offset:g}}return{result:"",offset:0,error:void 0}},({result:g,offset:v,error:y})=>{y?(l(`${ee.trimEnd(y,".")}`,`${v}`),s()):g?(l(`Breakpoint hit: ${g}`,`${v}`),s(v)):r(c)}):s()},1e3/60);return()=>{h(),clearInterval(p)}}},[f,o,i,n,s,r,l,d,c]),C.jsx(C.Fragment,{children:e})}function U2e({layer:e}){const{playing:t,canPause:n,canPlay:r,canStepBackward:i,canStepForward:o,canStop:s,pause:l,play:c,stepBackward:d,stepForward:f,stop:h}=Nz(e==null?void 0:e.key);return C.jsxs(C.Fragment,{children:[C.jsx(Fm,{label:"step-backward",icon:C.jsx(Bxe,{}),onClick:d,disabled:!i}),C.jsx(Fm,{...t?{label:"pause",icon:C.jsx(Pxe,{}),onClick:()=>l(),disabled:!n}:{label:"play",icon:C.jsx(Mxe,{}),onClick:()=>c(),disabled:!r,color:"primary"}}),C.jsx(Fm,{label:"step-forward",icon:C.jsx(Nxe,{}),onClick:f,disabled:!o}),C.jsx(Fm,{label:"stop",icon:C.jsx($xe,{}),onClick:h,disabled:!s})]})}function mG(e){switch(typeof e){case"number":case"string":return`${e}`;case"undefined":return"null";default:return C.jsx("code",{children:ee.truncate(JSON.stringify(e).replace(` `,", "),{length:30})})}}function gG({label:e,value:t,type:n}){return C.jsxs(bn,{width:"auto",mr:3,mb:.5,children:[C.jsx(zt,{component:"div",variant:"body2",...n,sx:{opacity:.54,...n==null?void 0:n.sx},children:e}),C.jsx(Kr,{}),C.jsx(zt,{component:"div",variant:"body2",...n,children:mG(t)??"none"})]},`${e}::${mG(t)}`)}function ZE({event:e,variant:t="body2",max:n=10,...r}){const i=ee.filter(ee.entries(e),([,o])=>o!==void 0);return C.jsxs(bn,{...r,children:[ee.map(ee.slice(i,0,n),([o,s],l)=>C.jsx(gG,{label:o,value:s,type:{variant:t}},l)),i.length>n&&C.jsx(gG,{label:`${i.length-n} more`,type:{sx:{pt:1}},value:""})]})}var kZ={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Nt,function(){return function(n){function r(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return n[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var i={};return r.m=n,r.c=i,r.d=function(o,s,l){r.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:l})},r.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(s,"a",s),s},r.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},r.p="",r(r.s=1)}([function(n,r,i){function o(l){var c=l===void 0?{}:l,d=c.ESCAPE,f=d===void 0?/^\\/:d,h=c.VARIABLE_START,p=h===void 0?/^\${\s*/:h,g=c.VARIABLE_END,v=g===void 0?/^\s*}/:g,y=c.PIPE_START,S=y===void 0?/^\s*\|\s*/:y,_=c.PIPE_PARAMETER_START,b=_===void 0?/^\s*:\s*/:_,x=c.QUOTED_STRING,E=x===void 0?r.DEFAULT_QUOTED_STRING_REGEX:x,A=c.QUOTED_STRING_TEST,R=A===void 0?null:A,k=c.QUOTED_STRING_GET_AND_ADVANCE,O=k===void 0?null:k,L=c.QUOTED_STRING_IN_PARAMETER_TEST,N=L===void 0?null:L,H=c.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,W=H===void 0?null:H,z=R||function(V){return E.test(V)},D=O||s(E),F=N||function(V){return E.test(V)},j=W||s(E);return function(V){function G(Ie){Ie===void 0&&(Ie=1),pe=pe.substr(Ie)}function K(Ie){Ie===void 0&&(Ie=/^/),G(pe.match(Ie)[0].length)}function Y(){var Ie;return K(f),Ie=pe.length>0?pe[0]:"",G(),Ie}function J(Ie){var ze=(Ie===void 0?{}:Ie).isNull,it=ze!==void 0&&ze;me={name:"",pipes:[]},qe=!it}function ie(){ve.variables.push(me),J({isNull:!0})}function ce(Ie){var ze=(Ie===void 0?{}:Ie).isNull,it=ze!==void 0&&ze;be={name:"",parameters:[]},at=!it}function ue(){me.pipes.push(be),ce({isNull:!0})}function se(Ie){var ze=(Ie===void 0?{}:Ie).isNull,it=ze!==void 0&&ze;Qe="",Lt=!it}function Q(){be.parameters.push(Qe),se({isNull:!0})}function ae(){return!!v.test(pe)&&(K(v),ye>=3&&Q(),ye>=2&&ue(),ye>=1&&ie(),ye=0,!0)}function le(){return!!S.test(pe)&&(K(S),ye>=3&&Q(),ye>=2&&ue(),ye>=1&&ce(),ye=2,!0)}function he(){return!!b.test(pe)&&(K(b),ye>=3&&Q(),ye>=2&&se(),ye=3,!0)}for(var pe=V,ve={literals:[],variables:[]},ye=0,xe="",me={name:"",pipes:[]},be={name:"",parameters:[]},Qe="",qe=!1,at=!1,Lt=!1;pe&&pe.length>0;)switch(ye){case 0:if(f.test(pe)){xe+=Y();continue}if(p.test(pe)){ye=1,J(),ve.literals.push(xe),xe="",K(p);continue}xe+=pe[0],G();break;case 1:if(f.test(pe)){me.name+=Y();continue}if(ae()||le())continue;if(z(pe)){me.name+=D(pe,G);continue}me.name+=pe[0],G();break;case 2:if(f.test(pe)){be.name+=Y();continue}if(ae()||he()||le())continue;if(z(pe)){be.name+=D(pe,G);continue}be.name+=pe[0],G();break;case 3:if(f.test(pe)){Qe+=Y();continue}if(ae()||he()||le())continue;if(F(pe)){Qe+=j(pe,G);continue}Qe+=pe[0],G()}return Lt&&be.parameters.push(Qe),at&&me.pipes.push(be),qe&&ve.variables.push(me),ve.literals.push(xe),ve}}function s(l){return function(c,d){var f=c.match(l);return d(f[0].length),f.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,r.parseStringTemplateGenerator=o,r.parseStringTemplate=o(),r.getQuotedStringAndAdvanceForRegex=s},function(n,r,i){n.exports=i(2)},function(n,r,i){function o(s){for(var l in s)r.hasOwnProperty(l)||(r[l]=s[l])}Object.defineProperty(r,"__esModule",{value:!0}),o(i(0)),o(i(3))},function(n,r,i){function o(f){return function(h){return f.hasOwnProperty(h)?f[h]:h.split(".").reduce(function(p,g){return p.hasOwnProperty(g)?p[g]:""},f)}}function s(f,h,p,g){g===void 0&&(g=o(h));var v=g(f.name);return f.pipes.reduce(function(y,S){return p.hasOwnProperty(S.name)?p[S.name](y,S.parameters):y},v??"")}function l(f,h,p,g){return g===void 0&&(g=o(h)),f.literals.length===0?"":f.literals.slice(1).reduce(function(v,y,S){return""+v+s(f.variables[S],h,p,g)+y},f.literals[0])}function c(f,h,p){return l(d.parseStringTemplate(f),h,p)}Object.defineProperty(r,"__esModule",{value:!0});var d=i(0);r.evaluateParsedString=l,r.evaluateStringTemplate=c}])})})(kZ);var AZ=kZ.exports;function H2e(e={},t){const n={};for(const r of Object.keys(e))n[r]=r==="$"?e[r]:t(e[r],r,e);return Object.setPrototypeOf(n,e)}function YF(e){switch(e==null?void 0:e.constructor){case Array:{const t=ee.map(e,YF);return n=>ee.map(t,r=>r(n))}case Object:{const t=ee.mapValues(e,YF);return n=>ee.mapValues(t,r=>r(n))}case String:return KF(e);default:return()=>e}}function W2e(e={}){return H2e(e,t=>ee.isFunction(t)?t:YF(t))}const vG=e=>{const t=Function("$",`return ${e};`);return n=>t(new Proxy(W2e(n),{get(r,i){return typeof(r==null?void 0:r[i])=="function"?r[i]({}):r==null?void 0:r[i]}}))},G2e=/^\{\{\s*/,V2e=/^\s*\}\}/,EN=/\b\B/,q2e=AZ.parseStringTemplateGenerator({VARIABLE_START:G2e,VARIABLE_END:V2e,PIPE_START:EN,PIPE_PARAMETER_START:EN,QUOTED_STRING:EN}),KF=Nu(e=>{const t=q2e(e);return ee.join(t.literals,"")?n=>AZ.evaluateParsedString(t,{},{},r=>vG(r)(n)):vG(t.variables[0].name)},{primitive:!0});function X2e(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var RZ={exports:{}};(function(e,t){(function(n,r){typeof X2e=="function"?e.exports=r():n.pluralize=r()})(Nt,function(){var n=[],r=[],i={},o={},s={};function l(y){return typeof y=="string"?new RegExp("^"+y+"$","i"):y}function c(y,S){return y===S?S:y===y.toLowerCase()?S.toLowerCase():y===y.toUpperCase()?S.toUpperCase():y[0]===y[0].toUpperCase()?S.charAt(0).toUpperCase()+S.substr(1).toLowerCase():S.toLowerCase()}function d(y,S){return y.replace(/\$(\d{1,2})/g,function(_,b){return S[b]||""})}function f(y,S){return y.replace(S[0],function(_,b){var x=d(S[1],arguments);return c(_===""?y[b-1]:_,x)})}function h(y,S,_){if(!y.length||i.hasOwnProperty(y))return S;for(var b=_.length;b--;){var x=_[b];if(x[0].test(S))return f(S,x)}return S}function p(y,S,_){return function(b){var x=b.toLowerCase();return S.hasOwnProperty(x)?c(b,x):y.hasOwnProperty(x)?c(b,y[x]):h(x,b,_)}}function g(y,S,_,b){return function(x){var E=x.toLowerCase();return S.hasOwnProperty(E)?!0:y.hasOwnProperty(E)?!1:h(E,E,_)===E}}function v(y,S,_){var b=S===1?v.singular(y):v.plural(y);return(_?S+" ":"")+b}return v.plural=p(s,o,n),v.isPlural=g(s,o,n),v.singular=p(o,s,r),v.isSingular=g(o,s,r),v.addPluralRule=function(y,S){n.push([l(y),S])},v.addSingularRule=function(y,S){r.push([l(y),S])},v.addUncountableRule=function(y){if(typeof y=="string"){i[y.toLowerCase()]=!0;return}v.addPluralRule(y,"$0"),v.addSingularRule(y,"$0")},v.addIrregularRule=function(y,S){S=S.toLowerCase(),y=y.toLowerCase(),s[y]=S,o[S]=y},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(y){return v.addIrregularRule(y[0],y[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(y){return v.addPluralRule(y[0],y[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(y){return v.addSingularRule(y[0],y[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(v.addUncountableRule),v})})(RZ);var Y2e=RZ.exports;const K2e=js(Y2e),Q2e=""+new URL("parseTrace.worker-413a1f44.js",import.meta.url).href;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function IZ(e){return typeof e>"u"||e===null}function J2e(e){return typeof e=="object"&&e!==null}function Z2e(e){return Array.isArray(e)?e:IZ(e)?[]:[e]}function eOe(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;n=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),DOe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function LOe(e){return!(e===null||!DOe.test(e)||e[e.length-1]==="_")}function NOe(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var BOe=/^[-+]?[0-9]+e/;function $Oe(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if($p.isNegativeZero(e))return"-0.0";return n=e.toString(10),BOe.test(n)?n.replace("e",".e"):n}function FOe(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||$p.isNegativeZero(e))}var zOe=new eo("tag:yaml.org,2002:float",{kind:"scalar",resolve:LOe,construct:NOe,predicate:FOe,represent:$Oe,defaultStyle:"lowercase"}),jOe=yOe.extend({implicit:[_Oe,TOe,MOe,zOe]}),UOe=jOe,OZ=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),MZ=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function HOe(e){return e===null?!1:OZ.exec(e)!==null||MZ.exec(e)!==null}function WOe(e){var t,n,r,i,o,s,l,c=0,d=null,f,h,p;if(t=OZ.exec(e),t===null&&(t=MZ.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],l=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(f=+t[10],h=+(t[11]||0),d=(f*60+h)*6e4,t[9]==="-"&&(d=-d)),p=new Date(Date.UTC(n,r,i,o,s,l,c)),d&&p.setTime(p.getTime()-d),p}function GOe(e){return e.toISOString()}var VOe=new eo("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:HOe,construct:WOe,instanceOf:Date,represent:GOe});function qOe(e){return e==="<<"||e===null}var XOe=new eo("tag:yaml.org,2002:merge",{kind:"scalar",resolve:qOe}),Bz=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function YOe(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=Bz;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8===0}function KOe(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=Bz,s=0,l=[];for(t=0;t>16&255),l.push(s>>8&255),l.push(s&255)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)):n===18?(l.push(s>>10&255),l.push(s>>2&255)):n===12&&l.push(s>>4&255),new Uint8Array(l)}function QOe(e){var t="",n=0,r,i,o=e.length,s=Bz;for(r=0;r>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function JOe(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var ZOe=new eo("tag:yaml.org,2002:binary",{kind:"scalar",resolve:YOe,construct:KOe,predicate:JOe,represent:QOe}),eMe=Object.prototype.hasOwnProperty,tMe=Object.prototype.toString;function nMe(e){if(e===null)return!0;var t=[],n,r,i,o,s,l=e;for(n=0,r=l.length;n=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),DOe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function LOe(e){return!(e===null||!DOe.test(e)||e[e.length-1]==="_")}function NOe(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var BOe=/^[-+]?[0-9]+e/;function $Oe(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if($p.isNegativeZero(e))return"-0.0";return n=e.toString(10),BOe.test(n)?n.replace("e",".e"):n}function FOe(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||$p.isNegativeZero(e))}var zOe=new to("tag:yaml.org,2002:float",{kind:"scalar",resolve:LOe,construct:NOe,predicate:FOe,represent:$Oe,defaultStyle:"lowercase"}),jOe=yOe.extend({implicit:[_Oe,TOe,MOe,zOe]}),UOe=jOe,OZ=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),MZ=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function HOe(e){return e===null?!1:OZ.exec(e)!==null||MZ.exec(e)!==null}function WOe(e){var t,n,r,i,o,s,l,c=0,d=null,f,h,p;if(t=OZ.exec(e),t===null&&(t=MZ.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],l=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(f=+t[10],h=+(t[11]||0),d=(f*60+h)*6e4,t[9]==="-"&&(d=-d)),p=new Date(Date.UTC(n,r,i,o,s,l,c)),d&&p.setTime(p.getTime()-d),p}function GOe(e){return e.toISOString()}var VOe=new to("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:HOe,construct:WOe,instanceOf:Date,represent:GOe});function qOe(e){return e==="<<"||e===null}var XOe=new to("tag:yaml.org,2002:merge",{kind:"scalar",resolve:qOe}),Bz=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function YOe(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=Bz;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8===0}function KOe(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=Bz,s=0,l=[];for(t=0;t>16&255),l.push(s>>8&255),l.push(s&255)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)):n===18?(l.push(s>>10&255),l.push(s>>2&255)):n===12&&l.push(s>>4&255),new Uint8Array(l)}function QOe(e){var t="",n=0,r,i,o=e.length,s=Bz;for(r=0;r>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function JOe(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var ZOe=new to("tag:yaml.org,2002:binary",{kind:"scalar",resolve:YOe,construct:KOe,predicate:JOe,represent:QOe}),eMe=Object.prototype.hasOwnProperty,tMe=Object.prototype.toString;function nMe(e){if(e===null)return!0;var t=[],n,r,i,o,s,l=e;for(n=0,r=l.length;n=55296&&n<=56319&&t+1=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function jZ(e){var t=/^\n* /;return t.test(e)}var UZ=1,e3=2,HZ=3,WZ=4,um=5;function jMe(e,t,n,r,i,o,s,l){var c,d=0,f=null,h=!1,p=!1,g=r!==-1,v=-1,y=FMe(Hb(e,0))&&zMe(Hb(e,e.length-1));if(t||s)for(c=0;c=65536?c+=2:c++){if(d=Hb(e,c),!m1(d))return um;y=y&&_G(d,f,l),f=d}else{for(c=0;c=65536?c+=2:c++){if(d=Hb(e,c),d===h1)h=!0,g&&(p=p||c-v-1>r&&e[v+1]!==" ",v=c);else if(!m1(d))return um;y=y&&_G(d,f,l),f=d}p=p||g&&c-v-1>r&&e[v+1]!==" "}return!h&&!p?y&&!s&&!i(e)?UZ:o===p1?um:e3:n>9&&jZ(e)?um:s?o===p1?um:e3:p?WZ:HZ}function UMe(e,t,n,r,i){e.dump=function(){if(t.length===0)return e.quotingType===p1?'""':"''";if(!e.noCompatMode&&(OMe.indexOf(t)!==-1||MMe.test(t)))return e.quotingType===p1?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),l=r||e.flowLevel>-1&&n>=e.flowLevel;function c(d){return $Me(e,d)}switch(jMe(t,l,e.indent,s,c,e.quotingType,e.forceQuotes&&!r,i)){case UZ:return t;case e3:return"'"+t.replace(/'/g,"''")+"'";case HZ:return"|"+SG(t,e.indent)+EG(xG(t,o));case WZ:return">"+SG(t,e.indent)+EG(xG(HMe(t,s),o));case um:return'"'+WMe(t)+'"';default:throw new ta("impossible error: invalid scalar style")}}()}function SG(e,t){var n=jZ(e)?String(t):"",r=e[e.length-1]===` @@ -524,8 +524,8 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat `:"")+CG(c,t),i=o}return r}function CG(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,s=0,l=0,c="";r=n.exec(e);)l=r.index,l-i>t&&(o=s>i?s:l,c+=` `+e.slice(i,o),i=o+1),s=l;return c+=` `,e.length-i>t&&s>i?c+=e.slice(i,s)+` -`+e.slice(s+1):c+=e.slice(i),c.slice(1)}function WMe(e){for(var t="",n=0,r,i=0;i=65536?i+=2:i++)n=Hb(e,i),r=io[n],!r&&m1(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||LMe(n);return t}function GMe(e,t,n){var r="",i=e.tag,o,s,l;for(o=0,s=n.length;o"u"&&ku(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function TG(e,t,n,r){var i="",o=e.tag,s,l,c;for(s=0,l=n.length;s"u"&&ku(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=ZF(e,t)),e.dump&&h1===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function VMe(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,l,c,d,f;for(s=0,l=o.length;s1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ku(e,t,d,!1,!1)&&(f+=e.dump,r+=f));e.tag=i,e.dump="{"+r+"}"}function qMe(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),l,c,d,f,h,p;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new ta("sortKeys must be a boolean or a function");for(l=0,c=s.length;l1024,h&&(e.dump&&h1===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,h&&(p+=ZF(e,t)),ku(e,t+1,f,!0,h)&&(e.dump&&h1===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=o,e.dump=i||"{}"}function kG(e,t,n){var r,i,o,s,l,c;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o tag resolver accepts not "'+c+'" style');e.dump=r}return!0}return!1}function ku(e,t,n,r,i,o,s){e.tag=null,e.dump=n,kG(e,n,!1)||kG(e,n,!0);var l=DZ.call(e.dump),c=r,d;r&&(r=e.flowLevel<0||e.flowLevel>t);var f=l==="[object Object]"||l==="[object Array]",h,p;if(f&&(h=e.duplicates.indexOf(n),p=h!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(i=!1),p&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(f&&p&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),l==="[object Object]")r&&Object.keys(e.dump).length!==0?(qMe(e,t,e.dump,i),p&&(e.dump="&ref_"+h+e.dump)):(VMe(e,t,e.dump),p&&(e.dump="&ref_"+h+" "+e.dump));else if(l==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?TG(e,t-1,e.dump,i):TG(e,t,e.dump,i),p&&(e.dump="&ref_"+h+e.dump)):(GMe(e,t,e.dump),p&&(e.dump="&ref_"+h+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&UMe(e,e.dump,t,o,c);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ta("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function XMe(e,t){var n=[],r=[],i,o;for(t3(e,n,r),i=0,o=r.length;in(async()=>{var r;if(e!=null&&e.trace){t("Processing trace...");try{const i=await eDe(e);return t("Trace loaded",K2e("step",((r=i==null?void 0:i.stepsPersistent)==null?void 0:r.length)??0,!0)),i}catch(i){console.error(i),t("Error parsing",`${JMe(i)}`)}}}),[e])}const nDe=e=>e==null;function rDe(e){const t=[],n={},r={},i=ee.chain(e==null?void 0:e.events).map((l,c)=>({step:c,id:l.id,pId:l.pId})).groupBy("id").value();ee.forEach(e==null?void 0:e.events,({id:l,pId:c},d)=>{!nDe(c)&&n[l]!==c&&(t.push({id:l,pId:c,step:d,prev:ee.last(t)}),n[l]=c),r[d]=ee.last(t)});const o=(l,c=(d=>(d=e==null?void 0:e.events)==null?void 0:d.length)()??0)=>{let f=r[c];for(;f;){if(f.id===l)return f.pId;f=f.prev}};return{getParent:o,getPath:l=>{const c=[l];let d={...(e.events??[])[l],step:l};for(;d;){const f=o(d.id,d.step);if(f){const h=ee.findLast(i[f],p=>p.step<=d.step);if(h)c.push(h.step),d=h;else break}else break}return c}}}const BS={key:"trace",inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Trace"},editor:Rg(({value:e,produce:t})=>{var n,r,i,o;return C.jsxs(C.Fragment,{children:[C.jsx(i1,{label:"Trace",content:C.jsx(ITe,{onChange:s=>t(l=>ee.set(l,"source.trace",{...s,key:Do()})),value:(n=e==null?void 0:e.source)==null?void 0:n.trace})}),C.jsx(i1,{label:"Onion Skinning",content:C.jsx(Xo,{disabled:!0,showArrow:!0,value:((r=e==null?void 0:e.source)==null?void 0:r.onion)??"off",items:["off","transparent","solid"].map(s=>({id:s,name:ee.startCase(s)})),onChange:s=>t(l=>ee.set(l,"source.onion",s))})}),C.jsx(MJ,{label:"Preview"}),C.jsx(dt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(TZ,{trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content})})]})}),service:Rg(({value:e,produce:t})=>{var i,o,s,l,c,d,f,h;const{palette:n}=In(),r=tDe({trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content,context:{color:wz,themeAccent:n.primary.main,themeTextPrimary:n.text.primary,themeBackground:n.background.paper},view:"main"});return I.useEffect(()=>{t(p=>{var g,v,y,S;return ee.set(p,"source.playbackTo",((S=(y=(v=(g=e==null?void 0:e.source)==null?void 0:g.trace)==null?void 0:v.content)==null?void 0:y.events)==null?void 0:S.length)??0)})},[(d=(c=(l=(s=e==null?void 0:e.source)==null?void 0:s.trace)==null?void 0:l.content)==null?void 0:c.events)==null?void 0:d.length]),CZ(async()=>{const p=await r();t(g=>ee.set(g,"source.parsedTrace",p))},[r],[(h=(f=e==null?void 0:e.source)==null?void 0:f.trace)==null?void 0:h.key]),C.jsx(C.Fragment,{children:C.jsx(j2e,{value:e})})}),renderer:({layer:e})=>{var l,c;const t=(l=e==null?void 0:e.source)==null?void 0:l.parsedTrace,n=ZK(((c=e==null?void 0:e.source)==null?void 0:c.step)??0,1e3/60),r=iDe(e,n),i=I.useMemo(()=>ee.map(t==null?void 0:t.stepsPersistent,d=>ee.map(d,f=>ee.merge(f,{meta:{sourceLayer:e==null?void 0:e.key}}))),[t==null?void 0:t.stepsPersistent,e==null?void 0:e.key]),o=I.useMemo(()=>ee.map(t==null?void 0:t.stepsTransient,d=>ee.map(d,f=>ee.merge(f,{meta:{sourceLayer:e==null?void 0:e.key}}))),[t==null?void 0:t.stepsTransient,e==null?void 0:e.key]),s=I.useMemo(()=>[o[n]??[]],[o,n]);return C.jsxs(C.Fragment,{children:[C.jsx(T2e,{step:n,nodes:i}),C.jsx(d1,{nodes:s}),r]})},steps:({layer:e,children:t})=>{var n,r,i;return C.jsx(C.Fragment,{children:t==null?void 0:t(((i=(r=(n=e==null?void 0:e.source)==null?void 0:n.trace)==null?void 0:r.content)==null?void 0:i.events)??[])})},getSelectionInfo:({layer:e,event:t,children:n})=>{const{layer:r,setLayer:i}=Kl(e),o=I.useMemo(()=>{var d,f,h,p,g;const s=((h=(f=(d=r==null?void 0:r.source)==null?void 0:d.trace)==null?void 0:f.content)==null?void 0:h.events)??[],l=ee.chain((p=t==null?void 0:t.info)==null?void 0:p.components).filter(v=>{var y;return((y=v.meta)==null?void 0:y.sourceLayer)===(r==null?void 0:r.key)}).map(v=>{var y;return(y=v.meta)==null?void 0:y.step}).filter(ee.negate(ee.isUndefined)).sort((v,y)=>v-y).value(),c=ee.chain((g=t==null?void 0:t.info)==null?void 0:g.components).filter(v=>{var y;return((y=v.meta)==null?void 0:y.sourceLayer)===(r==null?void 0:r.key)}).filter(v=>v.meta.info).value();if(l.length&&r){const v=ee.last(l),y=s[v];if(y)return{...ee.keyBy(ee.map(c,(S,_)=>({key:`${r.key}.${_}`,primary:`Selection in ${$o(r)}`,items:{info:{index:-1,primary:C.jsx(ZE,{event:S.meta.info,vertical:!0})}}})),"key"),[r.key]:{primary:$o(r),items:{properties:{index:-2,primary:C.jsx(ZE,{event:y,vertical:!0})},[`${y}`]:{primary:`Go to Step ${v}`,secondary:`${ee.startCase(y.type)}`,action:()=>i(ko(r,S=>{ee.set(S,"source.step",v)})),icon:C.jsx(pxe,{})}}}}}return{}},[r,t]);return C.jsx(C.Fragment,{children:n==null?void 0:n(o)})}};function iDe(e,t=0){var o,s;const{palette:n}=In(),{getPath:r}=I.useMemo(()=>{var l,c;return(c=(l=e==null?void 0:e.source)==null?void 0:l.trace)!=null&&c.content?rDe(e.source.trace.content):{getParent:ee.constant(void 0),getPath:ee.constant([])}},[(s=(o=e==null?void 0:e.source)==null?void 0:o.trace)==null?void 0:s.content]);return I.useMemo(()=>{var l,c,d,f;if((f=(d=(c=(l=e==null?void 0:e.source)==null?void 0:l.trace)==null?void 0:c.content)==null?void 0:d.render)!=null&&f.path){const{pivot:h={},scale:p=1}=e.source.trace.content.render.path,{x:g,y:v}=h,y=g?KF(g):b=>b.event.x,S=v?KF(v):b=>b.event.y,_=ee.map(r(t),b=>{var x,E,A,R;return(R=(A=(E=(x=e==null?void 0:e.source)==null?void 0:x.trace)==null?void 0:E.content)==null?void 0:A.events)==null?void 0:R[b]});if(_.length){const b=[{$:"rect",x:y({event:{x:0,y:0,...ee.head(_)}})-2*p/2,y:S({event:{x:0,y:0,...ee.head(_)}})-2*p/2,fill:Pg("destination"),width:2*p,height:2*p},{$:"rect",x:y({event:{x:0,y:0,...ee.last(_)}})-2*p/2,y:S({event:{x:0,y:0,...ee.last(_)}})-2*p/2,fill:Pg("source"),width:2*p,height:2*p},{$:"path",points:_.map(x=>({x:y({event:{x:0,y:0,...x}}),y:S({event:{x:0,y:0,...x}})})),fill:n.primary.main,alpha:1,lineWidth:1*p}];return C.jsx(d1,{nodes:[ee.map(b,x=>({component:x,meta:{source:"path"}}))]})}}return C.jsx(C.Fragment,{})},[e,t,n,r])}async function oDe(e,t,n){for(const r of e){const i=await r.call("features/algorithms"),o=await r.call("features/formats");if(ee.find(i,{id:t})&&ee.find(o,{id:n}))return r}}const sDe={...BS,key:"query",editor:Rg(({value:e,produce:t})=>{var c,d;const{algorithm:n}=(e==null?void 0:e.source)??{},{layers:r,layer:i,key:o}=Kl(void 0,f=>{var h;return((h=f.source)==null?void 0:h.type)==="map"}),[{algorithms:s}]=WE(),[l]=Ig();return C.jsxs(C.Fragment,{children:[C.jsx(i1,{label:"Algorithm",content:C.jsx(Xo,{showArrow:!0,icon:C.jsx(wxe,{}),label:"Choose Algorithm",value:n,items:s.map(f=>{var h;return{...f,description:(h=ee.find(l,{url:f.source}))==null?void 0:h.name}}),onChange:async f=>t(h=>ee.set(h,"source.algorithm",f))})}),!(s!=null&&s.length)&&C.jsx(zt,{variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),C.jsx(i1,{label:"Map",content:C.jsx(Xo,{showArrow:!0,icon:C.jsx(tv,{}),label:"Choose Layer",value:o,items:r.map(f=>({id:f.key,name:$o(f)})),onChange:async f=>t(h=>ee.set(h,"source.mapLayerKey",f))})}),i&&C.jsxs(zt,{variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",$o(i)]}),C.jsx(MJ,{label:"Preview"}),C.jsx(dt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(TZ,{trace:(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:d.content})})]})}),service:Rg(({value:e,produce:t,onChange:n})=>{const r=BS.service,i=ba(),{algorithm:o,mapLayerKey:s,start:l,end:c}=(e==null?void 0:e.source)??{},[{layers:d}]=Bp(),[f]=Ig(),[{algorithms:h}]=WE(),p=I.useMemo(()=>{if(s&&o)return ee.find(d,{key:s})},[s,o,d]);return A2e(async g=>{var v;if(p&&o){const{format:y,content:S}=((v=p==null?void 0:p.source)==null?void 0:v.map)??{};if(y&&S){const _=await oDe(f,o,y),b=ee.find(h,{id:o});if(_){i(`Executing ${$o(e)} using ${_.name}...`);const x=await _.call("solve/pathfinding",{format:y,instances:[{start:l??0,end:c??0}],mapURI:`map:${encodeURIComponent(S)}`,algorithm:o});g.aborted?i("Canceled"):t(E=>ee.set(E,"source.trace",{name:`${b==null?void 0:b.name}`,content:x,key:Do()}))}}}},[p,f,o,l,c,t,i,e,h],[p,f,o,l,c]),C.jsx(C.Fragment,{children:C.jsx(r,{value:e,onChange:n})})}),inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Query"},getSelectionInfo:({children:e,event:t,layer:n})=>{const r=BS.getSelectionInfo,{layer:i,setLayer:o,layers:s}=Kl(n),l=I.useMemo(()=>{const d=ee.filter(s,{source:{type:"map"}});return ee.filter(ee.map(d,f=>{var p,g,v,y;const{parsedMap:h}=(f==null?void 0:f.source)??{};if(h&&t){const S=(y=(v=xz((g=(p=f==null?void 0:f.source)==null?void 0:p.map)==null?void 0:g.format))==null?void 0:v.hydrate)==null?void 0:y.call(v,h);if(S){const _=(t==null?void 0:t.world)&&S.snap(t.world);if(_){const b=(t==null?void 0:t.world)&&S.nodeAt(_);return{point:_,node:b,key:f.key,name:$o(f)}}}}}))},[s]),c=I.useMemo(()=>!!i&&!!l.length&&{[i.key]:{primary:$o(i),items:{...ee.reduce(l,(d,f)=>({...d,[`${n}-${f==null?void 0:f.key}-source`]:{primary:"Set as source",secondary:f==null?void 0:f.name,action:()=>o(ko(i,h=>{ee.set(h,"source.start",f==null?void 0:f.node),ee.set(h,"source.query",void 0),ee.set(h,"source.mapLayerKey",f==null?void 0:f.key),ee.set(h,"source.trace",void 0)})),icon:C.jsx(Fxe,{sx:{transform:"scale(0.5)"}})},[`${n}-${f==null?void 0:f.key}-destination`]:{primary:"Set as destination",secondary:f==null?void 0:f.name,action:()=>o(ko(i,h=>{ee.set(h,"source.end",f==null?void 0:f.node),ee.set(h,"source.query",void 0),ee.set(h,"source.mapLayerKey",f==null?void 0:f.key),ee.set(h,"source.trace",void 0)})),icon:C.jsx(Oxe,{})}}),{})}}},[l,i,s,o]);return C.jsx(r,{event:t,layer:n,children:d=>e==null?void 0:e(ee.merge(d,c))})}};function aDe({layer:e}){var t,n;return C.jsx(C.Fragment,{children:e&&I.createElement((n=uw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""])==null?void 0:n.renderer,{layer:e})})}function $o(e){var t,n;return e!=null&&e.name?e==null?void 0:e.name:(t=e==null?void 0:e.source)!=null&&t.type?uw[(n=e.source)==null?void 0:n.type].inferName(e):"Untitled Layer"}function GZ(e){var t;return uw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""]}const uw={map:O2e,trace:BS,query:sDe};function g1(e){"@babel/helpers - typeof";return g1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g1(e)}function lDe(e,t){if(g1(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(g1(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cDe(e){var t=lDe(e,"string");return g1(t)==="symbol"?t:String(t)}function uDe(e,t,n){return t=cDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function RG(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Mo(1));return n(VZ)(e,t)}if(typeof e!="function")throw new Error(Mo(2));var i=e,o=t,s=[],l=s,c=!1;function d(){l===s&&(l=s.slice())}function f(){if(c)throw new Error(Mo(3));return o}function h(y){if(typeof y!="function")throw new Error(Mo(4));if(c)throw new Error(Mo(5));var S=!0;return d(),l.push(y),function(){if(S){if(c)throw new Error(Mo(6));S=!1,d();var b=l.indexOf(y);l.splice(b,1),s=null}}}function p(y){if(!dDe(y))throw new Error(Mo(7));if(typeof y.type>"u")throw new Error(Mo(8));if(c)throw new Error(Mo(9));try{c=!0,o=i(o,y)}finally{c=!1}for(var S=s=l,_=0;_=0;r--){var i=t[r](e);if(i)return i}return function(o,s){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+s.wrappedComponentName+".")}}function GDe(e,t){return e===t}function VDe(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?TDe:n,i=t.mapStateToPropsFactories,o=i===void 0?DDe:i,s=t.mapDispatchToPropsFactories,l=s===void 0?PDe:s,c=t.mergePropsFactories,d=c===void 0?FDe:c,f=t.selectorFactory,h=f===void 0?HDe:f;return function(g,v,y,S){S===void 0&&(S={});var _=S,b=_.pure,x=b===void 0?!0:b,E=_.areStatesEqual,A=E===void 0?GDe:E,R=_.areOwnPropsEqual,k=R===void 0?TN:R,O=_.areStatePropsEqual,L=O===void 0?TN:O,N=_.areMergedPropsEqual,H=N===void 0?TN:N,W=Le(_,WDe),z=kN(g,o,"mapStateToProps"),D=kN(v,l,"mapDispatchToProps"),F=kN(y,d,"mergeProps");return r(h,$({methodName:"connect",getDisplayName:function(V){return"Connect("+V+")"},shouldHandleStateChanges:!!g,initMapStateToProps:z,initMapDispatchToProps:D,initMergeProps:F,pure:x,areStatesEqual:A,areOwnPropsEqual:k,areStatePropsEqual:L,areMergedPropsEqual:H},W))}}const ZZ=VDe();pDe(Jg.unstable_batchedUpdates);function qDe(e,t){if(e.length!==t.length)return!1;for(var n=0;n");return r.callbacks},r.setCallbacks=function(l){r.callbacks=l},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=ia(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof iC){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(de.Component),oLe=` +`+e.slice(s+1):c+=e.slice(i),c.slice(1)}function WMe(e){for(var t="",n=0,r,i=0;i=65536?i+=2:i++)n=Hb(e,i),r=oo[n],!r&&m1(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||LMe(n);return t}function GMe(e,t,n){var r="",i=e.tag,o,s,l;for(o=0,s=n.length;o"u"&&ku(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function TG(e,t,n,r){var i="",o=e.tag,s,l,c;for(s=0,l=n.length;s"u"&&ku(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=ZF(e,t)),e.dump&&h1===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function VMe(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,l,c,d,f;for(s=0,l=o.length;s1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ku(e,t,d,!1,!1)&&(f+=e.dump,r+=f));e.tag=i,e.dump="{"+r+"}"}function qMe(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),l,c,d,f,h,p;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new ta("sortKeys must be a boolean or a function");for(l=0,c=s.length;l1024,h&&(e.dump&&h1===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,h&&(p+=ZF(e,t)),ku(e,t+1,f,!0,h)&&(e.dump&&h1===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=o,e.dump=i||"{}"}function kG(e,t,n){var r,i,o,s,l,c;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o tag resolver accepts not "'+c+'" style');e.dump=r}return!0}return!1}function ku(e,t,n,r,i,o,s){e.tag=null,e.dump=n,kG(e,n,!1)||kG(e,n,!0);var l=DZ.call(e.dump),c=r,d;r&&(r=e.flowLevel<0||e.flowLevel>t);var f=l==="[object Object]"||l==="[object Array]",h,p;if(f&&(h=e.duplicates.indexOf(n),p=h!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(i=!1),p&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(f&&p&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),l==="[object Object]")r&&Object.keys(e.dump).length!==0?(qMe(e,t,e.dump,i),p&&(e.dump="&ref_"+h+e.dump)):(VMe(e,t,e.dump),p&&(e.dump="&ref_"+h+" "+e.dump));else if(l==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?TG(e,t-1,e.dump,i):TG(e,t,e.dump,i),p&&(e.dump="&ref_"+h+e.dump)):(GMe(e,t,e.dump),p&&(e.dump="&ref_"+h+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&UMe(e,e.dump,t,o,c);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ta("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function XMe(e,t){var n=[],r=[],i,o;for(t3(e,n,r),i=0,o=r.length;in(async()=>{var r;if(e!=null&&e.trace){t("Processing trace...");try{const i=await eDe(e);return t("Trace loaded",K2e("step",((r=i==null?void 0:i.stepsPersistent)==null?void 0:r.length)??0,!0)),i}catch(i){console.error(i),t("Error parsing",`${JMe(i)}`)}}}),[e])}const nDe=e=>e==null;function rDe(e){const t=[],n={},r={},i=ee.chain(e==null?void 0:e.events).map((l,c)=>({step:c,id:l.id,pId:l.pId})).groupBy("id").value();ee.forEach(e==null?void 0:e.events,({id:l,pId:c},d)=>{!nDe(c)&&n[l]!==c&&(t.push({id:l,pId:c,step:d,prev:ee.last(t)}),n[l]=c),r[d]=ee.last(t)});const o=(l,c=(d=>(d=e==null?void 0:e.events)==null?void 0:d.length)()??0)=>{let f=r[c];for(;f;){if(f.id===l)return f.pId;f=f.prev}};return{getParent:o,getPath:l=>{const c=[l];let d={...(e.events??[])[l],step:l};for(;d;){const f=o(d.id,d.step);if(f){const h=ee.findLast(i[f],p=>p.step<=d.step);if(h)c.push(h.step),d=h;else break}else break}return c}}}const BS={key:"trace",inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Trace"},editor:Rg(({value:e,produce:t})=>{var n,r,i,o;return C.jsxs(C.Fragment,{children:[C.jsx(i1,{label:"Trace",content:C.jsx(ITe,{onChange:s=>t(l=>ee.set(l,"source.trace",{...s,key:Do()})),value:(n=e==null?void 0:e.source)==null?void 0:n.trace})}),C.jsx(i1,{label:"Onion Skinning",content:C.jsx(Xo,{disabled:!0,showArrow:!0,value:((r=e==null?void 0:e.source)==null?void 0:r.onion)??"off",items:["off","transparent","solid"].map(s=>({id:s,name:ee.startCase(s)})),onChange:s=>t(l=>ee.set(l,"source.onion",s))})}),C.jsx(MJ,{label:"Preview"}),C.jsx(dt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(TZ,{trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content})})]})}),service:Rg(({value:e,produce:t})=>{var i,o,s,l,c,d,f,h;const{palette:n}=In(),r=tDe({trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content,context:{color:wz,themeAccent:n.primary.main,themeTextPrimary:n.text.primary,themeBackground:n.background.paper},view:"main"});return I.useEffect(()=>{t(p=>{var g,v,y,S;return ee.set(p,"source.playbackTo",((S=(y=(v=(g=e==null?void 0:e.source)==null?void 0:g.trace)==null?void 0:v.content)==null?void 0:y.events)==null?void 0:S.length)??0)})},[(d=(c=(l=(s=e==null?void 0:e.source)==null?void 0:s.trace)==null?void 0:l.content)==null?void 0:c.events)==null?void 0:d.length]),CZ(async()=>{const p=await r();t(g=>ee.set(g,"source.parsedTrace",p))},[r],[(h=(f=e==null?void 0:e.source)==null?void 0:f.trace)==null?void 0:h.key]),C.jsx(C.Fragment,{children:C.jsx(j2e,{value:e})})}),renderer:({layer:e,index:t})=>{var c,d;const n=(c=e==null?void 0:e.source)==null?void 0:c.parsedTrace,r=ZK(((d=e==null?void 0:e.source)==null?void 0:d.step)??0,1e3/60),i=iDe(e,t,r),o=I.useMemo(()=>ee.map(n==null?void 0:n.stepsPersistent,f=>ee.map(f,h=>ee.merge(h,{meta:{sourceLayer:e==null?void 0:e.key,sourceLayerIndex:t,sourceLayerAlpha:1-.01*+((e==null?void 0:e.transparency)??0),sourceLayerDisplayMode:(e==null?void 0:e.displayMode)??"source-over"}}))),[n==null?void 0:n.stepsPersistent,e==null?void 0:e.key,e==null?void 0:e.transparency,e==null?void 0:e.displayMode,t]),s=I.useMemo(()=>ee.map(n==null?void 0:n.stepsTransient,f=>ee.map(f,h=>ee.merge(h,{meta:{sourceLayer:e==null?void 0:e.key,sourceLayerIndex:t,sourceLayerAlpha:1-.01*+((e==null?void 0:e.transparency)??0),sourceLayerDisplayMode:(e==null?void 0:e.displayMode)??"source-over"}}))),[n==null?void 0:n.stepsTransient,e==null?void 0:e.key,e==null?void 0:e.transparency,e==null?void 0:e.displayMode,t]),l=I.useMemo(()=>[s[r]??[]],[s,r]);return C.jsxs(C.Fragment,{children:[C.jsx(T2e,{step:r,nodes:o}),C.jsx(d1,{nodes:l}),i]})},steps:({layer:e,children:t})=>{var n,r,i;return C.jsx(C.Fragment,{children:t==null?void 0:t(((i=(r=(n=e==null?void 0:e.source)==null?void 0:n.trace)==null?void 0:r.content)==null?void 0:i.events)??[])})},getSelectionInfo:({layer:e,event:t,children:n})=>{const{layer:r,setLayer:i}=Kl(e),o=I.useMemo(()=>{var d,f,h,p,g;const s=((h=(f=(d=r==null?void 0:r.source)==null?void 0:d.trace)==null?void 0:f.content)==null?void 0:h.events)??[],l=ee.chain((p=t==null?void 0:t.info)==null?void 0:p.components).filter(v=>{var y;return((y=v.meta)==null?void 0:y.sourceLayer)===(r==null?void 0:r.key)}).map(v=>{var y;return(y=v.meta)==null?void 0:y.step}).filter(ee.negate(ee.isUndefined)).sort((v,y)=>v-y).value(),c=ee.chain((g=t==null?void 0:t.info)==null?void 0:g.components).filter(v=>{var y;return((y=v.meta)==null?void 0:y.sourceLayer)===(r==null?void 0:r.key)}).filter(v=>{var y;return(y=v.meta)==null?void 0:y.info}).value();if(l.length&&r){const v=ee.last(l),y=s[v];if(y)return{...ee.keyBy(ee.map(c,(S,_)=>({key:`${r.key}.${_}`,primary:`Selection in ${$o(r)}`,items:{info:{index:-1,primary:C.jsx(ZE,{event:S.meta.info,vertical:!0})}}})),"key"),[r.key]:{primary:$o(r),items:{properties:{index:-2,primary:C.jsx(ZE,{event:y,vertical:!0})},[`${y}`]:{primary:`Go to Step ${v}`,secondary:`${ee.startCase(y.type)}`,action:()=>i(Ui(r,S=>{ee.set(S,"source.step",v)})),icon:C.jsx(pxe,{})}}}}}return{}},[r,t]);return C.jsx(C.Fragment,{children:n==null?void 0:n(o)})}};function iDe(e,t=0,n=0){var s,l;const{palette:r}=In(),{getPath:i}=I.useMemo(()=>{var c,d;return(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)!=null&&d.content?rDe(e.source.trace.content):{getParent:ee.constant(void 0),getPath:ee.constant([])}},[(l=(s=e==null?void 0:e.source)==null?void 0:s.trace)==null?void 0:l.content]);return I.useMemo(()=>{var c,d,f,h;if((h=(f=(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:d.content)==null?void 0:f.render)!=null&&h.path){const{pivot:p={},scale:g=1}=e.source.trace.content.render.path,{x:v,y}=p,S=v?KF(v):x=>x.event.x,_=y?KF(y):x=>x.event.y,b=ee.map(i(n),x=>{var E,A,R,k;return(k=(R=(A=(E=e==null?void 0:e.source)==null?void 0:E.trace)==null?void 0:A.content)==null?void 0:R.events)==null?void 0:k[x]});if(b.length){const x=[{$:"rect",x:S({event:{x:0,y:0,...ee.head(b)}})-2*g/2,y:_({event:{x:0,y:0,...ee.head(b)}})-2*g/2,fill:Pg("destination"),width:2*g,height:2*g},{$:"rect",x:S({event:{x:0,y:0,...ee.last(b)}})-2*g/2,y:_({event:{x:0,y:0,...ee.last(b)}})-2*g/2,fill:Pg("source"),width:2*g,height:2*g},{$:"path",points:b.map(E=>({x:S({event:{x:0,y:0,...E}}),y:_({event:{x:0,y:0,...E}})})),fill:r.primary.main,alpha:1,lineWidth:1*g}];return C.jsx(d1,{nodes:[ee.map(x,E=>({component:E,meta:{source:"path",sourceLayerIndex:-99999+t}}))]})}}return C.jsx(C.Fragment,{})},[e,t,n,r,i])}async function oDe(e,t,n){for(const r of e){const i=await r.call("features/algorithms"),o=await r.call("features/formats");if(ee.find(i,{id:t})&&ee.find(o,{id:n}))return r}}const sDe={...BS,key:"query",editor:Rg(({value:e,produce:t})=>{var c,d;const{algorithm:n}=(e==null?void 0:e.source)??{},{layers:r,layer:i,key:o}=Kl(void 0,f=>{var h;return((h=f.source)==null?void 0:h.type)==="map"}),[{algorithms:s}]=WE(),[l]=Ig();return C.jsxs(C.Fragment,{children:[C.jsx(i1,{label:"Algorithm",content:C.jsx(Xo,{showArrow:!0,icon:C.jsx(wxe,{}),label:"Choose Algorithm",value:n,items:s.map(f=>{var h;return{...f,description:(h=ee.find(l,{url:f.source}))==null?void 0:h.name}}),onChange:async f=>t(h=>ee.set(h,"source.algorithm",f))})}),!(s!=null&&s.length)&&C.jsx(zt,{variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),C.jsx(i1,{label:"Map",content:C.jsx(Xo,{showArrow:!0,icon:C.jsx(tv,{}),label:"Choose Layer",value:o,items:r.map(f=>({id:f.key,name:$o(f)})),onChange:async f=>t(h=>ee.set(h,"source.mapLayerKey",f))})}),i&&C.jsxs(zt,{variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",$o(i)]}),C.jsx(MJ,{label:"Preview"}),C.jsx(dt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(TZ,{trace:(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:d.content})})]})}),service:Rg(({value:e,produce:t,onChange:n})=>{const r=BS.service,i=ba(),{algorithm:o,mapLayerKey:s,start:l,end:c}=(e==null?void 0:e.source)??{},[{layers:d}]=Bp(),[f]=Ig(),[{algorithms:h}]=WE(),p=I.useMemo(()=>{if(s&&o)return ee.find(d,{key:s})},[s,o,d]);return A2e(async g=>{var v;if(p&&o){const{format:y,content:S}=((v=p==null?void 0:p.source)==null?void 0:v.map)??{};if(y&&S){const _=await oDe(f,o,y),b=ee.find(h,{id:o});if(_){i(`Executing ${$o(e)} using ${_.name}...`);const x=await _.call("solve/pathfinding",{format:y,instances:[{start:l??0,end:c??0}],mapURI:`map:${encodeURIComponent(S)}`,algorithm:o});g.aborted?i("Canceled"):t(E=>ee.set(E,"source.trace",{name:`${b==null?void 0:b.name}`,content:x,key:Do()}))}}}},[p,f,o,l,c,t,i,e,h],[p,f,o,l,c]),C.jsx(C.Fragment,{children:C.jsx(r,{value:e,onChange:n})})}),inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Query"},getSelectionInfo:({children:e,event:t,layer:n})=>{const r=BS.getSelectionInfo,{layer:i,setLayer:o,layers:s}=Kl(n),l=I.useMemo(()=>{const d=ee.filter(s,{source:{type:"map"}});return ee.filter(ee.map(d,f=>{var p,g,v,y;const{parsedMap:h}=(f==null?void 0:f.source)??{};if(h&&t){const S=(y=(v=xz((g=(p=f==null?void 0:f.source)==null?void 0:p.map)==null?void 0:g.format))==null?void 0:v.hydrate)==null?void 0:y.call(v,h);if(S){const _=(t==null?void 0:t.world)&&S.snap(t.world);if(_){const b=(t==null?void 0:t.world)&&S.nodeAt(_);return{point:_,node:b,key:f.key,name:$o(f)}}}}}))},[s]),c=I.useMemo(()=>!!i&&!!l.length&&{[i.key]:{primary:$o(i),items:{...ee.reduce(l,(d,f)=>({...d,[`${n}-${f==null?void 0:f.key}-source`]:{primary:"Set as source",secondary:f==null?void 0:f.name,action:()=>o(Ui(i,h=>{ee.set(h,"source.start",f==null?void 0:f.node),ee.set(h,"source.query",void 0),ee.set(h,"source.mapLayerKey",f==null?void 0:f.key),ee.set(h,"source.trace",void 0)})),icon:C.jsx(Fxe,{sx:{transform:"scale(0.5)"}})},[`${n}-${f==null?void 0:f.key}-destination`]:{primary:"Set as destination",secondary:f==null?void 0:f.name,action:()=>o(Ui(i,h=>{ee.set(h,"source.end",f==null?void 0:f.node),ee.set(h,"source.query",void 0),ee.set(h,"source.mapLayerKey",f==null?void 0:f.key),ee.set(h,"source.trace",void 0)})),icon:C.jsx(Oxe,{})}}),{})}}},[l,i,s,o]);return C.jsx(r,{event:t,layer:n,children:d=>e==null?void 0:e(ee.merge(d,c))})}};function aDe({layer:e,index:t}){var n,r;return C.jsx(C.Fragment,{children:e&&I.createElement((r=uw[((n=e==null?void 0:e.source)==null?void 0:n.type)??""])==null?void 0:r.renderer,{layer:e,index:t})})}function $o(e){var t,n;return e!=null&&e.name?e==null?void 0:e.name:(t=e==null?void 0:e.source)!=null&&t.type?uw[(n=e.source)==null?void 0:n.type].inferName(e):"Untitled Layer"}function GZ(e){var t;return uw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""]}const uw={map:O2e,trace:BS,query:sDe};function g1(e){"@babel/helpers - typeof";return g1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g1(e)}function lDe(e,t){if(g1(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(g1(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cDe(e){var t=lDe(e,"string");return g1(t)==="symbol"?t:String(t)}function uDe(e,t,n){return t=cDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function RG(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Mo(1));return n(VZ)(e,t)}if(typeof e!="function")throw new Error(Mo(2));var i=e,o=t,s=[],l=s,c=!1;function d(){l===s&&(l=s.slice())}function f(){if(c)throw new Error(Mo(3));return o}function h(y){if(typeof y!="function")throw new Error(Mo(4));if(c)throw new Error(Mo(5));var S=!0;return d(),l.push(y),function(){if(S){if(c)throw new Error(Mo(6));S=!1,d();var b=l.indexOf(y);l.splice(b,1),s=null}}}function p(y){if(!dDe(y))throw new Error(Mo(7));if(typeof y.type>"u")throw new Error(Mo(8));if(c)throw new Error(Mo(9));try{c=!0,o=i(o,y)}finally{c=!1}for(var S=s=l,_=0;_=0;r--){var i=t[r](e);if(i)return i}return function(o,s){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+s.wrappedComponentName+".")}}function GDe(e,t){return e===t}function VDe(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?TDe:n,i=t.mapStateToPropsFactories,o=i===void 0?DDe:i,s=t.mapDispatchToPropsFactories,l=s===void 0?PDe:s,c=t.mergePropsFactories,d=c===void 0?FDe:c,f=t.selectorFactory,h=f===void 0?HDe:f;return function(g,v,y,S){S===void 0&&(S={});var _=S,b=_.pure,x=b===void 0?!0:b,E=_.areStatesEqual,A=E===void 0?GDe:E,R=_.areOwnPropsEqual,k=R===void 0?TN:R,O=_.areStatePropsEqual,L=O===void 0?TN:O,N=_.areMergedPropsEqual,H=N===void 0?TN:N,W=Le(_,WDe),z=kN(g,o,"mapStateToProps"),D=kN(v,l,"mapDispatchToProps"),F=kN(y,d,"mergeProps");return r(h,$({methodName:"connect",getDisplayName:function(V){return"Connect("+V+")"},shouldHandleStateChanges:!!g,initMapStateToProps:z,initMapDispatchToProps:D,initMergeProps:F,pure:x,areStatesEqual:A,areOwnPropsEqual:k,areStatePropsEqual:L,areMergedPropsEqual:H},W))}}const ZZ=VDe();pDe(Jg.unstable_batchedUpdates);function qDe(e,t){if(e.length!==t.length)return!1;for(var n=0;n");return r.callbacks},r.setCallbacks=function(l){r.callbacks=l},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=ia(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof iC){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(de.Component),oLe=` Press space bar to start a drag. When dragging you can use the arrow keys to move the item around and escape to cancel. Some screen readers may require you to be in focus mode or to use your pass through key @@ -561,7 +561,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat `:` The item has been dropped while not over a drop area. `+zG(t.source)+` - `},$S={dragHandleUsageInstructions:oLe,onDragStart:sLe,onDragUpdate:aLe,onDragEnd:lLe},wi={x:0,y:0},Ui=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},ks=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},Rd=function(t,n){return t.x===n.x&&t.y===n.y},cv=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},_p=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},y1=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},jG=function(t,n){return Math.min.apply(Math,n.map(function(r){return y1(t,r)}))},see=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},cLe=function(e,t){var n=nl({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},dw=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},UG=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},uLe={top:0,right:0,bottom:0,left:0},dLe=function(t,n){return n?dw(t,n.scroll.diff.displacement):t},fLe=function(t,n,r){if(r&&r.increasedBy){var i;return $({},t,(i={},i[n.end]=t[n.end]+r.increasedBy[n.line],i))}return t},hLe=function(t,n){return n&&n.shouldClipSubject?cLe(n.pageMarginBox,t):nl(t)},Dg=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=dLe(t.marginBox,i),s=fLe(o,r,n),l=hLe(s,i);return{page:t,withPlaceholder:n,active:l}},Uz=function(e,t){e.frame||He(!1);var n=e.frame,r=ks(t,n.scroll.initial),i=cv(r),o=$({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=Dg({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),l=$({},e,{frame:o,subject:s});return l};function sC(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function Hz(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;ne.bottom,d=r.lefte.right,f=c&&d;if(f)return!0;var h=c&&s||d&&o;return h}},vLe=function(e){var t=fa(e.top,e.bottom),n=fa(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},Gz={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},fee={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},yLe=function(e){return function(t){var n=fa(t.top,t.bottom),r=fa(t.left,t.right);return function(i){return e===Gz?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},bLe=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:wi;return dw(t,r)},xLe=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},wLe=function(t,n,r){return r(n)(t)},Vz=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,l=o?bLe(n,r):n;return xLe(l,r,s)&&wLe(l,i,s)},_Le=function(t){return Vz($({},t,{isVisibleThroughFrameFn:dee}))},hee=function(t){return Vz($({},t,{isVisibleThroughFrameFn:vLe}))},SLe=function(t){return Vz($({},t,{isVisibleThroughFrameFn:yLe(t.destination.axis)}))},ELe=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var i=n.invisible,o=n.visible;if(i[t])return!1;var s=o[t];return s?s.shouldAnimate:!0};function CLe(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return nl(zz(n,r))}function x1(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,s=e.last;return t.reduce(function(c,d){var f=CLe(d,r),h=d.descriptor.id;c.all.push(h);var p=_Le({target:f,destination:n,viewport:i,withDroppableDisplacement:!0});if(!p)return c.invisible[d.descriptor.id]=!0,c;var g=ELe(h,s,o),v={draggableId:h,shouldAnimate:g};return c.visible[h]=v,c},{all:[],visible:{},invisible:{}})}function TLe(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function HG(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=TLe(t,{inHomeList:n});return{displaced:b1,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function aC(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,s=e.last,l=e.index,c=e.forceShouldAnimate,d=dv(t,r);if(l==null)return HG({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var f=ef(n,function(y){return y.descriptor.index===l});if(!f)return HG({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var h=Rk(t,n),p=n.indexOf(f),g=h.slice(p),v=x1({afterDragging:g,destination:r,displacedBy:o,last:s,viewport:i.frame,forceShouldAnimate:c});return{displaced:v,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function Fd(e,t){return!!t.effected[e]}var kLe=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var s=i.draggableId,l=r[s],c=l.descriptor.index,d=Fd(s,o);return d?t?c:c-1:t?c+1:c},ALe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,s=t?o+1:o-1,l=r[0].descriptor.index,c=r[r.length-1].descriptor.index,d=n?c:c+1;return sd?null:s},RLe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,s=e.insideDestination,l=e.previousImpact,c=e.viewport,d=e.afterCritical,f=l.at;if(f||He(!1),f.type==="REORDER"){var h=ALe({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:s});return h==null?null:aC({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:h})}var p=kLe({isMovingForward:t,destination:o,displaced:l.displaced,draggables:i,combine:f.combine,afterCritical:d});return p==null?null:aC({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:p})},ILe=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=!!(t.visible[r]||t.invisible[r]);return Fd(r,n)?o?wi:cv(i.point):o?i.point:wi},PLe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=Ak(n);i||He(!1);var o=i.draggableId,s=r[o].page.borderBox.center,l=ILe({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return Ui(s,l)},pee=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},OLe=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},qz=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},WG=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return _p(n.line,r.marginBox[n.end]+pee(n,i),qz(n,r.marginBox,i))},GG=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return _p(n.line,r.marginBox[n.start]-OLe(n,i),qz(n,r.marginBox,i))},MLe=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return _p(n.line,r.contentBox[n.start]+pee(n,i),qz(n,r.contentBox,i))},DLe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,s=uv(i.descriptor.id,r),l=n.page,c=i.axis;if(!s.length)return MLe({axis:c,moveInto:i.page,isMoving:l});var d=t.displaced,f=t.displacedBy,h=d.all[0];if(h){var p=r[h];if(Fd(h,o))return GG({axis:c,moveRelativeTo:p.page,isMoving:l});var g=nC(p.page,f.point);return GG({axis:c,moveRelativeTo:g,isMoving:l})}var v=s[s.length-1];if(v.descriptor.id===n.descriptor.id)return l.borderBox.center;if(Fd(v.descriptor.id,o)){var y=nC(v.page,cv(o.displacedBy.point));return WG({axis:c,moveRelativeTo:y,isMoving:l})}return WG({axis:c,moveRelativeTo:v.page,isMoving:l})},n3=function(e,t){var n=e.frame;return n?Ui(t,n.scroll.diff.displacement):t},LLe=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,s=t.afterCritical,l=r.page.borderBox.center,c=n.at;return!i||!c?l:c.type==="REORDER"?DLe({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:s}):PLe({impact:n,draggables:o,afterCritical:s})},Ik=function(e){var t=LLe(e),n=e.droppable,r=n?n3(n,t):t;return r},mee=function(e,t){var n=ks(t,e.scroll.initial),r=cv(n),i=nl({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),o={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return o};function VG(e,t){return e.map(function(n){return t[n]})}function NLe(e,t){for(var n=0;n1?f.sort(function(h,p){return yo(h)[l.start]-yo(p)[l.start]})[0]:d.sort(function(h,p){var g=jG(n,UG(yo(h))),v=jG(n,UG(yo(p)));return g!==v?g-v:yo(h)[l.start]-yo(p)[l.start]})[0]},qG=function(t,n){var r=t.page.borderBox.center;return Fd(t.descriptor.id,n)?ks(r,n.displacedBy.point):r},jLe=function(t,n){var r=t.page.borderBox;return Fd(t.descriptor.id,n)?dw(r,cv(n.displacedBy.point)):r},ULe=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,s=i.filter(function(l){return hee({target:jLe(l,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(l,c){var d=y1(t,n3(r,qG(l,o))),f=y1(t,n3(r,qG(c,o)));return dt.left&&e.topt.top}function KLe(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(s){var l=s.axis,c=_p(s.axis.line,t.center[l.line],s.page.borderBox.center[l.crossAxisLine]);return{id:s.descriptor.id,distance:y1(i,c)}}).sort(function(s,l){return l.distance-s.distance});return o[0]?o[0].id:null}function QLe(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=kk(r).filter(function(o){if(!o.isEnabled)return!1;var s=o.subject.active;if(!s||!YLe(t,s))return!1;if(bee(s)(t.center))return!0;var l=o.axis,c=s.center[l.crossAxisLine],d=t[l.crossAxisStart],f=t[l.crossAxisEnd],h=fa(s[l.crossAxisStart],s[l.crossAxisEnd]),p=h(d),g=h(f);return!p&&!g?!0:p?dc});return i.length?i.length===1?i[0].descriptor.id:KLe({pageBorderBox:t,draggable:n,candidates:i}):null}var xee=function(t,n){return nl(dw(t,n))},JLe=function(e,t){var n=e.frame;return n?xee(t,n.scroll.diff.value):t};function wee(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function ZLe(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var eNe=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,s=e.viewport,l=e.afterCritical,c=r.axis,d=fw(r.axis,n.displaceBy),f=d.value,h=t[c.start],p=t[c.end],g=Rk(n,i),v=ef(g,function(S){var _=S.descriptor.id,b=S.page.borderBox.center[c.line],x=Fd(_,l),E=wee({displaced:o,id:_});return x?E?p<=b:h_[l.start]+x&&h<_[l.end]-x:f>_[l.start]-d+x&&f<_[l.end]-d-x:A?h>_[l.start]+d+x&&h<_[l.end]+d-x:f>_[l.start]+x&&f<_[l.end]-x});if(!g)return null;var v={displacedBy:c,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:g.descriptor.id,droppableId:i.descriptor.id}}};return v},_ee=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,s=e.viewport,l=e.afterCritical,c=xee(n.page.borderBox,t),d=QLe({pageBorderBox:c,draggable:n,droppables:i});if(!d)return gLe;var f=i[d],h=uv(f.descriptor.id,r),p=JLe(f,c);return nNe({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:o,destination:f,insideDestination:h,afterCritical:l})||eNe({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:f,insideDestination:h,last:o.displaced,viewport:s,afterCritical:l})},Yz=function(e,t){var n;return $({},e,(n={},n[t.descriptor.id]=t,n))},rNe=function(t){var n=t.previousImpact,r=t.impact,i=t.droppables,o=Ps(n),s=Ps(r);if(!o||o===s)return i;var l=i[o];if(!l.subject.withPlaceholder)return i;var c=WLe(l);return Yz(i,c)},iNe=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,s=rNe({previousImpact:i,impact:o,droppables:r}),l=Ps(o);if(!l)return s;var c=r[l];if(dv(t,c)||c.subject.withPlaceholder)return s;var d=yee(c,t,n);return Yz(s,d)},xx=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,s=e.scrollJumpRequest,l=i||t.viewport,c=r||t.dimensions,d=n||t.current.client.selection,f=ks(d,t.initial.client.selection),h={offset:f,selection:d,borderBoxCenter:Ui(t.initial.client.borderBoxCenter,f)},p={selection:Ui(h.selection,l.scroll.current),borderBoxCenter:Ui(h.borderBoxCenter,l.scroll.current),offset:Ui(h.offset,l.scroll.diff.value)},g={client:h,page:p};if(t.phase==="COLLECTING")return $({phase:"COLLECTING"},t,{dimensions:c,viewport:l,current:g});var v=c.draggables[t.critical.draggable.id],y=o||_ee({pageOffset:p.offset,draggable:v,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),S=iNe({draggable:v,impact:y,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables}),_=$({},t,{current:g,dimensions:{draggables:c.draggables,droppables:S},impact:y,viewport:l,scrollJumpRequest:s||null,forceShouldAnimate:s?!1:null});return _};function oNe(e,t){return e.map(function(n){return t[n]})}var See=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,s=t.displaced,l=oNe(s.all,r),c=x1({afterDragging:l,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:s});return $({},t,{displaced:c})},Eee=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,s=e.afterCritical,l=Ik({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s});return Xz({pageBorderBoxCenter:l,draggable:n,viewport:o})},Cee=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&He(!1);var i=t.impact,o=r||t.viewport,s=n||t.dimensions,l=s.draggables,c=s.droppables,d=l[t.critical.draggable.id],f=Ps(i);f||He(!1);var h=c[f],p=See({impact:i,viewport:o,destination:h,draggables:l}),g=Eee({impact:p,draggable:d,droppable:h,draggables:l,viewport:o,afterCritical:t.afterCritical});return xx({impact:p,clientSelection:g,state:t,dimensions:s,viewport:o})},sNe=function(e){return{index:e.index,droppableId:e.droppableId}},Tee=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=fw(n.axis,t.displaceBy),s=uv(n.descriptor.id,r),l=s.indexOf(t);l===-1&&He(!1);var c=s.slice(l+1),d=c.reduce(function(g,v){return g[v.descriptor.id]=!0,g},{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:d},h=x1({afterDragging:c,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),p={displaced:h,displacedBy:o,at:{type:"REORDER",destination:sNe(t.descriptor)}};return{impact:p,afterCritical:f}},aNe=function(e,t){return{draggables:e.draggables,droppables:Yz(e.droppables,t)}},lNe=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=nC(t.client,n),o=rC(i,r),s=$({},t,{placeholder:$({},t.placeholder,{client:i}),client:i,page:o});return s},cNe=function(e){var t=e.frame;return t||He(!1),t},uNe=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(o){var s=o.descriptor.droppableId,l=n[s],c=cNe(l),d=c.scroll.diff.value,f=Ui(i,d),h=lNe({draggable:o,offset:f,initialWindowScroll:r.scroll.initial});return h})},dNe=function(e){var t=e.state,n=e.published,r=n.modified.map(function(x){var E=t.dimensions.droppables[x.droppableId],A=Uz(E,x.scroll);return A}),i=$({},t.dimensions.droppables,{},lee(r)),o=cee(uNe({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s=$({},t.dimensions.draggables,{},o);n.removals.forEach(function(x){delete s[x]});var l={droppables:i,draggables:s},c=Ps(t.impact),d=c?l.droppables[c]:null,f=l.draggables[t.critical.draggable.id],h=l.droppables[t.critical.droppable.id],p=Tee({draggable:f,home:h,draggables:s,viewport:t.viewport}),g=p.impact,v=p.afterCritical,y=d&&d.isCombineEnabled?t.impact:g,S=_ee({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:y,viewport:t.viewport,afterCritical:v}),_=$({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:S,onLiftImpact:g,dimensions:l,afterCritical:v,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return _;var b=$({phase:"DROP_PENDING"},_,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return b},r3=function(t){return t.movementMode==="SNAP"},IN=function(t,n,r){var i=aNe(t.dimensions,n);return!r3(t)||r?xx({state:t,dimensions:i}):Cee({state:t,dimensions:i})};function PN(e){return e.isDragging&&e.movementMode==="SNAP"?$({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var XG={phase:"IDLE",completed:null,shouldFlush:!1},fNe=function(e,t){if(e===void 0&&(e=XG),t.type==="FLUSH")return $({},XG,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&He(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,s=n.dimensions,l=n.movementMode,c=s.draggables[r.draggable.id],d=s.droppables[r.droppable.id],f={selection:i,borderBoxCenter:c.client.borderBox.center,offset:wi},h={client:f,page:{selection:Ui(f.selection,o.scroll.initial),borderBoxCenter:Ui(f.selection,o.scroll.initial),offset:Ui(f.selection,o.scroll.diff.value)}},p=kk(s.droppables).every(function(ve){return!ve.isFixedOnPage}),g=Tee({draggable:c,home:d,draggables:s.draggables,viewport:o}),v=g.impact,y=g.afterCritical,S={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:s,initial:h,current:h,isWindowScrollAllowed:p,impact:v,afterCritical:y,onLiftImpact:v,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return S}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&He(!1);var _=$({phase:"COLLECTING"},e,{phase:"COLLECTING"});return _}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||He(!1),dNe({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Lh(e)||He(!1);var b=t.payload.client;return Rd(b,e.current.client.selection)?e:xx({state:e,clientSelection:b,impact:r3(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return PN(e);Lh(e)||He(!1);var x=t.payload,E=x.id,A=x.newScroll,R=e.dimensions.droppables[E];if(!R)return e;var k=Uz(R,A);return IN(e,k,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Lh(e)||He(!1);var O=t.payload,L=O.id,N=O.isEnabled,H=e.dimensions.droppables[L];H||He(!1),H.isEnabled===N&&He(!1);var W=$({},H,{isEnabled:N});return IN(e,W,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Lh(e)||He(!1);var z=t.payload,D=z.id,F=z.isCombineEnabled,j=e.dimensions.droppables[D];j||He(!1),j.isCombineEnabled===F&&He(!1);var V=$({},j,{isCombineEnabled:F});return IN(e,V,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Lh(e)||He(!1),e.isWindowScrollAllowed||He(!1);var G=t.payload.newScroll;if(Rd(e.viewport.scroll.current,G))return PN(e);var K=mee(e.viewport,G);return r3(e)?Cee({state:e,viewport:K}):xx({state:e,viewport:K})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Lh(e))return e;var Y=t.payload.maxScroll;if(Rd(Y,e.viewport.scroll.max))return e;var J=$({},e.viewport,{scroll:$({},e.viewport.scroll,{max:Y})});return $({phase:"DRAGGING"},e,{viewport:J})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&He(!1);var ie=XLe({state:e,type:t.type});return ie?xx({state:e,impact:ie.impact,clientSelection:ie.clientSelection,scrollJumpRequest:ie.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var ce=t.payload.reason;e.phase!=="COLLECTING"&&He(!1);var ue=$({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:ce});return ue}if(t.type==="DROP_ANIMATE"){var se=t.payload,Q=se.completed,ae=se.dropDuration,le=se.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||He(!1);var he={phase:"DROP_ANIMATING",completed:Q,dropDuration:ae,newHomeClientOffset:le,dimensions:e.dimensions};return he}if(t.type==="DROP_COMPLETE"){var pe=t.payload.completed;return{phase:"IDLE",completed:pe,shouldFlush:!1}}return e},hNe=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},pNe=function(t){return{type:"LIFT",payload:t}},mNe=function(t){return{type:"INITIAL_PUBLISH",payload:t}},gNe=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},vNe=function(){return{type:"COLLECTION_STARTING",payload:null}},yNe=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},bNe=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},xNe=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},kee=function(t){return{type:"MOVE",payload:t}},wNe=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},_Ne=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},SNe=function(){return{type:"MOVE_UP",payload:null}},ENe=function(){return{type:"MOVE_DOWN",payload:null}},CNe=function(){return{type:"MOVE_RIGHT",payload:null}},TNe=function(){return{type:"MOVE_LEFT",payload:null}},Kz=function(){return{type:"FLUSH",payload:null}},kNe=function(t){return{type:"DROP_ANIMATE",payload:t}},Qz=function(t){return{type:"DROP_COMPLETE",payload:t}},Aee=function(t){return{type:"DROP",payload:t}},ANe=function(t){return{type:"DROP_PENDING",payload:t}},Ree=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},RNe=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(i){return function(o){if(o.type!=="LIFT"){i(o);return}var s=o.payload,l=s.id,c=s.clientSelection,d=s.movementMode,f=n();f.phase==="DROP_ANIMATING"&&r(Qz({completed:f.completed})),n().phase!=="IDLE"&&He(!1),r(Kz()),r(hNe({draggableId:l,movementMode:d}));var h={shouldPublishImmediately:d==="SNAP"},p={draggableId:l,scrollOptions:h},g=e.startPublishing(p),v=g.critical,y=g.dimensions,S=g.viewport;r(mNe({critical:v,dimensions:y,clientSelection:c,movementMode:d,viewport:S}))}}}},INe=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},Jz={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},w1={opacity:{drop:0,combining:.7},scale:{drop:.75}},Zz={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},_h=Zz.outOfTheWay+"s "+Jz.outOfTheWay,wx={fluid:"opacity "+_h,snap:"transform "+_h+", opacity "+_h,drop:function(t){var n=t+"s "+Jz.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+_h,placeholder:"height "+_h+", width "+_h+", margin "+_h},YG=function(t){return Rd(t,wi)?null:"translate("+t.x+"px, "+t.y+"px)"},i3={moveTo:YG,drop:function(t,n){var r=YG(t);return r?n?r+" scale("+w1.scale.drop+")":r:null}},o3=Zz.minDropTime,Iee=Zz.maxDropTime,PNe=Iee-o3,KG=1500,ONe=.6,MNe=function(e){var t=e.current,n=e.destination,r=e.reason,i=y1(t,n);if(i<=0)return o3;if(i>=KG)return Iee;var o=i/KG,s=o3+PNe*o,l=r==="CANCEL"?s*ONe:s;return Number(l.toFixed(2))},DNe=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,s=r.draggables,l=r.droppables,c=Ps(t),d=c?l[c]:null,f=l[n.descriptor.droppableId],h=Eee({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:d||f,viewport:i}),p=ks(h,n.client.borderBox.center);return p},LNe=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,s=e.onLiftImpact;if(!r.at||n!=="DROP"){var l=See({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:l,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var c=$({},r,{displaced:b1});return{impact:c,didDropInsideDroppable:!0}},NNe=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(i){if(i.type!=="DROP"){r(i);return}var o=t(),s=i.payload.reason;if(o.phase==="COLLECTING"){n(ANe({reason:s}));return}if(o.phase!=="IDLE"){var l=o.phase==="DROP_PENDING"&&o.isWaiting;l&&He(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||He(!1);var c=o.critical,d=o.dimensions,f=d.draggables[o.critical.draggable.id],h=LNe({reason:s,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),p=h.impact,g=h.didDropInsideDroppable,v=g?Wz(p):null,y=g?Ak(p):null,S={index:c.draggable.index,droppableId:c.droppable.id},_={draggableId:f.descriptor.id,type:f.descriptor.type,source:S,reason:s,mode:o.movementMode,destination:v,combine:y},b=DNe({impact:p,draggable:f,dimensions:d,viewport:o.viewport,afterCritical:o.afterCritical}),x={critical:o.critical,afterCritical:o.afterCritical,result:_,impact:p},E=!Rd(o.current.client.offset,b)||!!_.combine;if(!E){n(Qz({completed:x}));return}var A=MNe({current:o.current.client.offset,destination:b,reason:s}),R={newHomeClientOffset:b,dropDuration:A,completed:x};n(kNe(R))}}}},Pee=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function BNe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function $Ne(e){var t=e.onWindowScroll;function n(){t(Pee())}var r=v1(n),i=BNe(r),o=Ad;function s(){return o!==Ad}function l(){s()&&He(!1),o=ia(window,[i])}function c(){s()||He(!1),r.cancel(),o(),o=Ad}return{start:l,stop:c,isActive:s}}var FNe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},zNe=function(e){var t=$Ne({onWindowScroll:function(r){e.dispatch(wNe({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&FNe(r)&&t.stop(),n(r)}}},jNe=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),i=function(s){t||n||(t=!0,e(s),clearTimeout(r))};return i.wasCalled=function(){return t},i},UNe=function(){var e=[],t=function(o){var s=Hz(e,function(d){return d.timerId===o});s===-1&&He(!1);var l=e.splice(s,1),c=l[0];c.callback()},n=function(o){var s=setTimeout(function(){return t(s)}),l={timerId:s,callback:o};e.push(l)},r=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(s){clearTimeout(s.timerId),s.callback()})}};return{add:n,flush:r}},HNe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},WNe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},GNe=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,i=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&i},gb=function(t,n){n()},w_=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},ON=function(t,n,r,i){if(!t){r(i(n));return}var o=jNe(r),s={announce:o};t(n,s),o.wasCalled()||r(i(n))},VNe=function(e,t){var n=UNe(),r=null,i=function(p,g){r&&He(!1),gb("onBeforeCapture",function(){var v=e().onBeforeCapture;if(v){var y={draggableId:p,mode:g};v(y)}})},o=function(p,g){r&&He(!1),gb("onBeforeDragStart",function(){var v=e().onBeforeDragStart;v&&v(w_(p,g))})},s=function(p,g){r&&He(!1);var v=w_(p,g);r={mode:g,lastCritical:p,lastLocation:v.source,lastCombine:null},n.add(function(){gb("onDragStart",function(){return ON(e().onDragStart,v,t,$S.onDragStart)})})},l=function(p,g){var v=Wz(g),y=Ak(g);r||He(!1);var S=!GNe(p,r.lastCritical);S&&(r.lastCritical=p);var _=!HNe(r.lastLocation,v);_&&(r.lastLocation=v);var b=!WNe(r.lastCombine,y);if(b&&(r.lastCombine=y),!(!S&&!_&&!b)){var x=$({},w_(p,r.mode),{combine:y,destination:v});n.add(function(){gb("onDragUpdate",function(){return ON(e().onDragUpdate,x,t,$S.onDragUpdate)})})}},c=function(){r||He(!1),n.flush()},d=function(p){r||He(!1),r=null,gb("onDragEnd",function(){return ON(e().onDragEnd,p,t,$S.onDragEnd)})},f=function(){if(r){var p=$({},w_(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});d(p)}};return{beforeCapture:i,beforeStart:o,start:s,update:l,flush:c,drop:d,abort:f}},qNe=function(e,t){var n=VNe(e,t);return function(r){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var s=o.payload.critical;n.beforeStart(s,o.payload.movementMode),i(o),n.start(s,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var l=o.payload.completed.result;n.flush(),i(o),n.drop(l);return}if(i(o),o.type==="FLUSH"){n.abort();return}var c=r.getState();c.phase==="DRAGGING"&&n.update(c.critical,c.impact)}}}},XNe=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&He(!1),e.dispatch(Qz({completed:r.completed}))}}},YNe=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&r(),i(o),o.type==="DROP_ANIMATE"){var s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var c=e.getState();c.phase==="DROP_ANIMATING"&&e.dispatch(Ree())}};n=requestAnimationFrame(function(){n=null,t=ia(window,[s])})}}}},KNe=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},QNe=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},JNe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},ZNe=function(e){return function(t){return function(n){return function(r){if(JNe(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&He(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},eBe=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(Aee({reason:r.reason})))}}}},tBe=qZ,nBe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,s=e.autoScroller;return VZ(fNe,tBe(fDe(INe(r),KNe(t),RNe(t),NNe,XNe,YNe,eBe,ZNe(s),zNe,QNe(n),qNe(i,o))))},MN=function(){return{additions:{},removals:{},modified:{}}};function rBe(e){var t=e.registry,n=e.callbacks,r=MN(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var f=r,h=f.additions,p=f.removals,g=f.modified,v=Object.keys(h).map(function(_){return t.draggable.getById(_).getDimension(wi)}).sort(function(_,b){return _.descriptor.index-b.descriptor.index}),y=Object.keys(g).map(function(_){var b=t.droppable.getById(_),x=b.callbacks.getScrollWhileDragging();return{droppableId:_,scroll:x}}),S={additions:v,removals:Object.keys(p),modified:y};r=MN(),n.publish(S)}))},s=function(f){var h=f.descriptor.id;r.additions[h]=f,r.modified[f.descriptor.droppableId]=!0,r.removals[h]&&delete r.removals[h],o()},l=function(f){var h=f.descriptor;r.removals[h.id]=!0,r.modified[h.droppableId]=!0,r.additions[h.id]&&delete r.additions[h.id],o()},c=function(){i&&(cancelAnimationFrame(i),i=null,r=MN())};return{add:s,remove:l,stop:c}}var Oee=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=ks({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,o.x),y:Math.max(0,o.y)};return s},Mee=function(){var e=document.documentElement;return e||He(!1),e},Dee=function(){var e=Mee(),t=Oee({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},iBe=function(){var e=Pee(),t=Dee(),n=e.y,r=e.x,i=Mee(),o=i.clientWidth,s=i.clientHeight,l=r+o,c=n+s,d=nl({top:n,left:r,right:l,bottom:c}),f={frame:d,scroll:{initial:e,current:e,max:t,diff:{value:wi,displacement:wi}}};return f},oBe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=iBe(),o=i.scroll.current,s=t.droppable,l=r.droppable.getAllByType(s.type).map(function(h){return h.callbacks.getDimensionAndWatchScroll(o,n)}),c=r.draggable.getAllByType(t.draggable.type).map(function(h){return h.getDimension(o)}),d={draggables:cee(c),droppables:lee(l)},f={dimensions:d,critical:t,viewport:i};return f};function QG(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode==="virtual"}var sBe=function(e,t){var n=null,r=rBe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(g,v){e.droppable.exists(g)||He(!1),n&&t.updateDroppableIsEnabled({id:g,isEnabled:v})},o=function(g,v){n&&(e.droppable.exists(g)||He(!1),t.updateDroppableIsCombineEnabled({id:g,isCombineEnabled:v}))},s=function(g,v){n&&(e.droppable.exists(g)||He(!1),t.updateDroppableScroll({id:g,newScroll:v}))},l=function(g,v){n&&e.droppable.getById(g).callbacks.scroll(v)},c=function(){if(n){r.stop();var g=n.critical.droppable;e.droppable.getAllByType(g.type).forEach(function(v){return v.callbacks.dragStopped()}),n.unsubscribe(),n=null}},d=function(g){n||He(!1);var v=n.critical.draggable;g.type==="ADDITION"&&QG(e,v,g.value)&&r.add(g.value),g.type==="REMOVAL"&&QG(e,v,g.value)&&r.remove(g.value)},f=function(g){n&&He(!1);var v=e.draggable.getById(g.draggableId),y=e.droppable.getById(v.descriptor.droppableId),S={draggable:v.descriptor,droppable:y.descriptor},_=e.subscribe(d);return n={critical:S,unsubscribe:_},oBe({critical:S,registry:e,scrollOptions:g.scrollOptions})},h={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:l,updateDroppableScroll:s,startPublishing:f,stopPublishing:c};return h},Lee=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},aBe=function(e){window.scrollBy(e.x,e.y)},lBe=xi(function(e){return kk(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),cBe=function(t,n){var r=ef(lBe(n),function(i){return i.frame||He(!1),bee(i.frame.pageMarginBox)(t)});return r},uBe=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var o=cBe(t,r);return o},Id={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},dBe=function(e,t){var n=e[t.size]*Id.startFromPercentage,r=e[t.size]*Id.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},Nee=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;if(i===0)return 0;var o=r-t,s=o/i;return s},ej=1,fBe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Id.maxPixelScroll;if(e===t.startScrollingFrom)return ej;var n=Nee({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=Id.maxPixelScroll*Id.ease(r);return Math.ceil(i)},JG=Id.durationDampening.accelerateAt,ZG=Id.durationDampening.stopDampeningAt,hBe=function(e,t){var n=t,r=ZG,i=Date.now(),o=i-n;if(o>=ZG)return e;if(ot.height,o=n.width>t.width;return!o&&!i?r:o&&i?null:{x:o?0:r.x,y:i?0:r.y}},mBe=see(function(e){return e===0?0:e}),Bee=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,s={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},l=t9({container:n,distanceToEdges:s,dragStartTime:t,axis:Gz,shouldUseTimeDampening:o}),c=t9({container:n,distanceToEdges:s,dragStartTime:t,axis:fee,shouldUseTimeDampening:o}),d=mBe({x:c,y:l});if(Rd(d,wi))return null;var f=pBe({container:n,subject:r,proposedScroll:d});return f?Rd(f,wi)?null:f:null},gBe=see(function(e){return e===0?0:e>0?1:-1}),tj=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,i=t.change,o=Ui(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return Rd(s,wi)?null:s}}(),$ee=function(t){var n=t.max,r=t.current,i=t.change,o={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},s=gBe(i),l=tj({max:o,current:r,change:s});return!l||s.x!==0&&l.x===0||s.y!==0&&l.y===0},nj=function(t,n){return $ee({current:t.scroll.current,max:t.scroll.max,change:n})},vBe=function(t,n){if(!nj(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return tj({current:i,max:r,change:n})},rj=function(t,n){var r=t.frame;return r?$ee({current:r.scroll.current,max:r.scroll.max,change:n}):!1},yBe=function(t,n){var r=t.frame;return!r||!rj(t,n)?null:tj({current:r.scroll.current,max:r.scroll.max,change:n})},bBe=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=Bee({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return s&&nj(t,s)?s:null},xBe=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=t.frame;if(!s)return null;var l=Bee({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return l&&rj(t,l)?l:null},n9=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,s=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id],c=l.page.marginBox;if(t.isWindowScrollAllowed){var d=t.viewport,f=bBe({dragStartTime:n,viewport:d,subject:c,center:s,shouldUseTimeDampening:r});if(f){i(f);return}}var h=uBe({center:s,destination:Ps(t.impact),droppables:t.dimensions.droppables});if(h){var p=xBe({dragStartTime:n,droppable:h,subject:c,center:s,shouldUseTimeDampening:r});p&&o(h.descriptor.id,p)}},wBe=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=v1(t),i=v1(n),o=null,s=function(f){o||He(!1);var h=o,p=h.shouldUseTimeDampening,g=h.dragStartTime;n9({state:f,scrollWindow:r,scrollDroppable:i,dragStartTime:g,shouldUseTimeDampening:p})},l=function(f){o&&He(!1);var h=Date.now(),p=!1,g=function(){p=!0};n9({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:g,scrollDroppable:g}),o={dragStartTime:h,shouldUseTimeDampening:p},p&&s(f)},c=function(){o&&(r.cancel(),i.cancel(),o=null)};return{start:l,stop:c,scroll:s}},_Be=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(d,f){var h=Ui(d.current.client.selection,f);t({client:h})},o=function(d,f){if(!rj(d,f))return f;var h=yBe(d,f);if(!h)return n(d.descriptor.id,f),null;var p=ks(f,h);n(d.descriptor.id,p);var g=ks(f,p);return g},s=function(d,f,h){if(!d||!nj(f,h))return h;var p=vBe(f,h);if(!p)return r(h),null;var g=ks(h,p);r(g);var v=ks(h,g);return v},l=function(d){var f=d.scrollJumpRequest;if(f){var h=Ps(d.impact);h||He(!1);var p=o(d.dimensions.droppables[h],f);if(p){var g=d.viewport,v=s(d.isWindowScrollAllowed,g,p);v&&i(d,v)}}};return l},SBe=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=wBe({scrollWindow:n,scrollDroppable:t}),o=_Be({move:r,scrollWindow:n,scrollDroppable:t}),s=function(d){if(d.phase==="DRAGGING"){if(d.movementMode==="FLUID"){i.scroll(d);return}d.scrollJumpRequest&&o(d)}},l={scroll:s,start:i.start,stop:i.stop};return l},Lg="data-rbd",Ng=function(){var e=Lg+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),s3=function(){var e=Lg+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),EBe=function(){var e=Lg+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),r9={contextId:Lg+"-scroll-container-context-id"},CBe=function(t){return function(n){return"["+n+'="'+t+'"]'}},vb=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},TBe="pointer-events: none;",kBe=function(e){var t=CBe(e),n=function(){var l=` + `},$S={dragHandleUsageInstructions:oLe,onDragStart:sLe,onDragUpdate:aLe,onDragEnd:lLe},wi={x:0,y:0},Hi=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},ks=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},Rd=function(t,n){return t.x===n.x&&t.y===n.y},cv=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},_p=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},y1=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},jG=function(t,n){return Math.min.apply(Math,n.map(function(r){return y1(t,r)}))},see=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},cLe=function(e,t){var n=nl({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},dw=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},UG=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},uLe={top:0,right:0,bottom:0,left:0},dLe=function(t,n){return n?dw(t,n.scroll.diff.displacement):t},fLe=function(t,n,r){if(r&&r.increasedBy){var i;return $({},t,(i={},i[n.end]=t[n.end]+r.increasedBy[n.line],i))}return t},hLe=function(t,n){return n&&n.shouldClipSubject?cLe(n.pageMarginBox,t):nl(t)},Dg=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=dLe(t.marginBox,i),s=fLe(o,r,n),l=hLe(s,i);return{page:t,withPlaceholder:n,active:l}},Uz=function(e,t){e.frame||He(!1);var n=e.frame,r=ks(t,n.scroll.initial),i=cv(r),o=$({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=Dg({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),l=$({},e,{frame:o,subject:s});return l};function sC(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function Hz(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;ne.bottom,d=r.lefte.right,f=c&&d;if(f)return!0;var h=c&&s||d&&o;return h}},vLe=function(e){var t=fa(e.top,e.bottom),n=fa(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},Gz={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},fee={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},yLe=function(e){return function(t){var n=fa(t.top,t.bottom),r=fa(t.left,t.right);return function(i){return e===Gz?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},bLe=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:wi;return dw(t,r)},xLe=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},wLe=function(t,n,r){return r(n)(t)},Vz=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,l=o?bLe(n,r):n;return xLe(l,r,s)&&wLe(l,i,s)},_Le=function(t){return Vz($({},t,{isVisibleThroughFrameFn:dee}))},hee=function(t){return Vz($({},t,{isVisibleThroughFrameFn:vLe}))},SLe=function(t){return Vz($({},t,{isVisibleThroughFrameFn:yLe(t.destination.axis)}))},ELe=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var i=n.invisible,o=n.visible;if(i[t])return!1;var s=o[t];return s?s.shouldAnimate:!0};function CLe(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return nl(zz(n,r))}function x1(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,s=e.last;return t.reduce(function(c,d){var f=CLe(d,r),h=d.descriptor.id;c.all.push(h);var p=_Le({target:f,destination:n,viewport:i,withDroppableDisplacement:!0});if(!p)return c.invisible[d.descriptor.id]=!0,c;var g=ELe(h,s,o),v={draggableId:h,shouldAnimate:g};return c.visible[h]=v,c},{all:[],visible:{},invisible:{}})}function TLe(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function HG(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=TLe(t,{inHomeList:n});return{displaced:b1,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function aC(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,s=e.last,l=e.index,c=e.forceShouldAnimate,d=dv(t,r);if(l==null)return HG({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var f=ef(n,function(y){return y.descriptor.index===l});if(!f)return HG({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var h=Rk(t,n),p=n.indexOf(f),g=h.slice(p),v=x1({afterDragging:g,destination:r,displacedBy:o,last:s,viewport:i.frame,forceShouldAnimate:c});return{displaced:v,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function Fd(e,t){return!!t.effected[e]}var kLe=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var s=i.draggableId,l=r[s],c=l.descriptor.index,d=Fd(s,o);return d?t?c:c-1:t?c+1:c},ALe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,s=t?o+1:o-1,l=r[0].descriptor.index,c=r[r.length-1].descriptor.index,d=n?c:c+1;return sd?null:s},RLe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,s=e.insideDestination,l=e.previousImpact,c=e.viewport,d=e.afterCritical,f=l.at;if(f||He(!1),f.type==="REORDER"){var h=ALe({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:s});return h==null?null:aC({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:h})}var p=kLe({isMovingForward:t,destination:o,displaced:l.displaced,draggables:i,combine:f.combine,afterCritical:d});return p==null?null:aC({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:p})},ILe=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=!!(t.visible[r]||t.invisible[r]);return Fd(r,n)?o?wi:cv(i.point):o?i.point:wi},PLe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=Ak(n);i||He(!1);var o=i.draggableId,s=r[o].page.borderBox.center,l=ILe({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return Hi(s,l)},pee=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},OLe=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},qz=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},WG=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return _p(n.line,r.marginBox[n.end]+pee(n,i),qz(n,r.marginBox,i))},GG=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return _p(n.line,r.marginBox[n.start]-OLe(n,i),qz(n,r.marginBox,i))},MLe=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return _p(n.line,r.contentBox[n.start]+pee(n,i),qz(n,r.contentBox,i))},DLe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,s=uv(i.descriptor.id,r),l=n.page,c=i.axis;if(!s.length)return MLe({axis:c,moveInto:i.page,isMoving:l});var d=t.displaced,f=t.displacedBy,h=d.all[0];if(h){var p=r[h];if(Fd(h,o))return GG({axis:c,moveRelativeTo:p.page,isMoving:l});var g=nC(p.page,f.point);return GG({axis:c,moveRelativeTo:g,isMoving:l})}var v=s[s.length-1];if(v.descriptor.id===n.descriptor.id)return l.borderBox.center;if(Fd(v.descriptor.id,o)){var y=nC(v.page,cv(o.displacedBy.point));return WG({axis:c,moveRelativeTo:y,isMoving:l})}return WG({axis:c,moveRelativeTo:v.page,isMoving:l})},n3=function(e,t){var n=e.frame;return n?Hi(t,n.scroll.diff.displacement):t},LLe=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,s=t.afterCritical,l=r.page.borderBox.center,c=n.at;return!i||!c?l:c.type==="REORDER"?DLe({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:s}):PLe({impact:n,draggables:o,afterCritical:s})},Ik=function(e){var t=LLe(e),n=e.droppable,r=n?n3(n,t):t;return r},mee=function(e,t){var n=ks(t,e.scroll.initial),r=cv(n),i=nl({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),o={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return o};function VG(e,t){return e.map(function(n){return t[n]})}function NLe(e,t){for(var n=0;n1?f.sort(function(h,p){return bo(h)[l.start]-bo(p)[l.start]})[0]:d.sort(function(h,p){var g=jG(n,UG(bo(h))),v=jG(n,UG(bo(p)));return g!==v?g-v:bo(h)[l.start]-bo(p)[l.start]})[0]},qG=function(t,n){var r=t.page.borderBox.center;return Fd(t.descriptor.id,n)?ks(r,n.displacedBy.point):r},jLe=function(t,n){var r=t.page.borderBox;return Fd(t.descriptor.id,n)?dw(r,cv(n.displacedBy.point)):r},ULe=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,s=i.filter(function(l){return hee({target:jLe(l,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(l,c){var d=y1(t,n3(r,qG(l,o))),f=y1(t,n3(r,qG(c,o)));return dt.left&&e.topt.top}function KLe(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(s){var l=s.axis,c=_p(s.axis.line,t.center[l.line],s.page.borderBox.center[l.crossAxisLine]);return{id:s.descriptor.id,distance:y1(i,c)}}).sort(function(s,l){return l.distance-s.distance});return o[0]?o[0].id:null}function QLe(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=kk(r).filter(function(o){if(!o.isEnabled)return!1;var s=o.subject.active;if(!s||!YLe(t,s))return!1;if(bee(s)(t.center))return!0;var l=o.axis,c=s.center[l.crossAxisLine],d=t[l.crossAxisStart],f=t[l.crossAxisEnd],h=fa(s[l.crossAxisStart],s[l.crossAxisEnd]),p=h(d),g=h(f);return!p&&!g?!0:p?dc});return i.length?i.length===1?i[0].descriptor.id:KLe({pageBorderBox:t,draggable:n,candidates:i}):null}var xee=function(t,n){return nl(dw(t,n))},JLe=function(e,t){var n=e.frame;return n?xee(t,n.scroll.diff.value):t};function wee(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function ZLe(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var eNe=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,s=e.viewport,l=e.afterCritical,c=r.axis,d=fw(r.axis,n.displaceBy),f=d.value,h=t[c.start],p=t[c.end],g=Rk(n,i),v=ef(g,function(S){var _=S.descriptor.id,b=S.page.borderBox.center[c.line],x=Fd(_,l),E=wee({displaced:o,id:_});return x?E?p<=b:h_[l.start]+x&&h<_[l.end]-x:f>_[l.start]-d+x&&f<_[l.end]-d-x:A?h>_[l.start]+d+x&&h<_[l.end]+d-x:f>_[l.start]+x&&f<_[l.end]-x});if(!g)return null;var v={displacedBy:c,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:g.descriptor.id,droppableId:i.descriptor.id}}};return v},_ee=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,s=e.viewport,l=e.afterCritical,c=xee(n.page.borderBox,t),d=QLe({pageBorderBox:c,draggable:n,droppables:i});if(!d)return gLe;var f=i[d],h=uv(f.descriptor.id,r),p=JLe(f,c);return nNe({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:o,destination:f,insideDestination:h,afterCritical:l})||eNe({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:f,insideDestination:h,last:o.displaced,viewport:s,afterCritical:l})},Yz=function(e,t){var n;return $({},e,(n={},n[t.descriptor.id]=t,n))},rNe=function(t){var n=t.previousImpact,r=t.impact,i=t.droppables,o=Ps(n),s=Ps(r);if(!o||o===s)return i;var l=i[o];if(!l.subject.withPlaceholder)return i;var c=WLe(l);return Yz(i,c)},iNe=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,s=rNe({previousImpact:i,impact:o,droppables:r}),l=Ps(o);if(!l)return s;var c=r[l];if(dv(t,c)||c.subject.withPlaceholder)return s;var d=yee(c,t,n);return Yz(s,d)},xx=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,s=e.scrollJumpRequest,l=i||t.viewport,c=r||t.dimensions,d=n||t.current.client.selection,f=ks(d,t.initial.client.selection),h={offset:f,selection:d,borderBoxCenter:Hi(t.initial.client.borderBoxCenter,f)},p={selection:Hi(h.selection,l.scroll.current),borderBoxCenter:Hi(h.borderBoxCenter,l.scroll.current),offset:Hi(h.offset,l.scroll.diff.value)},g={client:h,page:p};if(t.phase==="COLLECTING")return $({phase:"COLLECTING"},t,{dimensions:c,viewport:l,current:g});var v=c.draggables[t.critical.draggable.id],y=o||_ee({pageOffset:p.offset,draggable:v,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),S=iNe({draggable:v,impact:y,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables}),_=$({},t,{current:g,dimensions:{draggables:c.draggables,droppables:S},impact:y,viewport:l,scrollJumpRequest:s||null,forceShouldAnimate:s?!1:null});return _};function oNe(e,t){return e.map(function(n){return t[n]})}var See=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,s=t.displaced,l=oNe(s.all,r),c=x1({afterDragging:l,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:s});return $({},t,{displaced:c})},Eee=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,s=e.afterCritical,l=Ik({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s});return Xz({pageBorderBoxCenter:l,draggable:n,viewport:o})},Cee=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&He(!1);var i=t.impact,o=r||t.viewport,s=n||t.dimensions,l=s.draggables,c=s.droppables,d=l[t.critical.draggable.id],f=Ps(i);f||He(!1);var h=c[f],p=See({impact:i,viewport:o,destination:h,draggables:l}),g=Eee({impact:p,draggable:d,droppable:h,draggables:l,viewport:o,afterCritical:t.afterCritical});return xx({impact:p,clientSelection:g,state:t,dimensions:s,viewport:o})},sNe=function(e){return{index:e.index,droppableId:e.droppableId}},Tee=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=fw(n.axis,t.displaceBy),s=uv(n.descriptor.id,r),l=s.indexOf(t);l===-1&&He(!1);var c=s.slice(l+1),d=c.reduce(function(g,v){return g[v.descriptor.id]=!0,g},{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:d},h=x1({afterDragging:c,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),p={displaced:h,displacedBy:o,at:{type:"REORDER",destination:sNe(t.descriptor)}};return{impact:p,afterCritical:f}},aNe=function(e,t){return{draggables:e.draggables,droppables:Yz(e.droppables,t)}},lNe=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=nC(t.client,n),o=rC(i,r),s=$({},t,{placeholder:$({},t.placeholder,{client:i}),client:i,page:o});return s},cNe=function(e){var t=e.frame;return t||He(!1),t},uNe=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(o){var s=o.descriptor.droppableId,l=n[s],c=cNe(l),d=c.scroll.diff.value,f=Hi(i,d),h=lNe({draggable:o,offset:f,initialWindowScroll:r.scroll.initial});return h})},dNe=function(e){var t=e.state,n=e.published,r=n.modified.map(function(x){var E=t.dimensions.droppables[x.droppableId],A=Uz(E,x.scroll);return A}),i=$({},t.dimensions.droppables,{},lee(r)),o=cee(uNe({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s=$({},t.dimensions.draggables,{},o);n.removals.forEach(function(x){delete s[x]});var l={droppables:i,draggables:s},c=Ps(t.impact),d=c?l.droppables[c]:null,f=l.draggables[t.critical.draggable.id],h=l.droppables[t.critical.droppable.id],p=Tee({draggable:f,home:h,draggables:s,viewport:t.viewport}),g=p.impact,v=p.afterCritical,y=d&&d.isCombineEnabled?t.impact:g,S=_ee({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:y,viewport:t.viewport,afterCritical:v}),_=$({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:S,onLiftImpact:g,dimensions:l,afterCritical:v,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return _;var b=$({phase:"DROP_PENDING"},_,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return b},r3=function(t){return t.movementMode==="SNAP"},IN=function(t,n,r){var i=aNe(t.dimensions,n);return!r3(t)||r?xx({state:t,dimensions:i}):Cee({state:t,dimensions:i})};function PN(e){return e.isDragging&&e.movementMode==="SNAP"?$({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var XG={phase:"IDLE",completed:null,shouldFlush:!1},fNe=function(e,t){if(e===void 0&&(e=XG),t.type==="FLUSH")return $({},XG,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&He(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,s=n.dimensions,l=n.movementMode,c=s.draggables[r.draggable.id],d=s.droppables[r.droppable.id],f={selection:i,borderBoxCenter:c.client.borderBox.center,offset:wi},h={client:f,page:{selection:Hi(f.selection,o.scroll.initial),borderBoxCenter:Hi(f.selection,o.scroll.initial),offset:Hi(f.selection,o.scroll.diff.value)}},p=kk(s.droppables).every(function(ve){return!ve.isFixedOnPage}),g=Tee({draggable:c,home:d,draggables:s.draggables,viewport:o}),v=g.impact,y=g.afterCritical,S={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:s,initial:h,current:h,isWindowScrollAllowed:p,impact:v,afterCritical:y,onLiftImpact:v,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return S}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&He(!1);var _=$({phase:"COLLECTING"},e,{phase:"COLLECTING"});return _}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||He(!1),dNe({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Lh(e)||He(!1);var b=t.payload.client;return Rd(b,e.current.client.selection)?e:xx({state:e,clientSelection:b,impact:r3(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return PN(e);Lh(e)||He(!1);var x=t.payload,E=x.id,A=x.newScroll,R=e.dimensions.droppables[E];if(!R)return e;var k=Uz(R,A);return IN(e,k,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Lh(e)||He(!1);var O=t.payload,L=O.id,N=O.isEnabled,H=e.dimensions.droppables[L];H||He(!1),H.isEnabled===N&&He(!1);var W=$({},H,{isEnabled:N});return IN(e,W,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Lh(e)||He(!1);var z=t.payload,D=z.id,F=z.isCombineEnabled,j=e.dimensions.droppables[D];j||He(!1),j.isCombineEnabled===F&&He(!1);var V=$({},j,{isCombineEnabled:F});return IN(e,V,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Lh(e)||He(!1),e.isWindowScrollAllowed||He(!1);var G=t.payload.newScroll;if(Rd(e.viewport.scroll.current,G))return PN(e);var K=mee(e.viewport,G);return r3(e)?Cee({state:e,viewport:K}):xx({state:e,viewport:K})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Lh(e))return e;var Y=t.payload.maxScroll;if(Rd(Y,e.viewport.scroll.max))return e;var J=$({},e.viewport,{scroll:$({},e.viewport.scroll,{max:Y})});return $({phase:"DRAGGING"},e,{viewport:J})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&He(!1);var ie=XLe({state:e,type:t.type});return ie?xx({state:e,impact:ie.impact,clientSelection:ie.clientSelection,scrollJumpRequest:ie.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var ce=t.payload.reason;e.phase!=="COLLECTING"&&He(!1);var ue=$({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:ce});return ue}if(t.type==="DROP_ANIMATE"){var se=t.payload,Q=se.completed,ae=se.dropDuration,le=se.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||He(!1);var he={phase:"DROP_ANIMATING",completed:Q,dropDuration:ae,newHomeClientOffset:le,dimensions:e.dimensions};return he}if(t.type==="DROP_COMPLETE"){var pe=t.payload.completed;return{phase:"IDLE",completed:pe,shouldFlush:!1}}return e},hNe=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},pNe=function(t){return{type:"LIFT",payload:t}},mNe=function(t){return{type:"INITIAL_PUBLISH",payload:t}},gNe=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},vNe=function(){return{type:"COLLECTION_STARTING",payload:null}},yNe=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},bNe=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},xNe=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},kee=function(t){return{type:"MOVE",payload:t}},wNe=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},_Ne=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},SNe=function(){return{type:"MOVE_UP",payload:null}},ENe=function(){return{type:"MOVE_DOWN",payload:null}},CNe=function(){return{type:"MOVE_RIGHT",payload:null}},TNe=function(){return{type:"MOVE_LEFT",payload:null}},Kz=function(){return{type:"FLUSH",payload:null}},kNe=function(t){return{type:"DROP_ANIMATE",payload:t}},Qz=function(t){return{type:"DROP_COMPLETE",payload:t}},Aee=function(t){return{type:"DROP",payload:t}},ANe=function(t){return{type:"DROP_PENDING",payload:t}},Ree=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},RNe=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(i){return function(o){if(o.type!=="LIFT"){i(o);return}var s=o.payload,l=s.id,c=s.clientSelection,d=s.movementMode,f=n();f.phase==="DROP_ANIMATING"&&r(Qz({completed:f.completed})),n().phase!=="IDLE"&&He(!1),r(Kz()),r(hNe({draggableId:l,movementMode:d}));var h={shouldPublishImmediately:d==="SNAP"},p={draggableId:l,scrollOptions:h},g=e.startPublishing(p),v=g.critical,y=g.dimensions,S=g.viewport;r(mNe({critical:v,dimensions:y,clientSelection:c,movementMode:d,viewport:S}))}}}},INe=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},Jz={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},w1={opacity:{drop:0,combining:.7},scale:{drop:.75}},Zz={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},_h=Zz.outOfTheWay+"s "+Jz.outOfTheWay,wx={fluid:"opacity "+_h,snap:"transform "+_h+", opacity "+_h,drop:function(t){var n=t+"s "+Jz.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+_h,placeholder:"height "+_h+", width "+_h+", margin "+_h},YG=function(t){return Rd(t,wi)?null:"translate("+t.x+"px, "+t.y+"px)"},i3={moveTo:YG,drop:function(t,n){var r=YG(t);return r?n?r+" scale("+w1.scale.drop+")":r:null}},o3=Zz.minDropTime,Iee=Zz.maxDropTime,PNe=Iee-o3,KG=1500,ONe=.6,MNe=function(e){var t=e.current,n=e.destination,r=e.reason,i=y1(t,n);if(i<=0)return o3;if(i>=KG)return Iee;var o=i/KG,s=o3+PNe*o,l=r==="CANCEL"?s*ONe:s;return Number(l.toFixed(2))},DNe=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,s=r.draggables,l=r.droppables,c=Ps(t),d=c?l[c]:null,f=l[n.descriptor.droppableId],h=Eee({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:d||f,viewport:i}),p=ks(h,n.client.borderBox.center);return p},LNe=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,s=e.onLiftImpact;if(!r.at||n!=="DROP"){var l=See({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:l,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var c=$({},r,{displaced:b1});return{impact:c,didDropInsideDroppable:!0}},NNe=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(i){if(i.type!=="DROP"){r(i);return}var o=t(),s=i.payload.reason;if(o.phase==="COLLECTING"){n(ANe({reason:s}));return}if(o.phase!=="IDLE"){var l=o.phase==="DROP_PENDING"&&o.isWaiting;l&&He(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||He(!1);var c=o.critical,d=o.dimensions,f=d.draggables[o.critical.draggable.id],h=LNe({reason:s,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),p=h.impact,g=h.didDropInsideDroppable,v=g?Wz(p):null,y=g?Ak(p):null,S={index:c.draggable.index,droppableId:c.droppable.id},_={draggableId:f.descriptor.id,type:f.descriptor.type,source:S,reason:s,mode:o.movementMode,destination:v,combine:y},b=DNe({impact:p,draggable:f,dimensions:d,viewport:o.viewport,afterCritical:o.afterCritical}),x={critical:o.critical,afterCritical:o.afterCritical,result:_,impact:p},E=!Rd(o.current.client.offset,b)||!!_.combine;if(!E){n(Qz({completed:x}));return}var A=MNe({current:o.current.client.offset,destination:b,reason:s}),R={newHomeClientOffset:b,dropDuration:A,completed:x};n(kNe(R))}}}},Pee=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function BNe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function $Ne(e){var t=e.onWindowScroll;function n(){t(Pee())}var r=v1(n),i=BNe(r),o=Ad;function s(){return o!==Ad}function l(){s()&&He(!1),o=ia(window,[i])}function c(){s()||He(!1),r.cancel(),o(),o=Ad}return{start:l,stop:c,isActive:s}}var FNe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},zNe=function(e){var t=$Ne({onWindowScroll:function(r){e.dispatch(wNe({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&FNe(r)&&t.stop(),n(r)}}},jNe=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),i=function(s){t||n||(t=!0,e(s),clearTimeout(r))};return i.wasCalled=function(){return t},i},UNe=function(){var e=[],t=function(o){var s=Hz(e,function(d){return d.timerId===o});s===-1&&He(!1);var l=e.splice(s,1),c=l[0];c.callback()},n=function(o){var s=setTimeout(function(){return t(s)}),l={timerId:s,callback:o};e.push(l)},r=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(s){clearTimeout(s.timerId),s.callback()})}};return{add:n,flush:r}},HNe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},WNe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},GNe=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,i=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&i},gb=function(t,n){n()},w_=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},ON=function(t,n,r,i){if(!t){r(i(n));return}var o=jNe(r),s={announce:o};t(n,s),o.wasCalled()||r(i(n))},VNe=function(e,t){var n=UNe(),r=null,i=function(p,g){r&&He(!1),gb("onBeforeCapture",function(){var v=e().onBeforeCapture;if(v){var y={draggableId:p,mode:g};v(y)}})},o=function(p,g){r&&He(!1),gb("onBeforeDragStart",function(){var v=e().onBeforeDragStart;v&&v(w_(p,g))})},s=function(p,g){r&&He(!1);var v=w_(p,g);r={mode:g,lastCritical:p,lastLocation:v.source,lastCombine:null},n.add(function(){gb("onDragStart",function(){return ON(e().onDragStart,v,t,$S.onDragStart)})})},l=function(p,g){var v=Wz(g),y=Ak(g);r||He(!1);var S=!GNe(p,r.lastCritical);S&&(r.lastCritical=p);var _=!HNe(r.lastLocation,v);_&&(r.lastLocation=v);var b=!WNe(r.lastCombine,y);if(b&&(r.lastCombine=y),!(!S&&!_&&!b)){var x=$({},w_(p,r.mode),{combine:y,destination:v});n.add(function(){gb("onDragUpdate",function(){return ON(e().onDragUpdate,x,t,$S.onDragUpdate)})})}},c=function(){r||He(!1),n.flush()},d=function(p){r||He(!1),r=null,gb("onDragEnd",function(){return ON(e().onDragEnd,p,t,$S.onDragEnd)})},f=function(){if(r){var p=$({},w_(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});d(p)}};return{beforeCapture:i,beforeStart:o,start:s,update:l,flush:c,drop:d,abort:f}},qNe=function(e,t){var n=VNe(e,t);return function(r){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var s=o.payload.critical;n.beforeStart(s,o.payload.movementMode),i(o),n.start(s,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var l=o.payload.completed.result;n.flush(),i(o),n.drop(l);return}if(i(o),o.type==="FLUSH"){n.abort();return}var c=r.getState();c.phase==="DRAGGING"&&n.update(c.critical,c.impact)}}}},XNe=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&He(!1),e.dispatch(Qz({completed:r.completed}))}}},YNe=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&r(),i(o),o.type==="DROP_ANIMATE"){var s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var c=e.getState();c.phase==="DROP_ANIMATING"&&e.dispatch(Ree())}};n=requestAnimationFrame(function(){n=null,t=ia(window,[s])})}}}},KNe=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},QNe=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},JNe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},ZNe=function(e){return function(t){return function(n){return function(r){if(JNe(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&He(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},eBe=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(Aee({reason:r.reason})))}}}},tBe=qZ,nBe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,s=e.autoScroller;return VZ(fNe,tBe(fDe(INe(r),KNe(t),RNe(t),NNe,XNe,YNe,eBe,ZNe(s),zNe,QNe(n),qNe(i,o))))},MN=function(){return{additions:{},removals:{},modified:{}}};function rBe(e){var t=e.registry,n=e.callbacks,r=MN(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var f=r,h=f.additions,p=f.removals,g=f.modified,v=Object.keys(h).map(function(_){return t.draggable.getById(_).getDimension(wi)}).sort(function(_,b){return _.descriptor.index-b.descriptor.index}),y=Object.keys(g).map(function(_){var b=t.droppable.getById(_),x=b.callbacks.getScrollWhileDragging();return{droppableId:_,scroll:x}}),S={additions:v,removals:Object.keys(p),modified:y};r=MN(),n.publish(S)}))},s=function(f){var h=f.descriptor.id;r.additions[h]=f,r.modified[f.descriptor.droppableId]=!0,r.removals[h]&&delete r.removals[h],o()},l=function(f){var h=f.descriptor;r.removals[h.id]=!0,r.modified[h.droppableId]=!0,r.additions[h.id]&&delete r.additions[h.id],o()},c=function(){i&&(cancelAnimationFrame(i),i=null,r=MN())};return{add:s,remove:l,stop:c}}var Oee=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=ks({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,o.x),y:Math.max(0,o.y)};return s},Mee=function(){var e=document.documentElement;return e||He(!1),e},Dee=function(){var e=Mee(),t=Oee({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},iBe=function(){var e=Pee(),t=Dee(),n=e.y,r=e.x,i=Mee(),o=i.clientWidth,s=i.clientHeight,l=r+o,c=n+s,d=nl({top:n,left:r,right:l,bottom:c}),f={frame:d,scroll:{initial:e,current:e,max:t,diff:{value:wi,displacement:wi}}};return f},oBe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=iBe(),o=i.scroll.current,s=t.droppable,l=r.droppable.getAllByType(s.type).map(function(h){return h.callbacks.getDimensionAndWatchScroll(o,n)}),c=r.draggable.getAllByType(t.draggable.type).map(function(h){return h.getDimension(o)}),d={draggables:cee(c),droppables:lee(l)},f={dimensions:d,critical:t,viewport:i};return f};function QG(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode==="virtual"}var sBe=function(e,t){var n=null,r=rBe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(g,v){e.droppable.exists(g)||He(!1),n&&t.updateDroppableIsEnabled({id:g,isEnabled:v})},o=function(g,v){n&&(e.droppable.exists(g)||He(!1),t.updateDroppableIsCombineEnabled({id:g,isCombineEnabled:v}))},s=function(g,v){n&&(e.droppable.exists(g)||He(!1),t.updateDroppableScroll({id:g,newScroll:v}))},l=function(g,v){n&&e.droppable.getById(g).callbacks.scroll(v)},c=function(){if(n){r.stop();var g=n.critical.droppable;e.droppable.getAllByType(g.type).forEach(function(v){return v.callbacks.dragStopped()}),n.unsubscribe(),n=null}},d=function(g){n||He(!1);var v=n.critical.draggable;g.type==="ADDITION"&&QG(e,v,g.value)&&r.add(g.value),g.type==="REMOVAL"&&QG(e,v,g.value)&&r.remove(g.value)},f=function(g){n&&He(!1);var v=e.draggable.getById(g.draggableId),y=e.droppable.getById(v.descriptor.droppableId),S={draggable:v.descriptor,droppable:y.descriptor},_=e.subscribe(d);return n={critical:S,unsubscribe:_},oBe({critical:S,registry:e,scrollOptions:g.scrollOptions})},h={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:l,updateDroppableScroll:s,startPublishing:f,stopPublishing:c};return h},Lee=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},aBe=function(e){window.scrollBy(e.x,e.y)},lBe=xi(function(e){return kk(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),cBe=function(t,n){var r=ef(lBe(n),function(i){return i.frame||He(!1),bee(i.frame.pageMarginBox)(t)});return r},uBe=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var o=cBe(t,r);return o},Id={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},dBe=function(e,t){var n=e[t.size]*Id.startFromPercentage,r=e[t.size]*Id.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},Nee=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;if(i===0)return 0;var o=r-t,s=o/i;return s},ej=1,fBe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Id.maxPixelScroll;if(e===t.startScrollingFrom)return ej;var n=Nee({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=Id.maxPixelScroll*Id.ease(r);return Math.ceil(i)},JG=Id.durationDampening.accelerateAt,ZG=Id.durationDampening.stopDampeningAt,hBe=function(e,t){var n=t,r=ZG,i=Date.now(),o=i-n;if(o>=ZG)return e;if(ot.height,o=n.width>t.width;return!o&&!i?r:o&&i?null:{x:o?0:r.x,y:i?0:r.y}},mBe=see(function(e){return e===0?0:e}),Bee=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,s={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},l=t9({container:n,distanceToEdges:s,dragStartTime:t,axis:Gz,shouldUseTimeDampening:o}),c=t9({container:n,distanceToEdges:s,dragStartTime:t,axis:fee,shouldUseTimeDampening:o}),d=mBe({x:c,y:l});if(Rd(d,wi))return null;var f=pBe({container:n,subject:r,proposedScroll:d});return f?Rd(f,wi)?null:f:null},gBe=see(function(e){return e===0?0:e>0?1:-1}),tj=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,i=t.change,o=Hi(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return Rd(s,wi)?null:s}}(),$ee=function(t){var n=t.max,r=t.current,i=t.change,o={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},s=gBe(i),l=tj({max:o,current:r,change:s});return!l||s.x!==0&&l.x===0||s.y!==0&&l.y===0},nj=function(t,n){return $ee({current:t.scroll.current,max:t.scroll.max,change:n})},vBe=function(t,n){if(!nj(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return tj({current:i,max:r,change:n})},rj=function(t,n){var r=t.frame;return r?$ee({current:r.scroll.current,max:r.scroll.max,change:n}):!1},yBe=function(t,n){var r=t.frame;return!r||!rj(t,n)?null:tj({current:r.scroll.current,max:r.scroll.max,change:n})},bBe=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=Bee({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return s&&nj(t,s)?s:null},xBe=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=t.frame;if(!s)return null;var l=Bee({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return l&&rj(t,l)?l:null},n9=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,s=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id],c=l.page.marginBox;if(t.isWindowScrollAllowed){var d=t.viewport,f=bBe({dragStartTime:n,viewport:d,subject:c,center:s,shouldUseTimeDampening:r});if(f){i(f);return}}var h=uBe({center:s,destination:Ps(t.impact),droppables:t.dimensions.droppables});if(h){var p=xBe({dragStartTime:n,droppable:h,subject:c,center:s,shouldUseTimeDampening:r});p&&o(h.descriptor.id,p)}},wBe=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=v1(t),i=v1(n),o=null,s=function(f){o||He(!1);var h=o,p=h.shouldUseTimeDampening,g=h.dragStartTime;n9({state:f,scrollWindow:r,scrollDroppable:i,dragStartTime:g,shouldUseTimeDampening:p})},l=function(f){o&&He(!1);var h=Date.now(),p=!1,g=function(){p=!0};n9({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:g,scrollDroppable:g}),o={dragStartTime:h,shouldUseTimeDampening:p},p&&s(f)},c=function(){o&&(r.cancel(),i.cancel(),o=null)};return{start:l,stop:c,scroll:s}},_Be=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(d,f){var h=Hi(d.current.client.selection,f);t({client:h})},o=function(d,f){if(!rj(d,f))return f;var h=yBe(d,f);if(!h)return n(d.descriptor.id,f),null;var p=ks(f,h);n(d.descriptor.id,p);var g=ks(f,p);return g},s=function(d,f,h){if(!d||!nj(f,h))return h;var p=vBe(f,h);if(!p)return r(h),null;var g=ks(h,p);r(g);var v=ks(h,g);return v},l=function(d){var f=d.scrollJumpRequest;if(f){var h=Ps(d.impact);h||He(!1);var p=o(d.dimensions.droppables[h],f);if(p){var g=d.viewport,v=s(d.isWindowScrollAllowed,g,p);v&&i(d,v)}}};return l},SBe=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=wBe({scrollWindow:n,scrollDroppable:t}),o=_Be({move:r,scrollWindow:n,scrollDroppable:t}),s=function(d){if(d.phase==="DRAGGING"){if(d.movementMode==="FLUID"){i.scroll(d);return}d.scrollJumpRequest&&o(d)}},l={scroll:s,start:i.start,stop:i.stop};return l},Lg="data-rbd",Ng=function(){var e=Lg+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),s3=function(){var e=Lg+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),EBe=function(){var e=Lg+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),r9={contextId:Lg+"-scroll-container-context-id"},CBe=function(t){return function(n){return"["+n+'="'+t+'"]'}},vb=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},TBe="pointer-events: none;",kBe=function(e){var t=CBe(e),n=function(){var l=` cursor: -webkit-grab; cursor: grab; `;return{selector:t(Ng.contextId),styles:{always:` @@ -578,19 +578,19 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat -moz-user-select: none; -ms-user-select: none; overflow-anchor: none; - `}},s=[r,n,i,o];return{always:vb(s,"always"),resting:vb(s,"resting"),dragging:vb(s,"dragging"),dropAnimating:vb(s,"dropAnimating"),userCancel:vb(s,"userCancel")}},Os=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?I.useLayoutEffect:I.useEffect,DN=function(){var t=document.querySelector("head");return t||He(!1),t},i9=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function ABe(e,t){var n=xn(function(){return kBe(e)},[e]),r=I.useRef(null),i=I.useRef(null),o=xt(xi(function(h){var p=i.current;p||He(!1),p.textContent=h}),[]),s=xt(function(h){var p=r.current;p||He(!1),p.textContent=h},[]);Os(function(){!r.current&&!i.current||He(!1);var h=i9(t),p=i9(t);return r.current=h,i.current=p,h.setAttribute(Lg+"-always",e),p.setAttribute(Lg+"-dynamic",e),DN().appendChild(h),DN().appendChild(p),s(n.always),o(n.resting),function(){var g=function(y){var S=y.current;S||He(!1),DN().removeChild(S),y.current=null};g(r),g(i)}},[t,s,o,n.always,n.resting,e]);var l=xt(function(){return o(n.dragging)},[o,n.dragging]),c=xt(function(h){if(h==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),d=xt(function(){i.current&&o(n.resting)},[o,n.resting]),f=xn(function(){return{dragging:l,dropping:c,resting:d}},[l,c,d]);return f}var Fee=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Pk(e){return e instanceof Fee(e).HTMLElement}function RBe(e,t){var n="["+Ng.contextId+'="'+e+'"]',r=aee(document.querySelectorAll(n));if(!r.length)return null;var i=ef(r,function(o){return o.getAttribute(Ng.draggableId)===t});return!i||!Pk(i)?null:i}function IBe(e){var t=I.useRef({}),n=I.useRef(null),r=I.useRef(null),i=I.useRef(!1),o=xt(function(p,g){var v={id:p,focus:g};return t.current[p]=v,function(){var S=t.current,_=S[p];_!==v&&delete S[p]}},[]),s=xt(function(p){var g=RBe(e,p);g&&g!==document.activeElement&&g.focus()},[e]),l=xt(function(p,g){n.current===p&&(n.current=g)},[]),c=xt(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var p=n.current;p&&s(p)}))},[s]),d=xt(function(p){n.current=null;var g=document.activeElement;g&&g.getAttribute(Ng.draggableId)===p&&(n.current=p)},[]);Os(function(){return i.current=!0,function(){i.current=!1;var p=r.current;p&&cancelAnimationFrame(p)}},[]);var f=xn(function(){return{register:o,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l}},[o,d,c,l]);return f}function PBe(){var e={draggables:{},droppables:{}},t=[];function n(h){return t.push(h),function(){var g=t.indexOf(h);g!==-1&&t.splice(g,1)}}function r(h){t.length&&t.forEach(function(p){return p(h)})}function i(h){return e.draggables[h]||null}function o(h){var p=i(h);return p||He(!1),p}var s={register:function(p){e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:function(p,g){var v=e.draggables[g.descriptor.id];v&&v.uniqueId===p.uniqueId&&(delete e.draggables[g.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:function(p){var g=p.descriptor.id,v=i(g);v&&p.uniqueId===v.uniqueId&&(delete e.draggables[g],r({type:"REMOVAL",value:p}))},getById:o,findById:i,exists:function(p){return!!i(p)},getAllByType:function(p){return sC(e.draggables).filter(function(g){return g.descriptor.type===p})}};function l(h){return e.droppables[h]||null}function c(h){var p=l(h);return p||He(!1),p}var d={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var g=l(p.descriptor.id);g&&p.uniqueId===g.uniqueId&&delete e.droppables[p.descriptor.id]},getById:c,findById:l,exists:function(p){return!!l(p)},getAllByType:function(p){return sC(e.droppables).filter(function(g){return g.descriptor.type===p})}};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:d,subscribe:n,clean:f}}function OBe(){var e=xn(PBe,[]);return I.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var ij=de.createContext(null),lC=function(){var e=document.body;return e||He(!1),e},MBe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},DBe=function(t){return"rbd-announcement-"+t};function LBe(e){var t=xn(function(){return DBe(e)},[e]),n=I.useRef(null);I.useEffect(function(){var o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),$(o.style,MBe),lC().appendChild(o),function(){setTimeout(function(){var c=lC();c.contains(o)&&c.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=xt(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var NBe=0,BBe={separator:"::"};function oj(e,t){return t===void 0&&(t=BBe),xn(function(){return""+e+t.separator+NBe++},[t.separator,e])}function $Be(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function FBe(e){var t=e.contextId,n=e.text,r=oj("hidden-text",{separator:"-"}),i=xn(function(){return $Be({contextId:t,uniqueId:r})},[r,t]);return I.useEffect(function(){var s=document.createElement("div");return s.id=i,s.textContent=n,s.style.display="none",lC().appendChild(s),function(){var c=lC();c.contains(s)&&c.removeChild(s)}},[i,n]),i}var Ok=de.createContext(null);function zee(e){var t=I.useRef(e);return I.useEffect(function(){t.current=e}),t}function zBe(){var e=null;function t(){return!!e}function n(s){return s===e}function r(s){e&&He(!1);var l={abandon:s};return e=l,l}function i(){e||He(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var jBe=9,UBe=13,sj=27,jee=32,HBe=33,WBe=34,GBe=35,VBe=36,qBe=37,XBe=38,YBe=39,KBe=40,__,QBe=(__={},__[UBe]=!0,__[jBe]=!0,__),Uee=function(e){QBe[e.keyCode]&&e.preventDefault()},Mk=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=ef(t,function(r){return"on"+r in document});return n||e}(),Hee=0,o9=5;function JBe(e,t){return Math.abs(t.x-e.x)>=o9||Math.abs(t.y-e.y)>=o9}var s9={type:"IDLE"};function ZBe(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var l=s.button,c=s.clientX,d=s.clientY;if(l===Hee){var f={x:c,y:d},h=r();if(h.type==="DRAGGING"){s.preventDefault(),h.actions.move(f);return}h.type!=="PENDING"&&He(!1);var p=h.point;if(JBe(p,f)){s.preventDefault();var g=h.actions.fluidLift(f);i({type:"DRAGGING",actions:g})}}}},{eventName:"mouseup",fn:function(s){var l=r();if(l.type!=="DRAGGING"){t();return}s.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var l=r();if(l.type==="PENDING"){t();return}if(s.keyCode===sj){s.preventDefault(),t();return}Uee(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var l=r();if(l.type==="IDLE"&&He(!1),l.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:Mk,fn:t}]}function e$e(e){var t=I.useRef(s9),n=I.useRef(Ad),r=xn(function(){return{eventName:"mousedown",fn:function(h){if(!h.defaultPrevented&&h.button===Hee&&!(h.ctrlKey||h.metaKey||h.shiftKey||h.altKey)){var p=e.findClosestDraggableId(h);if(p){var g=e.tryGetLock(p,s,{sourceEvent:h});if(g){h.preventDefault();var v={x:h.clientX,y:h.clientY};n.current(),d(g,v)}}}}}},[e]),i=xn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(h){if(!h.defaultPrevented){var p=e.findClosestDraggableId(h);if(p){var g=e.findOptionsForDraggable(p);g&&(g.shouldRespectForcePress||e.canGetLock(p)&&h.preventDefault())}}}}},[e]),o=xt(function(){var h={passive:!1,capture:!0};n.current=ia(window,[i,r],h)},[i,r]),s=xt(function(){var f=t.current;f.type!=="IDLE"&&(t.current=s9,n.current(),o())},[o]),l=xt(function(){var f=t.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=xt(function(){var h={capture:!0,passive:!1},p=ZBe({cancel:l,completed:s,getPhase:function(){return t.current},setPhase:function(v){t.current=v}});n.current=ia(window,p,h)},[l,s]),d=xt(function(h,p){t.current.type!=="IDLE"&&He(!1),t.current={type:"PENDING",point:p,actions:h},c()},[c]);Os(function(){return o(),function(){n.current()}},[o])}var Kp;function t$e(){}var n$e=(Kp={},Kp[WBe]=!0,Kp[HBe]=!0,Kp[VBe]=!0,Kp[GBe]=!0,Kp);function r$e(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===sj){o.preventDefault(),n();return}if(o.keyCode===jee){o.preventDefault(),r();return}if(o.keyCode===KBe){o.preventDefault(),e.moveDown();return}if(o.keyCode===XBe){o.preventDefault(),e.moveUp();return}if(o.keyCode===YBe){o.preventDefault(),e.moveRight();return}if(o.keyCode===qBe){o.preventDefault(),e.moveLeft();return}if(n$e[o.keyCode]){o.preventDefault();return}Uee(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Mk,fn:n}]}function i$e(e){var t=I.useRef(t$e),n=xn(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==jee)return;var s=e.findClosestDraggableId(o);if(!s)return;var l=e.tryGetLock(s,f,{sourceEvent:o});if(!l)return;o.preventDefault();var c=!0,d=l.snapLift();t.current();function f(){c||He(!1),c=!1,t.current(),r()}t.current=ia(window,r$e(d,f),{capture:!0,passive:!1})}}},[e]),r=xt(function(){var o={passive:!1,capture:!0};t.current=ia(window,[n],o)},[n]);Os(function(){return r(),function(){t.current()}},[r])}var LN={type:"IDLE"},o$e=120,s$e=.15;function a$e(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.keyCode===sj&&i.preventDefault(),t()}},{eventName:Mk,fn:t}]}function l$e(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;var l=o.touches[0],c=l.clientX,d=l.clientY,f={x:c,y:d};o.preventDefault(),s.actions.move(f)}},{eventName:"touchend",fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}o.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var s=r();s.type==="IDLE"&&He(!1);var l=o.touches[0];if(l){var c=l.force>=s$e;if(c){var d=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){d&&t();return}if(d){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:Mk,fn:t}]}function c$e(e){var t=I.useRef(LN),n=I.useRef(Ad),r=xt(function(){return t.current},[]),i=xt(function(g){t.current=g},[]),o=xn(function(){return{eventName:"touchstart",fn:function(g){if(!g.defaultPrevented){var v=e.findClosestDraggableId(g);if(v){var y=e.tryGetLock(v,l,{sourceEvent:g});if(y){var S=g.touches[0],_=S.clientX,b=S.clientY,x={x:_,y:b};n.current(),h(y,x)}}}}}},[e]),s=xt(function(){var g={capture:!0,passive:!1};n.current=ia(window,[o],g)},[o]),l=xt(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i(LN),n.current(),s())},[s,i]),c=xt(function(){var p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),d=xt(function(){var g={capture:!0,passive:!1},v={cancel:c,completed:l,getPhase:r},y=ia(window,l$e(v),g),S=ia(window,a$e(v),g);n.current=function(){y(),S()}},[c,r,l]),f=xt(function(){var g=r();g.type!=="PENDING"&&He(!1);var v=g.actions.fluidLift(g.point);i({type:"DRAGGING",actions:v,hasMoved:!1})},[r,i]),h=xt(function(g,v){r().type!=="IDLE"&&He(!1);var y=setTimeout(f,o$e);i({type:"PENDING",point:v,actions:g,longPressTimerId:y}),d()},[d,r,i,f]);Os(function(){return s(),function(){n.current();var v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),i(LN))}},[r,s,i]),Os(function(){var g=ia(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return g},[])}var u$e={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Wee(e,t){if(t==null)return!1;var n=!!u$e[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Wee(e,t.parentElement)}function d$e(e,t){var n=t.target;return Pk(n)?Wee(e,n):!1}var f$e=function(e){return nl(e.getBoundingClientRect()).center};function h$e(e){return e instanceof Fee(e).Element}var p$e=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=ef(t,function(r){return r in Element.prototype});return n||e}();function Gee(e,t){return e==null?null:e[p$e](t)?e:Gee(e.parentElement,t)}function m$e(e,t){return e.closest?e.closest(t):Gee(e,t)}function g$e(e){return"["+Ng.contextId+'="'+e+'"]'}function v$e(e,t){var n=t.target;if(!h$e(n))return null;var r=g$e(e),i=m$e(n,r);return!i||!Pk(i)?null:i}function y$e(e,t){var n=v$e(e,t);return n?n.getAttribute(Ng.draggableId):null}function b$e(e,t){var n="["+s3.contextId+'="'+e+'"]',r=aee(document.querySelectorAll(n)),i=ef(r,function(o){return o.getAttribute(s3.id)===t});return!i||!Pk(i)?null:i}function x$e(e){e.preventDefault()}function S_(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function Vee(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!(!o||!o.options.isEnabled||!Lee(n.getState(),i))}function w$e(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,l=e.sourceEvent,c=Vee({lockAPI:t,store:r,registry:i,draggableId:o});if(!c)return null;var d=i.draggable.getById(o),f=b$e(n,d.descriptor.id);if(!f||l&&!d.options.canDragInteractiveElements&&d$e(f,l))return null;var h=t.claim(s||Ad),p="PRE_DRAG";function g(){return d.options.shouldRespectForcePress}function v(){return t.isActive(h)}function y(R,k){S_({expected:R,phase:p,isLockActive:v,shouldWarn:!0})&&r.dispatch(k())}var S=y.bind(null,"DRAGGING");function _(R){function k(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(k(),p!=="PRE_DRAG"&&He(!1)),r.dispatch(pNe(R.liftActionArgs)),p="DRAGGING";function O(L,N){if(N===void 0&&(N={shouldBlockNextClick:!1}),R.cleanup(),N.shouldBlockNextClick){var H=ia(window,[{eventName:"click",fn:x$e,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(H)}k(),r.dispatch(Aee({reason:L}))}return $({isActive:function(){return S_({expected:"DRAGGING",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,drop:function(N){return O("DROP",N)},cancel:function(N){return O("CANCEL",N)}},R.actions)}function b(R){var k=v1(function(L){S(function(){return kee({client:L})})}),O=_({liftActionArgs:{id:o,clientSelection:R,movementMode:"FLUID"},cleanup:function(){return k.cancel()},actions:{move:k}});return $({},O,{move:k})}function x(){var R={moveUp:function(){return S(SNe)},moveRight:function(){return S(CNe)},moveDown:function(){return S(ENe)},moveLeft:function(){return S(TNe)}};return _({liftActionArgs:{id:o,clientSelection:f$e(f),movementMode:"SNAP"},cleanup:Ad,actions:R})}function E(){var R=S_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!0});R&&t.release()}var A={isActive:function(){return S_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,fluidLift:b,snapLift:x,abort:E};return A}var _$e=[e$e,i$e,c$e];function S$e(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?_$e:[],i||[]),l=I.useState(function(){return zBe()})[0],c=xt(function(b,x){b.isDragging&&!x.isDragging&&l.tryAbandon()},[l]);Os(function(){var b=n.getState(),x=n.subscribe(function(){var E=n.getState();c(b,E),b=E});return x},[l,n,c]),Os(function(){return l.tryAbandon},[l.tryAbandon]);for(var d=xt(function(_){return Vee({lockAPI:l,registry:r,store:n,draggableId:_})},[l,r,n]),f=xt(function(_,b,x){return w$e({lockAPI:l,registry:r,contextId:t,store:n,draggableId:_,forceSensorStop:b,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null})},[t,l,r,n]),h=xt(function(_){return y$e(t,_)},[t]),p=xt(function(_){var b=r.draggable.findById(_);return b?b.options:null},[r.draggable]),g=xt(function(){l.isClaimed()&&(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Kz()))},[l,n]),v=xt(l.isClaimed,[l]),y=xn(function(){return{canGetLock:d,tryGetLock:f,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:g,isLockClaimed:v}},[d,f,h,p,g,v]),S=0;S{},onDeleteItem:o=()=>{},enabled:s=!1,element:l=C.jsx(vFe,{}),value:c,id:d,i:f=0,variant:h="default",extrasPlacement:p="center",autoFocus:g,cardStyle:v,sortable:y}){const[S,_]=I.useState(null),b=In(),x=E=>C.jsxs(dt,{display:"flex",alignItems:p,children:[y&&C.jsx("div",{...E,children:C.jsx(dt,{color:"text.secondary",sx:{pr:2},children:C.jsx(Sxe,{})})}),e!==null&&I.cloneElement(e,{style:{marginRight:b.spacing(1),marginTop:b.spacing(.5),marginBottom:b.spacing(.5)},color:"action"}),C.jsx(dt,{flexGrow:1,sx:{ml:e===null?2:0},children:I.cloneElement(l,{onDelete:()=>o(d??f),autoFocus:g,value:c,key:d??f,onValueChange:A=>i(d??f,A,s),onChange:A=>i(d??f,A.target.value,s),ref:A=>_(A)})}),C.jsxs(dt,{display:"flex",alignItems:"center",children:[t&&C.jsx(Tg,{color:"primary",edge:"end",onChange:(A,R)=>i(d??f,c,R),checked:s}),r&&C.jsx(mp,{edge:"end",onClick:()=>{S!=null&&S.focus&&S.focus()},children:C.jsx(ok,{})}),n&&C.jsx(mp,{onClick:()=>o(d??f),children:C.jsx(xxe,{})})]})]});return C.jsx(dFe,{index:f,draggableId:`${d}`,children:E=>C.jsx("div",{ref:E.innerRef,...E.draggableProps,children:C.jsx(dt,{sx:{pb:1,ml:2},children:h==="outlined"?C.jsx(ume,{variant:"outlined",style:{borderColor:"transparent",paddingRight:b.spacing(2),transition:b.transitions.create(["box-shadow","border-color"]),...v},children:x(E.dragHandleProps)}):x(E.dragHandleProps)})})})}function xFe(e,t,n){const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function wFe(e){const{addItemLabel:t="Add Item",label:n,text:r,onAddItem:i=()=>{},onDeleteItem:o=()=>{},items:s=[],placeholderText:l,autoFocus:c,getCategory:d,getOrder:f,onChange:h,extras:p}=e,g=yFe(),v=In(),[y,S]=I.useState(s),[_,b]=I.useState(-1);I.useEffect(()=>{const R=setTimeout(()=>{S(s)},v.transitions.duration.standard);return()=>{clearTimeout(R)}},[s,S,v.transitions.duration.standard]);const x=ee.uniqBy([...y,...s],R=>R.id).map(R=>s.find(k=>R.id===k.id)??R).map((R,k)=>{const{enabled:O,element:L,value:N,id:H}=R??{};return{value:N,render:W=>C.jsx(VD,{in:!!s.find(z=>z.id===R.id),unmountOnExit:!0,appear:!g,mountOnEnter:!0,children:C.jsx(bFe,{...e,onDeleteItem:z=>{o(z),b(-1)},enabled:O,element:L,value:N,id:H,i:k,autoFocus:c||k===_,...W})}),key:H,in:!!s.find(W=>W.id===R.id)}}),E=ee.sortBy(x,R=>d==null?void 0:d(R.value),R=>f==null?void 0:f(R.value)).map(R=>({...R,render:k=>C.jsx(dt,{children:R.render(k)},R.key)}));return C.jsx(A$e,{onDragEnd:R=>{if(!R.destination)return;const k=xFe(s,R.source.index,R.destination.index);h==null||h(k),S(k)},children:C.jsxs(yp,{subheader:n||r?C.jsx(C.Fragment,{children:C.jsxs(dpe,{disableSticky:!0,children:[n&&C.jsx(zt,{variant:"body1",gutterBottom:!0,color:"textPrimary",children:n}),r&&C.jsx(zt,{variant:"body2",color:"text.secondary",gutterBottom:!0,style:{marginBottom:v.spacing(3)},children:r})]})}):void 0,children:[C.jsx(dt,{mt:d?-1:0,children:C.jsx(Jee,{droppableId:"list",children:R=>C.jsxs("div",{...R.droppableProps,ref:R.innerRef,children:[(()=>{const k=[];return E.forEach((O,L)=>{d&&A(E,L,O)&&k.push(C.jsx(VD,{in:s.some(N=>d(N.value)===d(O.value)),appear:!0,children:C.jsx(dt,{pl:2,pb:2,pt:1,children:C.jsx(zt,{variant:"overline",color:"text.secondary",children:d(O.value)})})},d(O.value))),k.push(O.render())}),k})(),R.placeholder]})})}),C.jsx(VD,{in:!(s!=null&&s.length),children:C.jsx(dt,{ml:2,mb:1,pt:d?1:0,children:C.jsx(zt,{component:"div",color:"text.secondary",children:l??"No items"})})}),C.jsxs(dt,{p:2,pt:1,mb:-3,children:[C.jsx(AK,{disableElevation:!0,variant:"outlined",startIcon:C.jsx(fxe,{}),color:"primary",onClick:()=>{i(),b(s.length)},sx:{borderColor:R=>_n(R.palette.text.primary,R.palette.action.activatedOpacity)},children:C.jsx(dt,{sx:{color:"text.primary"},children:t})}),p]})]})});function A(R,k,O){return!!(d&&(R[k-1]===void 0||d(R[k-1].value)!==d(O.value)))}}function Dk({onChange:e,value:t=[],editor:n,create:r,...i}){const[o,s]=I.useState(t??[]);function l(c){s(c),e==null||e(c)}return I.useEffect(()=>{s(t)},[t]),C.jsx(dt,{sx:{ml:-2},children:C.jsx(wFe,{...i,items:o.map(c=>({id:c.key,value:c,element:n==null?void 0:n(c)})),useDelete:!0,useEdit:!1,onAddItem:()=>l==null?void 0:l([...o,{key:Do(),...r==null?void 0:r()}]),onDeleteItem:c=>l==null?void 0:l(ee.filter(o,d=>d.key!==c)),onChangeItem:(c,d)=>l==null?void 0:l(ee.map(o,f=>f.key===c?d:f)),onChange:c=>l==null?void 0:l(ee.map(c,d=>d.value))})})}const id=[{key:"equal",apply:(e,t)=>e===t},{key:"less-than",apply:(e,t)=>ee>t}],_Fe=["any","source","destination","expanding","generating","closing"];function SFe({value:e,onValueChange:t,properties:n}){var i,o;function r(s){t==null||t({...e,...s})}return C.jsxs(bn,{sx:{mx:-2},children:[C.jsx(mx,{placeholder:"Event",sx:{minWidth:160},items:ee.map(_Fe,s=>({value:s,label:ee.startCase(s)})),onChange:s=>r({type:s==="any"?void 0:s}),value:e.type??"any"}),C.jsx(tc,{flexItem:!0,orientation:"vertical",sx:{mx:2}}),C.jsx(mx,{placeholder:"Property",sx:{minWidth:140,textOverflow:"ellipsis",whiteSpace:"nowrap"},items:ee.map(n,s=>({value:s,label:C.jsxs(C.Fragment,{children:[ee.last(s.split(".")),C.jsx(Kr,{}),C.jsx(zt,{color:"text.secondary",variant:"body2",component:"span",children:`event.${s}`})]})})),onChange:s=>r({property:s}),value:e.property}),C.jsx(Kr,{}),C.jsx(mx,{placeholder:"Condition",items:id.map(s=>({value:s.key,label:ee.startCase(s.key)})),value:((i=e==null?void 0:e.condition)==null?void 0:i.key)??((o=id==null?void 0:id[0])==null?void 0:o.key),onChange:s=>r({condition:ee.find(id,{key:s})})}),C.jsx(Kr,{}),C.jsx(X1,{label:"Reference",fullWidth:!0,value:`${e.reference??0}`,variant:"filled",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},onChange:s=>r({reference:+s.target.value}),type:"number"}),C.jsx(Kr,{sx:{px:2}}),C.jsx(CF,{checked:!!e.active,onChange:(s,l)=>r({active:l})})]})}const EFe=["f","g"],CFe=["variables"];function TFe({layer:e}){const{layer:t,setLayer:n}=Kl(e),{breakpoints:r}=(t==null?void 0:t.source)??{};function i(s){t&&n(ko(t,l=>ee.set(l,"source.breakpoints",s)))}const o=ee.uniq([...EFe,...ee.flatMap(CFe,s=>ee.flatMap([],l=>ee.map(ee.keys(ee.get(l,s)),c=>`${s}.${c}`)))]);return C.jsx(dt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(dt,{sx:{minWidth:720,mb:2},children:C.jsx(Dk,{icon:null,value:r,useDelete:!0,useEdit:!1,editor:s=>C.jsx(SFe,{value:s,properties:o}),create:()=>({active:!0,property:o==null?void 0:o[0],condition:id==null?void 0:id[0],type:void 0,reference:0}),onChange:s=>i(s),addItemLabel:"Breakpoint",placeholderText:"Click the button below to add a breakpoint."})})})}function kFe(){const{controls:e,onChange:t,state:n}=Du(),[r,i]=I.useState("standard"),{key:o,setKey:s,layers:l,layer:c,setLayer:d}=Kl(),{monotonicF:f,monotonicG:h}=(c==null?void 0:c.source)??{};function p(g){return C.jsx(zt,{variant:"overline",color:"text.secondary",children:g})}return C.jsx(XQ,{value:r,children:C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsxs(Sn.Options,{children:[C.jsx(Xo,{icon:C.jsx(tv,{}),label:"Layer",value:o,items:ee.map(l,g=>({id:g.key,name:$o(g)})),onChange:s,showArrow:!0}),C.jsxs(JQ,{onChange:(g,v)=>i(v),children:[C.jsx(Mm,{label:"Standard",value:"standard"}),C.jsx(Mm,{label:"Advanced",value:"advanced"})]})]}),C.jsxs(Sn.Content,{children:[C.jsx(dt,{overflow:"auto",height:"100%",children:C.jsxs(dt,{pt:6,height:"100%",children:[C.jsxs(Bm,{value:"standard",children:[C.jsxs(dt,{children:[p("General"),C.jsxs(bn,{children:[C.jsx(CF,{label:"Monotonic f value",checked:!!f,disabled:!c,onChange:(g,v)=>c&&d(ko(c,y=>ee.set(y,"source.monotonicF",v)))}),C.jsx(Kr,{}),C.jsx(CF,{label:"Monotonic g value",checked:!!h,disabled:!c,onChange:(g,v)=>c&&d(ko(c,y=>ee.set(y,"source.monotonicG",v)))})]})]}),C.jsx(Kr,{}),C.jsxs(dt,{children:[p("Breakpoints"),C.jsx(TFe,{layer:c==null?void 0:c.key})]})]}),C.jsx(Bm,{value:"advanced",sx:{p:0,height:"100%"},children:C.jsx(YSe,{})})]})})," "]}),C.jsx(Sn.Extras,{children:e})]})})}function AFe(){const{controls:e,onChange:t,state:n}=Du(),[r]=tQ();return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{vertical:!0,children:r.length?C.jsx(rv,{y:!0,children:C.jsx(yp,{sx:{pt:6},children:ee.map(r,(i,o)=>C.jsxs("div",{children:[C.jsx(Qm,{children:C.jsx(sl,{primary:i.content,secondary:i.timestamp})}),C.jsx(tc,{})]},o))})}):C.jsx(eg,{pt:6,label:"Logs",icon:C.jsx(YK,{})})})}),C.jsx(Sn.Extras,{children:e})]})}var Zee={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof window<"u"?window:Nt,function(){if(typeof window>"u")return null;var n=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(f){return n.setTimeout(f,20)},i=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||function(f){n.clearTimeout(f)};function o(f,h){var p=Object.prototype.toString.call(f),g=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,v=0,y=f.length;if(g)for(;v=W&&(F+=N.value),N.mode==="max"&&z<=W&&(F+=N.value),D[j]||(D[j]=""),F&&(" "+D[j]+" ").indexOf(" "+F+" ")===-1&&(D[j]+=" "+F));for(var G in V)V.hasOwnProperty(G)&&(D[V[G]]?this.element.setAttribute(V[G],D[V[G]].substr(1)):this.element.removeAttribute(V[G]))}}function p(k,O){k.elementQueriesSetupInformation||(k.elementQueriesSetupInformation=new h(k,O)),k.elementQueriesSensor||(k.elementQueriesSensor=new n(k,function(){k.elementQueriesSetupInformation.call()}))}function g(k,O,L,N){if(typeof s[k]>"u"){s[k]=[];var H=l.length;o.innerHTML+=` + `}},s=[r,n,i,o];return{always:vb(s,"always"),resting:vb(s,"resting"),dragging:vb(s,"dragging"),dropAnimating:vb(s,"dropAnimating"),userCancel:vb(s,"userCancel")}},Os=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?I.useLayoutEffect:I.useEffect,DN=function(){var t=document.querySelector("head");return t||He(!1),t},i9=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function ABe(e,t){var n=xn(function(){return kBe(e)},[e]),r=I.useRef(null),i=I.useRef(null),o=xt(xi(function(h){var p=i.current;p||He(!1),p.textContent=h}),[]),s=xt(function(h){var p=r.current;p||He(!1),p.textContent=h},[]);Os(function(){!r.current&&!i.current||He(!1);var h=i9(t),p=i9(t);return r.current=h,i.current=p,h.setAttribute(Lg+"-always",e),p.setAttribute(Lg+"-dynamic",e),DN().appendChild(h),DN().appendChild(p),s(n.always),o(n.resting),function(){var g=function(y){var S=y.current;S||He(!1),DN().removeChild(S),y.current=null};g(r),g(i)}},[t,s,o,n.always,n.resting,e]);var l=xt(function(){return o(n.dragging)},[o,n.dragging]),c=xt(function(h){if(h==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),d=xt(function(){i.current&&o(n.resting)},[o,n.resting]),f=xn(function(){return{dragging:l,dropping:c,resting:d}},[l,c,d]);return f}var Fee=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Pk(e){return e instanceof Fee(e).HTMLElement}function RBe(e,t){var n="["+Ng.contextId+'="'+e+'"]',r=aee(document.querySelectorAll(n));if(!r.length)return null;var i=ef(r,function(o){return o.getAttribute(Ng.draggableId)===t});return!i||!Pk(i)?null:i}function IBe(e){var t=I.useRef({}),n=I.useRef(null),r=I.useRef(null),i=I.useRef(!1),o=xt(function(p,g){var v={id:p,focus:g};return t.current[p]=v,function(){var S=t.current,_=S[p];_!==v&&delete S[p]}},[]),s=xt(function(p){var g=RBe(e,p);g&&g!==document.activeElement&&g.focus()},[e]),l=xt(function(p,g){n.current===p&&(n.current=g)},[]),c=xt(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var p=n.current;p&&s(p)}))},[s]),d=xt(function(p){n.current=null;var g=document.activeElement;g&&g.getAttribute(Ng.draggableId)===p&&(n.current=p)},[]);Os(function(){return i.current=!0,function(){i.current=!1;var p=r.current;p&&cancelAnimationFrame(p)}},[]);var f=xn(function(){return{register:o,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l}},[o,d,c,l]);return f}function PBe(){var e={draggables:{},droppables:{}},t=[];function n(h){return t.push(h),function(){var g=t.indexOf(h);g!==-1&&t.splice(g,1)}}function r(h){t.length&&t.forEach(function(p){return p(h)})}function i(h){return e.draggables[h]||null}function o(h){var p=i(h);return p||He(!1),p}var s={register:function(p){e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:function(p,g){var v=e.draggables[g.descriptor.id];v&&v.uniqueId===p.uniqueId&&(delete e.draggables[g.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:function(p){var g=p.descriptor.id,v=i(g);v&&p.uniqueId===v.uniqueId&&(delete e.draggables[g],r({type:"REMOVAL",value:p}))},getById:o,findById:i,exists:function(p){return!!i(p)},getAllByType:function(p){return sC(e.draggables).filter(function(g){return g.descriptor.type===p})}};function l(h){return e.droppables[h]||null}function c(h){var p=l(h);return p||He(!1),p}var d={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var g=l(p.descriptor.id);g&&p.uniqueId===g.uniqueId&&delete e.droppables[p.descriptor.id]},getById:c,findById:l,exists:function(p){return!!l(p)},getAllByType:function(p){return sC(e.droppables).filter(function(g){return g.descriptor.type===p})}};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:d,subscribe:n,clean:f}}function OBe(){var e=xn(PBe,[]);return I.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var ij=de.createContext(null),lC=function(){var e=document.body;return e||He(!1),e},MBe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},DBe=function(t){return"rbd-announcement-"+t};function LBe(e){var t=xn(function(){return DBe(e)},[e]),n=I.useRef(null);I.useEffect(function(){var o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),$(o.style,MBe),lC().appendChild(o),function(){setTimeout(function(){var c=lC();c.contains(o)&&c.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=xt(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var NBe=0,BBe={separator:"::"};function oj(e,t){return t===void 0&&(t=BBe),xn(function(){return""+e+t.separator+NBe++},[t.separator,e])}function $Be(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function FBe(e){var t=e.contextId,n=e.text,r=oj("hidden-text",{separator:"-"}),i=xn(function(){return $Be({contextId:t,uniqueId:r})},[r,t]);return I.useEffect(function(){var s=document.createElement("div");return s.id=i,s.textContent=n,s.style.display="none",lC().appendChild(s),function(){var c=lC();c.contains(s)&&c.removeChild(s)}},[i,n]),i}var Ok=de.createContext(null);function zee(e){var t=I.useRef(e);return I.useEffect(function(){t.current=e}),t}function zBe(){var e=null;function t(){return!!e}function n(s){return s===e}function r(s){e&&He(!1);var l={abandon:s};return e=l,l}function i(){e||He(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var jBe=9,UBe=13,sj=27,jee=32,HBe=33,WBe=34,GBe=35,VBe=36,qBe=37,XBe=38,YBe=39,KBe=40,__,QBe=(__={},__[UBe]=!0,__[jBe]=!0,__),Uee=function(e){QBe[e.keyCode]&&e.preventDefault()},Mk=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=ef(t,function(r){return"on"+r in document});return n||e}(),Hee=0,o9=5;function JBe(e,t){return Math.abs(t.x-e.x)>=o9||Math.abs(t.y-e.y)>=o9}var s9={type:"IDLE"};function ZBe(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var l=s.button,c=s.clientX,d=s.clientY;if(l===Hee){var f={x:c,y:d},h=r();if(h.type==="DRAGGING"){s.preventDefault(),h.actions.move(f);return}h.type!=="PENDING"&&He(!1);var p=h.point;if(JBe(p,f)){s.preventDefault();var g=h.actions.fluidLift(f);i({type:"DRAGGING",actions:g})}}}},{eventName:"mouseup",fn:function(s){var l=r();if(l.type!=="DRAGGING"){t();return}s.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var l=r();if(l.type==="PENDING"){t();return}if(s.keyCode===sj){s.preventDefault(),t();return}Uee(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var l=r();if(l.type==="IDLE"&&He(!1),l.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:Mk,fn:t}]}function e$e(e){var t=I.useRef(s9),n=I.useRef(Ad),r=xn(function(){return{eventName:"mousedown",fn:function(h){if(!h.defaultPrevented&&h.button===Hee&&!(h.ctrlKey||h.metaKey||h.shiftKey||h.altKey)){var p=e.findClosestDraggableId(h);if(p){var g=e.tryGetLock(p,s,{sourceEvent:h});if(g){h.preventDefault();var v={x:h.clientX,y:h.clientY};n.current(),d(g,v)}}}}}},[e]),i=xn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(h){if(!h.defaultPrevented){var p=e.findClosestDraggableId(h);if(p){var g=e.findOptionsForDraggable(p);g&&(g.shouldRespectForcePress||e.canGetLock(p)&&h.preventDefault())}}}}},[e]),o=xt(function(){var h={passive:!1,capture:!0};n.current=ia(window,[i,r],h)},[i,r]),s=xt(function(){var f=t.current;f.type!=="IDLE"&&(t.current=s9,n.current(),o())},[o]),l=xt(function(){var f=t.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=xt(function(){var h={capture:!0,passive:!1},p=ZBe({cancel:l,completed:s,getPhase:function(){return t.current},setPhase:function(v){t.current=v}});n.current=ia(window,p,h)},[l,s]),d=xt(function(h,p){t.current.type!=="IDLE"&&He(!1),t.current={type:"PENDING",point:p,actions:h},c()},[c]);Os(function(){return o(),function(){n.current()}},[o])}var Kp;function t$e(){}var n$e=(Kp={},Kp[WBe]=!0,Kp[HBe]=!0,Kp[VBe]=!0,Kp[GBe]=!0,Kp);function r$e(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===sj){o.preventDefault(),n();return}if(o.keyCode===jee){o.preventDefault(),r();return}if(o.keyCode===KBe){o.preventDefault(),e.moveDown();return}if(o.keyCode===XBe){o.preventDefault(),e.moveUp();return}if(o.keyCode===YBe){o.preventDefault(),e.moveRight();return}if(o.keyCode===qBe){o.preventDefault(),e.moveLeft();return}if(n$e[o.keyCode]){o.preventDefault();return}Uee(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Mk,fn:n}]}function i$e(e){var t=I.useRef(t$e),n=xn(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==jee)return;var s=e.findClosestDraggableId(o);if(!s)return;var l=e.tryGetLock(s,f,{sourceEvent:o});if(!l)return;o.preventDefault();var c=!0,d=l.snapLift();t.current();function f(){c||He(!1),c=!1,t.current(),r()}t.current=ia(window,r$e(d,f),{capture:!0,passive:!1})}}},[e]),r=xt(function(){var o={passive:!1,capture:!0};t.current=ia(window,[n],o)},[n]);Os(function(){return r(),function(){t.current()}},[r])}var LN={type:"IDLE"},o$e=120,s$e=.15;function a$e(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.keyCode===sj&&i.preventDefault(),t()}},{eventName:Mk,fn:t}]}function l$e(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;var l=o.touches[0],c=l.clientX,d=l.clientY,f={x:c,y:d};o.preventDefault(),s.actions.move(f)}},{eventName:"touchend",fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}o.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var s=r();s.type==="IDLE"&&He(!1);var l=o.touches[0];if(l){var c=l.force>=s$e;if(c){var d=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){d&&t();return}if(d){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:Mk,fn:t}]}function c$e(e){var t=I.useRef(LN),n=I.useRef(Ad),r=xt(function(){return t.current},[]),i=xt(function(g){t.current=g},[]),o=xn(function(){return{eventName:"touchstart",fn:function(g){if(!g.defaultPrevented){var v=e.findClosestDraggableId(g);if(v){var y=e.tryGetLock(v,l,{sourceEvent:g});if(y){var S=g.touches[0],_=S.clientX,b=S.clientY,x={x:_,y:b};n.current(),h(y,x)}}}}}},[e]),s=xt(function(){var g={capture:!0,passive:!1};n.current=ia(window,[o],g)},[o]),l=xt(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i(LN),n.current(),s())},[s,i]),c=xt(function(){var p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),d=xt(function(){var g={capture:!0,passive:!1},v={cancel:c,completed:l,getPhase:r},y=ia(window,l$e(v),g),S=ia(window,a$e(v),g);n.current=function(){y(),S()}},[c,r,l]),f=xt(function(){var g=r();g.type!=="PENDING"&&He(!1);var v=g.actions.fluidLift(g.point);i({type:"DRAGGING",actions:v,hasMoved:!1})},[r,i]),h=xt(function(g,v){r().type!=="IDLE"&&He(!1);var y=setTimeout(f,o$e);i({type:"PENDING",point:v,actions:g,longPressTimerId:y}),d()},[d,r,i,f]);Os(function(){return s(),function(){n.current();var v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),i(LN))}},[r,s,i]),Os(function(){var g=ia(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return g},[])}var u$e={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Wee(e,t){if(t==null)return!1;var n=!!u$e[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Wee(e,t.parentElement)}function d$e(e,t){var n=t.target;return Pk(n)?Wee(e,n):!1}var f$e=function(e){return nl(e.getBoundingClientRect()).center};function h$e(e){return e instanceof Fee(e).Element}var p$e=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=ef(t,function(r){return r in Element.prototype});return n||e}();function Gee(e,t){return e==null?null:e[p$e](t)?e:Gee(e.parentElement,t)}function m$e(e,t){return e.closest?e.closest(t):Gee(e,t)}function g$e(e){return"["+Ng.contextId+'="'+e+'"]'}function v$e(e,t){var n=t.target;if(!h$e(n))return null;var r=g$e(e),i=m$e(n,r);return!i||!Pk(i)?null:i}function y$e(e,t){var n=v$e(e,t);return n?n.getAttribute(Ng.draggableId):null}function b$e(e,t){var n="["+s3.contextId+'="'+e+'"]',r=aee(document.querySelectorAll(n)),i=ef(r,function(o){return o.getAttribute(s3.id)===t});return!i||!Pk(i)?null:i}function x$e(e){e.preventDefault()}function S_(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function Vee(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!(!o||!o.options.isEnabled||!Lee(n.getState(),i))}function w$e(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,l=e.sourceEvent,c=Vee({lockAPI:t,store:r,registry:i,draggableId:o});if(!c)return null;var d=i.draggable.getById(o),f=b$e(n,d.descriptor.id);if(!f||l&&!d.options.canDragInteractiveElements&&d$e(f,l))return null;var h=t.claim(s||Ad),p="PRE_DRAG";function g(){return d.options.shouldRespectForcePress}function v(){return t.isActive(h)}function y(R,k){S_({expected:R,phase:p,isLockActive:v,shouldWarn:!0})&&r.dispatch(k())}var S=y.bind(null,"DRAGGING");function _(R){function k(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(k(),p!=="PRE_DRAG"&&He(!1)),r.dispatch(pNe(R.liftActionArgs)),p="DRAGGING";function O(L,N){if(N===void 0&&(N={shouldBlockNextClick:!1}),R.cleanup(),N.shouldBlockNextClick){var H=ia(window,[{eventName:"click",fn:x$e,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(H)}k(),r.dispatch(Aee({reason:L}))}return $({isActive:function(){return S_({expected:"DRAGGING",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,drop:function(N){return O("DROP",N)},cancel:function(N){return O("CANCEL",N)}},R.actions)}function b(R){var k=v1(function(L){S(function(){return kee({client:L})})}),O=_({liftActionArgs:{id:o,clientSelection:R,movementMode:"FLUID"},cleanup:function(){return k.cancel()},actions:{move:k}});return $({},O,{move:k})}function x(){var R={moveUp:function(){return S(SNe)},moveRight:function(){return S(CNe)},moveDown:function(){return S(ENe)},moveLeft:function(){return S(TNe)}};return _({liftActionArgs:{id:o,clientSelection:f$e(f),movementMode:"SNAP"},cleanup:Ad,actions:R})}function E(){var R=S_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!0});R&&t.release()}var A={isActive:function(){return S_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,fluidLift:b,snapLift:x,abort:E};return A}var _$e=[e$e,i$e,c$e];function S$e(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?_$e:[],i||[]),l=I.useState(function(){return zBe()})[0],c=xt(function(b,x){b.isDragging&&!x.isDragging&&l.tryAbandon()},[l]);Os(function(){var b=n.getState(),x=n.subscribe(function(){var E=n.getState();c(b,E),b=E});return x},[l,n,c]),Os(function(){return l.tryAbandon},[l.tryAbandon]);for(var d=xt(function(_){return Vee({lockAPI:l,registry:r,store:n,draggableId:_})},[l,r,n]),f=xt(function(_,b,x){return w$e({lockAPI:l,registry:r,contextId:t,store:n,draggableId:_,forceSensorStop:b,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null})},[t,l,r,n]),h=xt(function(_){return y$e(t,_)},[t]),p=xt(function(_){var b=r.draggable.findById(_);return b?b.options:null},[r.draggable]),g=xt(function(){l.isClaimed()&&(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Kz()))},[l,n]),v=xt(l.isClaimed,[l]),y=xn(function(){return{canGetLock:d,tryGetLock:f,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:g,isLockClaimed:v}},[d,f,h,p,g,v]),S=0;S{},onDeleteItem:o=()=>{},enabled:s=!1,element:l=C.jsx(vFe,{}),value:c,id:d,i:f=0,variant:h="default",extrasPlacement:p="center",autoFocus:g,cardStyle:v,sortable:y}){const[S,_]=I.useState(null),b=In(),x=E=>C.jsxs(dt,{display:"flex",alignItems:p,children:[y&&C.jsx("div",{...E,children:C.jsx(dt,{color:"text.secondary",sx:{pr:2},children:C.jsx(Sxe,{})})}),e!==null&&I.cloneElement(e,{style:{marginRight:b.spacing(1),marginTop:b.spacing(.5),marginBottom:b.spacing(.5)},color:"action"}),C.jsx(dt,{flexGrow:1,sx:{ml:e===null?2:0},children:I.cloneElement(l,{onDelete:()=>o(d??f),autoFocus:g,value:c,key:d??f,onValueChange:A=>i(d??f,A,s),onChange:A=>i(d??f,A.target.value,s),ref:A=>_(A)})}),C.jsxs(dt,{display:"flex",alignItems:"center",children:[t&&C.jsx(Tg,{color:"primary",edge:"end",onChange:(A,R)=>i(d??f,c,R),checked:s}),r&&C.jsx(mp,{edge:"end",onClick:()=>{S!=null&&S.focus&&S.focus()},children:C.jsx(ok,{})}),n&&C.jsx(mp,{onClick:()=>o(d??f),children:C.jsx(xxe,{})})]})]});return C.jsx(dFe,{index:f,draggableId:`${d}`,children:E=>C.jsx("div",{ref:E.innerRef,...E.draggableProps,children:C.jsx(dt,{sx:{pb:1,ml:2},children:h==="outlined"?C.jsx(ume,{variant:"outlined",style:{borderColor:"transparent",paddingRight:b.spacing(2),transition:b.transitions.create(["box-shadow","border-color"]),...v},children:x(E.dragHandleProps)}):x(E.dragHandleProps)})})})}function xFe(e,t,n){const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function wFe(e){const{addItemLabel:t="Add Item",label:n,text:r,onAddItem:i=()=>{},onDeleteItem:o=()=>{},items:s=[],placeholderText:l,autoFocus:c,getCategory:d,getOrder:f,onChange:h,extras:p}=e,g=yFe(),v=In(),[y,S]=I.useState(s),[_,b]=I.useState(-1);I.useEffect(()=>{const R=setTimeout(()=>{S(s)},v.transitions.duration.standard);return()=>{clearTimeout(R)}},[s,S,v.transitions.duration.standard]);const x=ee.uniqBy([...y,...s],R=>R.id).map(R=>s.find(k=>R.id===k.id)??R).map((R,k)=>{const{enabled:O,element:L,value:N,id:H}=R??{};return{value:N,render:W=>C.jsx(VD,{in:!!s.find(z=>z.id===R.id),unmountOnExit:!0,appear:!g,mountOnEnter:!0,children:C.jsx(bFe,{...e,onDeleteItem:z=>{o(z),b(-1)},enabled:O,element:L,value:N,id:H,i:k,autoFocus:c||k===_,...W})}),key:H,in:!!s.find(W=>W.id===R.id)}}),E=ee.sortBy(x,R=>d==null?void 0:d(R.value),R=>f==null?void 0:f(R.value)).map(R=>({...R,render:k=>C.jsx(dt,{children:R.render(k)},R.key)}));return C.jsx(A$e,{onDragEnd:R=>{if(!R.destination)return;const k=xFe(s,R.source.index,R.destination.index);h==null||h(k),S(k)},children:C.jsxs(yp,{subheader:n||r?C.jsx(C.Fragment,{children:C.jsxs(dpe,{disableSticky:!0,children:[n&&C.jsx(zt,{variant:"body1",gutterBottom:!0,color:"textPrimary",children:n}),r&&C.jsx(zt,{variant:"body2",color:"text.secondary",gutterBottom:!0,style:{marginBottom:v.spacing(3)},children:r})]})}):void 0,children:[C.jsx(dt,{mt:d?-1:0,children:C.jsx(Jee,{droppableId:"list",children:R=>C.jsxs("div",{...R.droppableProps,ref:R.innerRef,children:[(()=>{const k=[];return E.forEach((O,L)=>{d&&A(E,L,O)&&k.push(C.jsx(VD,{in:s.some(N=>d(N.value)===d(O.value)),appear:!0,children:C.jsx(dt,{pl:2,pb:2,pt:1,children:C.jsx(zt,{variant:"overline",color:"text.secondary",children:d(O.value)})})},d(O.value))),k.push(O.render())}),k})(),R.placeholder]})})}),C.jsx(VD,{in:!(s!=null&&s.length),children:C.jsx(dt,{ml:2,mb:1,pt:d?1:0,children:C.jsx(zt,{component:"div",color:"text.secondary",children:l??"No items"})})}),C.jsxs(dt,{p:2,pt:1,mb:-3,children:[C.jsx(AK,{disableElevation:!0,variant:"outlined",startIcon:C.jsx(fxe,{}),color:"primary",onClick:()=>{i(),b(s.length)},sx:{borderColor:R=>_n(R.palette.text.primary,R.palette.action.activatedOpacity)},children:C.jsx(dt,{sx:{color:"text.primary"},children:t})}),p]})]})});function A(R,k,O){return!!(d&&(R[k-1]===void 0||d(R[k-1].value)!==d(O.value)))}}function Dk({onChange:e,value:t=[],editor:n,create:r,...i}){const[o,s]=I.useState(t??[]);function l(c){s(c),e==null||e(c)}return I.useEffect(()=>{s(t)},[t]),C.jsx(dt,{sx:{ml:-2},children:C.jsx(wFe,{...i,items:o.map(c=>({id:c.key,value:c,element:n==null?void 0:n(c)})),useDelete:!0,useEdit:!1,onAddItem:()=>l==null?void 0:l([...o,{key:Do(),...r==null?void 0:r()}]),onDeleteItem:c=>l==null?void 0:l(ee.filter(o,d=>d.key!==c)),onChangeItem:(c,d)=>l==null?void 0:l(ee.map(o,f=>f.key===c?d:f)),onChange:c=>l==null?void 0:l(ee.map(c,d=>d.value))})})}const id=[{key:"equal",apply:(e,t)=>e===t},{key:"less-than",apply:(e,t)=>ee>t}],_Fe=["any","source","destination","expanding","generating","closing"];function SFe({value:e,onValueChange:t,properties:n}){var i,o;function r(s){t==null||t({...e,...s})}return C.jsxs(bn,{sx:{mx:-2},children:[C.jsx(mx,{placeholder:"Event",sx:{minWidth:160},items:ee.map(_Fe,s=>({value:s,label:ee.startCase(s)})),onChange:s=>r({type:s==="any"?void 0:s}),value:e.type??"any"}),C.jsx(tc,{flexItem:!0,orientation:"vertical",sx:{mx:2}}),C.jsx(mx,{placeholder:"Property",sx:{minWidth:140,textOverflow:"ellipsis",whiteSpace:"nowrap"},items:ee.map(n,s=>({value:s,label:C.jsxs(C.Fragment,{children:[ee.last(s.split(".")),C.jsx(Kr,{}),C.jsx(zt,{color:"text.secondary",variant:"body2",component:"span",children:`event.${s}`})]})})),onChange:s=>r({property:s}),value:e.property}),C.jsx(Kr,{}),C.jsx(mx,{placeholder:"Condition",items:id.map(s=>({value:s.key,label:ee.startCase(s.key)})),value:((i=e==null?void 0:e.condition)==null?void 0:i.key)??((o=id==null?void 0:id[0])==null?void 0:o.key),onChange:s=>r({condition:ee.find(id,{key:s})})}),C.jsx(Kr,{}),C.jsx(X1,{label:"Reference",fullWidth:!0,value:`${e.reference??0}`,variant:"filled",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},onChange:s=>r({reference:+s.target.value}),type:"number"}),C.jsx(Kr,{sx:{px:2}}),C.jsx(CF,{checked:!!e.active,onChange:(s,l)=>r({active:l})})]})}const EFe=["f","g"],CFe=["variables"];function TFe({layer:e}){const{layer:t,setLayer:n}=Kl(e),{breakpoints:r}=(t==null?void 0:t.source)??{};function i(s){t&&n(Ui(t,l=>ee.set(l,"source.breakpoints",s)))}const o=ee.uniq([...EFe,...ee.flatMap(CFe,s=>ee.flatMap([],l=>ee.map(ee.keys(ee.get(l,s)),c=>`${s}.${c}`)))]);return C.jsx(dt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(dt,{sx:{minWidth:720,mb:2},children:C.jsx(Dk,{icon:null,value:r,useDelete:!0,useEdit:!1,editor:s=>C.jsx(SFe,{value:s,properties:o}),create:()=>({active:!0,property:o==null?void 0:o[0],condition:id==null?void 0:id[0],type:void 0,reference:0}),onChange:s=>i(s),addItemLabel:"Breakpoint",placeholderText:"Click the button below to add a breakpoint."})})})}function kFe(){const{controls:e,onChange:t,state:n}=Du(),[r,i]=I.useState("standard"),{key:o,setKey:s,layers:l,layer:c,setLayer:d}=Kl(),{monotonicF:f,monotonicG:h}=(c==null?void 0:c.source)??{};function p(g){return C.jsx(zt,{variant:"overline",color:"text.secondary",children:g})}return C.jsx(XQ,{value:r,children:C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsxs(Sn.Options,{children:[C.jsx(Xo,{icon:C.jsx(tv,{}),label:"Layer",value:o,items:ee.map(l,g=>({id:g.key,name:$o(g)})),onChange:s,showArrow:!0}),C.jsxs(JQ,{onChange:(g,v)=>i(v),children:[C.jsx(Mm,{label:"Standard",value:"standard"}),C.jsx(Mm,{label:"Advanced",value:"advanced"})]})]}),C.jsxs(Sn.Content,{children:[C.jsx(dt,{overflow:"auto",height:"100%",children:C.jsxs(dt,{pt:6,height:"100%",children:[C.jsxs(Bm,{value:"standard",children:[C.jsxs(dt,{children:[p("General"),C.jsxs(bn,{children:[C.jsx(CF,{label:"Monotonic f value",checked:!!f,disabled:!c,onChange:(g,v)=>c&&d(Ui(c,y=>ee.set(y,"source.monotonicF",v)))}),C.jsx(Kr,{}),C.jsx(CF,{label:"Monotonic g value",checked:!!h,disabled:!c,onChange:(g,v)=>c&&d(Ui(c,y=>ee.set(y,"source.monotonicG",v)))})]})]}),C.jsx(Kr,{}),C.jsxs(dt,{children:[p("Breakpoints"),C.jsx(TFe,{layer:c==null?void 0:c.key})]})]}),C.jsx(Bm,{value:"advanced",sx:{p:0,height:"100%"},children:C.jsx(YSe,{})})]})})," "]}),C.jsx(Sn.Extras,{children:e})]})})}function AFe(){const{controls:e,onChange:t,state:n}=Du(),[r]=tQ();return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{vertical:!0,children:r.length?C.jsx(rv,{y:!0,children:C.jsx(yp,{sx:{pt:6},children:ee.map(r,(i,o)=>C.jsxs("div",{children:[C.jsx(Qm,{children:C.jsx(sl,{primary:i.content,secondary:i.timestamp})}),C.jsx(tc,{})]},o))})}):C.jsx(eg,{pt:6,label:"Logs",icon:C.jsx(YK,{})})})}),C.jsx(Sn.Extras,{children:e})]})}var Zee={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof window<"u"?window:Nt,function(){if(typeof window>"u")return null;var n=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(f){return n.setTimeout(f,20)},i=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||function(f){n.clearTimeout(f)};function o(f,h){var p=Object.prototype.toString.call(f),g=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,v=0,y=f.length;if(g)for(;v=W&&(F+=N.value),N.mode==="max"&&z<=W&&(F+=N.value),D[j]||(D[j]=""),F&&(" "+D[j]+" ").indexOf(" "+F+" ")===-1&&(D[j]+=" "+F));for(var G in V)V.hasOwnProperty(G)&&(D[V[G]]?this.element.setAttribute(V[G],D[V[G]].substr(1)):this.element.removeAttribute(V[G]))}}function p(k,O){k.elementQueriesSetupInformation||(k.elementQueriesSetupInformation=new h(k,O)),k.elementQueriesSensor||(k.elementQueriesSensor=new n(k,function(){k.elementQueriesSetupInformation.call()}))}function g(k,O,L,N){if(typeof s[k]>"u"){s[k]=[];var H=l.length;o.innerHTML+=` `+k+" {animation: 0.1s element-queries;}",o.innerHTML+=` `+k+" > .resize-sensor {min-width: "+H+"px;}",l.push(k)}s[k].push({mode:O,property:L,value:N})}function v(k){var O;if(document.querySelectorAll&&(O=k?k.querySelectorAll.bind(k):document.querySelectorAll.bind(document)),!O&&typeof $$<"u"&&(O=$$),!O&&typeof jQuery<"u"&&(O=jQuery),!O)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return O}function y(k){var O=v(k);for(var L in s)if(s.hasOwnProperty(L))for(var N=O(L,k),H=0,W=N.length;HL[Y].minWidth&&(K=Y);if(K||(K=H),W!==K)if(z[K])O[W].style.display="none",O[K].style.display="block",W=K;else{var J=new Image;J.onload=function(){O[K].src=N[K],O[W].style.display="none",O[K].style.display="block",z[K]=!0,W=K},J.src=N[K]}else O[K].src=N[K]}k.resizeSensorInstance=new n(k,G),G()}function _(){for(var k=v(),O=k("[data-responsive-image],[responsive-image]"),L=0,N=O.length;L img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img {width: 100%;}",o.innerHTML+=` -@keyframes element-queries { 0% { visibility: inherit; } }`,document.getElementsByTagName("head")[0].appendChild(o),R=!0);for(var O=0,L=document.styleSheets.length;O{if(r&&t)return r.addEventListener("scroll",t,{passive:!0}),()=>r.removeEventListener("scroll",t)},[r,t]),C.jsx("div",{...n,style:{height:"100%",width:"100%",overflow:"hidden scroll",...n.style},ref:o=>{i(o),e==null||e(o)},children:C.jsx(nte.Provider,{value:r,children:C.jsx("div",{style:{width:"100%"},children:n.children})})})}const nte=I.createContext(null);function OFe(){return I.useContext(nte)}function MFe(e=128){const[t,n]=I.useState(!0),[r,i]=I.useState(!0),[o,s]=I.useState(!0),[l,c]=I.useState(null),d=I.useRef(0);return I.useEffect(()=>{if(l){const f=()=>{{const h=l.scrollTop<=e;h!==o&&s(h)}{const h=l.scrollTop<=1;h!==r&&i(h)}d.current-l.scrollTop&&(Math.abs(d.current-l.scrollTop)>2&&d.current>=0&&n(d.current>l.scrollTop),d.current=l.scrollTop)};return l.addEventListener("scroll",f,{passive:!0}),()=>{l.removeEventListener("scroll",f)}}},[l,o,r,d,e]),[t||o,o,r,l,c]}function lj({children:e}){return C.jsx(zt,{variant:"h6",children:e})}function DFe({onClose:e=()=>{},style:t,elevatedStyle:n,children:r,transitionProperties:i=["box-shadow","background","border-bottom"],elevatedChildren:o,simple:s,position:l="sticky"}){const c=OFe(),d=In(),[,,f,,h]=MFe();I.useEffect(()=>{h(c)},[c,h]);const p=f?{background:d.palette.background.paper,...!s&&{boxShadow:d.shadows[0]},...t}:{background:d.palette.background.paper,...!s&&{boxShadow:d.shadows[4]},...n};return C.jsx(ofe,{elevation:0,position:l,style:{color:d.palette.text.primary,transition:d.transitions.create(i),...p},children:C.jsxs(Mbe,{children:[C.jsx(mp,{style:{marginRight:d.spacing(1)},"aria-label":"open drawer",edge:"start",onClick:()=>e(),children:C.jsx(hxe,{})}),r&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(vp,{in:!!(!o||f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(dt,{style:{width:"100%"},children:r})})}),o&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(vp,{in:!!(o&&!f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(dt,{style:{width:"100%"},children:o})})})]})})}function LFe({children:e,actions:t,width:n=480,height:r,onTarget:i,variant:o="default",scrollable:s=!0,...l}){var A;const[c,d]=I.useState(void 0);I.useEffect(()=>{e&&d(e)},[e]);const f=In(),h=uz(),[p,g]=I.useState(null),[v,y]=I.useState(null),[S,_]=I.useState(!1),[b,x]=I.useState(0);I.useEffect(()=>{if(p&&v&&!h&&!r){const R=()=>{const O=window.innerHeight-64{window.removeEventListener("resize",R),k.detach()}}},[p,v,h,r]);const E=o==="submodal"&&h;return C.jsxs(sge,{fullScreen:h,...l,style:{...E&&{paddingTop:f.spacing(8)},...l.style},PaperProps:{ref:R=>g(R),style:{...E&&{borderRadius:`${f.shape.borderRadius}px ${f.shape.borderRadius}px 0 0`},background:f.palette.background.paper,overflow:"hidden",height:r&&!h?r:S||h?"100%":b||"fit-content",position:"relative",maxWidth:"none",...(A=l.PaperProps)==null?void 0:A.style},...l.PaperProps},children:[C.jsx(PFe,{style:{height:"100%",width:h?void 0:n,maxWidth:"100%",overflow:s?void 0:"hidden"},onTarget:i,children:C.jsx("div",{ref:R=>y(R),style:{width:"100%",height:"100%"},children:c})}),t]})}function cj({options:e,appBar:t,trigger:n=()=>C.jsx(C.Fragment,{}),children:r}){return C.jsx(Op,{variant:"popover",children:({open:i,close:o,isOpen:s})=>C.jsxs(C.Fragment,{children:[I.cloneElement(n(i)),C.jsxs(LFe,{open:s,onClose:o,...e,children:[C.jsx(DFe,{onClose:o,...t}),r??(e==null?void 0:e.children)]})]})})}function NFe(e,t,n=600){const[r,i]=I.useState(e);I.useEffect(()=>void i(e),[i,e]);const o=I.useMemo(()=>ee.debounce(s=>t==null?void 0:t(s),n),[t,n]);return[r,s=>{i(s),o(s)}]}function BFe({value:e,onValueChange:t},n){var f,h,p;const[r,i]=NFe(e,t),o=g=>C.jsx(zt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:g}),s=g=>C.jsx(zt,{variant:"body1",children:g}),l=(g,v)=>C.jsxs(bn,{alignItems:"center",children:[s(g),C.jsx(Kr,{flex:1}),v]}),c=g=>g.map(v=>({id:v,name:ee.startCase(v)})),d=r.name||$o(e);return C.jsx(C.Fragment,{children:C.jsxs(Nd,{alignItems:"center",direction:"row",gap:2,children:[C.jsxs(dt,{py:1,ml:-1,children:[C.jsx(zt,{children:d}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:ee.startCase((f=r.source)==null?void 0:f.type)})]}),C.jsx(Kr,{flex:1}),C.jsx(Nd,{alignItems:"center",direction:"row",children:C.jsx(cj,{appBar:{children:C.jsx(lj,{children:"Edit Layer"})},trigger:g=>C.jsx(mp,{size:"small",onClick:g,children:C.jsx(ok,{})}),children:C.jsxs(dt,{p:2,children:[C.jsx(dt,{pb:2,children:C.jsx(X1,{fullWidth:!0,variant:"filled",label:"Layer Name",value:r.name??"",onChange:g=>i==null?void 0:i(ko(r,v=>ee.set(v,"name",g.target.value)))})}),o("Layer Options"),l("Transparency",C.jsx(Xo,{label:"Transparency",items:["25","50","75","100"].map(g=>({id:g,name:`${g}%`})),value:"100",showArrow:!0})),l("Display Mode",C.jsx(Xo,{label:"Display Mode",value:"normal",items:c(["normal","difference"]),showArrow:!0})),o("Source Options"),l("Type",C.jsx(Xo,{label:"Type",value:(h=r.source)==null?void 0:h.type,items:["map","trace","query"].map(g=>({id:g,name:ee.startCase(g)})),onChange:g=>i==null?void 0:i(ko(r,v=>{ee.set(v,"source",{type:g})})),showArrow:!0})),((p=r.source)==null?void 0:p.type)&&I.createElement(uw[r.source.type].editor,{onChange:g=>i(g(r)),value:r})]})})})]})})}const $Fe=I.forwardRef(BFe);function FFe(){const[{layers:e=[]},t]=Bp();return C.jsx(dt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(dt,{sx:{mb:2},children:C.jsx(Dk,{sortable:!0,icon:null,value:e,useDelete:!0,useReorder:!0,editor:n=>C.jsx($Fe,{value:n}),create:()=>({source:{type:"trace",trace:{}}}),onChange:n=>t(()=>({layers:n})),addItemLabel:"Layer",placeholderText:C.jsx(dt,{pt:2,children:"Click the button below to add a layer."})})})})}function zFe(){const{controls:e,onChange:t,state:n}=Du();return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsx(dt,{p:2,pr:1,pt:6,children:C.jsx(FFe,{})})}),C.jsx(Sn.Extras,{children:e})]})}function rte(e){return C.jsx(Exe,{...e,sx:{fontSize:12,transform:"translateY(1.75px) translateX(-2px)",...e.sx}})}function jFe({children:e}){return C.jsx(zt,{variant:"overline",sx:{my:-.75,display:"block"},children:e})}var uC={exports:{}};/** +@keyframes element-queries { 0% { visibility: inherit; } }`,document.getElementsByTagName("head")[0].appendChild(o),R=!0);for(var O=0,L=document.styleSheets.length;O{if(r&&t)return r.addEventListener("scroll",t,{passive:!0}),()=>r.removeEventListener("scroll",t)},[r,t]),C.jsx("div",{...n,style:{height:"100%",width:"100%",overflow:"hidden scroll",...n.style},ref:o=>{i(o),e==null||e(o)},children:C.jsx(nte.Provider,{value:r,children:C.jsx("div",{style:{width:"100%"},children:n.children})})})}const nte=I.createContext(null);function OFe(){return I.useContext(nte)}function MFe(e=128){const[t,n]=I.useState(!0),[r,i]=I.useState(!0),[o,s]=I.useState(!0),[l,c]=I.useState(null),d=I.useRef(0);return I.useEffect(()=>{if(l){const f=()=>{{const h=l.scrollTop<=e;h!==o&&s(h)}{const h=l.scrollTop<=1;h!==r&&i(h)}d.current-l.scrollTop&&(Math.abs(d.current-l.scrollTop)>2&&d.current>=0&&n(d.current>l.scrollTop),d.current=l.scrollTop)};return l.addEventListener("scroll",f,{passive:!0}),()=>{l.removeEventListener("scroll",f)}}},[l,o,r,d,e]),[t||o,o,r,l,c]}function lj({children:e}){return C.jsx(zt,{variant:"h6",children:e})}function DFe({onClose:e=()=>{},style:t,elevatedStyle:n,children:r,transitionProperties:i=["box-shadow","background","border-bottom"],elevatedChildren:o,simple:s,position:l="sticky"}){const c=OFe(),d=In(),[,,f,,h]=MFe();I.useEffect(()=>{h(c)},[c,h]);const p=f?{background:d.palette.background.paper,...!s&&{boxShadow:d.shadows[0]},...t}:{background:d.palette.background.paper,...!s&&{boxShadow:d.shadows[4]},...n};return C.jsx(ofe,{elevation:0,position:l,style:{color:d.palette.text.primary,transition:d.transitions.create(i),...p},children:C.jsxs(Mbe,{children:[C.jsx(mp,{style:{marginRight:d.spacing(1)},"aria-label":"open drawer",edge:"start",onClick:()=>e(),children:C.jsx(hxe,{})}),r&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(vp,{in:!!(!o||f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(dt,{style:{width:"100%"},children:r})})}),o&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(vp,{in:!!(o&&!f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(dt,{style:{width:"100%"},children:o})})})]})})}function LFe({children:e,actions:t,width:n=480,height:r,onTarget:i,variant:o="default",scrollable:s=!0,...l}){var A;const[c,d]=I.useState(void 0);I.useEffect(()=>{e&&d(e)},[e]);const f=In(),h=uz(),[p,g]=I.useState(null),[v,y]=I.useState(null),[S,_]=I.useState(!1),[b,x]=I.useState(0);I.useEffect(()=>{if(p&&v&&!h&&!r){const R=()=>{const O=window.innerHeight-64{window.removeEventListener("resize",R),k.detach()}}},[p,v,h,r]);const E=o==="submodal"&&h;return C.jsxs(sge,{fullScreen:h,...l,style:{...E&&{paddingTop:f.spacing(8)},...l.style},PaperProps:{ref:R=>g(R),style:{...E&&{borderRadius:`${f.shape.borderRadius}px ${f.shape.borderRadius}px 0 0`},background:f.palette.background.paper,overflow:"hidden",height:r&&!h?r:S||h?"100%":b||"fit-content",position:"relative",maxWidth:"none",...(A=l.PaperProps)==null?void 0:A.style},...l.PaperProps},children:[C.jsx(PFe,{style:{height:"100%",width:h?void 0:n,maxWidth:"100%",overflow:s?void 0:"hidden"},onTarget:i,children:C.jsx("div",{ref:R=>y(R),style:{width:"100%",height:"100%"},children:c})}),t]})}function cj({options:e,appBar:t,trigger:n=()=>C.jsx(C.Fragment,{}),children:r}){return C.jsx(Op,{variant:"popover",children:({open:i,close:o,isOpen:s})=>C.jsxs(C.Fragment,{children:[I.cloneElement(n(i)),C.jsxs(LFe,{open:s,onClose:o,...e,children:[C.jsx(DFe,{onClose:o,...t}),r??(e==null?void 0:e.children)]})]})})}const NFe=["color","color-burn","color-dodge","copy","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","lighten","lighter","luminosity","multiply","overlay","saturation","screen","soft-light","source-atop","source-in","source-out","source-over","xor"];function BFe(e,t,n=600){const[r,i]=I.useState(e);I.useEffect(()=>void i(e),[i,e]);const o=I.useMemo(()=>ee.debounce(s=>t==null?void 0:t(s),n),[t,n]);return[r,s=>{i(s),o(s)}]}function $Fe({value:e,onValueChange:t},n){var f,h,p;const[r,i]=BFe(e,t),o=g=>C.jsx(zt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:g}),s=g=>C.jsx(zt,{variant:"body1",children:g}),l=(g,v)=>C.jsxs(bn,{alignItems:"center",children:[s(g),C.jsx(Kr,{flex:1}),v]}),c=g=>g.map(v=>({id:v,name:ee.startCase(v)})),d=r.name||$o(e);return C.jsx(C.Fragment,{children:C.jsxs(Nd,{alignItems:"center",direction:"row",gap:2,children:[C.jsxs(dt,{py:1,ml:-1,children:[C.jsx(zt,{children:d}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:ee.startCase((f=r.source)==null?void 0:f.type)})]}),C.jsx(Kr,{flex:1}),C.jsx(Nd,{alignItems:"center",direction:"row",children:C.jsx(cj,{appBar:{children:C.jsx(lj,{children:"Edit Layer"})},trigger:g=>C.jsx(mp,{size:"small",onClick:g,children:C.jsx(ok,{})}),children:C.jsxs(dt,{p:2,children:[C.jsx(dt,{pb:2,children:C.jsx(X1,{fullWidth:!0,variant:"filled",label:"Layer Name",value:r.name??"",onChange:g=>i==null?void 0:i(Ui(r,v=>ee.set(v,"name",g.target.value)))})}),o("Layer Options"),l("Transparency",C.jsx(Xo,{label:"Transparency",items:["0","25","50","75"].map(g=>({id:g,name:`${g}%`})),value:r.transparency??"0",showArrow:!0,onChange:g=>i==null?void 0:i(Ui(r,v=>ee.set(v,"transparency",g)))})),l("Display Mode",C.jsx(Xo,{label:"Display Mode",value:r.displayMode??"source-over",items:c(NFe),showArrow:!0,onChange:g=>i==null?void 0:i(Ui(r,v=>ee.set(v,"displayMode",g)))})),o("Source Options"),l("Type",C.jsx(Xo,{label:"Type",value:(h=r.source)==null?void 0:h.type,items:["map","trace","query"].map(g=>({id:g,name:ee.startCase(g)})),onChange:g=>i==null?void 0:i(Ui(r,v=>{ee.set(v,"source",{type:g})})),showArrow:!0})),((p=r.source)==null?void 0:p.type)&&I.createElement(uw[r.source.type].editor,{onChange:g=>i(g(r)),value:r})]})})})]})})}const FFe=I.forwardRef($Fe);function zFe(){const[{layers:e=[]},t]=Bp();return C.jsx(dt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(dt,{sx:{mb:2},children:C.jsx(Dk,{sortable:!0,icon:null,value:e,useDelete:!0,useReorder:!0,editor:n=>C.jsx(FFe,{value:n}),create:()=>({source:{type:"trace",trace:{}}}),onChange:n=>t(()=>({layers:n})),addItemLabel:"Layer",placeholderText:C.jsx(dt,{pt:2,children:"Click the button below to add a layer."})})})})}function jFe(){const{controls:e,onChange:t,state:n}=Du();return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsx(dt,{p:2,pr:1,pt:6,children:C.jsx(zFe,{})})}),C.jsx(Sn.Extras,{children:e})]})}function rte(e){return C.jsx(Exe,{...e,sx:{fontSize:12,transform:"translateY(1.75px) translateX(-2px)",...e.sx}})}function UFe({children:e}){return C.jsx(zt,{variant:"overline",sx:{my:-.75,display:"block"},children:e})}var uC={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */uC.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,g=4,v=1,y=2,S=1,_=2,b=4,x=8,E=16,A=32,R=64,k=128,O=256,L=512,N=30,H="...",W=800,z=16,D=1,F=2,j=3,V=1/0,G=9007199254740991,K=17976931348623157e292,Y=0/0,J=4294967295,ie=J-1,ce=J>>>1,ue=[["ary",k],["bind",S],["bindKey",_],["curry",x],["curryRight",E],["flip",L],["partial",A],["partialRight",R],["rearg",O]],se="[object Arguments]",Q="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",me="[object Map]",be="[object Number]",Qe="[object Null]",qe="[object Object]",at="[object Promise]",Lt="[object Proxy]",Ie="[object RegExp]",ze="[object Set]",it="[object String]",pt="[object Symbol]",mt="[object Undefined]",_e="[object WeakMap]",je="[object WeakSet]",Ye="[object ArrayBuffer]",$e="[object DataView]",Ne="[object Float32Array]",Rt="[object Float64Array]",ct="[object Int8Array]",Ae="[object Int16Array]",ot="[object Int32Array]",$t="[object Uint8Array]",Re="[object Uint8ClampedArray]",Ue="[object Uint16Array]",yt="[object Uint32Array]",Wt=/\b__p \+= '';/g,pn=/\b(__p \+=) '' \+/g,$r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Or=/&(?:amp|lt|gt|quot|#39);/g,Mr=/[&<>"']/g,Fr=RegExp(Or.source),Jr=RegExp(Mr.source),Zo=/<%-([\s\S]+?)%>/g,$u=/<%([\s\S]+?)%>/g,Gs=/<%=([\s\S]+?)%>/g,ac=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lc=/^\w*$/,sf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,es=/[\\^$.*+?()[\]{}|]/g,af=RegExp(es.source),oo=/^\s+/,cc=/\s/,Si=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ts=/\{\n\/\* \[wrapped with (.+)\] \*/,lf=/,? & /,ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wa=/[()=,{}\[\]\/\s]/,Fu=/\\(\\)?/g,Hn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jn=/\w*$/,bl=/^[-+]0x[0-9a-f]+$/i,xl=/^0b[01]+$/i,so=/^\[object .+?Constructor\]$/,xv=/^0o[0-7]+$/i,wv=/^(?:0|[1-9]\d*)$/,Qt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,aA=/['\n\r\u2028\u2029\\]/g,uc="\\ud800-\\udfff",lA="\\u0300-\\u036f",cA="\\ufe20-\\ufe2f",uA="\\u20d0-\\u20ff",_v=lA+cA+uA,Sv="\\u2700-\\u27bf",Ev="a-z\\xdf-\\xf6\\xf8-\\xff",dA="\\xac\\xb1\\xd7\\xf7",fA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hA="\\u2000-\\u206f",pA=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Cv="A-Z\\xc0-\\xd6\\xd8-\\xde",Tv="\\ufe0e\\ufe0f",kv=dA+fA+hA+pA,cf="['’]",mA="["+uc+"]",Av="["+kv+"]",dc="["+_v+"]",Rv="\\d+",gA="["+Sv+"]",Iv="["+Ev+"]",Pv="[^"+uc+kv+Rv+Sv+Ev+Cv+"]",uf="\\ud83c[\\udffb-\\udfff]",vA="(?:"+dc+"|"+uf+")",Ov="[^"+uc+"]",df="(?:\\ud83c[\\udde6-\\uddff]){2}",ff="[\\ud800-\\udbff][\\udc00-\\udfff]",rs="["+Cv+"]",Mv="\\u200d",Dv="(?:"+Iv+"|"+Pv+")",yA="(?:"+rs+"|"+Pv+")",Lv="(?:"+cf+"(?:d|ll|m|re|s|t|ve))?",Nv="(?:"+cf+"(?:D|LL|M|RE|S|T|VE))?",Bv=vA+"?",$v="["+Tv+"]?",bA="(?:"+Mv+"(?:"+[Ov,df,ff].join("|")+")"+$v+Bv+")*",xA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fv=$v+Bv+bA,_A="(?:"+[gA,df,ff].join("|")+")"+Fv,SA="(?:"+[Ov+dc+"?",dc,df,ff,mA].join("|")+")",EA=RegExp(cf,"g"),CA=RegExp(dc,"g"),hf=RegExp(uf+"(?="+uf+")|"+SA+Fv,"g"),TA=RegExp([rs+"?"+Iv+"+"+Lv+"(?="+[Av,rs,"$"].join("|")+")",yA+"+"+Nv+"(?="+[Av,rs+Dv,"$"].join("|")+")",rs+"?"+Dv+"+"+Lv,rs+"+"+Nv,wA,xA,Rv,_A].join("|"),"g"),kA=RegExp("["+Mv+uc+_v+Tv+"]"),AA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,RA=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],IA=-1,Pt={};Pt[Ne]=Pt[Rt]=Pt[ct]=Pt[Ae]=Pt[ot]=Pt[$t]=Pt[Re]=Pt[Ue]=Pt[yt]=!0,Pt[se]=Pt[Q]=Pt[Ye]=Pt[le]=Pt[$e]=Pt[he]=Pt[ve]=Pt[ye]=Pt[me]=Pt[be]=Pt[qe]=Pt[Ie]=Pt[ze]=Pt[it]=Pt[_e]=!1;var kt={};kt[se]=kt[Q]=kt[Ye]=kt[$e]=kt[le]=kt[he]=kt[Ne]=kt[Rt]=kt[ct]=kt[Ae]=kt[ot]=kt[me]=kt[be]=kt[qe]=kt[Ie]=kt[ze]=kt[it]=kt[pt]=kt[$t]=kt[Re]=kt[Ue]=kt[yt]=!0,kt[ve]=kt[ye]=kt[_e]=!1;var PA={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},OA={"&":"&","<":"<",">":">",'"':""","'":"'"},MA={"&":"&","<":"<",">":">",""":'"',"'":"'"},DA={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},LA=parseFloat,NA=parseInt,zv=typeof Nt=="object"&&Nt&&Nt.Object===Object&&Nt,BA=typeof self=="object"&&self&&self.Object===Object&&self,dn=zv||BA||Function("return this")(),pf=t&&!t.nodeType&&t,ao=pf&&!0&&e&&!e.nodeType&&e,jv=ao&&ao.exports===pf,mf=jv&&zv.process,tr=function(){try{var q=ao&&ao.require&&ao.require("util").types;return q||mf&&mf.binding&&mf.binding("util")}catch{}}(),Uv=tr&&tr.isArrayBuffer,Hv=tr&&tr.isDate,Wv=tr&&tr.isMap,Gv=tr&&tr.isRegExp,Vv=tr&&tr.isSet,qv=tr&&tr.isTypedArray;function Wn(q,te,Z){switch(Z.length){case 0:return q.call(te);case 1:return q.call(te,Z[0]);case 2:return q.call(te,Z[0],Z[1]);case 3:return q.call(te,Z[0],Z[1],Z[2])}return q.apply(te,Z)}function $A(q,te,Z,ge){for(var De=-1,ut=q==null?0:q.length;++De-1}function gf(q,te,Z){for(var ge=-1,De=q==null?0:q.length;++ge-1;);return Z}function ty(q,te){for(var Z=q.length;Z--&&is(te,q[Z],0)>-1;);return Z}function qA(q,te){for(var Z=q.length,ge=0;Z--;)q[Z]===te&&++ge;return ge}var XA=xf(PA),YA=xf(OA);function KA(q){return"\\"+DA[q]}function QA(q,te){return q==null?n:q[te]}function os(q){return kA.test(q)}function JA(q){return AA.test(q)}function ZA(q){for(var te,Z=[];!(te=q.next()).done;)Z.push(te.value);return Z}function Ef(q){var te=-1,Z=Array(q.size);return q.forEach(function(ge,De){Z[++te]=[De,ge]}),Z}function ny(q,te){return function(Z){return q(te(Z))}}function Ti(q,te){for(var Z=-1,ge=q.length,De=0,ut=[];++Z-1}function zR(a,u){var m=this.__data__,w=Rc(m,a);return w<0?(++this.size,m.push([a,u])):m[w][1]=u,this}Zr.prototype.clear=NR,Zr.prototype.delete=BR,Zr.prototype.get=$R,Zr.prototype.has=FR,Zr.prototype.set=zR;function ei(a){var u=-1,m=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function or(a,u,m,w,T,M){var B,U=u&h,X=u&p,ne=u&g;if(m&&(B=T?m(a,w,T,M):m(a)),B!==n)return B;if(!Ft(a))return a;var re=Be(a);if(re){if(B=WI(a),!U)return On(a,B)}else{var oe=vn(a),fe=oe==ye||oe==xe;if(Oi(a))return $y(a,U);if(oe==qe||oe==se||fe&&!T){if(B=X||fe?{}:r0(a),!U)return X?MI(a,nI(B,a)):OI(a,py(B,a))}else{if(!kt[oe])return T?a:{};B=GI(a,oe,U)}}M||(M=new br);var we=M.get(a);if(we)return we;M.set(a,B),O0(a)?a.forEach(function(ke){B.add(or(ke,u,m,ke,a,M))}):I0(a)&&a.forEach(function(ke,Ke){B.set(Ke,or(ke,u,m,Ke,a,M))});var Te=ne?X?Kf:Yf:X?Dn:nn,Ve=re?n:Te(a);return nr(Ve||a,function(ke,Ke){Ve&&(Ke=ke,ke=a[Ke]),Aa(B,Ke,or(ke,u,m,Ke,a,M))}),B}function rI(a){var u=nn(a);return function(m){return my(m,a,u)}}function my(a,u,m){var w=m.length;if(a==null)return!w;for(a=wt(a);w--;){var T=m[w],M=u[T],B=a[T];if(B===n&&!(T in a)||!M(B))return!1}return!0}function gy(a,u,m){if(typeof a!="function")throw new rr(s);return La(function(){a.apply(n,m)},u)}function Ra(a,u,m,w){var T=-1,M=fc,B=!0,U=a.length,X=[],ne=u.length;if(!U)return X;m&&(u=Dt(u,Gn(m))),w?(M=gf,B=!1):u.length>=i&&(M=_a,B=!1,u=new uo(u));e:for(;++TT?0:T+m),w=w===n||w>T?T:We(w),w<0&&(w+=T),w=m>w?0:D0(w);m0&&m(U)?u>1?fn(U,u-1,m,w,T):Ci(T,U):w||(T[T.length]=U)}return T}var Pf=Wy(),by=Wy(!0);function zr(a,u){return a&&Pf(a,u,nn)}function Of(a,u){return a&&by(a,u,nn)}function Pc(a,u){return Ei(u,function(m){return oi(a[m])})}function ho(a,u){u=Ii(u,a);for(var m=0,w=u.length;a!=null&&mu}function sI(a,u){return a!=null&&vt.call(a,u)}function aI(a,u){return a!=null&&u in wt(a)}function lI(a,u,m){return a>=gn(u,m)&&a=120&&re.length>=120)?new uo(B&&re):n}re=a[0];var oe=-1,fe=U[0];e:for(;++oe-1;)U!==a&&_c.call(U,X,1),_c.call(a,X,1);return a}function Iy(a,u){for(var m=a?u.length:0,w=m-1;m--;){var T=u[m];if(m==w||T!==M){var M=T;ii(T)?_c.call(a,T,1):Uf(a,T)}}return a}function Ff(a,u){return a+Cc(uy()*(u-a+1))}function wI(a,u,m,w){for(var T=-1,M=Zt(Ec((u-a)/(m||1)),0),B=Z(M);M--;)B[w?M:++T]=a,a+=m;return B}function zf(a,u){var m="";if(!a||u<1||u>G)return m;do u%2&&(m+=a),u=Cc(u/2),u&&(a+=a);while(u);return m}function Xe(a,u){return rh(s0(a,u,Ln),a+"")}function _I(a){return hy(gs(a))}function SI(a,u){var m=gs(a);return Uc(m,fo(u,0,m.length))}function Oa(a,u,m,w){if(!Ft(a))return a;u=Ii(u,a);for(var T=-1,M=u.length,B=M-1,U=a;U!=null&&++TT?0:T+u),m=m>T?T:m,m<0&&(m+=T),T=u>m?0:m-u>>>0,u>>>=0;for(var M=Z(T);++w>>1,B=a[M];B!==null&&!qn(B)&&(m?B<=u:B=i){var ne=u?null:BI(a);if(ne)return pc(ne);B=!1,T=_a,X=new uo}else X=u?[]:U;e:for(;++w=w?a:sr(a,u,m)}var By=pR||function(a){return dn.clearTimeout(a)};function $y(a,u){if(u)return a.slice();var m=a.length,w=oy?oy(m):new a.constructor(m);return a.copy(w),w}function Vf(a){var u=new a.constructor(a.byteLength);return new xc(u).set(new xc(a)),u}function AI(a,u){var m=u?Vf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}function RI(a){var u=new a.constructor(a.source,Jn.exec(a));return u.lastIndex=a.lastIndex,u}function II(a){return ka?wt(ka.call(a)):{}}function Fy(a,u){var m=u?Vf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.length)}function zy(a,u){if(a!==u){var m=a!==n,w=a===null,T=a===a,M=qn(a),B=u!==n,U=u===null,X=u===u,ne=qn(u);if(!U&&!ne&&!M&&a>u||M&&B&&X&&!U&&!ne||w&&B&&X||!m&&X||!T)return 1;if(!w&&!M&&!ne&&a=U)return X;var ne=m[w];return X*(ne=="desc"?-1:1)}}return a.index-u.index}function jy(a,u,m,w){for(var T=-1,M=a.length,B=m.length,U=-1,X=u.length,ne=Zt(M-B,0),re=Z(X+ne),oe=!w;++U1?m[T-1]:n,B=T>2?m[2]:n;for(M=a.length>3&&typeof M=="function"?(T--,M):n,B&&Tn(m[0],m[1],B)&&(M=T<3?n:M,T=1),u=wt(u);++w-1?T[M?u[B]:B]:n}}function qy(a){return ri(function(u){var m=u.length,w=m,T=ir.prototype.thru;for(a&&u.reverse();w--;){var M=u[w];if(typeof M!="function")throw new rr(s);if(T&&!B&&zc(M)=="wrapper")var B=new ir([],!0)}for(w=B?w:m;++w1&&nt.reverse(),re&&XU))return!1;var ne=M.get(a),re=M.get(u);if(ne&&re)return ne==u&&re==a;var oe=-1,fe=!0,we=m&y?new uo:n;for(M.set(a,u),M.set(u,a);++oe1?"& ":"")+u[w],u=u.join(m>2?", ":" "),a.replace(Si,`{ + */uC.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,g=4,v=1,y=2,S=1,_=2,b=4,x=8,E=16,A=32,R=64,k=128,O=256,L=512,N=30,H="...",W=800,z=16,D=1,F=2,j=3,V=1/0,G=9007199254740991,K=17976931348623157e292,Y=0/0,J=4294967295,ie=J-1,ce=J>>>1,ue=[["ary",k],["bind",S],["bindKey",_],["curry",x],["curryRight",E],["flip",L],["partial",A],["partialRight",R],["rearg",O]],se="[object Arguments]",Q="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",me="[object Map]",be="[object Number]",Qe="[object Null]",qe="[object Object]",at="[object Promise]",Lt="[object Proxy]",Ie="[object RegExp]",ze="[object Set]",it="[object String]",pt="[object Symbol]",mt="[object Undefined]",_e="[object WeakMap]",je="[object WeakSet]",Ye="[object ArrayBuffer]",$e="[object DataView]",Ne="[object Float32Array]",Rt="[object Float64Array]",ct="[object Int8Array]",Ae="[object Int16Array]",ot="[object Int32Array]",$t="[object Uint8Array]",Re="[object Uint8ClampedArray]",Ue="[object Uint16Array]",yt="[object Uint32Array]",Wt=/\b__p \+= '';/g,pn=/\b(__p \+=) '' \+/g,$r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Or=/&(?:amp|lt|gt|quot|#39);/g,Mr=/[&<>"']/g,Fr=RegExp(Or.source),Jr=RegExp(Mr.source),Zo=/<%-([\s\S]+?)%>/g,$u=/<%([\s\S]+?)%>/g,Gs=/<%=([\s\S]+?)%>/g,ac=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lc=/^\w*$/,sf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,es=/[\\^$.*+?()[\]{}|]/g,af=RegExp(es.source),so=/^\s+/,cc=/\s/,Si=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ts=/\{\n\/\* \[wrapped with (.+)\] \*/,lf=/,? & /,ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wa=/[()=,{}\[\]\/\s]/,Fu=/\\(\\)?/g,Hn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jn=/\w*$/,bl=/^[-+]0x[0-9a-f]+$/i,xl=/^0b[01]+$/i,ao=/^\[object .+?Constructor\]$/,xv=/^0o[0-7]+$/i,wv=/^(?:0|[1-9]\d*)$/,Qt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,aA=/['\n\r\u2028\u2029\\]/g,uc="\\ud800-\\udfff",lA="\\u0300-\\u036f",cA="\\ufe20-\\ufe2f",uA="\\u20d0-\\u20ff",_v=lA+cA+uA,Sv="\\u2700-\\u27bf",Ev="a-z\\xdf-\\xf6\\xf8-\\xff",dA="\\xac\\xb1\\xd7\\xf7",fA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hA="\\u2000-\\u206f",pA=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Cv="A-Z\\xc0-\\xd6\\xd8-\\xde",Tv="\\ufe0e\\ufe0f",kv=dA+fA+hA+pA,cf="['’]",mA="["+uc+"]",Av="["+kv+"]",dc="["+_v+"]",Rv="\\d+",gA="["+Sv+"]",Iv="["+Ev+"]",Pv="[^"+uc+kv+Rv+Sv+Ev+Cv+"]",uf="\\ud83c[\\udffb-\\udfff]",vA="(?:"+dc+"|"+uf+")",Ov="[^"+uc+"]",df="(?:\\ud83c[\\udde6-\\uddff]){2}",ff="[\\ud800-\\udbff][\\udc00-\\udfff]",rs="["+Cv+"]",Mv="\\u200d",Dv="(?:"+Iv+"|"+Pv+")",yA="(?:"+rs+"|"+Pv+")",Lv="(?:"+cf+"(?:d|ll|m|re|s|t|ve))?",Nv="(?:"+cf+"(?:D|LL|M|RE|S|T|VE))?",Bv=vA+"?",$v="["+Tv+"]?",bA="(?:"+Mv+"(?:"+[Ov,df,ff].join("|")+")"+$v+Bv+")*",xA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fv=$v+Bv+bA,_A="(?:"+[gA,df,ff].join("|")+")"+Fv,SA="(?:"+[Ov+dc+"?",dc,df,ff,mA].join("|")+")",EA=RegExp(cf,"g"),CA=RegExp(dc,"g"),hf=RegExp(uf+"(?="+uf+")|"+SA+Fv,"g"),TA=RegExp([rs+"?"+Iv+"+"+Lv+"(?="+[Av,rs,"$"].join("|")+")",yA+"+"+Nv+"(?="+[Av,rs+Dv,"$"].join("|")+")",rs+"?"+Dv+"+"+Lv,rs+"+"+Nv,wA,xA,Rv,_A].join("|"),"g"),kA=RegExp("["+Mv+uc+_v+Tv+"]"),AA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,RA=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],IA=-1,Pt={};Pt[Ne]=Pt[Rt]=Pt[ct]=Pt[Ae]=Pt[ot]=Pt[$t]=Pt[Re]=Pt[Ue]=Pt[yt]=!0,Pt[se]=Pt[Q]=Pt[Ye]=Pt[le]=Pt[$e]=Pt[he]=Pt[ve]=Pt[ye]=Pt[me]=Pt[be]=Pt[qe]=Pt[Ie]=Pt[ze]=Pt[it]=Pt[_e]=!1;var kt={};kt[se]=kt[Q]=kt[Ye]=kt[$e]=kt[le]=kt[he]=kt[Ne]=kt[Rt]=kt[ct]=kt[Ae]=kt[ot]=kt[me]=kt[be]=kt[qe]=kt[Ie]=kt[ze]=kt[it]=kt[pt]=kt[$t]=kt[Re]=kt[Ue]=kt[yt]=!0,kt[ve]=kt[ye]=kt[_e]=!1;var PA={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},OA={"&":"&","<":"<",">":">",'"':""","'":"'"},MA={"&":"&","<":"<",">":">",""":'"',"'":"'"},DA={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},LA=parseFloat,NA=parseInt,zv=typeof Nt=="object"&&Nt&&Nt.Object===Object&&Nt,BA=typeof self=="object"&&self&&self.Object===Object&&self,dn=zv||BA||Function("return this")(),pf=t&&!t.nodeType&&t,lo=pf&&!0&&e&&!e.nodeType&&e,jv=lo&&lo.exports===pf,mf=jv&&zv.process,tr=function(){try{var q=lo&&lo.require&&lo.require("util").types;return q||mf&&mf.binding&&mf.binding("util")}catch{}}(),Uv=tr&&tr.isArrayBuffer,Hv=tr&&tr.isDate,Wv=tr&&tr.isMap,Gv=tr&&tr.isRegExp,Vv=tr&&tr.isSet,qv=tr&&tr.isTypedArray;function Wn(q,te,Z){switch(Z.length){case 0:return q.call(te);case 1:return q.call(te,Z[0]);case 2:return q.call(te,Z[0],Z[1]);case 3:return q.call(te,Z[0],Z[1],Z[2])}return q.apply(te,Z)}function $A(q,te,Z,ge){for(var De=-1,ut=q==null?0:q.length;++De-1}function gf(q,te,Z){for(var ge=-1,De=q==null?0:q.length;++ge-1;);return Z}function ty(q,te){for(var Z=q.length;Z--&&is(te,q[Z],0)>-1;);return Z}function qA(q,te){for(var Z=q.length,ge=0;Z--;)q[Z]===te&&++ge;return ge}var XA=xf(PA),YA=xf(OA);function KA(q){return"\\"+DA[q]}function QA(q,te){return q==null?n:q[te]}function os(q){return kA.test(q)}function JA(q){return AA.test(q)}function ZA(q){for(var te,Z=[];!(te=q.next()).done;)Z.push(te.value);return Z}function Ef(q){var te=-1,Z=Array(q.size);return q.forEach(function(ge,De){Z[++te]=[De,ge]}),Z}function ny(q,te){return function(Z){return q(te(Z))}}function Ti(q,te){for(var Z=-1,ge=q.length,De=0,ut=[];++Z-1}function zR(a,u){var m=this.__data__,w=Rc(m,a);return w<0?(++this.size,m.push([a,u])):m[w][1]=u,this}Zr.prototype.clear=NR,Zr.prototype.delete=BR,Zr.prototype.get=$R,Zr.prototype.has=FR,Zr.prototype.set=zR;function ei(a){var u=-1,m=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function or(a,u,m,w,T,M){var B,U=u&h,X=u&p,ne=u&g;if(m&&(B=T?m(a,w,T,M):m(a)),B!==n)return B;if(!Ft(a))return a;var re=Be(a);if(re){if(B=WI(a),!U)return On(a,B)}else{var oe=vn(a),fe=oe==ye||oe==xe;if(Oi(a))return $y(a,U);if(oe==qe||oe==se||fe&&!T){if(B=X||fe?{}:r0(a),!U)return X?MI(a,nI(B,a)):OI(a,py(B,a))}else{if(!kt[oe])return T?a:{};B=GI(a,oe,U)}}M||(M=new br);var we=M.get(a);if(we)return we;M.set(a,B),O0(a)?a.forEach(function(ke){B.add(or(ke,u,m,ke,a,M))}):I0(a)&&a.forEach(function(ke,Ke){B.set(Ke,or(ke,u,m,Ke,a,M))});var Te=ne?X?Kf:Yf:X?Dn:nn,Ve=re?n:Te(a);return nr(Ve||a,function(ke,Ke){Ve&&(Ke=ke,ke=a[Ke]),Aa(B,Ke,or(ke,u,m,Ke,a,M))}),B}function rI(a){var u=nn(a);return function(m){return my(m,a,u)}}function my(a,u,m){var w=m.length;if(a==null)return!w;for(a=wt(a);w--;){var T=m[w],M=u[T],B=a[T];if(B===n&&!(T in a)||!M(B))return!1}return!0}function gy(a,u,m){if(typeof a!="function")throw new rr(s);return La(function(){a.apply(n,m)},u)}function Ra(a,u,m,w){var T=-1,M=fc,B=!0,U=a.length,X=[],ne=u.length;if(!U)return X;m&&(u=Dt(u,Gn(m))),w?(M=gf,B=!1):u.length>=i&&(M=_a,B=!1,u=new fo(u));e:for(;++TT?0:T+m),w=w===n||w>T?T:We(w),w<0&&(w+=T),w=m>w?0:D0(w);m0&&m(U)?u>1?fn(U,u-1,m,w,T):Ci(T,U):w||(T[T.length]=U)}return T}var Pf=Wy(),by=Wy(!0);function zr(a,u){return a&&Pf(a,u,nn)}function Of(a,u){return a&&by(a,u,nn)}function Pc(a,u){return Ei(u,function(m){return oi(a[m])})}function po(a,u){u=Ii(u,a);for(var m=0,w=u.length;a!=null&&mu}function sI(a,u){return a!=null&&vt.call(a,u)}function aI(a,u){return a!=null&&u in wt(a)}function lI(a,u,m){return a>=gn(u,m)&&a=120&&re.length>=120)?new fo(B&&re):n}re=a[0];var oe=-1,fe=U[0];e:for(;++oe-1;)U!==a&&_c.call(U,X,1),_c.call(a,X,1);return a}function Iy(a,u){for(var m=a?u.length:0,w=m-1;m--;){var T=u[m];if(m==w||T!==M){var M=T;ii(T)?_c.call(a,T,1):Uf(a,T)}}return a}function Ff(a,u){return a+Cc(uy()*(u-a+1))}function wI(a,u,m,w){for(var T=-1,M=Zt(Ec((u-a)/(m||1)),0),B=Z(M);M--;)B[w?M:++T]=a,a+=m;return B}function zf(a,u){var m="";if(!a||u<1||u>G)return m;do u%2&&(m+=a),u=Cc(u/2),u&&(a+=a);while(u);return m}function Xe(a,u){return rh(s0(a,u,Ln),a+"")}function _I(a){return hy(gs(a))}function SI(a,u){var m=gs(a);return Uc(m,ho(u,0,m.length))}function Oa(a,u,m,w){if(!Ft(a))return a;u=Ii(u,a);for(var T=-1,M=u.length,B=M-1,U=a;U!=null&&++TT?0:T+u),m=m>T?T:m,m<0&&(m+=T),T=u>m?0:m-u>>>0,u>>>=0;for(var M=Z(T);++w>>1,B=a[M];B!==null&&!qn(B)&&(m?B<=u:B=i){var ne=u?null:BI(a);if(ne)return pc(ne);B=!1,T=_a,X=new fo}else X=u?[]:U;e:for(;++w=w?a:sr(a,u,m)}var By=pR||function(a){return dn.clearTimeout(a)};function $y(a,u){if(u)return a.slice();var m=a.length,w=oy?oy(m):new a.constructor(m);return a.copy(w),w}function Vf(a){var u=new a.constructor(a.byteLength);return new xc(u).set(new xc(a)),u}function AI(a,u){var m=u?Vf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}function RI(a){var u=new a.constructor(a.source,Jn.exec(a));return u.lastIndex=a.lastIndex,u}function II(a){return ka?wt(ka.call(a)):{}}function Fy(a,u){var m=u?Vf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.length)}function zy(a,u){if(a!==u){var m=a!==n,w=a===null,T=a===a,M=qn(a),B=u!==n,U=u===null,X=u===u,ne=qn(u);if(!U&&!ne&&!M&&a>u||M&&B&&X&&!U&&!ne||w&&B&&X||!m&&X||!T)return 1;if(!w&&!M&&!ne&&a=U)return X;var ne=m[w];return X*(ne=="desc"?-1:1)}}return a.index-u.index}function jy(a,u,m,w){for(var T=-1,M=a.length,B=m.length,U=-1,X=u.length,ne=Zt(M-B,0),re=Z(X+ne),oe=!w;++U1?m[T-1]:n,B=T>2?m[2]:n;for(M=a.length>3&&typeof M=="function"?(T--,M):n,B&&Tn(m[0],m[1],B)&&(M=T<3?n:M,T=1),u=wt(u);++w-1?T[M?u[B]:B]:n}}function qy(a){return ri(function(u){var m=u.length,w=m,T=ir.prototype.thru;for(a&&u.reverse();w--;){var M=u[w];if(typeof M!="function")throw new rr(s);if(T&&!B&&zc(M)=="wrapper")var B=new ir([],!0)}for(w=B?w:m;++w1&&nt.reverse(),re&&XU))return!1;var ne=M.get(a),re=M.get(u);if(ne&&re)return ne==u&&re==a;var oe=-1,fe=!0,we=m&y?new fo:n;for(M.set(a,u),M.set(u,a);++oe1?"& ":"")+u[w],u=u.join(m>2?", ":" "),a.replace(Si,`{ /* [wrapped with `+u+`] */ -`)}function qI(a){return Be(a)||go(a)||!!(ly&&a&&a[ly])}function ii(a,u){var m=typeof a;return u=u??G,!!u&&(m=="number"||m!="symbol"&&wv.test(a))&&a>-1&&a%1==0&&a0){if(++u>=W)return arguments[0]}else u=0;return a.apply(n,arguments)}}function Uc(a,u){var m=-1,w=a.length,T=w-1;for(u=u===n?w:u;++m1?a[u-1]:n;return m=typeof m=="function"?(a.pop(),m):n,y0(a,m)});function b0(a){var u=P(a);return u.__chain__=!0,u}function i2(a,u){return u(a),a}function Hc(a,u){return u(a)}var o2=ri(function(a){var u=a.length,m=u?a[0]:0,w=this.__wrapped__,T=function(M){return If(M,a)};return u>1||this.__actions__.length||!(w instanceof Je)||!ii(m)?this.thru(T):(w=w.slice(m,+m+(u?1:0)),w.__actions__.push({func:Hc,args:[T],thisArg:n}),new ir(w,this.__chain__).thru(function(M){return u&&!M.length&&M.push(n),M}))});function s2(){return b0(this)}function a2(){return new ir(this.value(),this.__chain__)}function l2(){this.__values__===n&&(this.__values__=M0(this.value()));var a=this.__index__>=this.__values__.length,u=a?n:this.__values__[this.__index__++];return{done:a,value:u}}function c2(){return this}function u2(a){for(var u,m=this;m instanceof Ac;){var w=f0(m);w.__index__=0,w.__values__=n,u?T.__wrapped__=w:u=w;var T=w;m=m.__wrapped__}return T.__wrapped__=a,u}function d2(){var a=this.__wrapped__;if(a instanceof Je){var u=a;return this.__actions__.length&&(u=new Je(this)),u=u.reverse(),u.__actions__.push({func:Hc,args:[ih],thisArg:n}),new ir(u,this.__chain__)}return this.thru(ih)}function f2(){return Ly(this.__wrapped__,this.__actions__)}var h2=Lc(function(a,u,m){vt.call(a,m)?++a[m]:ti(a,m,1)});function p2(a,u,m){var w=Be(a)?Xv:iI;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}function m2(a,u){var m=Be(a)?Ei:yy;return m(a,Ce(u,3))}var g2=Vy(h0),v2=Vy(p0);function y2(a,u){return fn(Wc(a,u),1)}function b2(a,u){return fn(Wc(a,u),V)}function x2(a,u,m){return m=m===n?1:We(m),fn(Wc(a,u),m)}function x0(a,u){var m=Be(a)?nr:Ai;return m(a,Ce(u,3))}function w0(a,u){var m=Be(a)?FA:vy;return m(a,Ce(u,3))}var w2=Lc(function(a,u,m){vt.call(a,m)?a[m].push(u):ti(a,m,[u])});function _2(a,u,m,w){a=Mn(a)?a:gs(a),m=m&&!w?We(m):0;var T=a.length;return m<0&&(m=Zt(T+m,0)),Yc(a)?m<=T&&a.indexOf(u,m)>-1:!!T&&is(a,u,m)>-1}var S2=Xe(function(a,u,m){var w=-1,T=typeof u=="function",M=Mn(a)?Z(a.length):[];return Ai(a,function(B){M[++w]=T?Wn(u,B,m):Ia(B,u,m)}),M}),E2=Lc(function(a,u,m){ti(a,m,u)});function Wc(a,u){var m=Be(a)?Dt:Ey;return m(a,Ce(u,3))}function C2(a,u,m,w){return a==null?[]:(Be(u)||(u=u==null?[]:[u]),m=w?n:m,Be(m)||(m=m==null?[]:[m]),Ay(a,u,m))}var T2=Lc(function(a,u,m){a[m?0:1].push(u)},function(){return[[],[]]});function k2(a,u,m){var w=Be(a)?vf:Jv,T=arguments.length<3;return w(a,Ce(u,4),m,T,Ai)}function A2(a,u,m){var w=Be(a)?zA:Jv,T=arguments.length<3;return w(a,Ce(u,4),m,T,vy)}function R2(a,u){var m=Be(a)?Ei:yy;return m(a,qc(Ce(u,3)))}function I2(a){var u=Be(a)?hy:_I;return u(a)}function P2(a,u,m){(m?Tn(a,u,m):u===n)?u=1:u=We(u);var w=Be(a)?ZR:SI;return w(a,u)}function O2(a){var u=Be(a)?eI:CI;return u(a)}function M2(a){if(a==null)return 0;if(Mn(a))return Yc(a)?ss(a):a.length;var u=vn(a);return u==me||u==ze?a.size:Nf(a).length}function D2(a,u,m){var w=Be(a)?yf:TI;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}var L2=Xe(function(a,u){if(a==null)return[];var m=u.length;return m>1&&Tn(a,u[0],u[1])?u=[]:m>2&&Tn(u[0],u[1],u[2])&&(u=[u[0]]),Ay(a,fn(u,1),[])}),Gc=mR||function(){return dn.Date.now()};function N2(a,u){if(typeof u!="function")throw new rr(s);return a=We(a),function(){if(--a<1)return u.apply(this,arguments)}}function _0(a,u,m){return u=m?n:u,u=a&&u==null?a.length:u,ni(a,k,n,n,n,n,u)}function S0(a,u){var m;if(typeof u!="function")throw new rr(s);return a=We(a),function(){return--a>0&&(m=u.apply(this,arguments)),a<=1&&(u=n),m}}var sh=Xe(function(a,u,m){var w=S;if(m.length){var T=Ti(m,ps(sh));w|=A}return ni(a,w,u,m,T)}),E0=Xe(function(a,u,m){var w=S|_;if(m.length){var T=Ti(m,ps(E0));w|=A}return ni(u,w,a,m,T)});function C0(a,u,m){u=m?n:u;var w=ni(a,x,n,n,n,n,n,u);return w.placeholder=C0.placeholder,w}function T0(a,u,m){u=m?n:u;var w=ni(a,E,n,n,n,n,n,u);return w.placeholder=T0.placeholder,w}function k0(a,u,m){var w,T,M,B,U,X,ne=0,re=!1,oe=!1,fe=!0;if(typeof a!="function")throw new rr(s);u=lr(u)||0,Ft(m)&&(re=!!m.leading,oe="maxWait"in m,M=oe?Zt(lr(m.maxWait)||0,u):M,fe="trailing"in m?!!m.trailing:fe);function we(Yt){var wr=w,ai=T;return w=T=n,ne=Yt,B=a.apply(ai,wr),B}function Te(Yt){return ne=Yt,U=La(Ke,u),re?we(Yt):B}function Ve(Yt){var wr=Yt-X,ai=Yt-ne,V0=u-wr;return oe?gn(V0,M-ai):V0}function ke(Yt){var wr=Yt-X,ai=Yt-ne;return X===n||wr>=u||wr<0||oe&&ai>=M}function Ke(){var Yt=Gc();if(ke(Yt))return nt(Yt);U=La(Ke,Ve(Yt))}function nt(Yt){return U=n,fe&&w?we(Yt):(w=T=n,B)}function Xn(){U!==n&&By(U),ne=0,w=X=T=U=n}function kn(){return U===n?B:nt(Gc())}function Yn(){var Yt=Gc(),wr=ke(Yt);if(w=arguments,T=this,X=Yt,wr){if(U===n)return Te(X);if(oe)return By(U),U=La(Ke,u),we(X)}return U===n&&(U=La(Ke,u)),B}return Yn.cancel=Xn,Yn.flush=kn,Yn}var B2=Xe(function(a,u){return gy(a,1,u)}),$2=Xe(function(a,u,m){return gy(a,lr(u)||0,m)});function F2(a){return ni(a,L)}function Vc(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new rr(s);var m=function(){var w=arguments,T=u?u.apply(this,w):w[0],M=m.cache;if(M.has(T))return M.get(T);var B=a.apply(this,w);return m.cache=M.set(T,B)||M,B};return m.cache=new(Vc.Cache||ei),m}Vc.Cache=ei;function qc(a){if(typeof a!="function")throw new rr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}function z2(a){return S0(2,a)}var j2=kI(function(a,u){u=u.length==1&&Be(u[0])?Dt(u[0],Gn(Ce())):Dt(fn(u,1),Gn(Ce()));var m=u.length;return Xe(function(w){for(var T=-1,M=gn(w.length,m);++T=u}),go=wy(function(){return arguments}())?wy:function(a){return jt(a)&&vt.call(a,"callee")&&!ay.call(a,"callee")},Be=Z.isArray,nO=Uv?Gn(Uv):uI;function Mn(a){return a!=null&&Xc(a.length)&&!oi(a)}function Xt(a){return jt(a)&&Mn(a)}function rO(a){return a===!0||a===!1||jt(a)&&Cn(a)==le}var Oi=vR||yh,iO=Hv?Gn(Hv):dI;function oO(a){return jt(a)&&a.nodeType===1&&!Na(a)}function sO(a){if(a==null)return!0;if(Mn(a)&&(Be(a)||typeof a=="string"||typeof a.splice=="function"||Oi(a)||ms(a)||go(a)))return!a.length;var u=vn(a);if(u==me||u==ze)return!a.size;if(Da(a))return!Nf(a).length;for(var m in a)if(vt.call(a,m))return!1;return!0}function aO(a,u){return Pa(a,u)}function lO(a,u,m){m=typeof m=="function"?m:n;var w=m?m(a,u):n;return w===n?Pa(a,u,n,m):!!w}function lh(a){if(!jt(a))return!1;var u=Cn(a);return u==ve||u==pe||typeof a.message=="string"&&typeof a.name=="string"&&!Na(a)}function cO(a){return typeof a=="number"&&cy(a)}function oi(a){if(!Ft(a))return!1;var u=Cn(a);return u==ye||u==xe||u==ae||u==Lt}function R0(a){return typeof a=="number"&&a==We(a)}function Xc(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=G}function Ft(a){var u=typeof a;return a!=null&&(u=="object"||u=="function")}function jt(a){return a!=null&&typeof a=="object"}var I0=Wv?Gn(Wv):hI;function uO(a,u){return a===u||Lf(a,u,Jf(u))}function dO(a,u,m){return m=typeof m=="function"?m:n,Lf(a,u,Jf(u),m)}function fO(a){return P0(a)&&a!=+a}function hO(a){if(KI(a))throw new De(o);return _y(a)}function pO(a){return a===null}function mO(a){return a==null}function P0(a){return typeof a=="number"||jt(a)&&Cn(a)==be}function Na(a){if(!jt(a)||Cn(a)!=qe)return!1;var u=wc(a);if(u===null)return!0;var m=vt.call(u,"constructor")&&u.constructor;return typeof m=="function"&&m instanceof m&&vc.call(m)==dR}var ch=Gv?Gn(Gv):pI;function gO(a){return R0(a)&&a>=-G&&a<=G}var O0=Vv?Gn(Vv):mI;function Yc(a){return typeof a=="string"||!Be(a)&&jt(a)&&Cn(a)==it}function qn(a){return typeof a=="symbol"||jt(a)&&Cn(a)==pt}var ms=qv?Gn(qv):gI;function vO(a){return a===n}function yO(a){return jt(a)&&vn(a)==_e}function bO(a){return jt(a)&&Cn(a)==je}var xO=Fc(Bf),wO=Fc(function(a,u){return a<=u});function M0(a){if(!a)return[];if(Mn(a))return Yc(a)?yr(a):On(a);if(Sa&&a[Sa])return ZA(a[Sa]());var u=vn(a),m=u==me?Ef:u==ze?pc:gs;return m(a)}function si(a){if(!a)return a===0?a:0;if(a=lr(a),a===V||a===-V){var u=a<0?-1:1;return u*K}return a===a?a:0}function We(a){var u=si(a),m=u%1;return u===u?m?u-m:u:0}function D0(a){return a?fo(We(a),0,J):0}function lr(a){if(typeof a=="number")return a;if(qn(a))return Y;if(Ft(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Ft(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=Zv(a);var m=xl.test(a);return m||xv.test(a)?NA(a.slice(2),m?2:8):bl.test(a)?Y:+a}function L0(a){return jr(a,Dn(a))}function _O(a){return a?fo(We(a),-G,G):a===0?a:0}function ft(a){return a==null?"":Vn(a)}var SO=fs(function(a,u){if(Da(u)||Mn(u)){jr(u,nn(u),a);return}for(var m in u)vt.call(u,m)&&Aa(a,m,u[m])}),N0=fs(function(a,u){jr(u,Dn(u),a)}),Kc=fs(function(a,u,m,w){jr(u,Dn(u),a,w)}),EO=fs(function(a,u,m,w){jr(u,nn(u),a,w)}),CO=ri(If);function TO(a,u){var m=ds(a);return u==null?m:py(m,u)}var kO=Xe(function(a,u){a=wt(a);var m=-1,w=u.length,T=w>2?u[2]:n;for(T&&Tn(u[0],u[1],T)&&(w=1);++m1),M}),jr(a,Kf(a),m),w&&(m=or(m,h|p|g,$I));for(var T=u.length;T--;)Uf(m,u[T]);return m});function GO(a,u){return $0(a,qc(Ce(u)))}var VO=ri(function(a,u){return a==null?{}:bI(a,u)});function $0(a,u){if(a==null)return{};var m=Dt(Kf(a),function(w){return[w]});return u=Ce(u),Ry(a,m,function(w,T){return u(w,T[0])})}function qO(a,u,m){u=Ii(u,a);var w=-1,T=u.length;for(T||(T=1,a=n);++wu){var w=a;a=u,u=w}if(m||a%1||u%1){var T=uy();return gn(a+T*(u-a+LA("1e-"+((T+"").length-1))),u)}return Ff(a,u)}var iM=hs(function(a,u,m){return u=u.toLowerCase(),a+(m?j0(u):u)});function j0(a){return fh(ft(a).toLowerCase())}function U0(a){return a=ft(a),a&&a.replace(Qt,XA).replace(CA,"")}function oM(a,u,m){a=ft(a),u=Vn(u);var w=a.length;m=m===n?w:fo(We(m),0,w);var T=m;return m-=u.length,m>=0&&a.slice(m,T)==u}function sM(a){return a=ft(a),a&&Jr.test(a)?a.replace(Mr,YA):a}function aM(a){return a=ft(a),a&&af.test(a)?a.replace(es,"\\$&"):a}var lM=hs(function(a,u,m){return a+(m?"-":"")+u.toLowerCase()}),cM=hs(function(a,u,m){return a+(m?" ":"")+u.toLowerCase()}),uM=Gy("toLowerCase");function dM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;if(!u||w>=u)return a;var T=(u-w)/2;return $c(Cc(T),m)+a+$c(Ec(T),m)}function fM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;return u&&w>>0,m?(a=ft(a),a&&(typeof u=="string"||u!=null&&!ch(u))&&(u=Vn(u),!u&&os(a))?Pi(yr(a),0,m):a.split(u,m)):[]}var bM=hs(function(a,u,m){return a+(m?" ":"")+fh(u)});function xM(a,u,m){return a=ft(a),m=m==null?0:fo(We(m),0,a.length),u=Vn(u),a.slice(m,m+u.length)==u}function wM(a,u,m){var w=P.templateSettings;m&&Tn(a,u,m)&&(u=n),a=ft(a),u=Kc({},u,w,Jy);var T=Kc({},u.imports,w.imports,Jy),M=nn(T),B=Sf(T,M),U,X,ne=0,re=u.interpolate||vr,oe="__p += '",fe=Cf((u.escape||vr).source+"|"+re.source+"|"+(re===Gs?Hn:vr).source+"|"+(u.evaluate||vr).source+"|$","g"),we="//# sourceURL="+(vt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++IA+"]")+` +`)}function qI(a){return Be(a)||vo(a)||!!(ly&&a&&a[ly])}function ii(a,u){var m=typeof a;return u=u??G,!!u&&(m=="number"||m!="symbol"&&wv.test(a))&&a>-1&&a%1==0&&a0){if(++u>=W)return arguments[0]}else u=0;return a.apply(n,arguments)}}function Uc(a,u){var m=-1,w=a.length,T=w-1;for(u=u===n?w:u;++m1?a[u-1]:n;return m=typeof m=="function"?(a.pop(),m):n,y0(a,m)});function b0(a){var u=P(a);return u.__chain__=!0,u}function i2(a,u){return u(a),a}function Hc(a,u){return u(a)}var o2=ri(function(a){var u=a.length,m=u?a[0]:0,w=this.__wrapped__,T=function(M){return If(M,a)};return u>1||this.__actions__.length||!(w instanceof Je)||!ii(m)?this.thru(T):(w=w.slice(m,+m+(u?1:0)),w.__actions__.push({func:Hc,args:[T],thisArg:n}),new ir(w,this.__chain__).thru(function(M){return u&&!M.length&&M.push(n),M}))});function s2(){return b0(this)}function a2(){return new ir(this.value(),this.__chain__)}function l2(){this.__values__===n&&(this.__values__=M0(this.value()));var a=this.__index__>=this.__values__.length,u=a?n:this.__values__[this.__index__++];return{done:a,value:u}}function c2(){return this}function u2(a){for(var u,m=this;m instanceof Ac;){var w=f0(m);w.__index__=0,w.__values__=n,u?T.__wrapped__=w:u=w;var T=w;m=m.__wrapped__}return T.__wrapped__=a,u}function d2(){var a=this.__wrapped__;if(a instanceof Je){var u=a;return this.__actions__.length&&(u=new Je(this)),u=u.reverse(),u.__actions__.push({func:Hc,args:[ih],thisArg:n}),new ir(u,this.__chain__)}return this.thru(ih)}function f2(){return Ly(this.__wrapped__,this.__actions__)}var h2=Lc(function(a,u,m){vt.call(a,m)?++a[m]:ti(a,m,1)});function p2(a,u,m){var w=Be(a)?Xv:iI;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}function m2(a,u){var m=Be(a)?Ei:yy;return m(a,Ce(u,3))}var g2=Vy(h0),v2=Vy(p0);function y2(a,u){return fn(Wc(a,u),1)}function b2(a,u){return fn(Wc(a,u),V)}function x2(a,u,m){return m=m===n?1:We(m),fn(Wc(a,u),m)}function x0(a,u){var m=Be(a)?nr:Ai;return m(a,Ce(u,3))}function w0(a,u){var m=Be(a)?FA:vy;return m(a,Ce(u,3))}var w2=Lc(function(a,u,m){vt.call(a,m)?a[m].push(u):ti(a,m,[u])});function _2(a,u,m,w){a=Mn(a)?a:gs(a),m=m&&!w?We(m):0;var T=a.length;return m<0&&(m=Zt(T+m,0)),Yc(a)?m<=T&&a.indexOf(u,m)>-1:!!T&&is(a,u,m)>-1}var S2=Xe(function(a,u,m){var w=-1,T=typeof u=="function",M=Mn(a)?Z(a.length):[];return Ai(a,function(B){M[++w]=T?Wn(u,B,m):Ia(B,u,m)}),M}),E2=Lc(function(a,u,m){ti(a,m,u)});function Wc(a,u){var m=Be(a)?Dt:Ey;return m(a,Ce(u,3))}function C2(a,u,m,w){return a==null?[]:(Be(u)||(u=u==null?[]:[u]),m=w?n:m,Be(m)||(m=m==null?[]:[m]),Ay(a,u,m))}var T2=Lc(function(a,u,m){a[m?0:1].push(u)},function(){return[[],[]]});function k2(a,u,m){var w=Be(a)?vf:Jv,T=arguments.length<3;return w(a,Ce(u,4),m,T,Ai)}function A2(a,u,m){var w=Be(a)?zA:Jv,T=arguments.length<3;return w(a,Ce(u,4),m,T,vy)}function R2(a,u){var m=Be(a)?Ei:yy;return m(a,qc(Ce(u,3)))}function I2(a){var u=Be(a)?hy:_I;return u(a)}function P2(a,u,m){(m?Tn(a,u,m):u===n)?u=1:u=We(u);var w=Be(a)?ZR:SI;return w(a,u)}function O2(a){var u=Be(a)?eI:CI;return u(a)}function M2(a){if(a==null)return 0;if(Mn(a))return Yc(a)?ss(a):a.length;var u=vn(a);return u==me||u==ze?a.size:Nf(a).length}function D2(a,u,m){var w=Be(a)?yf:TI;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}var L2=Xe(function(a,u){if(a==null)return[];var m=u.length;return m>1&&Tn(a,u[0],u[1])?u=[]:m>2&&Tn(u[0],u[1],u[2])&&(u=[u[0]]),Ay(a,fn(u,1),[])}),Gc=mR||function(){return dn.Date.now()};function N2(a,u){if(typeof u!="function")throw new rr(s);return a=We(a),function(){if(--a<1)return u.apply(this,arguments)}}function _0(a,u,m){return u=m?n:u,u=a&&u==null?a.length:u,ni(a,k,n,n,n,n,u)}function S0(a,u){var m;if(typeof u!="function")throw new rr(s);return a=We(a),function(){return--a>0&&(m=u.apply(this,arguments)),a<=1&&(u=n),m}}var sh=Xe(function(a,u,m){var w=S;if(m.length){var T=Ti(m,ps(sh));w|=A}return ni(a,w,u,m,T)}),E0=Xe(function(a,u,m){var w=S|_;if(m.length){var T=Ti(m,ps(E0));w|=A}return ni(u,w,a,m,T)});function C0(a,u,m){u=m?n:u;var w=ni(a,x,n,n,n,n,n,u);return w.placeholder=C0.placeholder,w}function T0(a,u,m){u=m?n:u;var w=ni(a,E,n,n,n,n,n,u);return w.placeholder=T0.placeholder,w}function k0(a,u,m){var w,T,M,B,U,X,ne=0,re=!1,oe=!1,fe=!0;if(typeof a!="function")throw new rr(s);u=lr(u)||0,Ft(m)&&(re=!!m.leading,oe="maxWait"in m,M=oe?Zt(lr(m.maxWait)||0,u):M,fe="trailing"in m?!!m.trailing:fe);function we(Xt){var wr=w,ai=T;return w=T=n,ne=Xt,B=a.apply(ai,wr),B}function Te(Xt){return ne=Xt,U=La(Ke,u),re?we(Xt):B}function Ve(Xt){var wr=Xt-X,ai=Xt-ne,V0=u-wr;return oe?gn(V0,M-ai):V0}function ke(Xt){var wr=Xt-X,ai=Xt-ne;return X===n||wr>=u||wr<0||oe&&ai>=M}function Ke(){var Xt=Gc();if(ke(Xt))return nt(Xt);U=La(Ke,Ve(Xt))}function nt(Xt){return U=n,fe&&w?we(Xt):(w=T=n,B)}function Xn(){U!==n&&By(U),ne=0,w=X=T=U=n}function kn(){return U===n?B:nt(Gc())}function Yn(){var Xt=Gc(),wr=ke(Xt);if(w=arguments,T=this,X=Xt,wr){if(U===n)return Te(X);if(oe)return By(U),U=La(Ke,u),we(X)}return U===n&&(U=La(Ke,u)),B}return Yn.cancel=Xn,Yn.flush=kn,Yn}var B2=Xe(function(a,u){return gy(a,1,u)}),$2=Xe(function(a,u,m){return gy(a,lr(u)||0,m)});function F2(a){return ni(a,L)}function Vc(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new rr(s);var m=function(){var w=arguments,T=u?u.apply(this,w):w[0],M=m.cache;if(M.has(T))return M.get(T);var B=a.apply(this,w);return m.cache=M.set(T,B)||M,B};return m.cache=new(Vc.Cache||ei),m}Vc.Cache=ei;function qc(a){if(typeof a!="function")throw new rr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}function z2(a){return S0(2,a)}var j2=kI(function(a,u){u=u.length==1&&Be(u[0])?Dt(u[0],Gn(Ce())):Dt(fn(u,1),Gn(Ce()));var m=u.length;return Xe(function(w){for(var T=-1,M=gn(w.length,m);++T=u}),vo=wy(function(){return arguments}())?wy:function(a){return jt(a)&&vt.call(a,"callee")&&!ay.call(a,"callee")},Be=Z.isArray,nO=Uv?Gn(Uv):uI;function Mn(a){return a!=null&&Xc(a.length)&&!oi(a)}function qt(a){return jt(a)&&Mn(a)}function rO(a){return a===!0||a===!1||jt(a)&&Cn(a)==le}var Oi=vR||yh,iO=Hv?Gn(Hv):dI;function oO(a){return jt(a)&&a.nodeType===1&&!Na(a)}function sO(a){if(a==null)return!0;if(Mn(a)&&(Be(a)||typeof a=="string"||typeof a.splice=="function"||Oi(a)||ms(a)||vo(a)))return!a.length;var u=vn(a);if(u==me||u==ze)return!a.size;if(Da(a))return!Nf(a).length;for(var m in a)if(vt.call(a,m))return!1;return!0}function aO(a,u){return Pa(a,u)}function lO(a,u,m){m=typeof m=="function"?m:n;var w=m?m(a,u):n;return w===n?Pa(a,u,n,m):!!w}function lh(a){if(!jt(a))return!1;var u=Cn(a);return u==ve||u==pe||typeof a.message=="string"&&typeof a.name=="string"&&!Na(a)}function cO(a){return typeof a=="number"&&cy(a)}function oi(a){if(!Ft(a))return!1;var u=Cn(a);return u==ye||u==xe||u==ae||u==Lt}function R0(a){return typeof a=="number"&&a==We(a)}function Xc(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=G}function Ft(a){var u=typeof a;return a!=null&&(u=="object"||u=="function")}function jt(a){return a!=null&&typeof a=="object"}var I0=Wv?Gn(Wv):hI;function uO(a,u){return a===u||Lf(a,u,Jf(u))}function dO(a,u,m){return m=typeof m=="function"?m:n,Lf(a,u,Jf(u),m)}function fO(a){return P0(a)&&a!=+a}function hO(a){if(KI(a))throw new De(o);return _y(a)}function pO(a){return a===null}function mO(a){return a==null}function P0(a){return typeof a=="number"||jt(a)&&Cn(a)==be}function Na(a){if(!jt(a)||Cn(a)!=qe)return!1;var u=wc(a);if(u===null)return!0;var m=vt.call(u,"constructor")&&u.constructor;return typeof m=="function"&&m instanceof m&&vc.call(m)==dR}var ch=Gv?Gn(Gv):pI;function gO(a){return R0(a)&&a>=-G&&a<=G}var O0=Vv?Gn(Vv):mI;function Yc(a){return typeof a=="string"||!Be(a)&&jt(a)&&Cn(a)==it}function qn(a){return typeof a=="symbol"||jt(a)&&Cn(a)==pt}var ms=qv?Gn(qv):gI;function vO(a){return a===n}function yO(a){return jt(a)&&vn(a)==_e}function bO(a){return jt(a)&&Cn(a)==je}var xO=Fc(Bf),wO=Fc(function(a,u){return a<=u});function M0(a){if(!a)return[];if(Mn(a))return Yc(a)?yr(a):On(a);if(Sa&&a[Sa])return ZA(a[Sa]());var u=vn(a),m=u==me?Ef:u==ze?pc:gs;return m(a)}function si(a){if(!a)return a===0?a:0;if(a=lr(a),a===V||a===-V){var u=a<0?-1:1;return u*K}return a===a?a:0}function We(a){var u=si(a),m=u%1;return u===u?m?u-m:u:0}function D0(a){return a?ho(We(a),0,J):0}function lr(a){if(typeof a=="number")return a;if(qn(a))return Y;if(Ft(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Ft(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=Zv(a);var m=xl.test(a);return m||xv.test(a)?NA(a.slice(2),m?2:8):bl.test(a)?Y:+a}function L0(a){return jr(a,Dn(a))}function _O(a){return a?ho(We(a),-G,G):a===0?a:0}function ft(a){return a==null?"":Vn(a)}var SO=fs(function(a,u){if(Da(u)||Mn(u)){jr(u,nn(u),a);return}for(var m in u)vt.call(u,m)&&Aa(a,m,u[m])}),N0=fs(function(a,u){jr(u,Dn(u),a)}),Kc=fs(function(a,u,m,w){jr(u,Dn(u),a,w)}),EO=fs(function(a,u,m,w){jr(u,nn(u),a,w)}),CO=ri(If);function TO(a,u){var m=ds(a);return u==null?m:py(m,u)}var kO=Xe(function(a,u){a=wt(a);var m=-1,w=u.length,T=w>2?u[2]:n;for(T&&Tn(u[0],u[1],T)&&(w=1);++m1),M}),jr(a,Kf(a),m),w&&(m=or(m,h|p|g,$I));for(var T=u.length;T--;)Uf(m,u[T]);return m});function GO(a,u){return $0(a,qc(Ce(u)))}var VO=ri(function(a,u){return a==null?{}:bI(a,u)});function $0(a,u){if(a==null)return{};var m=Dt(Kf(a),function(w){return[w]});return u=Ce(u),Ry(a,m,function(w,T){return u(w,T[0])})}function qO(a,u,m){u=Ii(u,a);var w=-1,T=u.length;for(T||(T=1,a=n);++wu){var w=a;a=u,u=w}if(m||a%1||u%1){var T=uy();return gn(a+T*(u-a+LA("1e-"+((T+"").length-1))),u)}return Ff(a,u)}var iM=hs(function(a,u,m){return u=u.toLowerCase(),a+(m?j0(u):u)});function j0(a){return fh(ft(a).toLowerCase())}function U0(a){return a=ft(a),a&&a.replace(Qt,XA).replace(CA,"")}function oM(a,u,m){a=ft(a),u=Vn(u);var w=a.length;m=m===n?w:ho(We(m),0,w);var T=m;return m-=u.length,m>=0&&a.slice(m,T)==u}function sM(a){return a=ft(a),a&&Jr.test(a)?a.replace(Mr,YA):a}function aM(a){return a=ft(a),a&&af.test(a)?a.replace(es,"\\$&"):a}var lM=hs(function(a,u,m){return a+(m?"-":"")+u.toLowerCase()}),cM=hs(function(a,u,m){return a+(m?" ":"")+u.toLowerCase()}),uM=Gy("toLowerCase");function dM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;if(!u||w>=u)return a;var T=(u-w)/2;return $c(Cc(T),m)+a+$c(Ec(T),m)}function fM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;return u&&w>>0,m?(a=ft(a),a&&(typeof u=="string"||u!=null&&!ch(u))&&(u=Vn(u),!u&&os(a))?Pi(yr(a),0,m):a.split(u,m)):[]}var bM=hs(function(a,u,m){return a+(m?" ":"")+fh(u)});function xM(a,u,m){return a=ft(a),m=m==null?0:ho(We(m),0,a.length),u=Vn(u),a.slice(m,m+u.length)==u}function wM(a,u,m){var w=P.templateSettings;m&&Tn(a,u,m)&&(u=n),a=ft(a),u=Kc({},u,w,Jy);var T=Kc({},u.imports,w.imports,Jy),M=nn(T),B=Sf(T,M),U,X,ne=0,re=u.interpolate||vr,oe="__p += '",fe=Cf((u.escape||vr).source+"|"+re.source+"|"+(re===Gs?Hn:vr).source+"|"+(u.evaluate||vr).source+"|$","g"),we="//# sourceURL="+(vt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++IA+"]")+` `;a.replace(fe,function(ke,Ke,nt,Xn,kn,Yn){return nt||(nt=Xn),oe+=a.slice(ne,Yn).replace(aA,KA),Ke&&(U=!0,oe+=`' + __e(`+Ke+`) + '`),kn&&(X=!0,oe+=`'; @@ -607,24 +607,24 @@ __p += '`),nt&&(oe+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+oe+`return __p -}`;var Ve=W0(function(){return ut(M,we+"return "+oe).apply(n,B)});if(Ve.source=oe,lh(Ve))throw Ve;return Ve}function _M(a){return ft(a).toLowerCase()}function SM(a){return ft(a).toUpperCase()}function EM(a,u,m){if(a=ft(a),a&&(m||u===n))return Zv(a);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=yr(u),M=ey(w,T),B=ty(w,T)+1;return Pi(w,M,B).join("")}function CM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.slice(0,ry(a)+1);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ty(w,yr(u))+1;return Pi(w,0,T).join("")}function TM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.replace(oo,"");if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ey(w,yr(u));return Pi(w,T).join("")}function kM(a,u){var m=N,w=H;if(Ft(u)){var T="separator"in u?u.separator:T;m="length"in u?We(u.length):m,w="omission"in u?Vn(u.omission):w}a=ft(a);var M=a.length;if(os(a)){var B=yr(a);M=B.length}if(m>=M)return a;var U=m-ss(w);if(U<1)return w;var X=B?Pi(B,0,U).join(""):a.slice(0,U);if(T===n)return X+w;if(B&&(U+=X.length-U),ch(T)){if(a.slice(U).search(T)){var ne,re=X;for(T.global||(T=Cf(T.source,ft(Jn.exec(T))+"g")),T.lastIndex=0;ne=T.exec(re);)var oe=ne.index;X=X.slice(0,oe===n?U:oe)}}else if(a.indexOf(Vn(T),U)!=U){var fe=X.lastIndexOf(T);fe>-1&&(X=X.slice(0,fe))}return X+w}function AM(a){return a=ft(a),a&&Fr.test(a)?a.replace(Or,rR):a}var RM=hs(function(a,u,m){return a+(m?" ":"")+u.toUpperCase()}),fh=Gy("toUpperCase");function H0(a,u,m){return a=ft(a),u=m?n:u,u===n?JA(a)?sR(a):HA(a):a.match(u)||[]}var W0=Xe(function(a,u){try{return Wn(a,n,u)}catch(m){return lh(m)?m:new De(m)}}),IM=ri(function(a,u){return nr(u,function(m){m=Ur(m),ti(a,m,sh(a[m],a))}),a});function PM(a){var u=a==null?0:a.length,m=Ce();return a=u?Dt(a,function(w){if(typeof w[1]!="function")throw new rr(s);return[m(w[0]),w[1]]}):[],Xe(function(w){for(var T=-1;++TG)return[];var m=J,w=gn(a,J);u=Ce(u),a-=J;for(var T=_f(w,u);++m0||u<0)?new Je(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),u!==n&&(u=We(u),m=u<0?m.dropRight(-u):m.take(u-a)),m)},Je.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Je.prototype.toArray=function(){return this.take(J)},zr(Je.prototype,function(a,u){var m=/^(?:filter|find|map|reject)|While$/.test(u),w=/^(?:head|last)$/.test(u),T=P[w?"take"+(u=="last"?"Right":""):u],M=w||/^find/.test(u);T&&(P.prototype[u]=function(){var B=this.__wrapped__,U=w?[1]:arguments,X=B instanceof Je,ne=U[0],re=X||Be(B),oe=function(Ke){var nt=T.apply(P,Ci([Ke],U));return w&&fe?nt[0]:nt};re&&m&&typeof ne=="function"&&ne.length!=1&&(X=re=!1);var fe=this.__chain__,we=!!this.__actions__.length,Te=M&&!fe,Ve=X&&!we;if(!M&&re){B=Ve?B:new Je(this);var ke=a.apply(B,U);return ke.__actions__.push({func:Hc,args:[oe],thisArg:n}),new ir(ke,fe)}return Te&&Ve?a.apply(this,U):(ke=this.thru(oe),Te?w?ke.value()[0]:ke.value():ke)})}),nr(["pop","push","shift","sort","splice","unshift"],function(a){var u=mc[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",w=/^(?:pop|shift)$/.test(a);P.prototype[a]=function(){var T=arguments;if(w&&!this.__chain__){var M=this.value();return u.apply(Be(M)?M:[],T)}return this[m](function(B){return u.apply(Be(B)?B:[],T)})}}),zr(Je.prototype,function(a,u){var m=P[u];if(m){var w=m.name+"";vt.call(us,w)||(us[w]=[]),us[w].push({name:u,func:m})}}),us[Nc(n,_).name]=[{name:"wrapper",func:n}],Je.prototype.clone=AR,Je.prototype.reverse=RR,Je.prototype.value=IR,P.prototype.at=o2,P.prototype.chain=s2,P.prototype.commit=a2,P.prototype.next=l2,P.prototype.plant=u2,P.prototype.reverse=d2,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=f2,P.prototype.first=P.prototype.head,Sa&&(P.prototype[Sa]=c2),P},as=aR();ao?((ao.exports=as)._=as,pf._=as):dn._=as}).call(Nt)})(uC,uC.exports);var Gt=uC.exports;let UFe=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");var Fp=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(Fp||{}),ite=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(ite||{}),l3=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(l3||{}),Mt=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(Mt||{}),Ll=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(Ll||{}),Ge=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(Ge||{}),ng=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(ng||{}),It=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(It||{}),c3=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(c3||{}),hu=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(hu||{}),Pd=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(Pd||{}),Ql=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(Ql||{}),yl=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(yl||{}),Il=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(Il||{}),uj=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(uj||{}),oa=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(oa||{}),li=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(li||{}),Gr=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(Gr||{}),Wl=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(Wl||{});const HFe={createCanvas:(e,t)=>{const n=document.createElement("canvas");return n.width=e,n.height=t,n},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},tt={ADAPTER:HFe,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var $N=/iPhone/i,f9=/iPod/i,h9=/iPad/i,p9=/\biOS-universal(?:.+)Mac\b/i,FN=/\bAndroid(?:.+)Mobile\b/i,m9=/Android/i,Qp=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,C_=/Silk/i,eu=/Windows Phone/i,g9=/\bWindows(?:.+)ARM\b/i,v9=/BlackBerry/i,y9=/BB10/i,b9=/Opera Mini/i,x9=/\b(CriOS|Chrome)(?:.+)Mobile/i,w9=/Mobile(?:.+)Firefox\b/i,_9=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function WFe(e){return function(t){return t.test(e)}}function S9(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);var i=WFe(n),o={apple:{phone:i($N)&&!i(eu),ipod:i(f9),tablet:!i($N)&&(i(h9)||_9(t))&&!i(eu),universal:i(p9),device:(i($N)||i(f9)||i(h9)||i(p9)||_9(t))&&!i(eu)},amazon:{phone:i(Qp),tablet:!i(Qp)&&i(C_),device:i(Qp)||i(C_)},android:{phone:!i(eu)&&i(Qp)||!i(eu)&&i(FN),tablet:!i(eu)&&!i(Qp)&&!i(FN)&&(i(C_)||i(m9)),device:!i(eu)&&(i(Qp)||i(C_)||i(FN)||i(m9))||i(/\bokhttp\b/i)},windows:{phone:i(eu),tablet:i(g9),device:i(eu)||i(g9)},other:{blackberry:i(v9),blackberry10:i(y9),opera:i(b9),firefox:i(w9),chrome:i(x9),device:i(v9)||i(y9)||i(b9)||i(w9)||i(x9)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}const GFe=S9.default??S9,pu=GFe(globalThis.navigator);tt.RETINA_PREFIX=/@([0-9\.]+)x/;tt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var ote={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,d,f){this.fn=c,this.context=d,this.once=f||!1}function o(c,d,f,h,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var g=new i(f,h||c,p),v=n?n+d:d;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],g]:c._events[v].push(g):(c._events[v]=g,c._eventsCount++),c}function s(c,d){--c._eventsCount===0?c._events=new r:delete c._events[d]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],f,h;if(this._eventsCount===0)return d;for(h in f=this._events)t.call(f,h)&&d.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(f)):d},l.prototype.listeners=function(d){var f=n?n+d:d,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,g=h.length,v=new Array(g);p80*n){l=d=e[0],c=f=e[1];for(var v=n;vd&&(d=h),p>f&&(f=p);g=Math.max(d-l,f-c),g=g!==0?32767/g:0}return _1(o,s,n,l,c,g,0),s}function ste(e,t,n,r,i){var o,s;if(i===f3(e,t,n,r)>0)for(o=t;o=t;o-=r)s=E9(o,e[o],e[o+1],s);return s&&Nk(s,s.next)&&(E1(s),s=s.next),s}function Sp(e,t){if(!e)return e;t||(t=e);var n=e,r;do if(r=!1,!n.steiner&&(Nk(n,n.next)||kr(n.prev,n,n.next)===0)){if(E1(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function _1(e,t,n,r,i,o,s){if(e){!s&&o&&n3e(e,r,i,o);for(var l=e,c,d;e.prev!==e.next;){if(c=e.prev,d=e.next,o?XFe(e,r,i,o):qFe(e)){t.push(c.i/n|0),t.push(e.i/n|0),t.push(d.i/n|0),E1(e),e=d.next,l=d.next;continue}if(e=d,e===l){s?s===1?(e=YFe(Sp(e),t,n),_1(e,t,n,r,i,o,2)):s===2&&KFe(e,t,n,r,i,o):_1(Sp(e),t,n,r,i,o,1);break}}}}function qFe(e){var t=e.prev,n=e,r=e.next;if(kr(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,s=r.x,l=t.y,c=n.y,d=r.y,f=io?i>s?i:s:o>s?o:s,g=l>c?l>d?l:d:c>d?c:d,v=r.next;v!==t;){if(v.x>=f&&v.x<=p&&v.y>=h&&v.y<=g&&zm(i,l,o,c,s,d,v.x,v.y)&&kr(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function XFe(e,t,n,r){var i=e.prev,o=e,s=e.next;if(kr(i,o,s)>=0)return!1;for(var l=i.x,c=o.x,d=s.x,f=i.y,h=o.y,p=s.y,g=lc?l>d?l:d:c>d?c:d,S=f>h?f>p?f:p:h>p?h:p,_=u3(g,v,t,n,r),b=u3(y,S,t,n,r),x=e.prevZ,E=e.nextZ;x&&x.z>=_&&E&&E.z<=b;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&zm(l,f,c,h,d,p,x.x,x.y)&&kr(x.prev,x,x.next)>=0||(x=x.prevZ,E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&zm(l,f,c,h,d,p,E.x,E.y)&&kr(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;x&&x.z>=_;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&zm(l,f,c,h,d,p,x.x,x.y)&&kr(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;E&&E.z<=b;){if(E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&zm(l,f,c,h,d,p,E.x,E.y)&&kr(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function YFe(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Nk(i,o)&&ate(i,r,r.next,o)&&S1(i,o)&&S1(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),E1(r),E1(r.next),r=e=o),r=r.next}while(r!==e);return Sp(r)}function KFe(e,t,n,r,i,o){var s=e;do{for(var l=s.next.next;l!==s.prev;){if(s.i!==l.i&&o3e(s,l)){var c=lte(s,l);s=Sp(s,s.next),c=Sp(c,c.next),_1(s,t,n,r,i,o,0),_1(c,t,n,r,i,o,0);return}l=l.next}s=s.next}while(s!==e)}function QFe(e,t,n,r){var i=[],o,s,l,c,d;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var l=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(l<=r&&l>o&&(o=l,s=n.x=n.x&&n.x>=d&&r!==n.x&&zm(is.x||n.x===s.x&&t3e(s,n)))&&(s=n,h=p)),n=n.next;while(n!==c);return s}function t3e(e,t){return kr(e.prev,e,t.prev)<0&&kr(t.next,e,e.next)<0}function n3e(e,t,n,r){var i=e;do i.z===0&&(i.z=u3(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,r3e(i)}function r3e(e){var t,n,r,i,o,s,l,c,d=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,l=0,t=0;t0||c>0&&r;)l!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,d*=2}while(s>1);return e}function u3(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function i3e(e){var t=e,n=e;do(t.x=(e-s)*(o-l)&&(e-s)*(r-l)>=(n-s)*(t-l)&&(n-s)*(o-l)>=(i-s)*(r-l)}function o3e(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!s3e(e,t)&&(S1(e,t)&&S1(t,e)&&a3e(e,t)&&(kr(e.prev,e,t.prev)||kr(e,t.prev,t))||Nk(e,t)&&kr(e.prev,e,e.next)>0&&kr(t.prev,t,t.next)>0)}function kr(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Nk(e,t){return e.x===t.x&&e.y===t.y}function ate(e,t,n,r){var i=k_(kr(e,t,n)),o=k_(kr(e,t,r)),s=k_(kr(n,r,e)),l=k_(kr(n,r,t));return!!(i!==o&&s!==l||i===0&&T_(e,n,t)||o===0&&T_(e,r,t)||s===0&&T_(n,e,r)||l===0&&T_(n,t,r))}function T_(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function k_(e){return e>0?1:e<0?-1:0}function s3e(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&ate(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function S1(e,t){return kr(e.prev,e,e.next)<0?kr(e,t,e.next)>=0&&kr(e,e.prev,t)>=0:kr(e,t,e.prev)<0||kr(e,e.next,t)<0}function a3e(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function lte(e,t){var n=new d3(e.i,e.x,e.y),r=new d3(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function E9(e,t,n,r){var i=new d3(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function E1(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function d3(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Lk.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(f3(e,0,o,n));if(i)for(var l=0,c=t.length;l0&&(r+=e[i-1].length,n.holes.push(r))}return n};var l3e=dj.exports;const c3e=js(l3e);var dC={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */dC.exports;(function(e,t){(function(n){var r=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof Nt=="object"&&Nt;(o.global===o||o.window===o||o.self===o)&&(n=o);var s,l=2147483647,c=36,d=1,f=26,h=38,p=700,g=72,v=128,y="-",S=/^xn--/,_=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=c-d,A=Math.floor,R=String.fromCharCode,k;function O(Y){throw new RangeError(x[Y])}function L(Y,J){for(var ie=Y.length,ce=[];ie--;)ce[ie]=J(Y[ie]);return ce}function N(Y,J){var ie=Y.split("@"),ce="";ie.length>1&&(ce=ie[0]+"@",Y=ie[1]),Y=Y.replace(b,".");var ue=Y.split("."),se=L(ue,J).join(".");return ce+se}function H(Y){for(var J=[],ie=0,ce=Y.length,ue,se;ie=55296&&ue<=56319&&ie65535&&(J-=65536,ie+=R(J>>>10&1023|55296),J=56320|J&1023),ie+=R(J),ie}).join("")}function z(Y){return Y-48<10?Y-22:Y-65<26?Y-65:Y-97<26?Y-97:c}function D(Y,J){return Y+22+75*(Y<26)-((J!=0)<<5)}function F(Y,J,ie){var ce=0;for(Y=ie?A(Y/p):Y>>1,Y+=A(Y/J);Y>E*f>>1;ce+=c)Y=A(Y/E);return A(ce+(E+1)*Y/(Y+h))}function j(Y){var J=[],ie=Y.length,ce,ue=0,se=v,Q=g,ae,le,he,pe,ve,ye,xe,me,be;for(ae=Y.lastIndexOf(y),ae<0&&(ae=0),le=0;le=128&&O("not-basic"),J.push(Y.charCodeAt(le));for(he=ae>0?ae+1:0;he=ie&&O("invalid-input"),xe=z(Y.charCodeAt(he++)),(xe>=c||xe>A((l-ue)/ve))&&O("overflow"),ue+=xe*ve,me=ye<=Q?d:ye>=Q+f?f:ye-Q,!(xeA(l/be)&&O("overflow"),ve*=be;ce=J.length+1,Q=F(ue-pe,ce,pe==0),A(ue/ce)>l-se&&O("overflow"),se+=A(ue/ce),ue%=ce,J.splice(ue++,0,se)}return W(J)}function V(Y){var J,ie,ce,ue,se,Q,ae,le,he,pe,ve,ye=[],xe,me,be,Qe;for(Y=H(Y),xe=Y.length,J=v,ie=0,se=g,Q=0;Q=J&&veA((l-ie)/me)&&O("overflow"),ie+=(ae-J)*me,J=ae,Q=0;Ql&&O("overflow"),ve==J){for(le=ie,he=c;pe=he<=se?d:he>=se+f?f:he-se,!(le"u"||!mi?ln:mi(Uint8Array),ip={"%AggregateError%":typeof AggregateError>"u"?ln:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ln:ArrayBuffer,"%ArrayIteratorPrototype%":Jp&&mi?mi([][Symbol.iterator]()):ln,"%AsyncFromSyncIteratorPrototype%":ln,"%AsyncFunction%":dm,"%AsyncGenerator%":dm,"%AsyncGeneratorFunction%":dm,"%AsyncIteratorPrototype%":dm,"%Atomics%":typeof Atomics>"u"?ln:Atomics,"%BigInt%":typeof BigInt>"u"?ln:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ln:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ln:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ln:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ln:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ln:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ln:FinalizationRegistry,"%Function%":cte,"%GeneratorFunction%":dm,"%Int8Array%":typeof Int8Array>"u"?ln:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ln:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ln:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Jp&&mi?mi(mi([][Symbol.iterator]())):ln,"%JSON%":typeof JSON=="object"?JSON:ln,"%Map%":typeof Map>"u"?ln:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Jp||!mi?ln:mi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ln:Promise,"%Proxy%":typeof Proxy>"u"?ln:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ln:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ln:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Jp||!mi?ln:mi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ln:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Jp&&mi?mi(""[Symbol.iterator]()):ln,"%Symbol%":Jp?Symbol:ln,"%SyntaxError%":Bg,"%ThrowTypeError%":S3e,"%TypedArray%":C3e,"%TypeError%":rg,"%Uint8Array%":typeof Uint8Array>"u"?ln:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ln:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ln:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ln:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ln:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ln:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ln:WeakSet};if(mi)try{null.error}catch(e){var T3e=mi(mi(e));ip["%Error.prototype%"]=T3e}var k3e=function e(t){var n;if(t==="%AsyncFunction%")n=jN("async function () {}");else if(t==="%GeneratorFunction%")n=jN("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=jN("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&mi&&(n=mi(i.prototype))}return ip[t]=n,n},k9={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},pw=fj,fC=_3e,A3e=pw.call(Function.call,Array.prototype.concat),R3e=pw.call(Function.apply,Array.prototype.splice),A9=pw.call(Function.call,String.prototype.replace),hC=pw.call(Function.call,String.prototype.slice),I3e=pw.call(Function.call,RegExp.prototype.exec),P3e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O3e=/\\(\\)?/g,M3e=function(t){var n=hC(t,0,1),r=hC(t,-1);if(n==="%"&&r!=="%")throw new Bg("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Bg("invalid intrinsic syntax, expected opening `%`");var i=[];return A9(t,P3e,function(o,s,l,c){i[i.length]=l?A9(c,O3e,"$1"):s||o}),i},D3e=function(t,n){var r=t,i;if(fC(k9,r)&&(i=k9[r],r="%"+i[0]+"%"),fC(ip,r)){var o=ip[r];if(o===dm&&(o=k3e(r)),typeof o>"u"&&!n)throw new rg("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Bg("intrinsic "+t+" does not exist!")},hj=function(t,n){if(typeof t!="string"||t.length===0)throw new rg("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new rg('"allowMissing" argument must be a boolean');if(I3e(/^%?[^%]*%?$/,t)===null)throw new Bg("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=M3e(t),i=r.length>0?r[0]:"",o=D3e("%"+i+"%",n),s=o.name,l=o.value,c=!1,d=o.alias;d&&(i=d[0],R3e(r,A3e([0,1],d)));for(var f=1,h=!0;f=r.length){var y=rp(l,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[p]}else h=fC(l,p),l=l[p];h&&!c&&(ip[s]=l)}}return l},ute={exports:{}};(function(e){var t=fj,n=hj,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&l){var g=s(p,"length");g.configurable&&l(p,"length",{value:1+c(0,h.length-(arguments.length-1))})}return p};var d=function(){return o(t,r,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d})(ute);var L3e=ute.exports,dte=hj,fte=L3e,N3e=fte(dte("String.prototype.indexOf")),B3e=function(t,n){var r=dte(t,!!n);return typeof r=="function"&&N3e(t,".prototype.")>-1?fte(r):r};const $3e={},F3e=Object.freeze(Object.defineProperty({__proto__:null,default:$3e},Symbol.toStringTag,{value:"Module"})),hte=aq(F3e);var pj=typeof Map=="function"&&Map.prototype,HN=Object.getOwnPropertyDescriptor&&pj?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,pC=pj&&HN&&typeof HN.get=="function"?HN.get:null,R9=pj&&Map.prototype.forEach,mj=typeof Set=="function"&&Set.prototype,WN=Object.getOwnPropertyDescriptor&&mj?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,mC=mj&&WN&&typeof WN.get=="function"?WN.get:null,I9=mj&&Set.prototype.forEach,z3e=typeof WeakMap=="function"&&WeakMap.prototype,_x=z3e?WeakMap.prototype.has:null,j3e=typeof WeakSet=="function"&&WeakSet.prototype,Sx=j3e?WeakSet.prototype.has:null,U3e=typeof WeakRef=="function"&&WeakRef.prototype,P9=U3e?WeakRef.prototype.deref:null,H3e=Boolean.prototype.valueOf,W3e=Object.prototype.toString,G3e=Function.prototype.toString,V3e=String.prototype.match,gj=String.prototype.slice,hd=String.prototype.replace,q3e=String.prototype.toUpperCase,O9=String.prototype.toLowerCase,pte=RegExp.prototype.test,M9=Array.prototype.concat,Pl=Array.prototype.join,X3e=Array.prototype.slice,D9=Math.floor,h3=typeof BigInt=="function"?BigInt.prototype.valueOf:null,GN=Object.getOwnPropertySymbols,p3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,$g=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ro=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===$g||"symbol")?Symbol.toStringTag:null,mte=Object.prototype.propertyIsEnumerable,L9=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N9(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||pte.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-D9(-e):D9(e);if(r!==e){var i=String(r),o=gj.call(t,i.length+1);return hd.call(i,n,"$&_")+"."+hd.call(hd.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return hd.call(t,n,"$&_")}var m3=hte,B9=m3.custom,$9=vte(B9)?B9:null,Y3e=function e(t,n,r,i){var o=n||{};if(td(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(td(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=td(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(td(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(td(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return bte(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return l?N9(t,c):c}if(typeof t=="bigint"){var d=String(t)+"n";return l?N9(t,d):d}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return g3(t)?"[Array]":"[Object]";var h=h5e(o,r);if(typeof i>"u")i=[];else if(yte(i,t)>=0)return"[Circular]";function p(z,D,F){if(D&&(i=X3e.call(i),i.push(D)),F){var j={depth:o.depth};return td(o,"quoteStyle")&&(j.quoteStyle=o.quoteStyle),e(z,j,r+1,i)}return e(z,o,r+1,i)}if(typeof t=="function"&&!F9(t)){var g=i5e(t),v=A_(t,p);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(v.length>0?" { "+Pl.call(v,", ")+" }":"")}if(vte(t)){var y=$g?hd.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):p3.call(t);return typeof t=="object"&&!$g?bb(y):y}if(u5e(t)){for(var S="<"+O9.call(String(t.nodeName)),_=t.attributes||[],b=0;b<_.length;b++)S+=" "+_[b].name+"="+gte(K3e(_[b].value),"double",o);return S+=">",t.childNodes&&t.childNodes.length&&(S+="..."),S+="",S}if(g3(t)){if(t.length===0)return"[]";var x=A_(t,p);return h&&!f5e(x)?"["+v3(x,h)+"]":"[ "+Pl.call(x,", ")+" ]"}if(J3e(t)){var E=A_(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!mte.call(t,"cause")?"{ ["+String(t)+"] "+Pl.call(M9.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Pl.call(E,", ")+" }"}if(typeof t=="object"&&s){if($9&&typeof t[$9]=="function"&&m3)return m3(t,{depth:f-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(o5e(t)){var A=[];return R9&&R9.call(t,function(z,D){A.push(p(D,t,!0)+" => "+p(z,t))}),z9("Map",pC.call(t),A,h)}if(l5e(t)){var R=[];return I9&&I9.call(t,function(z){R.push(p(z,t))}),z9("Set",mC.call(t),R,h)}if(s5e(t))return VN("WeakMap");if(c5e(t))return VN("WeakSet");if(a5e(t))return VN("WeakRef");if(e5e(t))return bb(p(Number(t)));if(n5e(t))return bb(p(h3.call(t)));if(t5e(t))return bb(H3e.call(t));if(Z3e(t))return bb(p(String(t)));if(!Q3e(t)&&!F9(t)){var k=A_(t,p),O=L9?L9(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",N=!O&&ro&&Object(t)===t&&ro in t?gj.call(tf(t),8,-1):L?"Object":"",H=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=H+(N||L?"["+Pl.call(M9.call([],N||[],L||[]),": ")+"] ":"");return k.length===0?W+"{}":h?W+"{"+v3(k,h)+"}":W+"{ "+Pl.call(k,", ")+" }"}return String(t)};function gte(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function K3e(e){return hd.call(String(e),/"/g,""")}function g3(e){return tf(e)==="[object Array]"&&(!ro||!(typeof e=="object"&&ro in e))}function Q3e(e){return tf(e)==="[object Date]"&&(!ro||!(typeof e=="object"&&ro in e))}function F9(e){return tf(e)==="[object RegExp]"&&(!ro||!(typeof e=="object"&&ro in e))}function J3e(e){return tf(e)==="[object Error]"&&(!ro||!(typeof e=="object"&&ro in e))}function Z3e(e){return tf(e)==="[object String]"&&(!ro||!(typeof e=="object"&&ro in e))}function e5e(e){return tf(e)==="[object Number]"&&(!ro||!(typeof e=="object"&&ro in e))}function t5e(e){return tf(e)==="[object Boolean]"&&(!ro||!(typeof e=="object"&&ro in e))}function vte(e){if($g)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!p3)return!1;try{return p3.call(e),!0}catch{}return!1}function n5e(e){if(!e||typeof e!="object"||!h3)return!1;try{return h3.call(e),!0}catch{}return!1}var r5e=Object.prototype.hasOwnProperty||function(e){return e in this};function td(e,t){return r5e.call(e,t)}function tf(e){return W3e.call(e)}function i5e(e){if(e.name)return e.name;var t=V3e.call(G3e.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function yte(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return bte(gj.call(e,0,t.maxStringLength),t)+r}var i=hd.call(hd.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,d5e);return gte(i,"single",t)}function d5e(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+q3e.call(t.toString(16))}function bb(e){return"Object("+e+")"}function VN(e){return e+" { ? }"}function z9(e,t,n,r){var i=r?v3(n,r):Pl.call(n,", ");return e+" ("+t+") {"+i+"}"}function f5e(e){for(var t=0;t=0)return!1;return!0}function h5e(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Pl.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Pl.call(Array(t+1),n)}}function v3(e,t){if(e.length===0)return"";var n=` +}`;var Ve=W0(function(){return ut(M,we+"return "+oe).apply(n,B)});if(Ve.source=oe,lh(Ve))throw Ve;return Ve}function _M(a){return ft(a).toLowerCase()}function SM(a){return ft(a).toUpperCase()}function EM(a,u,m){if(a=ft(a),a&&(m||u===n))return Zv(a);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=yr(u),M=ey(w,T),B=ty(w,T)+1;return Pi(w,M,B).join("")}function CM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.slice(0,ry(a)+1);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ty(w,yr(u))+1;return Pi(w,0,T).join("")}function TM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.replace(so,"");if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ey(w,yr(u));return Pi(w,T).join("")}function kM(a,u){var m=N,w=H;if(Ft(u)){var T="separator"in u?u.separator:T;m="length"in u?We(u.length):m,w="omission"in u?Vn(u.omission):w}a=ft(a);var M=a.length;if(os(a)){var B=yr(a);M=B.length}if(m>=M)return a;var U=m-ss(w);if(U<1)return w;var X=B?Pi(B,0,U).join(""):a.slice(0,U);if(T===n)return X+w;if(B&&(U+=X.length-U),ch(T)){if(a.slice(U).search(T)){var ne,re=X;for(T.global||(T=Cf(T.source,ft(Jn.exec(T))+"g")),T.lastIndex=0;ne=T.exec(re);)var oe=ne.index;X=X.slice(0,oe===n?U:oe)}}else if(a.indexOf(Vn(T),U)!=U){var fe=X.lastIndexOf(T);fe>-1&&(X=X.slice(0,fe))}return X+w}function AM(a){return a=ft(a),a&&Fr.test(a)?a.replace(Or,rR):a}var RM=hs(function(a,u,m){return a+(m?" ":"")+u.toUpperCase()}),fh=Gy("toUpperCase");function H0(a,u,m){return a=ft(a),u=m?n:u,u===n?JA(a)?sR(a):HA(a):a.match(u)||[]}var W0=Xe(function(a,u){try{return Wn(a,n,u)}catch(m){return lh(m)?m:new De(m)}}),IM=ri(function(a,u){return nr(u,function(m){m=Ur(m),ti(a,m,sh(a[m],a))}),a});function PM(a){var u=a==null?0:a.length,m=Ce();return a=u?Dt(a,function(w){if(typeof w[1]!="function")throw new rr(s);return[m(w[0]),w[1]]}):[],Xe(function(w){for(var T=-1;++TG)return[];var m=J,w=gn(a,J);u=Ce(u),a-=J;for(var T=_f(w,u);++m0||u<0)?new Je(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),u!==n&&(u=We(u),m=u<0?m.dropRight(-u):m.take(u-a)),m)},Je.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Je.prototype.toArray=function(){return this.take(J)},zr(Je.prototype,function(a,u){var m=/^(?:filter|find|map|reject)|While$/.test(u),w=/^(?:head|last)$/.test(u),T=P[w?"take"+(u=="last"?"Right":""):u],M=w||/^find/.test(u);T&&(P.prototype[u]=function(){var B=this.__wrapped__,U=w?[1]:arguments,X=B instanceof Je,ne=U[0],re=X||Be(B),oe=function(Ke){var nt=T.apply(P,Ci([Ke],U));return w&&fe?nt[0]:nt};re&&m&&typeof ne=="function"&&ne.length!=1&&(X=re=!1);var fe=this.__chain__,we=!!this.__actions__.length,Te=M&&!fe,Ve=X&&!we;if(!M&&re){B=Ve?B:new Je(this);var ke=a.apply(B,U);return ke.__actions__.push({func:Hc,args:[oe],thisArg:n}),new ir(ke,fe)}return Te&&Ve?a.apply(this,U):(ke=this.thru(oe),Te?w?ke.value()[0]:ke.value():ke)})}),nr(["pop","push","shift","sort","splice","unshift"],function(a){var u=mc[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",w=/^(?:pop|shift)$/.test(a);P.prototype[a]=function(){var T=arguments;if(w&&!this.__chain__){var M=this.value();return u.apply(Be(M)?M:[],T)}return this[m](function(B){return u.apply(Be(B)?B:[],T)})}}),zr(Je.prototype,function(a,u){var m=P[u];if(m){var w=m.name+"";vt.call(us,w)||(us[w]=[]),us[w].push({name:u,func:m})}}),us[Nc(n,_).name]=[{name:"wrapper",func:n}],Je.prototype.clone=AR,Je.prototype.reverse=RR,Je.prototype.value=IR,P.prototype.at=o2,P.prototype.chain=s2,P.prototype.commit=a2,P.prototype.next=l2,P.prototype.plant=u2,P.prototype.reverse=d2,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=f2,P.prototype.first=P.prototype.head,Sa&&(P.prototype[Sa]=c2),P},as=aR();lo?((lo.exports=as)._=as,pf._=as):dn._=as}).call(Nt)})(uC,uC.exports);var Yt=uC.exports;let HFe=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");var Fp=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(Fp||{}),ite=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(ite||{}),l3=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(l3||{}),Mt=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(Mt||{}),Ll=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(Ll||{}),Ge=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(Ge||{}),ng=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(ng||{}),It=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(It||{}),c3=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(c3||{}),hu=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(hu||{}),Pd=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(Pd||{}),Ql=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(Ql||{}),yl=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(yl||{}),Il=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(Il||{}),uj=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(uj||{}),oa=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(oa||{}),li=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(li||{}),Gr=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(Gr||{}),Wl=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(Wl||{});const WFe={createCanvas:(e,t)=>{const n=document.createElement("canvas");return n.width=e,n.height=t,n},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},tt={ADAPTER:WFe,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var $N=/iPhone/i,f9=/iPod/i,h9=/iPad/i,p9=/\biOS-universal(?:.+)Mac\b/i,FN=/\bAndroid(?:.+)Mobile\b/i,m9=/Android/i,Qp=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,C_=/Silk/i,eu=/Windows Phone/i,g9=/\bWindows(?:.+)ARM\b/i,v9=/BlackBerry/i,y9=/BB10/i,b9=/Opera Mini/i,x9=/\b(CriOS|Chrome)(?:.+)Mobile/i,w9=/Mobile(?:.+)Firefox\b/i,_9=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function GFe(e){return function(t){return t.test(e)}}function S9(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);var i=GFe(n),o={apple:{phone:i($N)&&!i(eu),ipod:i(f9),tablet:!i($N)&&(i(h9)||_9(t))&&!i(eu),universal:i(p9),device:(i($N)||i(f9)||i(h9)||i(p9)||_9(t))&&!i(eu)},amazon:{phone:i(Qp),tablet:!i(Qp)&&i(C_),device:i(Qp)||i(C_)},android:{phone:!i(eu)&&i(Qp)||!i(eu)&&i(FN),tablet:!i(eu)&&!i(Qp)&&!i(FN)&&(i(C_)||i(m9)),device:!i(eu)&&(i(Qp)||i(C_)||i(FN)||i(m9))||i(/\bokhttp\b/i)},windows:{phone:i(eu),tablet:i(g9),device:i(eu)||i(g9)},other:{blackberry:i(v9),blackberry10:i(y9),opera:i(b9),firefox:i(w9),chrome:i(x9),device:i(v9)||i(y9)||i(b9)||i(w9)||i(x9)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}const VFe=S9.default??S9,pu=VFe(globalThis.navigator);tt.RETINA_PREFIX=/@([0-9\.]+)x/;tt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var ote={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,d,f){this.fn=c,this.context=d,this.once=f||!1}function o(c,d,f,h,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var g=new i(f,h||c,p),v=n?n+d:d;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],g]:c._events[v].push(g):(c._events[v]=g,c._eventsCount++),c}function s(c,d){--c._eventsCount===0?c._events=new r:delete c._events[d]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],f,h;if(this._eventsCount===0)return d;for(h in f=this._events)t.call(f,h)&&d.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(f)):d},l.prototype.listeners=function(d){var f=n?n+d:d,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,g=h.length,v=new Array(g);p80*n){l=d=e[0],c=f=e[1];for(var v=n;vd&&(d=h),p>f&&(f=p);g=Math.max(d-l,f-c),g=g!==0?32767/g:0}return _1(o,s,n,l,c,g,0),s}function ste(e,t,n,r,i){var o,s;if(i===f3(e,t,n,r)>0)for(o=t;o=t;o-=r)s=E9(o,e[o],e[o+1],s);return s&&Nk(s,s.next)&&(E1(s),s=s.next),s}function Sp(e,t){if(!e)return e;t||(t=e);var n=e,r;do if(r=!1,!n.steiner&&(Nk(n,n.next)||kr(n.prev,n,n.next)===0)){if(E1(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function _1(e,t,n,r,i,o,s){if(e){!s&&o&&r3e(e,r,i,o);for(var l=e,c,d;e.prev!==e.next;){if(c=e.prev,d=e.next,o?YFe(e,r,i,o):XFe(e)){t.push(c.i/n|0),t.push(e.i/n|0),t.push(d.i/n|0),E1(e),e=d.next,l=d.next;continue}if(e=d,e===l){s?s===1?(e=KFe(Sp(e),t,n),_1(e,t,n,r,i,o,2)):s===2&&QFe(e,t,n,r,i,o):_1(Sp(e),t,n,r,i,o,1);break}}}}function XFe(e){var t=e.prev,n=e,r=e.next;if(kr(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,s=r.x,l=t.y,c=n.y,d=r.y,f=io?i>s?i:s:o>s?o:s,g=l>c?l>d?l:d:c>d?c:d,v=r.next;v!==t;){if(v.x>=f&&v.x<=p&&v.y>=h&&v.y<=g&&zm(i,l,o,c,s,d,v.x,v.y)&&kr(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function YFe(e,t,n,r){var i=e.prev,o=e,s=e.next;if(kr(i,o,s)>=0)return!1;for(var l=i.x,c=o.x,d=s.x,f=i.y,h=o.y,p=s.y,g=lc?l>d?l:d:c>d?c:d,S=f>h?f>p?f:p:h>p?h:p,_=u3(g,v,t,n,r),b=u3(y,S,t,n,r),x=e.prevZ,E=e.nextZ;x&&x.z>=_&&E&&E.z<=b;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&zm(l,f,c,h,d,p,x.x,x.y)&&kr(x.prev,x,x.next)>=0||(x=x.prevZ,E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&zm(l,f,c,h,d,p,E.x,E.y)&&kr(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;x&&x.z>=_;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&zm(l,f,c,h,d,p,x.x,x.y)&&kr(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;E&&E.z<=b;){if(E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&zm(l,f,c,h,d,p,E.x,E.y)&&kr(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function KFe(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Nk(i,o)&&ate(i,r,r.next,o)&&S1(i,o)&&S1(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),E1(r),E1(r.next),r=e=o),r=r.next}while(r!==e);return Sp(r)}function QFe(e,t,n,r,i,o){var s=e;do{for(var l=s.next.next;l!==s.prev;){if(s.i!==l.i&&s3e(s,l)){var c=lte(s,l);s=Sp(s,s.next),c=Sp(c,c.next),_1(s,t,n,r,i,o,0),_1(c,t,n,r,i,o,0);return}l=l.next}s=s.next}while(s!==e)}function JFe(e,t,n,r){var i=[],o,s,l,c,d;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var l=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(l<=r&&l>o&&(o=l,s=n.x=n.x&&n.x>=d&&r!==n.x&&zm(is.x||n.x===s.x&&n3e(s,n)))&&(s=n,h=p)),n=n.next;while(n!==c);return s}function n3e(e,t){return kr(e.prev,e,t.prev)<0&&kr(t.next,e,e.next)<0}function r3e(e,t,n,r){var i=e;do i.z===0&&(i.z=u3(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,i3e(i)}function i3e(e){var t,n,r,i,o,s,l,c,d=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,l=0,t=0;t0||c>0&&r;)l!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,d*=2}while(s>1);return e}function u3(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function o3e(e){var t=e,n=e;do(t.x=(e-s)*(o-l)&&(e-s)*(r-l)>=(n-s)*(t-l)&&(n-s)*(o-l)>=(i-s)*(r-l)}function s3e(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!a3e(e,t)&&(S1(e,t)&&S1(t,e)&&l3e(e,t)&&(kr(e.prev,e,t.prev)||kr(e,t.prev,t))||Nk(e,t)&&kr(e.prev,e,e.next)>0&&kr(t.prev,t,t.next)>0)}function kr(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Nk(e,t){return e.x===t.x&&e.y===t.y}function ate(e,t,n,r){var i=k_(kr(e,t,n)),o=k_(kr(e,t,r)),s=k_(kr(n,r,e)),l=k_(kr(n,r,t));return!!(i!==o&&s!==l||i===0&&T_(e,n,t)||o===0&&T_(e,r,t)||s===0&&T_(n,e,r)||l===0&&T_(n,t,r))}function T_(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function k_(e){return e>0?1:e<0?-1:0}function a3e(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&ate(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function S1(e,t){return kr(e.prev,e,e.next)<0?kr(e,t,e.next)>=0&&kr(e,e.prev,t)>=0:kr(e,t,e.prev)<0||kr(e,e.next,t)<0}function l3e(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function lte(e,t){var n=new d3(e.i,e.x,e.y),r=new d3(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function E9(e,t,n,r){var i=new d3(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function E1(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function d3(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Lk.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(f3(e,0,o,n));if(i)for(var l=0,c=t.length;l0&&(r+=e[i-1].length,n.holes.push(r))}return n};var c3e=dj.exports;const u3e=js(c3e);var dC={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */dC.exports;(function(e,t){(function(n){var r=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof Nt=="object"&&Nt;(o.global===o||o.window===o||o.self===o)&&(n=o);var s,l=2147483647,c=36,d=1,f=26,h=38,p=700,g=72,v=128,y="-",S=/^xn--/,_=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=c-d,A=Math.floor,R=String.fromCharCode,k;function O(Y){throw new RangeError(x[Y])}function L(Y,J){for(var ie=Y.length,ce=[];ie--;)ce[ie]=J(Y[ie]);return ce}function N(Y,J){var ie=Y.split("@"),ce="";ie.length>1&&(ce=ie[0]+"@",Y=ie[1]),Y=Y.replace(b,".");var ue=Y.split("."),se=L(ue,J).join(".");return ce+se}function H(Y){for(var J=[],ie=0,ce=Y.length,ue,se;ie=55296&&ue<=56319&&ie65535&&(J-=65536,ie+=R(J>>>10&1023|55296),J=56320|J&1023),ie+=R(J),ie}).join("")}function z(Y){return Y-48<10?Y-22:Y-65<26?Y-65:Y-97<26?Y-97:c}function D(Y,J){return Y+22+75*(Y<26)-((J!=0)<<5)}function F(Y,J,ie){var ce=0;for(Y=ie?A(Y/p):Y>>1,Y+=A(Y/J);Y>E*f>>1;ce+=c)Y=A(Y/E);return A(ce+(E+1)*Y/(Y+h))}function j(Y){var J=[],ie=Y.length,ce,ue=0,se=v,Q=g,ae,le,he,pe,ve,ye,xe,me,be;for(ae=Y.lastIndexOf(y),ae<0&&(ae=0),le=0;le=128&&O("not-basic"),J.push(Y.charCodeAt(le));for(he=ae>0?ae+1:0;he=ie&&O("invalid-input"),xe=z(Y.charCodeAt(he++)),(xe>=c||xe>A((l-ue)/ve))&&O("overflow"),ue+=xe*ve,me=ye<=Q?d:ye>=Q+f?f:ye-Q,!(xeA(l/be)&&O("overflow"),ve*=be;ce=J.length+1,Q=F(ue-pe,ce,pe==0),A(ue/ce)>l-se&&O("overflow"),se+=A(ue/ce),ue%=ce,J.splice(ue++,0,se)}return W(J)}function V(Y){var J,ie,ce,ue,se,Q,ae,le,he,pe,ve,ye=[],xe,me,be,Qe;for(Y=H(Y),xe=Y.length,J=v,ie=0,se=g,Q=0;Q=J&&veA((l-ie)/me)&&O("overflow"),ie+=(ae-J)*me,J=ae,Q=0;Ql&&O("overflow"),ve==J){for(le=ie,he=c;pe=he<=se?d:he>=se+f?f:he-se,!(le"u"||!mi?ln:mi(Uint8Array),ip={"%AggregateError%":typeof AggregateError>"u"?ln:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ln:ArrayBuffer,"%ArrayIteratorPrototype%":Jp&&mi?mi([][Symbol.iterator]()):ln,"%AsyncFromSyncIteratorPrototype%":ln,"%AsyncFunction%":dm,"%AsyncGenerator%":dm,"%AsyncGeneratorFunction%":dm,"%AsyncIteratorPrototype%":dm,"%Atomics%":typeof Atomics>"u"?ln:Atomics,"%BigInt%":typeof BigInt>"u"?ln:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ln:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ln:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ln:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ln:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ln:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ln:FinalizationRegistry,"%Function%":cte,"%GeneratorFunction%":dm,"%Int8Array%":typeof Int8Array>"u"?ln:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ln:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ln:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Jp&&mi?mi(mi([][Symbol.iterator]())):ln,"%JSON%":typeof JSON=="object"?JSON:ln,"%Map%":typeof Map>"u"?ln:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Jp||!mi?ln:mi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ln:Promise,"%Proxy%":typeof Proxy>"u"?ln:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ln:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ln:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Jp||!mi?ln:mi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ln:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Jp&&mi?mi(""[Symbol.iterator]()):ln,"%Symbol%":Jp?Symbol:ln,"%SyntaxError%":Bg,"%ThrowTypeError%":E3e,"%TypedArray%":T3e,"%TypeError%":rg,"%Uint8Array%":typeof Uint8Array>"u"?ln:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ln:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ln:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ln:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ln:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ln:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ln:WeakSet};if(mi)try{null.error}catch(e){var k3e=mi(mi(e));ip["%Error.prototype%"]=k3e}var A3e=function e(t){var n;if(t==="%AsyncFunction%")n=jN("async function () {}");else if(t==="%GeneratorFunction%")n=jN("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=jN("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&mi&&(n=mi(i.prototype))}return ip[t]=n,n},k9={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},pw=fj,fC=S3e,R3e=pw.call(Function.call,Array.prototype.concat),I3e=pw.call(Function.apply,Array.prototype.splice),A9=pw.call(Function.call,String.prototype.replace),hC=pw.call(Function.call,String.prototype.slice),P3e=pw.call(Function.call,RegExp.prototype.exec),O3e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M3e=/\\(\\)?/g,D3e=function(t){var n=hC(t,0,1),r=hC(t,-1);if(n==="%"&&r!=="%")throw new Bg("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Bg("invalid intrinsic syntax, expected opening `%`");var i=[];return A9(t,O3e,function(o,s,l,c){i[i.length]=l?A9(c,M3e,"$1"):s||o}),i},L3e=function(t,n){var r=t,i;if(fC(k9,r)&&(i=k9[r],r="%"+i[0]+"%"),fC(ip,r)){var o=ip[r];if(o===dm&&(o=A3e(r)),typeof o>"u"&&!n)throw new rg("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Bg("intrinsic "+t+" does not exist!")},hj=function(t,n){if(typeof t!="string"||t.length===0)throw new rg("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new rg('"allowMissing" argument must be a boolean');if(P3e(/^%?[^%]*%?$/,t)===null)throw new Bg("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=D3e(t),i=r.length>0?r[0]:"",o=L3e("%"+i+"%",n),s=o.name,l=o.value,c=!1,d=o.alias;d&&(i=d[0],I3e(r,R3e([0,1],d)));for(var f=1,h=!0;f=r.length){var y=rp(l,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[p]}else h=fC(l,p),l=l[p];h&&!c&&(ip[s]=l)}}return l},ute={exports:{}};(function(e){var t=fj,n=hj,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&l){var g=s(p,"length");g.configurable&&l(p,"length",{value:1+c(0,h.length-(arguments.length-1))})}return p};var d=function(){return o(t,r,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d})(ute);var N3e=ute.exports,dte=hj,fte=N3e,B3e=fte(dte("String.prototype.indexOf")),$3e=function(t,n){var r=dte(t,!!n);return typeof r=="function"&&B3e(t,".prototype.")>-1?fte(r):r};const F3e={},z3e=Object.freeze(Object.defineProperty({__proto__:null,default:F3e},Symbol.toStringTag,{value:"Module"})),hte=aq(z3e);var pj=typeof Map=="function"&&Map.prototype,HN=Object.getOwnPropertyDescriptor&&pj?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,pC=pj&&HN&&typeof HN.get=="function"?HN.get:null,R9=pj&&Map.prototype.forEach,mj=typeof Set=="function"&&Set.prototype,WN=Object.getOwnPropertyDescriptor&&mj?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,mC=mj&&WN&&typeof WN.get=="function"?WN.get:null,I9=mj&&Set.prototype.forEach,j3e=typeof WeakMap=="function"&&WeakMap.prototype,_x=j3e?WeakMap.prototype.has:null,U3e=typeof WeakSet=="function"&&WeakSet.prototype,Sx=U3e?WeakSet.prototype.has:null,H3e=typeof WeakRef=="function"&&WeakRef.prototype,P9=H3e?WeakRef.prototype.deref:null,W3e=Boolean.prototype.valueOf,G3e=Object.prototype.toString,V3e=Function.prototype.toString,q3e=String.prototype.match,gj=String.prototype.slice,hd=String.prototype.replace,X3e=String.prototype.toUpperCase,O9=String.prototype.toLowerCase,pte=RegExp.prototype.test,M9=Array.prototype.concat,Pl=Array.prototype.join,Y3e=Array.prototype.slice,D9=Math.floor,h3=typeof BigInt=="function"?BigInt.prototype.valueOf:null,GN=Object.getOwnPropertySymbols,p3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,$g=typeof Symbol=="function"&&typeof Symbol.iterator=="object",io=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===$g||"symbol")?Symbol.toStringTag:null,mte=Object.prototype.propertyIsEnumerable,L9=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N9(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||pte.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-D9(-e):D9(e);if(r!==e){var i=String(r),o=gj.call(t,i.length+1);return hd.call(i,n,"$&_")+"."+hd.call(hd.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return hd.call(t,n,"$&_")}var m3=hte,B9=m3.custom,$9=vte(B9)?B9:null,K3e=function e(t,n,r,i){var o=n||{};if(td(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(td(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=td(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(td(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(td(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return bte(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return l?N9(t,c):c}if(typeof t=="bigint"){var d=String(t)+"n";return l?N9(t,d):d}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return g3(t)?"[Array]":"[Object]";var h=p5e(o,r);if(typeof i>"u")i=[];else if(yte(i,t)>=0)return"[Circular]";function p(z,D,F){if(D&&(i=Y3e.call(i),i.push(D)),F){var j={depth:o.depth};return td(o,"quoteStyle")&&(j.quoteStyle=o.quoteStyle),e(z,j,r+1,i)}return e(z,o,r+1,i)}if(typeof t=="function"&&!F9(t)){var g=o5e(t),v=A_(t,p);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(v.length>0?" { "+Pl.call(v,", ")+" }":"")}if(vte(t)){var y=$g?hd.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):p3.call(t);return typeof t=="object"&&!$g?bb(y):y}if(d5e(t)){for(var S="<"+O9.call(String(t.nodeName)),_=t.attributes||[],b=0;b<_.length;b++)S+=" "+_[b].name+"="+gte(Q3e(_[b].value),"double",o);return S+=">",t.childNodes&&t.childNodes.length&&(S+="..."),S+="",S}if(g3(t)){if(t.length===0)return"[]";var x=A_(t,p);return h&&!h5e(x)?"["+v3(x,h)+"]":"[ "+Pl.call(x,", ")+" ]"}if(Z3e(t)){var E=A_(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!mte.call(t,"cause")?"{ ["+String(t)+"] "+Pl.call(M9.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Pl.call(E,", ")+" }"}if(typeof t=="object"&&s){if($9&&typeof t[$9]=="function"&&m3)return m3(t,{depth:f-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(s5e(t)){var A=[];return R9&&R9.call(t,function(z,D){A.push(p(D,t,!0)+" => "+p(z,t))}),z9("Map",pC.call(t),A,h)}if(c5e(t)){var R=[];return I9&&I9.call(t,function(z){R.push(p(z,t))}),z9("Set",mC.call(t),R,h)}if(a5e(t))return VN("WeakMap");if(u5e(t))return VN("WeakSet");if(l5e(t))return VN("WeakRef");if(t5e(t))return bb(p(Number(t)));if(r5e(t))return bb(p(h3.call(t)));if(n5e(t))return bb(W3e.call(t));if(e5e(t))return bb(p(String(t)));if(!J3e(t)&&!F9(t)){var k=A_(t,p),O=L9?L9(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",N=!O&&io&&Object(t)===t&&io in t?gj.call(tf(t),8,-1):L?"Object":"",H=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=H+(N||L?"["+Pl.call(M9.call([],N||[],L||[]),": ")+"] ":"");return k.length===0?W+"{}":h?W+"{"+v3(k,h)+"}":W+"{ "+Pl.call(k,", ")+" }"}return String(t)};function gte(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Q3e(e){return hd.call(String(e),/"/g,""")}function g3(e){return tf(e)==="[object Array]"&&(!io||!(typeof e=="object"&&io in e))}function J3e(e){return tf(e)==="[object Date]"&&(!io||!(typeof e=="object"&&io in e))}function F9(e){return tf(e)==="[object RegExp]"&&(!io||!(typeof e=="object"&&io in e))}function Z3e(e){return tf(e)==="[object Error]"&&(!io||!(typeof e=="object"&&io in e))}function e5e(e){return tf(e)==="[object String]"&&(!io||!(typeof e=="object"&&io in e))}function t5e(e){return tf(e)==="[object Number]"&&(!io||!(typeof e=="object"&&io in e))}function n5e(e){return tf(e)==="[object Boolean]"&&(!io||!(typeof e=="object"&&io in e))}function vte(e){if($g)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!p3)return!1;try{return p3.call(e),!0}catch{}return!1}function r5e(e){if(!e||typeof e!="object"||!h3)return!1;try{return h3.call(e),!0}catch{}return!1}var i5e=Object.prototype.hasOwnProperty||function(e){return e in this};function td(e,t){return i5e.call(e,t)}function tf(e){return G3e.call(e)}function o5e(e){if(e.name)return e.name;var t=q3e.call(V3e.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function yte(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return bte(gj.call(e,0,t.maxStringLength),t)+r}var i=hd.call(hd.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,f5e);return gte(i,"single",t)}function f5e(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+X3e.call(t.toString(16))}function bb(e){return"Object("+e+")"}function VN(e){return e+" { ? }"}function z9(e,t,n,r){var i=r?v3(n,r):Pl.call(n,", ");return e+" ("+t+") {"+i+"}"}function h5e(e){for(var t=0;t=0)return!1;return!0}function p5e(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Pl.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Pl.call(Array(t+1),n)}}function v3(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+Pl.call(e,","+n)+` -`+t.prev}function A_(e,t){var n=g3(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Uh(r)){for(var i=[],o=0;o=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===A5e.RFC1738&&(d===40||d===41)){l+=s.charAt(c);continue}if(d<128){l=l+Sl[d];continue}if(d<2048){l=l+(Sl[192|d>>6]+Sl[128|d&63]);continue}if(d<55296||d>=57344){l=l+(Sl[224|d>>12]+Sl[128|d>>6&63]+Sl[128|d&63]);continue}c+=1,d=65536+((d&1023)<<10|s.charCodeAt(c)&1023),l+=Sl[240|d>>18]+Sl[128|d>>12&63]+Sl[128|d>>6&63]+Sl[128|d&63]}return l},D5e=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(x=0)}if(typeof c=="function"?_=c(n,_):_ instanceof Date?_=h(_):r==="comma"&&au(_)&&(_=FS.maybeMap(_,function(j){return j instanceof Date?h(j):j})),_===null){if(o)return l&&!v?l(n,Yi.encoder,y,"key",p):n;_=""}if(U5e(_)||FS.isBuffer(_)){if(l){var R=v?n:l(n,Yi.encoder,y,"key",p);return[g(R)+"="+g(l(_,Yi.encoder,y,"value",p))]}return[g(n)+"="+g(String(_))]}var k=[];if(typeof _>"u")return k;var O;if(r==="comma"&&au(_))v&&l&&(_=FS.maybeMap(_,l)),O=[{value:_.length>0?_.join(",")||null:void 0}];else if(au(c))O=c;else{var L=Object.keys(_);O=d?L.sort(d):L}for(var N=i&&au(_)&&_.length===1?n+"[]":n,H=0;H"u"?Yi.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Yi.charsetSentinel,delimiter:typeof t.delimiter>"u"?Yi.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Yi.encode,encoder:typeof t.encoder=="function"?t.encoder:Yi.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Yi.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Yi.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Yi.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Yi.strictNullHandling}},G5e=function(e,t){var n=e,r=W5e(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):au(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var l;t&&t.arrayFormat in j9?l=t.arrayFormat:t&&"indices"in t?l=t.indices?"indices":"repeat":l="indices";var c=j9[l];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=c==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=_te(),h=0;h0?v+g:""},Fg=wte,y3=Object.prototype.hasOwnProperty,V5e=Array.isArray,hi={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Fg.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},q5e=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Ete=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},X5e="utf8=%26%2310003%3B",Y5e="utf8=%E2%9C%93",K5e=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),l=-1,c,d=n.charset;if(n.charsetSentinel)for(c=0;c-1&&(v=V5e(v)?[v]:v),y3.call(r,g)?r[g]=Fg.combine(r[g],v):r[g]=v}return r},Q5e=function(e,t,n,r){for(var i=r?t:Ete(t,n),o=e.length-1;o>=0;--o){var s,l=e[o];if(l==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var c=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,d=parseInt(c,10);!n.parseArrays&&c===""?s={0:i}:!isNaN(d)&&l!==c&&String(d)===c&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(s=[],s[d]=i):c!=="__proto__"&&(s[c]=i)}i=s}return i},J5e=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,c=r.depth>0&&s.exec(o),d=c?o.slice(0,c.index):o,f=[];if(d){if(!r.plainObjects&&y3.call(Object.prototype,d)&&!r.allowPrototypes)return;f.push(d)}for(var h=0;r.depth>0&&(c=l.exec(o))!==null&&h"u"?hi.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?hi.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:hi.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:hi.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:hi.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:hi.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:hi.comma,decoder:typeof t.decoder=="function"?t.decoder:hi.decoder,delimiter:typeof t.delimiter=="string"||Fg.isRegExp(t.delimiter)?t.delimiter:hi.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:hi.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:hi.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:hi.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:hi.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:hi.strictNullHandling}},e4e=function(e,t){var n=Z5e(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?K5e(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;s",'"',"`"," ","\r",` -`," "],u4e=["{","}","|","\\","^","`"].concat(c4e),b3=["'"].concat(u4e),H9=["%","/","?",";","#"].concat(b3),W9=["/","?","#"],d4e=255,G9=/^[+a-z0-9A-Z_-]{0,63}$/,f4e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h4e={javascript:!0,"javascript:":!0},x3={javascript:!0,"javascript:":!0},ig={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w3=i4e;function Bk(e,t,n){if(e&&typeof e=="object"&&e instanceof ll)return e;var r=new ll;return r.parse(e,t,n),r}ll.prototype.parse=function(e,t,n){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r127?A+="x":A+=E[R];if(!A.match(G9)){var O=b.slice(0,g),L=b.slice(g+1),N=E.match(f4e);N&&(O.push(N[1]),L.unshift(N[2])),L.length&&(l="/"+L.join(".")+l),this.hostname=O.join(".");break}}}this.hostname.length>d4e?this.hostname="":this.hostname=this.hostname.toLowerCase(),_||(this.hostname=o4e.toASCII(this.hostname));var H=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+H,this.href+=this.host,_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!h4e[f])for(var g=0,x=b3.length;g0?n.host.split("@"):!1;A&&(n.auth=A.shift(),n.hostname=A.shift(),n.host=n.hostname)}return n.search=e.search,n.query=e.query,(n.pathname!==null||n.search!==null)&&(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!b.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var R=b.slice(-1)[0],k=(n.host||e.host||b.length>1)&&(R==="."||R==="..")||R==="",O=0,L=b.length;L>=0;L--)R=b[L],R==="."?b.splice(L,1):R===".."?(b.splice(L,1),O++):O&&(b.splice(L,1),O--);if(!S&&!_)for(;O--;O)b.unshift("..");S&&b[0]!==""&&(!b[0]||b[0].charAt(0)!=="/")&&b.unshift(""),k&&b.join("/").substr(-1)!=="/"&&b.push("");var N=b[0]===""||b[0]&&b[0].charAt(0)==="/";if(E){n.hostname=N?"":b.length?b.shift():"",n.host=n.hostname;var A=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;A&&(n.auth=A.shift(),n.hostname=A.shift(),n.host=n.hostname)}return S=S||n.host&&b.length,S&&!N&&b.unshift(""),b.length>0?n.pathname=b.join("/"):(n.pathname=null,n.path=null),(n.pathname!==null||n.search!==null)&&(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n};ll.prototype.parseHost=function(){var e=this.host,t=a4e.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var g4e=Bk,v4e=m4e,y4e=p4e;const b4e={parse:g4e,format:y4e,resolve:v4e};function $a(e){if(typeof e!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function xb(e){return e.split("?")[0].split("#")[0]}function x4e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function w4e(e,t,n){return e.replace(new RegExp(x4e(t),"g"),n)}function _4e(e,t){let n="",r=0,i=-1,o=0,s=-1;for(let l=0;l<=e.length;++l){if(l2){const c=n.lastIndexOf("/");if(c!==n.length-1){c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=l,o=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+=`/${e.slice(i+1,l)}`:n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else s===46&&o!==-1?++o:o=-1}return n}const to={toPosix(e){return w4e(e,"\\","/")},isUrl(e){return/^https?:/.test(this.toPosix(e))},isDataUrl(e){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(e)},hasProtocol(e){return/^[^/:]+:\//.test(this.toPosix(e))},getProtocol(e){$a(e),e=this.toPosix(e);let t="";const n=/^file:\/\/\//.exec(e),r=/^[^/:]+:\/\//.exec(e),i=/^[^/:]+:\//.exec(e);if(n||r||i){const o=(n==null?void 0:n[0])||(r==null?void 0:r[0])||(i==null?void 0:i[0]);t=o,e=e.slice(o.length)}return t},toAbsolute(e,t,n){if(this.isDataUrl(e))return e;const r=xb(this.toPosix(t??tt.ADAPTER.getBaseUrl())),i=xb(this.toPosix(n??this.rootname(r)));return $a(e),e=this.toPosix(e),e.startsWith("/")?to.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(e=this.toPosix(e),$a(e),e.length===0)return".";let t="";const n=e.startsWith("/");this.hasProtocol(e)&&(t=this.rootname(e),e=e.slice(t.length));const r=e.endsWith("/");return e=_4e(e,!1),e.length>0&&r&&(e+="/"),n?`/${e}`:t+e},isAbsolute(e){return $a(e),e=this.toPosix(e),this.hasProtocol(e)?!0:e.startsWith("/")},join(...e){if(e.length===0)return".";let t;for(let n=0;n0)if(t===void 0)t=r;else{const i=e[n-1]??"";this.extname(i)?t+=`/../${r}`:t+=`/${r}`}}return t===void 0?".":this.normalize(t)},dirname(e){if($a(e),e.length===0)return".";e=this.toPosix(e);let t=e.charCodeAt(0);const n=t===47;let r=-1,i=!0;const o=this.getProtocol(e),s=e;e=e.slice(o.length);for(let l=e.length-1;l>=1;--l)if(t=e.charCodeAt(l),t===47){if(!i){r=l;break}}else i=!1;return r===-1?n?"/":this.isUrl(s)?o+e:o:n&&r===1?"//":o+e.slice(0,r)},rootname(e){$a(e),e=this.toPosix(e);let t="";if(e.startsWith("/")?t="/":t=this.getProtocol(e),this.isUrl(e)){const n=e.indexOf("/",t.length);n!==-1?t=e.slice(0,n):t=e,t.endsWith("/")||(t+="/")}return t},basename(e,t){$a(e),t&&$a(t),e=xb(this.toPosix(e));let n=0,r=-1,i=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";let s=t.length-1,l=-1;for(o=e.length-1;o>=0;--o){const c=e.charCodeAt(o);if(c===47){if(!i){n=o+1;break}}else l===-1&&(i=!1,l=o+1),s>=0&&(c===t.charCodeAt(s)?--s===-1&&(r=o):(s=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!i){n=o+1;break}}else r===-1&&(i=!1,r=o+1);return r===-1?"":e.slice(n,r)},extname(e){$a(e),e=xb(this.toPosix(e));let t=-1,n=0,r=-1,i=!0,o=0;for(let s=e.length-1;s>=0;--s){const l=e.charCodeAt(s);if(l===47){if(!i){n=s+1;break}continue}r===-1&&(i=!1,r=s+1),l===46?t===-1?t=s:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||r===-1||o===0||o===1&&t===r-1&&t===n+1?"":e.slice(t,r)},parse(e){$a(e);const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;e=xb(this.toPosix(e));let n=e.charCodeAt(0);const r=this.isAbsolute(e);let i;t.root=this.rootname(e),r||this.hasProtocol(e)?i=1:i=0;let o=-1,s=0,l=-1,c=!0,d=e.length-1,f=0;for(;d>=i;--d){if(n=e.charCodeAt(d),n===47){if(!c){s=d+1;break}continue}l===-1&&(c=!1,l=d+1),n===46?o===-1?o=d:f!==1&&(f=1):o!==-1&&(f=-1)}return o===-1||l===-1||f===0||f===1&&o===l-1&&o===s+1?l!==-1&&(s===0&&r?t.base=t.name=e.slice(1,l):t.base=t.name=e.slice(s,l)):(s===0&&r?(t.name=e.slice(1,o),t.base=e.slice(1,l)):(t.name=e.slice(s,o),t.base=e.slice(s,l)),t.ext=e.slice(o,l)),t.dir=this.dirname(e),t},sep:"/",delimiter:":"},V9={};function cn(e,t,n=3){if(V9[t])return;let r=new Error().stack;typeof r>"u"?console.warn("PixiJS Deprecation Warning: ",`${t} +`+t.prev}function A_(e,t){var n=g3(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Uh(r)){for(var i=[],o=0;o=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===R5e.RFC1738&&(d===40||d===41)){l+=s.charAt(c);continue}if(d<128){l=l+Sl[d];continue}if(d<2048){l=l+(Sl[192|d>>6]+Sl[128|d&63]);continue}if(d<55296||d>=57344){l=l+(Sl[224|d>>12]+Sl[128|d>>6&63]+Sl[128|d&63]);continue}c+=1,d=65536+((d&1023)<<10|s.charCodeAt(c)&1023),l+=Sl[240|d>>18]+Sl[128|d>>12&63]+Sl[128|d>>6&63]+Sl[128|d&63]}return l},L5e=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(x=0)}if(typeof c=="function"?_=c(n,_):_ instanceof Date?_=h(_):r==="comma"&&au(_)&&(_=FS.maybeMap(_,function(j){return j instanceof Date?h(j):j})),_===null){if(o)return l&&!v?l(n,Ki.encoder,y,"key",p):n;_=""}if(H5e(_)||FS.isBuffer(_)){if(l){var R=v?n:l(n,Ki.encoder,y,"key",p);return[g(R)+"="+g(l(_,Ki.encoder,y,"value",p))]}return[g(n)+"="+g(String(_))]}var k=[];if(typeof _>"u")return k;var O;if(r==="comma"&&au(_))v&&l&&(_=FS.maybeMap(_,l)),O=[{value:_.length>0?_.join(",")||null:void 0}];else if(au(c))O=c;else{var L=Object.keys(_);O=d?L.sort(d):L}for(var N=i&&au(_)&&_.length===1?n+"[]":n,H=0;H"u"?Ki.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ki.charsetSentinel,delimiter:typeof t.delimiter>"u"?Ki.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ki.encode,encoder:typeof t.encoder=="function"?t.encoder:Ki.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ki.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ki.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ki.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ki.strictNullHandling}},V5e=function(e,t){var n=e,r=G5e(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):au(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var l;t&&t.arrayFormat in j9?l=t.arrayFormat:t&&"indices"in t?l=t.indices?"indices":"repeat":l="indices";var c=j9[l];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=c==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=_te(),h=0;h0?v+g:""},Fg=wte,y3=Object.prototype.hasOwnProperty,q5e=Array.isArray,hi={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Fg.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},X5e=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Ete=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Y5e="utf8=%26%2310003%3B",K5e="utf8=%E2%9C%93",Q5e=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),l=-1,c,d=n.charset;if(n.charsetSentinel)for(c=0;c-1&&(v=q5e(v)?[v]:v),y3.call(r,g)?r[g]=Fg.combine(r[g],v):r[g]=v}return r},J5e=function(e,t,n,r){for(var i=r?t:Ete(t,n),o=e.length-1;o>=0;--o){var s,l=e[o];if(l==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var c=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,d=parseInt(c,10);!n.parseArrays&&c===""?s={0:i}:!isNaN(d)&&l!==c&&String(d)===c&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(s=[],s[d]=i):c!=="__proto__"&&(s[c]=i)}i=s}return i},Z5e=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,c=r.depth>0&&s.exec(o),d=c?o.slice(0,c.index):o,f=[];if(d){if(!r.plainObjects&&y3.call(Object.prototype,d)&&!r.allowPrototypes)return;f.push(d)}for(var h=0;r.depth>0&&(c=l.exec(o))!==null&&h"u"?hi.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?hi.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:hi.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:hi.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:hi.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:hi.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:hi.comma,decoder:typeof t.decoder=="function"?t.decoder:hi.decoder,delimiter:typeof t.delimiter=="string"||Fg.isRegExp(t.delimiter)?t.delimiter:hi.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:hi.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:hi.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:hi.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:hi.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:hi.strictNullHandling}},t4e=function(e,t){var n=e4e(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Q5e(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;s",'"',"`"," ","\r",` +`," "],d4e=["{","}","|","\\","^","`"].concat(u4e),b3=["'"].concat(d4e),H9=["%","/","?",";","#"].concat(b3),W9=["/","?","#"],f4e=255,G9=/^[+a-z0-9A-Z_-]{0,63}$/,h4e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p4e={javascript:!0,"javascript:":!0},x3={javascript:!0,"javascript:":!0},ig={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w3=o4e;function Bk(e,t,n){if(e&&typeof e=="object"&&e instanceof ll)return e;var r=new ll;return r.parse(e,t,n),r}ll.prototype.parse=function(e,t,n){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r127?A+="x":A+=E[R];if(!A.match(G9)){var O=b.slice(0,g),L=b.slice(g+1),N=E.match(h4e);N&&(O.push(N[1]),L.unshift(N[2])),L.length&&(l="/"+L.join(".")+l),this.hostname=O.join(".");break}}}this.hostname.length>f4e?this.hostname="":this.hostname=this.hostname.toLowerCase(),_||(this.hostname=s4e.toASCII(this.hostname));var H=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+H,this.href+=this.host,_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!p4e[f])for(var g=0,x=b3.length;g0?n.host.split("@"):!1;A&&(n.auth=A.shift(),n.hostname=A.shift(),n.host=n.hostname)}return n.search=e.search,n.query=e.query,(n.pathname!==null||n.search!==null)&&(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!b.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var R=b.slice(-1)[0],k=(n.host||e.host||b.length>1)&&(R==="."||R==="..")||R==="",O=0,L=b.length;L>=0;L--)R=b[L],R==="."?b.splice(L,1):R===".."?(b.splice(L,1),O++):O&&(b.splice(L,1),O--);if(!S&&!_)for(;O--;O)b.unshift("..");S&&b[0]!==""&&(!b[0]||b[0].charAt(0)!=="/")&&b.unshift(""),k&&b.join("/").substr(-1)!=="/"&&b.push("");var N=b[0]===""||b[0]&&b[0].charAt(0)==="/";if(E){n.hostname=N?"":b.length?b.shift():"",n.host=n.hostname;var A=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;A&&(n.auth=A.shift(),n.hostname=A.shift(),n.host=n.hostname)}return S=S||n.host&&b.length,S&&!N&&b.unshift(""),b.length>0?n.pathname=b.join("/"):(n.pathname=null,n.path=null),(n.pathname!==null||n.search!==null)&&(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n};ll.prototype.parseHost=function(){var e=this.host,t=l4e.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var v4e=Bk,y4e=g4e,b4e=m4e;const x4e={parse:v4e,format:b4e,resolve:y4e};function $a(e){if(typeof e!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function xb(e){return e.split("?")[0].split("#")[0]}function w4e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _4e(e,t,n){return e.replace(new RegExp(w4e(t),"g"),n)}function S4e(e,t){let n="",r=0,i=-1,o=0,s=-1;for(let l=0;l<=e.length;++l){if(l2){const c=n.lastIndexOf("/");if(c!==n.length-1){c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=l,o=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+=`/${e.slice(i+1,l)}`:n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else s===46&&o!==-1?++o:o=-1}return n}const no={toPosix(e){return _4e(e,"\\","/")},isUrl(e){return/^https?:/.test(this.toPosix(e))},isDataUrl(e){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(e)},hasProtocol(e){return/^[^/:]+:\//.test(this.toPosix(e))},getProtocol(e){$a(e),e=this.toPosix(e);let t="";const n=/^file:\/\/\//.exec(e),r=/^[^/:]+:\/\//.exec(e),i=/^[^/:]+:\//.exec(e);if(n||r||i){const o=(n==null?void 0:n[0])||(r==null?void 0:r[0])||(i==null?void 0:i[0]);t=o,e=e.slice(o.length)}return t},toAbsolute(e,t,n){if(this.isDataUrl(e))return e;const r=xb(this.toPosix(t??tt.ADAPTER.getBaseUrl())),i=xb(this.toPosix(n??this.rootname(r)));return $a(e),e=this.toPosix(e),e.startsWith("/")?no.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(e=this.toPosix(e),$a(e),e.length===0)return".";let t="";const n=e.startsWith("/");this.hasProtocol(e)&&(t=this.rootname(e),e=e.slice(t.length));const r=e.endsWith("/");return e=S4e(e,!1),e.length>0&&r&&(e+="/"),n?`/${e}`:t+e},isAbsolute(e){return $a(e),e=this.toPosix(e),this.hasProtocol(e)?!0:e.startsWith("/")},join(...e){if(e.length===0)return".";let t;for(let n=0;n0)if(t===void 0)t=r;else{const i=e[n-1]??"";this.extname(i)?t+=`/../${r}`:t+=`/${r}`}}return t===void 0?".":this.normalize(t)},dirname(e){if($a(e),e.length===0)return".";e=this.toPosix(e);let t=e.charCodeAt(0);const n=t===47;let r=-1,i=!0;const o=this.getProtocol(e),s=e;e=e.slice(o.length);for(let l=e.length-1;l>=1;--l)if(t=e.charCodeAt(l),t===47){if(!i){r=l;break}}else i=!1;return r===-1?n?"/":this.isUrl(s)?o+e:o:n&&r===1?"//":o+e.slice(0,r)},rootname(e){$a(e),e=this.toPosix(e);let t="";if(e.startsWith("/")?t="/":t=this.getProtocol(e),this.isUrl(e)){const n=e.indexOf("/",t.length);n!==-1?t=e.slice(0,n):t=e,t.endsWith("/")||(t+="/")}return t},basename(e,t){$a(e),t&&$a(t),e=xb(this.toPosix(e));let n=0,r=-1,i=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";let s=t.length-1,l=-1;for(o=e.length-1;o>=0;--o){const c=e.charCodeAt(o);if(c===47){if(!i){n=o+1;break}}else l===-1&&(i=!1,l=o+1),s>=0&&(c===t.charCodeAt(s)?--s===-1&&(r=o):(s=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!i){n=o+1;break}}else r===-1&&(i=!1,r=o+1);return r===-1?"":e.slice(n,r)},extname(e){$a(e),e=xb(this.toPosix(e));let t=-1,n=0,r=-1,i=!0,o=0;for(let s=e.length-1;s>=0;--s){const l=e.charCodeAt(s);if(l===47){if(!i){n=s+1;break}continue}r===-1&&(i=!1,r=s+1),l===46?t===-1?t=s:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||r===-1||o===0||o===1&&t===r-1&&t===n+1?"":e.slice(t,r)},parse(e){$a(e);const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;e=xb(this.toPosix(e));let n=e.charCodeAt(0);const r=this.isAbsolute(e);let i;t.root=this.rootname(e),r||this.hasProtocol(e)?i=1:i=0;let o=-1,s=0,l=-1,c=!0,d=e.length-1,f=0;for(;d>=i;--d){if(n=e.charCodeAt(d),n===47){if(!c){s=d+1;break}continue}l===-1&&(c=!1,l=d+1),n===46?o===-1?o=d:f!==1&&(f=1):o!==-1&&(f=-1)}return o===-1||l===-1||f===0||f===1&&o===l-1&&o===s+1?l!==-1&&(s===0&&r?t.base=t.name=e.slice(1,l):t.base=t.name=e.slice(s,l)):(s===0&&r?(t.name=e.slice(1,o),t.base=e.slice(1,l)):(t.name=e.slice(s,o),t.base=e.slice(s,l)),t.ext=e.slice(o,l)),t.dir=this.dirname(e),t},sep:"/",delimiter:":"},V9={};function cn(e,t,n=3){if(V9[t])return;let r=new Error().stack;typeof r>"u"?console.warn("PixiJS Deprecation Warning: ",`${t} Deprecated since v${e}`):(r=r.split(` `).splice(n).join(` `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t} Deprecated since v${e}`),console.warn(r),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t} -Deprecated since v${e}`),console.warn(r))),V9[t]=!0}let KN;function S4e(){return typeof KN>"u"&&(KN=function(){var n;const t={stencil:!0,failIfMajorPerformanceCaveat:tt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!tt.ADAPTER.getWebGLRenderingContext())return!1;const r=tt.ADAPTER.createCanvas();let i=r.getContext("webgl",t)||r.getContext("experimental-webgl",t);const o=!!((n=i==null?void 0:i.getContextAttributes())!=null&&n.stencil);if(i){const s=i.getExtension("WEBGL_lose_context");s&&s.loseContext()}return i=null,o}catch{return!1}}()),KN}var E4e={grad:.9,turn:360,rad:360/(2*Math.PI)},tu=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},vi=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},sa=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},Cte=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},q9=function(e){return{r:sa(e.r,0,255),g:sa(e.g,0,255),b:sa(e.b,0,255),a:sa(e.a)}},QN=function(e){return{r:vi(e.r),g:vi(e.g),b:vi(e.b),a:vi(e.a,3)}},C4e=/^#([0-9a-f]{3,8})$/i,P_=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Tte=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),l=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:o?s/o*100:0,v:o/255*100,a:i}},kte=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),l=r*(1-(t-o)*n),c=r*(1-(1-t+o)*n),d=o%6;return{r:255*[r,l,s,s,c,r][d],g:255*[c,r,r,l,s,s][d],b:255*[s,s,c,r,r,l][d],a:i}},X9=function(e){return{h:Cte(e.h),s:sa(e.s,0,100),l:sa(e.l,0,100),a:sa(e.a)}},Y9=function(e){return{h:vi(e.h),s:vi(e.s),l:vi(e.l),a:vi(e.a,3)}},K9=function(e){return kte((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},Cx=function(e){return{h:(t=Tte(e)).h,s:(i=(200-(n=t.s))*(r=t.v)/100)>0&&i<200?n*r/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,r,i},T4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,k4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,A4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,R4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_3={string:[[function(e){var t=C4e.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?vi(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?vi(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=A4e.exec(e)||R4e.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:q9({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=T4e.exec(e)||k4e.exec(e);if(!t)return null;var n,r,i=X9({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(E4e[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return K9(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i===void 0?1:i;return tu(t)&&tu(n)&&tu(r)?q9({r:Number(t),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,i=e.a,o=i===void 0?1:i;if(!tu(t)||!tu(n)||!tu(r))return null;var s=X9({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return K9(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=i===void 0?1:i;if(!tu(t)||!tu(n)||!tu(r))return null;var s=function(l){return{h:Cte(l.h),s:sa(l.s,0,100),v:sa(l.v,0,100),a:sa(l.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return kte(s)},"hsv"]]},Q9=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=QN(this.rgba),n=t.r,r=t.g,i=t.b,s=(o=t.a)<1?P_(vi(255*o)):"","#"+P_(n)+P_(r)+P_(i)+s;var t,n,r,i,o,s},e.prototype.toRgb=function(){return QN(this.rgba)},e.prototype.toRgbString=function(){return t=QN(this.rgba),n=t.r,r=t.g,i=t.b,(o=t.a)<1?"rgba("+n+", "+r+", "+i+", "+o+")":"rgb("+n+", "+r+", "+i+")";var t,n,r,i,o},e.prototype.toHsl=function(){return Y9(Cx(this.rgba))},e.prototype.toHslString=function(){return t=Y9(Cx(this.rgba)),n=t.h,r=t.s,i=t.l,(o=t.a)<1?"hsla("+n+", "+r+"%, "+i+"%, "+o+")":"hsl("+n+", "+r+"%, "+i+"%)";var t,n,r,i,o},e.prototype.toHsv=function(){return t=Tte(this.rgba),{h:vi(t.h),s:vi(t.s),v:vi(t.v),a:vi(t.a,3)};var t},e.prototype.invert=function(){return El({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),El(JN(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),El(JN(this.rgba,-t))},e.prototype.grayscale=function(){return El(JN(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),El(J9(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),El(J9(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?El({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):vi(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=Cx(this.rgba);return typeof t=="number"?El({h:t,s:n.s,l:n.l,a:n.a}):vi(n.h)},e.prototype.isEqual=function(t){return this.toHex()===El(t).toHex()},e}(),El=function(e){return e instanceof S3?e:new S3(e)},Z9=[],P4e=function(e){e.forEach(function(t){Z9.indexOf(t)<0&&(t(S3,_3),Z9.push(t))})};function O4e(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var i in n)r[n[i]]=i;var o={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,c,d=r[this.toHex()];if(d)return d;if(s!=null&&s.closest){var f=this.toRgb(),h=1/0,p="black";if(!o.length)for(var g in n)o[g]=new e(n[g]).toRgb();for(var v in n){var y=(l=f,c=o[v],Math.pow(l.r-c.r,2)+Math.pow(l.g-c.g,2)+Math.pow(l.b-c.b,2));yi===t[o]);if(e!==null&&t!==null){const i=Object.keys(e),o=Object.keys(t);return i.length!==o.length?!1:i.every(s=>e[s]===t[s])}return e===t}toRgba(){const[e,t,n,r]=this._components;return{r:e,g:t,b:n,a:r}}toRgb(){const[e,t,n]=this._components;return{r:e,g:t,b:n}}toRgbaString(){const[e,t,n]=this.toUint8RgbArray();return`rgba(${e},${t},${n},${this.alpha})`}toUint8RgbArray(e){const[t,n,r]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(n*255),e[2]=Math.round(r*255),e}toRgbArray(e){e=e??[];const[t,n,r]=this._components;return e[0]=t,e[1]=n,e[2]=r,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,n,r,i]=og.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=n,this._components[2]*=r,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let n=this._int>>16&255,r=this._int>>8&255,i=this._int&255;return t&&(n=n*e+.5|0,r=r*e+.5|0,i=i*e+.5|0),(e*255<<24)+(n<<16)+(r<<8)+i}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,n,r]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(n*e)/e,this._components[2]=Math.round(r*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,n,r,i]=this._components;return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}normalize(e){let t,n,r,i;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const o=e;t=(o>>16&255)/255,n=(o>>8&255)/255,r=(o&255)/255,i=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,n,r,i=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,n,r,i=255]=e,t/=255,n/=255,r/=255,i/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const s=og.HEX_PATTERN.exec(e);s&&(e=`#${s[2]}`)}const o=El(e);o.isValid()&&({r:t,g:n,b:r,a:i}=o.rgba,t/=255,n/=255,r/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=n,this._components[2]=r,this._components[3]=i,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,n]=this._components;this._int=(e*255<<16)+(t*255<<8)+(n*255|0)}_clamp(e,t=0,n=1){return typeof e=="number"?Math.min(Math.max(e,t),n):(e.forEach((r,i)=>{e[i]=Math.min(Math.max(r,t),n)}),e)}};let zn=og;zn.shared=new og;zn.temp=new og;zn.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function M4e(e){return cn("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),zn.shared.setValue(e).toHex()}function D4e(e){return cn("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),zn.shared.setValue(e).toNumber()}function L4e(){const e=[],t=[];for(let r=0;r<32;r++)e[r]=r,t[r]=r;e[Mt.NORMAL_NPM]=Mt.NORMAL,e[Mt.ADD_NPM]=Mt.ADD,e[Mt.SCREEN_NPM]=Mt.SCREEN,t[Mt.NORMAL]=Mt.NORMAL_NPM,t[Mt.ADD]=Mt.ADD_NPM,t[Mt.SCREEN]=Mt.SCREEN_NPM;const n=[];return n.push(t),n.push(e),n}const Ate=L4e();function Rte(e,t){return Ate[t?1:0][e]}function N4e(e,t=null){const n=e*6;if(t=t||new Uint16Array(n),t.length!==n)throw new Error(`Out buffer length is incorrect, got ${t.length} and expected ${n}`);for(let r=0,i=0;r>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function e7(e){return!(e&e-1)&&!!e}function t7(e){let t=(e>65535?1:0)<<4;e>>>=t;let n=(e>255?1:0)<<3;return e>>>=n,t|=n,n=(e>15?1:0)<<2,e>>>=n,t|=n,n=(e>3?1:0)<<1,e>>>=n,t|=n,t|e>>1}function sg(e,t,n){const r=e.length;let i;if(t>=r||n===0)return;n=t+n>r?r-t:n;const o=r-n;for(i=t;i(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(rt||{});const C3=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},o7=(e,t)=>C3(e).priority??t,bt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(C3).forEach(t=>{t.type.forEach(n=>{var r,i;return(i=(r=this._removeHandlers)[n])==null?void 0:i.call(r,t)})}),this},add(...e){return e.map(C3).forEach(t=>{t.type.forEach(n=>{const r=this._addHandlers,i=this._queue;r[n]?r[n](t):(i[n]=i[n]||[],i[n].push(t))})}),this},handle(e,t,n){const r=this._addHandlers,i=this._removeHandlers;if(r[e]||i[e])throw new Error(`Extension type ${e} already has a handler`);r[e]=t,i[e]=n;const o=this._queue;return o[e]&&(o[e].forEach(s=>t(s)),delete o[e]),this},handleByMap(e,t){return this.handle(e,n=>{t[n.name]=n.ref},n=>{delete t[n.name]})},handleByList(e,t,n=-1){return this.handle(e,r=>{t.includes(r.ref)||(t.push(r.ref),t.sort((i,o)=>o7(o,n)-o7(i,n)))},r=>{const i=t.indexOf(r.ref);i!==-1&&t.splice(i,1)})}};class T3{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}const U4e=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` -`);function H4e(e){let t="";for(let n=0;n0&&(t+=` -else `),n=0;--r){const i=k3[r];if(i.test&&i.test(e,n))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class cl{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,n,r,i,o,s,l,c){if(arguments.length>8)throw new Error("max arguments reached");const{name:d,items:f}=this;this._aliasCount++;for(let h=0,p=f.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const n=this.items.indexOf(t);return n!==-1&&(this.ensureNonAliasedItems(),this.items.splice(n,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(cl.prototype,{dispatch:{value:cl.prototype.emit},run:{value:cl.prototype.emit}});class C1{constructor(t=0,n=0){this._width=t,this._height=n,this.destroyed=!1,this.internal=!1,this.onResize=new cl("setRealSize"),this.onUpdate=new cl("update"),this.onError=new cl("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,n){(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,this.onResize.emit(t,n))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,n,r){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,n){return!1}}class mw extends C1{constructor(t,n){const{width:r,height:i}=n||{};if(!r||!i)throw new Error("BufferResource width or height invalid");super(r,i),this.data=t}upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===yl.UNPACK);const o=n.realWidth,s=n.realHeight;return r.width===o&&r.height===s?i.texSubImage2D(n.target,0,0,0,o,s,n.format,r.type,this.data):(r.width=o,r.height=s,i.texImage2D(n.target,0,r.internalFormat,o,s,0,n.format,r.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const G4e={scaleMode:hu.NEAREST,format:Ge.RGBA,alphaMode:yl.NPM},fm=class extends hw{constructor(e=null,t=null){super(),t=Object.assign({},fm.defaultOptions,t);const{alphaMode:n,mipmap:r,anisotropicLevel:i,scaleMode:o,width:s,height:l,wrapMode:c,format:d,type:f,target:h,resolution:p,resourceOptions:g}=t;e&&!(e instanceof C1)&&(e=Ote(e,g),e.internal=!0),this.resolution=p||tt.RESOLUTION,this.width=Math.round((s||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=r,this.anisotropicLevel=i,this._wrapMode=c,this._scaleMode=o,this.format=d,this.type=f,this.target=h,this.alphaMode=n,this.uid=Ep(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=s>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this}setSize(e,t,n){return n=n||this.resolution,this.setRealSize(e*n,t*n,n)}setRealSize(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=e7(this.realWidth)&&e7(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Hu[this.cacheId],delete Cl[this.cacheId],this.cacheId=null),this.dispose(),fm.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,n=tt.STRICT_TEXTURE_CACHE){const r=typeof e=="string";let i=null;if(r)i=e;else{if(!e._pixiId){const s=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${s}_${Ep()}`}i=e._pixiId}let o=Hu[i];if(r&&n&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new fm(e,t),o.cacheId=i,fm.addToCache(o,i)),o}static fromBuffer(e,t,n,r){e=e||new Float32Array(t*n*4);const i=new mw(e,{width:t,height:n}),o=e instanceof Float32Array?It.FLOAT:It.UNSIGNED_BYTE;return new fm(i,Object.assign({},G4e,{type:o},r))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Hu[t]&&Hu[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Hu[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Hu[e];if(t){const n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete Hu[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t1){for(let h=0;h(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))(zi||{});class Ot{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new Ot(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,n=t){return this.x=t,this.y=n,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const M_=[new Ot,new Ot,new Ot,new Ot];class Kt{constructor(t=0,n=0,r=0,i=0){this.x=Number(t),this.y=Number(n),this.width=Number(r),this.height=Number(i),this.type=zi.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new Kt(0,0,0,0)}clone(){return new Kt(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,n){return this.width<=0||this.height<=0?!1:t>=this.x&&t=this.y&&nt.right?t.right:this.right)<=O)return!1;const N=this.yt.bottom?t.bottom:this.bottom)>N}const r=this.left,i=this.right,o=this.top,s=this.bottom;if(i<=r||s<=o)return!1;const l=M_[0].set(t.left,t.top),c=M_[1].set(t.left,t.bottom),d=M_[2].set(t.right,t.top),f=M_[3].set(t.right,t.bottom);if(d.x<=l.x||c.y<=l.y)return!1;const h=Math.sign(n.a*n.d-n.b*n.c);if(h===0||(n.apply(l,l),n.apply(c,c),n.apply(d,d),n.apply(f,f),Math.max(l.x,c.x,d.x,f.x)<=r||Math.min(l.x,c.x,d.x,f.x)>=i||Math.max(l.y,c.y,d.y,f.y)<=o||Math.min(l.y,c.y,d.y,f.y)>=s))return!1;const p=h*(c.y-l.y),g=h*(l.x-c.x),v=p*r+g*o,y=p*i+g*o,S=p*r+g*s,_=p*i+g*s;if(Math.max(v,y,S,_)<=p*l.x+g*l.y||Math.min(v,y,S,_)>=p*f.x+g*f.y)return!1;const b=h*(l.y-d.y),x=h*(d.x-l.x),E=b*r+x*o,A=b*i+x*o,R=b*r+x*s,k=b*i+x*s;return!(Math.max(E,A,R,k)<=b*l.x+x*l.y||Math.min(E,A,R,k)>=b*f.x+x*f.y)}pad(t=0,n=t){return this.x-=t,this.y-=n,this.width+=t*2,this.height+=n*2,this}fit(t){const n=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(r-n,0),this.y=i,this.height=Math.max(o-i,0),this}ceil(t=1,n=.001){const r=Math.ceil((this.x+this.width-n)*t)/t,i=Math.ceil((this.y+this.height-n)*t)/t;return this.x=Math.floor((this.x+n)*t)/t,this.y=Math.floor((this.y+n)*t)/t,this.width=r-this.x,this.height=i-this.y,this}enlarge(t){const n=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=r-n,this.y=i,this.height=o-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class xj{constructor(t=0,n=0,r=0){this.x=t,this.y=n,this.radius=r,this.type=zi.CIRC}clone(){return new xj(this.x,this.y,this.radius)}contains(t,n){if(this.radius<=0)return!1;const r=this.radius*this.radius;let i=this.x-t,o=this.y-n;return i*=i,o*=o,i+o<=r}getBounds(){return new Kt(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class wj{constructor(t=0,n=0,r=0,i=0){this.x=t,this.y=n,this.width=r,this.height=i,this.type=zi.ELIP}clone(){return new wj(this.x,this.y,this.width,this.height)}contains(t,n){if(this.width<=0||this.height<=0)return!1;let r=(t-this.x)/this.width,i=(n-this.y)/this.height;return r*=r,i*=i,r+i<=1}getBounds(){return new Kt(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class ag{constructor(...t){let n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){const r=[];for(let i=0,o=n.length;in!=f>n&&t<(d-l)*((n-c)/(f-c))+l&&(r=!r)}return r}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,n)=>`${t}, ${n}`,"")}]`}}class _j{constructor(t=0,n=0,r=0,i=0,o=20){this.x=t,this.y=n,this.width=r,this.height=i,this.radius=o,this.type=zi.RREC}clone(){return new _j(this.x,this.y,this.width,this.height,this.radius)}contains(t,n){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const r=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+r&&n<=this.y+this.height-r||t>=this.x+r&&t<=this.x+this.width-r)return!0;let i=t-(this.x+r),o=n-(this.y+r);const s=r*r;if(i*i+o*o<=s||(i=t-(this.x+this.width-r),i*i+o*o<=s)||(o=n-(this.y+this.height-r),i*i+o*o<=s)||(i=t-(this.x+r),i*i+o*o<=s))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}class pr{constructor(t=1,n=0,r=0,i=1,o=0,s=0){this.array=null,this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,n,r,i,o,s){return this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const r=n||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r}apply(t,n){n=n||new Ot;const r=t.x,i=t.y;return n.x=this.a*r+this.c*i+this.tx,n.y=this.b*r+this.d*i+this.ty,n}applyInverse(t,n){n=n||new Ot;const r=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return n.x=this.d*r*i+-this.c*r*o+(this.ty*this.c-this.tx*this.d)*r,n.y=this.a*r*o+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,n}translate(t,n){return this.tx+=t,this.ty+=n,this}scale(t,n){return this.a*=t,this.d*=n,this.c*=t,this.b*=n,this.tx*=t,this.ty*=n,this}rotate(t){const n=Math.cos(t),r=Math.sin(t),i=this.a,o=this.c,s=this.tx;return this.a=i*n-this.b*r,this.b=i*r+this.b*n,this.c=o*n-this.d*r,this.d=o*r+this.d*n,this.tx=s*n-this.ty*r,this.ty=s*r+this.ty*n,this}append(t){const n=this.a,r=this.b,i=this.c,o=this.d;return this.a=t.a*n+t.b*i,this.b=t.a*r+t.b*o,this.c=t.c*n+t.d*i,this.d=t.c*r+t.d*o,this.tx=t.tx*n+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*o+this.ty,this}setTransform(t,n,r,i,o,s,l,c,d){return this.a=Math.cos(l+d)*o,this.b=Math.sin(l+d)*o,this.c=-Math.sin(l-c)*s,this.d=Math.cos(l-c)*s,this.tx=t-(r*this.a+i*this.c),this.ty=n-(r*this.b+i*this.d),this}prepend(t){const n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=n*t.a+this.ty*t.c+t.tx,this.ty=n*t.b+this.ty*t.d+t.ty,this}decompose(t){const n=this.a,r=this.b,i=this.c,o=this.d,s=t.pivot,l=-Math.atan2(-i,o),c=Math.atan2(r,n),d=Math.abs(l+c);return d<1e-5||Math.abs(yC-d)<1e-5?(t.rotation=c,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=l,t.skew.y=c),t.scale.x=Math.sqrt(n*n+r*r),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(s.x*n+s.y*i),t.position.y=this.ty+(s.x*r+s.y*o),t}invert(){const t=this.a,n=this.b,r=this.c,i=this.d,o=this.tx,s=t*i-n*r;return this.a=i/s,this.b=-n/s,this.c=-r/s,this.d=t/s,this.tx=(r*this.ty-i*o)/s,this.ty=-(t*this.ty-n*o)/s,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new pr;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new pr}static get TEMP_MATRIX(){return new pr}}const Nh=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Bh=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],$h=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Fh=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],R3=[],Lte=[],D_=Math.sign;function Z4e(){for(let e=0;e<16;e++){const t=[];R3.push(t);for(let n=0;n<16;n++){const r=D_(Nh[e]*Nh[n]+$h[e]*Bh[n]),i=D_(Bh[e]*Nh[n]+Fh[e]*Bh[n]),o=D_(Nh[e]*$h[n]+$h[e]*Fh[n]),s=D_(Bh[e]*$h[n]+Fh[e]*Fh[n]);for(let l=0;l<16;l++)if(Nh[l]===r&&Bh[l]===i&&$h[l]===o&&Fh[l]===s){t.push(l);break}}}for(let e=0;e<16;e++){const t=new pr;t.set(Nh[e],Bh[e],$h[e],Fh[e],0,0),Lte.push(t)}}Z4e();const _r={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e=>Nh[e],uY:e=>Bh[e],vX:e=>$h[e],vY:e=>Fh[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>R3[e][t],sub:(e,t)=>R3[e][_r.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?_r.S:_r.N:Math.abs(t)*2<=Math.abs(e)?e>0?_r.E:_r.W:t>0?e>0?_r.SE:_r.SW:e>0?_r.NE:_r.NW,matrixAppendRotationInv:(e,t,n=0,r=0)=>{const i=Lte[_r.inv(t)];i.tx=n,i.ty=r,e.append(i)}};class md{constructor(t,n,r=0,i=0){this._x=r,this._y=i,this.cb=t,this.scope=n}clone(t=this.cb,n=this.scope){return new md(t,n,this._x,this._y)}set(t=0,n=t){return(this._x!==t||this._y!==n)&&(this._x=t,this._y=n,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const Nte=class{constructor(){this.worldTransform=new pr,this.localTransform=new pr,this.position=new md(this.onChange,this,0,0),this.scale=new md(this.onChange,this,1,1),this.pivot=new md(this.onChange,this,0,0),this.skew=new md(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(e){const t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){const n=e.worldTransform,r=this.worldTransform;r.a=t.a*n.a+t.b*n.c,r.b=t.a*n.b+t.b*n.d,r.c=t.c*n.a+t.d*n.c,r.d=t.c*n.b+t.d*n.d,r.tx=t.tx*n.a+t.ty*n.c+n.tx,r.ty=t.tx*n.b+t.ty*n.d+n.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let Sj=Nte;Sj.IDENTITY=new Nte;var eze=`varying vec2 vTextureCoord; +Deprecated since v${e}`),console.warn(r))),V9[t]=!0}let KN;function E4e(){return typeof KN>"u"&&(KN=function(){var n;const t={stencil:!0,failIfMajorPerformanceCaveat:tt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!tt.ADAPTER.getWebGLRenderingContext())return!1;const r=tt.ADAPTER.createCanvas();let i=r.getContext("webgl",t)||r.getContext("experimental-webgl",t);const o=!!((n=i==null?void 0:i.getContextAttributes())!=null&&n.stencil);if(i){const s=i.getExtension("WEBGL_lose_context");s&&s.loseContext()}return i=null,o}catch{return!1}}()),KN}var C4e={grad:.9,turn:360,rad:360/(2*Math.PI)},tu=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},vi=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},sa=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},Cte=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},q9=function(e){return{r:sa(e.r,0,255),g:sa(e.g,0,255),b:sa(e.b,0,255),a:sa(e.a)}},QN=function(e){return{r:vi(e.r),g:vi(e.g),b:vi(e.b),a:vi(e.a,3)}},T4e=/^#([0-9a-f]{3,8})$/i,P_=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Tte=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),l=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:o?s/o*100:0,v:o/255*100,a:i}},kte=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),l=r*(1-(t-o)*n),c=r*(1-(1-t+o)*n),d=o%6;return{r:255*[r,l,s,s,c,r][d],g:255*[c,r,r,l,s,s][d],b:255*[s,s,c,r,r,l][d],a:i}},X9=function(e){return{h:Cte(e.h),s:sa(e.s,0,100),l:sa(e.l,0,100),a:sa(e.a)}},Y9=function(e){return{h:vi(e.h),s:vi(e.s),l:vi(e.l),a:vi(e.a,3)}},K9=function(e){return kte((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},Cx=function(e){return{h:(t=Tte(e)).h,s:(i=(200-(n=t.s))*(r=t.v)/100)>0&&i<200?n*r/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,r,i},k4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,A4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,R4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,I4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_3={string:[[function(e){var t=T4e.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?vi(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?vi(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=R4e.exec(e)||I4e.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:q9({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=k4e.exec(e)||A4e.exec(e);if(!t)return null;var n,r,i=X9({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(C4e[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return K9(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i===void 0?1:i;return tu(t)&&tu(n)&&tu(r)?q9({r:Number(t),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,i=e.a,o=i===void 0?1:i;if(!tu(t)||!tu(n)||!tu(r))return null;var s=X9({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return K9(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=i===void 0?1:i;if(!tu(t)||!tu(n)||!tu(r))return null;var s=function(l){return{h:Cte(l.h),s:sa(l.s,0,100),v:sa(l.v,0,100),a:sa(l.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return kte(s)},"hsv"]]},Q9=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=QN(this.rgba),n=t.r,r=t.g,i=t.b,s=(o=t.a)<1?P_(vi(255*o)):"","#"+P_(n)+P_(r)+P_(i)+s;var t,n,r,i,o,s},e.prototype.toRgb=function(){return QN(this.rgba)},e.prototype.toRgbString=function(){return t=QN(this.rgba),n=t.r,r=t.g,i=t.b,(o=t.a)<1?"rgba("+n+", "+r+", "+i+", "+o+")":"rgb("+n+", "+r+", "+i+")";var t,n,r,i,o},e.prototype.toHsl=function(){return Y9(Cx(this.rgba))},e.prototype.toHslString=function(){return t=Y9(Cx(this.rgba)),n=t.h,r=t.s,i=t.l,(o=t.a)<1?"hsla("+n+", "+r+"%, "+i+"%, "+o+")":"hsl("+n+", "+r+"%, "+i+"%)";var t,n,r,i,o},e.prototype.toHsv=function(){return t=Tte(this.rgba),{h:vi(t.h),s:vi(t.s),v:vi(t.v),a:vi(t.a,3)};var t},e.prototype.invert=function(){return El({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),El(JN(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),El(JN(this.rgba,-t))},e.prototype.grayscale=function(){return El(JN(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),El(J9(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),El(J9(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?El({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):vi(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=Cx(this.rgba);return typeof t=="number"?El({h:t,s:n.s,l:n.l,a:n.a}):vi(n.h)},e.prototype.isEqual=function(t){return this.toHex()===El(t).toHex()},e}(),El=function(e){return e instanceof S3?e:new S3(e)},Z9=[],O4e=function(e){e.forEach(function(t){Z9.indexOf(t)<0&&(t(S3,_3),Z9.push(t))})};function M4e(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var i in n)r[n[i]]=i;var o={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,c,d=r[this.toHex()];if(d)return d;if(s!=null&&s.closest){var f=this.toRgb(),h=1/0,p="black";if(!o.length)for(var g in n)o[g]=new e(n[g]).toRgb();for(var v in n){var y=(l=f,c=o[v],Math.pow(l.r-c.r,2)+Math.pow(l.g-c.g,2)+Math.pow(l.b-c.b,2));yi===t[o]);if(e!==null&&t!==null){const i=Object.keys(e),o=Object.keys(t);return i.length!==o.length?!1:i.every(s=>e[s]===t[s])}return e===t}toRgba(){const[e,t,n,r]=this._components;return{r:e,g:t,b:n,a:r}}toRgb(){const[e,t,n]=this._components;return{r:e,g:t,b:n}}toRgbaString(){const[e,t,n]=this.toUint8RgbArray();return`rgba(${e},${t},${n},${this.alpha})`}toUint8RgbArray(e){const[t,n,r]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(n*255),e[2]=Math.round(r*255),e}toRgbArray(e){e=e??[];const[t,n,r]=this._components;return e[0]=t,e[1]=n,e[2]=r,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,n,r,i]=og.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=n,this._components[2]*=r,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let n=this._int>>16&255,r=this._int>>8&255,i=this._int&255;return t&&(n=n*e+.5|0,r=r*e+.5|0,i=i*e+.5|0),(e*255<<24)+(n<<16)+(r<<8)+i}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,n,r]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(n*e)/e,this._components[2]=Math.round(r*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,n,r,i]=this._components;return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}normalize(e){let t,n,r,i;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const o=e;t=(o>>16&255)/255,n=(o>>8&255)/255,r=(o&255)/255,i=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,n,r,i=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,n,r,i=255]=e,t/=255,n/=255,r/=255,i/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const s=og.HEX_PATTERN.exec(e);s&&(e=`#${s[2]}`)}const o=El(e);o.isValid()&&({r:t,g:n,b:r,a:i}=o.rgba,t/=255,n/=255,r/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=n,this._components[2]=r,this._components[3]=i,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,n]=this._components;this._int=(e*255<<16)+(t*255<<8)+(n*255|0)}_clamp(e,t=0,n=1){return typeof e=="number"?Math.min(Math.max(e,t),n):(e.forEach((r,i)=>{e[i]=Math.min(Math.max(r,t),n)}),e)}};let zn=og;zn.shared=new og;zn.temp=new og;zn.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function D4e(e){return cn("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),zn.shared.setValue(e).toHex()}function L4e(e){return cn("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),zn.shared.setValue(e).toNumber()}function N4e(){const e=[],t=[];for(let r=0;r<32;r++)e[r]=r,t[r]=r;e[Mt.NORMAL_NPM]=Mt.NORMAL,e[Mt.ADD_NPM]=Mt.ADD,e[Mt.SCREEN_NPM]=Mt.SCREEN,t[Mt.NORMAL]=Mt.NORMAL_NPM,t[Mt.ADD]=Mt.ADD_NPM,t[Mt.SCREEN]=Mt.SCREEN_NPM;const n=[];return n.push(t),n.push(e),n}const Ate=N4e();function Rte(e,t){return Ate[t?1:0][e]}function B4e(e,t=null){const n=e*6;if(t=t||new Uint16Array(n),t.length!==n)throw new Error(`Out buffer length is incorrect, got ${t.length} and expected ${n}`);for(let r=0,i=0;r>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function e7(e){return!(e&e-1)&&!!e}function t7(e){let t=(e>65535?1:0)<<4;e>>>=t;let n=(e>255?1:0)<<3;return e>>>=n,t|=n,n=(e>15?1:0)<<2,e>>>=n,t|=n,n=(e>3?1:0)<<1,e>>>=n,t|=n,t|e>>1}function sg(e,t,n){const r=e.length;let i;if(t>=r||n===0)return;n=t+n>r?r-t:n;const o=r-n;for(i=t;i(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(rt||{});const C3=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},o7=(e,t)=>C3(e).priority??t,bt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(C3).forEach(t=>{t.type.forEach(n=>{var r,i;return(i=(r=this._removeHandlers)[n])==null?void 0:i.call(r,t)})}),this},add(...e){return e.map(C3).forEach(t=>{t.type.forEach(n=>{const r=this._addHandlers,i=this._queue;r[n]?r[n](t):(i[n]=i[n]||[],i[n].push(t))})}),this},handle(e,t,n){const r=this._addHandlers,i=this._removeHandlers;if(r[e]||i[e])throw new Error(`Extension type ${e} already has a handler`);r[e]=t,i[e]=n;const o=this._queue;return o[e]&&(o[e].forEach(s=>t(s)),delete o[e]),this},handleByMap(e,t){return this.handle(e,n=>{t[n.name]=n.ref},n=>{delete t[n.name]})},handleByList(e,t,n=-1){return this.handle(e,r=>{t.includes(r.ref)||(t.push(r.ref),t.sort((i,o)=>o7(o,n)-o7(i,n)))},r=>{const i=t.indexOf(r.ref);i!==-1&&t.splice(i,1)})}};class T3{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}const H4e=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` +`);function W4e(e){let t="";for(let n=0;n0&&(t+=` +else `),n=0;--r){const i=k3[r];if(i.test&&i.test(e,n))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class cl{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,n,r,i,o,s,l,c){if(arguments.length>8)throw new Error("max arguments reached");const{name:d,items:f}=this;this._aliasCount++;for(let h=0,p=f.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const n=this.items.indexOf(t);return n!==-1&&(this.ensureNonAliasedItems(),this.items.splice(n,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(cl.prototype,{dispatch:{value:cl.prototype.emit},run:{value:cl.prototype.emit}});class C1{constructor(t=0,n=0){this._width=t,this._height=n,this.destroyed=!1,this.internal=!1,this.onResize=new cl("setRealSize"),this.onUpdate=new cl("update"),this.onError=new cl("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,n){(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,this.onResize.emit(t,n))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,n,r){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,n){return!1}}class mw extends C1{constructor(t,n){const{width:r,height:i}=n||{};if(!r||!i)throw new Error("BufferResource width or height invalid");super(r,i),this.data=t}upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===yl.UNPACK);const o=n.realWidth,s=n.realHeight;return r.width===o&&r.height===s?i.texSubImage2D(n.target,0,0,0,o,s,n.format,r.type,this.data):(r.width=o,r.height=s,i.texImage2D(n.target,0,r.internalFormat,o,s,0,n.format,r.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const V4e={scaleMode:hu.NEAREST,format:Ge.RGBA,alphaMode:yl.NPM},fm=class extends hw{constructor(e=null,t=null){super(),t=Object.assign({},fm.defaultOptions,t);const{alphaMode:n,mipmap:r,anisotropicLevel:i,scaleMode:o,width:s,height:l,wrapMode:c,format:d,type:f,target:h,resolution:p,resourceOptions:g}=t;e&&!(e instanceof C1)&&(e=Ote(e,g),e.internal=!0),this.resolution=p||tt.RESOLUTION,this.width=Math.round((s||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=r,this.anisotropicLevel=i,this._wrapMode=c,this._scaleMode=o,this.format=d,this.type=f,this.target=h,this.alphaMode=n,this.uid=Ep(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=s>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this}setSize(e,t,n){return n=n||this.resolution,this.setRealSize(e*n,t*n,n)}setRealSize(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=e7(this.realWidth)&&e7(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Hu[this.cacheId],delete Cl[this.cacheId],this.cacheId=null),this.dispose(),fm.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,n=tt.STRICT_TEXTURE_CACHE){const r=typeof e=="string";let i=null;if(r)i=e;else{if(!e._pixiId){const s=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${s}_${Ep()}`}i=e._pixiId}let o=Hu[i];if(r&&n&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new fm(e,t),o.cacheId=i,fm.addToCache(o,i)),o}static fromBuffer(e,t,n,r){e=e||new Float32Array(t*n*4);const i=new mw(e,{width:t,height:n}),o=e instanceof Float32Array?It.FLOAT:It.UNSIGNED_BYTE;return new fm(i,Object.assign({},V4e,{type:o},r))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Hu[t]&&Hu[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Hu[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Hu[e];if(t){const n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete Hu[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t1){for(let h=0;h(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))(zi||{});class Ot{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new Ot(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,n=t){return this.x=t,this.y=n,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const M_=[new Ot,new Ot,new Ot,new Ot];class Kt{constructor(t=0,n=0,r=0,i=0){this.x=Number(t),this.y=Number(n),this.width=Number(r),this.height=Number(i),this.type=zi.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new Kt(0,0,0,0)}clone(){return new Kt(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,n){return this.width<=0||this.height<=0?!1:t>=this.x&&t=this.y&&nt.right?t.right:this.right)<=O)return!1;const N=this.yt.bottom?t.bottom:this.bottom)>N}const r=this.left,i=this.right,o=this.top,s=this.bottom;if(i<=r||s<=o)return!1;const l=M_[0].set(t.left,t.top),c=M_[1].set(t.left,t.bottom),d=M_[2].set(t.right,t.top),f=M_[3].set(t.right,t.bottom);if(d.x<=l.x||c.y<=l.y)return!1;const h=Math.sign(n.a*n.d-n.b*n.c);if(h===0||(n.apply(l,l),n.apply(c,c),n.apply(d,d),n.apply(f,f),Math.max(l.x,c.x,d.x,f.x)<=r||Math.min(l.x,c.x,d.x,f.x)>=i||Math.max(l.y,c.y,d.y,f.y)<=o||Math.min(l.y,c.y,d.y,f.y)>=s))return!1;const p=h*(c.y-l.y),g=h*(l.x-c.x),v=p*r+g*o,y=p*i+g*o,S=p*r+g*s,_=p*i+g*s;if(Math.max(v,y,S,_)<=p*l.x+g*l.y||Math.min(v,y,S,_)>=p*f.x+g*f.y)return!1;const b=h*(l.y-d.y),x=h*(d.x-l.x),E=b*r+x*o,A=b*i+x*o,R=b*r+x*s,k=b*i+x*s;return!(Math.max(E,A,R,k)<=b*l.x+x*l.y||Math.min(E,A,R,k)>=b*f.x+x*f.y)}pad(t=0,n=t){return this.x-=t,this.y-=n,this.width+=t*2,this.height+=n*2,this}fit(t){const n=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(r-n,0),this.y=i,this.height=Math.max(o-i,0),this}ceil(t=1,n=.001){const r=Math.ceil((this.x+this.width-n)*t)/t,i=Math.ceil((this.y+this.height-n)*t)/t;return this.x=Math.floor((this.x+n)*t)/t,this.y=Math.floor((this.y+n)*t)/t,this.width=r-this.x,this.height=i-this.y,this}enlarge(t){const n=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=r-n,this.y=i,this.height=o-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class xj{constructor(t=0,n=0,r=0){this.x=t,this.y=n,this.radius=r,this.type=zi.CIRC}clone(){return new xj(this.x,this.y,this.radius)}contains(t,n){if(this.radius<=0)return!1;const r=this.radius*this.radius;let i=this.x-t,o=this.y-n;return i*=i,o*=o,i+o<=r}getBounds(){return new Kt(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class wj{constructor(t=0,n=0,r=0,i=0){this.x=t,this.y=n,this.width=r,this.height=i,this.type=zi.ELIP}clone(){return new wj(this.x,this.y,this.width,this.height)}contains(t,n){if(this.width<=0||this.height<=0)return!1;let r=(t-this.x)/this.width,i=(n-this.y)/this.height;return r*=r,i*=i,r+i<=1}getBounds(){return new Kt(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class ag{constructor(...t){let n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){const r=[];for(let i=0,o=n.length;in!=f>n&&t<(d-l)*((n-c)/(f-c))+l&&(r=!r)}return r}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,n)=>`${t}, ${n}`,"")}]`}}class _j{constructor(t=0,n=0,r=0,i=0,o=20){this.x=t,this.y=n,this.width=r,this.height=i,this.radius=o,this.type=zi.RREC}clone(){return new _j(this.x,this.y,this.width,this.height,this.radius)}contains(t,n){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const r=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+r&&n<=this.y+this.height-r||t>=this.x+r&&t<=this.x+this.width-r)return!0;let i=t-(this.x+r),o=n-(this.y+r);const s=r*r;if(i*i+o*o<=s||(i=t-(this.x+this.width-r),i*i+o*o<=s)||(o=n-(this.y+this.height-r),i*i+o*o<=s)||(i=t-(this.x+r),i*i+o*o<=s))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}class pr{constructor(t=1,n=0,r=0,i=1,o=0,s=0){this.array=null,this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,n,r,i,o,s){return this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const r=n||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r}apply(t,n){n=n||new Ot;const r=t.x,i=t.y;return n.x=this.a*r+this.c*i+this.tx,n.y=this.b*r+this.d*i+this.ty,n}applyInverse(t,n){n=n||new Ot;const r=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return n.x=this.d*r*i+-this.c*r*o+(this.ty*this.c-this.tx*this.d)*r,n.y=this.a*r*o+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,n}translate(t,n){return this.tx+=t,this.ty+=n,this}scale(t,n){return this.a*=t,this.d*=n,this.c*=t,this.b*=n,this.tx*=t,this.ty*=n,this}rotate(t){const n=Math.cos(t),r=Math.sin(t),i=this.a,o=this.c,s=this.tx;return this.a=i*n-this.b*r,this.b=i*r+this.b*n,this.c=o*n-this.d*r,this.d=o*r+this.d*n,this.tx=s*n-this.ty*r,this.ty=s*r+this.ty*n,this}append(t){const n=this.a,r=this.b,i=this.c,o=this.d;return this.a=t.a*n+t.b*i,this.b=t.a*r+t.b*o,this.c=t.c*n+t.d*i,this.d=t.c*r+t.d*o,this.tx=t.tx*n+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*o+this.ty,this}setTransform(t,n,r,i,o,s,l,c,d){return this.a=Math.cos(l+d)*o,this.b=Math.sin(l+d)*o,this.c=-Math.sin(l-c)*s,this.d=Math.cos(l-c)*s,this.tx=t-(r*this.a+i*this.c),this.ty=n-(r*this.b+i*this.d),this}prepend(t){const n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=n*t.a+this.ty*t.c+t.tx,this.ty=n*t.b+this.ty*t.d+t.ty,this}decompose(t){const n=this.a,r=this.b,i=this.c,o=this.d,s=t.pivot,l=-Math.atan2(-i,o),c=Math.atan2(r,n),d=Math.abs(l+c);return d<1e-5||Math.abs(yC-d)<1e-5?(t.rotation=c,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=l,t.skew.y=c),t.scale.x=Math.sqrt(n*n+r*r),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(s.x*n+s.y*i),t.position.y=this.ty+(s.x*r+s.y*o),t}invert(){const t=this.a,n=this.b,r=this.c,i=this.d,o=this.tx,s=t*i-n*r;return this.a=i/s,this.b=-n/s,this.c=-r/s,this.d=t/s,this.tx=(r*this.ty-i*o)/s,this.ty=-(t*this.ty-n*o)/s,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new pr;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new pr}static get TEMP_MATRIX(){return new pr}}const Nh=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Bh=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],$h=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Fh=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],R3=[],Lte=[],D_=Math.sign;function eze(){for(let e=0;e<16;e++){const t=[];R3.push(t);for(let n=0;n<16;n++){const r=D_(Nh[e]*Nh[n]+$h[e]*Bh[n]),i=D_(Bh[e]*Nh[n]+Fh[e]*Bh[n]),o=D_(Nh[e]*$h[n]+$h[e]*Fh[n]),s=D_(Bh[e]*$h[n]+Fh[e]*Fh[n]);for(let l=0;l<16;l++)if(Nh[l]===r&&Bh[l]===i&&$h[l]===o&&Fh[l]===s){t.push(l);break}}}for(let e=0;e<16;e++){const t=new pr;t.set(Nh[e],Bh[e],$h[e],Fh[e],0,0),Lte.push(t)}}eze();const _r={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e=>Nh[e],uY:e=>Bh[e],vX:e=>$h[e],vY:e=>Fh[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>R3[e][t],sub:(e,t)=>R3[e][_r.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?_r.S:_r.N:Math.abs(t)*2<=Math.abs(e)?e>0?_r.E:_r.W:t>0?e>0?_r.SE:_r.SW:e>0?_r.NE:_r.NW,matrixAppendRotationInv:(e,t,n=0,r=0)=>{const i=Lte[_r.inv(t)];i.tx=n,i.ty=r,e.append(i)}};class md{constructor(t,n,r=0,i=0){this._x=r,this._y=i,this.cb=t,this.scope=n}clone(t=this.cb,n=this.scope){return new md(t,n,this._x,this._y)}set(t=0,n=t){return(this._x!==t||this._y!==n)&&(this._x=t,this._y=n,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const Nte=class{constructor(){this.worldTransform=new pr,this.localTransform=new pr,this.position=new md(this.onChange,this,0,0),this.scale=new md(this.onChange,this,1,1),this.pivot=new md(this.onChange,this,0,0),this.skew=new md(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(e){const t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){const n=e.worldTransform,r=this.worldTransform;r.a=t.a*n.a+t.b*n.c,r.b=t.a*n.b+t.b*n.d,r.c=t.c*n.a+t.d*n.c,r.d=t.c*n.b+t.d*n.d,r.tx=t.tx*n.a+t.ty*n.c+n.tx,r.ty=t.tx*n.b+t.ty*n.d+n.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let Sj=Nte;Sj.IDENTITY=new Nte;var tze=`varying vec2 vTextureCoord; uniform sampler2D uSampler; void main(void){ gl_FragColor *= texture2D(uSampler, vTextureCoord); -}`,tze=`attribute vec2 aVertexPosition; +}`,nze=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -755,7 +755,7 @@ void main(void){ cv[3] = v[3]; gl.uniform4f(ud["${e}"].location, v[0], v[1], v[2], v[3]) - }`}],nze={float:` + }`}],rze={float:` if (cv !== v) { cu.value = v; @@ -891,7 +891,7 @@ void main(void){ cu.value = v; gl.uniform1i(location, v); - }`},rze={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function ize(e,t){var r;const n=[` + }`},ize={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function oze(e,t){var r;const n=[` var v = null; var cv = null; var cu = null; @@ -901,18 +901,18 @@ void main(void){ renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}'); `):n.push(` renderer.shader.syncUniformGroup(uv.${i}, syncData); - `));continue}const s=e.uniforms[i];let l=!1;for(let c=0;c=Fp.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),Zp=t}return Zp}let L_;function sze(){if(!L_){L_=oa.MEDIUM;const e=oze();e&&e.getShaderPrecisionFormat&&(L_=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?oa.HIGH:oa.MEDIUM)}return L_}function l7(e,t){const n=e.getShaderSource(t).split(` +`))}const $te={};let Zp=$te;function sze(){if(Zp===$te||Zp!=null&&Zp.isContextLost()){const e=tt.ADAPTER.createCanvas();let t;tt.PREFER_ENV>=Fp.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),Zp=t}return Zp}let L_;function aze(){if(!L_){L_=oa.MEDIUM;const e=sze();e&&e.getShaderPrecisionFormat&&(L_=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?oa.HIGH:oa.MEDIUM)}return L_}function l7(e,t){const n=e.getShaderSource(t).split(` `).map((d,f)=>`${f}: ${d}`),r=e.getShaderInfoLog(t),i=r.split(` `),o={},s=i.map(d=>parseFloat(d.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(d=>d&&!o[d]?(o[d]=!0,!0):!1),l=[""];s.forEach(d=>{n[d-1]=`%c${n[d-1]}%c`,l.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const c=n.join(` -`);l[0]=c,console.error(r),console.groupCollapsed("click to view full shader code"),console.warn(...l),console.groupEnd()}function aze(e,t,n,r){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(n,e.COMPILE_STATUS)||l7(e,n),e.getShaderParameter(r,e.COMPILE_STATUS)||l7(e,r),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const lze={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Fte(e){return lze[e]}let N_=null;const c7={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function zte(e,t){if(!N_){const n=Object.keys(c7);N_={};for(let r=0;r0&&(n+=` else `),rthis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,n=ja._textureArrayPool,r=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let s=++Vt._globalBatch,l=0,c=n[0],d=0;r.copyBoundTextures(i,t);for(let f=0;f=t&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,d,f),d=f,c=n[++l],++s),h._batchEnabled=s,h.touched=o,c.elements[c.count++]=h)}c.count>0&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,d,this._bufferSize),++l,++s);for(let f=0;f0);for(let v=0;vthis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,n=ja._textureArrayPool,r=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let s=++Gt._globalBatch,l=0,c=n[0],d=0;r.copyBoundTextures(i,t);for(let f=0;f=t&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,d,f),d=f,c=n[++l],++s),h._batchEnabled=s,h.touched=o,c.elements[c.count++]=h)}c.count>0&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,d,this._bufferSize),++l,++s);for(let f=0;f0);for(let v=0;v=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)}boundArray(t,n,r,i){const{elements:o,ids:s,count:l}=t;let c=0;for(let d=0;d=0&&h=Fp.WEBGL2&&(r=t.getContext("webgl2",n)),r)this.webGLVersion=2;else if(this.webGLVersion=1,r=t.getContext("webgl",n)||t.getContext("experimental-webgl",n),!r)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=r,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,n={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,n,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,n,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const n=t.getContextAttributes(),r="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;r&&(this.webGLVersion=2),n&&!n.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=r||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}zk.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"};zk.extension={type:rt.RendererSystem,name:"context"};bt.add(zk);class bze extends mw{upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===yl.UNPACK);const o=n.realWidth,s=n.realHeight;return r.width===o&&r.height===s?i.texSubImage2D(n.target,0,0,0,o,s,n.format,r.type,this.data):(r.width=o,r.height=s,i.texImage2D(n.target,0,r.internalFormat,o,s,0,n.format,r.type,this.data)),!0}}class P3{constructor(t,n){this.width=Math.round(t||100),this.height=Math.round(n||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new cl("disposeFramebuffer"),this.multisample=Gr.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,n){return this.colorTextures[t]=n||new Vt(null,{scaleMode:hu.NEAREST,resolution:1,mipmap:Ql.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Vt(new bze(null,{width:this.width,height:this.height}),{scaleMode:hu.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Ql.OFF,format:Ge.DEPTH_COMPONENT,type:It.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(t,n){if(t=Math.round(t),n=Math.round(n),!(t===this.width&&n===this.height)){this.width=t,this.height=n,this.dirtyId++,this.dirtySize++;for(let r=0;r{const i=this.source;this.url=i.src;const o=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.resize(i.width,i.height),this._load=null,this.createBitmap?n(this.process()):n(this))};i.complete&&i.src?o():(i.onload=o,i.onerror=s=>{r(s),this.onError.emit(s)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const n=globalThis.createImageBitmap,r=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:r?"cors":"no-cors"}).then(i=>i.blob()).then(i=>n(i,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===yl.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,n,r){if(typeof this.alphaMode=="number"&&(n.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,n,r);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,n,r,this.bitmap),!this.preserveBitmap){let i=!0;const o=n._glTextures;for(const s in o){const l=o[s];if(l!==r&&l.dirtyId!==n.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class Wte{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,n,r){const i=n.width,o=n.height;if(r){const s=t.width/2/i,l=t.height/2/o,c=t.x/i+s,d=t.y/o+l;r=_r.add(r,_r.NW),this.x0=c+s*_r.uX(r),this.y0=d+l*_r.uY(r),r=_r.add(r,2),this.x1=c+s*_r.uX(r),this.y1=d+l*_r.uY(r),r=_r.add(r,2),this.x2=c+s*_r.uX(r),this.y2=d+l*_r.uY(r),r=_r.add(r,2),this.x3=c+s*_r.uX(r),this.y3=d+l*_r.uY(r)}else this.x0=t.x/i,this.y0=t.y/o,this.x1=(t.x+t.width)/i,this.y1=t.y/o,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/o,this.x3=t.x/i,this.y3=(t.y+t.height)/o;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const f7=new Wte;function $_(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class ht extends hw{constructor(t,n,r,i,o,s,l){if(super(),this.noFrame=!1,n||(this.noFrame=!0,n=new Kt(0,0,1,1)),t instanceof ht&&(t=t.baseTexture),this.baseTexture=t,this._frame=n,this.trim=i,this.valid=!1,this._uvs=f7,this.uvMatrix=null,this.orig=r||n,this._rotate=Number(o||0),o===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=s?new Ot(s.x,s.y):new Ot(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=n:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:n}=this.baseTexture;n!=null&&n.url&&Cl[n.url]&&ht.removeFromCache(n.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,ht.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),n=this._frame===this.orig?t:this.orig.clone(),r=new ht(this.baseTexture,!this.noFrame&&t,n,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(r._frame=t),r}updateUvs(){this._uvs===f7&&(this._uvs=new Wte),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,n={},r=tt.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof Vt){if(!t.cacheId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t.cacheId=`${l}-${Ep()}`,Vt.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t._pixiId=`${l}_${Ep()}`}o=t._pixiId}let s=Cl[o];if(i&&r&&!s)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!s&&!(t instanceof Vt)?(n.resolution||(n.resolution=zd(t)),s=new ht(new Vt(t,n)),s.baseTexture.cacheId=o,Vt.addToCache(s.baseTexture,o),ht.addToCache(s,o)):!s&&t instanceof Vt&&(s=new ht(t),ht.addToCache(s,o)),s}static fromURL(t,n){const r=Object.assign({autoLoad:!1},n==null?void 0:n.resourceOptions),i=ht.from(t,Object.assign({resourceOptions:r},n),!1),o=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):o.load().then(()=>Promise.resolve(i))}static fromBuffer(t,n,r,i){return new ht(Vt.fromBuffer(t,n,r,i))}static fromLoader(t,n,r,i){const o=new Vt(t,Object.assign({scaleMode:Vt.defaultOptions.scaleMode,resolution:zd(n)},i)),{resource:s}=o;s instanceof Hte&&(s.url=n);const l=new ht(o);return r||(r=n),Vt.addToCache(l.baseTexture,r),ht.addToCache(l,r),r!==n&&(Vt.addToCache(l.baseTexture,n),ht.addToCache(l,n)),l.baseTexture.valid?Promise.resolve(l):new Promise(c=>{l.baseTexture.once("loaded",()=>c(l))})}static addToCache(t,n){n&&(t.textureCacheIds.includes(n)||t.textureCacheIds.push(n),Cl[n]&&Cl[n]!==t&&console.warn(`Texture added to the cache with an id [${n}] that already had an entry`),Cl[n]=t)}static removeFromCache(t){if(typeof t=="string"){const n=Cl[t];if(n){const r=n.textureCacheIds.indexOf(t);return r>-1&&n.textureCacheIds.splice(r,1),delete Cl[t],n}}else if(t!=null&&t.textureCacheIds){for(let n=0;nthis.baseTexture.width,l=r+o>this.baseTexture.height;if(s||l){const c=s&&l?"and":"or",d=`X: ${n} + ${i} = ${n+i} > ${this.baseTexture.width}`,f=`Y: ${r} + ${o} = ${r+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${d} ${c} ${f}`)}this.valid=i&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return ht._EMPTY||(ht._EMPTY=new ht(new Vt),$_(ht._EMPTY),$_(ht._EMPTY.baseTexture)),ht._EMPTY}static get WHITE(){if(!ht._WHITE){const t=tt.ADAPTER.createCanvas(16,16),n=t.getContext("2d");t.width=16,t.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),ht._WHITE=new ht(Vt.from(t)),$_(ht._WHITE),$_(ht._WHITE.baseTexture)}return ht._WHITE}}class zp extends ht{constructor(t,n){super(t,n),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(t){this.framebuffer.multisample=t}resize(t,n,r=!0){const i=this.baseTexture.resolution,o=Math.round(t*i)/i,s=Math.round(n*i)/i;this.valid=o>0&&s>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=s,r&&this.baseTexture.resize(o,s),this.updateUvs()}setResolution(t){const{baseTexture:n}=this;n.resolution!==t&&(n.setResolution(t),this.resize(n.width,n.height,!1))}static create(t){return new zp(new Ute(t))}}class Gte{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,n,r=Gr.NONE){const i=new Ute(Object.assign({width:t,height:n,resolution:1,multisample:r},this.textureOptions));return new zp(i)}getOptimalTexture(t,n,r=1,i=Gr.NONE){let o;t=Math.ceil(t*r-1e-6),n=Math.ceil(n*r-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||n!==this._pixelsHeight?(t=gC(t),n=gC(n),o=((t&65535)<<16|n&65535)>>>0,i>1&&(o+=i*4294967296)):o=i>1?-i:-1,this.texturePool[o]||(this.texturePool[o]=[]);let s=this.texturePool[o].pop();return s||(s=this.createTexture(t,n,i)),s.filterPoolKey=o,s.setResolution(r),s}getFilterTexture(t,n,r){const i=this.getOptimalTexture(t.width,t.height,n||t.resolution,r||Gr.NONE);return i.filterFrame=t.filterFrame,i}returnTexture(t){const n=t.filterPoolKey;t.filterFrame=null,this.texturePool[n].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const n in this.texturePool){const r=this.texturePool[n];if(r)for(let i=0;i0&&t.height>0;for(const n in this.texturePool){if(!(Number(n)<0))continue;const r=this.texturePool[n];if(r)for(let i=0;i1&&(f=this.getOptimalFilterTexture(d.width,d.height,n.resolution),f.filterFrame=d.filterFrame),r[h].apply(this,d,f,Il.CLEAR,n);const p=d;d=f,f=p}r[h].apply(this,d,c.renderTexture,Il.BLEND,n),h>1&&n.multisample>1&&this.returnFilterTexture(n.renderTexture),this.returnFilterTexture(d),this.returnFilterTexture(f)}n.clear(),this.statePool.push(n)}bindAndClear(t,n=Il.CLEAR){const{renderTexture:r,state:i}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const s=this.tempRect;s.x=0,s.y=0,s.width=t.filterFrame.width,s.height=t.filterFrame.height,r.bind(t,t.filterFrame,s)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?r.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const o=i.stateId&1||this.forceClear;(n===Il.CLEAR||n===Il.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,n,r,i){const o=this.renderer;o.state.set(t.state),this.bindAndClear(r,i),t.uniforms.uSampler=n,t.uniforms.filterGlobals=this.globalUniforms,o.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(n._frame,n.filterFrame),o.geometry.bind(this.quadUv),o.geometry.draw(Ll.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(Ll.TRIANGLE_STRIP))}calculateSpriteMatrix(t,n){const{sourceFrame:r,destinationFrame:i}=this.activeState,{orig:o}=n._texture,s=t.set(i.width,0,0,i.height,r.x,r.y),l=n.worldTransform.copyTo(pr.TEMP_MATRIX);return l.invert(),s.prepend(l),s.scale(1/o.width,1/o.height),s.translate(n.anchor.x,n.anchor.y),s}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,n,r=1,i=Gr.NONE){return this.texturePool.getOptimalTexture(t,n,r,i)}getFilterTexture(t,n,r){if(typeof t=="number"){const o=t;t=n,n=o}t=t||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(t.width,t.height,n||t.resolution,r||Gr.NONE);return i.filterFrame=t.filterFrame,i}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,n){const r=F_[0],i=F_[1],o=F_[2],s=F_[3];r.set(n.left,n.top),i.set(n.left,n.bottom),o.set(n.right,n.top),s.set(n.right,n.bottom),t.apply(r,r),t.apply(i,i),t.apply(o,o),t.apply(s,s);const l=Math.min(r.x,i.x,o.x,s.x),c=Math.min(r.y,i.y,o.y,s.y),d=Math.max(r.x,i.x,o.x,s.x),f=Math.max(r.y,i.y,o.y,s.y);n.x=l,n.y=c,n.width=d-l,n.height=f-c}roundFrame(t,n,r,i,o){if(!(t.width<=0||t.height<=0||r.width<=0||r.height<=0)){if(o){const{a:s,b:l,c,d}=o;if((Math.abs(l)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(s)>1e-4||Math.abs(d)>1e-4))return}o=o?aB.copyFrom(o):aB.identity(),o.translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.transformAABB(o,t),t.ceil(n),this.transformAABB(o.invert(),t)}}}qte.extension={type:rt.RendererSystem,name:"filter"};bt.add(qte);class _ze{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Gr.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Sze=new Kt;class Xte{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new P3(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Kt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let n=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;tt.PREFER_ENV===Fp.WEBGL_LEGACY&&(n=null,r=null),n?t.drawBuffers=i=>n.drawBuffersWEBGL(i):(this.hasMRT=!1,t.drawBuffers=()=>{}),r||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,n,r=0){const{gl:i}=this;if(t){const o=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,o.framebuffer)),o.mipLevel!==r&&(t.dirtyId++,t.dirtyFormat++,o.mipLevel=r),o.dirtyId!==t.dirtyId&&(o.dirtyId=t.dirtyId,o.dirtyFormat!==t.dirtyFormat?(o.dirtyFormat=t.dirtyFormat,o.dirtySize=t.dirtySize,this.updateFramebuffer(t,r)):o.dirtySize!==t.dirtySize&&(o.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let s=0;s>r,l=n.height>>r,c=s/n.width;this.setViewport(n.x*c,n.y*c,s,l)}else{const s=t.width>>r,l=t.height>>r;this.setViewport(0,0,s,l)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),n?this.setViewport(n.x,n.y,n.width,n.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,n,r,i){const o=this.viewport;t=Math.round(t),n=Math.round(n),r=Math.round(r),i=Math.round(i),(o.width!==r||o.height!==i||o.x!==t||o.y!==n)&&(o.x=t,o.y=n,o.width=r,o.height=i,this.gl.viewport(t,n,r,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,n,r,i,o=l3.COLOR|l3.DEPTH){const{gl:s}=this;s.clearColor(t,n,r,i),s.clear(o)}initFramebuffer(t){const{gl:n}=this,r=new _ze(n.createFramebuffer());return r.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=r,this.managedFramebuffers.push(t),t.disposeRunner.add(this),r}resizeFramebuffer(t){const{gl:n}=this,r=t.glFramebuffers[this.CONTEXT_UID];r.stencil&&(n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height));const i=t.colorTextures;let o=i.length;n.drawBuffers||(o=Math.min(o,1));for(let s=0;s1&&this.canMultisampleFramebuffer(t)?i.msaaBuffer=i.msaaBuffer||r.createRenderbuffer():i.msaaBuffer&&(r.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const l=[];for(let c=0;c1&&r.drawBuffers(l),t.depthTexture&&this.writeDepthTexture){const d=t.depthTexture;this.renderer.texture.bind(d,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,d._glTextures[this.CONTEXT_UID].texture,n)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),i.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,i.stencil)):i.stencil&&(r.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:n}=this;let r=Gr.NONE;if(t<=1||n===null)return r;for(let i=0;i=0&&this.managedFramebuffers.splice(o,1),t.disposeRunner.remove(this),n||(i.deleteFramebuffer(r.framebuffer),r.msaaBuffer&&i.deleteRenderbuffer(r.msaaBuffer),r.stencil&&i.deleteRenderbuffer(r.stencil)),r.blitFramebuffer&&this.disposeFramebuffer(r.blitFramebuffer,n)}disposeAll(t){const n=this.managedFramebuffers;this.managedFramebuffers=[];for(let r=0;rr.createVertexArrayOES(),t.bindVertexArray=i=>r.bindVertexArrayOES(i),t.deleteVertexArray=i=>r.deleteVertexArrayOES(i)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(n.webGLVersion!==2){const r=t.getExtension("ANGLE_instanced_arrays");r?(t.vertexAttribDivisor=(i,o)=>r.vertexAttribDivisorANGLE(i,o),t.drawElementsInstanced=(i,o,s,l,c)=>r.drawElementsInstancedANGLE(i,o,s,l,c),t.drawArraysInstanced=(i,o,s,l)=>r.drawArraysInstancedANGLE(i,o,s,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=n.webGLVersion===2||!!n.extensions.uint32ElementIndex}bind(t,n){n=n||this.renderer.shader.shader;const{gl:r}=this;let i=t.glVertexArrayObjects[this.CONTEXT_UID],o=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},o=!0);const s=i[n.program.id]||this.initGeometryVao(t,n,o);this._activeGeometry=t,this._activeVao!==s&&(this._activeVao=s,this.hasVao?r.bindVertexArray(s):this.activateVao(t,n.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,n=this.renderer.buffer;for(let r=0;r"u"?.5:n,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,n){n===void 0&&(n=t);const r=this.mapCoord;for(let i=0;i=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)}boundArray(t,n,r,i){const{elements:o,ids:s,count:l}=t;let c=0;for(let d=0;d=0&&h=Fp.WEBGL2&&(r=t.getContext("webgl2",n)),r)this.webGLVersion=2;else if(this.webGLVersion=1,r=t.getContext("webgl",n)||t.getContext("experimental-webgl",n),!r)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=r,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,n={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,n,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,n,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const n=t.getContextAttributes(),r="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;r&&(this.webGLVersion=2),n&&!n.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=r||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}zk.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"};zk.extension={type:rt.RendererSystem,name:"context"};bt.add(zk);class xze extends mw{upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===yl.UNPACK);const o=n.realWidth,s=n.realHeight;return r.width===o&&r.height===s?i.texSubImage2D(n.target,0,0,0,o,s,n.format,r.type,this.data):(r.width=o,r.height=s,i.texImage2D(n.target,0,r.internalFormat,o,s,0,n.format,r.type,this.data)),!0}}class P3{constructor(t,n){this.width=Math.round(t||100),this.height=Math.round(n||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new cl("disposeFramebuffer"),this.multisample=Gr.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,n){return this.colorTextures[t]=n||new Gt(null,{scaleMode:hu.NEAREST,resolution:1,mipmap:Ql.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Gt(new xze(null,{width:this.width,height:this.height}),{scaleMode:hu.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Ql.OFF,format:Ge.DEPTH_COMPONENT,type:It.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(t,n){if(t=Math.round(t),n=Math.round(n),!(t===this.width&&n===this.height)){this.width=t,this.height=n,this.dirtyId++,this.dirtySize++;for(let r=0;r{const i=this.source;this.url=i.src;const o=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.resize(i.width,i.height),this._load=null,this.createBitmap?n(this.process()):n(this))};i.complete&&i.src?o():(i.onload=o,i.onerror=s=>{r(s),this.onError.emit(s)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const n=globalThis.createImageBitmap,r=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:r?"cors":"no-cors"}).then(i=>i.blob()).then(i=>n(i,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===yl.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,n,r){if(typeof this.alphaMode=="number"&&(n.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,n,r);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,n,r,this.bitmap),!this.preserveBitmap){let i=!0;const o=n._glTextures;for(const s in o){const l=o[s];if(l!==r&&l.dirtyId!==n.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class Wte{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,n,r){const i=n.width,o=n.height;if(r){const s=t.width/2/i,l=t.height/2/o,c=t.x/i+s,d=t.y/o+l;r=_r.add(r,_r.NW),this.x0=c+s*_r.uX(r),this.y0=d+l*_r.uY(r),r=_r.add(r,2),this.x1=c+s*_r.uX(r),this.y1=d+l*_r.uY(r),r=_r.add(r,2),this.x2=c+s*_r.uX(r),this.y2=d+l*_r.uY(r),r=_r.add(r,2),this.x3=c+s*_r.uX(r),this.y3=d+l*_r.uY(r)}else this.x0=t.x/i,this.y0=t.y/o,this.x1=(t.x+t.width)/i,this.y1=t.y/o,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/o,this.x3=t.x/i,this.y3=(t.y+t.height)/o;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const f7=new Wte;function $_(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class ht extends hw{constructor(t,n,r,i,o,s,l){if(super(),this.noFrame=!1,n||(this.noFrame=!0,n=new Kt(0,0,1,1)),t instanceof ht&&(t=t.baseTexture),this.baseTexture=t,this._frame=n,this.trim=i,this.valid=!1,this._uvs=f7,this.uvMatrix=null,this.orig=r||n,this._rotate=Number(o||0),o===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=s?new Ot(s.x,s.y):new Ot(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=n:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:n}=this.baseTexture;n!=null&&n.url&&Cl[n.url]&&ht.removeFromCache(n.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,ht.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),n=this._frame===this.orig?t:this.orig.clone(),r=new ht(this.baseTexture,!this.noFrame&&t,n,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(r._frame=t),r}updateUvs(){this._uvs===f7&&(this._uvs=new Wte),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,n={},r=tt.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof Gt){if(!t.cacheId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t.cacheId=`${l}-${Ep()}`,Gt.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t._pixiId=`${l}_${Ep()}`}o=t._pixiId}let s=Cl[o];if(i&&r&&!s)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!s&&!(t instanceof Gt)?(n.resolution||(n.resolution=zd(t)),s=new ht(new Gt(t,n)),s.baseTexture.cacheId=o,Gt.addToCache(s.baseTexture,o),ht.addToCache(s,o)):!s&&t instanceof Gt&&(s=new ht(t),ht.addToCache(s,o)),s}static fromURL(t,n){const r=Object.assign({autoLoad:!1},n==null?void 0:n.resourceOptions),i=ht.from(t,Object.assign({resourceOptions:r},n),!1),o=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):o.load().then(()=>Promise.resolve(i))}static fromBuffer(t,n,r,i){return new ht(Gt.fromBuffer(t,n,r,i))}static fromLoader(t,n,r,i){const o=new Gt(t,Object.assign({scaleMode:Gt.defaultOptions.scaleMode,resolution:zd(n)},i)),{resource:s}=o;s instanceof Hte&&(s.url=n);const l=new ht(o);return r||(r=n),Gt.addToCache(l.baseTexture,r),ht.addToCache(l,r),r!==n&&(Gt.addToCache(l.baseTexture,n),ht.addToCache(l,n)),l.baseTexture.valid?Promise.resolve(l):new Promise(c=>{l.baseTexture.once("loaded",()=>c(l))})}static addToCache(t,n){n&&(t.textureCacheIds.includes(n)||t.textureCacheIds.push(n),Cl[n]&&Cl[n]!==t&&console.warn(`Texture added to the cache with an id [${n}] that already had an entry`),Cl[n]=t)}static removeFromCache(t){if(typeof t=="string"){const n=Cl[t];if(n){const r=n.textureCacheIds.indexOf(t);return r>-1&&n.textureCacheIds.splice(r,1),delete Cl[t],n}}else if(t!=null&&t.textureCacheIds){for(let n=0;nthis.baseTexture.width,l=r+o>this.baseTexture.height;if(s||l){const c=s&&l?"and":"or",d=`X: ${n} + ${i} = ${n+i} > ${this.baseTexture.width}`,f=`Y: ${r} + ${o} = ${r+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${d} ${c} ${f}`)}this.valid=i&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return ht._EMPTY||(ht._EMPTY=new ht(new Gt),$_(ht._EMPTY),$_(ht._EMPTY.baseTexture)),ht._EMPTY}static get WHITE(){if(!ht._WHITE){const t=tt.ADAPTER.createCanvas(16,16),n=t.getContext("2d");t.width=16,t.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),ht._WHITE=new ht(Gt.from(t)),$_(ht._WHITE),$_(ht._WHITE.baseTexture)}return ht._WHITE}}class zp extends ht{constructor(t,n){super(t,n),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(t){this.framebuffer.multisample=t}resize(t,n,r=!0){const i=this.baseTexture.resolution,o=Math.round(t*i)/i,s=Math.round(n*i)/i;this.valid=o>0&&s>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=s,r&&this.baseTexture.resize(o,s),this.updateUvs()}setResolution(t){const{baseTexture:n}=this;n.resolution!==t&&(n.setResolution(t),this.resize(n.width,n.height,!1))}static create(t){return new zp(new Ute(t))}}class Gte{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,n,r=Gr.NONE){const i=new Ute(Object.assign({width:t,height:n,resolution:1,multisample:r},this.textureOptions));return new zp(i)}getOptimalTexture(t,n,r=1,i=Gr.NONE){let o;t=Math.ceil(t*r-1e-6),n=Math.ceil(n*r-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||n!==this._pixelsHeight?(t=gC(t),n=gC(n),o=((t&65535)<<16|n&65535)>>>0,i>1&&(o+=i*4294967296)):o=i>1?-i:-1,this.texturePool[o]||(this.texturePool[o]=[]);let s=this.texturePool[o].pop();return s||(s=this.createTexture(t,n,i)),s.filterPoolKey=o,s.setResolution(r),s}getFilterTexture(t,n,r){const i=this.getOptimalTexture(t.width,t.height,n||t.resolution,r||Gr.NONE);return i.filterFrame=t.filterFrame,i}returnTexture(t){const n=t.filterPoolKey;t.filterFrame=null,this.texturePool[n].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const n in this.texturePool){const r=this.texturePool[n];if(r)for(let i=0;i0&&t.height>0;for(const n in this.texturePool){if(!(Number(n)<0))continue;const r=this.texturePool[n];if(r)for(let i=0;i1&&(f=this.getOptimalFilterTexture(d.width,d.height,n.resolution),f.filterFrame=d.filterFrame),r[h].apply(this,d,f,Il.CLEAR,n);const p=d;d=f,f=p}r[h].apply(this,d,c.renderTexture,Il.BLEND,n),h>1&&n.multisample>1&&this.returnFilterTexture(n.renderTexture),this.returnFilterTexture(d),this.returnFilterTexture(f)}n.clear(),this.statePool.push(n)}bindAndClear(t,n=Il.CLEAR){const{renderTexture:r,state:i}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const s=this.tempRect;s.x=0,s.y=0,s.width=t.filterFrame.width,s.height=t.filterFrame.height,r.bind(t,t.filterFrame,s)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?r.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const o=i.stateId&1||this.forceClear;(n===Il.CLEAR||n===Il.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,n,r,i){const o=this.renderer;o.state.set(t.state),this.bindAndClear(r,i),t.uniforms.uSampler=n,t.uniforms.filterGlobals=this.globalUniforms,o.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(n._frame,n.filterFrame),o.geometry.bind(this.quadUv),o.geometry.draw(Ll.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(Ll.TRIANGLE_STRIP))}calculateSpriteMatrix(t,n){const{sourceFrame:r,destinationFrame:i}=this.activeState,{orig:o}=n._texture,s=t.set(i.width,0,0,i.height,r.x,r.y),l=n.worldTransform.copyTo(pr.TEMP_MATRIX);return l.invert(),s.prepend(l),s.scale(1/o.width,1/o.height),s.translate(n.anchor.x,n.anchor.y),s}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,n,r=1,i=Gr.NONE){return this.texturePool.getOptimalTexture(t,n,r,i)}getFilterTexture(t,n,r){if(typeof t=="number"){const o=t;t=n,n=o}t=t||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(t.width,t.height,n||t.resolution,r||Gr.NONE);return i.filterFrame=t.filterFrame,i}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,n){const r=F_[0],i=F_[1],o=F_[2],s=F_[3];r.set(n.left,n.top),i.set(n.left,n.bottom),o.set(n.right,n.top),s.set(n.right,n.bottom),t.apply(r,r),t.apply(i,i),t.apply(o,o),t.apply(s,s);const l=Math.min(r.x,i.x,o.x,s.x),c=Math.min(r.y,i.y,o.y,s.y),d=Math.max(r.x,i.x,o.x,s.x),f=Math.max(r.y,i.y,o.y,s.y);n.x=l,n.y=c,n.width=d-l,n.height=f-c}roundFrame(t,n,r,i,o){if(!(t.width<=0||t.height<=0||r.width<=0||r.height<=0)){if(o){const{a:s,b:l,c,d}=o;if((Math.abs(l)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(s)>1e-4||Math.abs(d)>1e-4))return}o=o?aB.copyFrom(o):aB.identity(),o.translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.transformAABB(o,t),t.ceil(n),this.transformAABB(o.invert(),t)}}}qte.extension={type:rt.RendererSystem,name:"filter"};bt.add(qte);class Sze{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Gr.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Eze=new Kt;class Xte{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new P3(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Kt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let n=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;tt.PREFER_ENV===Fp.WEBGL_LEGACY&&(n=null,r=null),n?t.drawBuffers=i=>n.drawBuffersWEBGL(i):(this.hasMRT=!1,t.drawBuffers=()=>{}),r||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,n,r=0){const{gl:i}=this;if(t){const o=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,o.framebuffer)),o.mipLevel!==r&&(t.dirtyId++,t.dirtyFormat++,o.mipLevel=r),o.dirtyId!==t.dirtyId&&(o.dirtyId=t.dirtyId,o.dirtyFormat!==t.dirtyFormat?(o.dirtyFormat=t.dirtyFormat,o.dirtySize=t.dirtySize,this.updateFramebuffer(t,r)):o.dirtySize!==t.dirtySize&&(o.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let s=0;s>r,l=n.height>>r,c=s/n.width;this.setViewport(n.x*c,n.y*c,s,l)}else{const s=t.width>>r,l=t.height>>r;this.setViewport(0,0,s,l)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),n?this.setViewport(n.x,n.y,n.width,n.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,n,r,i){const o=this.viewport;t=Math.round(t),n=Math.round(n),r=Math.round(r),i=Math.round(i),(o.width!==r||o.height!==i||o.x!==t||o.y!==n)&&(o.x=t,o.y=n,o.width=r,o.height=i,this.gl.viewport(t,n,r,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,n,r,i,o=l3.COLOR|l3.DEPTH){const{gl:s}=this;s.clearColor(t,n,r,i),s.clear(o)}initFramebuffer(t){const{gl:n}=this,r=new Sze(n.createFramebuffer());return r.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=r,this.managedFramebuffers.push(t),t.disposeRunner.add(this),r}resizeFramebuffer(t){const{gl:n}=this,r=t.glFramebuffers[this.CONTEXT_UID];r.stencil&&(n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height));const i=t.colorTextures;let o=i.length;n.drawBuffers||(o=Math.min(o,1));for(let s=0;s1&&this.canMultisampleFramebuffer(t)?i.msaaBuffer=i.msaaBuffer||r.createRenderbuffer():i.msaaBuffer&&(r.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const l=[];for(let c=0;c1&&r.drawBuffers(l),t.depthTexture&&this.writeDepthTexture){const d=t.depthTexture;this.renderer.texture.bind(d,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,d._glTextures[this.CONTEXT_UID].texture,n)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),i.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,i.stencil)):i.stencil&&(r.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:n}=this;let r=Gr.NONE;if(t<=1||n===null)return r;for(let i=0;i=0&&this.managedFramebuffers.splice(o,1),t.disposeRunner.remove(this),n||(i.deleteFramebuffer(r.framebuffer),r.msaaBuffer&&i.deleteRenderbuffer(r.msaaBuffer),r.stencil&&i.deleteRenderbuffer(r.stencil)),r.blitFramebuffer&&this.disposeFramebuffer(r.blitFramebuffer,n)}disposeAll(t){const n=this.managedFramebuffers;this.managedFramebuffers=[];for(let r=0;rr.createVertexArrayOES(),t.bindVertexArray=i=>r.bindVertexArrayOES(i),t.deleteVertexArray=i=>r.deleteVertexArrayOES(i)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(n.webGLVersion!==2){const r=t.getExtension("ANGLE_instanced_arrays");r?(t.vertexAttribDivisor=(i,o)=>r.vertexAttribDivisorANGLE(i,o),t.drawElementsInstanced=(i,o,s,l,c)=>r.drawElementsInstancedANGLE(i,o,s,l,c),t.drawArraysInstanced=(i,o,s,l)=>r.drawArraysInstancedANGLE(i,o,s,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=n.webGLVersion===2||!!n.extensions.uint32ElementIndex}bind(t,n){n=n||this.renderer.shader.shader;const{gl:r}=this;let i=t.glVertexArrayObjects[this.CONTEXT_UID],o=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},o=!0);const s=i[n.program.id]||this.initGeometryVao(t,n,o);this._activeGeometry=t,this._activeVao!==s&&(this._activeVao=s,this.hasVao?r.bindVertexArray(s):this.activateVao(t,n.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,n=this.renderer.buffer;for(let r=0;r"u"?.5:n,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,n){n===void 0&&(n=t);const r=this.mapCoord;for(let i=0;i0?this.maskStack[this.maskStack.length-1]._colorMask:15;r!==n&&this.renderer.gl.colorMask((r&1)!==0,(r&2)!==0,(r&4)!==0,(r&8)!==0)}destroy(){this.renderer=null}}Qte.extension={type:rt.RendererSystem,name:"mask"};bt.add(Qte);class Jte{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:n}=this.renderer,r=this.getStackLength();this.maskStack=t;const i=this.getStackLength();i!==r&&(i===0?n.disable(this.glConst):(n.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const p7=new pr,m7=[],zS=class extends Jte{constructor(e){super(e),this.glConst=tt.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:n}=e,{renderer:r}=this,i=r.renderTexture,o=n.getBounds(!0,m7.pop()??new Kt);this.roundFrameToPixels(o,i.current?i.current.resolution:r.resolution,i.sourceFrame,i.destinationFrame,r.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:n,c:r,d:i}=e;return(Math.abs(n)>1e-4||Math.abs(r)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||zS.isMatrixRotated(t.worldTransform)||zS.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const n=e._scissorRectLocal;return n.width>0&&n.height>0}roundFrameToPixels(e,t,n,r,i){zS.isMatrixRotated(i)||(i=i?p7.copyFrom(i):p7.identity(),i.translate(-n.x,-n.y).scale(r.width/n.width,r.height/n.height).translate(r.x,r.y),this.renderer.filter.transformAABB(i,e),e.fit(r),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&m7.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let Zte=zS;Zte.extension={type:rt.RendererSystem,name:"scissor"};bt.add(Zte);class ene extends Jte{constructor(t){super(t),this.glConst=tt.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const n=t.maskObject,{gl:r}=this.renderer,i=t._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),r.clearStencil(0),r.clear(r.STENCIL_BUFFER_BIT),r.enable(r.STENCIL_TEST)),t._stencilCounter++;const o=t._colorMask;o!==0&&(t._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilFunc(r.EQUAL,i,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.INCR),n.renderable=!0,n.render(this.renderer),this.renderer.batch.flush(),n.renderable=!1,o!==0&&(t._colorMask=o,r.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()}pop(t){const n=this.renderer.gl;if(this.getStackLength()===0)n.disable(n.STENCIL_TEST);else{const r=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=r?r._colorMask:15;i!==0&&(r._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilOp(n.KEEP,n.KEEP,n.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(r._colorMask=i,n.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}ene.extension={type:rt.RendererSystem,name:"stencil"};bt.add(ene);class tne{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return cn("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return cn("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return cn("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const n in t)this.plugins[n]=new t[n](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}tne.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"_plugin"};bt.add(tne);class nne{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new pr,this.transform=null}update(t,n,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=n||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);const o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)}calculateProjection(t,n,r,i){const o=this.projectionMatrix,s=i?-1:1;o.identity(),o.a=1/n.width*2,o.d=s*(1/n.height*2),o.tx=-1-n.x*o.a,o.ty=-s-n.y*o.d}setTransform(t){}destroy(){this.renderer=null}}nne.extension={type:rt.RendererSystem,name:"projection"};bt.add(nne);const Aze=new Sj;class rne{constructor(t){this.renderer=t,this._tempMatrix=new pr}generateTexture(t,n){const{region:r,...i}=n||{},o=r||t.getLocalBounds(null,!0);o.width===0&&(o.width=1),o.height===0&&(o.height=1);const s=zp.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const l=t.transform;return t.transform=Aze,this.renderer.render(t,{renderTexture:s,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=l,s}destroy(){}}rne.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"textureGenerator"};bt.add(rne);const Sh=new Kt,_b=new Kt;class ine{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Kt,this.destinationFrame=new Kt,this.viewportFrame=new Kt}contextChange(){var n;const t=(n=this.renderer)==null?void 0:n.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(t&&t.alpha&&t.premultipliedAlpha)}bind(t=null,n,r){const i=this.renderer;this.current=t;let o,s,l;t?(o=t.baseTexture,l=o.resolution,n||(Sh.width=t.frame.width,Sh.height=t.frame.height,n=Sh),r||(_b.x=t.frame.x,_b.y=t.frame.y,_b.width=n.width,_b.height=n.height,r=_b),s=o.framebuffer):(l=i.resolution,n||(Sh.width=i._view.screen.width,Sh.height=i._view.screen.height,n=Sh),r||(r=Sh,r.width=n.width,r.height=n.height));const c=this.viewportFrame;c.x=r.x*l,c.y=r.y*l,c.width=r.width*l,c.height=r.height*l,t||(c.y=i.view.height-(c.y+c.height)),c.ceil(),this.renderer.framebuffer.bind(s,c),this.renderer.projection.update(r,n,l,!s),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(n),this.destinationFrame.copyFrom(r)}clear(t,n){const r=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=zn.shared.setValue(t||r);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&i.premultiply(i.alpha);const o=this.destinationFrame,s=this.current?this.current.baseTexture:this.renderer._view.screen,l=o.width!==s.width||o.height!==s.height;if(l){let{x:c,y:d,width:f,height:h}=this.viewportFrame;c=Math.round(c),d=Math.round(d),f=Math.round(f),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(c,d,f,h)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,n),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}ine.extension={type:rt.RendererSystem,name:"renderTexture"};bt.add(ine);class Rze{constructor(t,n){this.program=t,this.uniformData=n,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Ize(e,t){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;if>h?1:-1);for(let f=0;f0?this.maskStack[this.maskStack.length-1]._colorMask:15;r!==n&&this.renderer.gl.colorMask((r&1)!==0,(r&2)!==0,(r&4)!==0,(r&8)!==0)}destroy(){this.renderer=null}}Qte.extension={type:rt.RendererSystem,name:"mask"};bt.add(Qte);class Jte{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:n}=this.renderer,r=this.getStackLength();this.maskStack=t;const i=this.getStackLength();i!==r&&(i===0?n.disable(this.glConst):(n.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const p7=new pr,m7=[],zS=class extends Jte{constructor(e){super(e),this.glConst=tt.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:n}=e,{renderer:r}=this,i=r.renderTexture,o=n.getBounds(!0,m7.pop()??new Kt);this.roundFrameToPixels(o,i.current?i.current.resolution:r.resolution,i.sourceFrame,i.destinationFrame,r.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:n,c:r,d:i}=e;return(Math.abs(n)>1e-4||Math.abs(r)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||zS.isMatrixRotated(t.worldTransform)||zS.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const n=e._scissorRectLocal;return n.width>0&&n.height>0}roundFrameToPixels(e,t,n,r,i){zS.isMatrixRotated(i)||(i=i?p7.copyFrom(i):p7.identity(),i.translate(-n.x,-n.y).scale(r.width/n.width,r.height/n.height).translate(r.x,r.y),this.renderer.filter.transformAABB(i,e),e.fit(r),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&m7.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let Zte=zS;Zte.extension={type:rt.RendererSystem,name:"scissor"};bt.add(Zte);class ene extends Jte{constructor(t){super(t),this.glConst=tt.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const n=t.maskObject,{gl:r}=this.renderer,i=t._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),r.clearStencil(0),r.clear(r.STENCIL_BUFFER_BIT),r.enable(r.STENCIL_TEST)),t._stencilCounter++;const o=t._colorMask;o!==0&&(t._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilFunc(r.EQUAL,i,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.INCR),n.renderable=!0,n.render(this.renderer),this.renderer.batch.flush(),n.renderable=!1,o!==0&&(t._colorMask=o,r.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()}pop(t){const n=this.renderer.gl;if(this.getStackLength()===0)n.disable(n.STENCIL_TEST);else{const r=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=r?r._colorMask:15;i!==0&&(r._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilOp(n.KEEP,n.KEEP,n.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(r._colorMask=i,n.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}ene.extension={type:rt.RendererSystem,name:"stencil"};bt.add(ene);class tne{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return cn("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return cn("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return cn("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const n in t)this.plugins[n]=new t[n](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}tne.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"_plugin"};bt.add(tne);class nne{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new pr,this.transform=null}update(t,n,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=n||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);const o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)}calculateProjection(t,n,r,i){const o=this.projectionMatrix,s=i?-1:1;o.identity(),o.a=1/n.width*2,o.d=s*(1/n.height*2),o.tx=-1-n.x*o.a,o.ty=-s-n.y*o.d}setTransform(t){}destroy(){this.renderer=null}}nne.extension={type:rt.RendererSystem,name:"projection"};bt.add(nne);const Rze=new Sj;class rne{constructor(t){this.renderer=t,this._tempMatrix=new pr}generateTexture(t,n){const{region:r,...i}=n||{},o=r||t.getLocalBounds(null,!0);o.width===0&&(o.width=1),o.height===0&&(o.height=1);const s=zp.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const l=t.transform;return t.transform=Rze,this.renderer.render(t,{renderTexture:s,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=l,s}destroy(){}}rne.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"textureGenerator"};bt.add(rne);const Sh=new Kt,_b=new Kt;class ine{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Kt,this.destinationFrame=new Kt,this.viewportFrame=new Kt}contextChange(){var n;const t=(n=this.renderer)==null?void 0:n.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(t&&t.alpha&&t.premultipliedAlpha)}bind(t=null,n,r){const i=this.renderer;this.current=t;let o,s,l;t?(o=t.baseTexture,l=o.resolution,n||(Sh.width=t.frame.width,Sh.height=t.frame.height,n=Sh),r||(_b.x=t.frame.x,_b.y=t.frame.y,_b.width=n.width,_b.height=n.height,r=_b),s=o.framebuffer):(l=i.resolution,n||(Sh.width=i._view.screen.width,Sh.height=i._view.screen.height,n=Sh),r||(r=Sh,r.width=n.width,r.height=n.height));const c=this.viewportFrame;c.x=r.x*l,c.y=r.y*l,c.width=r.width*l,c.height=r.height*l,t||(c.y=i.view.height-(c.y+c.height)),c.ceil(),this.renderer.framebuffer.bind(s,c),this.renderer.projection.update(r,n,l,!s),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(n),this.destinationFrame.copyFrom(r)}clear(t,n){const r=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=zn.shared.setValue(t||r);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&i.premultiply(i.alpha);const o=this.destinationFrame,s=this.current?this.current.baseTexture:this.renderer._view.screen,l=o.width!==s.width||o.height!==s.height;if(l){let{x:c,y:d,width:f,height:h}=this.viewportFrame;c=Math.round(c),d=Math.round(d),f=Math.round(f),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(c,d,f,h)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,n),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}ine.extension={type:rt.RendererSystem,name:"renderTexture"};bt.add(ine);class Ize{constructor(t,n){this.program=t,this.uniformData=n,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Pze(e,t){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;if>h?1:-1);for(let f=0;f({data:o,offset:0,dataLen:0,dirty:0}));let n=0,r=0,i=0;for(let o=0;o1&&(n=Math.max(n,16)*s.data.size),s.dataLen=n,r%n!==0&&r<16){const l=r%n%16;r+=l,i+=l}r+n>16?(i=Math.ceil(i/16)*16,s.offset=i,i+=n,r=n):(s.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function Nze(e,t){const n=[];for(const r in e)t[r]&&n.push(t[r]);return n.sort((r,i)=>r.index-i.index),n}function Bze(e,t){if(!e.autoManage)return{size:0,syncFunc:Mze};const n=Nze(e.uniforms,t),{uboElements:r,size:i}=Lze(n),o=[` + `},one={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function Nze(e){const t=e.map(o=>({data:o,offset:0,dataLen:0,dirty:0}));let n=0,r=0,i=0;for(let o=0;o1&&(n=Math.max(n,16)*s.data.size),s.dataLen=n,r%n!==0&&r<16){const l=r%n%16;r+=l,i+=l}r+n>16?(i=Math.ceil(i/16)*16,s.offset=i,i+=n,r=n):(s.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function Bze(e,t){const n=[];for(const r in e)t[r]&&n.push(t[r]);return n.sort((r,i)=>r.index-i.index),n}function $ze(e,t){if(!e.autoManage)return{size:0,syncFunc:Dze};const n=Bze(e.uniforms,t),{uboElements:r,size:i}=Nze(n),o=[` var v = null; var v2 = null; var cv = null; @@ -1087,7 +1087,7 @@ void main(void) offset += ${v}; } - `)}else{const h=Dze[l.data.type];o.push(` + `)}else{const h=Lze[l.data.type];o.push(` cv = ud.${d}.value; v = uv.${d}; offset = ${l.offset/4}; @@ -1095,7 +1095,7 @@ void main(void) `)}}return o.push(` renderer.buffer.update(buffer); `),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(` -`))}}let $ze=0;const z_={textureCount:0,uboCount:0};class sne{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=$ze++}systemCheck(){if(!cze())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,n){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const r=t.program,i=r.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==r&&(this.program=r,this.gl.useProgram(i.program)),n||(z_.textureCount=0,z_.uboCount=0,this.syncUniformGroup(t.uniformGroup,z_)),i}setUniforms(t){const n=this.shader.program,r=n.glPrograms[this.renderer.CONTEXT_UID];n.syncUniforms(r.uniformData,t,this.renderer)}syncUniformGroup(t,n){const r=this.getGlProgram();(!t.static||t.dirtyId!==r.uniformDirtyGroups[t.id])&&(r.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,r,n))}syncUniforms(t,n,r){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(n.uniformData,t.uniforms,this.renderer,r)}createSyncGroups(t){const n=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[n]||(this.cache[n]=ize(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[n],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,n){const r=this.getGlProgram();if(!t.static||t.dirtyId!==0||!r.uniformGroups[t.id]){t.dirtyId=0;const i=r.uniformGroups[t.id]||this.createSyncBufferGroup(t,r,n);t.buffer.update(),i(r.uniformData,t.uniforms,this.renderer,z_,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,r.uniformBufferBindings[n])}createSyncBufferGroup(t,n,r){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const o=this.gl.getUniformBlockIndex(n.program,r);n.uniformBufferBindings[r]=this.shader.uniformBindCount,i.uniformBlockBinding(n.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;const s=this.getSignature(t,this.shader.program.uniformData,"ubo");let l=this._uboCache[s];if(l||(l=this._uboCache[s]=Bze(t,this.shader.program.uniformData)),t.autoManage){const c=new Float32Array(l.size/4);t.buffer.update(c)}return n.uniformGroups[t.id]=l.syncFunc,n.uniformGroups[t.id]}getSignature(t,n,r){const i=t.uniforms,o=[`${r}-`];for(const s in i)o.push(s),n[s]&&o.push(n[s].type);return o.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const n=this.gl,r=t.program,i=Oze(n,r);return r.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}sne.extension={type:rt.RendererSystem,name:"shader"};bt.add(sne);class jk{constructor(t){this.renderer=t}run(t){const{renderer:n}=this;n.runners.init.emit(n.options),t.hello&&console.log(`PixiJS 7.2.4 - ${n.rendererLogId} - https://pixijs.com`),n.resize(n.screen.width,n.screen.height)}destroy(){}}jk.defaultOptions={hello:!1};jk.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"startup"};bt.add(jk);function Fze(e,t=[]){return t[Mt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.ADD]=[e.ONE,e.ONE],t[Mt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.NONE]=[0,0],t[Mt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Mt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Mt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Mt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Mt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Mt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Mt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Mt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Mt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Mt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const zze=0,jze=1,Uze=2,Hze=3,Wze=4,Gze=5,O3=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Mt.NONE,this._blendEq=!1,this.map=[],this.map[zze]=this.setBlend,this.map[jze]=this.setOffset,this.map[Uze]=this.setCullFace,this.map[Hze]=this.setDepthTest,this.map[Wze]=this.setFrontFace,this.map[Gze]=this.setDepthMask,this.checks=[],this.defaultState=new Bu,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=Fze(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,n=0;for(;t;)t&1&&this.map[n].call(this,!!(e.data&1<>1,n++;this.stateId=e.data}for(let t=0;tt.systems[i]),r=[...n,...Object.keys(t.systems).filter(i=>!n.includes(i))];for(const i of r)this.addSystem(t.systems[i],i)}addRunners(...t){t.forEach(n=>{this.runners[n]=new cl(n)})}addSystem(t,n){const r=new t(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=r,this._systemsHash[n]=r;for(const i in this.runners)this.runners[i].add(r);return this}emitWithCustomOptions(t,n){const r=Object.keys(this._systemsHash);t.items.forEach(i=>{const o=r.find(s=>this._systemsHash[s]===i);i[t.name](n[o])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const jS=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=jS.defaultMaxIdle,this.checkCountMax=jS.defaultCheckCountMax,this.mode=jS.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==uj.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let n=!1;for(let r=0;rthis.maxIdle&&(e.destroyTexture(i,!0),t[r]=null,n=!0)}if(n){let r=0;for(let i=0;i=0;r--)this.unload(e.children[r])}destroy(){this.renderer=null}};let Qa=jS;Qa.defaultMode=uj.AUTO;Qa.defaultMaxIdle=60*60;Qa.defaultCheckCountMax=60*10;Qa.extension={type:rt.RendererSystem,name:"textureGC"};bt.add(Qa);class cB{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=It.UNSIGNED_BYTE,this.internalFormat=Ge.RGBA,this.samplerType=0}}function qze(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[It.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA8,[Ge.RGB]:e.RGB8,[Ge.RG]:e.RG8,[Ge.RED]:e.R8,[Ge.RGBA_INTEGER]:e.RGBA8UI,[Ge.RGB_INTEGER]:e.RGB8UI,[Ge.RG_INTEGER]:e.RG8UI,[Ge.RED_INTEGER]:e.R8UI,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[It.BYTE]:{[Ge.RGBA]:e.RGBA8_SNORM,[Ge.RGB]:e.RGB8_SNORM,[Ge.RG]:e.RG8_SNORM,[Ge.RED]:e.R8_SNORM,[Ge.RGBA_INTEGER]:e.RGBA8I,[Ge.RGB_INTEGER]:e.RGB8I,[Ge.RG_INTEGER]:e.RG8I,[Ge.RED_INTEGER]:e.R8I},[It.UNSIGNED_SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16UI,[Ge.RGB_INTEGER]:e.RGB16UI,[Ge.RG_INTEGER]:e.RG16UI,[Ge.RED_INTEGER]:e.R16UI,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[It.SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16I,[Ge.RGB_INTEGER]:e.RGB16I,[Ge.RG_INTEGER]:e.RG16I,[Ge.RED_INTEGER]:e.R16I},[It.UNSIGNED_INT]:{[Ge.RGBA_INTEGER]:e.RGBA32UI,[Ge.RGB_INTEGER]:e.RGB32UI,[Ge.RG_INTEGER]:e.RG32UI,[Ge.RED_INTEGER]:e.R32UI,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[It.INT]:{[Ge.RGBA_INTEGER]:e.RGBA32I,[Ge.RGB_INTEGER]:e.RGB32I,[Ge.RG_INTEGER]:e.RG32I,[Ge.RED_INTEGER]:e.R32I},[It.FLOAT]:{[Ge.RGBA]:e.RGBA32F,[Ge.RGB]:e.RGB32F,[Ge.RG]:e.RG32F,[Ge.RED]:e.R32F,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[It.HALF_FLOAT]:{[Ge.RGBA]:e.RGBA16F,[Ge.RGB]:e.RGB16F,[Ge.RG]:e.RG16F,[Ge.RED]:e.R16F},[It.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB565},[It.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA4},[It.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGB5_A1},[It.UNSIGNED_INT_2_10_10_10_REV]:{[Ge.RGBA]:e.RGB10_A2,[Ge.RGBA_INTEGER]:e.RGB10_A2UI},[It.UNSIGNED_INT_10F_11F_11F_REV]:{[Ge.RGB]:e.R11F_G11F_B10F},[It.UNSIGNED_INT_5_9_9_9_REV]:{[Ge.RGB]:e.RGB9_E5},[It.UNSIGNED_INT_24_8]:{[Ge.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[It.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ge.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[It.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA,[Ge.RGB]:e.RGB,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[It.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB},[It.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA},[It.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGBA}},t}class lne{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Vt,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=qze(t);const n=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=n;for(let i=0;i=0;--o){const s=n[o];s&&s._glTextures[i].samplerType!==c3.FLOAT&&this.renderer.texture.unbind(s)}}initTexture(t){const n=new cB(this.gl.createTexture());return n.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=n,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),n}initTextureType(t,n){var r;n.internalFormat=((r=this.internalFormats[t.type])==null?void 0:r[t.format])??t.format,this.webGLVersion===2&&t.type===It.HALF_FLOAT?n.type=this.gl.HALF_FLOAT:n.type=t.type}updateTexture(t){var i;const n=t._glTextures[this.CONTEXT_UID];if(!n)return;const r=this.renderer;if(this.initTextureType(t,n),(i=t.resource)!=null&&i.upload(r,t,n))n.samplerType!==c3.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,s=t.realHeight,l=r.gl;(n.width!==o||n.height!==s||n.dirtyId<0)&&(n.width=o,n.height=s,l.texImage2D(t.target,0,n.internalFormat,o,s,0,t.format,n.type,null))}t.dirtyStyleId!==n.dirtyStyleId&&this.updateTextureStyle(t),n.dirtyId=t.dirtyId}destroyTexture(t,n){const{gl:r}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!n)){const i=this.managedTextures.indexOf(t);i!==-1&&sg(this.managedTextures,i,1)}}updateTextureStyle(t){var r;const n=t._glTextures[this.CONTEXT_UID];n&&((t.mipmap===Ql.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?n.mipmap=!1:n.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?n.wrapMode=Pd.CLAMP:n.wrapMode=t.wrapMode,(r=t.resource)!=null&&r.style(this.renderer,t,n)||this.setStyle(t,n),n.dirtyStyleId=t.dirtyStyleId)}setStyle(t,n){const r=this.gl;if(n.mipmap&&t.mipmap!==Ql.ON_MANUAL&&r.generateMipmap(t.target),r.texParameteri(t.target,r.TEXTURE_WRAP_S,n.wrapMode),r.texParameteri(t.target,r.TEXTURE_WRAP_T,n.wrapMode),n.mipmap){r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===hu.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===hu.LINEAR){const o=Math.min(t.anisotropicLevel,r.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));r.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===hu.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===hu.LINEAR?r.LINEAR:r.NEAREST)}destroy(){this.renderer=null}}lne.extension={type:rt.RendererSystem,name:"texture"};bt.add(lne);class cne{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:n,CONTEXT_UID:r}=this,i=t._glTransformFeedbacks[r]||this.createGLTransformFeedback(t);n.bindTransformFeedback(n.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,n){const{gl:r,renderer:i}=this;n&&i.shader.bind(n),r.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:n,renderer:r,CONTEXT_UID:i}=this,o=n.createTransformFeedback();t._glTransformFeedbacks[i]=o,n.bindTransformFeedback(n.TRANSFORM_FEEDBACK,o);for(let s=0;s(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(Cp||{});class uB{constructor(t,n=null,r=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=n,this.priority=r,this.once=i}match(t,n=null){return this.fn===t&&this.context===n}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const n=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),n}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const n=this.next;return this.next=t?null:n,this.previous=null,n}}const ys=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new uB(null,null,1/0),this.deltaMS=1/ys.targetFPMS,this.elapsedMS=1/ys.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,n=Cp.NORMAL){return this._addListener(new uB(e,t,n))}addOnce(e,t,n=Cp.NORMAL){return this._addListener(new uB(e,t,n,!0))}_addListener(e){let t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this}remove(e,t){let n=this._head.next;for(;n;)n.match(e,t)?n=n.destroy():n=n.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Xr.shared:new Xr,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}une.extension=rt.Application;bt.add(une);const dne=[];bt.handleByList(rt.Renderer,dne);function Xze(e){for(const t of dne)if(t.test(e))return new t(e);throw new Error("Unable to auto-detect a suitable renderer.")}var Yze=`attribute vec2 aVertexPosition; +`))}}let Fze=0;const z_={textureCount:0,uboCount:0};class sne{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Fze++}systemCheck(){if(!uze())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,n){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const r=t.program,i=r.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==r&&(this.program=r,this.gl.useProgram(i.program)),n||(z_.textureCount=0,z_.uboCount=0,this.syncUniformGroup(t.uniformGroup,z_)),i}setUniforms(t){const n=this.shader.program,r=n.glPrograms[this.renderer.CONTEXT_UID];n.syncUniforms(r.uniformData,t,this.renderer)}syncUniformGroup(t,n){const r=this.getGlProgram();(!t.static||t.dirtyId!==r.uniformDirtyGroups[t.id])&&(r.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,r,n))}syncUniforms(t,n,r){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(n.uniformData,t.uniforms,this.renderer,r)}createSyncGroups(t){const n=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[n]||(this.cache[n]=oze(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[n],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,n){const r=this.getGlProgram();if(!t.static||t.dirtyId!==0||!r.uniformGroups[t.id]){t.dirtyId=0;const i=r.uniformGroups[t.id]||this.createSyncBufferGroup(t,r,n);t.buffer.update(),i(r.uniformData,t.uniforms,this.renderer,z_,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,r.uniformBufferBindings[n])}createSyncBufferGroup(t,n,r){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const o=this.gl.getUniformBlockIndex(n.program,r);n.uniformBufferBindings[r]=this.shader.uniformBindCount,i.uniformBlockBinding(n.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;const s=this.getSignature(t,this.shader.program.uniformData,"ubo");let l=this._uboCache[s];if(l||(l=this._uboCache[s]=$ze(t,this.shader.program.uniformData)),t.autoManage){const c=new Float32Array(l.size/4);t.buffer.update(c)}return n.uniformGroups[t.id]=l.syncFunc,n.uniformGroups[t.id]}getSignature(t,n,r){const i=t.uniforms,o=[`${r}-`];for(const s in i)o.push(s),n[s]&&o.push(n[s].type);return o.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const n=this.gl,r=t.program,i=Mze(n,r);return r.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}sne.extension={type:rt.RendererSystem,name:"shader"};bt.add(sne);class jk{constructor(t){this.renderer=t}run(t){const{renderer:n}=this;n.runners.init.emit(n.options),t.hello&&console.log(`PixiJS 7.2.4 - ${n.rendererLogId} - https://pixijs.com`),n.resize(n.screen.width,n.screen.height)}destroy(){}}jk.defaultOptions={hello:!1};jk.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"startup"};bt.add(jk);function zze(e,t=[]){return t[Mt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.ADD]=[e.ONE,e.ONE],t[Mt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.NONE]=[0,0],t[Mt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Mt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Mt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Mt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Mt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Mt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Mt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Mt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Mt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Mt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const jze=0,Uze=1,Hze=2,Wze=3,Gze=4,Vze=5,O3=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Mt.NONE,this._blendEq=!1,this.map=[],this.map[jze]=this.setBlend,this.map[Uze]=this.setOffset,this.map[Hze]=this.setCullFace,this.map[Wze]=this.setDepthTest,this.map[Gze]=this.setFrontFace,this.map[Vze]=this.setDepthMask,this.checks=[],this.defaultState=new Bu,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=zze(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,n=0;for(;t;)t&1&&this.map[n].call(this,!!(e.data&1<>1,n++;this.stateId=e.data}for(let t=0;tt.systems[i]),r=[...n,...Object.keys(t.systems).filter(i=>!n.includes(i))];for(const i of r)this.addSystem(t.systems[i],i)}addRunners(...t){t.forEach(n=>{this.runners[n]=new cl(n)})}addSystem(t,n){const r=new t(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=r,this._systemsHash[n]=r;for(const i in this.runners)this.runners[i].add(r);return this}emitWithCustomOptions(t,n){const r=Object.keys(this._systemsHash);t.items.forEach(i=>{const o=r.find(s=>this._systemsHash[s]===i);i[t.name](n[o])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const jS=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=jS.defaultMaxIdle,this.checkCountMax=jS.defaultCheckCountMax,this.mode=jS.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==uj.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let n=!1;for(let r=0;rthis.maxIdle&&(e.destroyTexture(i,!0),t[r]=null,n=!0)}if(n){let r=0;for(let i=0;i=0;r--)this.unload(e.children[r])}destroy(){this.renderer=null}};let Qa=jS;Qa.defaultMode=uj.AUTO;Qa.defaultMaxIdle=60*60;Qa.defaultCheckCountMax=60*10;Qa.extension={type:rt.RendererSystem,name:"textureGC"};bt.add(Qa);class cB{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=It.UNSIGNED_BYTE,this.internalFormat=Ge.RGBA,this.samplerType=0}}function Xze(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[It.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA8,[Ge.RGB]:e.RGB8,[Ge.RG]:e.RG8,[Ge.RED]:e.R8,[Ge.RGBA_INTEGER]:e.RGBA8UI,[Ge.RGB_INTEGER]:e.RGB8UI,[Ge.RG_INTEGER]:e.RG8UI,[Ge.RED_INTEGER]:e.R8UI,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[It.BYTE]:{[Ge.RGBA]:e.RGBA8_SNORM,[Ge.RGB]:e.RGB8_SNORM,[Ge.RG]:e.RG8_SNORM,[Ge.RED]:e.R8_SNORM,[Ge.RGBA_INTEGER]:e.RGBA8I,[Ge.RGB_INTEGER]:e.RGB8I,[Ge.RG_INTEGER]:e.RG8I,[Ge.RED_INTEGER]:e.R8I},[It.UNSIGNED_SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16UI,[Ge.RGB_INTEGER]:e.RGB16UI,[Ge.RG_INTEGER]:e.RG16UI,[Ge.RED_INTEGER]:e.R16UI,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[It.SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16I,[Ge.RGB_INTEGER]:e.RGB16I,[Ge.RG_INTEGER]:e.RG16I,[Ge.RED_INTEGER]:e.R16I},[It.UNSIGNED_INT]:{[Ge.RGBA_INTEGER]:e.RGBA32UI,[Ge.RGB_INTEGER]:e.RGB32UI,[Ge.RG_INTEGER]:e.RG32UI,[Ge.RED_INTEGER]:e.R32UI,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[It.INT]:{[Ge.RGBA_INTEGER]:e.RGBA32I,[Ge.RGB_INTEGER]:e.RGB32I,[Ge.RG_INTEGER]:e.RG32I,[Ge.RED_INTEGER]:e.R32I},[It.FLOAT]:{[Ge.RGBA]:e.RGBA32F,[Ge.RGB]:e.RGB32F,[Ge.RG]:e.RG32F,[Ge.RED]:e.R32F,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[It.HALF_FLOAT]:{[Ge.RGBA]:e.RGBA16F,[Ge.RGB]:e.RGB16F,[Ge.RG]:e.RG16F,[Ge.RED]:e.R16F},[It.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB565},[It.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA4},[It.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGB5_A1},[It.UNSIGNED_INT_2_10_10_10_REV]:{[Ge.RGBA]:e.RGB10_A2,[Ge.RGBA_INTEGER]:e.RGB10_A2UI},[It.UNSIGNED_INT_10F_11F_11F_REV]:{[Ge.RGB]:e.R11F_G11F_B10F},[It.UNSIGNED_INT_5_9_9_9_REV]:{[Ge.RGB]:e.RGB9_E5},[It.UNSIGNED_INT_24_8]:{[Ge.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[It.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ge.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[It.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA,[Ge.RGB]:e.RGB,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[It.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB},[It.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA},[It.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGBA}},t}class lne{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Gt,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=Xze(t);const n=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=n;for(let i=0;i=0;--o){const s=n[o];s&&s._glTextures[i].samplerType!==c3.FLOAT&&this.renderer.texture.unbind(s)}}initTexture(t){const n=new cB(this.gl.createTexture());return n.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=n,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),n}initTextureType(t,n){var r;n.internalFormat=((r=this.internalFormats[t.type])==null?void 0:r[t.format])??t.format,this.webGLVersion===2&&t.type===It.HALF_FLOAT?n.type=this.gl.HALF_FLOAT:n.type=t.type}updateTexture(t){var i;const n=t._glTextures[this.CONTEXT_UID];if(!n)return;const r=this.renderer;if(this.initTextureType(t,n),(i=t.resource)!=null&&i.upload(r,t,n))n.samplerType!==c3.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,s=t.realHeight,l=r.gl;(n.width!==o||n.height!==s||n.dirtyId<0)&&(n.width=o,n.height=s,l.texImage2D(t.target,0,n.internalFormat,o,s,0,t.format,n.type,null))}t.dirtyStyleId!==n.dirtyStyleId&&this.updateTextureStyle(t),n.dirtyId=t.dirtyId}destroyTexture(t,n){const{gl:r}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!n)){const i=this.managedTextures.indexOf(t);i!==-1&&sg(this.managedTextures,i,1)}}updateTextureStyle(t){var r;const n=t._glTextures[this.CONTEXT_UID];n&&((t.mipmap===Ql.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?n.mipmap=!1:n.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?n.wrapMode=Pd.CLAMP:n.wrapMode=t.wrapMode,(r=t.resource)!=null&&r.style(this.renderer,t,n)||this.setStyle(t,n),n.dirtyStyleId=t.dirtyStyleId)}setStyle(t,n){const r=this.gl;if(n.mipmap&&t.mipmap!==Ql.ON_MANUAL&&r.generateMipmap(t.target),r.texParameteri(t.target,r.TEXTURE_WRAP_S,n.wrapMode),r.texParameteri(t.target,r.TEXTURE_WRAP_T,n.wrapMode),n.mipmap){r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===hu.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===hu.LINEAR){const o=Math.min(t.anisotropicLevel,r.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));r.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===hu.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===hu.LINEAR?r.LINEAR:r.NEAREST)}destroy(){this.renderer=null}}lne.extension={type:rt.RendererSystem,name:"texture"};bt.add(lne);class cne{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:n,CONTEXT_UID:r}=this,i=t._glTransformFeedbacks[r]||this.createGLTransformFeedback(t);n.bindTransformFeedback(n.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,n){const{gl:r,renderer:i}=this;n&&i.shader.bind(n),r.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:n,renderer:r,CONTEXT_UID:i}=this,o=n.createTransformFeedback();t._glTransformFeedbacks[i]=o,n.bindTransformFeedback(n.TRANSFORM_FEEDBACK,o);for(let s=0;s(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(Cp||{});class uB{constructor(t,n=null,r=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=n,this.priority=r,this.once=i}match(t,n=null){return this.fn===t&&this.context===n}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const n=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),n}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const n=this.next;return this.next=t?null:n,this.previous=null,n}}const ys=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new uB(null,null,1/0),this.deltaMS=1/ys.targetFPMS,this.elapsedMS=1/ys.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,n=Cp.NORMAL){return this._addListener(new uB(e,t,n))}addOnce(e,t,n=Cp.NORMAL){return this._addListener(new uB(e,t,n,!0))}_addListener(e){let t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this}remove(e,t){let n=this._head.next;for(;n;)n.match(e,t)?n=n.destroy():n=n.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Xr.shared:new Xr,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}une.extension=rt.Application;bt.add(une);const dne=[];bt.handleByList(rt.Renderer,dne);function Yze(e){for(const t of dne)if(t.test(e))return new t(e);throw new Error("Unable to auto-detect a suitable renderer.")}var Kze=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -1106,7 +1106,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,Kze=`attribute vec2 aVertexPosition; +}`,Qze=`attribute vec2 aVertexPosition; uniform mat3 projectionMatrix; @@ -1132,7 +1132,7 @@ void main(void) gl_Position = filterVertexPosition(); vTextureCoord = filterTextureCoord(); } -`;const Qze=Yze,fne=Kze;class hne{constructor(t){this.renderer=t}contextChange(t){let n;if(this.renderer.context.webGLVersion===1){const r=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),n=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,r)}else{const r=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),n=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,r)}n>=Gr.HIGH?this.multisample=Gr.HIGH:n>=Gr.MEDIUM?this.multisample=Gr.MEDIUM:n>=Gr.LOW?this.multisample=Gr.LOW:this.multisample=Gr.NONE}destroy(){}}hne.extension={type:rt.RendererSystem,name:"_multisample"};bt.add(hne);class Jze{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class pne{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:n,CONTEXT_UID:r}=this,i=t._glBuffers[r]||this.createGLBuffer(t);n.bindBuffer(t.type,i.buffer)}unbind(t){const{gl:n}=this;n.bindBuffer(t,null)}bindBufferBase(t,n){const{gl:r,CONTEXT_UID:i}=this;if(this.boundBufferBases[n]!==t){const o=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[n]=t,r.bindBufferBase(r.UNIFORM_BUFFER,n,o.buffer)}}bindBufferRange(t,n,r){const{gl:i,CONTEXT_UID:o}=this;r=r||0;const s=t._glBuffers[o]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,n||0,s.buffer,r*256,256)}update(t){const{gl:n,CONTEXT_UID:r}=this,i=t._glBuffers[r]||this.createGLBuffer(t);if(t._updateID!==i.updateID)if(i.updateID=t._updateID,n.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)n.bufferSubData(t.type,0,t.data);else{const o=t.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,n.bufferData(t.type,t.data,o)}}dispose(t,n){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const r=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),r&&(n||i.deleteBuffer(r.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const n=Object.keys(this.managedBuffers);for(let r=0;rr.resource).filter(r=>r).map(r=>r.load());return this._load=Promise.all(n).then(()=>{const{realWidth:r,realHeight:i}=this.items[0];return this.resize(r,i),Promise.resolve(this)}),this._load}}class Zze extends gne{constructor(t,n){const{width:r,height:i}=n||{};let o,s;Array.isArray(t)?(o=t,s=t.length):s=t,super(s,{width:r,height:i}),o&&this.initFromArray(o,n)}addBaseTextureAt(t,n){if(t.resource)this.addResourceAt(t.resource,n);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=ng.TEXTURE_2D_ARRAY}upload(t,n,r){const{length:i,itemDirtyIds:o,items:s}=this,{gl:l}=t;r.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,r.internalFormat,this._width,this._height,i,0,n.format,r.type,null);for(let c=0;c0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=ng.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,n){const r=this.itemDirtyIds;for(let i=0;i{if(this.url===null){t(this);return}try{const r=await tt.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await r.blob();if(this.destroyed)return;const o=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===yl.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=o,this.update(),t(this)}catch(r){if(this.destroyed)return;n(r),this.onError.emit(r)}}),this._load)}upload(t,n,r){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(n.alphaMode=this.alphaMode),super.upload(t,n,r)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return jm._EMPTY=jm._EMPTY??tt.ADAPTER.createCanvas(0,0),jm._EMPTY}}const US=class extends Ud{constructor(e,t){t=t||{},super(tt.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},US.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;Ud.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,n=e.height;if(!t||!n)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let r=t*this.scale,i=n*this.scale;(this._overrideWidth||this._overrideHeight)&&(r=this._overrideWidth||this._overrideHeight/n*t,i=this._overrideHeight||this._overrideWidth/t*n),r=Math.round(r),i=Math.round(i);const o=this.source;o.width=r,o.height=i,o._pixiId=`canvas_${Ep()}`,o.getContext("2d").drawImage(e,0,0,t,n,0,0,r,i),this._resolve(),this._resolve=null}}static getSize(e){const t=US.SVG_SIZE.exec(e),n={};return t&&(n[t[1]]=Math.round(parseFloat(t[3])),n[t[5]]=Math.round(parseFloat(t[7]))),n}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&US.SVG_XML.test(e)}};let T1=US;T1.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const D3=class extends Ud{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const n=document.createElement("video");n.setAttribute("preload","auto"),n.setAttribute("webkit-playsinline",""),n.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const r=e[0].src||e[0];Ud.crossOrigin(n,r,t.crossorigin);for(let i=0;i{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Xr.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Xr.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(Xr.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Xr.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Xr.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||D3.TYPES.includes(t)}};let Ej=D3;Ej.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];Ej.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};k3.push(jm,Hte,eje,Ej,T1,mw,vne,Zze);class bC{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?Kt.EMPTY:(t=t||new Kt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,n){const{a:r,b:i,c:o,d:s,tx:l,ty:c}=t,d=r*n.x+o*n.y+l,f=i*n.x+s*n.y+c;this.minX=Math.min(this.minX,d),this.maxX=Math.max(this.maxX,d),this.minY=Math.min(this.minY,f),this.maxY=Math.max(this.maxY,f)}addQuad(t){let n=this.minX,r=this.minY,i=this.maxX,o=this.maxY,s=t[0],l=t[1];n=si?s:i,o=l>o?l:o,s=t[2],l=t[3],n=si?s:i,o=l>o?l:o,s=t[4],l=t[5],n=si?s:i,o=l>o?l:o,s=t[6],l=t[7],n=si?s:i,o=l>o?l:o,this.minX=n,this.minY=r,this.maxX=i,this.maxY=o}addFrame(t,n,r,i,o){this.addFrameMatrix(t.worldTransform,n,r,i,o)}addFrameMatrix(t,n,r,i,o){const s=t.a,l=t.b,c=t.c,d=t.d,f=t.tx,h=t.ty;let p=this.minX,g=this.minY,v=this.maxX,y=this.maxY,S=s*n+c*r+f,_=l*n+d*r+h;p=Sv?S:v,y=_>y?_:y,S=s*i+c*r+f,_=l*i+d*r+h,p=Sv?S:v,y=_>y?_:y,S=s*n+c*o+f,_=l*n+d*o+h,p=Sv?S:v,y=_>y?_:y,S=s*i+c*o+f,_=l*i+d*o+h,p=Sv?S:v,y=_>y?_:y,this.minX=p,this.minY=g,this.maxX=v,this.maxY=y}addVertexData(t,n,r){let i=this.minX,o=this.minY,s=this.maxX,l=this.maxY;for(let c=n;cs?d:s,l=f>l?f:l}this.minX=i,this.minY=o,this.maxX=s,this.maxY=l}addVertices(t,n,r,i){this.addVerticesMatrix(t.worldTransform,n,r,i)}addVerticesMatrix(t,n,r,i,o=0,s=o){const l=t.a,c=t.b,d=t.c,f=t.d,h=t.tx,p=t.ty;let g=this.minX,v=this.minY,y=this.maxX,S=this.maxY;for(let _=r;_i?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,n){const r=t.minX>n.minX?t.minX:n.minX,i=t.minY>n.minY?t.minY:n.minY,o=t.maxXd?o:d,this.maxY=s>f?s:f}}addBoundsMatrix(t,n){this.addFrameMatrix(n,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,n){const r=t.minX>n.x?t.minX:n.x,i=t.minY>n.y?t.minY:n.y,o=t.maxXd?o:d,this.maxY=s>f?s:f}}pad(t=0,n=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=n,this.maxY+=n)}addFramePad(t,n,r,i,o,s){t-=o,n-=s,r+=o,i+=s,this.minX=this.minXr?this.maxX:r,this.minY=this.minYi?this.maxY:i}}class Pr extends hw{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Sj,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new bC,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const n=Object.keys(t);for(let r=0;r1)for(let t=0;tthis.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const n=this.getChildIndex(e),r=this.getChildIndex(t);this.children[n]=t,this.children[r]=e,this.onChildrenChange(n=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const n=this.getChildIndex(e);sg(this.children,n,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t0&&i<=r){o=this.children.splice(n,i);for(let s=0;s1&&this.children.sort(rje),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e0&&t.height>0))return;let n,r;this.cullArea?(n=this.cullArea,r=this.worldTransform):this._render!==L3.prototype._render&&(n=this.getBounds(!0));const i=e.projection.transform;if(i&&(r?(r=nje.copyFrom(r),r.prepend(i)):r=i),n&&t.intersects(n,r))this._render(e);else if(this.cullArea)return;for(let o=0,s=this.children.length;ot in e?ije(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Se=(e,t,n)=>(oje(e,typeof t!="symbol"?t+"":t,n),n);let xa=class{constructor(t){Se(this,"parent"),Se(this,"paused"),this.parent=t,this.paused=!1}destroy(){}down(t){return!1}move(t){return!1}up(t){return!1}wheel(t){return!1}update(t){}resize(){}reset(){}pause(){this.paused=!0}resume(){this.paused=!1}};var sje=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},yne={exports:{}};(function(e,t){(function(){var n,r;r=function(i){return e.exports=i},n={linear:function(i,o,s,l){return s*i/l+o},easeInQuad:function(i,o,s,l){return s*(i/=l)*i+o},easeOutQuad:function(i,o,s,l){return-s*(i/=l)*(i-2)+o},easeInOutQuad:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i+o:-s/2*(--i*(i-2)-1)+o},easeInCubic:function(i,o,s,l){return s*(i/=l)*i*i+o},easeOutCubic:function(i,o,s,l){return s*((i=i/l-1)*i*i+1)+o},easeInOutCubic:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i+o:s/2*((i-=2)*i*i+2)+o},easeInQuart:function(i,o,s,l){return s*(i/=l)*i*i*i+o},easeOutQuart:function(i,o,s,l){return-s*((i=i/l-1)*i*i*i-1)+o},easeInOutQuart:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i+o:-s/2*((i-=2)*i*i*i-2)+o},easeInQuint:function(i,o,s,l){return s*(i/=l)*i*i*i*i+o},easeOutQuint:function(i,o,s,l){return s*((i=i/l-1)*i*i*i*i+1)+o},easeInOutQuint:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i*i+o:s/2*((i-=2)*i*i*i*i+2)+o},easeInSine:function(i,o,s,l){return-s*Math.cos(i/l*(Math.PI/2))+s+o},easeOutSine:function(i,o,s,l){return s*Math.sin(i/l*(Math.PI/2))+o},easeInOutSine:function(i,o,s,l){return-s/2*(Math.cos(Math.PI*i/l)-1)+o},easeInExpo:function(i,o,s,l){return i===0?o:s*Math.pow(2,10*(i/l-1))+o},easeOutExpo:function(i,o,s,l){return i===l?o+s:s*(-Math.pow(2,-10*i/l)+1)+o},easeInOutExpo:function(i,o,s,l){return(i/=l/2)<1?s/2*Math.pow(2,10*(i-1))+o:s/2*(-Math.pow(2,-10*--i)+2)+o},easeInCirc:function(i,o,s,l){return-s*(Math.sqrt(1-(i/=l)*i)-1)+o},easeOutCirc:function(i,o,s,l){return s*Math.sqrt(1-(i=i/l-1)*i)+o},easeInOutCirc:function(i,o,s,l){return(i/=l/2)<1?-s/2*(Math.sqrt(1-i*i)-1)+o:s/2*(Math.sqrt(1-(i-=2)*i)+1)+o},easeInElastic:function(i,o,s,l){var c,d,f;return f=1.70158,d=0,c=s,i===0||(i/=l),d||(d=l*.3),c=this.options.time){const r=this.parent.width,i=this.parent.height;this.complete(),(r!==this.parent.width||i!==this.parent.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}else{const r=this.options.ease(this.time,0,1,this.options.time);if(this.width!==null){const i=this.startWidth,o=this.deltaWidth;this.parent.fitWidth(i+o*r,this.keepCenter,this.height===null)}if(this.height!==null){const i=this.startHeight,o=this.deltaHeight;this.parent.fitHeight(i+o*r,this.keepCenter,this.width===null)}if(this.width===null?this.parent.scale.x=this.parent.scale.y:this.height===null&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){const i=this.startX,o=this.startY,s=this.deltaX,l=this.deltaY,c=new Ot(this.parent.x,this.parent.y);this.parent.moveCenter(i+s*r,o+l*r),this.parent.emit("moved",{viewport:this.parent,original:c,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}}};const cje={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};let uje=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"left"),Se(this,"top"),Se(this,"right"),Se(this,"bottom"),Se(this,"underflowX"),Se(this,"underflowY"),Se(this,"ease"),Se(this,"toX"),Se(this,"toY"),this.options=Object.assign({},cje,n),this.ease=Hk(this.options.ease,"easeInOutSine"),this.options.sides?this.options.sides==="all"?this.top=this.bottom=this.left=this.right=!0:this.options.sides==="horizontal"?(this.right=this.left=!0,this.top=this.bottom=!1):this.options.sides==="vertical"?(this.left=this.right=!1,this.top=this.bottom=!0):(this.top=this.options.sides.indexOf("top")!==-1,this.bottom=this.options.sides.indexOf("bottom")!==-1,this.left=this.options.sides.indexOf("left")!==-1,this.right=this.options.sides.indexOf("right")!==-1):this.left=this.top=this.right=this.bottom=!1;const r=this.options.underflow.toLowerCase();r==="center"?(this.underflowX=0,this.underflowY=0):(this.underflowX=r.indexOf("left")!==-1?-1:r.indexOf("right")!==-1?1:0,this.underflowY=r.indexOf("top")!==-1?-1:r.indexOf("bottom")!==-1?1:0),this.reset()}isActive(){return this.toX!==null||this.toY!==null}down(){return this.toX=this.toY=null,!1}up(){return this.bounce(),!1}update(t){if(!this.paused){if(this.bounce(),this.toX){const n=this.toX;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),n.time>=this.options.time?(this.parent.x=n.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(n.time,n.start,n.delta,this.options.time)}if(this.toY){const n=this.toY;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),n.time>=this.options.time?(this.parent.y=n.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(n.time,n.start,n.delta,this.options.time)}}}calcUnderflowX(){let t;switch(this.underflowX){case-1:t=0;break;case 1:t=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:t=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return t}calcUnderflowY(){let t;switch(this.underflowY){case-1:t=0;break;case 1:t=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:t=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return t}oob(){const t=this.options.bounceBox;if(t){const n=typeof t.x>"u"?0:t.x,r=typeof t.y>"u"?0:t.y,i=typeof t.width>"u"?this.parent.worldWidth:t.width,o=typeof t.height>"u"?this.parent.worldHeight:t.height;return{left:this.parent.lefti,top:this.parent.topo,topLeft:new Ot(n*this.parent.scale.x,r*this.parent.scale.y),bottomRight:new Ot(i*this.parent.scale.x-this.parent.screenWidth,o*this.parent.scale.y-this.parent.screenHeight)}}return{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new Ot(0,0),bottomRight:new Ot(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}bounce(){var t,n;if(this.paused)return;let r,i=this.parent.plugins.get("decelerate",!0);i&&(i.x||i.y)&&(i.x&&i.percentChangeX===((t=i.options)==null?void 0:t.friction)||i.y&&i.percentChangeY===((n=i.options)==null?void 0:n.friction))&&(r=this.oob(),(r.left&&this.left||r.right&&this.right)&&(i.percentChangeX=this.options.friction),(r.top&&this.top||r.bottom&&this.bottom)&&(i.percentChangeY=this.options.friction));const o=this.parent.plugins.get("drag",!0)||{},s=this.parent.plugins.get("pinch",!0)||{};if(i=i||{},!(o!=null&&o.active)&&!(s!=null&&s.active)&&(!this.toX||!this.toY)&&(!i.x||!i.y)){r=r||this.oob();const l=r.topLeft,c=r.bottomRight;if(!this.toX&&!i.x){let d=null;r.left&&this.left?d=this.parent.screenWorldWidth(this.options.right===!0?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(this.options.right===!0?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,n.x=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(this.options.top!==null||this.options.bottom!==null){let r=!1;if(!this.noUnderflow&&this.parent.screenWorldHeight(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,n.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}reset(){this.update()}};const hje={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};let pje=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),this.options=Object.assign({},hje,n),this.clamp()}resize(){this.clamp()}clamp(){if(!this.paused){if(this.options.minWidth||this.options.minHeight||this.options.maxWidth||this.options.maxHeight){let t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight;if(this.options.minWidth!==null&&tthis.options.maxWidth){const r=this.parent.scale.x;this.parent.fitWidth(this.options.maxWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(this.options.minHeight!==null&&nthis.options.maxHeight){const r=this.parent.scale.y;this.parent.fitHeight(this.options.maxHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/r,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}}else if(this.options.minScale||this.options.maxScale){const t={x:null,y:null},n={x:null,y:null};if(typeof this.options.minScale=="number")t.x=this.options.minScale,t.y=this.options.minScale;else if(this.options.minScale!==null){const o=this.options.minScale;t.x=typeof o.x>"u"?null:o.x,t.y=typeof o.y>"u"?null:o.y}if(typeof this.options.maxScale=="number")n.x=this.options.maxScale,n.y=this.options.maxScale;else if(this.options.maxScale!==null){const o=this.options.maxScale;n.x=typeof o.x>"u"?null:o.x,n.y=typeof o.y>"u"?null:o.y}let r=this.parent.scale.x,i=this.parent.scale.y;t.x!==null&&rn.x&&(r=n.x),t.y!==null&&in.y&&(i=n.y),(r!==this.parent.scale.x||i!==this.parent.scale.y)&&(this.parent.scale.set(r,i),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}}reset(){this.clamp()}};const mje={friction:.98,bounce:.8,minSpeed:.01},Wu=16;let gje=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"x"),Se(this,"y"),Se(this,"percentChangeX"),Se(this,"percentChangeY"),Se(this,"saved"),Se(this,"timeSinceRelease"),this.options=Object.assign({},mje,n),this.saved=[],this.timeSinceRelease=0,this.reset(),this.parent.on("moved",r=>this.handleMoved(r))}down(){return this.saved=[],this.x=this.y=null,!1}isActive(){return!!(this.x||this.y)}move(){if(this.paused)return!1;const t=this.parent.input.count();return(t===1||t>1&&!this.parent.plugins.get("pinch",!0))&&(this.saved.push({x:this.parent.x,y:this.parent.y,time:performance.now()}),this.saved.length>60&&this.saved.splice(0,30)),!1}handleMoved(t){if(this.saved.length){const n=this.saved[this.saved.length-1];t.type==="clamp-x"&&t.original?n.x===t.original.x&&(n.x=this.parent.x):t.type==="clamp-y"&&t.original&&n.y===t.original.y&&(n.y=this.parent.y)}}up(){if(this.parent.input.count()===0&&this.saved.length){const t=performance.now();for(const n of this.saved)if(n.time>=t-100){const r=t-n.time;this.x=(this.parent.x-n.x)/r,this.y=(this.parent.y-n.y)/r,this.percentChangeX=this.percentChangeY=this.options.friction,this.timeSinceRelease=0;break}}return!1}activate(t){t=t||{},typeof t.x<"u"&&(this.x=t.x,this.percentChangeX=this.options.friction),typeof t.y<"u"&&(this.y=t.y,this.percentChangeY=this.options.friction)}update(t){if(this.paused)return;const n=this.x||this.y,r=this.timeSinceRelease,i=this.timeSinceRelease+t;if(this.x){const o=this.percentChangeX,s=Math.log(o);this.parent.x+=this.x*Wu/s*(Math.pow(o,i/Wu)-Math.pow(o,r/Wu)),this.x*=Math.pow(this.percentChangeX,t/Wu)}if(this.y){const o=this.percentChangeY,s=Math.log(o);this.parent.y+=this.y*Wu/s*(Math.pow(o,i/Wu)-Math.pow(o,r/Wu)),this.y*=Math.pow(this.percentChangeY,t/Wu)}this.timeSinceRelease+=t,this.x&&this.y?Math.abs(this.x){t.includes(i.code)&&(this.keyIsPressed=!0)},r=i=>{t.includes(i.code)&&(this.keyIsPressed=!1)};this.addWindowEventHandler("keyup",r),this.addWindowEventHandler("keydown",n)}addWindowEventHandler(t,n){window.addEventListener(t,n),this.windowEventHandlers.push({event:t,handler:n})}destroy(){this.windowEventHandlers.forEach(({event:t,handler:n})=>{window.removeEventListener(t,n)})}mouseButtons(t){!t||t==="all"?this.mouse=[!0,!0,!0]:this.mouse=[t.indexOf("left")!==-1,t.indexOf("middle")!==-1,t.indexOf("right")!==-1]}parseUnderflow(){const t=this.options.underflow.toLowerCase();t==="center"?(this.underflowX=0,this.underflowY=0):(t.includes("left")?this.underflowX=-1:t.includes("right")?this.underflowX=1:this.underflowX=0,t.includes("top")?this.underflowY=-1:t.includes("bottom")?this.underflowY=1:this.underflowY=0)}checkButtons(t){const n=t.pointerType==="mouse",r=this.parent.input.count();return!!((r===1||r>1&&!this.parent.plugins.get("pinch",!0))&&(!n||this.mouse[t.button]))}checkKeyPress(t){return!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&t.data.pointerType==="touch"}down(t){return this.paused||!this.options.pressDrag?!1:this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.global.x,y:t.global.y},this.current=t.pointerId,!0):(this.last=null,!1)}get active(){return this.moved}move(t){if(this.paused||!this.options.pressDrag)return!1;if(this.last&&this.current===t.data.pointerId){const n=t.global.x,r=t.global.y,i=this.parent.input.count();if(i===1||i>1&&!this.parent.plugins.get("pinch",!0)){const o=n-this.last.x,s=r-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(o)||this.yDirection&&this.parent.input.checkThreshold(s)){const l={x:n,y:r};return this.xDirection&&(this.parent.x+=(l.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(l.y-this.last.y)*this.options.factor),this.last=l,this.moved||this.parent.emit("drag-start",{event:t,screen:new Ot(this.last.x,this.last.y),world:this.parent.toWorld(new Ot(this.last.x,this.last.y)),viewport:this.parent}),this.moved=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"}),!0}}else this.moved=!1}return!1}up(t){if(this.paused)return!1;const n=this.parent.input.touches;if(n.length===1){const r=n[0];return r.last&&(this.last={x:r.last.x,y:r.last.y},this.current=r.id),this.moved=!1,!0}else if(this.last&&this.moved){const r=new Ot(this.last.x,this.last.y);return this.parent.emit("drag-end",{event:t,screen:r,world:this.parent.toWorld(r),viewport:this.parent}),this.last=null,this.moved=!1,!0}return!1}wheel(t){if(this.paused)return!1;if(this.options.wheel){const n=this.parent.plugins.get("wheel",!0);if(!n||!n.options.wheelZoom&&!t.ctrlKey){const r=t.deltaMode?this.options.lineHeight:1,i=[t.deltaX,t.deltaY],[o,s]=this.options.wheelSwapAxes?i.reverse():i;return this.xDirection&&(this.parent.x+=o*r*this.options.wheelScroll*this.reverse),this.yDirection&&(this.parent.y+=s*r*this.options.wheelScroll*this.reverse),this.options.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.options.passiveWheel||t.preventDefault(),this.parent.options.stopPropagation&&t.stopPropagation(),!0}}return!1}resume(){this.last=null,this.paused=!1}clamp(){const t=this.parent.plugins.get("decelerate",!0)||{};if(this.options.clampWheel!=="y")if(this.parent.screenWorldWidththis.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,t.x=0);if(this.options.clampWheel!=="x")if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,t.y=0)}};const bje={speed:0,acceleration:null,radius:null};let xje=class extends xa{constructor(t,n,r={}){super(t),Se(this,"options"),Se(this,"target"),Se(this,"velocity"),this.target=n,this.options=Object.assign({},bje,r),this.velocity={x:0,y:0}}update(t){if(this.paused)return;const n=this.parent.center;let r=this.target.x,i=this.target.y;if(this.options.radius)if(Math.sqrt(Math.pow(this.target.y-n.y,2)+Math.pow(this.target.x-n.x,2))>this.options.radius){const l=Math.atan2(this.target.y-n.y,this.target.x-n.x);r=this.target.x-Math.cos(l)*this.options.radius,i=this.target.y-Math.sin(l)*this.options.radius}else return;const o=r-n.x,s=i-n.y;if(o||s)if(this.options.speed)if(this.options.acceleration){const l=Math.atan2(i-n.y,r-n.x),c=Math.sqrt(Math.pow(o,2)+Math.pow(s,2));if(c){const d=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);c>d?this.velocity={x:Math.min(this.velocity.x+(this.options.acceleration*t,this.options.speed)),y:Math.min(this.velocity.y+(this.options.acceleration*t,this.options.speed))}:this.velocity={x:Math.max(this.velocity.x-this.options.acceleration*this.options.speed,0),y:Math.max(this.velocity.y-this.options.acceleration*this.options.speed,0)};const f=Math.cos(l)*this.velocity.x,h=Math.sin(l)*this.velocity.y,p=Math.abs(f)>Math.abs(o)?r:n.x+f,g=Math.abs(h)>Math.abs(s)?i:n.y+h;this.parent.moveCenter(p,g),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{const l=Math.atan2(i-n.y,r-n.x),c=Math.cos(l)*this.options.speed,d=Math.sin(l)*this.options.speed,f=Math.abs(c)>Math.abs(o)?r:n.x+c,h=Math.abs(d)>Math.abs(s)?i:n.y+d;this.parent.moveCenter(f,h),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}else this.parent.moveCenter(r,i),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}};const wje={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};let _je=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"reverse"),Se(this,"radiusSquared"),Se(this,"left"),Se(this,"top"),Se(this,"right"),Se(this,"bottom"),Se(this,"horizontal"),Se(this,"vertical"),this.options=Object.assign({},wje,n),this.reverse=this.options.reverse?1:-1,this.radiusSquared=typeof this.options.radius=="number"?Math.pow(this.options.radius,2):null,this.resize()}resize(){const t=this.options.distance;t!==null?(this.left=t,this.top=t,this.right=this.parent.screenWidth-t,this.bottom=this.parent.screenHeight-t):this.options.radius||(this.left=this.options.left,this.top=this.options.top,this.right=this.options.right===null?null:this.parent.screenWidth-this.options.right,this.bottom=this.options.bottom===null?null:this.parent.screenHeight-this.options.bottom)}down(){return this.paused||this.options.allowButtons||(this.horizontal=this.vertical=null),!1}move(t){if(this.paused||t.pointerType!=="mouse"&&t.pointerId!==1||!this.options.allowButtons&&t.buttons!==0)return!1;const n=t.global.x,r=t.global.y;if(this.radiusSquared){const i=this.parent.toScreen(this.parent.center);if(Math.pow(i.x-n,2)+Math.pow(i.y-r,2)>=this.radiusSquared){const o=Math.atan2(i.y-r,i.x-n);this.options.linear?(this.horizontal=Math.round(Math.cos(o))*this.options.speed*this.reverse*(60/1e3),this.vertical=Math.round(Math.sin(o))*this.options.speed*this.reverse*(60/1e3)):(this.horizontal=Math.cos(o)*this.options.speed*this.reverse*(60/1e3),this.vertical=Math.sin(o)*this.options.speed*this.reverse*(60/1e3))}else this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0}else this.left!==null&&nthis.right?this.horizontal=-1*this.reverse*this.options.speed*(60/1e3):(this.decelerateHorizontal(),this.horizontal=0),this.top!==null&&rthis.bottom?this.vertical=-1*this.reverse*this.options.speed*(60/1e3):(this.decelerateVertical(),this.vertical=0);return!1}decelerateHorizontal(){const t=this.parent.plugins.get("decelerate",!0);this.horizontal&&t&&!this.options.noDecelerate&&t.activate({x:this.horizontal*this.options.speed*this.reverse/(1e3/60)})}decelerateVertical(){const t=this.parent.plugins.get("decelerate",!0);this.vertical&&t&&!this.options.noDecelerate&&t.activate({y:this.vertical*this.options.speed*this.reverse/(1e3/60)})}up(){return this.paused||(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null),!1}update(){if(!this.paused&&(this.horizontal||this.vertical)){const t=this.parent.center;this.horizontal&&(t.x+=this.horizontal*this.options.speed),this.vertical&&(t.y+=this.vertical*this.options.speed),this.parent.moveCenter(t),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"})}}};const Sje={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};let Eje=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"active",!1),Se(this,"pinching",!1),Se(this,"moved",!1),Se(this,"lastCenter"),this.options=Object.assign({},Sje,n)}down(){return this.parent.input.count()>=2?(this.active=!0,!0):!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}move(t){if(this.paused||!this.active)return!1;const n=t.global.x,r=t.global.y,i=this.parent.input.touches;if(i.length>=2){const o=i[0],s=i[1],l=o.last&&s.last?Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2)):null;if(o.id===t.pointerId?o.last={x:n,y:r,data:t}:s.id===t.pointerId&&(s.last={x:n,y:r,data:t}),l){let c;const d=new Ot(o.last.x+(s.last.x-o.last.x)/2,o.last.y+(s.last.y-o.last.y)/2);this.options.center||(c=this.parent.toLocal(d));let f=Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2));f=f===0?f=1e-10:f;const h=(1-l/f)*this.options.percent*(this.isAxisX()?this.parent.scale.x:this.parent.scale.y);this.isAxisX()&&(this.parent.scale.x+=h),this.isAxisY()&&(this.parent.scale.y+=h),this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:d});const p=this.parent.plugins.get("clamp-zoom",!0);if(p&&p.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const g=this.parent.toGlobal(c);this.parent.x+=(d.x-g.x)*this.options.factor,this.parent.y+=(d.y-g.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(d.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(d.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=d,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}return!1}up(){return this.pinching&&this.parent.input.touches.length<=1?(this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0):!1}};const Cje={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};let Tje=class extends xa{constructor(t,n,r,i={}){super(t),Se(this,"options"),Se(this,"ease"),Se(this,"x"),Se(this,"y"),Se(this,"percent"),Se(this,"snapping"),Se(this,"deltaX"),Se(this,"deltaY"),Se(this,"startX"),Se(this,"startY"),this.options=Object.assign({},Cje,i),this.ease=Hk(i.ease,"easeInOutSine"),this.x=n,this.y=r,this.options.forceStart&&this.snapStart()}snapStart(){this.percent=0,this.snapping={time:0};const t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null),!1}up(){if(this.parent.input.count()===0){const t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}return!1}update(t){if(!this.paused&&!(this.options.interrupt&&this.parent.input.count()!==0))if(this.snapping){const n=this.snapping;n.time+=t;let r,i,o;const s=this.startX,l=this.startY,c=this.deltaX,d=this.deltaY;if(n.time>this.options.time)r=!0,i=s+c,o=l+d;else{const f=this.ease(n.time,0,1,this.options.time);i=s+c*f,o=l+d*f}this.options.topLeft?this.parent.moveCorner(i,o):this.parent.moveCenter(i,o),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),r&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{const n=this.options.topLeft?this.parent.corner:this.parent.center;(n.x!==this.x||n.y!==this.y)&&this.snapStart()}}};const kje={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};let Aje=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"ease"),Se(this,"xScale"),Se(this,"yScale"),Se(this,"xIndependent"),Se(this,"yIndependent"),Se(this,"snapping"),this.options=Object.assign({},kje,n),this.ease=Hk(this.options.ease),this.xIndependent=!1,this.yIndependent=!1,this.xScale=0,this.yScale=0,this.options.width>0&&(this.xScale=t.screenWidth/this.options.width,this.xIndependent=!0),this.options.height>0&&(this.yScale=t.screenHeight/this.options.height,this.yIndependent=!0),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale,this.options.time===0?(t.container.scale.x=this.xScale,t.container.scale.y=this.yScale,this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom")):n.forceStart&&this.createSnapping()}createSnapping(){const t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight,r=this.parent.screenWidth/this.xScale,i=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:n,deltaX:r-t,deltaY:i-n},this.parent.emit("snap-zoom-start",this.parent)}resize(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null),!1}update(t){if(this.paused||this.options.interrupt&&this.parent.input.count()!==0)return;let n;if(!this.options.center&&!this.options.noMove&&(n=this.parent.center),!this.snapping)(this.parent.scale.x!==this.xScale||this.parent.scale.y!==this.yScale)&&this.createSnapping();else if(this.snapping){const r=this.snapping;if(r.time+=t,r.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{const o=this.snapping,s=this.ease(o.time,o.startX,o.deltaX,this.options.time),l=this.ease(o.time,o.startY,o.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/s,this.parent.scale.y=this.parent.screenHeight/l}const i=this.parent.plugins.get("clamp-zoom",!0);i&&i.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(n))}}resume(){this.snapping=null,super.resume()}};const Rje={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};let Ije=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"smoothing"),Se(this,"smoothingCenter"),Se(this,"smoothingCount"),Se(this,"keyIsPressed"),this.options=Object.assign({},Rje,n),this.keyIsPressed=!1,this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){window.addEventListener("keydown",n=>{t.includes(n.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",n=>{t.includes(n.code)&&(this.keyIsPressed=!1)})}checkKeyPress(){return!this.options.keyToPress||this.keyIsPressed}down(){return this.options.interrupt&&(this.smoothing=null),!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}update(){if(this.smoothing){const t=this.smoothingCenter,n=this.smoothing;let r;this.options.center||(r=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x+=n.x),this.isAxisY()&&(this.parent.scale.y+=n.y),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const i=this.parent.plugins.get("clamp-zoom",!0);if(i&&i.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const o=this.parent.toGlobal(r);this.parent.x+=t.x-o.x,this.parent.y+=t.y-o.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}pinch(t){if(this.paused)return;const n=this.parent.input.getPointerPosition(t),r=-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/200,i=Math.pow(2,(1+this.options.percent)*r);let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const l=this.parent.toGlobal(o);this.parent.x+=n.x-l.x,this.parent.y+=n.y-l.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}wheel(t){if(this.paused||!this.checkKeyPress())return!1;if(t.ctrlKey&&this.options.trackpadPinch)this.pinch(t);else if(this.options.wheelZoom){const n=this.parent.input.getPointerPosition(t),r=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,i=Math.pow(2,(1+this.options.percent)*r);if(this.options.smooth){const o={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+o.x)*i-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+o.y)*i-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=n}else{let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const l=this.parent.toGlobal(o);this.parent.x+=n.x-l.x,this.parent.y+=n.y-l.y}}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}return!this.parent.options.passiveWheel}},Pje=class{constructor(t){Se(this,"viewport"),Se(this,"clickedAvailable"),Se(this,"isMouseDown"),Se(this,"last"),Se(this,"wheelFunction"),Se(this,"touches"),this.viewport=t,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new Kt(0,0,this.viewport.worldWidth,this.viewport.worldHeight)),this.viewport.on("pointerdown",this.down,this),this.viewport.options.allowPreserveDragOutside?this.viewport.on("globalpointermove",this.move,this):this.viewport.on("pointermove",this.move,this),this.viewport.on("pointerup",this.up,this),this.viewport.on("pointerupoutside",this.up,this),this.viewport.on("pointercancel",this.up,this),this.viewport.options.allowPreserveDragOutside||this.viewport.on("pointerleave",this.up,this),this.wheelFunction=t=>this.handleWheel(t),this.viewport.options.events.domElement.addEventListener("wheel",this.wheelFunction,{passive:this.viewport.options.passiveWheel}),this.isMouseDown=!1}destroy(){this.viewport.options.events.domElement.removeEventListener("wheel",this.wheelFunction)}down(t){if(!(this.viewport.pause||!this.viewport.worldVisible)){if(t.pointerType==="mouse"?this.isMouseDown=!0:this.get(t.pointerId)||this.touches.push({id:t.pointerId,last:null}),this.count()===1){this.last=t.global.clone();const n=this.viewport.plugins.get("decelerate",!0),r=this.viewport.plugins.get("bounce",!0);(!n||!n.isActive())&&(!r||!r.isActive())?this.clickedAvailable=!0:this.clickedAvailable=!1}else this.clickedAvailable=!1;this.viewport.plugins.down(t)&&this.viewport.options.stopPropagation&&t.stopPropagation()}}clear(){this.isMouseDown=!1,this.touches=[],this.last=null}checkThreshold(t){return Math.abs(t)>=this.viewport.threshold}move(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const n=this.viewport.plugins.move(t);if(this.clickedAvailable&&this.last){const r=t.global.x-this.last.x,i=t.global.y-this.last.y;(this.checkThreshold(r)||this.checkThreshold(i))&&(this.clickedAvailable=!1)}n&&this.viewport.options.stopPropagation&&t.stopPropagation()}up(t){if(this.viewport.pause||!this.viewport.worldVisible)return;t.pointerType==="mouse"&&(this.isMouseDown=!1),t.pointerType!=="mouse"&&this.remove(t.pointerId);const n=this.viewport.plugins.up(t);this.clickedAvailable&&this.count()===0&&this.last&&(this.viewport.emit("clicked",{event:t,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this.viewport}),this.clickedAvailable=!1),n&&this.viewport.options.stopPropagation&&t.stopPropagation()}getPointerPosition(t){const n=new Ot;return this.viewport.options.events.mapPositionToPoint(n,t.clientX,t.clientY),n}handleWheel(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const n=this.viewport.toLocal(this.getPointerPosition(t));this.viewport.left<=n.x&&n.x<=this.viewport.right&&this.viewport.top<=n.y&&n.y<=this.viewport.bottom&&this.viewport.plugins.wheel(t)&&!this.viewport.options.passiveWheel&&t.preventDefault()}pause(){this.touches=[],this.isMouseDown=!1}get(t){for(const n of this.touches)if(n.id===t)return n;return null}remove(t){for(let n=0;n{t.destroy()}),this.plugins={},this.sort()}remove(t){var n;this.plugins[t]&&((n=this.plugins[t])==null||n.destroy(),delete this.plugins[t],this.viewport.emit("plugin-remove",t),this.sort())}pause(t){var n;(n=this.plugins[t])==null||n.pause()}resume(t){var n;(n=this.plugins[t])==null||n.resume()}sort(){this.list=[];for(const t of Sb)this.plugins[t]&&this.list.push(this.plugins[t])}down(t){let n=!1;for(const r of this.list)r.down(t)&&(n=!0);return n}move(t){let n=!1;for(const r of this.viewport.plugins.list)r.move(t)&&(n=!0);return n}up(t){let n=!1;for(const r of this.list)r.up(t)&&(n=!0);return n}wheel(t){let n=!1;for(const r of this.list)r.wheel(t)&&(n=!0);return n}};const Mje={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,disableOnContextMenu:!1,ticker:Xr.shared,allowPreserveDragOutside:!1};class Dje extends Ko{constructor(t){super(),Se(this,"moving"),Se(this,"screenWidth"),Se(this,"screenHeight"),Se(this,"threshold"),Se(this,"input"),Se(this,"plugins"),Se(this,"zooming"),Se(this,"lastViewport"),Se(this,"options"),Se(this,"_dirty"),Se(this,"_forceHitArea"),Se(this,"_hitAreaDefault"),Se(this,"_pause"),Se(this,"tickerFunction"),Se(this,"_worldWidth"),Se(this,"_worldHeight"),Se(this,"_disableOnContextMenu",n=>n.preventDefault()),this.options={...Mje,...t},this.screenWidth=this.options.screenWidth,this.screenHeight=this.options.screenHeight,this._worldWidth=this.options.worldWidth,this._worldHeight=this.options.worldHeight,this.forceHitArea=this.options.forceHitArea,this.threshold=this.options.threshold,this.options.disableOnContextMenu&&this.options.events.domElement.addEventListener("contextmenu",this._disableOnContextMenu),this.options.noTicker||(this.tickerFunction=()=>this.update(this.options.ticker.elapsedMS),this.options.ticker.add(this.tickerFunction)),this.input=new Pje(this),this.plugins=new Oje(this)}destroy(t){!this.options.noTicker&&this.tickerFunction&&this.options.ticker.remove(this.tickerFunction),this.options.disableOnContextMenu&&this.options.events.domElement.removeEventListener("contextmenu",this._disableOnContextMenu),this.input.destroy(),super.destroy(t)}update(t){this.pause||(this.plugins.update(t),this.lastViewport&&(this.lastViewport.x!==this.x||this.lastViewport.y!==this.y?this.moving=!0:this.moving&&(this.emit("moved-end",this),this.moving=!1),this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y?this.zooming=!0:this.zooming&&(this.emit("zoomed-end",this),this.zooming=!1)),this.forceHitArea||(this._hitAreaDefault=new Kt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight),this.hitArea=this._hitAreaDefault),this._dirty=this._dirty||!this.lastViewport||this.lastViewport.x!==this.x||this.lastViewport.y!==this.y||this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y,this.lastViewport={x:this.x,y:this.y,scaleX:this.scale.x,scaleY:this.scale.y},this.emit("frame-end",this))}resize(t=window.innerWidth,n=window.innerHeight,r,i){this.screenWidth=t,this.screenHeight=n,typeof r<"u"&&(this._worldWidth=r),typeof i<"u"&&(this._worldHeight=i),this.plugins.resize(),this.dirty=!0}get worldWidth(){return this._worldWidth?this._worldWidth:this.width/this.scale.x}set worldWidth(t){this._worldWidth=t,this.plugins.resize()}get worldHeight(){return this._worldHeight?this._worldHeight:this.height/this.scale.y}set worldHeight(t){this._worldHeight=t,this.plugins.resize()}getVisibleBounds(){return new Kt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(t,n){return arguments.length===2?this.toLocal(new Ot(t,n)):this.toLocal(t)}toScreen(t,n){return arguments.length===2?this.toGlobal(new Ot(t,n)):this.toGlobal(t)}get worldScreenWidth(){return this.screenWidth/this.scale.x}get worldScreenHeight(){return this.screenHeight/this.scale.y}get screenWorldWidth(){return this.worldWidth*this.scale.x}get screenWorldHeight(){return this.worldHeight*this.scale.y}get center(){return new Ot(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)}set center(t){this.moveCenter(t)}moveCenter(...t){let n,r;typeof t[0]=="number"?(n=t[0],r=t[1]):(n=t[0].x,r=t[0].y);const i=(this.worldScreenWidth/2-n)*this.scale.x,o=(this.worldScreenHeight/2-r)*this.scale.y;return(this.x!==i||this.y!==o)&&(this.position.set(i,o),this.plugins.reset(),this.dirty=!0),this}get corner(){return new Ot(-this.x/this.scale.x,-this.y/this.scale.y)}set corner(t){this.moveCorner(t)}moveCorner(...t){let n,r;return t.length===1?(n=-t[0].x*this.scale.x,r=-t[0].y*this.scale.y):(n=-t[0]*this.scale.x,r=-t[1]*this.scale.y),(n!==this.x||r!==this.y)&&(this.position.set(n,r),this.plugins.reset(),this.dirty=!0),this}get screenWidthInWorldPixels(){return this.screenWidth/this.scale.x}get screenHeightInWorldPixels(){return this.screenHeight/this.scale.y}findFitWidth(t){return this.screenWidth/t}findFitHeight(t){return this.screenHeight/t}findFit(t,n){const r=this.screenWidth/t,i=this.screenHeight/n;return Math.min(r,i)}findCover(t,n){const r=this.screenWidth/t,i=this.screenHeight/n;return Math.max(r,i)}fitWidth(t=this.worldWidth,n,r=!0,i){let o;n&&(o=this.center),this.scale.x=this.screenWidth/t,r&&(this.scale.y=this.scale.x);const s=this.plugins.get("clamp-zoom",!0);return!i&&s&&s.clamp(),n&&o&&this.moveCenter(o),this}fitHeight(t=this.worldHeight,n,r=!0,i){let o;n&&(o=this.center),this.scale.y=this.screenHeight/t,r&&(this.scale.x=this.scale.y);const s=this.plugins.get("clamp-zoom",!0);return!i&&s&&s.clamp(),n&&o&&this.moveCenter(o),this}fitWorld(t){let n;t&&(n=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.xthis.worldWidth,top:this.top<0,bottom:this.bottom>this.worldHeight,cornerPoint:new Ot(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}get right(){return-this.x/this.scale.x+this.worldScreenWidth}set right(t){this.x=-t*this.scale.x+this.screenWidth,this.plugins.reset()}get left(){return-this.x/this.scale.x}set left(t){this.x=-t*this.scale.x,this.plugins.reset()}get top(){return-this.y/this.scale.y}set top(t){this.y=-t*this.scale.y,this.plugins.reset()}get bottom(){return-this.y/this.scale.y+this.worldScreenHeight}set bottom(t){this.y=-t*this.scale.y+this.screenHeight,this.plugins.reset()}get dirty(){return!!this._dirty}set dirty(t){this._dirty=t}get forceHitArea(){return this._forceHitArea}set forceHitArea(t){t?(this._forceHitArea=t,this.hitArea=t):(this._forceHitArea=null,this.hitArea=new Kt(0,0,this.worldWidth,this.worldHeight))}drag(t){return this.plugins.add("drag",new yje(this,t)),this}clamp(t){return this.plugins.add("clamp",new fje(this,t)),this}decelerate(t){return this.plugins.add("decelerate",new gje(this,t)),this}bounce(t){return this.plugins.add("bounce",new uje(this,t)),this}pinch(t){return this.plugins.add("pinch",new Eje(this,t)),this}snap(t,n,r){return this.plugins.add("snap",new Tje(this,t,n,r)),this}follow(t,n){return this.plugins.add("follow",new xje(this,t,n)),this}wheel(t){return this.plugins.add("wheel",new Ije(this,t)),this}animate(t){return this.plugins.add("animate",new lje(this,t)),this}clampZoom(t){return this.plugins.add("clamp-zoom",new pje(this,t)),this}mouseEdges(t){return this.plugins.add("mouse-edges",new _je(this,t)),this}get pause(){return!!this._pause}set pause(t){this._pause=t,this.lastViewport=null,this.moving=!1,this.zooming=!1,t&&this.input.pause()}ensureVisible(t,n,r,i,o){o&&(r>this.worldScreenWidth||i>this.worldScreenHeight)&&(this.fit(!0,r,i),this.emit("zoomed",{viewport:this,type:"ensureVisible"}));let s=!1;tthis.right&&(this.right=t+r,s=!0),nthis.bottom&&(this.bottom=n+i,s=!0),s&&this.emit("moved",{viewport:this,type:"ensureVisible"})}}const Eb=new Ot,Lje=new Uint16Array([0,1,2,0,2,3]);class jp extends Ko{constructor(t){super(),this._anchor=new md(this._onAnchorUpdate,this,t?t.defaultAnchor.x:0,t?t.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new zn(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=Mt.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=t||ht.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=Lje,this.pluginName="batch",this.isSprite=!0,this._roundPixels=tt.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=pd(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=pd(this.scale.y)*this._height/this._texture.orig.height)}_onAnchorUpdate(){this._transformID=-1,this._transformTrimmedID=-1}calculateVertices(){const t=this._texture;if(this._transformID===this.transform._worldID&&this._textureID===t._updateID)return;this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;const n=this.transform.worldTransform,r=n.a,i=n.b,o=n.c,s=n.d,l=n.tx,c=n.ty,d=this.vertexData,f=t.trim,h=t.orig,p=this._anchor;let g=0,v=0,y=0,S=0;if(f?(v=f.x-p._x*h.width,g=v+f.width,S=f.y-p._y*h.height,y=S+f.height):(v=-p._x*h.width,g=v+h.width,S=-p._y*h.height,y=S+h.height),d[0]=r*v+o*S+l,d[1]=s*S+i*v+c,d[2]=r*g+o*S+l,d[3]=s*S+i*g+c,d[4]=r*g+o*y+l,d[5]=s*y+i*g+c,d[6]=r*v+o*y+l,d[7]=s*y+i*v+c,this._roundPixels){const _=tt.RESOLUTION;for(let b=0;b=i&&Eb.x=o&&Eb.y=Gr.HIGH?this.multisample=Gr.HIGH:n>=Gr.MEDIUM?this.multisample=Gr.MEDIUM:n>=Gr.LOW?this.multisample=Gr.LOW:this.multisample=Gr.NONE}destroy(){}}hne.extension={type:rt.RendererSystem,name:"_multisample"};bt.add(hne);class Zze{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class pne{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:n,CONTEXT_UID:r}=this,i=t._glBuffers[r]||this.createGLBuffer(t);n.bindBuffer(t.type,i.buffer)}unbind(t){const{gl:n}=this;n.bindBuffer(t,null)}bindBufferBase(t,n){const{gl:r,CONTEXT_UID:i}=this;if(this.boundBufferBases[n]!==t){const o=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[n]=t,r.bindBufferBase(r.UNIFORM_BUFFER,n,o.buffer)}}bindBufferRange(t,n,r){const{gl:i,CONTEXT_UID:o}=this;r=r||0;const s=t._glBuffers[o]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,n||0,s.buffer,r*256,256)}update(t){const{gl:n,CONTEXT_UID:r}=this,i=t._glBuffers[r]||this.createGLBuffer(t);if(t._updateID!==i.updateID)if(i.updateID=t._updateID,n.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)n.bufferSubData(t.type,0,t.data);else{const o=t.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,n.bufferData(t.type,t.data,o)}}dispose(t,n){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const r=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),r&&(n||i.deleteBuffer(r.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const n=Object.keys(this.managedBuffers);for(let r=0;rr.resource).filter(r=>r).map(r=>r.load());return this._load=Promise.all(n).then(()=>{const{realWidth:r,realHeight:i}=this.items[0];return this.resize(r,i),Promise.resolve(this)}),this._load}}class eje extends gne{constructor(t,n){const{width:r,height:i}=n||{};let o,s;Array.isArray(t)?(o=t,s=t.length):s=t,super(s,{width:r,height:i}),o&&this.initFromArray(o,n)}addBaseTextureAt(t,n){if(t.resource)this.addResourceAt(t.resource,n);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=ng.TEXTURE_2D_ARRAY}upload(t,n,r){const{length:i,itemDirtyIds:o,items:s}=this,{gl:l}=t;r.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,r.internalFormat,this._width,this._height,i,0,n.format,r.type,null);for(let c=0;c0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=ng.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,n){const r=this.itemDirtyIds;for(let i=0;i{if(this.url===null){t(this);return}try{const r=await tt.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await r.blob();if(this.destroyed)return;const o=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===yl.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=o,this.update(),t(this)}catch(r){if(this.destroyed)return;n(r),this.onError.emit(r)}}),this._load)}upload(t,n,r){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(n.alphaMode=this.alphaMode),super.upload(t,n,r)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return jm._EMPTY=jm._EMPTY??tt.ADAPTER.createCanvas(0,0),jm._EMPTY}}const US=class extends Ud{constructor(e,t){t=t||{},super(tt.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},US.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;Ud.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,n=e.height;if(!t||!n)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let r=t*this.scale,i=n*this.scale;(this._overrideWidth||this._overrideHeight)&&(r=this._overrideWidth||this._overrideHeight/n*t,i=this._overrideHeight||this._overrideWidth/t*n),r=Math.round(r),i=Math.round(i);const o=this.source;o.width=r,o.height=i,o._pixiId=`canvas_${Ep()}`,o.getContext("2d").drawImage(e,0,0,t,n,0,0,r,i),this._resolve(),this._resolve=null}}static getSize(e){const t=US.SVG_SIZE.exec(e),n={};return t&&(n[t[1]]=Math.round(parseFloat(t[3])),n[t[5]]=Math.round(parseFloat(t[7]))),n}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&US.SVG_XML.test(e)}};let T1=US;T1.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const D3=class extends Ud{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const n=document.createElement("video");n.setAttribute("preload","auto"),n.setAttribute("webkit-playsinline",""),n.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const r=e[0].src||e[0];Ud.crossOrigin(n,r,t.crossorigin);for(let i=0;i{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Xr.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Xr.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(Xr.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Xr.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Xr.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||D3.TYPES.includes(t)}};let Ej=D3;Ej.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];Ej.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};k3.push(jm,Hte,tje,Ej,T1,mw,vne,eje);class bC{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?Kt.EMPTY:(t=t||new Kt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,n){const{a:r,b:i,c:o,d:s,tx:l,ty:c}=t,d=r*n.x+o*n.y+l,f=i*n.x+s*n.y+c;this.minX=Math.min(this.minX,d),this.maxX=Math.max(this.maxX,d),this.minY=Math.min(this.minY,f),this.maxY=Math.max(this.maxY,f)}addQuad(t){let n=this.minX,r=this.minY,i=this.maxX,o=this.maxY,s=t[0],l=t[1];n=si?s:i,o=l>o?l:o,s=t[2],l=t[3],n=si?s:i,o=l>o?l:o,s=t[4],l=t[5],n=si?s:i,o=l>o?l:o,s=t[6],l=t[7],n=si?s:i,o=l>o?l:o,this.minX=n,this.minY=r,this.maxX=i,this.maxY=o}addFrame(t,n,r,i,o){this.addFrameMatrix(t.worldTransform,n,r,i,o)}addFrameMatrix(t,n,r,i,o){const s=t.a,l=t.b,c=t.c,d=t.d,f=t.tx,h=t.ty;let p=this.minX,g=this.minY,v=this.maxX,y=this.maxY,S=s*n+c*r+f,_=l*n+d*r+h;p=Sv?S:v,y=_>y?_:y,S=s*i+c*r+f,_=l*i+d*r+h,p=Sv?S:v,y=_>y?_:y,S=s*n+c*o+f,_=l*n+d*o+h,p=Sv?S:v,y=_>y?_:y,S=s*i+c*o+f,_=l*i+d*o+h,p=Sv?S:v,y=_>y?_:y,this.minX=p,this.minY=g,this.maxX=v,this.maxY=y}addVertexData(t,n,r){let i=this.minX,o=this.minY,s=this.maxX,l=this.maxY;for(let c=n;cs?d:s,l=f>l?f:l}this.minX=i,this.minY=o,this.maxX=s,this.maxY=l}addVertices(t,n,r,i){this.addVerticesMatrix(t.worldTransform,n,r,i)}addVerticesMatrix(t,n,r,i,o=0,s=o){const l=t.a,c=t.b,d=t.c,f=t.d,h=t.tx,p=t.ty;let g=this.minX,v=this.minY,y=this.maxX,S=this.maxY;for(let _=r;_i?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,n){const r=t.minX>n.minX?t.minX:n.minX,i=t.minY>n.minY?t.minY:n.minY,o=t.maxXd?o:d,this.maxY=s>f?s:f}}addBoundsMatrix(t,n){this.addFrameMatrix(n,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,n){const r=t.minX>n.x?t.minX:n.x,i=t.minY>n.y?t.minY:n.y,o=t.maxXd?o:d,this.maxY=s>f?s:f}}pad(t=0,n=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=n,this.maxY+=n)}addFramePad(t,n,r,i,o,s){t-=o,n-=s,r+=o,i+=s,this.minX=this.minXr?this.maxX:r,this.minY=this.minYi?this.maxY:i}}class Pr extends hw{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Sj,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new bC,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const n=Object.keys(t);for(let r=0;r1)for(let t=0;tthis.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const n=this.getChildIndex(e),r=this.getChildIndex(t);this.children[n]=t,this.children[r]=e,this.onChildrenChange(n=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const n=this.getChildIndex(e);sg(this.children,n,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t0&&i<=r){o=this.children.splice(n,i);for(let s=0;s1&&this.children.sort(ije),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e0&&t.height>0))return;let n,r;this.cullArea?(n=this.cullArea,r=this.worldTransform):this._render!==L3.prototype._render&&(n=this.getBounds(!0));const i=e.projection.transform;if(i&&(r?(r=rje.copyFrom(r),r.prepend(i)):r=i),n&&t.intersects(n,r))this._render(e);else if(this.cullArea)return;for(let o=0,s=this.children.length;ot in e?oje(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Se=(e,t,n)=>(sje(e,typeof t!="symbol"?t+"":t,n),n);let xa=class{constructor(t){Se(this,"parent"),Se(this,"paused"),this.parent=t,this.paused=!1}destroy(){}down(t){return!1}move(t){return!1}up(t){return!1}wheel(t){return!1}update(t){}resize(){}reset(){}pause(){this.paused=!0}resume(){this.paused=!1}};var aje=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},yne={exports:{}};(function(e,t){(function(){var n,r;r=function(i){return e.exports=i},n={linear:function(i,o,s,l){return s*i/l+o},easeInQuad:function(i,o,s,l){return s*(i/=l)*i+o},easeOutQuad:function(i,o,s,l){return-s*(i/=l)*(i-2)+o},easeInOutQuad:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i+o:-s/2*(--i*(i-2)-1)+o},easeInCubic:function(i,o,s,l){return s*(i/=l)*i*i+o},easeOutCubic:function(i,o,s,l){return s*((i=i/l-1)*i*i+1)+o},easeInOutCubic:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i+o:s/2*((i-=2)*i*i+2)+o},easeInQuart:function(i,o,s,l){return s*(i/=l)*i*i*i+o},easeOutQuart:function(i,o,s,l){return-s*((i=i/l-1)*i*i*i-1)+o},easeInOutQuart:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i+o:-s/2*((i-=2)*i*i*i-2)+o},easeInQuint:function(i,o,s,l){return s*(i/=l)*i*i*i*i+o},easeOutQuint:function(i,o,s,l){return s*((i=i/l-1)*i*i*i*i+1)+o},easeInOutQuint:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i*i+o:s/2*((i-=2)*i*i*i*i+2)+o},easeInSine:function(i,o,s,l){return-s*Math.cos(i/l*(Math.PI/2))+s+o},easeOutSine:function(i,o,s,l){return s*Math.sin(i/l*(Math.PI/2))+o},easeInOutSine:function(i,o,s,l){return-s/2*(Math.cos(Math.PI*i/l)-1)+o},easeInExpo:function(i,o,s,l){return i===0?o:s*Math.pow(2,10*(i/l-1))+o},easeOutExpo:function(i,o,s,l){return i===l?o+s:s*(-Math.pow(2,-10*i/l)+1)+o},easeInOutExpo:function(i,o,s,l){return(i/=l/2)<1?s/2*Math.pow(2,10*(i-1))+o:s/2*(-Math.pow(2,-10*--i)+2)+o},easeInCirc:function(i,o,s,l){return-s*(Math.sqrt(1-(i/=l)*i)-1)+o},easeOutCirc:function(i,o,s,l){return s*Math.sqrt(1-(i=i/l-1)*i)+o},easeInOutCirc:function(i,o,s,l){return(i/=l/2)<1?-s/2*(Math.sqrt(1-i*i)-1)+o:s/2*(Math.sqrt(1-(i-=2)*i)+1)+o},easeInElastic:function(i,o,s,l){var c,d,f;return f=1.70158,d=0,c=s,i===0||(i/=l),d||(d=l*.3),c=this.options.time){const r=this.parent.width,i=this.parent.height;this.complete(),(r!==this.parent.width||i!==this.parent.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}else{const r=this.options.ease(this.time,0,1,this.options.time);if(this.width!==null){const i=this.startWidth,o=this.deltaWidth;this.parent.fitWidth(i+o*r,this.keepCenter,this.height===null)}if(this.height!==null){const i=this.startHeight,o=this.deltaHeight;this.parent.fitHeight(i+o*r,this.keepCenter,this.width===null)}if(this.width===null?this.parent.scale.x=this.parent.scale.y:this.height===null&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){const i=this.startX,o=this.startY,s=this.deltaX,l=this.deltaY,c=new Ot(this.parent.x,this.parent.y);this.parent.moveCenter(i+s*r,o+l*r),this.parent.emit("moved",{viewport:this.parent,original:c,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}}};const uje={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};let dje=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"left"),Se(this,"top"),Se(this,"right"),Se(this,"bottom"),Se(this,"underflowX"),Se(this,"underflowY"),Se(this,"ease"),Se(this,"toX"),Se(this,"toY"),this.options=Object.assign({},uje,n),this.ease=Hk(this.options.ease,"easeInOutSine"),this.options.sides?this.options.sides==="all"?this.top=this.bottom=this.left=this.right=!0:this.options.sides==="horizontal"?(this.right=this.left=!0,this.top=this.bottom=!1):this.options.sides==="vertical"?(this.left=this.right=!1,this.top=this.bottom=!0):(this.top=this.options.sides.indexOf("top")!==-1,this.bottom=this.options.sides.indexOf("bottom")!==-1,this.left=this.options.sides.indexOf("left")!==-1,this.right=this.options.sides.indexOf("right")!==-1):this.left=this.top=this.right=this.bottom=!1;const r=this.options.underflow.toLowerCase();r==="center"?(this.underflowX=0,this.underflowY=0):(this.underflowX=r.indexOf("left")!==-1?-1:r.indexOf("right")!==-1?1:0,this.underflowY=r.indexOf("top")!==-1?-1:r.indexOf("bottom")!==-1?1:0),this.reset()}isActive(){return this.toX!==null||this.toY!==null}down(){return this.toX=this.toY=null,!1}up(){return this.bounce(),!1}update(t){if(!this.paused){if(this.bounce(),this.toX){const n=this.toX;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),n.time>=this.options.time?(this.parent.x=n.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(n.time,n.start,n.delta,this.options.time)}if(this.toY){const n=this.toY;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),n.time>=this.options.time?(this.parent.y=n.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(n.time,n.start,n.delta,this.options.time)}}}calcUnderflowX(){let t;switch(this.underflowX){case-1:t=0;break;case 1:t=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:t=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return t}calcUnderflowY(){let t;switch(this.underflowY){case-1:t=0;break;case 1:t=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:t=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return t}oob(){const t=this.options.bounceBox;if(t){const n=typeof t.x>"u"?0:t.x,r=typeof t.y>"u"?0:t.y,i=typeof t.width>"u"?this.parent.worldWidth:t.width,o=typeof t.height>"u"?this.parent.worldHeight:t.height;return{left:this.parent.lefti,top:this.parent.topo,topLeft:new Ot(n*this.parent.scale.x,r*this.parent.scale.y),bottomRight:new Ot(i*this.parent.scale.x-this.parent.screenWidth,o*this.parent.scale.y-this.parent.screenHeight)}}return{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new Ot(0,0),bottomRight:new Ot(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}bounce(){var t,n;if(this.paused)return;let r,i=this.parent.plugins.get("decelerate",!0);i&&(i.x||i.y)&&(i.x&&i.percentChangeX===((t=i.options)==null?void 0:t.friction)||i.y&&i.percentChangeY===((n=i.options)==null?void 0:n.friction))&&(r=this.oob(),(r.left&&this.left||r.right&&this.right)&&(i.percentChangeX=this.options.friction),(r.top&&this.top||r.bottom&&this.bottom)&&(i.percentChangeY=this.options.friction));const o=this.parent.plugins.get("drag",!0)||{},s=this.parent.plugins.get("pinch",!0)||{};if(i=i||{},!(o!=null&&o.active)&&!(s!=null&&s.active)&&(!this.toX||!this.toY)&&(!i.x||!i.y)){r=r||this.oob();const l=r.topLeft,c=r.bottomRight;if(!this.toX&&!i.x){let d=null;r.left&&this.left?d=this.parent.screenWorldWidth(this.options.right===!0?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(this.options.right===!0?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,n.x=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(this.options.top!==null||this.options.bottom!==null){let r=!1;if(!this.noUnderflow&&this.parent.screenWorldHeight(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,n.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}reset(){this.update()}};const pje={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};let mje=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),this.options=Object.assign({},pje,n),this.clamp()}resize(){this.clamp()}clamp(){if(!this.paused){if(this.options.minWidth||this.options.minHeight||this.options.maxWidth||this.options.maxHeight){let t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight;if(this.options.minWidth!==null&&tthis.options.maxWidth){const r=this.parent.scale.x;this.parent.fitWidth(this.options.maxWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(this.options.minHeight!==null&&nthis.options.maxHeight){const r=this.parent.scale.y;this.parent.fitHeight(this.options.maxHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/r,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}}else if(this.options.minScale||this.options.maxScale){const t={x:null,y:null},n={x:null,y:null};if(typeof this.options.minScale=="number")t.x=this.options.minScale,t.y=this.options.minScale;else if(this.options.minScale!==null){const o=this.options.minScale;t.x=typeof o.x>"u"?null:o.x,t.y=typeof o.y>"u"?null:o.y}if(typeof this.options.maxScale=="number")n.x=this.options.maxScale,n.y=this.options.maxScale;else if(this.options.maxScale!==null){const o=this.options.maxScale;n.x=typeof o.x>"u"?null:o.x,n.y=typeof o.y>"u"?null:o.y}let r=this.parent.scale.x,i=this.parent.scale.y;t.x!==null&&rn.x&&(r=n.x),t.y!==null&&in.y&&(i=n.y),(r!==this.parent.scale.x||i!==this.parent.scale.y)&&(this.parent.scale.set(r,i),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}}reset(){this.clamp()}};const gje={friction:.98,bounce:.8,minSpeed:.01},Wu=16;let vje=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"x"),Se(this,"y"),Se(this,"percentChangeX"),Se(this,"percentChangeY"),Se(this,"saved"),Se(this,"timeSinceRelease"),this.options=Object.assign({},gje,n),this.saved=[],this.timeSinceRelease=0,this.reset(),this.parent.on("moved",r=>this.handleMoved(r))}down(){return this.saved=[],this.x=this.y=null,!1}isActive(){return!!(this.x||this.y)}move(){if(this.paused)return!1;const t=this.parent.input.count();return(t===1||t>1&&!this.parent.plugins.get("pinch",!0))&&(this.saved.push({x:this.parent.x,y:this.parent.y,time:performance.now()}),this.saved.length>60&&this.saved.splice(0,30)),!1}handleMoved(t){if(this.saved.length){const n=this.saved[this.saved.length-1];t.type==="clamp-x"&&t.original?n.x===t.original.x&&(n.x=this.parent.x):t.type==="clamp-y"&&t.original&&n.y===t.original.y&&(n.y=this.parent.y)}}up(){if(this.parent.input.count()===0&&this.saved.length){const t=performance.now();for(const n of this.saved)if(n.time>=t-100){const r=t-n.time;this.x=(this.parent.x-n.x)/r,this.y=(this.parent.y-n.y)/r,this.percentChangeX=this.percentChangeY=this.options.friction,this.timeSinceRelease=0;break}}return!1}activate(t){t=t||{},typeof t.x<"u"&&(this.x=t.x,this.percentChangeX=this.options.friction),typeof t.y<"u"&&(this.y=t.y,this.percentChangeY=this.options.friction)}update(t){if(this.paused)return;const n=this.x||this.y,r=this.timeSinceRelease,i=this.timeSinceRelease+t;if(this.x){const o=this.percentChangeX,s=Math.log(o);this.parent.x+=this.x*Wu/s*(Math.pow(o,i/Wu)-Math.pow(o,r/Wu)),this.x*=Math.pow(this.percentChangeX,t/Wu)}if(this.y){const o=this.percentChangeY,s=Math.log(o);this.parent.y+=this.y*Wu/s*(Math.pow(o,i/Wu)-Math.pow(o,r/Wu)),this.y*=Math.pow(this.percentChangeY,t/Wu)}this.timeSinceRelease+=t,this.x&&this.y?Math.abs(this.x){t.includes(i.code)&&(this.keyIsPressed=!0)},r=i=>{t.includes(i.code)&&(this.keyIsPressed=!1)};this.addWindowEventHandler("keyup",r),this.addWindowEventHandler("keydown",n)}addWindowEventHandler(t,n){window.addEventListener(t,n),this.windowEventHandlers.push({event:t,handler:n})}destroy(){this.windowEventHandlers.forEach(({event:t,handler:n})=>{window.removeEventListener(t,n)})}mouseButtons(t){!t||t==="all"?this.mouse=[!0,!0,!0]:this.mouse=[t.indexOf("left")!==-1,t.indexOf("middle")!==-1,t.indexOf("right")!==-1]}parseUnderflow(){const t=this.options.underflow.toLowerCase();t==="center"?(this.underflowX=0,this.underflowY=0):(t.includes("left")?this.underflowX=-1:t.includes("right")?this.underflowX=1:this.underflowX=0,t.includes("top")?this.underflowY=-1:t.includes("bottom")?this.underflowY=1:this.underflowY=0)}checkButtons(t){const n=t.pointerType==="mouse",r=this.parent.input.count();return!!((r===1||r>1&&!this.parent.plugins.get("pinch",!0))&&(!n||this.mouse[t.button]))}checkKeyPress(t){return!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&t.data.pointerType==="touch"}down(t){return this.paused||!this.options.pressDrag?!1:this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.global.x,y:t.global.y},this.current=t.pointerId,!0):(this.last=null,!1)}get active(){return this.moved}move(t){if(this.paused||!this.options.pressDrag)return!1;if(this.last&&this.current===t.data.pointerId){const n=t.global.x,r=t.global.y,i=this.parent.input.count();if(i===1||i>1&&!this.parent.plugins.get("pinch",!0)){const o=n-this.last.x,s=r-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(o)||this.yDirection&&this.parent.input.checkThreshold(s)){const l={x:n,y:r};return this.xDirection&&(this.parent.x+=(l.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(l.y-this.last.y)*this.options.factor),this.last=l,this.moved||this.parent.emit("drag-start",{event:t,screen:new Ot(this.last.x,this.last.y),world:this.parent.toWorld(new Ot(this.last.x,this.last.y)),viewport:this.parent}),this.moved=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"}),!0}}else this.moved=!1}return!1}up(t){if(this.paused)return!1;const n=this.parent.input.touches;if(n.length===1){const r=n[0];return r.last&&(this.last={x:r.last.x,y:r.last.y},this.current=r.id),this.moved=!1,!0}else if(this.last&&this.moved){const r=new Ot(this.last.x,this.last.y);return this.parent.emit("drag-end",{event:t,screen:r,world:this.parent.toWorld(r),viewport:this.parent}),this.last=null,this.moved=!1,!0}return!1}wheel(t){if(this.paused)return!1;if(this.options.wheel){const n=this.parent.plugins.get("wheel",!0);if(!n||!n.options.wheelZoom&&!t.ctrlKey){const r=t.deltaMode?this.options.lineHeight:1,i=[t.deltaX,t.deltaY],[o,s]=this.options.wheelSwapAxes?i.reverse():i;return this.xDirection&&(this.parent.x+=o*r*this.options.wheelScroll*this.reverse),this.yDirection&&(this.parent.y+=s*r*this.options.wheelScroll*this.reverse),this.options.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.options.passiveWheel||t.preventDefault(),this.parent.options.stopPropagation&&t.stopPropagation(),!0}}return!1}resume(){this.last=null,this.paused=!1}clamp(){const t=this.parent.plugins.get("decelerate",!0)||{};if(this.options.clampWheel!=="y")if(this.parent.screenWorldWidththis.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,t.x=0);if(this.options.clampWheel!=="x")if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,t.y=0)}};const xje={speed:0,acceleration:null,radius:null};let wje=class extends xa{constructor(t,n,r={}){super(t),Se(this,"options"),Se(this,"target"),Se(this,"velocity"),this.target=n,this.options=Object.assign({},xje,r),this.velocity={x:0,y:0}}update(t){if(this.paused)return;const n=this.parent.center;let r=this.target.x,i=this.target.y;if(this.options.radius)if(Math.sqrt(Math.pow(this.target.y-n.y,2)+Math.pow(this.target.x-n.x,2))>this.options.radius){const l=Math.atan2(this.target.y-n.y,this.target.x-n.x);r=this.target.x-Math.cos(l)*this.options.radius,i=this.target.y-Math.sin(l)*this.options.radius}else return;const o=r-n.x,s=i-n.y;if(o||s)if(this.options.speed)if(this.options.acceleration){const l=Math.atan2(i-n.y,r-n.x),c=Math.sqrt(Math.pow(o,2)+Math.pow(s,2));if(c){const d=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);c>d?this.velocity={x:Math.min(this.velocity.x+(this.options.acceleration*t,this.options.speed)),y:Math.min(this.velocity.y+(this.options.acceleration*t,this.options.speed))}:this.velocity={x:Math.max(this.velocity.x-this.options.acceleration*this.options.speed,0),y:Math.max(this.velocity.y-this.options.acceleration*this.options.speed,0)};const f=Math.cos(l)*this.velocity.x,h=Math.sin(l)*this.velocity.y,p=Math.abs(f)>Math.abs(o)?r:n.x+f,g=Math.abs(h)>Math.abs(s)?i:n.y+h;this.parent.moveCenter(p,g),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{const l=Math.atan2(i-n.y,r-n.x),c=Math.cos(l)*this.options.speed,d=Math.sin(l)*this.options.speed,f=Math.abs(c)>Math.abs(o)?r:n.x+c,h=Math.abs(d)>Math.abs(s)?i:n.y+d;this.parent.moveCenter(f,h),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}else this.parent.moveCenter(r,i),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}};const _je={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};let Sje=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"reverse"),Se(this,"radiusSquared"),Se(this,"left"),Se(this,"top"),Se(this,"right"),Se(this,"bottom"),Se(this,"horizontal"),Se(this,"vertical"),this.options=Object.assign({},_je,n),this.reverse=this.options.reverse?1:-1,this.radiusSquared=typeof this.options.radius=="number"?Math.pow(this.options.radius,2):null,this.resize()}resize(){const t=this.options.distance;t!==null?(this.left=t,this.top=t,this.right=this.parent.screenWidth-t,this.bottom=this.parent.screenHeight-t):this.options.radius||(this.left=this.options.left,this.top=this.options.top,this.right=this.options.right===null?null:this.parent.screenWidth-this.options.right,this.bottom=this.options.bottom===null?null:this.parent.screenHeight-this.options.bottom)}down(){return this.paused||this.options.allowButtons||(this.horizontal=this.vertical=null),!1}move(t){if(this.paused||t.pointerType!=="mouse"&&t.pointerId!==1||!this.options.allowButtons&&t.buttons!==0)return!1;const n=t.global.x,r=t.global.y;if(this.radiusSquared){const i=this.parent.toScreen(this.parent.center);if(Math.pow(i.x-n,2)+Math.pow(i.y-r,2)>=this.radiusSquared){const o=Math.atan2(i.y-r,i.x-n);this.options.linear?(this.horizontal=Math.round(Math.cos(o))*this.options.speed*this.reverse*(60/1e3),this.vertical=Math.round(Math.sin(o))*this.options.speed*this.reverse*(60/1e3)):(this.horizontal=Math.cos(o)*this.options.speed*this.reverse*(60/1e3),this.vertical=Math.sin(o)*this.options.speed*this.reverse*(60/1e3))}else this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0}else this.left!==null&&nthis.right?this.horizontal=-1*this.reverse*this.options.speed*(60/1e3):(this.decelerateHorizontal(),this.horizontal=0),this.top!==null&&rthis.bottom?this.vertical=-1*this.reverse*this.options.speed*(60/1e3):(this.decelerateVertical(),this.vertical=0);return!1}decelerateHorizontal(){const t=this.parent.plugins.get("decelerate",!0);this.horizontal&&t&&!this.options.noDecelerate&&t.activate({x:this.horizontal*this.options.speed*this.reverse/(1e3/60)})}decelerateVertical(){const t=this.parent.plugins.get("decelerate",!0);this.vertical&&t&&!this.options.noDecelerate&&t.activate({y:this.vertical*this.options.speed*this.reverse/(1e3/60)})}up(){return this.paused||(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null),!1}update(){if(!this.paused&&(this.horizontal||this.vertical)){const t=this.parent.center;this.horizontal&&(t.x+=this.horizontal*this.options.speed),this.vertical&&(t.y+=this.vertical*this.options.speed),this.parent.moveCenter(t),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"})}}};const Eje={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};let Cje=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"active",!1),Se(this,"pinching",!1),Se(this,"moved",!1),Se(this,"lastCenter"),this.options=Object.assign({},Eje,n)}down(){return this.parent.input.count()>=2?(this.active=!0,!0):!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}move(t){if(this.paused||!this.active)return!1;const n=t.global.x,r=t.global.y,i=this.parent.input.touches;if(i.length>=2){const o=i[0],s=i[1],l=o.last&&s.last?Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2)):null;if(o.id===t.pointerId?o.last={x:n,y:r,data:t}:s.id===t.pointerId&&(s.last={x:n,y:r,data:t}),l){let c;const d=new Ot(o.last.x+(s.last.x-o.last.x)/2,o.last.y+(s.last.y-o.last.y)/2);this.options.center||(c=this.parent.toLocal(d));let f=Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2));f=f===0?f=1e-10:f;const h=(1-l/f)*this.options.percent*(this.isAxisX()?this.parent.scale.x:this.parent.scale.y);this.isAxisX()&&(this.parent.scale.x+=h),this.isAxisY()&&(this.parent.scale.y+=h),this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:d});const p=this.parent.plugins.get("clamp-zoom",!0);if(p&&p.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const g=this.parent.toGlobal(c);this.parent.x+=(d.x-g.x)*this.options.factor,this.parent.y+=(d.y-g.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(d.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(d.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=d,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}return!1}up(){return this.pinching&&this.parent.input.touches.length<=1?(this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0):!1}};const Tje={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};let kje=class extends xa{constructor(t,n,r,i={}){super(t),Se(this,"options"),Se(this,"ease"),Se(this,"x"),Se(this,"y"),Se(this,"percent"),Se(this,"snapping"),Se(this,"deltaX"),Se(this,"deltaY"),Se(this,"startX"),Se(this,"startY"),this.options=Object.assign({},Tje,i),this.ease=Hk(i.ease,"easeInOutSine"),this.x=n,this.y=r,this.options.forceStart&&this.snapStart()}snapStart(){this.percent=0,this.snapping={time:0};const t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null),!1}up(){if(this.parent.input.count()===0){const t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}return!1}update(t){if(!this.paused&&!(this.options.interrupt&&this.parent.input.count()!==0))if(this.snapping){const n=this.snapping;n.time+=t;let r,i,o;const s=this.startX,l=this.startY,c=this.deltaX,d=this.deltaY;if(n.time>this.options.time)r=!0,i=s+c,o=l+d;else{const f=this.ease(n.time,0,1,this.options.time);i=s+c*f,o=l+d*f}this.options.topLeft?this.parent.moveCorner(i,o):this.parent.moveCenter(i,o),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),r&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{const n=this.options.topLeft?this.parent.corner:this.parent.center;(n.x!==this.x||n.y!==this.y)&&this.snapStart()}}};const Aje={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};let Rje=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"ease"),Se(this,"xScale"),Se(this,"yScale"),Se(this,"xIndependent"),Se(this,"yIndependent"),Se(this,"snapping"),this.options=Object.assign({},Aje,n),this.ease=Hk(this.options.ease),this.xIndependent=!1,this.yIndependent=!1,this.xScale=0,this.yScale=0,this.options.width>0&&(this.xScale=t.screenWidth/this.options.width,this.xIndependent=!0),this.options.height>0&&(this.yScale=t.screenHeight/this.options.height,this.yIndependent=!0),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale,this.options.time===0?(t.container.scale.x=this.xScale,t.container.scale.y=this.yScale,this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom")):n.forceStart&&this.createSnapping()}createSnapping(){const t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight,r=this.parent.screenWidth/this.xScale,i=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:n,deltaX:r-t,deltaY:i-n},this.parent.emit("snap-zoom-start",this.parent)}resize(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null),!1}update(t){if(this.paused||this.options.interrupt&&this.parent.input.count()!==0)return;let n;if(!this.options.center&&!this.options.noMove&&(n=this.parent.center),!this.snapping)(this.parent.scale.x!==this.xScale||this.parent.scale.y!==this.yScale)&&this.createSnapping();else if(this.snapping){const r=this.snapping;if(r.time+=t,r.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{const o=this.snapping,s=this.ease(o.time,o.startX,o.deltaX,this.options.time),l=this.ease(o.time,o.startY,o.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/s,this.parent.scale.y=this.parent.screenHeight/l}const i=this.parent.plugins.get("clamp-zoom",!0);i&&i.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(n))}}resume(){this.snapping=null,super.resume()}};const Ije={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};let Pje=class extends xa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"smoothing"),Se(this,"smoothingCenter"),Se(this,"smoothingCount"),Se(this,"keyIsPressed"),this.options=Object.assign({},Ije,n),this.keyIsPressed=!1,this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){window.addEventListener("keydown",n=>{t.includes(n.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",n=>{t.includes(n.code)&&(this.keyIsPressed=!1)})}checkKeyPress(){return!this.options.keyToPress||this.keyIsPressed}down(){return this.options.interrupt&&(this.smoothing=null),!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}update(){if(this.smoothing){const t=this.smoothingCenter,n=this.smoothing;let r;this.options.center||(r=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x+=n.x),this.isAxisY()&&(this.parent.scale.y+=n.y),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const i=this.parent.plugins.get("clamp-zoom",!0);if(i&&i.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const o=this.parent.toGlobal(r);this.parent.x+=t.x-o.x,this.parent.y+=t.y-o.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}pinch(t){if(this.paused)return;const n=this.parent.input.getPointerPosition(t),r=-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/200,i=Math.pow(2,(1+this.options.percent)*r);let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const l=this.parent.toGlobal(o);this.parent.x+=n.x-l.x,this.parent.y+=n.y-l.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}wheel(t){if(this.paused||!this.checkKeyPress())return!1;if(t.ctrlKey&&this.options.trackpadPinch)this.pinch(t);else if(this.options.wheelZoom){const n=this.parent.input.getPointerPosition(t),r=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,i=Math.pow(2,(1+this.options.percent)*r);if(this.options.smooth){const o={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+o.x)*i-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+o.y)*i-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=n}else{let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const l=this.parent.toGlobal(o);this.parent.x+=n.x-l.x,this.parent.y+=n.y-l.y}}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}return!this.parent.options.passiveWheel}},Oje=class{constructor(t){Se(this,"viewport"),Se(this,"clickedAvailable"),Se(this,"isMouseDown"),Se(this,"last"),Se(this,"wheelFunction"),Se(this,"touches"),this.viewport=t,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new Kt(0,0,this.viewport.worldWidth,this.viewport.worldHeight)),this.viewport.on("pointerdown",this.down,this),this.viewport.options.allowPreserveDragOutside?this.viewport.on("globalpointermove",this.move,this):this.viewport.on("pointermove",this.move,this),this.viewport.on("pointerup",this.up,this),this.viewport.on("pointerupoutside",this.up,this),this.viewport.on("pointercancel",this.up,this),this.viewport.options.allowPreserveDragOutside||this.viewport.on("pointerleave",this.up,this),this.wheelFunction=t=>this.handleWheel(t),this.viewport.options.events.domElement.addEventListener("wheel",this.wheelFunction,{passive:this.viewport.options.passiveWheel}),this.isMouseDown=!1}destroy(){this.viewport.options.events.domElement.removeEventListener("wheel",this.wheelFunction)}down(t){if(!(this.viewport.pause||!this.viewport.worldVisible)){if(t.pointerType==="mouse"?this.isMouseDown=!0:this.get(t.pointerId)||this.touches.push({id:t.pointerId,last:null}),this.count()===1){this.last=t.global.clone();const n=this.viewport.plugins.get("decelerate",!0),r=this.viewport.plugins.get("bounce",!0);(!n||!n.isActive())&&(!r||!r.isActive())?this.clickedAvailable=!0:this.clickedAvailable=!1}else this.clickedAvailable=!1;this.viewport.plugins.down(t)&&this.viewport.options.stopPropagation&&t.stopPropagation()}}clear(){this.isMouseDown=!1,this.touches=[],this.last=null}checkThreshold(t){return Math.abs(t)>=this.viewport.threshold}move(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const n=this.viewport.plugins.move(t);if(this.clickedAvailable&&this.last){const r=t.global.x-this.last.x,i=t.global.y-this.last.y;(this.checkThreshold(r)||this.checkThreshold(i))&&(this.clickedAvailable=!1)}n&&this.viewport.options.stopPropagation&&t.stopPropagation()}up(t){if(this.viewport.pause||!this.viewport.worldVisible)return;t.pointerType==="mouse"&&(this.isMouseDown=!1),t.pointerType!=="mouse"&&this.remove(t.pointerId);const n=this.viewport.plugins.up(t);this.clickedAvailable&&this.count()===0&&this.last&&(this.viewport.emit("clicked",{event:t,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this.viewport}),this.clickedAvailable=!1),n&&this.viewport.options.stopPropagation&&t.stopPropagation()}getPointerPosition(t){const n=new Ot;return this.viewport.options.events.mapPositionToPoint(n,t.clientX,t.clientY),n}handleWheel(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const n=this.viewport.toLocal(this.getPointerPosition(t));this.viewport.left<=n.x&&n.x<=this.viewport.right&&this.viewport.top<=n.y&&n.y<=this.viewport.bottom&&this.viewport.plugins.wheel(t)&&!this.viewport.options.passiveWheel&&t.preventDefault()}pause(){this.touches=[],this.isMouseDown=!1}get(t){for(const n of this.touches)if(n.id===t)return n;return null}remove(t){for(let n=0;n{t.destroy()}),this.plugins={},this.sort()}remove(t){var n;this.plugins[t]&&((n=this.plugins[t])==null||n.destroy(),delete this.plugins[t],this.viewport.emit("plugin-remove",t),this.sort())}pause(t){var n;(n=this.plugins[t])==null||n.pause()}resume(t){var n;(n=this.plugins[t])==null||n.resume()}sort(){this.list=[];for(const t of Sb)this.plugins[t]&&this.list.push(this.plugins[t])}down(t){let n=!1;for(const r of this.list)r.down(t)&&(n=!0);return n}move(t){let n=!1;for(const r of this.viewport.plugins.list)r.move(t)&&(n=!0);return n}up(t){let n=!1;for(const r of this.list)r.up(t)&&(n=!0);return n}wheel(t){let n=!1;for(const r of this.list)r.wheel(t)&&(n=!0);return n}};const Dje={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,disableOnContextMenu:!1,ticker:Xr.shared,allowPreserveDragOutside:!1};class Lje extends Ko{constructor(t){super(),Se(this,"moving"),Se(this,"screenWidth"),Se(this,"screenHeight"),Se(this,"threshold"),Se(this,"input"),Se(this,"plugins"),Se(this,"zooming"),Se(this,"lastViewport"),Se(this,"options"),Se(this,"_dirty"),Se(this,"_forceHitArea"),Se(this,"_hitAreaDefault"),Se(this,"_pause"),Se(this,"tickerFunction"),Se(this,"_worldWidth"),Se(this,"_worldHeight"),Se(this,"_disableOnContextMenu",n=>n.preventDefault()),this.options={...Dje,...t},this.screenWidth=this.options.screenWidth,this.screenHeight=this.options.screenHeight,this._worldWidth=this.options.worldWidth,this._worldHeight=this.options.worldHeight,this.forceHitArea=this.options.forceHitArea,this.threshold=this.options.threshold,this.options.disableOnContextMenu&&this.options.events.domElement.addEventListener("contextmenu",this._disableOnContextMenu),this.options.noTicker||(this.tickerFunction=()=>this.update(this.options.ticker.elapsedMS),this.options.ticker.add(this.tickerFunction)),this.input=new Oje(this),this.plugins=new Mje(this)}destroy(t){!this.options.noTicker&&this.tickerFunction&&this.options.ticker.remove(this.tickerFunction),this.options.disableOnContextMenu&&this.options.events.domElement.removeEventListener("contextmenu",this._disableOnContextMenu),this.input.destroy(),super.destroy(t)}update(t){this.pause||(this.plugins.update(t),this.lastViewport&&(this.lastViewport.x!==this.x||this.lastViewport.y!==this.y?this.moving=!0:this.moving&&(this.emit("moved-end",this),this.moving=!1),this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y?this.zooming=!0:this.zooming&&(this.emit("zoomed-end",this),this.zooming=!1)),this.forceHitArea||(this._hitAreaDefault=new Kt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight),this.hitArea=this._hitAreaDefault),this._dirty=this._dirty||!this.lastViewport||this.lastViewport.x!==this.x||this.lastViewport.y!==this.y||this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y,this.lastViewport={x:this.x,y:this.y,scaleX:this.scale.x,scaleY:this.scale.y},this.emit("frame-end",this))}resize(t=window.innerWidth,n=window.innerHeight,r,i){this.screenWidth=t,this.screenHeight=n,typeof r<"u"&&(this._worldWidth=r),typeof i<"u"&&(this._worldHeight=i),this.plugins.resize(),this.dirty=!0}get worldWidth(){return this._worldWidth?this._worldWidth:this.width/this.scale.x}set worldWidth(t){this._worldWidth=t,this.plugins.resize()}get worldHeight(){return this._worldHeight?this._worldHeight:this.height/this.scale.y}set worldHeight(t){this._worldHeight=t,this.plugins.resize()}getVisibleBounds(){return new Kt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(t,n){return arguments.length===2?this.toLocal(new Ot(t,n)):this.toLocal(t)}toScreen(t,n){return arguments.length===2?this.toGlobal(new Ot(t,n)):this.toGlobal(t)}get worldScreenWidth(){return this.screenWidth/this.scale.x}get worldScreenHeight(){return this.screenHeight/this.scale.y}get screenWorldWidth(){return this.worldWidth*this.scale.x}get screenWorldHeight(){return this.worldHeight*this.scale.y}get center(){return new Ot(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)}set center(t){this.moveCenter(t)}moveCenter(...t){let n,r;typeof t[0]=="number"?(n=t[0],r=t[1]):(n=t[0].x,r=t[0].y);const i=(this.worldScreenWidth/2-n)*this.scale.x,o=(this.worldScreenHeight/2-r)*this.scale.y;return(this.x!==i||this.y!==o)&&(this.position.set(i,o),this.plugins.reset(),this.dirty=!0),this}get corner(){return new Ot(-this.x/this.scale.x,-this.y/this.scale.y)}set corner(t){this.moveCorner(t)}moveCorner(...t){let n,r;return t.length===1?(n=-t[0].x*this.scale.x,r=-t[0].y*this.scale.y):(n=-t[0]*this.scale.x,r=-t[1]*this.scale.y),(n!==this.x||r!==this.y)&&(this.position.set(n,r),this.plugins.reset(),this.dirty=!0),this}get screenWidthInWorldPixels(){return this.screenWidth/this.scale.x}get screenHeightInWorldPixels(){return this.screenHeight/this.scale.y}findFitWidth(t){return this.screenWidth/t}findFitHeight(t){return this.screenHeight/t}findFit(t,n){const r=this.screenWidth/t,i=this.screenHeight/n;return Math.min(r,i)}findCover(t,n){const r=this.screenWidth/t,i=this.screenHeight/n;return Math.max(r,i)}fitWidth(t=this.worldWidth,n,r=!0,i){let o;n&&(o=this.center),this.scale.x=this.screenWidth/t,r&&(this.scale.y=this.scale.x);const s=this.plugins.get("clamp-zoom",!0);return!i&&s&&s.clamp(),n&&o&&this.moveCenter(o),this}fitHeight(t=this.worldHeight,n,r=!0,i){let o;n&&(o=this.center),this.scale.y=this.screenHeight/t,r&&(this.scale.x=this.scale.y);const s=this.plugins.get("clamp-zoom",!0);return!i&&s&&s.clamp(),n&&o&&this.moveCenter(o),this}fitWorld(t){let n;t&&(n=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.xthis.worldWidth,top:this.top<0,bottom:this.bottom>this.worldHeight,cornerPoint:new Ot(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}get right(){return-this.x/this.scale.x+this.worldScreenWidth}set right(t){this.x=-t*this.scale.x+this.screenWidth,this.plugins.reset()}get left(){return-this.x/this.scale.x}set left(t){this.x=-t*this.scale.x,this.plugins.reset()}get top(){return-this.y/this.scale.y}set top(t){this.y=-t*this.scale.y,this.plugins.reset()}get bottom(){return-this.y/this.scale.y+this.worldScreenHeight}set bottom(t){this.y=-t*this.scale.y+this.screenHeight,this.plugins.reset()}get dirty(){return!!this._dirty}set dirty(t){this._dirty=t}get forceHitArea(){return this._forceHitArea}set forceHitArea(t){t?(this._forceHitArea=t,this.hitArea=t):(this._forceHitArea=null,this.hitArea=new Kt(0,0,this.worldWidth,this.worldHeight))}drag(t){return this.plugins.add("drag",new bje(this,t)),this}clamp(t){return this.plugins.add("clamp",new hje(this,t)),this}decelerate(t){return this.plugins.add("decelerate",new vje(this,t)),this}bounce(t){return this.plugins.add("bounce",new dje(this,t)),this}pinch(t){return this.plugins.add("pinch",new Cje(this,t)),this}snap(t,n,r){return this.plugins.add("snap",new kje(this,t,n,r)),this}follow(t,n){return this.plugins.add("follow",new wje(this,t,n)),this}wheel(t){return this.plugins.add("wheel",new Pje(this,t)),this}animate(t){return this.plugins.add("animate",new cje(this,t)),this}clampZoom(t){return this.plugins.add("clamp-zoom",new mje(this,t)),this}mouseEdges(t){return this.plugins.add("mouse-edges",new Sje(this,t)),this}get pause(){return!!this._pause}set pause(t){this._pause=t,this.lastViewport=null,this.moving=!1,this.zooming=!1,t&&this.input.pause()}ensureVisible(t,n,r,i,o){o&&(r>this.worldScreenWidth||i>this.worldScreenHeight)&&(this.fit(!0,r,i),this.emit("zoomed",{viewport:this,type:"ensureVisible"}));let s=!1;tthis.right&&(this.right=t+r,s=!0),nthis.bottom&&(this.bottom=n+i,s=!0),s&&this.emit("moved",{viewport:this,type:"ensureVisible"})}}const Eb=new Ot,Nje=new Uint16Array([0,1,2,0,2,3]);class jp extends Ko{constructor(t){super(),this._anchor=new md(this._onAnchorUpdate,this,t?t.defaultAnchor.x:0,t?t.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new zn(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=Mt.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=t||ht.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=Nje,this.pluginName="batch",this.isSprite=!0,this._roundPixels=tt.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=pd(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=pd(this.scale.y)*this._height/this._texture.orig.height)}_onAnchorUpdate(){this._transformID=-1,this._transformTrimmedID=-1}calculateVertices(){const t=this._texture;if(this._transformID===this.transform._worldID&&this._textureID===t._updateID)return;this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;const n=this.transform.worldTransform,r=n.a,i=n.b,o=n.c,s=n.d,l=n.tx,c=n.ty,d=this.vertexData,f=t.trim,h=t.orig,p=this._anchor;let g=0,v=0,y=0,S=0;if(f?(v=f.x-p._x*h.width,g=v+f.width,S=f.y-p._y*h.height,y=S+f.height):(v=-p._x*h.width,g=v+h.width,S=-p._y*h.height,y=S+h.height),d[0]=r*v+o*S+l,d[1]=s*S+i*v+c,d[2]=r*g+o*S+l,d[3]=s*S+i*g+c,d[4]=r*g+o*y+l,d[5]=s*y+i*g+c,d[6]=r*v+o*y+l,d[7]=s*y+i*v+c,this._roundPixels){const _=tt.RESOLUTION;for(let b=0;b=i&&Eb.x=o&&Eb.y=n&&(s=e-l-1),c=c.replace("%value%",t[s].toString()),i+=c,i+=` -`}return r=r.replace("%blur%",i),r=r.replace("%size%",e.toString()),r}const Uje=` +`;class Fje extends Wi{constructor(t=1){super(Jze,$je,{uAlpha:1}),this.alpha=t}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}}const zje={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},jje=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(` +`);function Uje(e){const t=zje[e],n=t.length;let r=jje,i="";const o="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let s;for(let l=0;l=n&&(s=e-l-1),c=c.replace("%value%",t[s].toString()),i+=c,i+=` +`}return r=r.replace("%blur%",i),r=r.replace("%size%",e.toString()),r}const Hje=` attribute vec2 aVertexPosition; uniform mat3 projectionMatrix; @@ -1173,8 +1173,8 @@ void main(void) vec2 textureCoord = filterTextureCoord(); %blur% - }`;function Hje(e,t){const n=Math.ceil(e/2);let r=Uje,i="",o;t?o="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":o="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let s=0;s{Object.defineProperty(v7,e,{get(){return cn("7.1.0",`filters.${e} has moved to ${e}`),t}})});class e6e{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(t){this.removeTickerListener(),this.events=t,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(t){this._pauseUpdate=t}addTickerListener(){this.tickerAdded||!this.domElement||(Xr.system.add(this.tickerUpdate,this,Cp.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Xr.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const t=this.events.rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY}))}tickerUpdate(t){this._deltaTime+=t,!(this._deltaTimer.priority-i.priority)}dispatchEvent(t,n){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,n),this.dispatch.emit(n||t.type,t)}mapEvent(t){if(!this.rootTarget)return;const n=this.mappingTable[t.type];if(n)for(let r=0,i=n.length;r=0;i--)if(t.currentTarget=r[i],this.notifyTarget(t,n),t.propagationStopped||t.propagationImmediatelyStopped)return}}all(t,n,r=this._allInteractiveElements){if(r.length===0)return;t.eventPhase=t.BUBBLING_PHASE;const i=Array.isArray(n)?n:[n];for(let o=r.length-1;o>=0;o--)i.forEach(s=>{t.currentTarget=r[o],this.notifyTarget(t,s)})}propagationPath(t){const n=[t];for(let r=0;r=0;h--){const p=f[h],g=this.hitTestMoveRecursive(p,this._isInteractive(n)?n:p.eventMode,r,i,o,s||o(t,r));if(g){if(g.length>0&&!g[g.length-1].parent)continue;const v=t.isInteractive();(g.length>0||v)&&(v&&this._allInteractiveElements.push(t),g.push(t)),this._hitElements.length===0&&(this._hitElements=g),l=!0}}}const c=this._isInteractive(n),d=t.isInteractive();return d&&d&&this._allInteractiveElements.push(t),s||this._hitElements.length>0?null:l?this._hitElements:c&&!o(t,r)&&i(t,r)?d?[t]:[]:null}hitTestRecursive(t,n,r,i,o){if(this._interactivePrune(t)||o(t,r))return null;if((t.eventMode==="dynamic"||n==="dynamic")&&(od.pauseUpdate=!1),t.interactiveChildren&&t.children){const c=t.children;for(let d=c.length-1;d>=0;d--){const f=c[d],h=this.hitTestRecursive(f,this._isInteractive(n)?n:f.eventMode,r,i,o);if(h){if(h.length>0&&!h[h.length-1].parent)continue;const p=t.isInteractive();return(h.length>0||p)&&h.push(t),h}}}const s=this._isInteractive(n),l=t.isInteractive();return s&&i(t,r)?l?[t]:[]:null}_isInteractive(t){return t==="static"||t==="dynamic"}_interactivePrune(t){return!!(!t||t.isMask||!t.visible||!t.renderable||t.eventMode==="none"||t.eventMode==="passive"&&!t.interactiveChildren||t.isMask)}hitPruneFn(t,n){var r;if(t.hitArea&&(t.worldTransform.applyInverse(n,dB),!t.hitArea.contains(dB.x,dB.y)))return!0;if(t._mask){const i=t._mask.isMaskData?t._mask.maskObject:t._mask;if(i&&!((r=i.containsPoint)!=null&&r.call(i,n)))return!0}return!1}hitTestFn(t,n){return t.eventMode==="passive"?!1:t.hitArea?!0:t.containsPoint?t.containsPoint(n):!1}notifyTarget(t,n){var o,s;n=n??t.type;const r=`on${n}`;(s=(o=t.currentTarget)[r])==null||s.call(o,t);const i=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?`${n}capture`:n;this.notifyListeners(t,i),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,n)}mapPointerDown(t){if(!(t instanceof Ua)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.createPointerEvent(t);if(this.dispatchEvent(n,"pointerdown"),n.pointerType==="touch")this.dispatchEvent(n,"touchstart");else if(n.pointerType==="mouse"||n.pointerType==="pen"){const i=n.button===2;this.dispatchEvent(n,i?"rightdown":"mousedown")}const r=this.trackingData(t.pointerId);r.pressTargetsByButton[t.button]=n.composedPath(),this.freeEvent(n)}mapPointerMove(t){var c,d;if(!(t instanceof Ua)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const n=this.createPointerEvent(t);this._isPointerMoveEvent=!1;const r=n.pointerType==="mouse"||n.pointerType==="pen",i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.overTargets);if(((c=i.overTargets)==null?void 0:c.length)>0&&o!==n.target){const f=t.type==="mousemove"?"mouseout":"pointerout",h=this.createPointerEvent(t,f,o);if(this.dispatchEvent(h,"pointerout"),r&&this.dispatchEvent(h,"mouseout"),!n.composedPath().includes(o)){const p=this.createPointerEvent(t,"pointerleave",o);for(p.eventPhase=p.AT_TARGET;p.target&&!n.composedPath().includes(p.target);)p.currentTarget=p.target,this.notifyTarget(p),r&&this.notifyTarget(p,"mouseleave"),p.target=p.target.parent;this.freeEvent(p)}this.freeEvent(h)}if(o!==n.target){const f=t.type==="mousemove"?"mouseover":"pointerover",h=this.clonePointerEvent(n,f);this.dispatchEvent(h,"pointerover"),r&&this.dispatchEvent(h,"mouseover");let p=o==null?void 0:o.parent;for(;p&&p!==this.rootTarget.parent&&p!==n.target;)p=p.parent;if(!p||p===this.rootTarget.parent){const v=this.clonePointerEvent(n,"pointerenter");for(v.eventPhase=v.AT_TARGET;v.target&&v.target!==o&&v.target!==this.rootTarget.parent;)v.currentTarget=v.target,this.notifyTarget(v),r&&this.notifyTarget(v,"mouseenter"),v.target=v.target.parent;this.freeEvent(v)}this.freeEvent(h)}const s=[],l=this.enableGlobalMoveEvents??!0;this.moveOnAll?s.push("pointermove"):this.dispatchEvent(n,"pointermove"),l&&s.push("globalpointermove"),n.pointerType==="touch"&&(this.moveOnAll?s.splice(1,0,"touchmove"):this.dispatchEvent(n,"touchmove"),l&&s.push("globaltouchmove")),r&&(this.moveOnAll?s.splice(1,0,"mousemove"):this.dispatchEvent(n,"mousemove"),l&&s.push("globalmousemove"),this.cursor=(d=n.target)==null?void 0:d.cursor),s.length>0&&this.all(n,s),this._allInteractiveElements.length=0,this._hitElements.length=0,i.overTargets=n.composedPath(),this.freeEvent(n)}mapPointerOver(t){var s;if(!(t instanceof Ua)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.trackingData(t.pointerId),r=this.createPointerEvent(t),i=r.pointerType==="mouse"||r.pointerType==="pen";this.dispatchEvent(r,"pointerover"),i&&this.dispatchEvent(r,"mouseover"),r.pointerType==="mouse"&&(this.cursor=(s=r.target)==null?void 0:s.cursor);const o=this.clonePointerEvent(r,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),i&&this.notifyTarget(o,"mouseenter"),o.target=o.target.parent;n.overTargets=r.composedPath(),this.freeEvent(r),this.freeEvent(o)}mapPointerOut(t){if(!(t instanceof Ua)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.trackingData(t.pointerId);if(n.overTargets){const r=t.pointerType==="mouse"||t.pointerType==="pen",i=this.findMountedTarget(n.overTargets),o=this.createPointerEvent(t,"pointerout",i);this.dispatchEvent(o),r&&this.dispatchEvent(o,"mouseout");const s=this.createPointerEvent(t,"pointerleave",i);for(s.eventPhase=s.AT_TARGET;s.target&&s.target!==this.rootTarget.parent;)s.currentTarget=s.target,this.notifyTarget(s),r&&this.notifyTarget(s,"mouseleave"),s.target=s.target.parent;n.overTargets=null,this.freeEvent(o),this.freeEvent(s)}this.cursor=null}mapPointerUp(t){if(!(t instanceof Ua)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=performance.now(),r=this.createPointerEvent(t);if(this.dispatchEvent(r,"pointerup"),r.pointerType==="touch")this.dispatchEvent(r,"touchend");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const l=r.button===2;this.dispatchEvent(r,l?"rightup":"mouseup")}const i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.pressTargetsByButton[t.button]);let s=o;if(o&&!r.composedPath().includes(o)){let l=o;for(;l&&!r.composedPath().includes(l);){if(r.currentTarget=l,this.notifyTarget(r,"pointerupoutside"),r.pointerType==="touch")this.notifyTarget(r,"touchendoutside");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const c=r.button===2;this.notifyTarget(r,c?"rightupoutside":"mouseupoutside")}l=l.parent}delete i.pressTargetsByButton[t.button],s=l}if(s){const l=this.clonePointerEvent(r,"click");l.target=s,l.path=null,i.clicksByButton[t.button]||(i.clicksByButton[t.button]={clickCount:0,target:l.target,timeStamp:n});const c=i.clicksByButton[t.button];if(c.target===l.target&&n-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=l.target,c.timeStamp=n,l.detail=c.clickCount,l.pointerType==="mouse"){const d=l.button===2;this.dispatchEvent(l,d?"rightclick":"click")}else l.pointerType==="touch"&&this.dispatchEvent(l,"tap");this.dispatchEvent(l,"pointertap"),this.freeEvent(l)}this.freeEvent(r)}mapPointerUpOutside(t){if(!(t instanceof Ua)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.trackingData(t.pointerId),r=this.findMountedTarget(n.pressTargetsByButton[t.button]),i=this.createPointerEvent(t);if(r){let o=r;for(;o;)i.currentTarget=o,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch"?this.notifyTarget(i,"touchendoutside"):(i.pointerType==="mouse"||i.pointerType==="pen")&&this.notifyTarget(i,i.button===2?"rightupoutside":"mouseupoutside"),o=o.parent;delete n.pressTargetsByButton[t.button]}this.freeEvent(i)}mapWheel(t){if(!(t instanceof zg)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const n=this.createWheelEvent(t);this.dispatchEvent(n),this.freeEvent(n)}findMountedTarget(t){if(!t)return null;let n=t[0];for(let r=1;r(n==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=r),t[n]=r,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:t,resolution:n}=this.renderer;this.setTargetElement(t),this.resolution=n,$3._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this.currentCursor===e)return;this.currentCursor=e;const n=this.cursorStyles[e];if(n)switch(typeof n){case"string":t&&(this.domElement.style.cursor=n);break;case"function":n(e);break;case"object":t&&Object.assign(this.domElement.style,n);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&e.pointerType==="touch"))return;const t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let n=0,r=t.length;n0&&(t=e.composedPath()[0]);const n=t!==this.domElement?"outside":"",r=this.normalizeToPointerData(e);for(let i=0,o=r.length;i"u"&&(i.button=0),typeof i.buttons>"u"&&(i.buttons=1),typeof i.isPrimary>"u"&&(i.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof i.width>"u"&&(i.width=i.radiusX||1),typeof i.height>"u"&&(i.height=i.radiusY||1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="touch"),typeof i.pointerId>"u"&&(i.pointerId=i.identifier||0),typeof i.pressure>"u"&&(i.pressure=i.force||.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),typeof i.layerX>"u"&&(i.layerX=i.offsetX=i.clientX),typeof i.layerY>"u"&&(i.layerY=i.offsetY=i.clientY),i.isNormalized=!0,i.type=e.type,t.push(i)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const n=e;typeof n.isPrimary>"u"&&(n.isPrimary=!0),typeof n.width>"u"&&(n.width=1),typeof n.height>"u"&&(n.height=1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="mouse"),typeof n.pointerId>"u"&&(n.pointerId=i6e),typeof n.pressure>"u"&&(n.pressure=.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),n.isNormalized=!0,t.push(n)}else t.push(e);return t}normalizeWheelEvent(e){const t=this.rootWheelEvent;return this.transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=o6e[e.type]||e.type),e}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};let k1=$3;k1.extension={name:"events",type:[rt.RendererSystem,rt.CanvasRendererSystem]};k1.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};bt.add(k1);function y7(e){return e==="dynamic"||e==="static"}const s6e={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??y7(k1.defaultEventMode)},set interactive(e){cn("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=e,this.eventMode=e?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??k1.defaultEventMode},set eventMode(e){this._internalInteractive=y7(e),this._internalEventMode=e},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(e,t,n){const r=typeof n=="boolean"&&n||typeof n=="object"&&n.capture,i=typeof t=="function"?void 0:t;e=r?`${e}capture`:e,t=typeof t=="function"?t:t.handleEvent,this.on(e,t,i)},removeEventListener(e,t,n){const r=typeof n=="boolean"&&n||typeof n=="object"&&n.capture,i=typeof t=="function"?void 0:t;e=r?`${e}capture`:e,t=typeof t=="function"?t:t.handleEvent,this.off(e,t,i)},dispatchEvent(e){if(!(e instanceof gw))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return e.defaultPrevented=!1,e.path=null,e.target=this,e.manager.dispatchEvent(e),!e.defaultPrevented}};Pr.mixin(s6e);const a6e={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};Pr.mixin(a6e);const l6e=9,j_=100,c6e=0,u6e=0,b7=2,x7=1,d6e=-1e3,f6e=-1e3,h6e=2;class xne{constructor(t){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(pu.tablet||pu.phone)&&this.createTouchHook();const n=document.createElement("div");n.style.width=`${j_}px`,n.style.height=`${j_}px`,n.style.position="absolute",n.style.top=`${c6e}px`,n.style.left=`${u6e}px`,n.style.zIndex=b7.toString(),this.div=n,this.renderer=t,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const t=document.createElement("button");t.style.width=`${x7}px`,t.style.height=`${x7}px`,t.style.position="absolute",t.style.top=`${d6e}px`,t.style.left=`${f6e}px`,t.style.zIndex=h6e.toString(),t.style.backgroundColor="#FF0000",t.title="select to enable accessibility for this content",t.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(t),this._hookDiv=t}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){var t;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(t=this.renderer.view.parentNode)==null||t.appendChild(this.div))}deactivate(){var t;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(t=this.div.parentNode)==null||t.removeChild(this.div))}updateAccessibleObjects(t){if(!t.visible||!t.accessibleChildren)return;t.accessible&&t.isInteractive()&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);const n=t.children;if(n)for(let r=0;r title : ${t.title}
tabIndex: ${t.tabIndex}`}capHitArea(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0);const{width:n,height:r}=this.renderer;t.x+t.width>n&&(t.width=n-t.x),t.y+t.height>r&&(t.height=r-t.y)}addChild(t){let n=this.pool.pop();n||(n=document.createElement("button"),n.style.width=`${j_}px`,n.style.height=`${j_}px`,n.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",n.style.position="absolute",n.style.zIndex=b7.toString(),n.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?n.setAttribute("aria-live","off"):n.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?n.setAttribute("aria-relevant","additions"):n.setAttribute("aria-relevant","text"),n.addEventListener("click",this._onClick.bind(this)),n.addEventListener("focus",this._onFocus.bind(this)),n.addEventListener("focusout",this._onFocusOut.bind(this))),n.style.pointerEvents=t.accessiblePointerEvents,n.type=t.accessibleType,t.accessibleTitle&&t.accessibleTitle!==null?n.title=t.accessibleTitle:(!t.accessibleHint||t.accessibleHint===null)&&(n.title=`displayObject ${t.tabIndex}`),t.accessibleHint&&t.accessibleHint!==null&&n.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(n),t._accessibleActive=!0,t._accessibleDiv=n,n.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex}_dispatchEvent(t,n){const{displayObject:r}=t.target,i=this.renderer.events.rootBoundary,o=Object.assign(new gw(i),{target:r});i.rootTarget=this.renderer.lastObjectRendered,n.forEach(s=>i.dispatchEvent(o,s))}_onClick(t){this._dispatchEvent(t,["click","pointertap","tap"])}_onFocus(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive"),this._dispatchEvent(t,["mouseover"])}_onFocusOut(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite"),this._dispatchEvent(t,["mouseout"])}_onKeyDown(t){t.keyCode===l6e&&this.activate()}_onMouseMove(t){t.movementX===0&&t.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}xne.extension={name:"accessibility",type:[rt.RendererPlugin,rt.CanvasRendererPlugin]};bt.add(xne);const F3=class{constructor(e){this.stage=new Ko,e=Object.assign({forceCanvas:!1},e),this.renderer=Xze(e),F3._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){return this.renderer.view}get screen(){return this.renderer.screen}destroy(e,t){const n=F3._plugins.slice(0);n.reverse(),n.forEach(r=>{r.destroy.call(this)}),this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null}};let Cj=F3;Cj._plugins=[];bt.handleByList(rt.Application,Cj._plugins);class wne{static init(t){Object.defineProperty(this,"resizeTo",{set(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let n,r;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,r=globalThis.innerHeight;else{const{clientWidth:i,clientHeight:o}=this._resizeTo;n=i,r=o}this.renderer.resize(n,r),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}wne.extension=rt.Application;bt.add(wne);const w7={loader:rt.LoadParser,resolver:rt.ResolveParser,cache:rt.CacheParser,detection:rt.DetectionParser};bt.handle(rt.Asset,e=>{const t=e.ref;Object.entries(w7).filter(([n])=>!!t[n]).forEach(([n,r])=>bt.add(Object.assign(t[n],{extension:t[n].extension??r})))},e=>{const t=e.ref;Object.keys(w7).filter(n=>!!t[n]).forEach(n=>bt.remove(t[n]))});class p6e{constructor(t,n=!1){this._loader=t,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=n}add(t){t.forEach(n=>{this._assetList.push(n)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const t=[],n=Math.min(this._assetList.length,this._maxConcurrent);for(let r=0;r(Array.isArray(e)||(e=[e]),t?e.map(n=>typeof n=="string"?t(n):n):e),z3=(e,t)=>{const n=t.split("?")[1];return n&&(e+=`?${n}`),e};function _ne(e,t,n,r,i){const o=t[n];for(let s=0;s{const s=o.substring(1,o.length-1).split(",");i.push(s)}),_ne(e,i,0,n,r)}else r.push(e);return r}const wC=e=>!Array.isArray(e);class g6e{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){const n=this._cache.get(t);return n||console.warn(`[Assets] Asset id ${t} was not found in the Cache`),n}set(t,n){const r=yu(t);let i;for(let l=0;l{i[l]=n}));const o=Object.keys(i),s={cacheKeys:o,keys:r};if(r.forEach(l=>{this._cacheMap.set(l,s)}),o.forEach(l=>{this._cache.has(l)&&this._cache.get(l)!==n&&console.warn("[Cache] already has key:",l),this._cache.set(l,i[l])}),n instanceof ht){const l=n;r.forEach(c=>{l.baseTexture!==ht.EMPTY.baseTexture&&Vt.addToCache(l.baseTexture,c),ht.addToCache(l,c)})}}remove(t){if(this._cacheMap.get(t),!this._cacheMap.has(t)){console.warn(`[Assets] Asset id ${t} was not found in the Cache`);return}const n=this._cacheMap.get(t);n.cacheKeys.forEach(i=>{this._cache.delete(i)}),n.keys.forEach(i=>{this._cacheMap.delete(i)})}get parsers(){return this._parsers}}const Cb=new g6e;class v6e{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(t,n,r)=>(this._parsersValidated=!1,t[n]=r,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(t,n){const r={promise:null,parser:null};return r.promise=(async()=>{var s,l;let i=null,o=null;if(n.loadParser&&(o=this._parserHash[n.loadParser],o||console.warn(`[Assets] specified load parser "${n.loadParser}" not found while loading ${t}`)),!o){for(let c=0;c({src:d})),l=s.length,c=s.map(async d=>{const f=to.toAbsolute(d.src);if(!i[d.src])try{this.promiseCache[f]||(this.promiseCache[f]=this._getLoadPromiseAndParser(f,d)),i[d.src]=await this.promiseCache[f].promise,n&&n(++r/l)}catch(h){throw delete this.promiseCache[f],delete i[d.src],new Error(`[Loader.load] Failed to load ${f}. -${h}`)}});return await Promise.all(c),o?i[s[0].src]:i}async unload(t){const r=yu(t,i=>({src:i})).map(async i=>{var l,c;const o=to.toAbsolute(i.src),s=this.promiseCache[o];if(s){const d=await s.promise;(c=(l=s.parser)==null?void 0:l.unload)==null||c.call(l,d,i,this),delete this.promiseCache[o]}});await Promise.all(r)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(t=>t.name).reduce((t,n)=>(t[n.name]&&console.warn(`[Assets] loadParser name conflict "${n.name}"`),{...t,[n.name]:n}),{})}}var oc=(e=>(e[e.Low=0]="Low",e[e.Normal=1]="Normal",e[e.High=2]="High",e))(oc||{});const y6e=".json",b6e="application/json",x6e={extension:{type:rt.LoadParser,priority:oc.Low},name:"loadJson",test(e){return vw(e,b6e)||Up(e,y6e)},async load(e){return await(await tt.ADAPTER.fetch(e)).json()}};bt.add(x6e);const w6e=".txt",_6e="text/plain",S6e={name:"loadTxt",extension:{type:rt.LoadParser,priority:oc.Low},test(e){return vw(e,_6e)||Up(e,w6e)},async load(e){return await(await tt.ADAPTER.fetch(e)).text()}};bt.add(S6e);const E6e=["normal","bold","100","200","300","400","500","600","700","800","900"],C6e=[".ttf",".otf",".woff",".woff2"],T6e=["font/ttf","font/otf","font/woff","font/woff2"],k6e=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function A6e(e){const t=to.extname(e),i=to.basename(e,t).replace(/(-|_)/g," ").toLowerCase().split(" ").map(l=>l.charAt(0).toUpperCase()+l.slice(1));let o=i.length>0;for(const l of i)if(!l.match(k6e)){o=!1;break}let s=i.join(" ");return o||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const R6e={extension:{type:rt.LoadParser,priority:oc.Low},name:"loadWebFont",test(e){return vw(e,T6e)||Up(e,C6e)},async load(e,t){var r,i,o;const n=tt.ADAPTER.getFontFaceSet();if(n){const s=[],l=((r=t.data)==null?void 0:r.family)??A6e(e),c=((o=(i=t.data)==null?void 0:i.weights)==null?void 0:o.filter(f=>E6e.includes(f)))??["normal"],d=t.data??{};for(let f=0;ftt.ADAPTER.getFontFaceSet().delete(t))}};bt.add(R6e);let _7=0,fB;const I6e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",P6e={id:"checkImageBitmap",code:` +`;class e6e extends Wi{constructor(t=.5,n=Math.random()){super(fne,Zje,{uNoise:0,uSeed:0}),this.noise=t,this.seed=n}get noise(){return this.uniforms.uNoise}set noise(t){this.uniforms.uNoise=t}get seed(){return this.uniforms.uSeed}set seed(t){this.uniforms.uSeed=t}}const v7={AlphaFilter:Fje,BlurFilter:Gje,BlurFilterPass:N3,ColorMatrixFilter:B3,DisplacementFilter:Yje,FXAAFilter:Jje,NoiseFilter:e6e};Object.entries(v7).forEach(([e,t])=>{Object.defineProperty(v7,e,{get(){return cn("7.1.0",`filters.${e} has moved to ${e}`),t}})});class t6e{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(t){this.removeTickerListener(),this.events=t,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(t){this._pauseUpdate=t}addTickerListener(){this.tickerAdded||!this.domElement||(Xr.system.add(this.tickerUpdate,this,Cp.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Xr.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const t=this.events.rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY}))}tickerUpdate(t){this._deltaTime+=t,!(this._deltaTimer.priority-i.priority)}dispatchEvent(t,n){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,n),this.dispatch.emit(n||t.type,t)}mapEvent(t){if(!this.rootTarget)return;const n=this.mappingTable[t.type];if(n)for(let r=0,i=n.length;r=0;i--)if(t.currentTarget=r[i],this.notifyTarget(t,n),t.propagationStopped||t.propagationImmediatelyStopped)return}}all(t,n,r=this._allInteractiveElements){if(r.length===0)return;t.eventPhase=t.BUBBLING_PHASE;const i=Array.isArray(n)?n:[n];for(let o=r.length-1;o>=0;o--)i.forEach(s=>{t.currentTarget=r[o],this.notifyTarget(t,s)})}propagationPath(t){const n=[t];for(let r=0;r=0;h--){const p=f[h],g=this.hitTestMoveRecursive(p,this._isInteractive(n)?n:p.eventMode,r,i,o,s||o(t,r));if(g){if(g.length>0&&!g[g.length-1].parent)continue;const v=t.isInteractive();(g.length>0||v)&&(v&&this._allInteractiveElements.push(t),g.push(t)),this._hitElements.length===0&&(this._hitElements=g),l=!0}}}const c=this._isInteractive(n),d=t.isInteractive();return d&&d&&this._allInteractiveElements.push(t),s||this._hitElements.length>0?null:l?this._hitElements:c&&!o(t,r)&&i(t,r)?d?[t]:[]:null}hitTestRecursive(t,n,r,i,o){if(this._interactivePrune(t)||o(t,r))return null;if((t.eventMode==="dynamic"||n==="dynamic")&&(od.pauseUpdate=!1),t.interactiveChildren&&t.children){const c=t.children;for(let d=c.length-1;d>=0;d--){const f=c[d],h=this.hitTestRecursive(f,this._isInteractive(n)?n:f.eventMode,r,i,o);if(h){if(h.length>0&&!h[h.length-1].parent)continue;const p=t.isInteractive();return(h.length>0||p)&&h.push(t),h}}}const s=this._isInteractive(n),l=t.isInteractive();return s&&i(t,r)?l?[t]:[]:null}_isInteractive(t){return t==="static"||t==="dynamic"}_interactivePrune(t){return!!(!t||t.isMask||!t.visible||!t.renderable||t.eventMode==="none"||t.eventMode==="passive"&&!t.interactiveChildren||t.isMask)}hitPruneFn(t,n){var r;if(t.hitArea&&(t.worldTransform.applyInverse(n,dB),!t.hitArea.contains(dB.x,dB.y)))return!0;if(t._mask){const i=t._mask.isMaskData?t._mask.maskObject:t._mask;if(i&&!((r=i.containsPoint)!=null&&r.call(i,n)))return!0}return!1}hitTestFn(t,n){return t.eventMode==="passive"?!1:t.hitArea?!0:t.containsPoint?t.containsPoint(n):!1}notifyTarget(t,n){var o,s;n=n??t.type;const r=`on${n}`;(s=(o=t.currentTarget)[r])==null||s.call(o,t);const i=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?`${n}capture`:n;this.notifyListeners(t,i),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,n)}mapPointerDown(t){if(!(t instanceof Ua)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.createPointerEvent(t);if(this.dispatchEvent(n,"pointerdown"),n.pointerType==="touch")this.dispatchEvent(n,"touchstart");else if(n.pointerType==="mouse"||n.pointerType==="pen"){const i=n.button===2;this.dispatchEvent(n,i?"rightdown":"mousedown")}const r=this.trackingData(t.pointerId);r.pressTargetsByButton[t.button]=n.composedPath(),this.freeEvent(n)}mapPointerMove(t){var c,d;if(!(t instanceof Ua)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const n=this.createPointerEvent(t);this._isPointerMoveEvent=!1;const r=n.pointerType==="mouse"||n.pointerType==="pen",i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.overTargets);if(((c=i.overTargets)==null?void 0:c.length)>0&&o!==n.target){const f=t.type==="mousemove"?"mouseout":"pointerout",h=this.createPointerEvent(t,f,o);if(this.dispatchEvent(h,"pointerout"),r&&this.dispatchEvent(h,"mouseout"),!n.composedPath().includes(o)){const p=this.createPointerEvent(t,"pointerleave",o);for(p.eventPhase=p.AT_TARGET;p.target&&!n.composedPath().includes(p.target);)p.currentTarget=p.target,this.notifyTarget(p),r&&this.notifyTarget(p,"mouseleave"),p.target=p.target.parent;this.freeEvent(p)}this.freeEvent(h)}if(o!==n.target){const f=t.type==="mousemove"?"mouseover":"pointerover",h=this.clonePointerEvent(n,f);this.dispatchEvent(h,"pointerover"),r&&this.dispatchEvent(h,"mouseover");let p=o==null?void 0:o.parent;for(;p&&p!==this.rootTarget.parent&&p!==n.target;)p=p.parent;if(!p||p===this.rootTarget.parent){const v=this.clonePointerEvent(n,"pointerenter");for(v.eventPhase=v.AT_TARGET;v.target&&v.target!==o&&v.target!==this.rootTarget.parent;)v.currentTarget=v.target,this.notifyTarget(v),r&&this.notifyTarget(v,"mouseenter"),v.target=v.target.parent;this.freeEvent(v)}this.freeEvent(h)}const s=[],l=this.enableGlobalMoveEvents??!0;this.moveOnAll?s.push("pointermove"):this.dispatchEvent(n,"pointermove"),l&&s.push("globalpointermove"),n.pointerType==="touch"&&(this.moveOnAll?s.splice(1,0,"touchmove"):this.dispatchEvent(n,"touchmove"),l&&s.push("globaltouchmove")),r&&(this.moveOnAll?s.splice(1,0,"mousemove"):this.dispatchEvent(n,"mousemove"),l&&s.push("globalmousemove"),this.cursor=(d=n.target)==null?void 0:d.cursor),s.length>0&&this.all(n,s),this._allInteractiveElements.length=0,this._hitElements.length=0,i.overTargets=n.composedPath(),this.freeEvent(n)}mapPointerOver(t){var s;if(!(t instanceof Ua)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.trackingData(t.pointerId),r=this.createPointerEvent(t),i=r.pointerType==="mouse"||r.pointerType==="pen";this.dispatchEvent(r,"pointerover"),i&&this.dispatchEvent(r,"mouseover"),r.pointerType==="mouse"&&(this.cursor=(s=r.target)==null?void 0:s.cursor);const o=this.clonePointerEvent(r,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),i&&this.notifyTarget(o,"mouseenter"),o.target=o.target.parent;n.overTargets=r.composedPath(),this.freeEvent(r),this.freeEvent(o)}mapPointerOut(t){if(!(t instanceof Ua)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.trackingData(t.pointerId);if(n.overTargets){const r=t.pointerType==="mouse"||t.pointerType==="pen",i=this.findMountedTarget(n.overTargets),o=this.createPointerEvent(t,"pointerout",i);this.dispatchEvent(o),r&&this.dispatchEvent(o,"mouseout");const s=this.createPointerEvent(t,"pointerleave",i);for(s.eventPhase=s.AT_TARGET;s.target&&s.target!==this.rootTarget.parent;)s.currentTarget=s.target,this.notifyTarget(s),r&&this.notifyTarget(s,"mouseleave"),s.target=s.target.parent;n.overTargets=null,this.freeEvent(o),this.freeEvent(s)}this.cursor=null}mapPointerUp(t){if(!(t instanceof Ua)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=performance.now(),r=this.createPointerEvent(t);if(this.dispatchEvent(r,"pointerup"),r.pointerType==="touch")this.dispatchEvent(r,"touchend");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const l=r.button===2;this.dispatchEvent(r,l?"rightup":"mouseup")}const i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.pressTargetsByButton[t.button]);let s=o;if(o&&!r.composedPath().includes(o)){let l=o;for(;l&&!r.composedPath().includes(l);){if(r.currentTarget=l,this.notifyTarget(r,"pointerupoutside"),r.pointerType==="touch")this.notifyTarget(r,"touchendoutside");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const c=r.button===2;this.notifyTarget(r,c?"rightupoutside":"mouseupoutside")}l=l.parent}delete i.pressTargetsByButton[t.button],s=l}if(s){const l=this.clonePointerEvent(r,"click");l.target=s,l.path=null,i.clicksByButton[t.button]||(i.clicksByButton[t.button]={clickCount:0,target:l.target,timeStamp:n});const c=i.clicksByButton[t.button];if(c.target===l.target&&n-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=l.target,c.timeStamp=n,l.detail=c.clickCount,l.pointerType==="mouse"){const d=l.button===2;this.dispatchEvent(l,d?"rightclick":"click")}else l.pointerType==="touch"&&this.dispatchEvent(l,"tap");this.dispatchEvent(l,"pointertap"),this.freeEvent(l)}this.freeEvent(r)}mapPointerUpOutside(t){if(!(t instanceof Ua)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.trackingData(t.pointerId),r=this.findMountedTarget(n.pressTargetsByButton[t.button]),i=this.createPointerEvent(t);if(r){let o=r;for(;o;)i.currentTarget=o,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch"?this.notifyTarget(i,"touchendoutside"):(i.pointerType==="mouse"||i.pointerType==="pen")&&this.notifyTarget(i,i.button===2?"rightupoutside":"mouseupoutside"),o=o.parent;delete n.pressTargetsByButton[t.button]}this.freeEvent(i)}mapWheel(t){if(!(t instanceof zg)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const n=this.createWheelEvent(t);this.dispatchEvent(n),this.freeEvent(n)}findMountedTarget(t){if(!t)return null;let n=t[0];for(let r=1;r(n==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=r),t[n]=r,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:t,resolution:n}=this.renderer;this.setTargetElement(t),this.resolution=n,$3._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this.currentCursor===e)return;this.currentCursor=e;const n=this.cursorStyles[e];if(n)switch(typeof n){case"string":t&&(this.domElement.style.cursor=n);break;case"function":n(e);break;case"object":t&&Object.assign(this.domElement.style,n);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&e.pointerType==="touch"))return;const t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let n=0,r=t.length;n0&&(t=e.composedPath()[0]);const n=t!==this.domElement?"outside":"",r=this.normalizeToPointerData(e);for(let i=0,o=r.length;i"u"&&(i.button=0),typeof i.buttons>"u"&&(i.buttons=1),typeof i.isPrimary>"u"&&(i.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof i.width>"u"&&(i.width=i.radiusX||1),typeof i.height>"u"&&(i.height=i.radiusY||1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="touch"),typeof i.pointerId>"u"&&(i.pointerId=i.identifier||0),typeof i.pressure>"u"&&(i.pressure=i.force||.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),typeof i.layerX>"u"&&(i.layerX=i.offsetX=i.clientX),typeof i.layerY>"u"&&(i.layerY=i.offsetY=i.clientY),i.isNormalized=!0,i.type=e.type,t.push(i)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const n=e;typeof n.isPrimary>"u"&&(n.isPrimary=!0),typeof n.width>"u"&&(n.width=1),typeof n.height>"u"&&(n.height=1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="mouse"),typeof n.pointerId>"u"&&(n.pointerId=o6e),typeof n.pressure>"u"&&(n.pressure=.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),n.isNormalized=!0,t.push(n)}else t.push(e);return t}normalizeWheelEvent(e){const t=this.rootWheelEvent;return this.transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=s6e[e.type]||e.type),e}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};let k1=$3;k1.extension={name:"events",type:[rt.RendererSystem,rt.CanvasRendererSystem]};k1.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};bt.add(k1);function y7(e){return e==="dynamic"||e==="static"}const a6e={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??y7(k1.defaultEventMode)},set interactive(e){cn("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=e,this.eventMode=e?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??k1.defaultEventMode},set eventMode(e){this._internalInteractive=y7(e),this._internalEventMode=e},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(e,t,n){const r=typeof n=="boolean"&&n||typeof n=="object"&&n.capture,i=typeof t=="function"?void 0:t;e=r?`${e}capture`:e,t=typeof t=="function"?t:t.handleEvent,this.on(e,t,i)},removeEventListener(e,t,n){const r=typeof n=="boolean"&&n||typeof n=="object"&&n.capture,i=typeof t=="function"?void 0:t;e=r?`${e}capture`:e,t=typeof t=="function"?t:t.handleEvent,this.off(e,t,i)},dispatchEvent(e){if(!(e instanceof gw))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return e.defaultPrevented=!1,e.path=null,e.target=this,e.manager.dispatchEvent(e),!e.defaultPrevented}};Pr.mixin(a6e);const l6e={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};Pr.mixin(l6e);const c6e=9,j_=100,u6e=0,d6e=0,b7=2,x7=1,f6e=-1e3,h6e=-1e3,p6e=2;class xne{constructor(t){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(pu.tablet||pu.phone)&&this.createTouchHook();const n=document.createElement("div");n.style.width=`${j_}px`,n.style.height=`${j_}px`,n.style.position="absolute",n.style.top=`${u6e}px`,n.style.left=`${d6e}px`,n.style.zIndex=b7.toString(),this.div=n,this.renderer=t,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const t=document.createElement("button");t.style.width=`${x7}px`,t.style.height=`${x7}px`,t.style.position="absolute",t.style.top=`${f6e}px`,t.style.left=`${h6e}px`,t.style.zIndex=p6e.toString(),t.style.backgroundColor="#FF0000",t.title="select to enable accessibility for this content",t.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(t),this._hookDiv=t}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){var t;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(t=this.renderer.view.parentNode)==null||t.appendChild(this.div))}deactivate(){var t;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(t=this.div.parentNode)==null||t.removeChild(this.div))}updateAccessibleObjects(t){if(!t.visible||!t.accessibleChildren)return;t.accessible&&t.isInteractive()&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);const n=t.children;if(n)for(let r=0;r title : ${t.title}
tabIndex: ${t.tabIndex}`}capHitArea(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0);const{width:n,height:r}=this.renderer;t.x+t.width>n&&(t.width=n-t.x),t.y+t.height>r&&(t.height=r-t.y)}addChild(t){let n=this.pool.pop();n||(n=document.createElement("button"),n.style.width=`${j_}px`,n.style.height=`${j_}px`,n.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",n.style.position="absolute",n.style.zIndex=b7.toString(),n.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?n.setAttribute("aria-live","off"):n.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?n.setAttribute("aria-relevant","additions"):n.setAttribute("aria-relevant","text"),n.addEventListener("click",this._onClick.bind(this)),n.addEventListener("focus",this._onFocus.bind(this)),n.addEventListener("focusout",this._onFocusOut.bind(this))),n.style.pointerEvents=t.accessiblePointerEvents,n.type=t.accessibleType,t.accessibleTitle&&t.accessibleTitle!==null?n.title=t.accessibleTitle:(!t.accessibleHint||t.accessibleHint===null)&&(n.title=`displayObject ${t.tabIndex}`),t.accessibleHint&&t.accessibleHint!==null&&n.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(n),t._accessibleActive=!0,t._accessibleDiv=n,n.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex}_dispatchEvent(t,n){const{displayObject:r}=t.target,i=this.renderer.events.rootBoundary,o=Object.assign(new gw(i),{target:r});i.rootTarget=this.renderer.lastObjectRendered,n.forEach(s=>i.dispatchEvent(o,s))}_onClick(t){this._dispatchEvent(t,["click","pointertap","tap"])}_onFocus(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive"),this._dispatchEvent(t,["mouseover"])}_onFocusOut(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite"),this._dispatchEvent(t,["mouseout"])}_onKeyDown(t){t.keyCode===c6e&&this.activate()}_onMouseMove(t){t.movementX===0&&t.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}xne.extension={name:"accessibility",type:[rt.RendererPlugin,rt.CanvasRendererPlugin]};bt.add(xne);const F3=class{constructor(e){this.stage=new Ko,e=Object.assign({forceCanvas:!1},e),this.renderer=Yze(e),F3._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){return this.renderer.view}get screen(){return this.renderer.screen}destroy(e,t){const n=F3._plugins.slice(0);n.reverse(),n.forEach(r=>{r.destroy.call(this)}),this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null}};let Cj=F3;Cj._plugins=[];bt.handleByList(rt.Application,Cj._plugins);class wne{static init(t){Object.defineProperty(this,"resizeTo",{set(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let n,r;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,r=globalThis.innerHeight;else{const{clientWidth:i,clientHeight:o}=this._resizeTo;n=i,r=o}this.renderer.resize(n,r),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}wne.extension=rt.Application;bt.add(wne);const w7={loader:rt.LoadParser,resolver:rt.ResolveParser,cache:rt.CacheParser,detection:rt.DetectionParser};bt.handle(rt.Asset,e=>{const t=e.ref;Object.entries(w7).filter(([n])=>!!t[n]).forEach(([n,r])=>bt.add(Object.assign(t[n],{extension:t[n].extension??r})))},e=>{const t=e.ref;Object.keys(w7).filter(n=>!!t[n]).forEach(n=>bt.remove(t[n]))});class m6e{constructor(t,n=!1){this._loader=t,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=n}add(t){t.forEach(n=>{this._assetList.push(n)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const t=[],n=Math.min(this._assetList.length,this._maxConcurrent);for(let r=0;r(Array.isArray(e)||(e=[e]),t?e.map(n=>typeof n=="string"?t(n):n):e),z3=(e,t)=>{const n=t.split("?")[1];return n&&(e+=`?${n}`),e};function _ne(e,t,n,r,i){const o=t[n];for(let s=0;s{const s=o.substring(1,o.length-1).split(",");i.push(s)}),_ne(e,i,0,n,r)}else r.push(e);return r}const wC=e=>!Array.isArray(e);class v6e{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){const n=this._cache.get(t);return n||console.warn(`[Assets] Asset id ${t} was not found in the Cache`),n}set(t,n){const r=yu(t);let i;for(let l=0;l{i[l]=n}));const o=Object.keys(i),s={cacheKeys:o,keys:r};if(r.forEach(l=>{this._cacheMap.set(l,s)}),o.forEach(l=>{this._cache.has(l)&&this._cache.get(l)!==n&&console.warn("[Cache] already has key:",l),this._cache.set(l,i[l])}),n instanceof ht){const l=n;r.forEach(c=>{l.baseTexture!==ht.EMPTY.baseTexture&&Gt.addToCache(l.baseTexture,c),ht.addToCache(l,c)})}}remove(t){if(this._cacheMap.get(t),!this._cacheMap.has(t)){console.warn(`[Assets] Asset id ${t} was not found in the Cache`);return}const n=this._cacheMap.get(t);n.cacheKeys.forEach(i=>{this._cache.delete(i)}),n.keys.forEach(i=>{this._cacheMap.delete(i)})}get parsers(){return this._parsers}}const Cb=new v6e;class y6e{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(t,n,r)=>(this._parsersValidated=!1,t[n]=r,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(t,n){const r={promise:null,parser:null};return r.promise=(async()=>{var s,l;let i=null,o=null;if(n.loadParser&&(o=this._parserHash[n.loadParser],o||console.warn(`[Assets] specified load parser "${n.loadParser}" not found while loading ${t}`)),!o){for(let c=0;c({src:d})),l=s.length,c=s.map(async d=>{const f=no.toAbsolute(d.src);if(!i[d.src])try{this.promiseCache[f]||(this.promiseCache[f]=this._getLoadPromiseAndParser(f,d)),i[d.src]=await this.promiseCache[f].promise,n&&n(++r/l)}catch(h){throw delete this.promiseCache[f],delete i[d.src],new Error(`[Loader.load] Failed to load ${f}. +${h}`)}});return await Promise.all(c),o?i[s[0].src]:i}async unload(t){const r=yu(t,i=>({src:i})).map(async i=>{var l,c;const o=no.toAbsolute(i.src),s=this.promiseCache[o];if(s){const d=await s.promise;(c=(l=s.parser)==null?void 0:l.unload)==null||c.call(l,d,i,this),delete this.promiseCache[o]}});await Promise.all(r)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(t=>t.name).reduce((t,n)=>(t[n.name]&&console.warn(`[Assets] loadParser name conflict "${n.name}"`),{...t,[n.name]:n}),{})}}var oc=(e=>(e[e.Low=0]="Low",e[e.Normal=1]="Normal",e[e.High=2]="High",e))(oc||{});const b6e=".json",x6e="application/json",w6e={extension:{type:rt.LoadParser,priority:oc.Low},name:"loadJson",test(e){return vw(e,x6e)||Up(e,b6e)},async load(e){return await(await tt.ADAPTER.fetch(e)).json()}};bt.add(w6e);const _6e=".txt",S6e="text/plain",E6e={name:"loadTxt",extension:{type:rt.LoadParser,priority:oc.Low},test(e){return vw(e,S6e)||Up(e,_6e)},async load(e){return await(await tt.ADAPTER.fetch(e)).text()}};bt.add(E6e);const C6e=["normal","bold","100","200","300","400","500","600","700","800","900"],T6e=[".ttf",".otf",".woff",".woff2"],k6e=["font/ttf","font/otf","font/woff","font/woff2"],A6e=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function R6e(e){const t=no.extname(e),i=no.basename(e,t).replace(/(-|_)/g," ").toLowerCase().split(" ").map(l=>l.charAt(0).toUpperCase()+l.slice(1));let o=i.length>0;for(const l of i)if(!l.match(A6e)){o=!1;break}let s=i.join(" ");return o||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const I6e={extension:{type:rt.LoadParser,priority:oc.Low},name:"loadWebFont",test(e){return vw(e,k6e)||Up(e,T6e)},async load(e,t){var r,i,o;const n=tt.ADAPTER.getFontFaceSet();if(n){const s=[],l=((r=t.data)==null?void 0:r.family)??R6e(e),c=((o=(i=t.data)==null?void 0:i.weights)==null?void 0:o.filter(f=>C6e.includes(f)))??["normal"],d=t.data??{};for(let f=0;ftt.ADAPTER.getFontFaceSet().delete(t))}};bt.add(I6e);let _7=0,fB;const P6e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",O6e={id:"checkImageBitmap",code:` async function checkImageBitmap() { try { if (typeof createImageBitmap !== 'function') return false; - const response = await fetch('${I6e}'); + const response = await fetch('${P6e}'); const imageBlob = await response.blob(); const imageBitmap = await createImageBitmap(imageBlob); @@ -1492,7 +1492,7 @@ ${h}`)}});return await Promise.all(c),o?i[s[0].src]:i}async unload(t){const r=yu } } checkImageBitmap().then((result) => { self.postMessage(result); }); - `},O6e={id:"loadImageBitmap",code:` + `},M6e={id:"loadImageBitmap",code:` async function loadImageBitmap(url) { const response = await fetch(url); @@ -1528,7 +1528,7 @@ ${h}`)}});return await Promise.all(c),o?i[s[0].src]:i}async unload(t){const r=yu id: event.data.id, }); } - };`};let hB;class M6e{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(t=>{const n=URL.createObjectURL(new Blob([P6e.code],{type:"application/javascript"})),r=new Worker(n);r.addEventListener("message",i=>{r.terminate(),URL.revokeObjectURL(n),t(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(t){return this._run("loadImageBitmap",[t])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){fB===void 0&&(fB=navigator.hardwareConcurrency||4);let t=this.workerPool.pop();return!t&&this._createdWorkers{this.complete(n.data),this.returnWorker(n.target),this.next()})),t}returnWorker(t){this.workerPool.push(t)}complete(t){t.error!==void 0?this.resolveHash[t.uuid].reject(t.error):this.resolveHash[t.uuid].resolve(t.data),this.resolveHash[t.uuid]=null}async _run(t,n){await this._initWorkers();const r=new Promise((i,o)=>{this.queue.push({id:t,arguments:n,resolve:i,reject:o})});return this.next(),r}next(){if(!this.queue.length)return;const t=this.getWorker();if(!t)return;const n=this.queue.pop(),r=n.id;this.resolveHash[_7]={resolve:n.resolve,reject:n.reject},t.postMessage({data:n.arguments,uuid:_7++,id:r})}}const S7=new M6e;function Wk(e,t,n){const r=new ht(e);return r.baseTexture.on("dispose",()=>{delete t.promiseCache[n]}),r}const D6e=[".jpeg",".jpg",".png",".webp",".avif"],L6e=["image/jpeg","image/png","image/webp","image/avif"];async function N6e(e){const t=await tt.ADAPTER.fetch(e);if(!t.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${e}: ${t.status} ${t.statusText}`);const n=await t.blob();return await createImageBitmap(n)}const Gk={name:"loadTextures",extension:{type:rt.LoadParser,priority:oc.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(e){return vw(e,L6e)||Up(e,D6e)},async load(e,t,n){let r=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await S7.isImageBitmapSupported()?r=await S7.loadImageBitmap(e):r=await N6e(e):r=await new Promise(o=>{r=new Image,r.crossOrigin=this.config.crossOrigin,r.src=e,r.complete?o(r):r.onload=()=>{o(r)}});const i=new Vt(r,{resolution:zd(e),...t.data});return i.resource.src=e,Wk(i,n,e)},unload(e){e.destroy(!0)}};bt.add(Gk);const B6e=".svg",$6e="image/svg+xml",F6e={extension:{type:rt.LoadParser,priority:oc.High},name:"loadSVG",test(e){return vw(e,$6e)||Up(e,B6e)},async testParse(e){return T1.test(e)},async parse(e,t,n){var s;const r=new T1(e,(s=t==null?void 0:t.data)==null?void 0:s.resourceOptions);await r.load();const i=new Vt(r,{resolution:zd(e),...t==null?void 0:t.data});return i.resource.src=e,Wk(i,n,e)},async load(e,t){return(await tt.ADAPTER.fetch(e)).text()},unload:Gk.unload};bt.add(F6e);class z6e{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,n)=>`${t}${this._bundleIdConnector}${n}`,extractAssetIdFromBundle:(t,n)=>n.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){if(this._bundleIdConnector=t.connector??this._bundleIdConnector,this._createBundleAssetId=t.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=t.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(n=>{this._preferredOrder.push(n),n.priority||(n.priority=Object.keys(n.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){if(typeof t=="string")this._defaultSearchParams=t;else{const n=t;this._defaultSearchParams=Object.keys(n).map(r=>`${encodeURIComponent(r)}=${encodeURIComponent(n[r])}`).join("&")}}addManifest(t){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(n=>{this.addBundle(n.name,n.assets)})}addBundle(t,n){const r=[];Array.isArray(n)?n.forEach(i=>{if(typeof i.name=="string"){const o=this._createBundleAssetId(t,i.name);r.push(o),this.add([i.name,o],i.srcs,i.data)}else{const o=i.name.map(s=>this._createBundleAssetId(t,s));o.forEach(s=>{r.push(s)}),this.add([...i.name,...o],i.srcs)}}):Object.keys(n).forEach(i=>{r.push(this._createBundleAssetId(t,i)),this.add([i,this._createBundleAssetId(t,i)],n[i])}),this._bundles[t]=r}add(t,n,r){const i=yu(t);i.forEach(s=>{this.hasKey(s)&&console.warn(`[Resolver] already has key: ${s} overwriting`)}),Array.isArray(n)||(typeof n=="string"?n=m6e(n):n=[n]);const o=n.map(s=>{let l=s;if(typeof s=="string"){let c=!1;for(let d=0;d{this._assetMap[s]=o})}resolveBundle(t){const n=wC(t);t=yu(t);const r={};return t.forEach(i=>{const o=this._bundles[i];if(o){const s=this.resolve(o),l={};for(const c in s){const d=s[c];l[this._extractAssetIdFromBundle(i,c)]=d}r[i]=l}}),n?r[t[0]]:r}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const r={};for(const i in n)r[i]=n[i].src;return r}return n.src}resolve(t){const n=wC(t);t=yu(t);const r={};return t.forEach(i=>{if(!this._resolverHash[i])if(this._assetMap[i]){let o=this._assetMap[i];const s=this._getPreferredOrder(o),l=o[0];s==null||s.priority.forEach(c=>{s.params[c].forEach(d=>{const f=o.filter(h=>h[c]?h[c]===d:!1);f.length&&(o=f)})}),this._resolverHash[i]=o[0]??l}else{let o=i;(this._basePath||this._rootPath)&&(o=to.toAbsolute(o,this._basePath,this._rootPath)),o=this._appendDefaultSearchParams(o),this._resolverHash[i]={src:o}}r[i]=this._resolverHash[i]}),n?r[t[0]]:r}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let n=0;no.params.format.includes(r.format));if(i)return i}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const n=/\?/.test(t)?"&":"?";return`${t}${n}${this._defaultSearchParams}`}}class j6e{constructor(){this._detections=[],this._initialized=!1,this.resolver=new z6e,this.loader=new v6e,this.cache=Cb,this._backgroundLoader=new p6e(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var o,s,l;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Asset.init()?");return}if(this._initialized=!0,t.defaultSearchParams&&this.resolver.setDefaultSearchParams(t.defaultSearchParams),t.basePath&&(this.resolver.basePath=t.basePath),t.bundleIdentifier&&this.resolver.setBundleIdentifier(t.bundleIdentifier),t.manifest){let c=t.manifest;typeof c=="string"&&(c=await this.load(c)),this.resolver.addManifest(c)}const n=((o=t.texturePreference)==null?void 0:o.resolution)??1,r=typeof n=="number"?[n]:n;let i=[];if((s=t.texturePreference)!=null&&s.format){const c=(l=t.texturePreference)==null?void 0:l.format;i=typeof c=="string"?[c]:c;for(const d of this._detections)await d.test()||(i=await d.remove(i))}else for(const c of this._detections)await c.test()&&(i=await c.add(i));this.resolver.prefer({params:{format:i,resolution:r}}),t.preferences&&this.setPreferences(t.preferences)}add(t,n,r){this.resolver.add(t,n,r)}async load(t,n){this._initialized||await this.init();const r=wC(t),i=yu(t).map(l=>typeof l!="string"?(this.resolver.add(l.src,l),l.src):(this.resolver.hasKey(l)||this.resolver.add(l,l),l)),o=this.resolver.resolve(i),s=await this._mapLoadToResolve(o,n);return r?s[i[0]]:s}addBundle(t,n){this.resolver.addBundle(t,n)}async loadBundle(t,n){this._initialized||await this.init();let r=!1;typeof t=="string"&&(r=!0,t=[t]);const i=this.resolver.resolveBundle(t),o={},s=Object.keys(i);let l=0,c=0;const d=()=>{n==null||n(++l/c)},f=s.map(h=>{const p=i[h];return c+=Object.keys(p).length,this._mapLoadToResolve(p,d).then(g=>{o[h]=g})});return await Promise.all(f),r?o[t[0]]:o}async backgroundLoad(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const n=this.resolver.resolve(t);this._backgroundLoader.add(Object.values(n))}async backgroundLoadBundle(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const n=this.resolver.resolveBundle(t);Object.values(n).forEach(r=>{this._backgroundLoader.add(Object.values(r))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(t){if(typeof t=="string")return Cb.get(t);const n={};for(let r=0;r{const d=o[l.src],f=[l.src];l.alias&&f.push(...l.alias),s[i[c]]=d,Cb.set(f,d)}),s}async unload(t){this._initialized||await this.init();const n=yu(t).map(i=>typeof i!="string"?i.src:i),r=this.resolver.resolve(n);await this._unloadFromResolved(r)}async unloadBundle(t){this._initialized||await this.init(),t=yu(t);const n=this.resolver.resolveBundle(t),r=Object.keys(n).map(i=>this._unloadFromResolved(n[i]));await Promise.all(r)}async _unloadFromResolved(t){const n=Object.values(t);n.forEach(r=>{Cb.remove(r.src)}),await this.loader.unload(n)}get detections(){return this._detections}get preferWorkers(){return Gk.config.preferWorkers}set preferWorkers(t){cn("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:t})}setPreferences(t){this.loader.parsers.forEach(n=>{n.config&&Object.keys(n.config).filter(r=>r in t).forEach(r=>{n.config[r]=t[r]})})}}const U_=new j6e;bt.handleByList(rt.LoadParser,U_.loader.parsers).handleByList(rt.ResolveParser,U_.resolver.parsers).handleByList(rt.CacheParser,U_.cache.parsers).handleByList(rt.DetectionParser,U_.detections);const U6e={extension:rt.CacheParser,test:e=>Array.isArray(e)&&e.every(t=>t instanceof ht),getCacheableAssets:(e,t)=>{const n={};return e.forEach(r=>{t.forEach((i,o)=>{n[r+(o===0?"":o+1)]=i})}),n}};bt.add(U6e);const H6e={extension:{type:rt.DetectionParser,priority:1},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=",t=await tt.ADAPTER.fetch(e).then(n=>n.blob());return createImageBitmap(t).then(()=>!0,()=>!1)},add:async e=>[...e,"avif"],remove:async e=>e.filter(t=>t!=="avif")};bt.add(H6e);const W6e={extension:{type:rt.DetectionParser,priority:0},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",t=await tt.ADAPTER.fetch(e).then(n=>n.blob());return createImageBitmap(t).then(()=>!0,()=>!1)},add:async e=>[...e,"webp"],remove:async e=>e.filter(t=>t!=="webp")};bt.add(W6e);const E7=["png","jpg","jpeg"],G6e={extension:{type:rt.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async e=>[...e,...E7],remove:async e=>e.filter(t=>!E7.includes(t))};bt.add(G6e);const V6e={extension:rt.ResolveParser,test:Gk.test,parse:e=>{var t;return{resolution:parseFloat(((t=tt.RETINA_PREFIX.exec(e))==null?void 0:t[1])??"1"),format:e.split(".").pop(),src:e}}};bt.add(V6e);var xs=(e=>(e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",e[e.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",e[e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",e[e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",e[e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",e[e.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",e[e.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",e[e.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",e[e.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",e[e.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",e))(xs||{});const _C={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35986:1,34798:1,37808:1};let ru,pm;function C7(){pm={s3tc:ru.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:ru.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:ru.getExtension("WEBGL_compressed_texture_etc"),etc1:ru.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:ru.getExtension("WEBGL_compressed_texture_pvrtc")||ru.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:ru.getExtension("WEBGL_compressed_texture_atc"),astc:ru.getExtension("WEBGL_compressed_texture_astc")}}const q6e={extension:{type:rt.DetectionParser,priority:2},test:async()=>{const t=tt.ADAPTER.createCanvas().getContext("webgl");return t?(ru=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async e=>{pm||C7();const t=[];for(const n in pm)pm[n]&&t.push(n);return[...t,...e]},remove:async e=>(pm||C7(),e.filter(t=>!(t in pm)))};bt.add(q6e);class X6e extends mw{constructor(t,n={width:1,height:1,autoLoad:!0}){let r,i;typeof t=="string"?(r=t,i=new Uint8Array):(r=null,i=t),super(i,n),this.origin=r,this.buffer=i?new T3(i):null,this._load=null,this.loaded=!1,this.origin!==null&&n.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(t){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(t=>t.blob()).then(t=>t.arrayBuffer()).then(t=>(this.data=new Uint32Array(t),this.buffer=new T3(t),this.loaded=!0,this.onBlobLoaded(t),this.update(),this)),this._load)}}class op extends X6e{constructor(t,n){super(t,n),this.format=n.format,this.levels=n.levels||1,this._width=n.width,this._height=n.height,this._extension=op._formatToExtension(this.format),(n.levelBuffers||this.buffer)&&(this._levelBuffers=n.levelBuffers||op._createLevelBuffers(t instanceof Uint8Array?t:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(t,n,r){const i=t.gl;if(!t.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;for(let s=0,l=this.levels;s=33776&&t<=33779)return"s3tc";if(t>=37488&&t<=37497)return"etc";if(t>=35840&&t<=35843)return"pvrtc";if(t>=36196)return"etc1";if(t>=35986&&t<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")}static _createLevelBuffers(t,n,r,i,o,s,l){const c=new Array(r);let d=t.byteOffset,f=s,h=l,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*_C[n];for(let y=0;y1?f:p,levelHeight:r>1?h:g,levelBuffer:new Uint8Array(t.buffer,d,v)},d+=v,f=f>>1||1,h=h>>1||1,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*_C[n];return c}}const pB=4,H_=124,Y6e=32,T7=20,K6e=542327876,W_={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},Q6e={SIZE:0,FLAGS:1,FOURCC:2,RGB_BITCOUNT:3,R_BIT_MASK:4,G_BIT_MASK:5,B_BIT_MASK:6,A_BIT_MASK:7},G_={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},J6e=1,Z6e=2,eUe=4,tUe=64,nUe=512,rUe=131072,iUe=827611204,oUe=861165636,sUe=894720068,aUe=808540228,lUe=4,cUe={[iUe]:xs.COMPRESSED_RGBA_S3TC_DXT1_EXT,[oUe]:xs.COMPRESSED_RGBA_S3TC_DXT3_EXT,[sUe]:xs.COMPRESSED_RGBA_S3TC_DXT5_EXT},uUe={70:xs.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:xs.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:xs.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:xs.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:xs.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:xs.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:xs.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:xs.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:xs.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function dUe(e){const t=new Uint32Array(e);if(t[0]!==K6e)throw new Error("Invalid DDS file magic word");const r=new Uint32Array(e,0,H_/Uint32Array.BYTES_PER_ELEMENT),i=r[W_.HEIGHT],o=r[W_.WIDTH],s=r[W_.MIPMAP_COUNT],l=new Uint32Array(e,W_.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,Y6e/Uint32Array.BYTES_PER_ELEMENT),c=l[J6e];if(c&eUe){const d=l[Q6e.FOURCC];if(d!==aUe){const x=cUe[d],E=pB+H_,A=new Uint8Array(e,E);return[new op(A,{format:x,width:o,height:i,levels:s})]}const f=pB+H_,h=new Uint32Array(t.buffer,f,T7/Uint32Array.BYTES_PER_ELEMENT),p=h[G_.DXGI_FORMAT],g=h[G_.RESOURCE_DIMENSION],v=h[G_.MISC_FLAG],y=h[G_.ARRAY_SIZE],S=uUe[p];if(S===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${p}`);if(v===lUe)throw new Error("DDSParser does not support cubemap textures");if(g===6)throw new Error("DDSParser does not supported 3D texture data");const _=new Array,b=pB+H_+T7;if(y===1)_.push(new Uint8Array(e,b));else{const x=_C[S];let E=0,A=o,R=i;for(let O=0;O>>1,R=R>>>1}let k=b;for(let O=0;Onew op(x,{format:S,width:o,height:i,levels:s}))}throw c&tUe?new Error("DDSParser does not support uncompressed texture data."):c&nUe?new Error("DDSParser does not supported YUV uncompressed texture data."):c&rUe?new Error("DDSParser does not support single-channel (lumninance) texture data!"):c&Z6e?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const k7=[171,75,84,88,32,49,49,187,13,10,26,10],fUe=67305985,Fa={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},j3=64,A7={[It.UNSIGNED_BYTE]:1,[It.UNSIGNED_SHORT]:2,[It.INT]:4,[It.UNSIGNED_INT]:4,[It.FLOAT]:4,[It.HALF_FLOAT]:8},hUe={[Ge.RGBA]:4,[Ge.RGB]:3,[Ge.RG]:2,[Ge.RED]:1,[Ge.LUMINANCE]:1,[Ge.LUMINANCE_ALPHA]:2,[Ge.ALPHA]:1},pUe={[It.UNSIGNED_SHORT_4_4_4_4]:2,[It.UNSIGNED_SHORT_5_5_5_1]:2,[It.UNSIGNED_SHORT_5_6_5]:2};function mUe(e,t,n=!1){const r=new DataView(t);if(!gUe(e,r))return null;const i=r.getUint32(Fa.ENDIANNESS,!0)===fUe,o=r.getUint32(Fa.GL_TYPE,i),s=r.getUint32(Fa.GL_FORMAT,i),l=r.getUint32(Fa.GL_INTERNAL_FORMAT,i),c=r.getUint32(Fa.PIXEL_WIDTH,i),d=r.getUint32(Fa.PIXEL_HEIGHT,i)||1,f=r.getUint32(Fa.PIXEL_DEPTH,i)||1,h=r.getUint32(Fa.NUMBER_OF_ARRAY_ELEMENTS,i)||1,p=r.getUint32(Fa.NUMBER_OF_FACES,i),g=r.getUint32(Fa.NUMBER_OF_MIPMAP_LEVELS,i),v=r.getUint32(Fa.BYTES_OF_KEY_VALUE_DATA,i);if(d===0||f!==1)throw new Error("Only 2D textures are supported");if(p!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(h!==1)throw new Error("WebGL does not support array textures");const y=4,S=4,_=c+3&-4,b=d+3&-4,x=new Array(h);let E=c*d;o===0&&(E=_*b);let A;if(o!==0?A7[o]?A=A7[o]*hUe[s]:A=pUe[o]:A=_C[l],A===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const R=n?yUe(r,v,i):null;let O=E*A,L=c,N=d,H=_,W=b,z=j3+v;for(let D=0;D1||o!==0?L:H,levelHeight:g>1||o!==0?N:W,levelBuffer:new Uint8Array(t,j,O)},j+=O}z+=F+4,z=z%4!==0?z+4-z%4:z,L=L>>1||1,N=N>>1||1,H=L+y-1&~(y-1),W=N+S-1&~(S-1),O=H*W*A}return o!==0?{uncompressed:x.map(D=>{let F=D[0].levelBuffer,j=!1;return o===It.FLOAT?F=new Float32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4):o===It.UNSIGNED_INT?(j=!0,F=new Uint32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)):o===It.INT&&(j=!0,F=new Int32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)),{resource:new mw(F,{width:D[0].levelWidth,height:D[0].levelHeight}),type:o,format:j?vUe(s):s}}),kvData:R}:{compressed:x.map(D=>new op(null,{format:l,width:c,height:d,levels:g,levelBuffers:D})),kvData:R}}function gUe(e,t){for(let n=0;nt-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let c=0;for(;c{const c=new Vt(l,{mipmap:Ql.OFF,alphaMode:yl.NO_PREMULTIPLIED_ALPHA,resolution:zd(e),...t.data});return Wk(c,n,e)});return s.length===1?s[0]:s},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};bt.add(bUe);const xUe={extension:{type:rt.LoadParser,priority:oc.High},name:"loadKTX",test(e){return Up(e,".ktx")},async load(e,t,n){const i=await(await tt.ADAPTER.fetch(e)).arrayBuffer(),{compressed:o,uncompressed:s,kvData:l}=mUe(e,i),c=o??s,d={mipmap:Ql.OFF,alphaMode:yl.NO_PREMULTIPLIED_ALPHA,resolution:zd(e),...t.data},f=c.map(h=>{c===s&&Object.assign(d,{type:h.type,format:h.format});const p=new Vt(h,d);return p.ktxKeyValueData=l,Wk(p,n,e)});return f.length===1?f[0]:f},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};bt.add(xUe);const wUe={extension:rt.ResolveParser,test:e=>{const n=e.split("?")[0].split(".").pop();return["basis","ktx","dds"].includes(n)},parse:e=>{var r,i;if(e.split("?")[0].split(".").pop()==="ktx"){const o=[".s3tc.ktx",".s3tc_sRGB.ktx",".etc.ktx",".etc1.ktx",".pvrt.ktx",".atc.ktx",".astc.ktx"];if(o.some(s=>e.endsWith(s)))return{resolution:parseFloat(((r=tt.RETINA_PREFIX.exec(e))==null?void 0:r[1])??"1"),format:o.find(s=>e.endsWith(s)),src:e}}return{resolution:parseFloat(((i=tt.RETINA_PREFIX.exec(e))==null?void 0:i[1])??"1"),format:e.split(".").pop(),src:e}}};bt.add(wUe);const _Ue=new Kt,SUe=4,Vb=class{constructor(e){this.renderer=e}async image(e,t,n){const r=new Image;return r.src=await this.base64(e,t,n),r}async base64(e,t,n){const r=this.canvas(e);if(r.toBlob!==void 0)return new Promise((i,o)=>{r.toBlob(s=>{if(!s){o(new Error("ICanvas.toBlob failed!"));return}const l=new FileReader;l.onload=()=>i(l.result),l.onerror=o,l.readAsDataURL(s)},t,n)});if(r.toDataURL!==void 0)return r.toDataURL(t,n);if(r.convertToBlob!==void 0){const i=await r.convertToBlob({type:t,quality:n});return new Promise((o,s)=>{const l=new FileReader;l.onload=()=>o(l.result),l.onerror=s,l.readAsDataURL(i)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);o&&Vb._flipY(n,r,i),Vb._unpremultiplyAlpha(n);const s=new $4e(r,i,1),l=new ImageData(new Uint8ClampedArray(n.buffer),r,i);return s.context.putImageData(l,0,0),s.canvas}pixels(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);return o&&Vb._flipY(n,r,i),Vb._unpremultiplyAlpha(n),n}_rawPixels(e,t){const n=this.renderer;if(!n)throw new Error("The Extract has already been destroyed");let r,i=!1,o,s=!1;if(e&&(e instanceof zp?o=e:(o=n.generateTexture(e,{resolution:n.resolution,multisample:n.multisample}),s=!0)),o){if(r=o.baseTexture.resolution,t=t??o.frame,i=!1,!s){n.renderTexture.bind(o);const h=o.framebuffer.glFramebuffers[n.CONTEXT_UID];h.blitFramebuffer&&n.framebuffer.bind(h.blitFramebuffer)}}else r=n.resolution,t||(t=_Ue,t.width=n.width/r,t.height=n.height/r),i=!0,n.renderTexture.bind();const l=Math.round(t.width*r),c=Math.round(t.height*r),d=new Uint8Array(SUe*l*c),f=n.gl;return f.readPixels(Math.round(t.x*r),Math.round(t.y*r),l,c,f.RGBA,f.UNSIGNED_BYTE,d),s&&(o==null||o.destroy(!0)),{pixels:d,width:l,height:c,flipY:i}}destroy(){this.renderer=null}static _flipY(e,t,n){const r=t<<2,i=n>>1,o=new Uint8Array(r);for(let s=0;s=0&&l>=0&&i>=0&&o>=0)){t.length=0;return}const c=Math.ceil(2.3*Math.sqrt(s+l)),d=c*8+(i?4:0)+(o?4:0);if(t.length=d,d===0)return;if(c===0){t.length=8,t[0]=t[6]=n+i,t[1]=t[3]=r+o,t[2]=t[4]=n-i,t[5]=t[7]=r-o;return}let f=0,h=c*4+(i?2:0)+2,p=h,g=d;{const v=i+s,y=o,S=n+v,_=n-v,b=r+y;if(t[f++]=S,t[f++]=b,t[--h]=b,t[--h]=_,o){const x=r-y;t[p++]=_,t[p++]=x,t[--g]=x,t[--g]=S}}for(let v=1;v0||t&&r<=0){const i=n/2;for(let o=i+i%2;o=6){R7(n,!1);const s=[];for(let d=0;d=0&&o>=0&&s.push(n,r,n+i,r,n+i,r+o,n,r+o)},triangulate(e,t){const n=e.points,r=t.points;if(n.length===0)return;const i=r.length/2;r.push(n[0],n[1],n[2],n[3],n[6],n[7],n[4],n[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},CUe={build(e){SC.build(e)},triangulate(e,t){SC.triangulate(e,t)}};var Va=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Va||{}),Xh=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Xh||{});const jg={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let n=Math.ceil(e/this.maxLength);return nthis.maxSegments&&(n=this.maxSegments),n}};class I7{static curveTo(t,n,r,i,o,s){const l=s[s.length-2],d=s[s.length-1]-n,f=l-t,h=i-n,p=r-t,g=Math.abs(d*p-f*h);if(g<1e-8||o===0)return(s[s.length-2]!==t||s[s.length-1]!==n)&&s.push(t,n),null;const v=d*d+f*f,y=h*h+p*p,S=d*h+f*p,_=o*Math.sqrt(v)/g,b=o*Math.sqrt(y)/g,x=_*S/v,E=b*S/y,A=_*p+b*f,R=_*h+b*d,k=f*(b+x),O=d*(b+x),L=p*(_+E),N=h*(_+E),H=Math.atan2(O-R,k-A),W=Math.atan2(N-R,L-A);return{cx:A+t,cy:R+n,radius:o,startAngle:H,endAngle:W,anticlockwise:f*h>p*d}}static arc(t,n,r,i,o,s,l,c,d){const f=l-s,h=jg._segmentsCount(Math.abs(f)*o,Math.ceil(Math.abs(f)/yC)*40),p=f/(h*2),g=p*2,v=Math.cos(p),y=Math.sin(p),S=h-1,_=S%1/S;for(let b=0;b<=S;++b){const x=b+_*b,E=p+s+g*x,A=Math.cos(E),R=-Math.sin(E);d.push((v*A+y*R)*o+r,(v*-R+y*A)*o+i)}}}class TUe{constructor(){this.reset()}begin(t,n,r){this.reset(),this.style=t,this.start=n,this.attribStart=r}end(t,n){this.attribSize=n-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Tj{static curveLength(t,n,r,i,o,s,l,c){let f=0,h=0,p=0,g=0,v=0,y=0,S=0,_=0,b=0,x=0,E=0,A=t,R=n;for(let k=1;k<=10;++k)h=k/10,p=h*h,g=p*h,v=1-h,y=v*v,S=y*v,_=S*t+3*y*h*r+3*v*p*o+g*l,b=S*n+3*y*h*i+3*v*p*s+g*c,x=A-_,E=R-b,A=_,R=b,f+=Math.sqrt(x*x+E*E);return f}static curveTo(t,n,r,i,o,s,l){const c=l[l.length-2],d=l[l.length-1];l.length-=2;const f=jg._segmentsCount(Tj.curveLength(c,d,t,n,r,i,o,s));let h=0,p=0,g=0,v=0,y=0;l.push(c,d);for(let S=1,_=0;S<=f;++S)_=S/f,h=1-_,p=h*h,g=p*h,v=_*_,y=v*_,l.push(g*c+3*p*_*t+3*h*v*r+y*o,g*d+3*p*_*n+3*h*v*i+y*s)}}function P7(e,t,n,r,i,o,s,l){const c=e-n*i,d=t-r*i,f=e+n*o,h=t+r*o;let p,g;s?(p=r,g=-n):(p=-r,g=n);const v=c+p,y=d+g,S=f+p,_=h+g;return l.push(v,y,S,_),2}function Eh(e,t,n,r,i,o,s,l){const c=n-e,d=r-t;let f=Math.atan2(c,d),h=Math.atan2(i-e,o-t);l&&fh&&(h+=Math.PI*2);let p=f;const g=h-f,v=Math.abs(g),y=Math.sqrt(c*c+d*d),S=(15*v*Math.sqrt(y)/Math.PI>>0)+1,_=g/S;if(p+=_,l){s.push(e,t,n,r);for(let b=1,x=p;b=0&&(o.join===Va.ROUND?p+=Eh(x,E,x-k*z,E-O*z,x-L*z,E-N*z,f,!1)+4:p+=2,f.push(x-L*D,E-N*D,x+L*z,E+N*z));continue}const se=(-k+_)*(-O+E)-(-k+x)*(-O+b),Q=(-L+A)*(-N+E)-(-L+x)*(-N+R),ae=(G*Q-Y*se)/ce,le=(J*se-K*Q)/ce,he=(ae-x)*(ae-x)+(le-E)*(le-E),pe=x+(ae-x)*z,ve=E+(le-E)*z,ye=x-(ae-x)*D,xe=E-(le-E)*D,me=Math.min(G*G+K*K,Y*Y+J*J),be=ue?z:D,Qe=me+be*be*y,qe=he<=Qe;let at=o.join;if(at===Va.MITER&&he/y>S&&(at=Va.BEVEL),qe)switch(at){case Va.MITER:{f.push(pe,ve,ye,xe);break}case Va.BEVEL:{ue?f.push(pe,ve,x+k*D,E+O*D,pe,ve,x+L*D,E+N*D):f.push(x-k*z,E-O*z,ye,xe,x-L*z,E-N*z,ye,xe),p+=2;break}case Va.ROUND:{ue?(f.push(pe,ve,x+k*D,E+O*D),p+=Eh(x,E,x+k*D,E+O*D,x+L*D,E+N*D,f,!0)+4,f.push(pe,ve,x+L*D,E+N*D)):(f.push(x-k*z,E-O*z,ye,xe),p+=Eh(x,E,x-k*z,E-O*z,x-L*z,E-N*z,f,!1)+4,f.push(x-L*z,E-N*z,ye,xe));break}}else{switch(f.push(x-k*z,E-O*z,x+k*D,E+O*D),at){case Va.MITER:{ue?f.push(ye,xe,ye,xe):f.push(pe,ve,pe,ve),p+=2;break}case Va.ROUND:{ue?p+=Eh(x,E,x+k*D,E+O*D,x+L*D,E+N*D,f,!0)+2:p+=Eh(x,E,x-k*z,E-O*z,x-L*z,E-N*z,f,!1)+2;break}}f.push(x-L*z,E-N*z,x+L*D,E+N*D),p+=2}}_=r[(h-2)*2],b=r[(h-2)*2+1],x=r[(h-1)*2],E=r[(h-1)*2+1],k=-(b-E),O=_-x,H=Math.sqrt(k*k+O*O),k/=H,O/=H,k*=v,O*=v,f.push(x-k*z,E-O*z,x+k*D,E+O*D),c||(o.cap===Xh.ROUND?p+=Eh(x-k*(z-D)*.5,E-O*(z-D)*.5,x-k*z,E-O*z,x+k*D,E+O*D,f,!1)+2:o.cap===Xh.SQUARE&&(p+=P7(x,E,k,O,z,D,!1,f)));const F=t.indices,j=jg.epsilon*jg.epsilon;for(let V=g;V0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,n=null,r=null){const i=new EC(e,t,n,r);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const n=new EC(e,null,null,t),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(n=this.batches[this.batches.length-1],r=n.style);for(let l=this.shapeIndex;l65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&s===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=s?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(r=V_.pop(),r||(r=new A3,r.texArray=new I3),this.drawCalls.push(r)),r.start=d,r.size=0,r.texArray.count=0,r.type=c),v.touched=1,v._batchEnabled=e,v._batchLocation=i,v.wrapMode=Pd.REPEAT,r.texArray.elements[r.texArray.count++]=v,i++)),r.size+=h.size,d+=h.size,s=v._batchLocation,this.addColors(t,g.color,g.alpha,h.attribSize,h.attribStart),this.addTextureIds(n,s,h.attribSize,h.attribStart)}Vt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,n=this.colors,r=this.textureIds,i=new ArrayBuffer(e.length*3*4),o=new Float32Array(i),s=new Uint32Array(i);let l=0;for(let c=0;c0&&e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:n},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new ag,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new ag,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const n=this.currentPath.points,r=n[n.length-2],i=n[n.length-1];return(r!==e||i!==t)&&n.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,n,r){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),kj.curveTo(e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,o){return this._initCurve(),Tj.curveTo(e,t,n,r,i,o,this.currentPath.points),this}arcTo(e,t,n,r,i){this._initCurve(e,t);const o=this.currentPath.points,s=I7.curveTo(e,t,n,r,i,o);if(s){const{cx:l,cy:c,radius:d,startAngle:f,endAngle:h,anticlockwise:p}=s;this.arc(l,c,d,f,h,p)}return this}arc(e,t,n,r,i,o=!1){if(r===i)return this;if(!o&&i<=r?i+=yC:o&&r<=i&&(r+=yC),i-r===0)return this;const l=e+Math.cos(r)*n,c=t+Math.sin(r)*n,d=this._geometry.closePointEps;let f=this.currentPath?this.currentPath.points:null;if(f){const h=Math.abs(f[f.length-2]-l),p=Math.abs(f[f.length-1]-c);h0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:n},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,n,r){return this.drawShape(new Kt(e,t,n,r))}drawRoundedRect(e,t,n,r,i){return this.drawShape(new _j(e,t,n,r,i))}drawCircle(e,t,n){return this.drawShape(new xj(e,t,n))}drawEllipse(e,t,n,r){return this.drawShape(new wj(e,t,n,r))}drawPolygon(...e){let t,n=!0;const r=e[0];r.points?(n=r.closeStroke,t=r.points):Array.isArray(e[0])?t=e[0]:t=e;const i=new ag(t);return i.closeStroke=n,this.drawShape(i),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===zi.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,n=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=n,this.vertexData=new Float32Array(e.points);for(let r=0;r{const n=URL.createObjectURL(new Blob([O6e.code],{type:"application/javascript"})),r=new Worker(n);r.addEventListener("message",i=>{r.terminate(),URL.revokeObjectURL(n),t(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(t){return this._run("loadImageBitmap",[t])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){fB===void 0&&(fB=navigator.hardwareConcurrency||4);let t=this.workerPool.pop();return!t&&this._createdWorkers{this.complete(n.data),this.returnWorker(n.target),this.next()})),t}returnWorker(t){this.workerPool.push(t)}complete(t){t.error!==void 0?this.resolveHash[t.uuid].reject(t.error):this.resolveHash[t.uuid].resolve(t.data),this.resolveHash[t.uuid]=null}async _run(t,n){await this._initWorkers();const r=new Promise((i,o)=>{this.queue.push({id:t,arguments:n,resolve:i,reject:o})});return this.next(),r}next(){if(!this.queue.length)return;const t=this.getWorker();if(!t)return;const n=this.queue.pop(),r=n.id;this.resolveHash[_7]={resolve:n.resolve,reject:n.reject},t.postMessage({data:n.arguments,uuid:_7++,id:r})}}const S7=new D6e;function Wk(e,t,n){const r=new ht(e);return r.baseTexture.on("dispose",()=>{delete t.promiseCache[n]}),r}const L6e=[".jpeg",".jpg",".png",".webp",".avif"],N6e=["image/jpeg","image/png","image/webp","image/avif"];async function B6e(e){const t=await tt.ADAPTER.fetch(e);if(!t.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${e}: ${t.status} ${t.statusText}`);const n=await t.blob();return await createImageBitmap(n)}const Gk={name:"loadTextures",extension:{type:rt.LoadParser,priority:oc.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(e){return vw(e,N6e)||Up(e,L6e)},async load(e,t,n){let r=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await S7.isImageBitmapSupported()?r=await S7.loadImageBitmap(e):r=await B6e(e):r=await new Promise(o=>{r=new Image,r.crossOrigin=this.config.crossOrigin,r.src=e,r.complete?o(r):r.onload=()=>{o(r)}});const i=new Gt(r,{resolution:zd(e),...t.data});return i.resource.src=e,Wk(i,n,e)},unload(e){e.destroy(!0)}};bt.add(Gk);const $6e=".svg",F6e="image/svg+xml",z6e={extension:{type:rt.LoadParser,priority:oc.High},name:"loadSVG",test(e){return vw(e,F6e)||Up(e,$6e)},async testParse(e){return T1.test(e)},async parse(e,t,n){var s;const r=new T1(e,(s=t==null?void 0:t.data)==null?void 0:s.resourceOptions);await r.load();const i=new Gt(r,{resolution:zd(e),...t==null?void 0:t.data});return i.resource.src=e,Wk(i,n,e)},async load(e,t){return(await tt.ADAPTER.fetch(e)).text()},unload:Gk.unload};bt.add(z6e);class j6e{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,n)=>`${t}${this._bundleIdConnector}${n}`,extractAssetIdFromBundle:(t,n)=>n.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){if(this._bundleIdConnector=t.connector??this._bundleIdConnector,this._createBundleAssetId=t.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=t.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(n=>{this._preferredOrder.push(n),n.priority||(n.priority=Object.keys(n.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){if(typeof t=="string")this._defaultSearchParams=t;else{const n=t;this._defaultSearchParams=Object.keys(n).map(r=>`${encodeURIComponent(r)}=${encodeURIComponent(n[r])}`).join("&")}}addManifest(t){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(n=>{this.addBundle(n.name,n.assets)})}addBundle(t,n){const r=[];Array.isArray(n)?n.forEach(i=>{if(typeof i.name=="string"){const o=this._createBundleAssetId(t,i.name);r.push(o),this.add([i.name,o],i.srcs,i.data)}else{const o=i.name.map(s=>this._createBundleAssetId(t,s));o.forEach(s=>{r.push(s)}),this.add([...i.name,...o],i.srcs)}}):Object.keys(n).forEach(i=>{r.push(this._createBundleAssetId(t,i)),this.add([i,this._createBundleAssetId(t,i)],n[i])}),this._bundles[t]=r}add(t,n,r){const i=yu(t);i.forEach(s=>{this.hasKey(s)&&console.warn(`[Resolver] already has key: ${s} overwriting`)}),Array.isArray(n)||(typeof n=="string"?n=g6e(n):n=[n]);const o=n.map(s=>{let l=s;if(typeof s=="string"){let c=!1;for(let d=0;d{this._assetMap[s]=o})}resolveBundle(t){const n=wC(t);t=yu(t);const r={};return t.forEach(i=>{const o=this._bundles[i];if(o){const s=this.resolve(o),l={};for(const c in s){const d=s[c];l[this._extractAssetIdFromBundle(i,c)]=d}r[i]=l}}),n?r[t[0]]:r}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const r={};for(const i in n)r[i]=n[i].src;return r}return n.src}resolve(t){const n=wC(t);t=yu(t);const r={};return t.forEach(i=>{if(!this._resolverHash[i])if(this._assetMap[i]){let o=this._assetMap[i];const s=this._getPreferredOrder(o),l=o[0];s==null||s.priority.forEach(c=>{s.params[c].forEach(d=>{const f=o.filter(h=>h[c]?h[c]===d:!1);f.length&&(o=f)})}),this._resolverHash[i]=o[0]??l}else{let o=i;(this._basePath||this._rootPath)&&(o=no.toAbsolute(o,this._basePath,this._rootPath)),o=this._appendDefaultSearchParams(o),this._resolverHash[i]={src:o}}r[i]=this._resolverHash[i]}),n?r[t[0]]:r}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let n=0;no.params.format.includes(r.format));if(i)return i}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const n=/\?/.test(t)?"&":"?";return`${t}${n}${this._defaultSearchParams}`}}class U6e{constructor(){this._detections=[],this._initialized=!1,this.resolver=new j6e,this.loader=new y6e,this.cache=Cb,this._backgroundLoader=new m6e(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var o,s,l;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Asset.init()?");return}if(this._initialized=!0,t.defaultSearchParams&&this.resolver.setDefaultSearchParams(t.defaultSearchParams),t.basePath&&(this.resolver.basePath=t.basePath),t.bundleIdentifier&&this.resolver.setBundleIdentifier(t.bundleIdentifier),t.manifest){let c=t.manifest;typeof c=="string"&&(c=await this.load(c)),this.resolver.addManifest(c)}const n=((o=t.texturePreference)==null?void 0:o.resolution)??1,r=typeof n=="number"?[n]:n;let i=[];if((s=t.texturePreference)!=null&&s.format){const c=(l=t.texturePreference)==null?void 0:l.format;i=typeof c=="string"?[c]:c;for(const d of this._detections)await d.test()||(i=await d.remove(i))}else for(const c of this._detections)await c.test()&&(i=await c.add(i));this.resolver.prefer({params:{format:i,resolution:r}}),t.preferences&&this.setPreferences(t.preferences)}add(t,n,r){this.resolver.add(t,n,r)}async load(t,n){this._initialized||await this.init();const r=wC(t),i=yu(t).map(l=>typeof l!="string"?(this.resolver.add(l.src,l),l.src):(this.resolver.hasKey(l)||this.resolver.add(l,l),l)),o=this.resolver.resolve(i),s=await this._mapLoadToResolve(o,n);return r?s[i[0]]:s}addBundle(t,n){this.resolver.addBundle(t,n)}async loadBundle(t,n){this._initialized||await this.init();let r=!1;typeof t=="string"&&(r=!0,t=[t]);const i=this.resolver.resolveBundle(t),o={},s=Object.keys(i);let l=0,c=0;const d=()=>{n==null||n(++l/c)},f=s.map(h=>{const p=i[h];return c+=Object.keys(p).length,this._mapLoadToResolve(p,d).then(g=>{o[h]=g})});return await Promise.all(f),r?o[t[0]]:o}async backgroundLoad(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const n=this.resolver.resolve(t);this._backgroundLoader.add(Object.values(n))}async backgroundLoadBundle(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const n=this.resolver.resolveBundle(t);Object.values(n).forEach(r=>{this._backgroundLoader.add(Object.values(r))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(t){if(typeof t=="string")return Cb.get(t);const n={};for(let r=0;r{const d=o[l.src],f=[l.src];l.alias&&f.push(...l.alias),s[i[c]]=d,Cb.set(f,d)}),s}async unload(t){this._initialized||await this.init();const n=yu(t).map(i=>typeof i!="string"?i.src:i),r=this.resolver.resolve(n);await this._unloadFromResolved(r)}async unloadBundle(t){this._initialized||await this.init(),t=yu(t);const n=this.resolver.resolveBundle(t),r=Object.keys(n).map(i=>this._unloadFromResolved(n[i]));await Promise.all(r)}async _unloadFromResolved(t){const n=Object.values(t);n.forEach(r=>{Cb.remove(r.src)}),await this.loader.unload(n)}get detections(){return this._detections}get preferWorkers(){return Gk.config.preferWorkers}set preferWorkers(t){cn("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:t})}setPreferences(t){this.loader.parsers.forEach(n=>{n.config&&Object.keys(n.config).filter(r=>r in t).forEach(r=>{n.config[r]=t[r]})})}}const U_=new U6e;bt.handleByList(rt.LoadParser,U_.loader.parsers).handleByList(rt.ResolveParser,U_.resolver.parsers).handleByList(rt.CacheParser,U_.cache.parsers).handleByList(rt.DetectionParser,U_.detections);const H6e={extension:rt.CacheParser,test:e=>Array.isArray(e)&&e.every(t=>t instanceof ht),getCacheableAssets:(e,t)=>{const n={};return e.forEach(r=>{t.forEach((i,o)=>{n[r+(o===0?"":o+1)]=i})}),n}};bt.add(H6e);const W6e={extension:{type:rt.DetectionParser,priority:1},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=",t=await tt.ADAPTER.fetch(e).then(n=>n.blob());return createImageBitmap(t).then(()=>!0,()=>!1)},add:async e=>[...e,"avif"],remove:async e=>e.filter(t=>t!=="avif")};bt.add(W6e);const G6e={extension:{type:rt.DetectionParser,priority:0},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",t=await tt.ADAPTER.fetch(e).then(n=>n.blob());return createImageBitmap(t).then(()=>!0,()=>!1)},add:async e=>[...e,"webp"],remove:async e=>e.filter(t=>t!=="webp")};bt.add(G6e);const E7=["png","jpg","jpeg"],V6e={extension:{type:rt.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async e=>[...e,...E7],remove:async e=>e.filter(t=>!E7.includes(t))};bt.add(V6e);const q6e={extension:rt.ResolveParser,test:Gk.test,parse:e=>{var t;return{resolution:parseFloat(((t=tt.RETINA_PREFIX.exec(e))==null?void 0:t[1])??"1"),format:e.split(".").pop(),src:e}}};bt.add(q6e);var xs=(e=>(e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",e[e.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",e[e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",e[e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",e[e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",e[e.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",e[e.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",e[e.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",e[e.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",e[e.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",e))(xs||{});const _C={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35986:1,34798:1,37808:1};let ru,pm;function C7(){pm={s3tc:ru.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:ru.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:ru.getExtension("WEBGL_compressed_texture_etc"),etc1:ru.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:ru.getExtension("WEBGL_compressed_texture_pvrtc")||ru.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:ru.getExtension("WEBGL_compressed_texture_atc"),astc:ru.getExtension("WEBGL_compressed_texture_astc")}}const X6e={extension:{type:rt.DetectionParser,priority:2},test:async()=>{const t=tt.ADAPTER.createCanvas().getContext("webgl");return t?(ru=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async e=>{pm||C7();const t=[];for(const n in pm)pm[n]&&t.push(n);return[...t,...e]},remove:async e=>(pm||C7(),e.filter(t=>!(t in pm)))};bt.add(X6e);class Y6e extends mw{constructor(t,n={width:1,height:1,autoLoad:!0}){let r,i;typeof t=="string"?(r=t,i=new Uint8Array):(r=null,i=t),super(i,n),this.origin=r,this.buffer=i?new T3(i):null,this._load=null,this.loaded=!1,this.origin!==null&&n.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(t){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(t=>t.blob()).then(t=>t.arrayBuffer()).then(t=>(this.data=new Uint32Array(t),this.buffer=new T3(t),this.loaded=!0,this.onBlobLoaded(t),this.update(),this)),this._load)}}class op extends Y6e{constructor(t,n){super(t,n),this.format=n.format,this.levels=n.levels||1,this._width=n.width,this._height=n.height,this._extension=op._formatToExtension(this.format),(n.levelBuffers||this.buffer)&&(this._levelBuffers=n.levelBuffers||op._createLevelBuffers(t instanceof Uint8Array?t:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(t,n,r){const i=t.gl;if(!t.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;for(let s=0,l=this.levels;s=33776&&t<=33779)return"s3tc";if(t>=37488&&t<=37497)return"etc";if(t>=35840&&t<=35843)return"pvrtc";if(t>=36196)return"etc1";if(t>=35986&&t<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")}static _createLevelBuffers(t,n,r,i,o,s,l){const c=new Array(r);let d=t.byteOffset,f=s,h=l,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*_C[n];for(let y=0;y1?f:p,levelHeight:r>1?h:g,levelBuffer:new Uint8Array(t.buffer,d,v)},d+=v,f=f>>1||1,h=h>>1||1,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*_C[n];return c}}const pB=4,H_=124,K6e=32,T7=20,Q6e=542327876,W_={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},J6e={SIZE:0,FLAGS:1,FOURCC:2,RGB_BITCOUNT:3,R_BIT_MASK:4,G_BIT_MASK:5,B_BIT_MASK:6,A_BIT_MASK:7},G_={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},Z6e=1,eUe=2,tUe=4,nUe=64,rUe=512,iUe=131072,oUe=827611204,sUe=861165636,aUe=894720068,lUe=808540228,cUe=4,uUe={[oUe]:xs.COMPRESSED_RGBA_S3TC_DXT1_EXT,[sUe]:xs.COMPRESSED_RGBA_S3TC_DXT3_EXT,[aUe]:xs.COMPRESSED_RGBA_S3TC_DXT5_EXT},dUe={70:xs.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:xs.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:xs.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:xs.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:xs.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:xs.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:xs.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:xs.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:xs.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function fUe(e){const t=new Uint32Array(e);if(t[0]!==Q6e)throw new Error("Invalid DDS file magic word");const r=new Uint32Array(e,0,H_/Uint32Array.BYTES_PER_ELEMENT),i=r[W_.HEIGHT],o=r[W_.WIDTH],s=r[W_.MIPMAP_COUNT],l=new Uint32Array(e,W_.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,K6e/Uint32Array.BYTES_PER_ELEMENT),c=l[Z6e];if(c&tUe){const d=l[J6e.FOURCC];if(d!==lUe){const x=uUe[d],E=pB+H_,A=new Uint8Array(e,E);return[new op(A,{format:x,width:o,height:i,levels:s})]}const f=pB+H_,h=new Uint32Array(t.buffer,f,T7/Uint32Array.BYTES_PER_ELEMENT),p=h[G_.DXGI_FORMAT],g=h[G_.RESOURCE_DIMENSION],v=h[G_.MISC_FLAG],y=h[G_.ARRAY_SIZE],S=dUe[p];if(S===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${p}`);if(v===cUe)throw new Error("DDSParser does not support cubemap textures");if(g===6)throw new Error("DDSParser does not supported 3D texture data");const _=new Array,b=pB+H_+T7;if(y===1)_.push(new Uint8Array(e,b));else{const x=_C[S];let E=0,A=o,R=i;for(let O=0;O>>1,R=R>>>1}let k=b;for(let O=0;Onew op(x,{format:S,width:o,height:i,levels:s}))}throw c&nUe?new Error("DDSParser does not support uncompressed texture data."):c&rUe?new Error("DDSParser does not supported YUV uncompressed texture data."):c&iUe?new Error("DDSParser does not support single-channel (lumninance) texture data!"):c&eUe?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const k7=[171,75,84,88,32,49,49,187,13,10,26,10],hUe=67305985,Fa={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},j3=64,A7={[It.UNSIGNED_BYTE]:1,[It.UNSIGNED_SHORT]:2,[It.INT]:4,[It.UNSIGNED_INT]:4,[It.FLOAT]:4,[It.HALF_FLOAT]:8},pUe={[Ge.RGBA]:4,[Ge.RGB]:3,[Ge.RG]:2,[Ge.RED]:1,[Ge.LUMINANCE]:1,[Ge.LUMINANCE_ALPHA]:2,[Ge.ALPHA]:1},mUe={[It.UNSIGNED_SHORT_4_4_4_4]:2,[It.UNSIGNED_SHORT_5_5_5_1]:2,[It.UNSIGNED_SHORT_5_6_5]:2};function gUe(e,t,n=!1){const r=new DataView(t);if(!vUe(e,r))return null;const i=r.getUint32(Fa.ENDIANNESS,!0)===hUe,o=r.getUint32(Fa.GL_TYPE,i),s=r.getUint32(Fa.GL_FORMAT,i),l=r.getUint32(Fa.GL_INTERNAL_FORMAT,i),c=r.getUint32(Fa.PIXEL_WIDTH,i),d=r.getUint32(Fa.PIXEL_HEIGHT,i)||1,f=r.getUint32(Fa.PIXEL_DEPTH,i)||1,h=r.getUint32(Fa.NUMBER_OF_ARRAY_ELEMENTS,i)||1,p=r.getUint32(Fa.NUMBER_OF_FACES,i),g=r.getUint32(Fa.NUMBER_OF_MIPMAP_LEVELS,i),v=r.getUint32(Fa.BYTES_OF_KEY_VALUE_DATA,i);if(d===0||f!==1)throw new Error("Only 2D textures are supported");if(p!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(h!==1)throw new Error("WebGL does not support array textures");const y=4,S=4,_=c+3&-4,b=d+3&-4,x=new Array(h);let E=c*d;o===0&&(E=_*b);let A;if(o!==0?A7[o]?A=A7[o]*pUe[s]:A=mUe[o]:A=_C[l],A===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const R=n?bUe(r,v,i):null;let O=E*A,L=c,N=d,H=_,W=b,z=j3+v;for(let D=0;D1||o!==0?L:H,levelHeight:g>1||o!==0?N:W,levelBuffer:new Uint8Array(t,j,O)},j+=O}z+=F+4,z=z%4!==0?z+4-z%4:z,L=L>>1||1,N=N>>1||1,H=L+y-1&~(y-1),W=N+S-1&~(S-1),O=H*W*A}return o!==0?{uncompressed:x.map(D=>{let F=D[0].levelBuffer,j=!1;return o===It.FLOAT?F=new Float32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4):o===It.UNSIGNED_INT?(j=!0,F=new Uint32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)):o===It.INT&&(j=!0,F=new Int32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)),{resource:new mw(F,{width:D[0].levelWidth,height:D[0].levelHeight}),type:o,format:j?yUe(s):s}}),kvData:R}:{compressed:x.map(D=>new op(null,{format:l,width:c,height:d,levels:g,levelBuffers:D})),kvData:R}}function vUe(e,t){for(let n=0;nt-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let c=0;for(;c{const c=new Gt(l,{mipmap:Ql.OFF,alphaMode:yl.NO_PREMULTIPLIED_ALPHA,resolution:zd(e),...t.data});return Wk(c,n,e)});return s.length===1?s[0]:s},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};bt.add(xUe);const wUe={extension:{type:rt.LoadParser,priority:oc.High},name:"loadKTX",test(e){return Up(e,".ktx")},async load(e,t,n){const i=await(await tt.ADAPTER.fetch(e)).arrayBuffer(),{compressed:o,uncompressed:s,kvData:l}=gUe(e,i),c=o??s,d={mipmap:Ql.OFF,alphaMode:yl.NO_PREMULTIPLIED_ALPHA,resolution:zd(e),...t.data},f=c.map(h=>{c===s&&Object.assign(d,{type:h.type,format:h.format});const p=new Gt(h,d);return p.ktxKeyValueData=l,Wk(p,n,e)});return f.length===1?f[0]:f},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};bt.add(wUe);const _Ue={extension:rt.ResolveParser,test:e=>{const n=e.split("?")[0].split(".").pop();return["basis","ktx","dds"].includes(n)},parse:e=>{var r,i;if(e.split("?")[0].split(".").pop()==="ktx"){const o=[".s3tc.ktx",".s3tc_sRGB.ktx",".etc.ktx",".etc1.ktx",".pvrt.ktx",".atc.ktx",".astc.ktx"];if(o.some(s=>e.endsWith(s)))return{resolution:parseFloat(((r=tt.RETINA_PREFIX.exec(e))==null?void 0:r[1])??"1"),format:o.find(s=>e.endsWith(s)),src:e}}return{resolution:parseFloat(((i=tt.RETINA_PREFIX.exec(e))==null?void 0:i[1])??"1"),format:e.split(".").pop(),src:e}}};bt.add(_Ue);const SUe=new Kt,EUe=4,Vb=class{constructor(e){this.renderer=e}async image(e,t,n){const r=new Image;return r.src=await this.base64(e,t,n),r}async base64(e,t,n){const r=this.canvas(e);if(r.toBlob!==void 0)return new Promise((i,o)=>{r.toBlob(s=>{if(!s){o(new Error("ICanvas.toBlob failed!"));return}const l=new FileReader;l.onload=()=>i(l.result),l.onerror=o,l.readAsDataURL(s)},t,n)});if(r.toDataURL!==void 0)return r.toDataURL(t,n);if(r.convertToBlob!==void 0){const i=await r.convertToBlob({type:t,quality:n});return new Promise((o,s)=>{const l=new FileReader;l.onload=()=>o(l.result),l.onerror=s,l.readAsDataURL(i)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);o&&Vb._flipY(n,r,i),Vb._unpremultiplyAlpha(n);const s=new F4e(r,i,1),l=new ImageData(new Uint8ClampedArray(n.buffer),r,i);return s.context.putImageData(l,0,0),s.canvas}pixels(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);return o&&Vb._flipY(n,r,i),Vb._unpremultiplyAlpha(n),n}_rawPixels(e,t){const n=this.renderer;if(!n)throw new Error("The Extract has already been destroyed");let r,i=!1,o,s=!1;if(e&&(e instanceof zp?o=e:(o=n.generateTexture(e,{resolution:n.resolution,multisample:n.multisample}),s=!0)),o){if(r=o.baseTexture.resolution,t=t??o.frame,i=!1,!s){n.renderTexture.bind(o);const h=o.framebuffer.glFramebuffers[n.CONTEXT_UID];h.blitFramebuffer&&n.framebuffer.bind(h.blitFramebuffer)}}else r=n.resolution,t||(t=SUe,t.width=n.width/r,t.height=n.height/r),i=!0,n.renderTexture.bind();const l=Math.round(t.width*r),c=Math.round(t.height*r),d=new Uint8Array(EUe*l*c),f=n.gl;return f.readPixels(Math.round(t.x*r),Math.round(t.y*r),l,c,f.RGBA,f.UNSIGNED_BYTE,d),s&&(o==null||o.destroy(!0)),{pixels:d,width:l,height:c,flipY:i}}destroy(){this.renderer=null}static _flipY(e,t,n){const r=t<<2,i=n>>1,o=new Uint8Array(r);for(let s=0;s=0&&l>=0&&i>=0&&o>=0)){t.length=0;return}const c=Math.ceil(2.3*Math.sqrt(s+l)),d=c*8+(i?4:0)+(o?4:0);if(t.length=d,d===0)return;if(c===0){t.length=8,t[0]=t[6]=n+i,t[1]=t[3]=r+o,t[2]=t[4]=n-i,t[5]=t[7]=r-o;return}let f=0,h=c*4+(i?2:0)+2,p=h,g=d;{const v=i+s,y=o,S=n+v,_=n-v,b=r+y;if(t[f++]=S,t[f++]=b,t[--h]=b,t[--h]=_,o){const x=r-y;t[p++]=_,t[p++]=x,t[--g]=x,t[--g]=S}}for(let v=1;v0||t&&r<=0){const i=n/2;for(let o=i+i%2;o=6){R7(n,!1);const s=[];for(let d=0;d=0&&o>=0&&s.push(n,r,n+i,r,n+i,r+o,n,r+o)},triangulate(e,t){const n=e.points,r=t.points;if(n.length===0)return;const i=r.length/2;r.push(n[0],n[1],n[2],n[3],n[6],n[7],n[4],n[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},TUe={build(e){SC.build(e)},triangulate(e,t){SC.triangulate(e,t)}};var Va=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Va||{}),Xh=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Xh||{});const jg={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let n=Math.ceil(e/this.maxLength);return nthis.maxSegments&&(n=this.maxSegments),n}};class I7{static curveTo(t,n,r,i,o,s){const l=s[s.length-2],d=s[s.length-1]-n,f=l-t,h=i-n,p=r-t,g=Math.abs(d*p-f*h);if(g<1e-8||o===0)return(s[s.length-2]!==t||s[s.length-1]!==n)&&s.push(t,n),null;const v=d*d+f*f,y=h*h+p*p,S=d*h+f*p,_=o*Math.sqrt(v)/g,b=o*Math.sqrt(y)/g,x=_*S/v,E=b*S/y,A=_*p+b*f,R=_*h+b*d,k=f*(b+x),O=d*(b+x),L=p*(_+E),N=h*(_+E),H=Math.atan2(O-R,k-A),W=Math.atan2(N-R,L-A);return{cx:A+t,cy:R+n,radius:o,startAngle:H,endAngle:W,anticlockwise:f*h>p*d}}static arc(t,n,r,i,o,s,l,c,d){const f=l-s,h=jg._segmentsCount(Math.abs(f)*o,Math.ceil(Math.abs(f)/yC)*40),p=f/(h*2),g=p*2,v=Math.cos(p),y=Math.sin(p),S=h-1,_=S%1/S;for(let b=0;b<=S;++b){const x=b+_*b,E=p+s+g*x,A=Math.cos(E),R=-Math.sin(E);d.push((v*A+y*R)*o+r,(v*-R+y*A)*o+i)}}}class kUe{constructor(){this.reset()}begin(t,n,r){this.reset(),this.style=t,this.start=n,this.attribStart=r}end(t,n){this.attribSize=n-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Tj{static curveLength(t,n,r,i,o,s,l,c){let f=0,h=0,p=0,g=0,v=0,y=0,S=0,_=0,b=0,x=0,E=0,A=t,R=n;for(let k=1;k<=10;++k)h=k/10,p=h*h,g=p*h,v=1-h,y=v*v,S=y*v,_=S*t+3*y*h*r+3*v*p*o+g*l,b=S*n+3*y*h*i+3*v*p*s+g*c,x=A-_,E=R-b,A=_,R=b,f+=Math.sqrt(x*x+E*E);return f}static curveTo(t,n,r,i,o,s,l){const c=l[l.length-2],d=l[l.length-1];l.length-=2;const f=jg._segmentsCount(Tj.curveLength(c,d,t,n,r,i,o,s));let h=0,p=0,g=0,v=0,y=0;l.push(c,d);for(let S=1,_=0;S<=f;++S)_=S/f,h=1-_,p=h*h,g=p*h,v=_*_,y=v*_,l.push(g*c+3*p*_*t+3*h*v*r+y*o,g*d+3*p*_*n+3*h*v*i+y*s)}}function P7(e,t,n,r,i,o,s,l){const c=e-n*i,d=t-r*i,f=e+n*o,h=t+r*o;let p,g;s?(p=r,g=-n):(p=-r,g=n);const v=c+p,y=d+g,S=f+p,_=h+g;return l.push(v,y,S,_),2}function Eh(e,t,n,r,i,o,s,l){const c=n-e,d=r-t;let f=Math.atan2(c,d),h=Math.atan2(i-e,o-t);l&&fh&&(h+=Math.PI*2);let p=f;const g=h-f,v=Math.abs(g),y=Math.sqrt(c*c+d*d),S=(15*v*Math.sqrt(y)/Math.PI>>0)+1,_=g/S;if(p+=_,l){s.push(e,t,n,r);for(let b=1,x=p;b=0&&(o.join===Va.ROUND?p+=Eh(x,E,x-k*z,E-O*z,x-L*z,E-N*z,f,!1)+4:p+=2,f.push(x-L*D,E-N*D,x+L*z,E+N*z));continue}const se=(-k+_)*(-O+E)-(-k+x)*(-O+b),Q=(-L+A)*(-N+E)-(-L+x)*(-N+R),ae=(G*Q-Y*se)/ce,le=(J*se-K*Q)/ce,he=(ae-x)*(ae-x)+(le-E)*(le-E),pe=x+(ae-x)*z,ve=E+(le-E)*z,ye=x-(ae-x)*D,xe=E-(le-E)*D,me=Math.min(G*G+K*K,Y*Y+J*J),be=ue?z:D,Qe=me+be*be*y,qe=he<=Qe;let at=o.join;if(at===Va.MITER&&he/y>S&&(at=Va.BEVEL),qe)switch(at){case Va.MITER:{f.push(pe,ve,ye,xe);break}case Va.BEVEL:{ue?f.push(pe,ve,x+k*D,E+O*D,pe,ve,x+L*D,E+N*D):f.push(x-k*z,E-O*z,ye,xe,x-L*z,E-N*z,ye,xe),p+=2;break}case Va.ROUND:{ue?(f.push(pe,ve,x+k*D,E+O*D),p+=Eh(x,E,x+k*D,E+O*D,x+L*D,E+N*D,f,!0)+4,f.push(pe,ve,x+L*D,E+N*D)):(f.push(x-k*z,E-O*z,ye,xe),p+=Eh(x,E,x-k*z,E-O*z,x-L*z,E-N*z,f,!1)+4,f.push(x-L*z,E-N*z,ye,xe));break}}else{switch(f.push(x-k*z,E-O*z,x+k*D,E+O*D),at){case Va.MITER:{ue?f.push(ye,xe,ye,xe):f.push(pe,ve,pe,ve),p+=2;break}case Va.ROUND:{ue?p+=Eh(x,E,x+k*D,E+O*D,x+L*D,E+N*D,f,!0)+2:p+=Eh(x,E,x-k*z,E-O*z,x-L*z,E-N*z,f,!1)+2;break}}f.push(x-L*z,E-N*z,x+L*D,E+N*D),p+=2}}_=r[(h-2)*2],b=r[(h-2)*2+1],x=r[(h-1)*2],E=r[(h-1)*2+1],k=-(b-E),O=_-x,H=Math.sqrt(k*k+O*O),k/=H,O/=H,k*=v,O*=v,f.push(x-k*z,E-O*z,x+k*D,E+O*D),c||(o.cap===Xh.ROUND?p+=Eh(x-k*(z-D)*.5,E-O*(z-D)*.5,x-k*z,E-O*z,x+k*D,E+O*D,f,!1)+2:o.cap===Xh.SQUARE&&(p+=P7(x,E,k,O,z,D,!1,f)));const F=t.indices,j=jg.epsilon*jg.epsilon;for(let V=g;V0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,n=null,r=null){const i=new EC(e,t,n,r);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const n=new EC(e,null,null,t),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(n=this.batches[this.batches.length-1],r=n.style);for(let l=this.shapeIndex;l65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&s===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=s?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(r=V_.pop(),r||(r=new A3,r.texArray=new I3),this.drawCalls.push(r)),r.start=d,r.size=0,r.texArray.count=0,r.type=c),v.touched=1,v._batchEnabled=e,v._batchLocation=i,v.wrapMode=Pd.REPEAT,r.texArray.elements[r.texArray.count++]=v,i++)),r.size+=h.size,d+=h.size,s=v._batchLocation,this.addColors(t,g.color,g.alpha,h.attribSize,h.attribStart),this.addTextureIds(n,s,h.attribSize,h.attribStart)}Gt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,n=this.colors,r=this.textureIds,i=new ArrayBuffer(e.length*3*4),o=new Float32Array(i),s=new Uint32Array(i);let l=0;for(let c=0;c0&&e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:n},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new ag,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new ag,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const n=this.currentPath.points,r=n[n.length-2],i=n[n.length-1];return(r!==e||i!==t)&&n.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,n,r){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),kj.curveTo(e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,o){return this._initCurve(),Tj.curveTo(e,t,n,r,i,o,this.currentPath.points),this}arcTo(e,t,n,r,i){this._initCurve(e,t);const o=this.currentPath.points,s=I7.curveTo(e,t,n,r,i,o);if(s){const{cx:l,cy:c,radius:d,startAngle:f,endAngle:h,anticlockwise:p}=s;this.arc(l,c,d,f,h,p)}return this}arc(e,t,n,r,i,o=!1){if(r===i)return this;if(!o&&i<=r?i+=yC:o&&r<=i&&(r+=yC),i-r===0)return this;const l=e+Math.cos(r)*n,c=t+Math.sin(r)*n,d=this._geometry.closePointEps;let f=this.currentPath?this.currentPath.points:null;if(f){const h=Math.abs(f[f.length-2]-l),p=Math.abs(f[f.length-1]-c);h0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:n},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,n,r){return this.drawShape(new Kt(e,t,n,r))}drawRoundedRect(e,t,n,r,i){return this.drawShape(new _j(e,t,n,r,i))}drawCircle(e,t,n){return this.drawShape(new xj(e,t,n))}drawEllipse(e,t,n,r){return this.drawShape(new wj(e,t,n,r))}drawPolygon(...e){let t,n=!0;const r=e[0];r.points?(n=r.closeStroke,t=r.points):Array.isArray(e[0])?t=e[0]:t=e;const i=new ag(t);return i.closeStroke=n,this.drawShape(i),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===zi.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,n=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=n,this.vertexData=new Float32Array(e.points);for(let r=0;rr&&!t.autoResize&&(s=r);let l=t._buffers;l||(l=t._buffers=this.generateBuffers(t));const c=n[0]._texture.baseTexture,d=c.alphaMode>0;this.state.blendMode=Rte(t.blendMode,d),o.state.set(this.state);const f=o.gl,h=t.worldTransform.copyTo(this.tempMatrix);h.prepend(o.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=zn.shared.setValue(t.tintRgb).premultiply(t.worldAlpha,d).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=c,this.renderer.shader.bind(this.shader);let p=!1;for(let g=0,v=0;gi&&(y=i),v>=l.length&&l.push(this._generateOneMoreBuffer(t));const S=l[v];S.uploadDynamic(n,g,y);const _=t._bufferUpdateIDs[v]||0;p=p||S._updateID<_,p&&(S._updateID=t._updateID,S.uploadStatic(n,g,y)),o.geometry.bind(S.geometry),f.drawElements(f.TRIANGLES,y*6,f.UNSIGNED_SHORT,0)}}generateBuffers(t){const n=[],r=t._maxSize,i=t._batchSize,o=t._properties;for(let s=0;s0);i[s]=d,i[s+o]=d,i[s+o*2]=d,i[s+o*3]=d,s+=o*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Ane.extension={name:"particle",type:rt.RendererPlugin};bt.add(Ane);var qk=(e=>(e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",e))(qk||{});const q_={willReadFrequently:!0},gt=class{static get experimentalLetterSpacingSupported(){let e=gt._experimentalLetterSpacingSupported;if(e!==void 0){const t=tt.ADAPTER.getCanvasRenderingContext2D().prototype;e=gt._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,n,r,i,o,s,l,c){this.text=e,this.style=t,this.width=n,this.height=r,this.lines=i,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=l,this.fontProperties=c}static measureText(e,t,n,r=gt._canvas){n=n??t.wordWrap;const i=t.toFontString(),o=gt.measureFont(i);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const s=r.getContext("2d",q_);s.font=i;const c=(n?gt.wordWrap(e,t,r):e).split(/(?:\r\n|\r|\n)/),d=new Array(c.length);let f=0;for(let v=0;v0&&(r?i-=t:i+=(gt.graphemeSegmenter(e).length-1)*t),i}static wordWrap(e,t,n=gt._canvas){const r=n.getContext("2d",q_);let i=0,o="",s="";const l=Object.create(null),{letterSpacing:c,whiteSpace:d}=t,f=gt.collapseSpaces(d),h=gt.collapseNewlines(d);let p=!f;const g=t.wordWrapWidth+c,v=gt.tokenize(e);for(let y=0;yg)if(o!==""&&(s+=gt.addLine(o),o="",i=0),gt.canBreakWords(S,t.breakWords)){const b=gt.wordWrapSplit(S);for(let x=0;xg&&(s+=gt.addLine(o),p=!1,o="",i=0),o+=E,i+=k}}else{o.length>0&&(s+=gt.addLine(o),o="",i=0);const b=y===v.length-1;s+=gt.addLine(S,!b),p=!1,o="",i=0}else _+i>g&&(p=!1,s+=gt.addLine(o),o="",i=0),(o.length>0||!gt.isBreakingSpace(S)||p)&&(o+=S,i+=_)}return s+=gt.addLine(o,!1),s}static addLine(e,t=!0){return e=gt.trimRight(e),e=t?`${e} -`:e,e}static getFromCache(e,t,n,r){let i=n[e];return typeof i!="number"&&(i=gt._measureText(e,t,r)+t,n[e]=i),i}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const n=e[t];if(!gt.isBreakingSpace(n))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:gt._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:gt._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let n="";if(typeof e!="string")return t;for(let r=0;rs;--h){for(let v=0;v{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const e=new Intl.Segmenter;return t=>[...e.segment(t)].map(n=>n.segment)}return e=>[...e]})();Fi.experimentalLetterSpacing=!1;Fi._fonts={};Fi._newlines=[10,13];Fi._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];const LUe=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],qb=class{constructor(e){this.styleID=0,this.reset(),bB(this,e,e)}clone(){const e={};return bB(e,this,qb.defaultStyle),new qb(e)}reset(){bB(this,qb.defaultStyle,qb.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=yB(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=yB(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){NUe(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const t=yB(e);this._stroke!==t&&(this._stroke=t,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(let n=t.length-1;n>=0;n--){let r=t[n].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&!LUe.includes(r)&&(r=`"${r}"`),t[n]=r}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};let Au=qb;Au.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:qk.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};function yB(e){const t=zn.shared;return Array.isArray(e)?e.map(n=>t.setValue(n).toHex()):t.setValue(e).toHex()}function NUe(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n0&&g>v&&(y=(v+g)/2);const S=v+h,_=n.lineHeight*(p+1);let b=S;p+10}}function FUe(e,t){var r;let n=!1;if((r=e==null?void 0:e._textures)!=null&&r.length){for(let i=0;i{this.queue&&this.prepareItems()},this.registerFindHook(WUe),this.registerFindHook(GUe),this.registerFindHook(FUe),this.registerFindHook(zUe),this.registerFindHook(jUe),this.registerUploadHook(UUe),this.registerUploadHook(HUe)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,Xr.system.addOnce(this.tick,this,Cp.UTILITY))):t()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let t=!1;if(e&&!e._destroyed){for(let n=0,r=this.uploadHooks.length;n=0;t--)this.add(e.children[t]);return this}destroy(){this.ticking&&Xr.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};let CC=Rne;CC.uploadsPerFrame=4;Object.defineProperties(tt,{UPLOADS_PER_FRAME:{get(){return CC.uploadsPerFrame},set(e){cn("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),CC.uploadsPerFrame=e}}});function Ine(e,t){return t instanceof Vt?(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0):!1}function VUe(e,t){if(!(t instanceof Ug))return!1;const{geometry:n}=t;t.finishPoly(),n.updateBatches();const{batches:r}=n;for(let i=0;ir&&!t.autoResize&&(s=r);let l=t._buffers;l||(l=t._buffers=this.generateBuffers(t));const c=n[0]._texture.baseTexture,d=c.alphaMode>0;this.state.blendMode=Rte(t.blendMode,d),o.state.set(this.state);const f=o.gl,h=t.worldTransform.copyTo(this.tempMatrix);h.prepend(o.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=zn.shared.setValue(t.tintRgb).premultiply(t.worldAlpha,d).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=c,this.renderer.shader.bind(this.shader);let p=!1;for(let g=0,v=0;gi&&(y=i),v>=l.length&&l.push(this._generateOneMoreBuffer(t));const S=l[v];S.uploadDynamic(n,g,y);const _=t._bufferUpdateIDs[v]||0;p=p||S._updateID<_,p&&(S._updateID=t._updateID,S.uploadStatic(n,g,y)),o.geometry.bind(S.geometry),f.drawElements(f.TRIANGLES,y*6,f.UNSIGNED_SHORT,0)}}generateBuffers(t){const n=[],r=t._maxSize,i=t._batchSize,o=t._properties;for(let s=0;s0);i[s]=d,i[s+o]=d,i[s+o*2]=d,i[s+o*3]=d,s+=o*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Ane.extension={name:"particle",type:rt.RendererPlugin};bt.add(Ane);var qk=(e=>(e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",e))(qk||{});const q_={willReadFrequently:!0},gt=class{static get experimentalLetterSpacingSupported(){let e=gt._experimentalLetterSpacingSupported;if(e!==void 0){const t=tt.ADAPTER.getCanvasRenderingContext2D().prototype;e=gt._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,n,r,i,o,s,l,c){this.text=e,this.style=t,this.width=n,this.height=r,this.lines=i,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=l,this.fontProperties=c}static measureText(e,t,n,r=gt._canvas){n=n??t.wordWrap;const i=t.toFontString(),o=gt.measureFont(i);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const s=r.getContext("2d",q_);s.font=i;const c=(n?gt.wordWrap(e,t,r):e).split(/(?:\r\n|\r|\n)/),d=new Array(c.length);let f=0;for(let v=0;v0&&(r?i-=t:i+=(gt.graphemeSegmenter(e).length-1)*t),i}static wordWrap(e,t,n=gt._canvas){const r=n.getContext("2d",q_);let i=0,o="",s="";const l=Object.create(null),{letterSpacing:c,whiteSpace:d}=t,f=gt.collapseSpaces(d),h=gt.collapseNewlines(d);let p=!f;const g=t.wordWrapWidth+c,v=gt.tokenize(e);for(let y=0;yg)if(o!==""&&(s+=gt.addLine(o),o="",i=0),gt.canBreakWords(S,t.breakWords)){const b=gt.wordWrapSplit(S);for(let x=0;xg&&(s+=gt.addLine(o),p=!1,o="",i=0),o+=E,i+=k}}else{o.length>0&&(s+=gt.addLine(o),o="",i=0);const b=y===v.length-1;s+=gt.addLine(S,!b),p=!1,o="",i=0}else _+i>g&&(p=!1,s+=gt.addLine(o),o="",i=0),(o.length>0||!gt.isBreakingSpace(S)||p)&&(o+=S,i+=_)}return s+=gt.addLine(o,!1),s}static addLine(e,t=!0){return e=gt.trimRight(e),e=t?`${e} +`:e,e}static getFromCache(e,t,n,r){let i=n[e];return typeof i!="number"&&(i=gt._measureText(e,t,r)+t,n[e]=i),i}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const n=e[t];if(!gt.isBreakingSpace(n))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:gt._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:gt._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let n="";if(typeof e!="string")return t;for(let r=0;rs;--h){for(let v=0;v{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const e=new Intl.Segmenter;return t=>[...e.segment(t)].map(n=>n.segment)}return e=>[...e]})();Fi.experimentalLetterSpacing=!1;Fi._fonts={};Fi._newlines=[10,13];Fi._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];const NUe=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],qb=class{constructor(e){this.styleID=0,this.reset(),bB(this,e,e)}clone(){const e={};return bB(e,this,qb.defaultStyle),new qb(e)}reset(){bB(this,qb.defaultStyle,qb.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=yB(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=yB(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){BUe(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const t=yB(e);this._stroke!==t&&(this._stroke=t,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(let n=t.length-1;n>=0;n--){let r=t[n].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&!NUe.includes(r)&&(r=`"${r}"`),t[n]=r}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};let Au=qb;Au.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:qk.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};function yB(e){const t=zn.shared;return Array.isArray(e)?e.map(n=>t.setValue(n).toHex()):t.setValue(e).toHex()}function BUe(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n0&&g>v&&(y=(v+g)/2);const S=v+h,_=n.lineHeight*(p+1);let b=S;p+10}}function zUe(e,t){var r;let n=!1;if((r=e==null?void 0:e._textures)!=null&&r.length){for(let i=0;i{this.queue&&this.prepareItems()},this.registerFindHook(GUe),this.registerFindHook(VUe),this.registerFindHook(zUe),this.registerFindHook(jUe),this.registerFindHook(UUe),this.registerUploadHook(HUe),this.registerUploadHook(WUe)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,Xr.system.addOnce(this.tick,this,Cp.UTILITY))):t()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let t=!1;if(e&&!e._destroyed){for(let n=0,r=this.uploadHooks.length;n=0;t--)this.add(e.children[t]);return this}destroy(){this.ticking&&Xr.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};let CC=Rne;CC.uploadsPerFrame=4;Object.defineProperties(tt,{UPLOADS_PER_FRAME:{get(){return CC.uploadsPerFrame},set(e){cn("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),CC.uploadsPerFrame=e}}});function Ine(e,t){return t instanceof Gt?(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0):!1}function qUe(e,t){if(!(t instanceof Ug))return!1;const{geometry:n}=t;t.finishPoly(),n.updateBatches();const{batches:r}=n;for(let i=0;i1?Gl.from(YUe,XUe,n):Gl.from(B7,KUe,n)}render(t){const n=this.renderer,r=this.quad;let i=r.vertices;i[0]=i[6]=t._width*-t.anchor.x,i[1]=i[3]=t._height*-t.anchor.y,i[2]=i[4]=t._width*(1-t.anchor.x),i[5]=i[7]=t._height*(1-t.anchor.y);const o=t.uvRespectAnchor?t.anchor.x:0,s=t.uvRespectAnchor?t.anchor.y:0;i=r.uvs,i[0]=i[6]=-o,i[1]=i[3]=-s,i[2]=i[4]=1-o,i[5]=i[7]=1-s,r.invalidate();const l=t._texture,c=l.baseTexture,d=c.alphaMode>0,f=t.tileTransform.localTransform,h=t.uvMatrix;let p=c.isPowerOfTwo&&l.frame.width===c.width&&l.frame.height===c.height;p&&(c._glTextures[n.CONTEXT_UID]?p=c.wrapMode!==Pd.CLAMP:c.wrapMode===Pd.CLAMP&&(c.wrapMode=Pd.REPEAT));const g=p?this.simpleShader:this.shader,v=l.width,y=l.height,S=t._width,_=t._height;X_.set(f.a*v/S,f.b*v/_,f.c*y/S,f.d*y/_,f.tx/S,f.ty/_),X_.invert(),p?X_.prepend(h.mapCoord):(g.uniforms.uMapCoord=h.mapCoord.toArray(!0),g.uniforms.uClampFrame=h.uClampFrame,g.uniforms.uClampOffset=h.uClampOffset),g.uniforms.uTransform=X_.toArray(!0),g.uniforms.uColor=zn.shared.setValue(t.tint).premultiply(t.worldAlpha,d).toArray(g.uniforms.uColor),g.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),g.uniforms.uSampler=l,n.shader.bind(g),n.geometry.bind(r),this.state.blendMode=Rte(t.blendMode,d),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}One.extension={name:"tilingSprite",type:rt.RendererPlugin};bt.add(One);const Xb=class{constructor(e,t,n=null){this.linkedSheets=[],this._texture=e instanceof ht?e:null,this.baseTexture=e instanceof Vt?e:this._texture.baseTexture,this.textures={},this.animations={},this.data=t;const r=this.baseTexture.resource;this.resolution=this._updateResolution(n||(r?r.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let n=zd(e,null);return n===null&&(n=parseFloat(t??"1")),n!==1&&this.baseTexture.setResolution(n),n}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=Xb.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const n=Xb.BATCH_SIZE;for(;t-e{this._batchIndex*Xb.BATCH_SIZE{r[i]=t}),Object.keys(t.textures).forEach(i=>{r[i]=t.textures[i]}),!n){const i=to.dirname(e[0]);t.linkedSheets.forEach((o,s)=>{const l=Mne([`${i}/${t.data.meta.related_multi_packs[s]}`],o,!0);Object.assign(r,l)})}return r}const ZUe={extension:rt.Asset,cache:{test:e=>e instanceof W3,getCacheableAssets:(e,t)=>Mne(e,t,!1)},resolver:{test:e=>{const n=e.split("?")[0].split("."),r=n.pop(),i=n.pop();return r==="json"&&JUe.includes(i)},parse:e=>{var n;const t=e.split(".");return{resolution:parseFloat(((n=tt.RETINA_PREFIX.exec(e))==null?void 0:n[1])??"1"),format:t[t.length-2],src:e}}},loader:{name:"spritesheetLoader",extension:{type:rt.LoadParser,priority:oc.Normal},async testParse(e,t){return to.extname(t.src).toLowerCase()===".json"&&!!e.frames},async parse(e,t,n){var d,f;let r=to.dirname(t.src);r&&r.lastIndexOf("/")!==r.length-1&&(r+="/");let i=r+e.meta.image;i=z3(i,t.src);const s=(await n.load([i]))[i],l=new W3(s.baseTexture,e,t.src);await l.parse();const c=(d=e==null?void 0:e.meta)==null?void 0:d.related_multi_packs;if(Array.isArray(c)){const h=[];for(const g of c){if(typeof g!="string")continue;let v=r+g;(f=t.data)!=null&&f.ignoreMultiPack||(v=z3(v,t.src),h.push(n.load({src:v,data:{ignoreMultiPack:!0}})))}const p=await Promise.all(h);l.linkedSheets=p,p.forEach(g=>{g.linkedSheets=[l].concat(l.linkedSheets.filter(v=>v!==g))})}return l},unload(e){e.destroy(!0)}}};bt.add(ZUe);class TC{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class WS{static test(t){return typeof t=="string"&&t.startsWith("info face=")}static parse(t){const n=t.match(/^[a-z]+\s+.+$/gm),r={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const o in n){const s=n[o].match(/^[a-z]+/gm)[0],l=n[o].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),c={};for(const d in l){const f=l[d].split("="),h=f[0],p=f[1].replace(/"/gm,""),g=parseFloat(p),v=isNaN(g)?p:g;c[h]=v}r[s].push(c)}const i=new TC;return r.info.forEach(o=>i.info.push({face:o.face,size:parseInt(o.size,10)})),r.common.forEach(o=>i.common.push({lineHeight:parseInt(o.lineHeight,10)})),r.page.forEach(o=>i.page.push({id:parseInt(o.id,10),file:o.file})),r.char.forEach(o=>i.char.push({id:parseInt(o.id,10),page:parseInt(o.page,10),x:parseInt(o.x,10),y:parseInt(o.y,10),width:parseInt(o.width,10),height:parseInt(o.height,10),xoffset:parseInt(o.xoffset,10),yoffset:parseInt(o.yoffset,10),xadvance:parseInt(o.xadvance,10)})),r.kerning.forEach(o=>i.kerning.push({first:parseInt(o.first,10),second:parseInt(o.second,10),amount:parseInt(o.amount,10)})),r.distanceField.forEach(o=>i.distanceField.push({distanceRange:parseInt(o.distanceRange,10),fieldType:o.fieldType})),i}}class G3{static test(t){const n=t;return"getElementsByTagName"in n&&n.getElementsByTagName("page").length&&n.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(t){const n=new TC,r=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),o=t.getElementsByTagName("page"),s=t.getElementsByTagName("char"),l=t.getElementsByTagName("kerning"),c=t.getElementsByTagName("distanceField");for(let d=0;d")?G3.test(tt.ADAPTER.parseXML(t)):!1}static parse(t){return G3.parse(tt.ADAPTER.parseXML(t))}}const xB=[WS,G3,V3];function e8e(e){for(let t=0;t=l-L*o){if(v===0)throw new Error(`[BitmapFont] textureHeight ${l}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${R}')`);--A,y=null,S=null,_=null,v=0,g=0,b=0;continue}if(b=Math.max(L+k.fontProperties.descent,b),N*o+g>=h){if(g===0)throw new Error(`[BitmapFont] textureWidth ${s}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${R}')`);--A,v+=b*o,v=Math.ceil(v),g=0,b=0;continue}n8e(y,S,k,g,v,o,f);const H=GS(k.text);p.char.push({id:H,page:x.length-1,x:g/o,y:v/o,width:N,height:L,xoffset:0,yoffset:0,xadvance:O-(f.dropShadow?f.dropShadowDistance:0)-(f.stroke?f.strokeThickness:0)}),g+=(N+2*i)*o,g=Math.ceil(g)}for(let A=0,R=d.length;A1?Gl.from(KUe,YUe,n):Gl.from(B7,QUe,n)}render(t){const n=this.renderer,r=this.quad;let i=r.vertices;i[0]=i[6]=t._width*-t.anchor.x,i[1]=i[3]=t._height*-t.anchor.y,i[2]=i[4]=t._width*(1-t.anchor.x),i[5]=i[7]=t._height*(1-t.anchor.y);const o=t.uvRespectAnchor?t.anchor.x:0,s=t.uvRespectAnchor?t.anchor.y:0;i=r.uvs,i[0]=i[6]=-o,i[1]=i[3]=-s,i[2]=i[4]=1-o,i[5]=i[7]=1-s,r.invalidate();const l=t._texture,c=l.baseTexture,d=c.alphaMode>0,f=t.tileTransform.localTransform,h=t.uvMatrix;let p=c.isPowerOfTwo&&l.frame.width===c.width&&l.frame.height===c.height;p&&(c._glTextures[n.CONTEXT_UID]?p=c.wrapMode!==Pd.CLAMP:c.wrapMode===Pd.CLAMP&&(c.wrapMode=Pd.REPEAT));const g=p?this.simpleShader:this.shader,v=l.width,y=l.height,S=t._width,_=t._height;X_.set(f.a*v/S,f.b*v/_,f.c*y/S,f.d*y/_,f.tx/S,f.ty/_),X_.invert(),p?X_.prepend(h.mapCoord):(g.uniforms.uMapCoord=h.mapCoord.toArray(!0),g.uniforms.uClampFrame=h.uClampFrame,g.uniforms.uClampOffset=h.uClampOffset),g.uniforms.uTransform=X_.toArray(!0),g.uniforms.uColor=zn.shared.setValue(t.tint).premultiply(t.worldAlpha,d).toArray(g.uniforms.uColor),g.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),g.uniforms.uSampler=l,n.shader.bind(g),n.geometry.bind(r),this.state.blendMode=Rte(t.blendMode,d),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}One.extension={name:"tilingSprite",type:rt.RendererPlugin};bt.add(One);const Xb=class{constructor(e,t,n=null){this.linkedSheets=[],this._texture=e instanceof ht?e:null,this.baseTexture=e instanceof Gt?e:this._texture.baseTexture,this.textures={},this.animations={},this.data=t;const r=this.baseTexture.resource;this.resolution=this._updateResolution(n||(r?r.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let n=zd(e,null);return n===null&&(n=parseFloat(t??"1")),n!==1&&this.baseTexture.setResolution(n),n}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=Xb.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const n=Xb.BATCH_SIZE;for(;t-e{this._batchIndex*Xb.BATCH_SIZE{r[i]=t}),Object.keys(t.textures).forEach(i=>{r[i]=t.textures[i]}),!n){const i=no.dirname(e[0]);t.linkedSheets.forEach((o,s)=>{const l=Mne([`${i}/${t.data.meta.related_multi_packs[s]}`],o,!0);Object.assign(r,l)})}return r}const e8e={extension:rt.Asset,cache:{test:e=>e instanceof W3,getCacheableAssets:(e,t)=>Mne(e,t,!1)},resolver:{test:e=>{const n=e.split("?")[0].split("."),r=n.pop(),i=n.pop();return r==="json"&&ZUe.includes(i)},parse:e=>{var n;const t=e.split(".");return{resolution:parseFloat(((n=tt.RETINA_PREFIX.exec(e))==null?void 0:n[1])??"1"),format:t[t.length-2],src:e}}},loader:{name:"spritesheetLoader",extension:{type:rt.LoadParser,priority:oc.Normal},async testParse(e,t){return no.extname(t.src).toLowerCase()===".json"&&!!e.frames},async parse(e,t,n){var d,f;let r=no.dirname(t.src);r&&r.lastIndexOf("/")!==r.length-1&&(r+="/");let i=r+e.meta.image;i=z3(i,t.src);const s=(await n.load([i]))[i],l=new W3(s.baseTexture,e,t.src);await l.parse();const c=(d=e==null?void 0:e.meta)==null?void 0:d.related_multi_packs;if(Array.isArray(c)){const h=[];for(const g of c){if(typeof g!="string")continue;let v=r+g;(f=t.data)!=null&&f.ignoreMultiPack||(v=z3(v,t.src),h.push(n.load({src:v,data:{ignoreMultiPack:!0}})))}const p=await Promise.all(h);l.linkedSheets=p,p.forEach(g=>{g.linkedSheets=[l].concat(l.linkedSheets.filter(v=>v!==g))})}return l},unload(e){e.destroy(!0)}}};bt.add(e8e);class TC{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class WS{static test(t){return typeof t=="string"&&t.startsWith("info face=")}static parse(t){const n=t.match(/^[a-z]+\s+.+$/gm),r={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const o in n){const s=n[o].match(/^[a-z]+/gm)[0],l=n[o].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),c={};for(const d in l){const f=l[d].split("="),h=f[0],p=f[1].replace(/"/gm,""),g=parseFloat(p),v=isNaN(g)?p:g;c[h]=v}r[s].push(c)}const i=new TC;return r.info.forEach(o=>i.info.push({face:o.face,size:parseInt(o.size,10)})),r.common.forEach(o=>i.common.push({lineHeight:parseInt(o.lineHeight,10)})),r.page.forEach(o=>i.page.push({id:parseInt(o.id,10),file:o.file})),r.char.forEach(o=>i.char.push({id:parseInt(o.id,10),page:parseInt(o.page,10),x:parseInt(o.x,10),y:parseInt(o.y,10),width:parseInt(o.width,10),height:parseInt(o.height,10),xoffset:parseInt(o.xoffset,10),yoffset:parseInt(o.yoffset,10),xadvance:parseInt(o.xadvance,10)})),r.kerning.forEach(o=>i.kerning.push({first:parseInt(o.first,10),second:parseInt(o.second,10),amount:parseInt(o.amount,10)})),r.distanceField.forEach(o=>i.distanceField.push({distanceRange:parseInt(o.distanceRange,10),fieldType:o.fieldType})),i}}class G3{static test(t){const n=t;return"getElementsByTagName"in n&&n.getElementsByTagName("page").length&&n.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(t){const n=new TC,r=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),o=t.getElementsByTagName("page"),s=t.getElementsByTagName("char"),l=t.getElementsByTagName("kerning"),c=t.getElementsByTagName("distanceField");for(let d=0;d")?G3.test(tt.ADAPTER.parseXML(t)):!1}static parse(t){return G3.parse(tt.ADAPTER.parseXML(t))}}const xB=[WS,G3,V3];function t8e(e){for(let t=0;t=l-L*o){if(v===0)throw new Error(`[BitmapFont] textureHeight ${l}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${R}')`);--A,y=null,S=null,_=null,v=0,g=0,b=0;continue}if(b=Math.max(L+k.fontProperties.descent,b),N*o+g>=h){if(g===0)throw new Error(`[BitmapFont] textureWidth ${s}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${R}')`);--A,v+=b*o,v=Math.ceil(v),g=0,b=0;continue}r8e(y,S,k,g,v,o,f);const H=GS(k.text);p.char.push({id:H,page:x.length-1,x:g/o,y:v/o,width:N,height:L,xoffset:0,yoffset:0,xadvance:O-(f.dropShadow?f.dropShadowDistance:0)-(f.stroke?f.strokeThickness:0)}),g+=(N+2*i)*o,g=Math.ceil(g)}for(let A=0,R=d.length;A{this.dirty=!0},this,0,0),this._roundPixels=tt.ROUND_PIXELS,this.dirty=!0,this._resolution=tt.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var N;const e=Lo.available[this._fontName],t=this.fontSize,n=t/e.size,r=new Ot,i=[],o=[],s=[],l=this._text.replace(/(?:\r\n|\r)/g,` `)||" ",c=Dne(l),d=this._maxWidth*e.size/t,f=e.distanceFieldType==="none"?$7:F7;let h=null,p=0,g=0,v=0,y=-1,S=0,_=0,b=0,x=0;for(let H=0;H0&&r.x>d&&(++_,sg(i,1+y-_,1+H-y),H=y,y=-1,o.push(S),s.push(i.length>0?i[i.length-1].prevSpaces:0),g=Math.max(g,S),v++,r.x=0,r.y+=e.lineHeight,h=null,x=0)}const E=c[c.length-1];E!=="\r"&&E!==` -`&&(/(?:\s)/.test(E)&&(p=S),o.push(p),g=Math.max(g,p),s.push(-1));const A=[];for(let H=0;H<=v;H++){let W=0;this._align==="right"?W=g-o[H]:this._align==="center"?W=(g-o[H])/2:this._align==="justify"&&(W=s[H]<0?0:(g-o[H])/s[H]),A.push(W)}const R=i.length,k={},O=[],L=this._activePagesMeshData;f.push(...L);for(let H=0;H6*z)||W.vertices.lengtht[i.mesh.texture.baseTexture.uid]).forEach(i=>{i.mesh.texture=ht.EMPTY});for(const i in t)t[i].destroy(),delete t[i];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};let s8e=Lne;s8e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const a8e=[".xml",".fnt"],l8e={extension:{type:rt.LoadParser,priority:oc.Normal},name:"loadBitmapFont",test(e){return a8e.includes(to.extname(e).toLowerCase())},async testParse(e){return WS.test(e)||V3.test(e)},async parse(e,t,n){const r=WS.test(e)?WS.parse(e):V3.parse(e),{src:i}=t,{page:o}=r,s=[];for(let d=0;dl[d]);return Lo.install(r,c,!0)},async load(e,t){return(await tt.ADAPTER.fetch(e)).text()},unload(e){e.destroy()}};bt.add(l8e);const mm=class extends Au{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new mm(Object.keys(mm.defaultOptions).reduce((t,n)=>({...t,[n]:e[n]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete mm.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:n}=mm;if(n[e]){const r=n[e];return this._fonts.push(r),r.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return tt.ADAPTER.fetch(e).then(r=>r.blob()).then(async r=>new Promise((i,o)=>{const s=URL.createObjectURL(r),l=new FileReader;l.onload=()=>i([s,l.result]),l.onerror=o,l.readAsDataURL(r)})).then(async([r,i])=>{const o=Object.assign({family:to.basename(e,to.extname(e)),weight:"normal",style:"normal",src:r,dataSrc:i,refs:1,originalUrl:e,fontFace:null},t);n[e]=o,this._fonts.push(o),this.styleID++;const s=new FontFace(o.family,`url(${o.src})`,{weight:o.weight,style:o.style});o.fontFace=s,await s.load(),document.fonts.add(s),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const t=e.filter(n=>!this._overrides.includes(n));t.length>0&&(this._overrides.push(...t),this.styleID++)}removeOverride(...e){const t=e.filter(n=>this._overrides.includes(n));t.length>0&&(this._overrides=this._overrides.filter(n=>!t.includes(n)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,t)=>`${e} +`&&(/(?:\s)/.test(E)&&(p=S),o.push(p),g=Math.max(g,p),s.push(-1));const A=[];for(let H=0;H<=v;H++){let W=0;this._align==="right"?W=g-o[H]:this._align==="center"?W=(g-o[H])/2:this._align==="justify"&&(W=s[H]<0?0:(g-o[H])/s[H]),A.push(W)}const R=i.length,k={},O=[],L=this._activePagesMeshData;f.push(...L);for(let H=0;H6*z)||W.vertices.lengtht[i.mesh.texture.baseTexture.uid]).forEach(i=>{i.mesh.texture=ht.EMPTY});for(const i in t)t[i].destroy(),delete t[i];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};let a8e=Lne;a8e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const l8e=[".xml",".fnt"],c8e={extension:{type:rt.LoadParser,priority:oc.Normal},name:"loadBitmapFont",test(e){return l8e.includes(no.extname(e).toLowerCase())},async testParse(e){return WS.test(e)||V3.test(e)},async parse(e,t,n){const r=WS.test(e)?WS.parse(e):V3.parse(e),{src:i}=t,{page:o}=r,s=[];for(let d=0;dl[d]);return Lo.install(r,c,!0)},async load(e,t){return(await tt.ADAPTER.fetch(e)).text()},unload(e){e.destroy()}};bt.add(c8e);const mm=class extends Au{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new mm(Object.keys(mm.defaultOptions).reduce((t,n)=>({...t,[n]:e[n]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete mm.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:n}=mm;if(n[e]){const r=n[e];return this._fonts.push(r),r.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return tt.ADAPTER.fetch(e).then(r=>r.blob()).then(async r=>new Promise((i,o)=>{const s=URL.createObjectURL(r),l=new FileReader;l.onload=()=>i([s,l.result]),l.onerror=o,l.readAsDataURL(r)})).then(async([r,i])=>{const o=Object.assign({family:no.basename(e,no.extname(e)),weight:"normal",style:"normal",src:r,dataSrc:i,refs:1,originalUrl:e,fontFace:null},t);n[e]=o,this._fonts.push(o),this.styleID++;const s=new FontFace(o.family,`url(${o.src})`,{weight:o.weight,style:o.style});o.fontFace=s,await s.load(),document.fonts.add(s),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const t=e.filter(n=>!this._overrides.includes(n));t.length>0&&(this._overrides.push(...t),this.styleID++)}removeOverride(...e){const t=e.filter(n=>this._overrides.includes(n));t.length>0&&(this._overrides=this._overrides.filter(n=>!t.includes(n)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,t)=>`${e} @font-face { font-family: "${t.family}"; src: url('${t.dataSrc}'); font-weight: ${t.weight}; font-style: ${t.style}; - }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=D4e(e)),typeof e=="number"?M4e(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,n=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),r=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const i=`${n}px ${r}px`;return this.dropShadowBlur>0?`text-shadow: ${i} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${i} ${e}`}reset(){Object.assign(this,mm.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=tt.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};let Tx=mm;Tx.availableFonts={};Tx.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};const gm=class extends jp{constructor(e="",t={}){super(ht.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this._loading=!1,this.localStyleID=-1,this.dirty=!1,this.ownsStyle=!1;const n=new Image,r=ht.from(n,{scaleMode:tt.SCALE_MODE,resourceOptions:{autoLoad:!1}});r.orig=new Kt,r.trim=new Kt,this.texture=r;const i="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",s=document.createElementNS(i,"svg"),l=document.createElementNS(i,"foreignObject"),c=document.createElementNS(o,"div"),d=document.createElementNS(o,"style");l.setAttribute("width","10000"),l.setAttribute("height","10000"),l.style.overflow="hidden",s.appendChild(l),this.maxWidth=gm.defaultMaxWidth,this.maxHeight=gm.defaultMaxHeight,this._domElement=c,this._styleElement=d,this._svgRoot=s,this._foreignObject=l,this._foreignObject.appendChild(d),this._foreignObject.appendChild(c),this._image=n,this._loadImage=new Image,this._autoResolution=gm.defaultAutoResolution,this._resolution=gm.defaultResolution??tt.RESOLUTION,this.text=e,this.style=t}measureText(e){var l,c;const{text:t,style:n,resolution:r}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:n.toCSS(r)}),this._styleElement.textContent=n.toGlobalCSS(),document.body.appendChild(this._svgRoot);const i=this._domElement.getBoundingClientRect();this._svgRoot.remove();const o=Math.min(this.maxWidth,Math.ceil(i.width)),s=Math.min(this.maxHeight,Math.ceil(i.height));return this._svgRoot.setAttribute("width",o.toString()),this._svgRoot.setAttribute("height",s.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),n!==this._style&&(Object.assign(this._domElement,{style:(l=this._style)==null?void 0:l.toCSS(r)}),this._styleElement.textContent=(c=this._style)==null?void 0:c.toGlobalCSS()),{width:o+n.padding*2,height:s+n.padding*2}}async updateText(e=!0){const{style:t,_image:n,_loadImage:r}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:i,height:o}=this.measureText();n.width=r.width=Math.ceil(Math.max(1,i)),n.height=r.height=Math.ceil(Math.max(1,o)),this._loading||(this._loading=!0,await new Promise(s=>{r.onload=async()=>{await t.onBeforeDraw(),this._loading=!1,n.src=r.src,r.onload=null,r.src="",this.updateTexture(),s()};const l=new XMLSerializer().serializeToString(this._svgRoot);r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`}))}get source(){return this._image}updateTexture(){const{style:e,texture:t,_image:n,resolution:r}=this,{padding:i}=e,{baseTexture:o}=t;t.trim.width=t._frame.width=n.width/r,t.trim.height=t._frame.height=n.height/r,t.trim.x=-i,t.trim.y=-i,t.orig.width=t._frame.width-i*2,t.orig.height=t._frame.height-i*2,this._onTextureUpdate(),o.setRealSize(n.width,n.height,r),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}_renderCanvas(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(e)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds(e)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(e){var n,r,i,o,s;typeof e=="boolean"&&(e={children:e}),e=Object.assign({},gm.defaultDestroyOptions,e),super.destroy(e);const t=null;this.ownsStyle&&((n=this._style)==null||n.cleanFonts()),this._style=t,(r=this._svgRoot)==null||r.remove(),this._svgRoot=t,(i=this._domElement)==null||i.remove(),this._domElement=t,(o=this._foreignObject)==null||o.remove(),this._foreignObject=t,(s=this._styleElement)==null||s.remove(),this._styleElement=t,this._loadImage.src="",this._loadImage.onload=null,this._loadImage=t,this._image.src="",this._image=t}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._image.width/this.resolution}set width(e){this.updateText(!0);const t=pd(this.scale.x)||1;this.scale.x=t*e/this._image.width/this.resolution,this._width=e}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._image.height/this.resolution}set height(e){this.updateText(!0);const t=pd(this.scale.y)||1;this.scale.y=t*e/this._image.height/this.resolution,this._height=e}get style(){return this._style}set style(e){this._style!==e&&(e=e||{},e instanceof Tx?(this.ownsStyle=!1,this._style=e):e instanceof Au?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=Tx.from(e)):(this.ownsStyle=!0,this._style=new Tx(e)),this.localStyleID=-1,this.dirty=!0)}get text(){return this._text}set text(e){e=String(e===""||e===null||e===void 0?" ":e),e=this.sanitiseText(e),this._text!==e&&(this._text=e,this.dirty=!0)}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}sanitiseText(e){return e.replace(/

/gi,"
").replace(/
/gi,"
").replace(/ /gi," ")}};let Xk=gm;Xk.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};Xk.defaultMaxWidth=2024;Xk.defaultMaxHeight=2024;Xk.defaultAutoResolution=!0;function c8e(e,t){return{constructor:e,meta:t}}function u8e(e,t,n,r,i){Nne(e,t,n||0,r||e.length-1,i||d8e)}function Nne(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,s=t-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1),f=Math.max(n,Math.floor(t-s*c/o+d)),h=Math.min(r,Math.floor(t+(o-s)*c/o+d));Nne(e,t,f,h,i)}var p=e[t],g=n,v=r;for(Tb(e,n,t),i(e[r],p)>0&&Tb(e,n,r);g0;)v--}i(e[n],p)===0?Tb(e,n,v):(v++,Tb(e,v,r)),v<=t&&(n=v+1),t<=v&&(r=v-1)}}function Tb(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function d8e(e,t){return et?1:0}class f8e{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let n=this.data;const r=[];if(!K_(t,n))return r;const i=this.toBBox,o=[];for(;n;){for(let s=0;s=0&&o[n].children.length>this._maxEntries;)this._split(o,n),n--;this._adjustParentBBoxes(i,o,n)}_split(t,n){const r=t[n],i=r.children.length,o=this._minEntries;this._chooseSplitAxis(r,o,i);const s=this._chooseSplitIndex(r,o,i),l=vm(r.children.splice(s,r.children.length-s));l.height=r.height,l.leaf=r.leaf,tm(r,this.toBBox),tm(l,this.toBBox),n?t[n-1].children.push(l):this._splitRoot(r,l)}_splitRoot(t,n){this.data=vm([t,n]),this.data.height=t.height+1,this.data.leaf=!1,tm(this.data,this.toBBox)}_chooseSplitIndex(t,n,r){let i,o=1/0,s=1/0;for(let l=n;l<=r-n;l++){const c=Yb(t,0,l,this.toBBox),d=Yb(t,l,r,this.toBBox),f=v8e(c,d),h=wB(c)+wB(d);f=n;d--){const f=t.children[d];Kb(l,t.leaf?o(f):f),c+=Y_(l)}return c}_adjustParentBBoxes(t,n,r){for(let i=r;i>=0;i--)Kb(n[i],t)}_condense(t){for(let n=t.length-1,r;n>=0;n--)t[n].children.length===0?n>0?(r=t[n-1].children,r.splice(r.indexOf(t[n]),1)):this.clear():tm(t[n],this.toBBox)}}function h8e(e,t,n){if(!n)return t.indexOf(e);for(let r=0;r=e.minX&&t.maxY>=e.minY}function vm(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function j7(e,t,n,r,i){const o=[t,n];for(;o.length;){if(n=o.pop(),t=o.pop(),n-t<=r)continue;const s=t+Math.ceil((n-t)/r/2)*r;u8e(e,s,t,n,i),o.push(t,s,s,n)}}class y8e extends f8e{toBBox(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}compareMinX(t,n){return t.left-n.left}compareMinY(t,n){return t.top-n.top}}const U7={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:1e3/60,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:2,minScale:1,dtMax:1.5,dtMin:1.1}};var Bne={},kC=Nt&&Nt.__assign||function(){return kC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?1:-1}),SB}var I8e=A8e()?Math.sign:R8e(),P8e=I8e,O8e=Math.abs,M8e=Math.floor,D8e=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:P8e(e)*M8e(O8e(e)))},L8e=D8e,N8e=Math.max,B8e=function(e){return N8e(0,L8e(e))},$ne=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},$8e=pv,Fne=function(e){if(!$8e(e))throw new TypeError("Cannot use null or undefined");return e},F8e={exports:{}},z8e=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")},EB,W7;function j8e(){return W7||(W7=1,EB=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),EB}var CB,G7;function U8e(){if(G7)return CB;G7=1;var e=pv,t=Object.keys;return CB=function(n){return t(e(n)?Object(n):n)},CB}var TB,V7;function H8e(){return V7||(V7=1,TB=j8e()()?Object.keys:U8e()),TB}var kB,q7;function W8e(){if(q7)return kB;q7=1;var e=H8e(),t=Fne,n=Math.max;return kB=function(r,i){var o,s,l=n(arguments.length,2),c;for(r=Object(t(r)),c=function(d){try{r[d]=i[d]}catch(f){o||(o=f)}},s=1;s-1},RB}var lHe=sHe()?String.prototype.contains:aHe(),VS=Hne,Y7=oHe,Wne=zne,Gne=k8e,kx=lHe,cHe=Une.exports=function(e,t){var n,r,i,o,s;return arguments.length<2||typeof e!="string"?(o=t,t=e,e=null):o=arguments[2],VS(e)?(n=kx.call(e,"c"),r=kx.call(e,"e"),i=kx.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?Wne(Gne(o),s):s};cHe.gs=function(e,t,n){var r,i,o,s;return typeof e!="string"?(o=n,n=t,t=e,e=null):o=arguments[3],VS(t)?Y7(t)?VS(n)?Y7(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,VS(e)?(r=kx.call(e,"c"),i=kx.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?Wne(Gne(o),s):s};var yw=Une.exports,q3={exports:{}};(function(e,t){var n=yw,r=$ne,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,l=Object.defineProperty,c=Object.defineProperties,d=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,_;h=function(b,x){var E;return r(x),d.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),l(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,A;return r(x),A=this,h.call(this,b,E=function(){g.call(A,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,A,R,k;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(A=E[b],typeof A=="object")for(k=0;R=A[k];++k)(R===x||R.__eeOnceListener__===x)&&(A.length===2?E[b]=A[k?0:1]:A.splice(k,1));else(A===x||A.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,A,R,k;if(d.call(this,"__ee__")&&(R=this.__ee__[b],!!R))if(typeof R=="object"){for(E=arguments.length,k=new Array(E-1),x=1;x=55296&&E<=56319&&(O+=p[++S])),O=g?d.call(g,v,O,_):O,y?(f.value=O,h(b,_,f)):b[_]=O,++_;x=_}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=6&&(n-=6),At(n<1?255*((t-e)*n+e):n<3?255*t:n<4?255*((t-e)*(4-n)+e):255*e)},Bi=function(e,t,n){t/=100;var r=(n/=100)<=.5?n*(t+1):n+t-n*t,i=2*n-r;return{r:qB(i,r,(e/=60)+2),g:qB(i,r,e),b:qB(i,r,e-2)}},Ij=function(e,t,n,r){return{r:At(255*(1-e)*(r=1-r)),g:At(255*(1-t)*r),b:At(255*(1-n)*r)}},Qne=function(e,t,n){e/=255,t/=255,n/=255;var r=1-Math.max(e,t,n),i=1-r,o=i&&(i-t)/i,s=i&&(i-n)/i;return{c:At(100*(i&&(i-e)/i)),m:At(100*o),y:At(100*s),k:At(100*r)}},Hg=function(e,t,n,r){r===void 0&&(r=1),e/=255,t/=255,n/=255,r=Math.min(r,1);var i=Math.max(e,t,n),o=Math.min(e,t,n),s=i-o,l=0,c=0,d=(i+o)/2;if(s!==0){switch(i){case e:l=(t-n)/s%6;break;case t:l=(n-e)/s+2;break;case n:l=(e-t)/s+4}(l=At(60*l))<0&&(l+=360),c=s/(1-Math.abs(2*d-1))}return{h:l,s:At(100*c),l:At(100*d),a:r}},hV=function(e,t){if(e<0&&(e+=360),e>360&&(e-=360),e===360||e===0)return e;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=t?r:n,o=0,s=0,l=0,c=0;return(t?n:r).find(function(d,f){return e>=d[0]&&e360||e<0)&&(e-=360*Math.floor(e/360)),e},So=function(e){return typeof e=="string"&&(e=mv.test(e)?Kk(e)/100:+e),isNaN(+e)||e>1?1:At(e)},gv=function(e,t,n){return t.reduce(function(r,i){return X3(X3([],r,!0),[sn(sn({},e),{h:n===No.ADDITIVE?A1(e.h+i):A1(hV(hV(e.h,!1)+i,!0))})],!1)},[sn({},e)])},DHe=function(e,t){return gv(e,[30,-30],t)},LHe=function(e,t){return gv(e,[180],t)},NHe=function(e,t){return gv(e,[150,-150],t)},BHe=function(e,t){return gv(e,[120,-120],t)},$He=function(e,t){return gv(e,[60,-120,180],t)},FHe=function(e,t){return gv(e,[90,-90,180],t)},Ys=function(e){return typeof e=="string"?function(t){var n;if(Object.keys(qt).some(function(r){if(Qb[r].test(t))return n=r,!0}),!n&&~Yne.indexOf(t)&&(n=qt.HEX),!n)throw new Error(OHe);return n}(e):function(t){var n,r=!1,i=Kne(Object.keys(t));if(Y3[i]&&(n=Y3[i]),n&&n===qt.RGB){var o=Object.entries(t).some(function(l){return!K3.test("".concat(l[1]))}),s=Object.entries(t).some(function(l){return!(mv.test("".concat(l[1]))||!K3.test("".concat(l[1]))&&!isNaN(+l[1])&&+l[1]<=255)});o&&s&&(r=!0),o||(n=qt.HEX)}if(!n||r)throw new Error(MHe);return n}(e)},zHe=((Rb={})[qt.HEX]=function(e){var t=(~Yne.indexOf(e)?AC[e]:e).match(Qb.HEX),n={r:Q_(t[1]||t[5]),g:Q_(t[2]||t[6]),b:Q_(t[3]||t[7])},r=t[4]||t[8];return r!==void 0&&(n.a=Q_(r)/255),n},Rb[qt.RGB]=function(e){var t=e.match(Qb.RGB),n=Yh(t[1]||t[5]),r=Yh(t[2]||t[6]),i=Yh(t[3]||t[7]),o=t[4]||t[8],s={r:Math.min(n,255),g:Math.min(r,255),b:Math.min(i,255)};return o!==void 0&&(s.a=So(o)),s},Rb[qt.HSL]=function(e){var t=e.match(Qb.HSL),n=A1(t[1]||t[5]),r=RC(t[2]||t[6]),i=RC(t[3]||t[7]),o=t[4]||t[8],s=Bi(n,r,i);return o!==void 0&&(s.a=So(o)),s},Rb[qt.CMYK]=function(e){var t=e.match(Qb.CMYK),n=gd(t[1]||t[6]),r=gd(t[2]||t[7]),i=gd(t[3]||t[8]),o=gd(t[4]||t[9]),s=t[5]||t[10],l=Ij(n,r,i,o);return s!==void 0&&(l.a=So(s)),l},Rb),jHe=((Ib={})[qt.HEX]=function(e){var t={r:Yh("".concat(e.r)),g:Yh("".concat(e.g)),b:Yh("".concat(e.b))};return Ji(e,"a")&&(t.a=Math.min(Yh("".concat(e.a),!0),1)),t},Ib[qt.RGB]=function(e){return this.HEX(e)},Ib[qt.HSL]=function(e){var t=RC("".concat(e.s)),n=RC("".concat(e.l)),r=Bi(A1(e.h),t,n);return Ji(e,"a")&&(r.a=So(e.a)),r},Ib[qt.CMYK]=function(e){var t=gd("".concat(e.c)),n=gd("".concat(e.m)),r=gd("".concat(e.y)),i=gd("".concat(e.k)),o=Ij(t,n,r,i);return Ji(e,"a")&&(o.a=So(e.a)),o},Ib),Tp=function(e,t){return t===void 0&&(t=Ys(e)),typeof e=="string"?zHe[t](e):jHe[t](e)},rn=((nu={})[qt.HEX]=function(e){return{r:J_(e.r),g:J_(e.g),b:J_(e.b)}},nu.HEXA=function(e){var t=rn.HEX(e);return t.a=Ji(e,"a")?J_(255*e.a):"0xFF",t},nu[qt.RGB]=function(e,t){return Ji(e,"a")&&delete e.a,sp(e,t)},nu.RGBA=function(e,t){return e.a=Ji(e,"a")?At(e.a):1,sp(e,t)},nu[qt.HSL]=function(e,t){var n=Hg(e.r,e.g,e.b);return delete n.a,Um(n,t)},nu.HSLA=function(e,t){var n=rn.HSL(e,t);return n.a=Ji(e,"a")?At(e.a,t):1,n},nu[qt.CMYK]=function(e,t){return UHe(Qne(e.r,e.g,e.b),t)},nu.CMYKA=function(e,t){var n=rn.CMYK(e,t);return n.a=Ji(e,"a")?At(e.a,t):1,n},nu),pV=function(e,t,n,r){var i=Ys(e),o=typeof e=="string",s=Tp(e,i),l=typeof e=="string"&&Ji(s,"a")||typeof e!="string"&&Ji(e,"a"),c=Hg(s.r,s.g,s.b,s.a);l||delete c.a;var d=n?c.l/(t+1):(100-c.l)/(t+1),f=Array(t).fill(null).map(function(h,p){return sn(sn({},c),{l:c.l+d*(p+1)*(1-2*+n)})});switch(i){case qt.HEX:default:return f.map(function(h){var p=Bi(h.h,h.s,h.l);return l&&(p.a=h.a),o?l?tn.HEX(sp(sn(sn({},p),{a:At(255*p.a)}),r)):tn.HEX(sp(p,r)):l?rn.HEXA(p):rn.HEX(p)});case qt.RGB:return f.map(function(h){var p=Bi(h.h,h.s,h.l);return l&&(p.a=h.a),o?tn.RGB(sp(p,r)):l?rn.RGBA(p,r):rn.RGB(p,r)});case qt.HSL:return f.map(function(h){return o?tn.HSL(Um(h,r)):l?rn.HSLA(sn(sn({},Bi(h.h,h.s,h.l)),{a:h.a}),r):rn.HSL(Bi(h.h,h.s,h.l),r)})}},nm=((Ch={buildHarmony:function(e,t,n,r){var i=Ys(e),o=Tp(e,i),s=Hg(o.r,o.g,o.b,o.a),l=typeof e=="string"&&Ji(o,"a")||typeof e!="string"&&Ji(e,"a"),c=typeof e=="string";switch(i){case qt.HEX:default:return l?this.HEXA(Um(s,0),t,n,c):this.HEX(Um(s,0),t,n,c);case qt.HSL:return l?this.HSLA(s,t,n,c,r):this.HSL(s,t,n,c,r);case qt.RGB:return l?this.RGBA(s,t,n,c,r):this.RGB(s,t,n,c,r)}}})[qt.HEX]=function(e,t,n,r){return t(e,n).map(function(i){return r?tn.HEX(Bi(i.h,i.s,i.l)):rn.HEX(Bi(i.h,i.s,i.l))})},Ch.HEXA=function(e,t,n,r){return t(e,n).map(function(i){return r?tn.HEX(sn(sn({},Bi(i.h,i.s,i.l)),{a:255*So(i.a)})):rn.HEXA(sn(sn({},Bi(i.h,i.s,i.l)),{a:So(i.a)}))})},Ch[qt.RGB]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.RGB(sp(Bi(o.h,o.s,o.l),i)):rn.RGB(Bi(o.h,o.s,o.l),i)})},Ch.RGBA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.RGB(sp(sn(sn({},Bi(o.h,o.s,o.l)),{a:So(o.a)}),i)):rn.RGBA(sn(sn({},Bi(o.h,o.s,o.l)),{a:So(o.a)}),i)})},Ch[qt.HSL]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.HSL(Um({h:o.h,s:o.s,l:o.l},i)):rn.HSL(Bi(o.h,o.s,o.l),i)})},Ch.HSLA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.HSL(Um(sn(sn({},o),{a:So(o.a)}),i)):rn.HSLA(sn(sn({},Bi(o.h,o.s,o.l)),{a:So(o.a)}),i)})},Ch),rm=((Th={mix:function(e,t){var n,r,i,o,s,l,c,d,f,h,p,g,v,y,S,_=e.map(function(A){var R=Ys(A);return Tp(A,R)}),b=t===No.SUBTRACTIVE?_.map(function(A){var R,k,O,L,N,H,W,z,D,F,j,V,G,K,Y=(R=A.r,k=A.g,O=A.b,L=Math.min(R,k,O),N=Math.min(255-R,255-k,255-O),H=R-L,W=k-L,z=O-L,D=Math.min(H,W),F=H-D,j=(W+D)/2,V=(z+W-D)/2,G=Math.max(F,j,V)/Math.max(H,W,z),K=isNaN(G)||G===1/0||G<=0?1:G,{r:F/K+N,y:j/K+N,b:V/K+N});return Ji(A,"a")&&(Y.a=A.a),Y}):null;function x(A){var R=t===No.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return A.reduce(function(k,O){var L=Ji(O,"a")?O.a:1,N={r:Math.min(k.r+O.r*L,255),b:Math.min(k.b+O.b*L,255),a:1-(1-L)*(1-k.a)},H="g"in k?k.g:k.y,W="g"in O?O.g:O.y;return sn(sn({},N),t===No.ADDITIVE?{g:Math.min(H+W*L,255)}:{y:Math.min(H+W*L,255)})},R)}if(t===No.ADDITIVE)n=x(_);else{var E=x(b);r=E.r,i=E.y,o=E.b,s=Math.min(r,i,o),l=Math.min(255-r,255-i,255-o),c=r-s,d=i-s,f=o-s,h=Math.min(d,f),p=c+d-h,g=d+h,v=2*(f-h),y=Math.max(p,g,v)/Math.max(c,d,f),S=isNaN(y)||y===1/0||y<=0?1:y,(n={r:p/S+l,g:g/S+l,b:v/S+l}).a=E.a}return{r:At(n.r),g:At(n.g),b:At(n.b),a:Ha(n.a,0,1)}}})[qt.HEX]=function(e,t,n){var r=this.mix(e,t);return delete r.a,n?tn.HEX(r):rn.HEX(r)},Th.HEXA=function(e,t,n){var r=this.mix(e,t);return r.a=n?255*So(r.a):So(r.a),n?tn.HEX(r):rn.HEXA(r)},Th[qt.RGB]=function(e,t,n,r){var i=this.mix(e,t);return delete i.a,n?tn.RGB(i):rn.RGB(i,r)},Th.RGBA=function(e,t,n,r){var i=this.mix(e,t);return n?tn.RGB(i):rn.RGBA(i,r)},Th[qt.HSL]=function(e,t,n,r){var i=this.mix(e,t),o=Hg(i.r,i.g,i.b);return delete i.a,delete o.a,n?tn.HSL(o):rn.HSL(i,r)},Th.HSLA=function(e,t,n,r){var i=this.mix(e,t),o=Hg(i.r,i.g,i.b,i.a);return n?tn.HSL(o):rn.HSLA(i,r)},Th),sp=function(e,t){return sn({r:At(e.r,t),g:At(e.g,t),b:At(e.b,t)},Ji(e,"a")?{a:At(e.a,t)}:{})},Um=function(e,t){return sn({h:At(e.h,t),s:At(e.s,t),l:At(e.l,t)},Ji(e,"a")?{a:At(e.a,t)}:{})},UHe=function(e,t){return{c:At(e.c,t),m:At(e.m,t),y:At(e.y,t),k:At(e.k,t)}},Gu=function(e,t,n,r,i,o){var s=i(Tp(e,t),r);return n?o(s):s},im=function(e,t,n,r,i,o,s){n<1&&(n=5);var l=function(c,d,f){var h=f-1,p=(d.r-c.r)/h,g=(d.g-c.g)/h,v=(d.b-c.b)/h,y=So(c.a),S=(So(d.a)-y)/h;return Array(f).fill(null).map(function(_,b){return b===0?c:b===h?d:{r:At(c.r+p*b),g:At(c.g+g*b),b:At(c.b+v*b),a:At(y+S*b)}})}(Tp(e),Tp(t),n);return l.map(function(c){var d=o(c,i);return r?s(d):d})},HHe=function(){function e(t,n){n===void 0&&(n=6),this.rgb=Tp(t),this._decimals=n,this.updateHSL(),this.updateCMYK()}return e.prototype.updateRGB=function(){this.rgb=sn(sn({},Bi(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},e.prototype.updateRGBFromCMYK=function(){this.rgb=sn(sn({},Ij(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},e.prototype.updateHSL=function(){this.hsl=Hg(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},e.prototype.updateCMYK=function(){this.cmyk=Qne(this.rgb.r,this.rgb.g,this.rgb.b)},e.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},e.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},e.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},e.prototype.setDecimals=function(t){return this._decimals=t,this},e.prototype.setH=function(t){return this.hsl.h=A1(t),this.updateRGBAndCMYK()},e.prototype.setS=function(t){return this.hsl.s=Ha(t,0,100),this.updateRGBAndCMYK()},e.prototype.setL=function(t){return this.hsl.l=Ha(t,0,100),this.updateRGBAndCMYK()},e.prototype.setR=function(t){return this.rgb.r=Ha(t,0,255),this.updateHSLAndCMYK()},e.prototype.setG=function(t){return this.rgb.g=Ha(t,0,255),this.updateHSLAndCMYK()},e.prototype.setB=function(t){return this.rgb.b=Ha(t,0,255),this.updateHSLAndCMYK()},e.prototype.setA=function(t){return this.hsl.a=this.rgb.a=Ha(t,0,1),this},e.prototype.setC=function(t){return this.cmyk.c=Ha(t,0,100),this.updateRGBAndHSL()},e.prototype.setM=function(t){return this.cmyk.m=Ha(t,0,100),this.updateRGBAndHSL()},e.prototype.setY=function(t){return this.cmyk.y=Ha(t,0,100),this.updateRGBAndHSL()},e.prototype.setK=function(t){return this.cmyk.k=Ha(t,0,100),this.updateRGBAndHSL()},Object.defineProperty(e.prototype,"decimals",{get:function(){return this._decimals},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"H",{get:function(){return At(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"S",{get:function(){return At(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"L",{get:function(){return At(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"R",{get:function(){return At(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"G",{get:function(){return At(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"B",{get:function(){return At(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"A",{get:function(){return At(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"C",{get:function(){return At(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"M",{get:function(){return At(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Y",{get:function(){return At(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"K",{get:function(){return At(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXObject",{get:function(){return rn.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXAObject",{get:function(){return rn.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBAObject",{get:function(){return sn(sn({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLAObject",{get:function(){return sn(sn({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKAObject",{get:function(){return sn(sn({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEX",{get:function(){return tn.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXA",{get:function(){return tn.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGB",{get:function(){return tn.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBA",{get:function(){return tn.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSL",{get:function(){return tn.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLA",{get:function(){return tn.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYK",{get:function(){return tn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKA",{get:function(){return tn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),e.toHEX=function(t,n){n===void 0&&(n=!0);var r=Ys(t);return Gu(t,r,n,0,rn.HEX,tn.HEX)},e.toHEXA=function(t,n){n===void 0&&(n=!0);var r=Ys(t);return Gu(t,r,n,0,rn.HEXA,tn.HEX)},e.toRGB=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Gu(t,i,n,r,rn.RGB,tn.RGB)},e.toRGBA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Gu(t,i,n,r,rn.RGBA,tn.RGB)},e.toHSL=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Gu(t,i,n,r,rn.HSL,tn.HSL)},e.toHSLA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Gu(t,i,n,r,rn.HSLA,tn.HSL)},e.toCMYK=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Gu(t,i,n,r,rn.CMYK,tn.CMYK)},e.toCMYKA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Gu(t,i,n,r,rn.CMYKA,tn.CMYK)},e.getBlendHEX=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),im(t,n,r,i,o,rn.HEX,tn.HEX)},e.getBlendHEXA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),im(t,n,r,i,o,rn.HEXA,tn.HEX)},e.getBlendRGB=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),im(t,n,r,i,o,rn.RGB,tn.RGB)},e.getBlendRGBA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),im(t,n,r,i,o,rn.RGBA,tn.RGB)},e.getBlendHSL=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),im(t,n,r,i,o,rn.HSL,tn.HSL)},e.getBlendHSLA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),im(t,n,r,i,o,rn.HSLA,tn.HSL)},e.getMixHEX=function(t,n,r){return n===void 0&&(n=No.ADDITIVE),r===void 0&&(r=!0),rm.HEX(t,n,r)},e.getMixHEXA=function(t,n,r){return n===void 0&&(n=No.ADDITIVE),r===void 0&&(r=!0),rm.HEXA(t,n,r)},e.getMixRGB=function(t,n,r,i){return n===void 0&&(n=No.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),rm.RGB(t,n,r,i)},e.getMixRGBA=function(t,n,r,i){return n===void 0&&(n=No.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),rm.RGBA(t,n,r,i)},e.getMixHSL=function(t,n,r,i){return n===void 0&&(n=No.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),rm.HSL(t,n,r,i)},e.getMixHSLA=function(t,n,r,i){return n===void 0&&(n=No.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),rm.HSLA(t,n,r,i)},e.getShades=function(t,n,r){return r===void 0&&(r=6),pV(t,n,!0,r)},e.getTints=function(t,n,r){return r===void 0&&(r=6),pV(t,n,!1,r)},e.getHarmony=function(t,n,r,i){return n===void 0&&(n=ou.COMPLEMENTARY),r===void 0&&(r=No.ADDITIVE),i===void 0&&(i=6),function(o,s,l,c){var d;return(d={},d[ou.ANALOGOUS]=nm.buildHarmony(s,DHe,c,l),d[ou.COMPLEMENTARY]=nm.buildHarmony(s,LHe,c,l),d[ou.SPLIT_COMPLEMENTARY]=nm.buildHarmony(s,NHe,c,l),d[ou.TRIADIC]=nm.buildHarmony(s,BHe,c,l),d[ou.TETRADIC]=nm.buildHarmony(s,$He,c,l),d[ou.SQUARE]=nm.buildHarmony(s,FHe,c,l),d)[o]}(n,t,i,r)},e}();const WHe={current:void 0,parent:void 0,events:void 0,color:{source:2533018,destination:15753874,expanding:16733986,updating:16733986,generating:16771899,closing:11583173,end:15483002},scale:10,fill:"#000000",alpha:1},{ceil:ji,PI:GHe}=Math,bw=(e,t)=>new HHe(e).setA(t??WHe.alpha).RGBA,VHe=(e,t)=>bw(e,t);function Hd(e,t){return{width:e.width*t.scale.x,height:e.height*t.scale.y,x:e.x*t.scale.x+t.x,y:e.y*t.scale.y+t.y}}const qHe={draw(e,t,n){if(e.text){const r=Hd(e,{x:e.textX,y:e.textY,scale:{x:1,y:1}}),i=Hd(r,n);t.font=`${e.fontSize*n.scale.x}px Arial`,t.fillStyle=bw(e.fontColor,e.alpha),t.fillText(e.text,i.x,i.y)}},test(e){return{left:-1/0,right:1/0,top:-1/0,bottom:1/0}}},XHe={draw(e,t,n){const{x:r,y:i,width:o,height:s}=Hd(e,n);t.fillStyle=bw(e.fill,e.alpha),t.fillRect(ji(r),ji(i),ji(o)||1,ji(s)||1)},test(e){return{left:e.x,right:e.x+e.width,top:e.y,bottom:e.y+e.height}}},YHe={draw(e,t,n){t.fillStyle=bw(e.fill,e.alpha),t.beginPath();const r=Hd({...e,width:e.radius,height:e.radius},n);t.ellipse(ji(r.x),ji(r.y),ji(r.width),ji(r.height),0,0,2*GHe),t.fill()},test(e){return{left:e.x-e.radius,right:e.x+e.radius,top:e.y-e.radius,bottom:e.y+e.radius}}},KHe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.fillStyle=bw(e.fill,e.alpha);const{x:o,y:s}=Hd({...r,width:0,height:0},n);t.moveTo(ji(o),ji(s));for(const l of i){const{x:c,y:d}=Hd({...l,width:0,height:0},n);t.lineTo(ji(c),ji(d))}t.closePath(),t.fill()},test(e){var t,n,r,i;return{left:((t=Gt.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=Gt.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=Gt.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=Gt.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},QHe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.lineCap="round",t.lineJoin="round",t.strokeStyle=VHe(e.fill,e.alpha);const{x:o,y:s,width:l}=Hd({...r,width:e.lineWidth,height:0},n);t.lineWidth=ji(l),t.moveTo(ji(o),ji(s));for(const c of i){const{x:d,y:f}=Hd({...c,width:0,height:0},n);t.lineTo(ji(d),ji(f))}t.stroke()},test(e){var t,n,r,i;return{left:((t=Gt.minBy(e.points,"x"))==null?void 0:t.x)??0-e.lineWidth??0,right:((n=Gt.maxBy(e.points,"x"))==null?void 0:n.x)??0+e.lineWidth??0,top:((r=Gt.minBy(e.points,"y"))==null?void 0:r.y)??0-e.lineWidth??0,bottom:((i=Gt.maxBy(e.points,"y"))==null?void 0:i.y)??0+e.lineWidth??0}}},JHe={text:qHe,path:QHe,rect:XHe,polygon:KHe,circle:YHe},{log2:ZHe,max:eWe}=Math,mV=e=>Gt.floor(ZHe(e+1));function gV({right:e,left:t,bottom:n,top:r},i){const o=eWe(mV(e-t),mV(n-r))-i,s=2**o,l={left:Gt.floor(t/s),right:Gt.ceil((e+1)/s),top:Gt.floor(r/s),bottom:Gt.ceil((n+1)/s)};return{zoom:o,order:s,tiles:Gt.shuffle(x8e({x:Gt.range(l.left,l.right+1),y:Gt.range(l.top,l.bottom+1)}).map(c=>{const d=c.x*s,f=c.y*s;return{tile:c,bounds:{left:d-s/2,right:d+s/2,top:f-s/2,bottom:f+s/2}}}))}}const tWe=""+new URL("D2Renderer.worker-835e2af9.js",import.meta.url).href;class nWe extends Worker{constructor(){super(tWe,{type:"module"})}call(t,n,r=[]){return this.postMessage({action:t,payload:n},r)}on(t,n){const r=i=>{const{action:o,payload:s}=i.data;o===t&&n(s)};return this.addEventListener("message",r),()=>this.removeEventListener("message",r)}}function rWe(e,t){return!(t.left>=e.right||t.right<=e.left||t.top>=e.bottom||t.bottom<=e.top)}const{max:vV,min:yV}=Math,Jne=class Zne extends jp{constructor(t,n){super(t),this.bounds=n,this.destroying=!1,this.age=Zne.age++}};Jne.age=0;let iWe=Jne;function tS(e,t){return Gt.isNaN(e)?t:e}var bs,Nr,sd,cu,pi,kl,ad,ld,LC,NC,ere,BC,tre,ug,D1,$C,FC,nre,zC,rre,jC,ire,UC,ore,L1,Q3,N1,J3,HC,sre,B1,Z3,WC,are,GC,lre,VC,cre;class oWe extends AHe{constructor(){super(...arguments);Zn(this,NC);Zn(this,BC);Zn(this,FC);Zn(this,zC);Zn(this,jC);Zn(this,UC);Zn(this,L1);Zn(this,N1);Zn(this,HC);Zn(this,B1);Zn(this,WC);Zn(this,GC);Zn(this,VC);Zn(this,bs,void 0);Zn(this,Nr,void 0);Zn(this,sd,void 0);Zn(this,cu,void 0);Zn(this,pi,U7);Zn(this,kl,[]);Zn(this,ad,new y8e(16));Zn(this,ld,void 0);Zn(this,LC,0);Zn(this,ug,Gt.once(()=>Gt.debounce(()=>Mi(this,L1,Q3).call(this),Ze(this,pi).debounceInterval)));Zn(this,D1,Gt.once(()=>Gt.throttle(()=>Mi(this,N1,J3).call(this),Ze(this,pi).refreshInterval)));Zn(this,$C,Gt.once(()=>Gt.throttle(n=>Mi(this,HC,sre).call(this,n),Ze(this,pi).refreshInterval)))}getInstance(){return{app:Ze(this,bs),viewport:Ze(this,Nr)}}fitCamera(){var r,i,o,s;const n=Gt.values(Ze(this,ad).all()).flat();if(n.length){const l=Gt.reduce(n,(c,d)=>({top:tS(yV(c.top,d.top),c.top),left:tS(yV(c.left,d.left),c.left),bottom:tS(vV(c.bottom,d.bottom),c.bottom),right:tS(vV(c.right,d.right),c.right)}),{bottom:-1/0,top:1/0,left:1/0,right:-1/0});(s=(r=Ze(this,Nr))==null?void 0:r.animate)==null||s.call(r,{position:new Ot((l.left+l.right)/2,(l.top+l.bottom)/2),scale:((o=(i=Ze(this,Nr))==null?void 0:i.findFit)==null?void 0:o.call(i,l.right-l.left,l.bottom-l.top))*.8,ease:"easeOutExpo",time:Ze(this,pi).animationDuration*1.5,callbackOnComplete:()=>Ze(this,ug).call(this)()})}}initialCamera(){var n,r;(r=(n=Ze(this,Nr))==null?void 0:n.animate)==null||r.call(n,{scale:1,ease:"easeOutExpo",time:Ze(this,pi).animationDuration*1.5,callbackOnComplete:()=>Ze(this,ug).call(this)()})}getView(){var n;return(n=Ze(this,bs))==null?void 0:n.view}setup(n){const r={...U7,...n};Mi(this,BC,tre).call(this,r),this.setOptions(r),Mi(this,zC,rre).call(this,r)}destroy(){Gt.map(Ze(this,kl),n=>n.terminate()),Ze(this,bs).destroy()}add(n){const r=UFe(),i=Gt.map(n,({component:o,meta:s})=>({...JHe[o.$].test(o),component:o,meta:s,index:Mi(this,NC,ere).call(this)}));return Ze(this,ad).load(i),Gt.map(Ze(this,kl),o=>o.call("add",[Gt.map(n,"component"),r])),()=>Gt.defer(()=>{for(const o of i)Ze(this,ad).remove(o);Gt.map(Ze(this,kl),o=>o.call("remove",[r]))})}setOptions(n){const r={...Ze(this,pi),...n};Mi(this,jC,ire).call(this,r),Qc(this,pi,r),Mi(this,L1,Q3).call(this),Mi(this,N1,J3).call(this)}}bs=new WeakMap,Nr=new WeakMap,sd=new WeakMap,cu=new WeakMap,pi=new WeakMap,kl=new WeakMap,ad=new WeakMap,ld=new WeakMap,LC=new WeakMap,NC=new WeakSet,ere=function(){return e6(this,LC)._++},BC=new WeakSet,tre=function(n){Qc(this,bs,new Cj({backgroundAlpha:0,width:n.screenSize.width,height:n.screenSize.height,autoDensity:!0,resolution:2})),Qc(this,Nr,new Dje({stopPropagation:!0,screenWidth:n.screenSize.width,screenHeight:n.screenSize.height,events:Ze(this,bs).renderer.events,passiveWheel:!1})),Ze(this,Nr).on("clicked",r=>{const{x:i,y:o}=r.world,s=Ze(this,ad).search({minX:i,minY:o,maxX:i+Number.MIN_VALUE,maxY:o+Number.MIN_VALUE});this.emit("click",r.event,{world:r.world,components:s})}),Ze(this,bs).stage.addChild(Ze(this,Nr)),Ze(this,Nr).drag().pinch().wheel().decelerate({friction:.98}).clampZoom({maxScale:300,minScale:1e-5}),Ze(this,Nr).on("moved",()=>{Ze(this,ug).call(this)(),Ze(this,D1).call(this)()}),Ze(this,Nr).on("mousemove",r=>Ze(this,$C).call(this)(r)),Qc(this,sd,new Ko),Ze(this,Nr).addChild(Ze(this,sd)),Qc(this,cu,new Ug),Ze(this,Nr).addChild(Ze(this,cu)),Qc(this,ld,new Ug),Ze(this,Nr).addChild(Ze(this,ld)),Mi(this,FC,nre).call(this)},ug=new WeakMap,D1=new WeakMap,$C=new WeakMap,FC=new WeakSet,nre=function(){const{dynamicResolution:n}=Ze(this,pi),{dtMax:r,dtMin:i,increment:o,intervalMs:s,maxScale:l,minScale:c}=n,d=Gt.floor(Xr.targetFPMS*s);let f=0,h=0,p=1;Ze(this,bs).ticker.add(g=>{const{tileResolution:v}=Ze(this,pi);if(!(f%d)){const y=h/d;p=Gt.clamp(y>=r?p+o:y<=i?p-o:p,c,l),Gt.map(Ze(this,kl),S=>{S.call("setTileResolution",[{width:Gt.ceil(v.width/p),height:Gt.ceil(v.height/p)}])}),h=0}h+=g,f++})},zC=new WeakSet,rre=function(n){Gt.map(Ze(this,kl),r=>r.terminate()),Qc(this,kl,Gt.times(n.workerCount,r=>{const i=new nWe;return i.on("update",o=>Mi(this,UC,ore).call(this,o)),i.onerror=o=>{throw o},i.call("setup",[{...n,workerIndex:r}]),i}))},jC=new WeakSet,ire=function(n){var o,s,l,c;const{width:r,height:i}=n.screenSize;(l=(s=(o=Ze(this,bs))==null?void 0:o.renderer)==null?void 0:s.resize)==null||l.call(s,r,i),(c=Ze(this,Nr))==null||c.resize(r,i)},UC=new WeakSet,ore=function({bounds:n,bitmap:r}){const i=ht.from(r);Mi(this,WC,are).call(this,i,n)},L1=new WeakSet,Q3=function(){const{top:n,bottom:r,left:i,right:o}=Ze(this,Nr);Gt.map(Ze(this,kl),s=>s.call("setFrustum",[{top:n,bottom:r,left:i,right:o}]))},N1=new WeakSet,J3=function(){var s,l,c,d,f;const{tileSubdivision:n,accentColor:r}=Ze(this,pi),{tiles:i}=gV(Ze(this,Nr),n),o=Mi(this,B1,Z3).call(this);(s=Ze(this,cu))==null||s.clear(),(l=Ze(this,cu))==null||l.lineStyle(1*o,r,.5),(c=Ze(this,cu))==null||c.beginFill(r,.05);for(const{bounds:h,tile:p}of i)Gt.find((d=Ze(this,sd))==null?void 0:d.children,g=>Gt.isEqual(g.bounds,h))||(f=Ze(this,cu))==null||f.drawRect(h.left,h.top,h.right-h.left,h.bottom-h.top)},HC=new WeakSet,sre=function(n){var c;const{accentColor:r}=Ze(this,pi),i=Mi(this,B1,Z3).call(this),{x:o,y:s}=Ze(this,Nr).toWorld(n.globalX,n.globalY),l=Ze(this,ad).search({minX:o,minY:s,maxX:o+Number.MIN_VALUE,maxY:s+Number.MIN_VALUE});Ze(this,ld).clear(),Ze(this,ld).lineStyle(2*i,r,1);for(const d of l)(c=Ze(this,ld))==null||c.drawRect(d.left,d.top,d.right-d.left,d.bottom-d.top)},B1=new WeakSet,Z3=function(){const{right:n,left:r}=Ze(this,Nr),{width:i}=Ze(this,pi).screenSize;return(n-r)/i},WC=new WeakSet,are=async function(n,r){var s,l;const{tileSubdivision:i}=Ze(this,pi),{tiles:o}=gV(Ze(this,Nr),i);if(Gt.find(o,c=>Gt.isEqual(c.bounds,r))){const c={x:(r.right-r.left)/n.width,y:(r.bottom-r.top)/n.height},d=new iWe(n,r);(s=Ze(this,sd))==null||s.addChild(d).setTransform(r.left,r.top,c.x,c.y),Ze(this,D1).call(this)(),await Mi(this,GC,lre).call(this,d),Gt.forEach((l=Ze(this,sd))==null?void 0:l.children,async f=>{rWe(f.bounds,r)&&f.age{const o=s=>{n.alpha+=s/Xr.targetFPMS/Ze(this,pi).animationDuration,n.alpha>1&&(r.remove(o),i())};n.alpha=0,r.add(o)})},VC=new WeakSet,cre=function(n){const r=Ze(this,bs).ticker;return new Promise(i=>{const o=s=>{n.alpha-=s/Xr.targetFPMS/Ze(this,pi).animationDuration,n.alpha<0&&(r.remove(o),i())};n.alpha=1,r.add(o)})};const sWe=c8e(oWe,{components:["rect","circle","path","polygon"],id:"d2-renderer",name:"Pixi",description:"Provides 2D Visualisation Support",version:"1.0.0"}),aWe={"d2-renderer":sWe};var lWe=function(t,n){if(n=n.split(":")[0],t=+t,!t)return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0},Pj={},cWe=Object.prototype.hasOwnProperty,uWe;function bV(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function xV(e){try{return encodeURIComponent(e)}catch{return null}}function dWe(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var i=bV(r[1]),o=bV(r[2]);i===null||o===null||i in n||(n[i]=o)}return n}function fWe(e,t){t=t||"";var n=[],r,i;typeof t!="string"&&(t="?");for(i in e)if(cWe.call(e,i)){if(r=e[i],!r&&(r===null||r===uWe||isNaN(r))&&(r=""),i=xV(i),r=xV(r),i===null||r===null)continue;n.push(i+"="+r)}return n.length?t+n.join("&"):""}Pj.stringify=fWe;Pj.parse=dWe;var ure=lWe,Qk=Pj,hWe=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,dre=/[\n\r\t]/g,pWe=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,fre=/:\d+$/,mWe=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,gWe=/^[a-zA-Z]:/;function Oj(e){return(e||"").toString().replace(hWe,"")}var e5=[["#","hash"],["?","query"],function(t,n){return Vl(n.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],wV={hash:1,query:1};function hre(e){var t;typeof window<"u"?t=window:typeof Nt<"u"?t=Nt:typeof self<"u"?t=self:t={};var n=t.location||{};e=e||n;var r={},i=typeof e,o;if(e.protocol==="blob:")r=new Jl(unescape(e.pathname),{});else if(i==="string"){r=new Jl(e,{});for(o in wV)delete r[o]}else if(i==="object"){for(o in e)o in wV||(r[o]=e[o]);r.slashes===void 0&&(r.slashes=pWe.test(e.href))}return r}function Vl(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function pre(e,t){e=Oj(e),e=e.replace(dre,""),t=t||{};var n=mWe.exec(e),r=n[1]?n[1].toLowerCase():"",i=!!n[2],o=!!n[3],s=0,l;return i?o?(l=n[2]+n[3]+n[4],s=n[2].length+n[3].length):(l=n[2]+n[4],s=n[2].length):o?(l=n[3]+n[4],s=n[3].length):l=n[4],r==="file:"?s>=2&&(l=l.slice(2)):Vl(r)?l=n[4]:r?i&&(l=l.slice(2)):s>=2&&Vl(t.protocol)&&(l=n[4]),{protocol:r,slashes:i||Vl(r),slashesCount:s,rest:l}}function vWe(e,t){if(e==="")return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,s=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),s++):s&&(r===0&&(o=!0),n.splice(r,1),s--);return o&&n.unshift(""),(i==="."||i==="..")&&n.push(""),n.join("/")}function Jl(e,t,n){if(e=Oj(e),e=e.replace(dre,""),!(this instanceof Jl))return new Jl(e,t,n);var r,i,o,s,l,c,d=e5.slice(),f=typeof t,h=this,p=0;for(f!=="object"&&f!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=Qk.parse),t=hre(t),i=pre(e||"",t),r=!i.protocol&&!i.slashes,h.slashes=i.slashes||r&&t.slashes,h.protocol=i.protocol||t.protocol||"",e=i.rest,(i.protocol==="file:"&&(i.slashesCount!==2||gWe.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!Vl(h.protocol)))&&(d[3]=[/(.*)/,"pathname"]);p{const n=[];for(const{transport:r,url:i,key:o,disabled:s}of e??[])if(!s){const l=new gre[r].constructor({url:i});n.push({key:o,url:i,renderer:await l.get()})}t(()=>n)},[e,t]),C.jsx(C.Fragment,{})}const SWe={connected:"success.light",connecting:"warning.light",error:"error.light",disabled:"text.disabled"};function EWe({value:e,onValueChange:t}){const[n]=Tk(),r=ee.find(n,{key:e.key});function i(s){t==null||t(sk(e,s))}const o=e!=null&&e.disabled?"disabled":r?"connected":"error";return C.jsx(C.Fragment,{children:C.jsxs(bn,{alignItems:"center",py:.5,children:[C.jsx(rte,{sx:{color:SWe[o]}}),C.jsx(Kr,{}),C.jsxs(dt,{flex:1,children:[C.jsx(zt,{children:r?`${r.renderer.meta.name} ${r.renderer.meta.version}`:ee.startCase(o)}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:r?C.jsxs(C.Fragment,{children:[C.jsx("span",{children:r.renderer.meta.description}),C.jsx("br",{}),C.jsxs("span",{children:["Contributes: ",ee.join(r.renderer.meta.components,", ")]})]}):(e==null?void 0:e.url)||"No URL"})]}),C.jsx(Kd,{title:`${e.disabled?"Enable":"Disable"} Renderer`,children:C.jsx(dt,{children:C.jsx(Tg,{checked:!e.disabled,onChange:(s,l)=>i({disabled:!l})})})}),C.jsx(cj,{trigger:s=>C.jsx(Fm,{icon:C.jsx(ok,{}),label:"Edit Renderer",onClick:s}),appBar:{children:C.jsx(lj,{children:"Edit Renderer"})},children:C.jsxs(dt,{p:2.5,children:[C.jsx(X1,{value:e.url,onChange:s=>i({url:s.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(mx,{placeholder:"Renderer Type",items:ee.entries(gre).map(([s,{name:l}])=>({value:s,label:l})),fullWidth:!0,value:e.transport,onChange:s=>i({transport:s})})]})})]})})}var Mj={},Jk={},xw={};(function(e){var t=Nt&&Nt.__extends||function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var b in _)Object.prototype.hasOwnProperty.call(_,b)&&(S[b]=_[b])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function S(){this.constructor=v}v.prototype=y===null?Object.create(y):(S.prototype=y.prototype,new S)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.createJSONRPCNotification=e.createJSONRPCRequest=e.createJSONRPCSuccessResponse=e.createJSONRPCErrorResponse=e.JSONRPCErrorCode=e.JSONRPCErrorException=e.isJSONRPCResponses=e.isJSONRPCResponse=e.isJSONRPCRequests=e.isJSONRPCRequest=e.isJSONRPCID=e.JSONRPC=void 0,e.JSONRPC="2.0";var n=function(g){return typeof g=="string"||typeof g=="number"||g===null};e.isJSONRPCID=n;var r=function(g){return g.jsonrpc===e.JSONRPC&&g.method!==void 0&&g.result===void 0&&g.error===void 0};e.isJSONRPCRequest=r;var i=function(g){return Array.isArray(g)&&g.every(e.isJSONRPCRequest)};e.isJSONRPCRequests=i;var o=function(g){return g.jsonrpc===e.JSONRPC&&g.id!==void 0&&(g.result!==void 0||g.error!==void 0)};e.isJSONRPCResponse=o;var s=function(g){return Array.isArray(g)&&g.every(e.isJSONRPCResponse)};e.isJSONRPCResponses=s;var l=function(g,v,y){var S={code:g,message:v};return y!=null&&(S.data=y),S},c=function(g){t(v,g);function v(y,S,_){var b=g.call(this,y)||this;return Object.setPrototypeOf(b,v.prototype),b.code=S,b.data=_,b}return v.prototype.toObject=function(){return l(this.code,this.message,this.data)},v}(Error);e.JSONRPCErrorException=c,function(g){g[g.ParseError=-32700]="ParseError",g[g.InvalidRequest=-32600]="InvalidRequest",g[g.MethodNotFound=-32601]="MethodNotFound",g[g.InvalidParams=-32602]="InvalidParams",g[g.InternalError=-32603]="InternalError"}(e.JSONRPCErrorCode||(e.JSONRPCErrorCode={}));var d=function(g,v,y,S){return{jsonrpc:e.JSONRPC,id:g,error:l(v,y,S)}};e.createJSONRPCErrorResponse=d;var f=function(g,v){return{jsonrpc:e.JSONRPC,id:g,result:v??null}};e.createJSONRPCSuccessResponse=f;var h=function(g,v,y){return{jsonrpc:e.JSONRPC,id:g,method:v,params:y}};e.createJSONRPCRequest=h;var p=function(g,v){return{jsonrpc:e.JSONRPC,method:g,params:v}};e.createJSONRPCNotification=p})(xw);var ww={};Object.defineProperty(ww,"__esModule",{value:!0});ww.DefaultErrorCode=void 0;ww.DefaultErrorCode=0;var _V=Nt&&Nt.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function l(f){try{d(r.next(f))}catch(h){s(h)}}function c(f){try{d(r.throw(f))}catch(h){s(h)}}function d(f){f.done?o(f.value):i(f.value).then(l,c)}d((r=r.apply(e,t||[])).next())})},SV=Nt&&Nt.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(n=0)),n;)try{if(r=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]{const r=({data:i})=>{i.id===n.id&&(this.rpc.receive(i),this.worker.removeEventListener("message",r))};this.worker.postMessage(n),this.worker.addEventListener("message",r)})}connect(){return this.worker.postMessage(this.options.url),new Promise(t=>{const n=()=>{t(),this.worker.removeEventListener("message",n)};this.worker.addEventListener("message",n)})}async disconnect(){this.worker.terminate()}async call(t,n){return await this.rpc.request(t,n)}}const jWe={trace:async(e,t)=>{switch(e){case"about":return{name:"Search Trace",description:"Provides JSON Search Trace Support",version:"1.0.2"};case"features/formats":return[{id:"grid",name:"Grid"},{id:"xy",name:"Network"},{id:"mesh",name:"Mesh"}];case"features/algorithms":return[{id:"identity",name:"Unknown",hidden:!0}];case"solve/pathfinding":{const{parameters:n}=t;try{return JSON.parse((n==null?void 0:n.content)??"")}catch{return{}}}}}};class UWe{constructor(t){Gp(this,"handler");this.options=t;const{hostname:n}=mre(t.url);this.handler=jWe[n]}async connect(){}async disconnect(){}async call(t,n){return await this.handler(t,n)}}const Zl=Object.create(null);Zl.open="0";Zl.close="1";Zl.ping="2";Zl.pong="3";Zl.message="4";Zl.upgrade="5";Zl.noop="6";const qS=Object.create(null);Object.keys(Zl).forEach(e=>{qS[Zl[e]]=e});const t5={type:"error",data:"parser error"},yre=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",bre=typeof ArrayBuffer=="function",xre=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Dj=({type:e,data:t},n,r)=>yre&&t instanceof Blob?n?r(t):kV(t,r):bre&&(t instanceof ArrayBuffer||xre(t))?n?r(t):kV(new Blob([t]),r):r(Zl[e]+(t||"")),kV=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function AV(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let YB;function HWe(e,t){if(yre&&e.data instanceof Blob)return e.data.arrayBuffer().then(AV).then(t);if(bre&&(e.data instanceof ArrayBuffer||xre(e.data)))return t(AV(e.data));Dj(e,!1,n=>{YB||(YB=new TextEncoder),t(YB.encode(n))})}const RV="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jb=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,s,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),f=new Uint8Array(d);for(r=0;r>4,f[i++]=(s&15)<<4|l>>2,f[i++]=(l&3)<<6|c&63;return d},GWe=typeof ArrayBuffer=="function",Lj=(e,t)=>{if(typeof e!="string")return{type:"message",data:wre(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:VWe(e.substring(1),t)}:qS[n]?e.length>1?{type:qS[n],data:e.substring(1)}:{type:qS[n]}:t5},VWe=(e,t)=>{if(GWe){const n=WWe(e);return wre(n,t)}else return{base64:!0,data:e}},wre=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},_re=String.fromCharCode(30),qWe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Dj(o,!1,l=>{r[s]=l,++i===n&&t(r.join(_re))})})},XWe=(e,t)=>{const n=e.split(_re),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let KB;function rS(e){return e.reduce((t,n)=>t+n.length,0)}function iS(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){l.enqueue(t5);break}i=f*Math.pow(2,32)+d.getUint32(4),r=3}else{if(rS(n)e){l.enqueue(t5);break}}}})}const Sre=4;function Qr(e){if(e)return QWe(e)}function QWe(e){for(var t in Qr.prototype)e[t]=Qr.prototype[t];return e}Qr.prototype.on=Qr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Qr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Qr.prototype.off=Qr.prototype.removeListener=Qr.prototype.removeAllListeners=Qr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function Ere(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const JWe=Zs.setTimeout,ZWe=Zs.clearTimeout;function tA(e,t){t.useNativeTimers?(e.setTimeoutFn=JWe.bind(Zs),e.clearTimeoutFn=ZWe.bind(Zs)):(e.setTimeoutFn=Zs.setTimeout.bind(Zs),e.clearTimeoutFn=Zs.clearTimeout.bind(Zs))}const eGe=1.33;function tGe(e){return typeof e=="string"?nGe(e):Math.ceil((e.byteLength||e.size)*eGe)}function nGe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function rGe(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function iGe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function Tre(){const e=OV(+new Date);return e!==PV?(IV=0,PV=e):e+"."+OV(IV++)}for(;oS{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};XWe(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,qWe(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Tre()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ql(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class ql extends Qr{constructor(t,n){super(),tA(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=Ere(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Are(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=ql.requestsCount++,ql.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=lGe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ql.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}ql.requestsCount=0;ql.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",MV);else if(typeof addEventListener=="function"){const e="onpagehide"in Zs?"pagehide":"unload";addEventListener(e,MV,!1)}}function MV(){for(let e in ql.requests)ql.requests.hasOwnProperty(e)&&ql.requests[e].abort()}const Bj=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),sS=Zs.WebSocket||Zs.MozWebSocket,DV=!0,dGe="arraybuffer",LV=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class fGe extends Nj{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=LV?{}:Ere(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=DV&&!LV?n?new sS(t,n):new sS(t):new sS(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const s={};try{DV&&this.ws.send(o)}catch{}i&&Bj(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Tre()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!sS}}class hGe extends Nj{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=KWe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=YWe();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:c})=>{l||(this.onPacket(c),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&Bj(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const pGe={websocket:fGe,webtransport:hGe,polling:uGe},mGe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,gGe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function r5(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=mGe.exec(e||""),o={},s=14;for(;s--;)o[gGe[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=vGe(o,o.path),o.queryKey=yGe(o,o.query),o}function vGe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function yGe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Rre=class ym extends Qr{constructor(t,n={}){super(),this.binaryType=dGe,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=r5(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=r5(n.host).host),tA(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=iGe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Sre,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new pGe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&ym.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;ym.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ym.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const s=h=>{const p=new Error("probe error: "+h);p.transport=n.name,o(),this.emitReserved("upgradeError",p)};function l(){s("transport closed")}function c(){s("socket closed")}function d(h){n&&h.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",c),this.off("upgrading",d)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",c),this.once("upgrading",d),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",ym.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){ym.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Ire=Object.prototype.toString,_Ge=typeof Blob=="function"||typeof Blob<"u"&&Ire.call(Blob)==="[object BlobConstructor]",SGe=typeof File=="function"||typeof File<"u"&&Ire.call(File)==="[object FileConstructor]";function $j(e){return xGe&&(e instanceof ArrayBuffer||wGe(e))||_Ge&&e instanceof Blob||SGe&&e instanceof File}function XS(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,l)=>r?s?o(s):i(l):i(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:hn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case hn.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case hn.EVENT:case hn.BINARY_EVENT:this.onevent(t);break;case hn.ACK:case hn.BINARY_ACK:this.onack(t);break;case hn.DISCONNECT:this.ondisconnect();break;case hn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:hn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:hn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}vv.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};vv.prototype.reset=function(){this.attempts=0};vv.prototype.setMin=function(e){this.ms=e};vv.prototype.setMax=function(e){this.max=e};vv.prototype.setJitter=function(e){this.jitter=e};class s5 extends Qr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,tA(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new vv({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||IGe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Rre(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Xa(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=Xa(n,"error",o);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Xa(t,"ping",this.onping.bind(this)),Xa(t,"data",this.ondata.bind(this)),Xa(t,"error",this.onerror.bind(this)),Xa(t,"close",this.onclose.bind(this)),Xa(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Bj(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Pre(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Pb={};function YS(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=bGe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=Pb[i]&&o in Pb[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let c;return l?c=new s5(r,t):(Pb[i]||(Pb[i]=new s5(r,t)),c=Pb[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(YS,{Manager:s5,Socket:Pre,io:YS,connect:YS});class OGe{constructor(t){Gp(this,"rpc");Gp(this,"socket");this.options=t,this.socket=YS(t.url),this.rpc=new Mj.JSONRPCClient(async n=>{const r=i=>{i.id===n.id&&(this.socket.off("response",r),this.rpc.receive(i))};this.socket.emit("request",n),this.socket.on("response",r)})}async connect(){this.socket.connect()}async disconnect(){this.socket.disconnect()}async call(t,n){return await this.rpc.request(t,n)}}const zj={socketio:{name:"socket.io",constructor:OGe},ipc:{name:"Web Worker",constructor:zWe},native:{name:"Internal",constructor:UWe}};function MGe(e){return zj[e].constructor}const Ore=ee.first(ee.keys(zj));function DGe(){const[{renderer:e},t]=Lu();return C.jsx(C.Fragment,{children:C.jsx(Dk,{editor:n=>C.jsx(EWe,{value:n}),icon:null,value:e,onChange:ee.debounce(n=>t(()=>({renderer:n})),300),addItemLabel:"Add Renderer",create:()=>({transport:Ore,url:"",disabled:!0}),extras:C.jsx($d,{icon:C.jsx(KK,{}),sx:{ml:2},onClick:()=>t(()=>({renderer:GQ})),children:"Reset to Defaults"})})})}function LGe(e){const[{connections:t}]=yk(),n=Lz(),[{remote:r}]=Lu(),i=ee.find(r,{url:e});return i&&!(i!=null&&i.disabled)?n({url:e})?"connected":t?"connecting":e?"error":"not-connected":"not-connected"}const NGe={connected:"success.light",connecting:"warning.light",error:"error.light","not-connected":"text.disabled"};function BGe({value:e,onValueChange:t}){const n=R2e(e.url),r=LGe(e.url);function i(o){t==null||t(sk(e,o))}return C.jsx(C.Fragment,{children:C.jsxs(bn,{alignItems:"center",py:.5,children:[C.jsx(rte,{sx:{color:NGe[r]}}),C.jsx(Kr,{}),C.jsxs(dt,{flex:1,children:[C.jsx(zt,{children:n?`${n.name} ${n.version}`:ee.startCase(r)}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:(n==null?void 0:n.description)??((e==null?void 0:e.url)||"No URL")})]}),C.jsx(Kd,{title:`${e.disabled?"Enable":"Disable"} Connection`,children:C.jsx(dt,{children:C.jsx(Tg,{checked:!e.disabled,onChange:(o,s)=>i({disabled:!s})})})}),C.jsx(cj,{trigger:o=>C.jsx(Fm,{icon:C.jsx(ok,{}),label:"Edit Connection",onClick:o}),appBar:{children:C.jsx(lj,{children:"Edit Connection"})},children:C.jsxs(dt,{p:2.5,children:[C.jsx(X1,{value:e.url,onChange:o=>i({url:o.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(mx,{placeholder:"Connection Type",items:ee.entries(zj).map(([o,{name:s}])=>({value:o,label:s})),fullWidth:!0,value:e.transport,onChange:o=>i({transport:o})})]})})]})})}function $Ge(){const[{remote:e},t]=Lu();return C.jsx(C.Fragment,{children:C.jsx(Dk,{editor:n=>C.jsx(BGe,{value:n}),icon:null,value:e,onChange:ee.debounce(n=>t(()=>({remote:n})),300),addItemLabel:"Add Solver",create:()=>({transport:Ore,url:"",disabled:!0}),extras:C.jsx($d,{icon:C.jsx(KK,{}),sx:{ml:2},onClick:()=>t(()=>({remote:WQ})),children:"Reset to Defaults"})})})}const BV=e=>`${e}x`;function FGe(){const{controls:e,onChange:t,state:n}=Du(),[{playbackRate:r=1,acrylic:i,theme:o="light",accentColor:s="teal"},l]=Lu(),[c,d]=I.useState("general");function f(p){return C.jsx(zt,{variant:"overline",color:"text.secondary",children:p})}function h(p){return C.jsx(zt,{variant:"body1",children:p})}return C.jsx(XQ,{value:c,children:C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Options,{children:C.jsxs(JQ,{onChange:(p,g)=>d(g),children:[C.jsx(Mm,{label:"General",value:"general"}),C.jsx(Mm,{label:"Connections",value:"connections"}),C.jsx(Mm,{label:"Renderers",value:"renderers"}),C.jsx(Mm,{label:"Map Parsers",value:"map-parsers"})]})}),C.jsx(Sn.Content,{children:C.jsx(bn,{vertical:!0,children:C.jsx(rv,{y:!0,children:C.jsxs(bn,{vertical:!0,pt:6,children:[C.jsx(Bm,{value:"general",children:C.jsxs(dt,{children:[f("Playback"),C.jsxs(bn,{alignItems:"center",children:[h("Playback Rate"),C.jsx(Kr,{flex:1}),C.jsx(H0e,{sx:{maxWidth:320,mr:2},marks:[1,2,5,10].map(p=>({value:p*cm,label:BV(p)})),step:1*cm,min:1*cm,max:10*cm,valueLabelFormat:p=>BV(p/cm),valueLabelDisplay:"auto",defaultValue:r,onChangeCommitted:(p,g)=>l(()=>({playbackRate:g}))})]}),f("UI"),C.jsxs(bn,{alignItems:"center",children:[h("Acrylic"),C.jsx(Kr,{flex:1}),C.jsx(Tg,{defaultChecked:!!i,onChange:(p,g)=>l(()=>({acrylic:g}))})]}),C.jsxs(bn,{alignItems:"center",children:[h("Dark Mode"),C.jsx(Kr,{flex:1}),C.jsx(Tg,{defaultChecked:o==="dark",onChange:(p,g)=>l(()=>({theme:g?"dark":"light"}))})]}),C.jsxs(bn,{alignItems:"center",children:[h("Accent"),C.jsx(Kr,{flex:1}),C.jsx(Xo,{value:s,items:ee.map(ee.keys(v_e),p=>({id:p,name:ee.startCase(p)})),showArrow:!0,onChange:p=>l(()=>({accentColor:p}))})]})]})}),C.jsx(Bm,{value:"connections",children:C.jsxs(dt,{children:[f("Solvers"),C.jsx($Ge,{})]})}),C.jsx(Bm,{value:"renderers",children:C.jsxs(dt,{children:[f("Renderers"),C.jsx(DGe,{})]})}),C.jsx(Bm,{value:"map-parsers",children:C.jsxs(dt,{children:[f("Map Parsers"),C.jsx(zGe,{})]})})]})})})}),C.jsx(Sn.Extras,{children:e})]})})}function zGe(){return C.jsx(yp,{children:ee.keys(bz).map(e=>C.jsx(Qm,{children:C.jsx(sl,{primary:e,secondary:"Internal"})},e))})}const nA=0,nf=1,yv=2,Mre=4;function Dre(e,t){return n=>e(t(n))}function jGe(e,t){return t(e)}function Lre(e,t){return n=>e(t,n)}function $V(e,t){return()=>e(t)}function rA(e,t){return t(e),e}function gr(...e){return e}function UGe(e){e()}function FV(e){return()=>e}function HGe(...e){return()=>{e.map(UGe)}}function jj(e){return e!==void 0}function bv(){}function jn(e,t){return e(nf,t)}function en(e,t){e(nA,t)}function Uj(e){e(yv)}function As(e){return e(Mre)}function St(e,t){return jn(e,Lre(t,nA))}function Ru(e,t){const n=e(nf,r=>{n(),t(r)});return n}function yn(){const e=[];return(t,n)=>{switch(t){case yv:e.splice(0,e.length);return;case nf:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case nA:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function et(e){let t=e;const n=yn();return(r,i)=>{switch(r){case nf:i(t);break;case nA:t=i;break;case Mre:return t}return n(r,i)}}function WGe(e){let t,n;const r=()=>t&&t();return function(i,o){switch(i){case nf:return o?n===o?void 0:(r(),n=o,t=jn(e,o),t):(r(),bv);case yv:r(),n=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function Ds(e){return rA(yn(),t=>St(e,t))}function Co(e,t){return rA(et(t),n=>St(e,n))}function GGe(...e){return t=>e.reduceRight(jGe,t)}function Pe(e,...t){const n=GGe(...t);return(r,i)=>{switch(r){case nf:return jn(e,n(i));case yv:Uj(e);return}}}function Nre(e,t){return e===t}function hr(e=Nre){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ht(e){return t=>n=>{e(n)&&t(n)}}function lt(e){return t=>Dre(t,e)}function lu(e){return t=>()=>t(e)}function Nl(e,t){return n=>r=>n(t=e(t,r))}function Wg(e){return t=>n=>{e>0?e--:t(n)}}function vd(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function zV(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function an(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);jn(o,c=>{const d=n;n=n|l,t[s]=c,d!==i&&n===i&&r&&(r(),r=null)})}),o=>s=>{const l=()=>o([s].concat(t));n===i?l():r=l}}function jV(...e){return function(t,n){switch(t){case nf:return HGe(...e.map(r=>jn(r,n)));case yv:return;default:throw new Error(`unrecognized action ${t}`)}}}function Ut(e,t=Nre){return Pe(e,hr(t))}function yi(...e){const t=yn(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);jn(o,c=>{n[s]=c,r=r|l,r===i&&en(t,n)})}),function(o,s){switch(o){case nf:return r===i&&s(n),jn(t,s);case yv:return Uj(t);default:throw new Error(`unrecognized action ${o}`)}}}function $n(e,t=[],{singleton:n}={singleton:!0}){return{id:VGe(),constructor:e,dependencies:t,singleton:n}}const VGe=()=>Symbol();function qGe(e){const t=new Map,n=({id:r,constructor:i,dependencies:o,singleton:s})=>{if(s&&t.has(r))return t.get(r);const l=i(o.map(c=>n(c)));return s&&t.set(r,l),l};return n(e)}function XGe(e,t){const n={},r={};let i=0;const o=e.length;for(;i(S[_]=b=>{const x=y[t.methods[_]];en(x,b)},S),{})}function f(y){return s.reduce((S,_)=>(S[_]=WGe(y[t.events[_]]),S),{})}return{Component:de.forwardRef((y,S)=>{const{children:_,...b}=y,[x]=de.useState(()=>rA(qGe(e),A=>c(A,b))),[E]=de.useState($V(f,x));return aS(()=>{for(const A of s)A in b&&jn(E[A],b[A]);return()=>{Object.values(E).map(Uj)}},[b,E,x]),aS(()=>{c(x,b)}),de.useImperativeHandle(S,FV(d(x))),de.createElement(l.Provider,{value:x},n?de.createElement(n,XGe([...r,...i,...s],b),_):_)}),usePublisher:y=>de.useCallback(Lre(en,de.useContext(l)[y]),[y]),useEmitterValue:y=>{const _=de.useContext(l)[y],[b,x]=de.useState($V(As,_));return aS(()=>jn(_,E=>{E!==b&&x(FV(E))}),[_,b]),b},useEmitter:(y,S)=>{const b=de.useContext(l)[y];aS(()=>jn(b,S),[S,b])}}}const YGe=typeof document<"u"?de.useLayoutEffect:de.useEffect,KGe=YGe;var Ls=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Ls||{});const QGe={0:"debug",1:"log",2:"warn",3:"error"},JGe=()=>typeof globalThis>"u"?window:globalThis,rf=$n(()=>{const e=et(3);return{log:et((n,r,i=1)=>{var o;const s=(o=JGe().VIRTUOSO_LOG_LEVEL)!=null?o:As(e);i>=s&&console[QGe[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Hj(e,t=!0){const n=de.useRef(null);let r=i=>{};if(typeof ResizeObserver<"u"){const i=de.useMemo(()=>new ResizeObserver(o=>{const s=o[0].target;s.offsetParent!==null&&e(s)}),[e]);r=o=>{o&&t?(i.observe(o),n.current=o):(n.current&&i.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function Hp(e,t=!0){return Hj(e,t).callbackRef}function ZGe(e,t,n,r,i,o,s){const l=de.useCallback(c=>{const d=e9e(c.children,t,"offsetHeight",i);let f=c.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const h=f.lastElementChild.dataset.viewportType==="window",p=s?s.scrollTop:h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,g=s?s.scrollHeight:h?document.documentElement.scrollHeight:f.scrollHeight,v=s?s.offsetHeight:h?window.innerHeight:f.offsetHeight;r({scrollTop:Math.max(p,0),scrollHeight:g,viewportHeight:v}),o==null||o(t9e("row-gap",getComputedStyle(c).rowGap,i)),d!==null&&e(d)},[e,t,i,o,s,r]);return Hj(l,n)}function e9e(e,t,n,r){const i=e.length;if(i===0)return null;const o=[];for(let s=0;s{const p=h.target,g=p===window||p===document,v=g?window.pageYOffset||document.documentElement.scrollTop:p.scrollTop,y=g?document.documentElement.scrollHeight:p.scrollHeight,S=g?window.innerHeight:p.offsetHeight,_=()=>{e({scrollTop:Math.max(v,0),scrollHeight:y,viewportHeight:S})};h.suppressFlushSync?_():Om.flushSync(_),s.current!==null&&(v===s.current||v<=0||v===y-S)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);de.useEffect(()=>{const h=i||o.current;return r(i||o.current),c({target:h,suppressFlushSync:!0}),h.addEventListener("scroll",c,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",c)}},[o,c,n,r,i]);function d(h){const p=o.current;if(!p||"offsetHeight"in p&&p.offsetHeight===0)return;const g=h.behavior==="smooth";let v,y,S;p===window?(y=Math.max(Wd(document.documentElement,"height"),document.documentElement.scrollHeight),v=window.innerHeight,S=document.documentElement.scrollTop):(y=p.scrollHeight,v=Wd(p,"height"),S=p.scrollTop);const _=y-v;if(h.top=Math.ceil(Math.max(Math.min(_,h.top),0)),$re(v,y)||h.top===S){e({scrollTop:S,scrollHeight:y,viewportHeight:v}),g&&t(!0);return}g?(s.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,p.scrollTo(h)}function f(h){o.current.scrollBy(h)}return{scrollerRef:o,scrollByCallback:f,scrollToCallback:d}}const Po=$n(()=>{const e=yn(),t=yn(),n=et(0),r=yn(),i=et(0),o=yn(),s=yn(),l=et(0),c=et(0),d=et(0),f=et(0),h=yn(),p=yn(),g=et(!1);return St(Pe(e,lt(({scrollTop:v})=>v)),t),St(Pe(e,lt(({scrollHeight:v})=>v)),s),St(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:o,headerHeight:l,fixedHeaderHeight:c,fixedFooterHeight:d,footerHeight:f,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:h,scrollBy:p,statefulScrollTop:i,deviation:n,scrollingInProgress:g}},[],{singleton:!0}),R1={lvl:0};function zre(e,t,n,r=R1,i=R1){return{k:e,v:t,lvl:n,l:r,r:i}}function Kn(e){return e===R1}function cg(){return R1}function a5(e,t){if(Kn(e))return R1;const{k:n,l:r,r:i}=e;if(t===n){if(Kn(r))return i;if(Kn(i))return r;{const[o,s]=jre(r);return KS(ui(e,{k:o,v:s,l:Ure(r)}))}}else return tt&&(l=l.concat(l5(o,t,n))),r>=t&&r<=n&&l.push({k:r,v:i}),r<=n&&(l=l.concat(l5(s,t,n))),l}function Kh(e){return Kn(e)?[]:[...Kh(e.l),{k:e.k,v:e.v},...Kh(e.r)]}function jre(e){return Kn(e.r)?[e.k,e.v]:jre(e.r)}function Ure(e){return Kn(e.r)?e.l:KS(ui(e,{r:Ure(e.r)}))}function ui(e,t){return zre(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function QB(e){return Kn(e)||e.lvl>e.r.lvl}function UV(e){return c5(Wre(e))}function KS(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(QB(t))return Wre(ui(e,{lvl:r-1}));if(!Kn(t)&&!Kn(t.r))return ui(t.r,{l:ui(t,{r:t.r.l}),r:ui(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(QB(e))return c5(ui(e,{lvl:r-1}));if(!Kn(n)&&!Kn(n.l)){const i=n.l,o=QB(i)?n.lvl-1:n.lvl;return ui(i,{l:ui(e,{r:i.l,lvl:r-1}),r:c5(ui(n,{l:i.r,lvl:o})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function iA(e,t,n){if(Kn(e))return[];const r=ml(e,t)[0];return n9e(l5(e,r,n))}function Hre(e,t){const n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]);const o=[];for(let s=1;s({index:t,value:n}))}function c5(e){const{r:t,lvl:n}=e;return!Kn(t)&&!Kn(t.r)&&t.lvl===n&&t.r.lvl===n?ui(t,{l:ui(e,{r:t.l}),lvl:n+1}):e}function Wre(e){const{l:t}=e;return!Kn(t)&&t.lvl===e.lvl?ui(t,{r:ui(e,{l:t.r})}):e}function PC(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const o=Math.floor((r+i)/2),s=e[o],l=n(s,t);if(l===0)return o;if(l===-1){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Gre(e,t,n){return e[PC(e,t,n)]}function r9e(e,t,n,r){const i=PC(e,t,r),o=PC(e,n,r,i);return e.slice(i,o+1)}const Wj=$n(()=>({recalcInProgress:et(!1)}),[],{singleton:!0});function i9e(e){const{size:t,startIndex:n,endIndex:r}=e;return i=>i.start===n&&(i.end===r||i.end===1/0)&&i.value===t}function HV(e,t){let n=0,r=0;for(;n=f||i===p)&&(e=a5(e,f)):(d=p!==i,c=!0),h>s&&s>=f&&p!==i&&(e=Cs(e,s+1,p));d&&(e=Cs(e,o,i))}return[e,n]}function s9e(){return{offsetTree:[],sizeTree:cg(),groupOffsetTree:cg(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Gj({index:e},t){return t===e?0:t0&&(t=Math.max(t,Gre(e,r,Gj).offset)),Hre(r9e(e,t,n,a9e),l9e)}function u5(e,t,n,r){let i=e,o=0,s=0,l=0,c=0;if(t!==0){c=PC(i,t-1,Gj),l=i[c].offset;const f=ml(n,t-1);o=f[0],s=f[1],i.length&&i[c].size===ml(n,t)[1]&&(c-=1),i=i.slice(0,c+1)}else i=[];for(const{start:d,value:f}of iA(n,t,1/0)){const h=d-o,p=h*s+l+h*r;i.push({offset:p,size:f,index:d}),o=d,l=p,s=f}return{offsetTree:i,lastIndex:o,lastOffset:l,lastSize:s}}function u9e(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Ls.DEBUG);const o=e.sizeTree;let s=o,l=0;if(n.length>0&&Kn(o)&&t.length===2){const p=t[0].size,g=t[1].size;s=n.reduce((v,y)=>Cs(Cs(v,y,p),y+1,g),s)}else[s,l]=o9e(s,t);if(s===o)return e;const{offsetTree:c,lastIndex:d,lastSize:f,lastOffset:h}=u5(e.offsetTree,l,s,i);return{sizeTree:s,offsetTree:c,lastIndex:d,lastOffset:h,lastSize:f,groupOffsetTree:n.reduce((p,g)=>Cs(p,g,P1(g,c,i)),cg()),groupIndices:n}}function P1(e,t,n){if(t.length===0)return 0;const{offset:r,index:i,size:o}=Gre(t,e,Gj),s=e-i,l=o*s+(s-1)*n+r;return l>0?l+n:l}function d9e(e){return typeof e.groupIndex<"u"}function Vre(e,t,n){if(d9e(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=qre(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function qre(e,t){if(!oA(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function oA(e){return!Kn(e.groupOffsetTree)}function f9e(e){return Kh(e).map(({k:t,v:n},r,i)=>{const o=i[r+1],s=o?o.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const h9e={offsetHeight:"height",offsetWidth:"width"},sc=$n(([{log:e},{recalcInProgress:t}])=>{const n=yn(),r=yn(),i=Co(r,0),o=yn(),s=yn(),l=et(0),c=et([]),d=et(void 0),f=et(void 0),h=et((A,R)=>Wd(A,h9e[R])),p=et(void 0),g=et(0),v=s9e(),y=Co(Pe(n,an(c,e,g),Nl(u9e,v),hr()),v),S=Co(Pe(c,hr(),Nl((A,R)=>({prev:A.current,current:R}),{prev:[],current:[]}),lt(({prev:A})=>A)),[]);St(Pe(c,Ht(A=>A.length>0),an(y,g),lt(([A,R,k])=>{const O=A.reduce((L,N,H)=>Cs(L,N,P1(N,R.offsetTree,k)||H),cg());return{...R,groupIndices:A,groupOffsetTree:O}})),y),St(Pe(r,an(y),Ht(([A,{lastIndex:R}])=>A[{startIndex:A,endIndex:R,size:k}])),n),St(d,f);const _=Co(Pe(d,lt(A=>A===void 0)),!0);St(Pe(f,Ht(A=>A!==void 0&&Kn(As(y).sizeTree)),lt(A=>[{startIndex:0,endIndex:0,size:A}])),n);const b=Ds(Pe(n,an(y),Nl(({sizes:A},[R,k])=>({changed:k!==A,sizes:k}),{changed:!1,sizes:v}),lt(A=>A.changed)));jn(Pe(l,Nl((A,R)=>({diff:A.prev-R,prev:R}),{diff:0,prev:0}),lt(A=>A.diff)),A=>{const{groupIndices:R}=As(y);if(A>0)en(t,!0),en(o,A+HV(A,R));else if(A<0){const k=As(S);k.length>0&&(A-=HV(-A,k)),en(s,A)}}),jn(Pe(l,an(e)),([A,R])=>{A<0&&R("`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:l},Ls.ERROR)});const x=Ds(o);St(Pe(o,an(y),lt(([A,R])=>{const k=R.groupIndices.length>0,O=[],L=R.lastSize;if(k){const N=I1(R.sizeTree,0);let H=0,W=0;for(;H{let G=F.ranges;return F.prevSize!==0&&(G=[...F.ranges,{startIndex:F.prevIndex,endIndex:j+A-1,size:F.prevSize}]),{ranges:G,prevIndex:j+A,prevSize:V}},{ranges:O,prevIndex:A,prevSize:0}).ranges}return Kh(R.sizeTree).reduce((N,{k:H,v:W})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:H+A-1,size:N.prevSize}],prevIndex:H+A,prevSize:W}),{ranges:[],prevIndex:0,prevSize:L}).ranges})),n);const E=Ds(Pe(s,an(y,g),lt(([A,{offsetTree:R},k])=>{const O=-A;return P1(O,R,k)})));return St(Pe(s,an(y,g),lt(([A,R,k])=>{if(R.groupIndices.length>0){if(Kn(R.sizeTree))return R;let L=cg();const N=As(S);let H=0,W=0,z=0;for(;H<-A;){z=N[W];const F=N[W+1]-z-1;W++,H+=F+1}if(L=Kh(R.sizeTree).reduce((F,{k:j,v:V})=>Cs(F,Math.max(0,j+A),V),L),H!==-A){const F=I1(R.sizeTree,z);L=Cs(L,0,F);const j=ml(R.sizeTree,-A+1)[1];L=Cs(L,1,j)}return{...R,sizeTree:L,...u5(R.offsetTree,0,L,k)}}else{const L=Kh(R.sizeTree).reduce((N,{k:H,v:W})=>Cs(N,Math.max(0,H+A),W),cg());return{...R,sizeTree:L,...u5(R.offsetTree,0,L,k)}}})),y),{data:p,totalCount:r,sizeRanges:n,groupIndices:c,defaultItemSize:f,fixedItemSize:d,unshiftWith:o,shiftWith:s,shiftWithOffset:E,beforeUnshiftWith:x,firstItemIndex:l,gap:g,sizes:y,listRefresh:b,statefulTotalCount:i,trackItemSizes:_,itemSize:h}},gr(rf,Wj),{singleton:!0}),p9e=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Xre(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!p9e)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const _w=$n(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:i,viewportHeight:o,scrollTo:s,smoothScrollTargetReached:l,headerHeight:c,footerHeight:d,fixedHeaderHeight:f,fixedFooterHeight:h},{log:p}])=>{const g=yn(),v=et(0);let y=null,S=null,_=null;function b(){y&&(y(),y=null),_&&(_(),_=null),S&&(clearTimeout(S),S=null),en(i,!1)}return St(Pe(g,an(e,o,t,v,c,d,p),an(r,f,h),lt(([[x,E,A,R,k,O,L,N],H,W,z])=>{const D=Xre(x),{align:F,behavior:j,offset:V}=D,G=R-1,K=Vre(D,E,G);let Y=P1(K,E.offsetTree,H)+O;F==="end"?(Y+=W+ml(E.sizeTree,K)[1]-A+z,K===G&&(Y+=L)):F==="center"?Y+=(W+ml(E.sizeTree,K)[1]-A+z)/2:Y-=k,V&&(Y+=V);const J=ie=>{b(),ie?(N("retrying to scroll to",{location:x},Ls.DEBUG),en(g,x)):N("list did not change, scroll successful",{},Ls.DEBUG)};if(b(),j==="smooth"){let ie=!1;_=jn(n,ce=>{ie=ie||ce}),y=Ru(l,()=>{J(ie)})}else y=Ru(Pe(n,m9e(150)),J);return S=setTimeout(()=>{b()},1200),en(i,!0),N("scrolling from index to",{index:K,top:Y,behavior:j},Ls.DEBUG),{top:Y,behavior:j}})),s),{scrollToIndex:g,topListHeight:v}},gr(sc,Po,rf),{singleton:!0});function m9e(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const O1="up",Ax="down",g9e="none",v9e={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},y9e=0,Sw=$n(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:o}])=>{const s=et(!1),l=et(!0),c=yn(),d=yn(),f=et(4),h=et(y9e),p=Co(Pe(jV(Pe(Ut(t),Wg(1),lu(!0)),Pe(Ut(t),Wg(1),lu(!1),zV(100))),hr()),!1),g=Co(Pe(jV(Pe(o,lu(!0)),Pe(o,lu(!1),zV(200))),hr()),!1);St(Pe(yi(Ut(t),Ut(h)),lt(([b,x])=>b<=x),hr()),l),St(Pe(l,vd(50)),d);const v=Ds(Pe(yi(e,Ut(n),Ut(r),Ut(i),Ut(f)),Nl((b,[{scrollTop:x,scrollHeight:E},A,R,k,O])=>{const L=x+A-E>-O,N={viewportHeight:A,scrollTop:x,scrollHeight:E};if(L){let W,z;return x>b.state.scrollTop?(W="SCROLLED_DOWN",z=b.state.scrollTop-x):(W="SIZE_DECREASED",z=b.state.scrollTop-x||b.scrollTopDelta),{atBottom:!0,state:N,atBottomBecause:W,scrollTopDelta:z}}let H;return N.scrollHeight>b.state.scrollHeight?H="SIZE_INCREASED":Ab&&b.atBottom===x.atBottom))),y=Co(Pe(e,Nl((b,{scrollTop:x,scrollHeight:E,viewportHeight:A})=>{if($re(b.scrollHeight,E))return{scrollTop:x,scrollHeight:E,jump:0,changed:!1};{const R=E-(x+A)<1;return b.scrollTop!==x&&R?{scrollHeight:E,scrollTop:x,jump:b.scrollTop-x,changed:!0}:{scrollHeight:E,scrollTop:x,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),Ht(b=>b.changed),lt(b=>b.jump)),0);St(Pe(v,lt(b=>b.atBottom)),s),St(Pe(s,vd(50)),c);const S=et(Ax);St(Pe(e,lt(({scrollTop:b})=>b),hr(),Nl((b,x)=>As(g)?{direction:b.direction,prevScrollTop:x}:{direction:xb.direction)),S),St(Pe(e,vd(50),lu(g9e)),S);const _=et(0);return St(Pe(p,Ht(b=>!b),lu(0)),_),St(Pe(t,vd(100),an(p),Ht(([b,x])=>!!x),Nl(([b,x],[E])=>[x,E],[0,0]),lt(([b,x])=>x-b)),_),{isScrolling:p,isAtTop:l,isAtBottom:s,atBottomState:v,atTopStateChange:d,atBottomStateChange:c,scrollDirection:S,atBottomThreshold:f,atTopThreshold:h,scrollVelocity:_,lastJumpDueToItemResize:y}},gr(Po)),of=$n(([{log:e}])=>{const t=et(!1),n=Ds(Pe(t,Ht(r=>r),hr()));return jn(t,r=>{r&&As(e)("props updated",{},Ls.DEBUG)}),{propsReady:t,didMount:n}},gr(rf),{singleton:!0});function Vj(e,t){e==0?t():requestAnimationFrame(()=>Vj(e-1,t))}function qj(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ew=$n(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:i},{didMount:o}])=>{const s=et(!0),l=et(0),c=et(!1);return St(Pe(o,an(l),Ht(([d,f])=>!!f),lu(!1)),s),jn(Pe(yi(t,o),an(s,e,n,c),Ht(([[,d],f,{sizeTree:h},p,g])=>d&&(!Kn(h)||jj(p))&&!f&&!g),an(l)),([,d])=>{en(c,!0),Vj(3,()=>{Ru(r,()=>en(s,!0)),en(i,d)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:l}},gr(sc,Po,_w,of),{singleton:!0});function WV(e){return e?e==="smooth"?"smooth":"auto":!1}const b9e=(e,t)=>typeof e=="function"?WV(e(t)):t&&WV(e),x9e=$n(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:i},{scrolledToInitialItem:o},{propsReady:s,didMount:l},{log:c},{scrollingInProgress:d}])=>{const f=et(!1),h=yn();let p=null;function g(y){en(i,{index:"LAST",align:"end",behavior:y})}jn(Pe(yi(Pe(Ut(e),Wg(1)),l),an(Ut(f),n,o,d),lt(([[y,S],_,b,x,E])=>{let A=S&&x,R="auto";return A&&(R=b9e(_,b||E),A=A&&!!R),{totalCount:y,shouldFollow:A,followOutputBehavior:R}}),Ht(({shouldFollow:y})=>y)),({totalCount:y,followOutputBehavior:S})=>{p&&(p(),p=null),p=Ru(t,()=>{As(c)("following output to ",{totalCount:y},Ls.DEBUG),g(S),p=null})});function v(y){const S=Ru(r,_=>{y&&!_.atBottom&&_.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(As(c)("scrolling to bottom due to increased size",{},Ls.DEBUG),g("auto"))});setTimeout(S,100)}return jn(Pe(yi(Ut(f),e,s),Ht(([y,,S])=>y&&S),Nl(({value:y},[,S])=>({refreshed:y===S,value:S}),{refreshed:!1,value:0}),Ht(({refreshed:y})=>y),an(f,e)),([,y])=>{v(y!==!1)}),jn(h,()=>{v(As(f)!==!1)}),jn(yi(Ut(f),r),([y,S])=>{y&&!S.atBottom&&S.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&g("auto")}),{followOutput:f,autoscrollToBottom:h}},gr(sc,Sw,_w,Ew,of,rf,Po));function w9e(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Yre=$n(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:i}])=>{const o=yn(),s=yn(),l=Ds(Pe(o,lt(w9e)));return St(Pe(l,lt(c=>c.totalCount)),e),St(Pe(l,lt(c=>c.groupIndices)),t),St(Pe(yi(r,n,i),Ht(([c,d])=>oA(d)),lt(([c,d,f])=>ml(d.groupOffsetTree,Math.max(c-f,0),"v")[0]),hr(),lt(c=>[c])),s),{groupCounts:o,topItemsIndexes:s}},gr(sc,Po));function M1(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Kre(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const OC="top",MC="bottom",GV="none";function VV(e,t,n){return typeof e=="number"?n===O1&&t===OC||n===Ax&&t===MC?e:0:n===O1?t===OC?e.main:e.reverse:t===MC?e.main:e.reverse}function qV(e,t){return typeof e=="number"?e:e[t]||0}const Xj=$n(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{const o=yn(),s=et(0),l=et(0),c=et(0),d=Co(Pe(yi(Ut(e),Ut(t),Ut(r),Ut(o,M1),Ut(c),Ut(s),Ut(i),Ut(n),Ut(l)),lt(([f,h,p,[g,v],y,S,_,b,x])=>{const E=f-b,A=S+_,R=Math.max(p-E,0);let k=GV;const O=qV(x,OC),L=qV(x,MC);return g-=b,g+=p+_,v+=p+_,v-=b,g>f+A-O&&(k=O1),vf!=null),hr(M1)),[0,0]);return{listBoundary:o,overscan:c,topListHeight:s,increaseViewportBy:l,visibleRange:d}},gr(Po),{singleton:!0});function _9e(e,t,n){if(oA(t)){const r=qre(e,t);return[{index:ml(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const JB={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function XV(e,t,n){if(e.length===0)return[];if(!oA(t))return e.map(d=>({...d,index:d.index+n,originalIndex:d.index}));const r=e[0].index,i=e[e.length-1].index,o=[],s=iA(t.groupOffsetTree,r,i);let l,c=0;for(const d of e){(!l||l.end0){d=e[0].offset;const y=e[e.length-1];f=y.offset+y.size}const h=n-c,p=l+h*s+(h-1)*r,g=d,v=p-f;return{items:XV(e,i,o),topItems:XV(t,i,o),topListHeight:t.reduce((y,S)=>S.size+y,0),offsetTop:d,offsetBottom:v,top:g,bottom:f,totalCount:n,firstItemIndex:o}}function Qre(e,t,n,r,i,o){let s=0;if(n.groupIndices.length>0)for(const f of n.groupIndices){if(f-s>=e)break;s++}const l=e+s,c=qj(t,l),d=Array.from({length:l}).map((f,h)=>({index:h+c,size:0,offset:0,data:o[h+c]}));return QS(d,[],l,i,n,r)}const Wp=$n(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:i},o,{visibleRange:s,listBoundary:l,topListHeight:c},{scrolledToInitialItem:d,initialTopMostItemIndex:f},{topListHeight:h},p,{didMount:g},{recalcInProgress:v}])=>{const y=et([]),S=et(0),_=yn();St(o.topItemsIndexes,y);const b=Co(Pe(yi(g,v,Ut(s,M1),Ut(t),Ut(e),Ut(f),d,Ut(y),Ut(r),Ut(i),n),Ht(([R,k,,O,,,,,,,L])=>{const N=L&&L.length!==O;return R&&!k&&!N}),lt(([,,[R,k],O,L,N,H,W,z,D,F])=>{const j=L,{sizeTree:V,offsetTree:G}=j,K=As(S);if(O===0)return{...JB,totalCount:O};if(R===0&&k===0)return K===0?{...JB,totalCount:O}:Qre(K,N,L,z,D,F||[]);if(Kn(V))return K>0?null:QS(_9e(qj(N,O),j,F),[],O,D,j,z);const Y=[];if(W.length>0){const se=W[0],Q=W[W.length-1];let ae=0;for(const le of iA(V,se,Q)){const he=le.value,pe=Math.max(le.start,se),ve=Math.min(le.end,Q);for(let ye=pe;ye<=ve;ye++)Y.push({index:ye,size:he,offset:ae,data:F&&F[ye]}),ae+=he}}if(!H)return QS([],Y,O,D,j,z);const J=W.length>0?W[W.length-1]+1:0,ie=c9e(G,R,k,J);if(ie.length===0)return null;const ce=O-1,ue=rA([],se=>{for(const Q of ie){const ae=Q.value;let le=ae.offset,he=Q.start;const pe=ae.size;if(ae.offset=k);ye++)se.push({index:ye,size:pe,offset:le,data:F&&F[ye]}),le+=pe+D}});return QS(ue,Y,O,D,j,z)}),Ht(R=>R!==null),hr()),JB);St(Pe(n,Ht(jj),lt(R=>R==null?void 0:R.length)),t),St(Pe(b,lt(R=>R.topListHeight)),h),St(h,c),St(Pe(b,lt(R=>[R.top,R.bottom])),l),St(Pe(b,lt(R=>R.items)),_);const x=Ds(Pe(b,Ht(({items:R})=>R.length>0),an(t,n),Ht(([{items:R},k])=>R[R.length-1].originalIndex===k-1),lt(([,R,k])=>[R-1,k]),hr(M1),lt(([R])=>R))),E=Ds(Pe(b,vd(200),Ht(({items:R,topItems:k})=>R.length>0&&R[0].originalIndex===k.length),lt(({items:R})=>R[0].index),hr())),A=Ds(Pe(b,Ht(({items:R})=>R.length>0),lt(({items:R})=>{let k=0,O=R.length-1;for(;R[k].type==="group"&&kk;)O--;return{startIndex:R[k].index,endIndex:R[O].index}}),hr(Kre)));return{listState:b,topItemsIndexes:y,endReached:x,startReached:E,rangeChanged:A,itemsRendered:_,initialItemCount:S,...p}},gr(sc,Yre,Xj,Ew,_w,Sw,of,Wj),{singleton:!0}),S9e=$n(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:l}])=>(St(Pe(l,an(o),Ht(([,c])=>c!==0),an(i,e,t,r,n),lt(([[,c],d,f,h,p,g=[]])=>Qre(c,d,f,h,p,g))),s),{}),gr(sc,Ew,Wp,of),{singleton:!0}),Jre=$n(([{scrollVelocity:e}])=>{const t=et(!1),n=yn(),r=et(!1);return St(Pe(e,an(r,t,n),Ht(([i,o])=>!!o),lt(([i,o,s,l])=>{const{exit:c,enter:d}=o;if(s){if(c(i,l))return!1}else if(d(i,l))return!0;return s}),hr()),t),jn(Pe(yi(t,e,n),an(r)),([[i,o,s],l])=>i&&l&&l.change&&l.change(o,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},gr(Sw),{singleton:!0}),E9e=$n(([{topItemsIndexes:e}])=>{const t=et(0);return St(Pe(t,Ht(n=>n>0),lt(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},gr(Wp)),Zre=$n(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{const o=yn(),s=Co(Pe(yi(e,r,t,n,i),lt(([l,c,d,f,h])=>l+c+d+f+h.offsetBottom+h.bottom)),0);return St(Ut(s),o),{totalListHeight:s,totalListHeightChanged:o}},gr(Po,Wp),{singleton:!0});function eie(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const C9e=eie(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),T9e=$n(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:i,isAtBottom:o,scrollDirection:s,lastJumpDueToItemResize:l},{listState:c},{beforeUnshiftWith:d,shiftWithOffset:f,sizes:h,gap:p},{log:g},{recalcInProgress:v}])=>{const y=Ds(Pe(c,an(l),Nl(([,_,b,x],[{items:E,totalCount:A,bottom:R,offsetBottom:k},O])=>{const L=R+k;let N=0;return b===A&&_.length>0&&E.length>0&&(E[0].originalIndex===0&&_[0].originalIndex===0||(N=L-x,N!==0&&(N+=O))),[N,E,A,L]},[0,[],0,0]),Ht(([_])=>_!==0),an(t,s,r,o,g,v),Ht(([,_,b,x,,,E])=>!E&&!x&&_!==0&&b===O1),lt(([[_],,,,,b])=>(b("Upward scrolling compensation",{amount:_},Ls.DEBUG),_))));function S(_){_>0?(en(e,{top:-_,behavior:"auto"}),en(n,0)):(en(n,0),en(e,{top:-_,behavior:"auto"}))}return jn(Pe(y,an(n,i)),([_,b,x])=>{x&&C9e()?en(n,b-_):S(-_)}),jn(Pe(yi(Co(i,!1),n,v),Ht(([_,b,x])=>!_&&!x&&b!==0),lt(([_,b])=>b),vd(1)),S),St(Pe(f,lt(_=>({top:-_}))),e),jn(Pe(d,an(h,p),lt(([_,{lastSize:b,groupIndices:x,sizeTree:E},A])=>{function R(k){return k*(b+A)}if(x.length===0)return R(_);{let k=0;const O=I1(E,0);let L=0,N=0;for(;L<_;){L++,k+=O;let H=x.length===N+1?1/0:x[N+1]-x[N]-1;L+H>_&&(k-=O,H=_-L+1),L+=H,k+=R(H),N++}return k}})),_=>{en(n,_),requestAnimationFrame(()=>{en(e,{top:_}),requestAnimationFrame(()=>{en(n,0),en(v,!1)})})}),{deviation:n}},gr(Po,Sw,Wp,sc,rf,Wj)),k9e=$n(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=et(0);return jn(Pe(e,an(r),Ht(([,i])=>i!==0),lt(([,i])=>({top:i}))),i=>{Ru(Pe(n,Wg(1),Ht(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{en(t,i)})})}),{initialScrollTop:r}},gr(of,Po,Wp),{singleton:!0}),A9e=$n(([{viewportHeight:e},{totalListHeight:t}])=>{const n=et(!1),r=Co(Pe(yi(n,e,t),Ht(([i])=>i),lt(([,i,o])=>Math.max(0,i-o)),vd(0),hr()),0);return{alignToBottom:n,paddingTopAddition:r}},gr(Po,Zre),{singleton:!0}),Yj=$n(([{scrollTo:e,scrollContainerState:t}])=>{const n=yn(),r=yn(),i=yn(),o=et(!1),s=et(void 0);return St(Pe(yi(n,r),lt(([{viewportHeight:l,scrollTop:c,scrollHeight:d},{offsetTop:f}])=>({scrollTop:Math.max(0,c-f),scrollHeight:d,viewportHeight:l}))),t),St(Pe(e,an(r),lt(([l,{offsetTop:c}])=>({...l,top:l.top+c}))),i),{useWindowScroll:o,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},gr(Po)),R9e=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:o,...s}})=>er?{...s,behavior:i,align:o??"end"}:null,I9e=$n(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:o,fixedHeaderHeight:s,fixedFooterHeight:l,scrollingInProgress:c},{scrollToIndex:d}])=>{const f=yn();return St(Pe(f,an(e,i,t,o,s,l,r),an(n),lt(([[h,p,g,v,y,S,_,b],x])=>{const{done:E,behavior:A,align:R,calculateViewLocation:k=R9e,...O}=h,L=Vre(h,p,v-1),N=P1(L,p.offsetTree,x)+y+S,H=N+ml(p.sizeTree,L)[1],W=b+S,z=b+g-_,D=k({itemTop:N,itemBottom:H,viewportTop:W,viewportBottom:z,locationParams:{behavior:A,align:R,...O}});return D?E&&Ru(Pe(c,Ht(F=>F===!1),Wg(As(c)?1:2)),E):E&&E(),D}),Ht(h=>h!==null)),d),{scrollIntoView:f}},gr(sc,Po,_w,Wp,rf),{singleton:!0}),P9e=$n(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=yn(),d=et(void 0),f=et(null),h=et(null);return St(s,f),St(l,h),jn(Pe(c,an(e,n,o,f,h)),([p,g,v,y,S,_])=>{const b=f9e(g.sizeTree);y&&S!==null&&_!==null&&(v=S.scrollTop-_.offsetTop),p({ranges:b,scrollTop:v})}),St(Pe(d,Ht(jj),lt(O9e)),r),St(Pe(i,an(d),Ht(([,p])=>p!==void 0),hr(),lt(([,p])=>p.ranges)),t),{getState:c,restoreStateFrom:d}},gr(sc,Po,Ew,of,Yj));function O9e(e){return{offset:e.scrollTop,index:0,align:"start"}}const M9e=$n(([e,t,n,r,i,o,s,l,c,d])=>({...e,...t,...n,...r,...i,...o,...s,...l,...c,...d}),gr(Xj,S9e,of,Jre,Zre,k9e,A9e,Yj,I9e,rf)),D9e=$n(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:i,itemSize:o,data:s,firstItemIndex:l,groupIndices:c,statefulTotalCount:d,gap:f,sizes:h},{initialTopMostItemIndex:p,scrolledToInitialItem:g},v,y,S,{listState:_,topItemsIndexes:b,...x},{scrollToIndex:E},A,{topItemCount:R},{groupCounts:k},O])=>(St(x.rangeChanged,O.scrollSeekRangeChanged),St(Pe(O.windowViewportRect,lt(L=>L.visibleHeight)),v.viewportHeight),{totalCount:e,data:s,firstItemIndex:l,sizeRanges:t,initialTopMostItemIndex:p,scrolledToInitialItem:g,topItemsIndexes:b,topItemCount:R,groupCounts:k,fixedItemHeight:n,defaultItemHeight:r,gap:f,...S,statefulTotalCount:d,listState:_,scrollToIndex:E,trackItemSizes:i,itemSize:o,groupIndices:c,...x,...O,...v,sizes:h,...y}),gr(sc,Ew,Po,P9e,x9e,Wp,_w,T9e,E9e,Yre,M9e)),ZB="-webkit-sticky",YV="sticky",tie=eie(()=>{if(typeof document>"u")return YV;const e=document.createElement("div");return e.style.position=ZB,e.style.position===ZB?ZB:YV});function nie(e,t){const n=de.useRef(null),r=de.useCallback(l=>{if(l===null||!l.offsetParent)return;const c=l.getBoundingClientRect(),d=c.width;let f,h;if(t){const p=t.getBoundingClientRect(),g=c.top-p.top;f=p.height-Math.max(0,g),h=g+t.scrollTop}else f=window.innerHeight-Math.max(0,c.top),h=c.top+window.pageYOffset;n.current={offsetTop:h,visibleHeight:f,visibleWidth:d},e(n.current)},[e,t]),{callbackRef:i,ref:o}=Hj(r),s=de.useCallback(()=>{r(o.current)},[r,o]);return de.useEffect(()=>{if(t){t.addEventListener("scroll",s);const l=new ResizeObserver(s);return l.observe(t),()=>{t.removeEventListener("scroll",s),l.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),i}const rie=de.createContext(void 0),iie=de.createContext(void 0);function oie(e){return e}const L9e=$n(()=>{const e=et(c=>`Item ${c}`),t=et(null),n=et(c=>`Group ${c}`),r=et({}),i=et(oie),o=et("div"),s=et(bv),l=(c,d=null)=>Co(Pe(r,lt(f=>f[c]),hr()),d);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:i,headerFooterTag:o,scrollerRef:s,FooterComponent:l("Footer"),HeaderComponent:l("Header"),TopItemListComponent:l("TopItemList"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),GroupComponent:l("Group","div"),ScrollerComponent:l("Scroller","div"),EmptyPlaceholder:l("EmptyPlaceholder"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder")}}),N9e=$n(([e,t])=>({...e,...t}),gr(D9e,L9e)),B9e=({height:e})=>de.createElement("div",{style:{height:e}}),$9e={position:tie(),zIndex:1,overflowAnchor:"none"},F9e={overflowAnchor:"none"},KV=de.memo(function({showTopList:t=!1}){const n=mn("listState"),r=aa("sizeRanges"),i=mn("useWindowScroll"),o=mn("customScrollParent"),s=aa("windowScrollContainerState"),l=aa("scrollContainerState"),c=o||i?s:l,d=mn("itemContent"),f=mn("context"),h=mn("groupContent"),p=mn("trackItemSizes"),g=mn("itemSize"),v=mn("log"),y=aa("gap"),{callbackRef:S}=ZGe(r,g,p,t?bv:c,v,y,o),[_,b]=de.useState(0);Kj("deviation",D=>{_!==D&&b(D)});const x=mn("EmptyPlaceholder"),E=mn("ScrollSeekPlaceholder")||B9e,A=mn("ListComponent"),R=mn("ItemComponent"),k=mn("GroupComponent"),O=mn("computeItemKey"),L=mn("isSeeking"),N=mn("groupIndices").length>0,H=mn("paddingTopAddition"),W=mn("scrolledToInitialItem"),z=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+H,paddingBottom:n.offsetBottom,marginTop:_,...W?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&x?de.createElement(x,Fo(x,f)):de.createElement(A,{...Fo(A,f),ref:S,style:z,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(D=>{const F=D.originalIndex,j=O(F+n.firstItemIndex,D.data,f);return L?de.createElement(E,{...Fo(E,f),key:j,index:D.index,height:D.size,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?de.createElement(k,{...Fo(k,f),key:j,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,style:$9e},h(D.index,f)):de.createElement(R,{...Fo(R,f),key:j,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,"data-item-group-index":D.groupIndex,item:D.data,style:F9e},N?d(D.index,D.groupIndex,D.data,f):d(D.index,D.data,f))}))}),z9e={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},sA={width:"100%",height:"100%",position:"absolute",top:0},j9e={width:"100%",position:tie(),top:0,zIndex:1};function Fo(e,t){if(typeof e!="string")return{context:t}}const U9e=de.memo(function(){const t=mn("HeaderComponent"),n=aa("headerHeight"),r=mn("headerFooterTag"),i=Hp(s=>n(Wd(s,"height"))),o=mn("context");return t?de.createElement(r,{ref:i},de.createElement(t,Fo(t,o))):null}),H9e=de.memo(function(){const t=mn("FooterComponent"),n=aa("footerHeight"),r=mn("headerFooterTag"),i=Hp(s=>n(Wd(s,"height"))),o=mn("context");return t?de.createElement(r,{ref:i},de.createElement(t,Fo(t,o))):null});function sie({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...l}){const c=e("scrollContainerState"),d=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("scrollerRef"),p=n("context"),{scrollerRef:g,scrollByCallback:v,scrollToCallback:y}=Fre(c,f,d,h);return t("scrollTo",y),t("scrollBy",v),de.createElement(d,{ref:g,style:{...z9e,...o},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...l,...Fo(d,p)},s)})}function aie({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...l}){const c=e("windowScrollContainerState"),d=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("totalListHeight"),p=n("deviation"),g=n("customScrollParent"),v=n("context"),{scrollerRef:y,scrollByCallback:S,scrollToCallback:_}=Fre(c,f,d,bv,g);return KGe(()=>(y.current=g||window,()=>{y.current=null}),[y,g]),t("windowScrollTo",_),t("scrollBy",S),de.createElement(d,{style:{position:"relative",...o,...h!==0?{height:h+p}:{}},"data-virtuoso-scroller":!0,...l,...Fo(d,v)},s)})}const W9e=({children:e})=>{const t=de.useContext(rie),n=aa("viewportHeight"),r=aa("fixedItemHeight"),i=Hp(Dre(n,o=>Wd(o,"height")));return de.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),de.createElement("div",{style:sA,ref:i,"data-viewport-type":"element"},e)},G9e=({children:e})=>{const t=de.useContext(rie),n=aa("windowViewportRect"),r=aa("fixedItemHeight"),i=mn("customScrollParent"),o=nie(n,i);return de.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),de.createElement("div",{ref:o,style:sA,"data-viewport-type":"window"},e)},V9e=({children:e})=>{const t=mn("TopItemListComponent"),n=mn("headerHeight"),r={...j9e,marginTop:`${n}px`},i=mn("context");return de.createElement(t||"div",{style:r,context:i},e)},q9e=de.memo(function(t){const n=mn("useWindowScroll"),r=mn("topItemsIndexes").length>0,i=mn("customScrollParent"),o=i||n?K9e:Y9e,s=i||n?G9e:W9e;return de.createElement(o,{...t},r&&de.createElement(V9e,null,de.createElement(KV,{showTopList:!0})),de.createElement(s,null,de.createElement(U9e,null),de.createElement(KV,null),de.createElement(H9e,null)))}),{Component:X9e,usePublisher:aa,useEmitterValue:mn,useEmitter:Kj}=Bre(N9e,{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"},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"}},q9e),Y9e=sie({usePublisher:aa,useEmitterValue:mn,useEmitter:Kj}),K9e=aie({usePublisher:aa,useEmitterValue:mn,useEmitter:Kj}),Q9e=X9e,QV={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},J9e={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:JV,ceil:ZV,floor:DC,min:e$,max:Rx}=Math;function Z9e(e){return{...J9e,items:e}}function eq(e,t,n){return Array.from({length:t-e+1}).map((r,i)=>{const o=n===null?null:n[i+e];return{index:i+e,data:o}})}function e7e(e,t){return e&&e.column===t.column&&e.row===t.row}function lS(e,t){return e&&e.width===t.width&&e.height===t.height}const t7e=$n(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:i,scrollBy:o,scrollTo:s,smoothScrollTargetReached:l,scrollContainerState:c,footerHeight:d,headerHeight:f},h,p,{propsReady:g,didMount:v},{windowViewportRect:y,useWindowScroll:S,customScrollParent:_,windowScrollContainerState:b,windowScrollTo:x},E])=>{const A=et(0),R=et(0),k=et(QV),O=et({height:0,width:0}),L=et({height:0,width:0}),N=yn(),H=yn(),W=et(0),z=et(null),D=et({row:0,column:0}),F=yn(),j=yn(),V=et(!1),G=et(0),K=et(!0),Y=et(!1);jn(Pe(v,an(G),Ht(([Q,ae])=>!!ae)),()=>{en(K,!1),en(R,0)}),jn(Pe(yi(v,K,L,O,G,Y),Ht(([Q,ae,le,he,,pe])=>Q&&!ae&&le.height!==0&&he.height!==0&&!pe)),([,,,,Q])=>{en(Y,!0),Vj(1,()=>{en(N,Q)}),Ru(Pe(r),()=>{en(n,[0,0]),en(K,!0)})}),St(Pe(j,Ht(Q=>Q!=null&&Q.scrollTop>0),lu(0)),R),jn(Pe(v,an(j),Ht(([,Q])=>Q!=null)),([,Q])=>{Q&&(en(O,Q.viewport),en(L,Q==null?void 0:Q.item),en(D,Q.gap),Q.scrollTop>0&&(en(V,!0),Ru(Pe(r,Wg(1)),ae=>{en(V,!1)}),en(s,{top:Q.scrollTop})))}),St(Pe(O,lt(({height:Q})=>Q)),i),St(Pe(yi(Ut(O,lS),Ut(L,lS),Ut(D,(Q,ae)=>Q&&Q.column===ae.column&&Q.row===ae.row),Ut(r)),lt(([Q,ae,le,he])=>({viewport:Q,item:ae,gap:le,scrollTop:he}))),F),St(Pe(yi(Ut(A),t,Ut(D,e7e),Ut(L,lS),Ut(O,lS),Ut(z),Ut(R),Ut(V),Ut(K),Ut(G)),Ht(([,,,,,,,Q])=>!Q),lt(([Q,[ae,le],he,pe,ve,ye,xe,,me,be])=>{const{row:Qe,column:qe}=he,{height:at,width:Lt}=pe,{width:Ie}=ve;if(xe===0&&(Q===0||Ie===0))return QV;if(Lt===0){const Rt=qj(be,Q),ct=Rt===0?Math.max(xe-1,0):Rt;return Z9e(eq(Rt,ct,ye))}const ze=lie(Ie,Lt,qe);let it,pt;me?ae===0&&le===0&&xe>0?(it=0,pt=xe-1):(it=ze*DC((ae+Qe)/(at+Qe)),pt=ze*ZV((le+Qe)/(at+Qe))-1,pt=e$(Q-1,Rx(pt,ze-1)),it=e$(pt,Rx(0,it))):(it=0,pt=-1);const mt=eq(it,pt,ye),{top:_e,bottom:je}=tq(ve,he,pe,mt),Ye=ZV(Q/ze),Ne=Ye*at+(Ye-1)*Qe-je;return{items:mt,offsetTop:_e,offsetBottom:Ne,top:_e,bottom:je,itemHeight:at,itemWidth:Lt}})),k),St(Pe(z,Ht(Q=>Q!==null),lt(Q=>Q.length)),A),St(Pe(yi(O,L,k,D),Ht(([Q,ae,{items:le}])=>le.length>0&&ae.height!==0&&Q.height!==0),lt(([Q,ae,{items:le},he])=>{const{top:pe,bottom:ve}=tq(Q,he,ae,le);return[pe,ve]}),hr(M1)),n);const J=et(!1);St(Pe(r,an(J),lt(([Q,ae])=>ae||Q!==0)),J);const ie=Ds(Pe(Ut(k),Ht(({items:Q})=>Q.length>0),an(A,J),Ht(([{items:Q},ae,le])=>le&&Q[Q.length-1].index===ae-1),lt(([,Q])=>Q-1),hr())),ce=Ds(Pe(Ut(k),Ht(({items:Q})=>Q.length>0&&Q[0].index===0),lu(0),hr())),ue=Ds(Pe(Ut(k),an(V),Ht(([{items:Q},ae])=>Q.length>0&&!ae),lt(([{items:Q}])=>({startIndex:Q[0].index,endIndex:Q[Q.length-1].index})),hr(Kre),vd(0)));St(ue,p.scrollSeekRangeChanged),St(Pe(N,an(O,L,A,D),lt(([Q,ae,le,he,pe])=>{const ve=Xre(Q),{align:ye,behavior:xe,offset:me}=ve;let be=ve.index;be==="LAST"&&(be=he-1),be=Rx(0,be,e$(he-1,be));let Qe=d5(ae,pe,le,be);return ye==="end"?Qe=JV(Qe-ae.height+le.height):ye==="center"&&(Qe=JV(Qe-ae.height/2+le.height/2)),me&&(Qe+=me),{top:Qe,behavior:xe}})),s);const se=Co(Pe(k,lt(Q=>Q.offsetBottom+Q.bottom)),0);return St(Pe(y,lt(Q=>({width:Q.visibleWidth,height:Q.visibleHeight}))),O),{data:z,totalCount:A,viewportDimensions:O,itemDimensions:L,scrollTop:r,scrollHeight:H,overscan:e,scrollBy:o,scrollTo:s,scrollToIndex:N,smoothScrollTargetReached:l,windowViewportRect:y,windowScrollTo:x,useWindowScroll:S,customScrollParent:_,windowScrollContainerState:b,deviation:W,scrollContainerState:c,footerHeight:d,headerHeight:f,initialItemCount:R,gap:D,restoreStateFrom:j,...p,initialTopMostItemIndex:G,gridState:k,totalListHeight:se,...h,startReached:ce,endReached:ie,rangeChanged:ue,stateChanged:F,propsReady:g,stateRestoreInProgress:V,...E}},gr(Xj,Po,Sw,Jre,of,Yj,rf));function tq(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{top:0,bottom:0};const o=d5(e,t,n,r[0].index),s=d5(e,t,n,r[r.length-1].index)+i;return{top:o,bottom:s}}function d5(e,t,n,r){const i=lie(e.width,n.width,t.column),o=DC(r/i),s=o*n.height+Rx(0,o-1)*t.row;return s>0?s+t.row:s}function lie(e,t,n){return Rx(1,DC((e+n)/(DC(t)+n)))}const n7e=$n(()=>{const e=et(d=>`Item ${d}`),t=et({}),n=et(null),r=et("virtuoso-grid-item"),i=et("virtuoso-grid-list"),o=et(oie),s=et("div"),l=et(bv),c=(d,f=null)=>Co(Pe(t,lt(h=>h[d]),hr()),f);return{context:n,itemContent:e,components:t,computeItemKey:o,itemClassName:r,listClassName:i,headerFooterTag:s,scrollerRef:l,FooterComponent:c("Footer"),HeaderComponent:c("Header"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),ScrollerComponent:c("Scroller","div"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),r7e=$n(([e,t])=>({...e,...t}),gr(t7e,n7e)),i7e=de.memo(function(){const t=Sr("gridState"),n=Sr("listClassName"),r=Sr("itemClassName"),i=Sr("itemContent"),o=Sr("computeItemKey"),s=Sr("isSeeking"),l=dl("scrollHeight"),c=Sr("ItemComponent"),d=Sr("ListComponent"),f=Sr("ScrollSeekPlaceholder"),h=Sr("context"),p=dl("itemDimensions"),g=dl("gap"),v=Sr("log"),y=Sr("stateRestoreInProgress"),S=Hp(_=>{const b=_.parentElement.parentElement.scrollHeight;l(b);const x=_.firstChild;if(x){const{width:E,height:A}=x.getBoundingClientRect();p({width:E,height:A})}g({row:nq("row-gap",getComputedStyle(_).rowGap,v),column:nq("column-gap",getComputedStyle(_).columnGap,v)})});return y?null:de.createElement(d,{ref:S,className:n,...Fo(d,h),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(_=>{const b=o(_.index,_.data,h);return s?de.createElement(f,{key:b,...Fo(f,h),index:_.index,height:t.itemHeight,width:t.itemWidth}):de.createElement(c,{...Fo(c,h),className:r,"data-index":_.index,key:b},i(_.index,_.data,h))}))}),o7e=de.memo(function(){const t=Sr("HeaderComponent"),n=dl("headerHeight"),r=Sr("headerFooterTag"),i=Hp(s=>n(Wd(s,"height"))),o=Sr("context");return t?de.createElement(r,{ref:i},de.createElement(t,Fo(t,o))):null}),s7e=de.memo(function(){const t=Sr("FooterComponent"),n=dl("footerHeight"),r=Sr("headerFooterTag"),i=Hp(s=>n(Wd(s,"height"))),o=Sr("context");return t?de.createElement(r,{ref:i},de.createElement(t,Fo(t,o))):null}),a7e=({children:e})=>{const t=de.useContext(iie),n=dl("itemDimensions"),r=dl("viewportDimensions"),i=Hp(o=>{r(o.getBoundingClientRect())});return de.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),de.createElement("div",{style:sA,ref:i},e)},l7e=({children:e})=>{const t=de.useContext(iie),n=dl("windowViewportRect"),r=dl("itemDimensions"),i=Sr("customScrollParent"),o=nie(n,i);return de.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),de.createElement("div",{ref:o,style:sA},e)},c7e=de.memo(function({...t}){const n=Sr("useWindowScroll"),r=Sr("customScrollParent"),i=r||n?d7e:u7e,o=r||n?l7e:a7e;return de.createElement(i,{...t},de.createElement(o,null,de.createElement(o7e,null),de.createElement(i7e,null),de.createElement(s7e,null)))}),{Component:TVe,usePublisher:dl,useEmitterValue:Sr,useEmitter:cie}=Bre(r7e,{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"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},c7e),u7e=sie({usePublisher:dl,useEmitterValue:Sr,useEmitter:cie}),d7e=aie({usePublisher:dl,useEmitterValue:Sr,useEmitter:cie});function nq(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Ls.WARN),t==="normal"?0:parseInt(t??"0",10)}const f7e=I.forwardRef(({style:e,children:t,...n},r)=>{const i=I.useRef(null),{palette:o,spacing:s}=In(),l=Zx({".os-scrollbar":{visibility:"visible",opacity:1},".os-scrollbar-vertical > .os-scrollbar-track > .os-scrollbar-handle":{"min-height":s(12)},"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${s(6)})`,marginTop:s(6)}}),[c]=MQ({options:{overflow:{x:"hidden",y:"scroll"},scrollbars:{autoHide:"move",theme:o.mode==="dark"?"os-theme-light":"os-theme-dark"}}});I.useEffect(()=>{typeof r!="function"&&(r!=null&&r.current)&&(i!=null&&i.current)&&c({target:i.current,elements:{viewport:r.current}})},[c]);const d=I.useCallback(f=>{f&&r&&(typeof r=="function"?r(f):r.current=f)},[r]);return C.jsx("div",{ref:i,style:e,className:l,children:C.jsx("div",{ref:d,...n,children:t})})});function h7e({items:e=[],renderItem:t,listOptions:n,placeholder:r,...i}){return C.jsx(dt,{...i,children:C.jsx(Q9e,{components:{Scroller:f7e},totalCount:e.length,itemContent:o=>t==null?void 0:t(e[o],o),...n})})}function p7e({event:e,hidden:t}){return C.jsxs(jFe,{children:[ee.startCase(`${(e==null?void 0:e.type)??"unsupported"} #${(e==null?void 0:e.id)??"-"}`)," ",t&&C.jsx(Txe,{sx:{opacity:.56,fontSize:12,ml:1,transform:"translateY(1.75px)"}})]})}function m7e({event:e,index:t,selected:n,...r}){const{spacing:i}=In();return C.jsx(Kd,{title:C.jsx(dt,{p:1,children:C.jsx(ZE,{event:e,flexDirection:"column"})}),followCursor:!0,children:C.jsxs(PE,{selected:n,...r,sx:{borderLeft:`${i(.5)} solid ${Pg(e==null?void 0:e.type)}`,...r.sx},children:[C.jsx(Ul,{children:C.jsx(zt,{variant:"body2",children:t})}),C.jsx(sl,{sx:{overflow:"hidden"},primary:C.jsx(p7e,{event:e,hidden:!1}),secondary:C.jsx(ZE,{event:ee.pick(e,"f","g","pId")})})]})})}function g7e({event:e}){const{spacing:t}=In();return C.jsxs(C.Fragment,{children:[C.jsx(Qm,{sx:{height:80,borderLeft:`${t(.5)} solid ${Pg(e==null?void 0:e.type)}`},children:C.jsx(Ul,{children:C.jsx(C0e,{animation:!1,width:t(4)})})}),C.jsx(tc,{variant:"inset"})]})}const v7e=C.jsx(tc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),y7e=e=>Number(e.replace(/px$/,""));function b7e(){const{spacing:e}=In(),{controls:t,onChange:n,state:r}=Du(),i=I.useRef(null),{key:o,setKey:s,layers:l,layer:c}=Kl(),{step:d,playing:f,stepTo:h}=Nz(o),p=I.useMemo(()=>{var g;if(c)return I.createElement(uw[((g=c==null?void 0:c.source)==null?void 0:g.type)??""].steps,{layer:c})},[c]);return I.useEffect(()=>{ee.defer(()=>{var g,v;return(v=(g=i==null?void 0:i.current)==null?void 0:g.scrollToIndex)==null?void 0:v.call(g,{index:d,align:"start",behavior:"smooth",offset:-y7e(e(6+2))})},0)},[d,f,e]),C.jsxs(Sn,{onChange:n,stack:r,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{vertical:!0,alignItems:"center",children:p?I.cloneElement(p,{children:g=>c?g.length?C.jsx(h7e,{sx:{width:"100%",height:"100%"},items:g,listOptions:{ref:i,defaultItemHeight:80,overscan:0},renderItem:(v,y)=>f?C.jsx(g7e,{event:v}):C.jsxs(dt,{sx:{height:e(y?10:16),pt:y?0:e(6)},children:[C.jsx(m7e,{event:v,index:y,selected:y===d,sx:{height:"100%"},onClick:()=>h(y)}),C.jsx(tc,{variant:"inset"})]})}):C.jsx(eg,{icon:C.jsx(TS,{}),label:`${$o(c)} has no steps to display`}):C.jsx(eg,{icon:C.jsx(TS,{}),label:"Steps"})}):C.jsx(eg,{icon:C.jsx(TS,{}),label:"Steps"})})}),C.jsxs(Sn.Options,{children:[C.jsx(Xo,{icon:C.jsx(tv,{}),label:"Layer",value:o,items:ee.map(l,g=>({id:g.key,name:$o(g)})),onChange:s,showArrow:!0}),v7e,C.jsx(U2e,{layer:c})]}),C.jsx(Sn.Extras,{children:t})]})}const x7e=e=>e?48:36,w7e=8;function _7e({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Options",defaultChecked:o}){const s=uz(),l=ee.max([ee.findIndex(t,({value:c})=>!!(n!=null&&n[c])),0])??0;return C.jsx(Op,{variant:"popover",children:c=>C.jsxs(C.Fragment,{children:[C.jsx(Kd,{title:i,children:C.jsx("span",{children:e==null?void 0:e(mk(c))})}),C.jsx(Pp,{...sw(c),anchorOrigin:{horizontal:"center",vertical:-x7e(s)*l-w7e},transformOrigin:{vertical:"top",horizontal:"center"},children:ee.map(t,({value:d,label:f,disabled:h})=>C.jsxs(gu,{disabled:h,onClick:()=>{r==null||r({...n,[d]:!((n==null?void 0:n[d])??o)})},children:[C.jsx(Ul,{children:C.jsx(Rme,{sx:{p:0},checked:!!((n==null?void 0:n[d])??o)})}),f]},d))})]})})}function S7e({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,defaultChecked:s}){var d;const l=ee.filter(r,({id:f})=>!!((t==null?void 0:t[f])??s)),c=l.length?l.length===1?(d=ee.head(l))==null?void 0:d.name:`${l.length} Selected`:e;return C.jsx(_7e,{defaultChecked:!0,placeholder:ee.startCase(e),trigger:f=>C.jsx($d,{...f,disabled:!(r!=null&&r.length),icon:i,showArrow:o,children:c}),items:ee.map(r,({id:f,name:h,description:p,hidden:g})=>({value:f,label:C.jsxs(C.Fragment,{children:[C.jsx(zt,{children:h}),C.jsx(Kr,{}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:p})]}),disabled:g})),value:t,onChange:n})}const rq=C.jsx(tc,{orientation:"vertical",flexItem:!0,sx:{m:1}});function E7e(){var p,g,v,y;const{controls:e,onChange:t,state:n}=Du(),[r]=Tk(),[{layers:i}]=Bp(),[o,s]=I.useState({}),l=I.useMemo(()=>ee.filter(i,S=>(o==null?void 0:o[S.key])??!0),[o,i]),[c,d]=I.useState(),f=I.useMemo(()=>ee.head(r),[r]),h=n!=null&&n.renderer&&n.renderer!=="internal:auto"?n.renderer:(g=(p=f==null?void 0:f.renderer)==null?void 0:p.meta)==null?void 0:g.id;return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{children:C.jsx(vk,{children:S=>C.jsx(dt,{children:C.jsx(C2e,{...S,layers:l,renderer:h,rendererRef:d})})})})}),C.jsx(Sn.Options,{children:C.jsxs(Nd,{direction:"row",children:[C.jsx(Xo,{label:"Renderer",icon:C.jsx(mxe,{}),value:(n==null?void 0:n.renderer)??"internal:auto",onChange:S=>t==null?void 0:t({renderer:S}),items:[{id:"internal:auto",name:`Auto (${((y=(v=f==null?void 0:f.renderer)==null?void 0:v.meta)==null?void 0:y.name)??"None"})`},...ee.map(r,({renderer:S})=>({id:S.meta.id,name:S.meta.name,description:S.meta.id}))],showArrow:!0}),rq,C.jsx(S7e,{defaultChecked:!0,label:"Layers",icon:C.jsx(tv,{}),value:o,onChange:s,items:ee.map(i,S=>({id:S.key,name:$o(S)})),showArrow:!0}),rq,C.jsx($d,{disabled:!c,onClick:()=>{c==null||c.fitCamera()},icon:C.jsx(yxe,{}),children:"Fit"}),C.jsx($d,{disabled:!c,onClick:()=>{c==null||c.initialCamera()},icon:C.jsx(_xe,{}),children:"1:1"})]})}),C.jsx(Sn.Extras,{children:e})]})}const C7e="modulepreload",T7e=function(e,t){return new URL(e,t).href},iq={},qs=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=T7e(o,r),o in iq)return;iq[o]=!0;const s=o.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!r)for(let f=i.length-1;f>=0;f--){const h=i[f];if(h.href===o&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":C7e,s||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),s)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};var uie={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Nt,function(){return function n(r,i,o){var s=window,l="application/octet-stream",c=o||l,d=r,f=!i&&!o&&d,h=document.createElement("a"),p=function(k){return String(k)},g=s.Blob||s.MozBlob||s.WebKitBlob||p,v=i||"download",y,S;if(g=g.call?g.bind(s):Blob,String(this)==="true"&&(d=[d,c],c=d[0],d=d[1]),f&&f.length<2048&&(v=f.split("/").pop().split("?")[0],h.href=f,h.href.indexOf(f)!==-1)){var _=new XMLHttpRequest;return _.open("GET",f,!0),_.responseType="blob",_.onload=function(k){n(k.target.response,v,l)},setTimeout(function(){_.send()},0),_}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(d))if(d.length>1024*1024*1.999&&g!==p)d=A(d),c=d.type||l;else return navigator.msSaveBlob?navigator.msSaveBlob(A(d),v):R(d);else if(/([\x80-\xff])/.test(d)){var b=0,x=new Uint8Array(d.length),E=x.length;for(b;b0?`text-shadow: ${i} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${i} ${e}`}reset(){Object.assign(this,mm.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=tt.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};let Tx=mm;Tx.availableFonts={};Tx.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};const gm=class extends jp{constructor(e="",t={}){super(ht.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this._loading=!1,this.localStyleID=-1,this.dirty=!1,this.ownsStyle=!1;const n=new Image,r=ht.from(n,{scaleMode:tt.SCALE_MODE,resourceOptions:{autoLoad:!1}});r.orig=new Kt,r.trim=new Kt,this.texture=r;const i="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",s=document.createElementNS(i,"svg"),l=document.createElementNS(i,"foreignObject"),c=document.createElementNS(o,"div"),d=document.createElementNS(o,"style");l.setAttribute("width","10000"),l.setAttribute("height","10000"),l.style.overflow="hidden",s.appendChild(l),this.maxWidth=gm.defaultMaxWidth,this.maxHeight=gm.defaultMaxHeight,this._domElement=c,this._styleElement=d,this._svgRoot=s,this._foreignObject=l,this._foreignObject.appendChild(d),this._foreignObject.appendChild(c),this._image=n,this._loadImage=new Image,this._autoResolution=gm.defaultAutoResolution,this._resolution=gm.defaultResolution??tt.RESOLUTION,this.text=e,this.style=t}measureText(e){var l,c;const{text:t,style:n,resolution:r}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:n.toCSS(r)}),this._styleElement.textContent=n.toGlobalCSS(),document.body.appendChild(this._svgRoot);const i=this._domElement.getBoundingClientRect();this._svgRoot.remove();const o=Math.min(this.maxWidth,Math.ceil(i.width)),s=Math.min(this.maxHeight,Math.ceil(i.height));return this._svgRoot.setAttribute("width",o.toString()),this._svgRoot.setAttribute("height",s.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),n!==this._style&&(Object.assign(this._domElement,{style:(l=this._style)==null?void 0:l.toCSS(r)}),this._styleElement.textContent=(c=this._style)==null?void 0:c.toGlobalCSS()),{width:o+n.padding*2,height:s+n.padding*2}}async updateText(e=!0){const{style:t,_image:n,_loadImage:r}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:i,height:o}=this.measureText();n.width=r.width=Math.ceil(Math.max(1,i)),n.height=r.height=Math.ceil(Math.max(1,o)),this._loading||(this._loading=!0,await new Promise(s=>{r.onload=async()=>{await t.onBeforeDraw(),this._loading=!1,n.src=r.src,r.onload=null,r.src="",this.updateTexture(),s()};const l=new XMLSerializer().serializeToString(this._svgRoot);r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`}))}get source(){return this._image}updateTexture(){const{style:e,texture:t,_image:n,resolution:r}=this,{padding:i}=e,{baseTexture:o}=t;t.trim.width=t._frame.width=n.width/r,t.trim.height=t._frame.height=n.height/r,t.trim.x=-i,t.trim.y=-i,t.orig.width=t._frame.width-i*2,t.orig.height=t._frame.height-i*2,this._onTextureUpdate(),o.setRealSize(n.width,n.height,r),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}_renderCanvas(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(e)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds(e)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(e){var n,r,i,o,s;typeof e=="boolean"&&(e={children:e}),e=Object.assign({},gm.defaultDestroyOptions,e),super.destroy(e);const t=null;this.ownsStyle&&((n=this._style)==null||n.cleanFonts()),this._style=t,(r=this._svgRoot)==null||r.remove(),this._svgRoot=t,(i=this._domElement)==null||i.remove(),this._domElement=t,(o=this._foreignObject)==null||o.remove(),this._foreignObject=t,(s=this._styleElement)==null||s.remove(),this._styleElement=t,this._loadImage.src="",this._loadImage.onload=null,this._loadImage=t,this._image.src="",this._image=t}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._image.width/this.resolution}set width(e){this.updateText(!0);const t=pd(this.scale.x)||1;this.scale.x=t*e/this._image.width/this.resolution,this._width=e}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._image.height/this.resolution}set height(e){this.updateText(!0);const t=pd(this.scale.y)||1;this.scale.y=t*e/this._image.height/this.resolution,this._height=e}get style(){return this._style}set style(e){this._style!==e&&(e=e||{},e instanceof Tx?(this.ownsStyle=!1,this._style=e):e instanceof Au?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=Tx.from(e)):(this.ownsStyle=!0,this._style=new Tx(e)),this.localStyleID=-1,this.dirty=!0)}get text(){return this._text}set text(e){e=String(e===""||e===null||e===void 0?" ":e),e=this.sanitiseText(e),this._text!==e&&(this._text=e,this.dirty=!0)}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}sanitiseText(e){return e.replace(/
/gi,"
").replace(/
/gi,"
").replace(/ /gi," ")}};let Xk=gm;Xk.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};Xk.defaultMaxWidth=2024;Xk.defaultMaxHeight=2024;Xk.defaultAutoResolution=!0;function u8e(e,t){return{constructor:e,meta:t}}function d8e(e,t,n,r,i){Nne(e,t,n||0,r||e.length-1,i||f8e)}function Nne(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,s=t-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1),f=Math.max(n,Math.floor(t-s*c/o+d)),h=Math.min(r,Math.floor(t+(o-s)*c/o+d));Nne(e,t,f,h,i)}var p=e[t],g=n,v=r;for(Tb(e,n,t),i(e[r],p)>0&&Tb(e,n,r);g0;)v--}i(e[n],p)===0?Tb(e,n,v):(v++,Tb(e,v,r)),v<=t&&(n=v+1),t<=v&&(r=v-1)}}function Tb(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function f8e(e,t){return et?1:0}class h8e{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let n=this.data;const r=[];if(!K_(t,n))return r;const i=this.toBBox,o=[];for(;n;){for(let s=0;s=0&&o[n].children.length>this._maxEntries;)this._split(o,n),n--;this._adjustParentBBoxes(i,o,n)}_split(t,n){const r=t[n],i=r.children.length,o=this._minEntries;this._chooseSplitAxis(r,o,i);const s=this._chooseSplitIndex(r,o,i),l=vm(r.children.splice(s,r.children.length-s));l.height=r.height,l.leaf=r.leaf,tm(r,this.toBBox),tm(l,this.toBBox),n?t[n-1].children.push(l):this._splitRoot(r,l)}_splitRoot(t,n){this.data=vm([t,n]),this.data.height=t.height+1,this.data.leaf=!1,tm(this.data,this.toBBox)}_chooseSplitIndex(t,n,r){let i,o=1/0,s=1/0;for(let l=n;l<=r-n;l++){const c=Yb(t,0,l,this.toBBox),d=Yb(t,l,r,this.toBBox),f=y8e(c,d),h=wB(c)+wB(d);f=n;d--){const f=t.children[d];Kb(l,t.leaf?o(f):f),c+=Y_(l)}return c}_adjustParentBBoxes(t,n,r){for(let i=r;i>=0;i--)Kb(n[i],t)}_condense(t){for(let n=t.length-1,r;n>=0;n--)t[n].children.length===0?n>0?(r=t[n-1].children,r.splice(r.indexOf(t[n]),1)):this.clear():tm(t[n],this.toBBox)}}function p8e(e,t,n){if(!n)return t.indexOf(e);for(let r=0;r=e.minX&&t.maxY>=e.minY}function vm(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function j7(e,t,n,r,i){const o=[t,n];for(;o.length;){if(n=o.pop(),t=o.pop(),n-t<=r)continue;const s=t+Math.ceil((n-t)/r/2)*r;d8e(e,s,t,n,i),o.push(t,s,s,n)}}class b8e extends h8e{toBBox(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}compareMinX(t,n){return t.left-n.left}compareMinY(t,n){return t.top-n.top}}const U7={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:1e3/60,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:2,minScale:1,dtMax:1.5,dtMin:1.1}};var Bne={},kC=Nt&&Nt.__assign||function(){return kC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?1:-1}),SB}var P8e=R8e()?Math.sign:I8e(),O8e=P8e,M8e=Math.abs,D8e=Math.floor,L8e=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:O8e(e)*D8e(M8e(e)))},N8e=L8e,B8e=Math.max,$8e=function(e){return B8e(0,N8e(e))},$ne=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},F8e=pv,Fne=function(e){if(!F8e(e))throw new TypeError("Cannot use null or undefined");return e},z8e={exports:{}},j8e=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")},EB,W7;function U8e(){return W7||(W7=1,EB=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),EB}var CB,G7;function H8e(){if(G7)return CB;G7=1;var e=pv,t=Object.keys;return CB=function(n){return t(e(n)?Object(n):n)},CB}var TB,V7;function W8e(){return V7||(V7=1,TB=U8e()()?Object.keys:H8e()),TB}var kB,q7;function G8e(){if(q7)return kB;q7=1;var e=W8e(),t=Fne,n=Math.max;return kB=function(r,i){var o,s,l=n(arguments.length,2),c;for(r=Object(t(r)),c=function(d){try{r[d]=i[d]}catch(f){o||(o=f)}},s=1;s-1},RB}var cHe=aHe()?String.prototype.contains:lHe(),VS=Hne,Y7=sHe,Wne=zne,Gne=A8e,kx=cHe,uHe=Une.exports=function(e,t){var n,r,i,o,s;return arguments.length<2||typeof e!="string"?(o=t,t=e,e=null):o=arguments[2],VS(e)?(n=kx.call(e,"c"),r=kx.call(e,"e"),i=kx.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?Wne(Gne(o),s):s};uHe.gs=function(e,t,n){var r,i,o,s;return typeof e!="string"?(o=n,n=t,t=e,e=null):o=arguments[3],VS(t)?Y7(t)?VS(n)?Y7(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,VS(e)?(r=kx.call(e,"c"),i=kx.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?Wne(Gne(o),s):s};var yw=Une.exports,q3={exports:{}};(function(e,t){var n=yw,r=$ne,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,l=Object.defineProperty,c=Object.defineProperties,d=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,_;h=function(b,x){var E;return r(x),d.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),l(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,A;return r(x),A=this,h.call(this,b,E=function(){g.call(A,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,A,R,k;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(A=E[b],typeof A=="object")for(k=0;R=A[k];++k)(R===x||R.__eeOnceListener__===x)&&(A.length===2?E[b]=A[k?0:1]:A.splice(k,1));else(A===x||A.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,A,R,k;if(d.call(this,"__ee__")&&(R=this.__ee__[b],!!R))if(typeof R=="object"){for(E=arguments.length,k=new Array(E-1),x=1;x=55296&&E<=56319&&(O+=p[++S])),O=g?d.call(g,v,O,_):O,y?(f.value=O,h(b,_,f)):b[_]=O,++_;x=_}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=6&&(n-=6),At(n<1?255*((t-e)*n+e):n<3?255*t:n<4?255*((t-e)*(4-n)+e):255*e)},Bi=function(e,t,n){t/=100;var r=(n/=100)<=.5?n*(t+1):n+t-n*t,i=2*n-r;return{r:qB(i,r,(e/=60)+2),g:qB(i,r,e),b:qB(i,r,e-2)}},Ij=function(e,t,n,r){return{r:At(255*(1-e)*(r=1-r)),g:At(255*(1-t)*r),b:At(255*(1-n)*r)}},Qne=function(e,t,n){e/=255,t/=255,n/=255;var r=1-Math.max(e,t,n),i=1-r,o=i&&(i-t)/i,s=i&&(i-n)/i;return{c:At(100*(i&&(i-e)/i)),m:At(100*o),y:At(100*s),k:At(100*r)}},Hg=function(e,t,n,r){r===void 0&&(r=1),e/=255,t/=255,n/=255,r=Math.min(r,1);var i=Math.max(e,t,n),o=Math.min(e,t,n),s=i-o,l=0,c=0,d=(i+o)/2;if(s!==0){switch(i){case e:l=(t-n)/s%6;break;case t:l=(n-e)/s+2;break;case n:l=(e-t)/s+4}(l=At(60*l))<0&&(l+=360),c=s/(1-Math.abs(2*d-1))}return{h:l,s:At(100*c),l:At(100*d),a:r}},hV=function(e,t){if(e<0&&(e+=360),e>360&&(e-=360),e===360||e===0)return e;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=t?r:n,o=0,s=0,l=0,c=0;return(t?n:r).find(function(d,f){return e>=d[0]&&e360||e<0)&&(e-=360*Math.floor(e/360)),e},Eo=function(e){return typeof e=="string"&&(e=mv.test(e)?Kk(e)/100:+e),isNaN(+e)||e>1?1:At(e)},gv=function(e,t,n){return t.reduce(function(r,i){return X3(X3([],r,!0),[sn(sn({},e),{h:n===No.ADDITIVE?A1(e.h+i):A1(hV(hV(e.h,!1)+i,!0))})],!1)},[sn({},e)])},LHe=function(e,t){return gv(e,[30,-30],t)},NHe=function(e,t){return gv(e,[180],t)},BHe=function(e,t){return gv(e,[150,-150],t)},$He=function(e,t){return gv(e,[120,-120],t)},FHe=function(e,t){return gv(e,[60,-120,180],t)},zHe=function(e,t){return gv(e,[90,-90,180],t)},Ys=function(e){return typeof e=="string"?function(t){var n;if(Object.keys(Vt).some(function(r){if(Qb[r].test(t))return n=r,!0}),!n&&~Yne.indexOf(t)&&(n=Vt.HEX),!n)throw new Error(MHe);return n}(e):function(t){var n,r=!1,i=Kne(Object.keys(t));if(Y3[i]&&(n=Y3[i]),n&&n===Vt.RGB){var o=Object.entries(t).some(function(l){return!K3.test("".concat(l[1]))}),s=Object.entries(t).some(function(l){return!(mv.test("".concat(l[1]))||!K3.test("".concat(l[1]))&&!isNaN(+l[1])&&+l[1]<=255)});o&&s&&(r=!0),o||(n=Vt.HEX)}if(!n||r)throw new Error(DHe);return n}(e)},jHe=((Rb={})[Vt.HEX]=function(e){var t=(~Yne.indexOf(e)?AC[e]:e).match(Qb.HEX),n={r:Q_(t[1]||t[5]),g:Q_(t[2]||t[6]),b:Q_(t[3]||t[7])},r=t[4]||t[8];return r!==void 0&&(n.a=Q_(r)/255),n},Rb[Vt.RGB]=function(e){var t=e.match(Qb.RGB),n=Yh(t[1]||t[5]),r=Yh(t[2]||t[6]),i=Yh(t[3]||t[7]),o=t[4]||t[8],s={r:Math.min(n,255),g:Math.min(r,255),b:Math.min(i,255)};return o!==void 0&&(s.a=Eo(o)),s},Rb[Vt.HSL]=function(e){var t=e.match(Qb.HSL),n=A1(t[1]||t[5]),r=RC(t[2]||t[6]),i=RC(t[3]||t[7]),o=t[4]||t[8],s=Bi(n,r,i);return o!==void 0&&(s.a=Eo(o)),s},Rb[Vt.CMYK]=function(e){var t=e.match(Qb.CMYK),n=gd(t[1]||t[6]),r=gd(t[2]||t[7]),i=gd(t[3]||t[8]),o=gd(t[4]||t[9]),s=t[5]||t[10],l=Ij(n,r,i,o);return s!==void 0&&(l.a=Eo(s)),l},Rb),UHe=((Ib={})[Vt.HEX]=function(e){var t={r:Yh("".concat(e.r)),g:Yh("".concat(e.g)),b:Yh("".concat(e.b))};return Zi(e,"a")&&(t.a=Math.min(Yh("".concat(e.a),!0),1)),t},Ib[Vt.RGB]=function(e){return this.HEX(e)},Ib[Vt.HSL]=function(e){var t=RC("".concat(e.s)),n=RC("".concat(e.l)),r=Bi(A1(e.h),t,n);return Zi(e,"a")&&(r.a=Eo(e.a)),r},Ib[Vt.CMYK]=function(e){var t=gd("".concat(e.c)),n=gd("".concat(e.m)),r=gd("".concat(e.y)),i=gd("".concat(e.k)),o=Ij(t,n,r,i);return Zi(e,"a")&&(o.a=Eo(e.a)),o},Ib),Tp=function(e,t){return t===void 0&&(t=Ys(e)),typeof e=="string"?jHe[t](e):UHe[t](e)},rn=((nu={})[Vt.HEX]=function(e){return{r:J_(e.r),g:J_(e.g),b:J_(e.b)}},nu.HEXA=function(e){var t=rn.HEX(e);return t.a=Zi(e,"a")?J_(255*e.a):"0xFF",t},nu[Vt.RGB]=function(e,t){return Zi(e,"a")&&delete e.a,sp(e,t)},nu.RGBA=function(e,t){return e.a=Zi(e,"a")?At(e.a):1,sp(e,t)},nu[Vt.HSL]=function(e,t){var n=Hg(e.r,e.g,e.b);return delete n.a,Um(n,t)},nu.HSLA=function(e,t){var n=rn.HSL(e,t);return n.a=Zi(e,"a")?At(e.a,t):1,n},nu[Vt.CMYK]=function(e,t){return HHe(Qne(e.r,e.g,e.b),t)},nu.CMYKA=function(e,t){var n=rn.CMYK(e,t);return n.a=Zi(e,"a")?At(e.a,t):1,n},nu),pV=function(e,t,n,r){var i=Ys(e),o=typeof e=="string",s=Tp(e,i),l=typeof e=="string"&&Zi(s,"a")||typeof e!="string"&&Zi(e,"a"),c=Hg(s.r,s.g,s.b,s.a);l||delete c.a;var d=n?c.l/(t+1):(100-c.l)/(t+1),f=Array(t).fill(null).map(function(h,p){return sn(sn({},c),{l:c.l+d*(p+1)*(1-2*+n)})});switch(i){case Vt.HEX:default:return f.map(function(h){var p=Bi(h.h,h.s,h.l);return l&&(p.a=h.a),o?l?tn.HEX(sp(sn(sn({},p),{a:At(255*p.a)}),r)):tn.HEX(sp(p,r)):l?rn.HEXA(p):rn.HEX(p)});case Vt.RGB:return f.map(function(h){var p=Bi(h.h,h.s,h.l);return l&&(p.a=h.a),o?tn.RGB(sp(p,r)):l?rn.RGBA(p,r):rn.RGB(p,r)});case Vt.HSL:return f.map(function(h){return o?tn.HSL(Um(h,r)):l?rn.HSLA(sn(sn({},Bi(h.h,h.s,h.l)),{a:h.a}),r):rn.HSL(Bi(h.h,h.s,h.l),r)})}},nm=((Ch={buildHarmony:function(e,t,n,r){var i=Ys(e),o=Tp(e,i),s=Hg(o.r,o.g,o.b,o.a),l=typeof e=="string"&&Zi(o,"a")||typeof e!="string"&&Zi(e,"a"),c=typeof e=="string";switch(i){case Vt.HEX:default:return l?this.HEXA(Um(s,0),t,n,c):this.HEX(Um(s,0),t,n,c);case Vt.HSL:return l?this.HSLA(s,t,n,c,r):this.HSL(s,t,n,c,r);case Vt.RGB:return l?this.RGBA(s,t,n,c,r):this.RGB(s,t,n,c,r)}}})[Vt.HEX]=function(e,t,n,r){return t(e,n).map(function(i){return r?tn.HEX(Bi(i.h,i.s,i.l)):rn.HEX(Bi(i.h,i.s,i.l))})},Ch.HEXA=function(e,t,n,r){return t(e,n).map(function(i){return r?tn.HEX(sn(sn({},Bi(i.h,i.s,i.l)),{a:255*Eo(i.a)})):rn.HEXA(sn(sn({},Bi(i.h,i.s,i.l)),{a:Eo(i.a)}))})},Ch[Vt.RGB]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.RGB(sp(Bi(o.h,o.s,o.l),i)):rn.RGB(Bi(o.h,o.s,o.l),i)})},Ch.RGBA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.RGB(sp(sn(sn({},Bi(o.h,o.s,o.l)),{a:Eo(o.a)}),i)):rn.RGBA(sn(sn({},Bi(o.h,o.s,o.l)),{a:Eo(o.a)}),i)})},Ch[Vt.HSL]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.HSL(Um({h:o.h,s:o.s,l:o.l},i)):rn.HSL(Bi(o.h,o.s,o.l),i)})},Ch.HSLA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.HSL(Um(sn(sn({},o),{a:Eo(o.a)}),i)):rn.HSLA(sn(sn({},Bi(o.h,o.s,o.l)),{a:Eo(o.a)}),i)})},Ch),rm=((Th={mix:function(e,t){var n,r,i,o,s,l,c,d,f,h,p,g,v,y,S,_=e.map(function(A){var R=Ys(A);return Tp(A,R)}),b=t===No.SUBTRACTIVE?_.map(function(A){var R,k,O,L,N,H,W,z,D,F,j,V,G,K,Y=(R=A.r,k=A.g,O=A.b,L=Math.min(R,k,O),N=Math.min(255-R,255-k,255-O),H=R-L,W=k-L,z=O-L,D=Math.min(H,W),F=H-D,j=(W+D)/2,V=(z+W-D)/2,G=Math.max(F,j,V)/Math.max(H,W,z),K=isNaN(G)||G===1/0||G<=0?1:G,{r:F/K+N,y:j/K+N,b:V/K+N});return Zi(A,"a")&&(Y.a=A.a),Y}):null;function x(A){var R=t===No.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return A.reduce(function(k,O){var L=Zi(O,"a")?O.a:1,N={r:Math.min(k.r+O.r*L,255),b:Math.min(k.b+O.b*L,255),a:1-(1-L)*(1-k.a)},H="g"in k?k.g:k.y,W="g"in O?O.g:O.y;return sn(sn({},N),t===No.ADDITIVE?{g:Math.min(H+W*L,255)}:{y:Math.min(H+W*L,255)})},R)}if(t===No.ADDITIVE)n=x(_);else{var E=x(b);r=E.r,i=E.y,o=E.b,s=Math.min(r,i,o),l=Math.min(255-r,255-i,255-o),c=r-s,d=i-s,f=o-s,h=Math.min(d,f),p=c+d-h,g=d+h,v=2*(f-h),y=Math.max(p,g,v)/Math.max(c,d,f),S=isNaN(y)||y===1/0||y<=0?1:y,(n={r:p/S+l,g:g/S+l,b:v/S+l}).a=E.a}return{r:At(n.r),g:At(n.g),b:At(n.b),a:Ha(n.a,0,1)}}})[Vt.HEX]=function(e,t,n){var r=this.mix(e,t);return delete r.a,n?tn.HEX(r):rn.HEX(r)},Th.HEXA=function(e,t,n){var r=this.mix(e,t);return r.a=n?255*Eo(r.a):Eo(r.a),n?tn.HEX(r):rn.HEXA(r)},Th[Vt.RGB]=function(e,t,n,r){var i=this.mix(e,t);return delete i.a,n?tn.RGB(i):rn.RGB(i,r)},Th.RGBA=function(e,t,n,r){var i=this.mix(e,t);return n?tn.RGB(i):rn.RGBA(i,r)},Th[Vt.HSL]=function(e,t,n,r){var i=this.mix(e,t),o=Hg(i.r,i.g,i.b);return delete i.a,delete o.a,n?tn.HSL(o):rn.HSL(i,r)},Th.HSLA=function(e,t,n,r){var i=this.mix(e,t),o=Hg(i.r,i.g,i.b,i.a);return n?tn.HSL(o):rn.HSLA(i,r)},Th),sp=function(e,t){return sn({r:At(e.r,t),g:At(e.g,t),b:At(e.b,t)},Zi(e,"a")?{a:At(e.a,t)}:{})},Um=function(e,t){return sn({h:At(e.h,t),s:At(e.s,t),l:At(e.l,t)},Zi(e,"a")?{a:At(e.a,t)}:{})},HHe=function(e,t){return{c:At(e.c,t),m:At(e.m,t),y:At(e.y,t),k:At(e.k,t)}},Gu=function(e,t,n,r,i,o){var s=i(Tp(e,t),r);return n?o(s):s},im=function(e,t,n,r,i,o,s){n<1&&(n=5);var l=function(c,d,f){var h=f-1,p=(d.r-c.r)/h,g=(d.g-c.g)/h,v=(d.b-c.b)/h,y=Eo(c.a),S=(Eo(d.a)-y)/h;return Array(f).fill(null).map(function(_,b){return b===0?c:b===h?d:{r:At(c.r+p*b),g:At(c.g+g*b),b:At(c.b+v*b),a:At(y+S*b)}})}(Tp(e),Tp(t),n);return l.map(function(c){var d=o(c,i);return r?s(d):d})},WHe=function(){function e(t,n){n===void 0&&(n=6),this.rgb=Tp(t),this._decimals=n,this.updateHSL(),this.updateCMYK()}return e.prototype.updateRGB=function(){this.rgb=sn(sn({},Bi(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},e.prototype.updateRGBFromCMYK=function(){this.rgb=sn(sn({},Ij(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},e.prototype.updateHSL=function(){this.hsl=Hg(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},e.prototype.updateCMYK=function(){this.cmyk=Qne(this.rgb.r,this.rgb.g,this.rgb.b)},e.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},e.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},e.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},e.prototype.setDecimals=function(t){return this._decimals=t,this},e.prototype.setH=function(t){return this.hsl.h=A1(t),this.updateRGBAndCMYK()},e.prototype.setS=function(t){return this.hsl.s=Ha(t,0,100),this.updateRGBAndCMYK()},e.prototype.setL=function(t){return this.hsl.l=Ha(t,0,100),this.updateRGBAndCMYK()},e.prototype.setR=function(t){return this.rgb.r=Ha(t,0,255),this.updateHSLAndCMYK()},e.prototype.setG=function(t){return this.rgb.g=Ha(t,0,255),this.updateHSLAndCMYK()},e.prototype.setB=function(t){return this.rgb.b=Ha(t,0,255),this.updateHSLAndCMYK()},e.prototype.setA=function(t){return this.hsl.a=this.rgb.a=Ha(t,0,1),this},e.prototype.setC=function(t){return this.cmyk.c=Ha(t,0,100),this.updateRGBAndHSL()},e.prototype.setM=function(t){return this.cmyk.m=Ha(t,0,100),this.updateRGBAndHSL()},e.prototype.setY=function(t){return this.cmyk.y=Ha(t,0,100),this.updateRGBAndHSL()},e.prototype.setK=function(t){return this.cmyk.k=Ha(t,0,100),this.updateRGBAndHSL()},Object.defineProperty(e.prototype,"decimals",{get:function(){return this._decimals},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"H",{get:function(){return At(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"S",{get:function(){return At(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"L",{get:function(){return At(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"R",{get:function(){return At(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"G",{get:function(){return At(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"B",{get:function(){return At(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"A",{get:function(){return At(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"C",{get:function(){return At(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"M",{get:function(){return At(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Y",{get:function(){return At(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"K",{get:function(){return At(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXObject",{get:function(){return rn.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXAObject",{get:function(){return rn.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBAObject",{get:function(){return sn(sn({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLAObject",{get:function(){return sn(sn({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKAObject",{get:function(){return sn(sn({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEX",{get:function(){return tn.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXA",{get:function(){return tn.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGB",{get:function(){return tn.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBA",{get:function(){return tn.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSL",{get:function(){return tn.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLA",{get:function(){return tn.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYK",{get:function(){return tn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKA",{get:function(){return tn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),e.toHEX=function(t,n){n===void 0&&(n=!0);var r=Ys(t);return Gu(t,r,n,0,rn.HEX,tn.HEX)},e.toHEXA=function(t,n){n===void 0&&(n=!0);var r=Ys(t);return Gu(t,r,n,0,rn.HEXA,tn.HEX)},e.toRGB=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Gu(t,i,n,r,rn.RGB,tn.RGB)},e.toRGBA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Gu(t,i,n,r,rn.RGBA,tn.RGB)},e.toHSL=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Gu(t,i,n,r,rn.HSL,tn.HSL)},e.toHSLA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Gu(t,i,n,r,rn.HSLA,tn.HSL)},e.toCMYK=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Gu(t,i,n,r,rn.CMYK,tn.CMYK)},e.toCMYKA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Gu(t,i,n,r,rn.CMYKA,tn.CMYK)},e.getBlendHEX=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),im(t,n,r,i,o,rn.HEX,tn.HEX)},e.getBlendHEXA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),im(t,n,r,i,o,rn.HEXA,tn.HEX)},e.getBlendRGB=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),im(t,n,r,i,o,rn.RGB,tn.RGB)},e.getBlendRGBA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),im(t,n,r,i,o,rn.RGBA,tn.RGB)},e.getBlendHSL=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),im(t,n,r,i,o,rn.HSL,tn.HSL)},e.getBlendHSLA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),im(t,n,r,i,o,rn.HSLA,tn.HSL)},e.getMixHEX=function(t,n,r){return n===void 0&&(n=No.ADDITIVE),r===void 0&&(r=!0),rm.HEX(t,n,r)},e.getMixHEXA=function(t,n,r){return n===void 0&&(n=No.ADDITIVE),r===void 0&&(r=!0),rm.HEXA(t,n,r)},e.getMixRGB=function(t,n,r,i){return n===void 0&&(n=No.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),rm.RGB(t,n,r,i)},e.getMixRGBA=function(t,n,r,i){return n===void 0&&(n=No.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),rm.RGBA(t,n,r,i)},e.getMixHSL=function(t,n,r,i){return n===void 0&&(n=No.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),rm.HSL(t,n,r,i)},e.getMixHSLA=function(t,n,r,i){return n===void 0&&(n=No.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),rm.HSLA(t,n,r,i)},e.getShades=function(t,n,r){return r===void 0&&(r=6),pV(t,n,!0,r)},e.getTints=function(t,n,r){return r===void 0&&(r=6),pV(t,n,!1,r)},e.getHarmony=function(t,n,r,i){return n===void 0&&(n=ou.COMPLEMENTARY),r===void 0&&(r=No.ADDITIVE),i===void 0&&(i=6),function(o,s,l,c){var d;return(d={},d[ou.ANALOGOUS]=nm.buildHarmony(s,LHe,c,l),d[ou.COMPLEMENTARY]=nm.buildHarmony(s,NHe,c,l),d[ou.SPLIT_COMPLEMENTARY]=nm.buildHarmony(s,BHe,c,l),d[ou.TRIADIC]=nm.buildHarmony(s,$He,c,l),d[ou.TETRADIC]=nm.buildHarmony(s,FHe,c,l),d[ou.SQUARE]=nm.buildHarmony(s,zHe,c,l),d)[o]}(n,t,i,r)},e}();const GHe={current:void 0,parent:void 0,events:void 0,color:{source:2533018,destination:15753874,expanding:16733986,updating:16733986,generating:16771899,closing:11583173,end:15483002},scale:10,fill:"#000000",alpha:1},{ceil:ji,PI:VHe}=Math,bw=(e,t)=>new WHe(e).setA(t??GHe.alpha).RGBA,qHe=(e,t)=>bw(e,t);function Hd(e,t){return{width:e.width*t.scale.x,height:e.height*t.scale.y,x:e.x*t.scale.x+t.x,y:e.y*t.scale.y+t.y}}const XHe={draw(e,t,n){if(e.text){const r=Hd(e,{x:e.textX,y:e.textY,scale:{x:1,y:1}}),i=Hd(r,n);t.font=`${e.fontSize*n.scale.x}px Arial`,t.fillStyle=bw(e.fontColor,e.alpha),t.fillText(e.text,i.x,i.y)}},test(e){return{left:-1/0,right:1/0,top:-1/0,bottom:1/0}}},YHe={draw(e,t,n){const{x:r,y:i,width:o,height:s}=Hd(e,n);t.fillStyle=bw(e.fill,e.alpha),t.fillRect(ji(r),ji(i),ji(o)||1,ji(s)||1)},test(e){return{left:e.x,right:e.x+e.width,top:e.y,bottom:e.y+e.height}}},KHe={draw(e,t,n){t.fillStyle=bw(e.fill,e.alpha),t.beginPath();const r=Hd({...e,width:e.radius,height:e.radius},n);t.ellipse(ji(r.x),ji(r.y),ji(r.width),ji(r.height),0,0,2*VHe),t.fill()},test(e){return{left:e.x-e.radius,right:e.x+e.radius,top:e.y-e.radius,bottom:e.y+e.radius}}},QHe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.fillStyle=bw(e.fill,e.alpha);const{x:o,y:s}=Hd({...r,width:0,height:0},n);t.moveTo(ji(o),ji(s));for(const l of i){const{x:c,y:d}=Hd({...l,width:0,height:0},n);t.lineTo(ji(c),ji(d))}t.closePath(),t.fill()},test(e){var t,n,r,i;return{left:((t=Yt.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=Yt.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=Yt.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=Yt.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},JHe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.lineCap="round",t.lineJoin="round",t.strokeStyle=qHe(e.fill,e.alpha);const{x:o,y:s,width:l}=Hd({...r,width:e.lineWidth,height:0},n);t.lineWidth=ji(l),t.moveTo(ji(o),ji(s));for(const c of i){const{x:d,y:f}=Hd({...c,width:0,height:0},n);t.lineTo(ji(d),ji(f))}t.stroke()},test(e){var t,n,r,i;return{left:((t=Yt.minBy(e.points,"x"))==null?void 0:t.x)??0-e.lineWidth??0,right:((n=Yt.maxBy(e.points,"x"))==null?void 0:n.x)??0+e.lineWidth??0,top:((r=Yt.minBy(e.points,"y"))==null?void 0:r.y)??0-e.lineWidth??0,bottom:((i=Yt.maxBy(e.points,"y"))==null?void 0:i.y)??0+e.lineWidth??0}}},ZHe={text:XHe,path:JHe,rect:YHe,polygon:QHe,circle:KHe},{log2:eWe,max:tWe}=Math,mV=e=>Yt.floor(eWe(e+1));function gV({right:e,left:t,bottom:n,top:r},i){const o=tWe(mV(e-t),mV(n-r))-i,s=2**o,l={left:Yt.floor(t/s),right:Yt.ceil((e+1)/s),top:Yt.floor(r/s),bottom:Yt.ceil((n+1)/s)};return{zoom:o,order:s,tiles:Yt.shuffle(w8e({x:Yt.range(l.left,l.right+1),y:Yt.range(l.top,l.bottom+1)}).map(c=>{const d=c.x*s,f=c.y*s;return{tile:c,bounds:{left:d-s/2,right:d+s/2,top:f-s/2,bottom:f+s/2}}}))}}const nWe=""+new URL("D2Renderer.worker-19d00eda.js",import.meta.url).href;class rWe extends Worker{constructor(){super(nWe,{type:"module"})}call(t,n,r=[]){return this.postMessage({action:t,payload:n},r)}on(t,n){const r=i=>{const{action:o,payload:s}=i.data;o===t&&n(s)};return this.addEventListener("message",r),()=>this.removeEventListener("message",r)}}function iWe(e,t){return!(t.left>=e.right||t.right<=e.left||t.top>=e.bottom||t.bottom<=e.top)}const{max:vV,min:yV}=Math,Jne=class Zne extends jp{constructor(t,n){super(t),this.bounds=n,this.destroying=!1,this.age=Zne.age++}};Jne.age=0;let oWe=Jne;function tS(e,t){return Yt.isNaN(e)?t:e}var bs,Nr,sd,cu,pi,kl,ad,ld,LC,NC,ere,BC,tre,ug,D1,$C,FC,nre,zC,rre,jC,ire,UC,ore,L1,Q3,N1,J3,HC,sre,B1,Z3,WC,are,GC,lre,VC,cre;class sWe extends RHe{constructor(){super(...arguments);Zn(this,NC);Zn(this,BC);Zn(this,FC);Zn(this,zC);Zn(this,jC);Zn(this,UC);Zn(this,L1);Zn(this,N1);Zn(this,HC);Zn(this,B1);Zn(this,WC);Zn(this,GC);Zn(this,VC);Zn(this,bs,void 0);Zn(this,Nr,void 0);Zn(this,sd,void 0);Zn(this,cu,void 0);Zn(this,pi,U7);Zn(this,kl,[]);Zn(this,ad,new b8e(16));Zn(this,ld,void 0);Zn(this,LC,0);Zn(this,ug,Yt.once(()=>Yt.debounce(()=>Mi(this,L1,Q3).call(this),Ze(this,pi).debounceInterval)));Zn(this,D1,Yt.once(()=>Yt.throttle(()=>Mi(this,N1,J3).call(this),Ze(this,pi).refreshInterval)));Zn(this,$C,Yt.once(()=>Yt.throttle(n=>Mi(this,HC,sre).call(this,n),Ze(this,pi).refreshInterval)))}getInstance(){return{app:Ze(this,bs),viewport:Ze(this,Nr)}}fitCamera(){var r,i,o,s;const n=Yt.values(Ze(this,ad).all()).flat();if(n.length){const l=Yt.reduce(n,(c,d)=>({top:tS(yV(c.top,d.top),c.top),left:tS(yV(c.left,d.left),c.left),bottom:tS(vV(c.bottom,d.bottom),c.bottom),right:tS(vV(c.right,d.right),c.right)}),{bottom:-1/0,top:1/0,left:1/0,right:-1/0});(s=(r=Ze(this,Nr))==null?void 0:r.animate)==null||s.call(r,{position:new Ot((l.left+l.right)/2,(l.top+l.bottom)/2),scale:((o=(i=Ze(this,Nr))==null?void 0:i.findFit)==null?void 0:o.call(i,l.right-l.left,l.bottom-l.top))*.8,ease:"easeOutExpo",time:Ze(this,pi).animationDuration*1.5,callbackOnComplete:()=>Ze(this,ug).call(this)()})}}initialCamera(){var n,r;(r=(n=Ze(this,Nr))==null?void 0:n.animate)==null||r.call(n,{scale:1,ease:"easeOutExpo",time:Ze(this,pi).animationDuration*1.5,callbackOnComplete:()=>Ze(this,ug).call(this)()})}getView(){var n;return(n=Ze(this,bs))==null?void 0:n.view}setup(n){const r={...U7,...n};Mi(this,BC,tre).call(this,r),this.setOptions(r),Mi(this,zC,rre).call(this,r)}destroy(){Yt.map(Ze(this,kl),n=>n.terminate()),Ze(this,bs).destroy()}add(n){const r=HFe();Yt.map(Ze(this,kl),o=>o.call("add",[n,r]));const i=Yt.map(n,({component:o,meta:s})=>({...ZHe[o.$].test(o),component:o,meta:s,index:Mi(this,NC,ere).call(this)}));return Ze(this,ad).load(i),()=>Yt.defer(()=>{for(const o of i)Ze(this,ad).remove(o);Yt.map(Ze(this,kl),o=>o.call("remove",[r]))})}setOptions(n){const r={...Ze(this,pi),...n};Mi(this,jC,ire).call(this,r),Qc(this,pi,r),Mi(this,L1,Q3).call(this),Mi(this,N1,J3).call(this)}}bs=new WeakMap,Nr=new WeakMap,sd=new WeakMap,cu=new WeakMap,pi=new WeakMap,kl=new WeakMap,ad=new WeakMap,ld=new WeakMap,LC=new WeakMap,NC=new WeakSet,ere=function(){return e6(this,LC)._++},BC=new WeakSet,tre=function(n){Qc(this,bs,new Cj({backgroundAlpha:0,width:n.screenSize.width,height:n.screenSize.height,autoDensity:!0,resolution:2})),Qc(this,Nr,new Lje({stopPropagation:!0,screenWidth:n.screenSize.width,screenHeight:n.screenSize.height,events:Ze(this,bs).renderer.events,passiveWheel:!1})),Ze(this,Nr).on("clicked",r=>{const{x:i,y:o}=r.world,s=Ze(this,ad).search({minX:i,minY:o,maxX:i+Number.MIN_VALUE,maxY:o+Number.MIN_VALUE});this.emit("click",r.event,{world:r.world,components:s})}),Ze(this,bs).stage.addChild(Ze(this,Nr)),Ze(this,Nr).drag().pinch().wheel().decelerate({friction:.98}).clampZoom({maxScale:300,minScale:1e-5}),Ze(this,Nr).on("moved",()=>{Ze(this,ug).call(this)(),Ze(this,D1).call(this)()}),Ze(this,Nr).on("mousemove",r=>Ze(this,$C).call(this)(r)),Qc(this,sd,new Ko),Ze(this,Nr).addChild(Ze(this,sd)),Qc(this,cu,new Ug),Ze(this,Nr).addChild(Ze(this,cu)),Qc(this,ld,new Ug),Ze(this,Nr).addChild(Ze(this,ld)),Mi(this,FC,nre).call(this)},ug=new WeakMap,D1=new WeakMap,$C=new WeakMap,FC=new WeakSet,nre=function(){const{dynamicResolution:n}=Ze(this,pi),{dtMax:r,dtMin:i,increment:o,intervalMs:s,maxScale:l,minScale:c}=n,d=Yt.floor(Xr.targetFPMS*s);let f=0,h=0,p=1;Ze(this,bs).ticker.add(g=>{const{tileResolution:v}=Ze(this,pi);if(!(f%d)){const y=h/d;p=Yt.clamp(y>=r?p+o:y<=i?p-o:p,c,l),Yt.map(Ze(this,kl),S=>{S.call("setTileResolution",[{width:Yt.ceil(v.width/p),height:Yt.ceil(v.height/p)}])}),h=0}h+=g,f++})},zC=new WeakSet,rre=function(n){Yt.map(Ze(this,kl),r=>r.terminate()),Qc(this,kl,Yt.times(n.workerCount,r=>{const i=new rWe;return i.on("update",o=>Mi(this,UC,ore).call(this,o)),i.onerror=o=>{throw o},i.call("setup",[{...n,workerIndex:r}]),i}))},jC=new WeakSet,ire=function(n){var o,s,l,c;const{width:r,height:i}=n.screenSize;(l=(s=(o=Ze(this,bs))==null?void 0:o.renderer)==null?void 0:s.resize)==null||l.call(s,r,i),(c=Ze(this,Nr))==null||c.resize(r,i)},UC=new WeakSet,ore=function({bounds:n,bitmap:r}){const i=ht.from(r);Mi(this,WC,are).call(this,i,n)},L1=new WeakSet,Q3=function(){const{top:n,bottom:r,left:i,right:o}=Ze(this,Nr);Yt.map(Ze(this,kl),s=>s.call("setFrustum",[{top:n,bottom:r,left:i,right:o}]))},N1=new WeakSet,J3=function(){var s,l,c,d,f;const{tileSubdivision:n,accentColor:r}=Ze(this,pi),{tiles:i}=gV(Ze(this,Nr),n),o=Mi(this,B1,Z3).call(this);(s=Ze(this,cu))==null||s.clear(),(l=Ze(this,cu))==null||l.lineStyle(1*o,r,.5),(c=Ze(this,cu))==null||c.beginFill(r,.05);for(const{bounds:h,tile:p}of i)Yt.find((d=Ze(this,sd))==null?void 0:d.children,g=>Yt.isEqual(g.bounds,h))||(f=Ze(this,cu))==null||f.drawRect(h.left,h.top,h.right-h.left,h.bottom-h.top)},HC=new WeakSet,sre=function(n){var c;const{accentColor:r}=Ze(this,pi),i=Mi(this,B1,Z3).call(this),{x:o,y:s}=Ze(this,Nr).toWorld(n.globalX,n.globalY),l=Ze(this,ad).search({minX:o,minY:s,maxX:o+Number.MIN_VALUE,maxY:s+Number.MIN_VALUE});Ze(this,ld).clear(),Ze(this,ld).lineStyle(2*i,r,1);for(const d of l)(c=Ze(this,ld))==null||c.drawRect(d.left,d.top,d.right-d.left,d.bottom-d.top)},B1=new WeakSet,Z3=function(){const{right:n,left:r}=Ze(this,Nr),{width:i}=Ze(this,pi).screenSize;return(n-r)/i},WC=new WeakSet,are=async function(n,r){var s,l;const{tileSubdivision:i}=Ze(this,pi),{tiles:o}=gV(Ze(this,Nr),i);if(Yt.find(o,c=>Yt.isEqual(c.bounds,r))){const c={x:(r.right-r.left)/n.width,y:(r.bottom-r.top)/n.height},d=new oWe(n,r);(s=Ze(this,sd))==null||s.addChild(d).setTransform(r.left,r.top,c.x,c.y),Ze(this,D1).call(this)(),await Mi(this,GC,lre).call(this,d),Yt.forEach((l=Ze(this,sd))==null?void 0:l.children,async f=>{iWe(f.bounds,r)&&f.age{const o=s=>{n.alpha+=s/Xr.targetFPMS/Ze(this,pi).animationDuration,n.alpha>1&&(r.remove(o),i())};n.alpha=0,r.add(o)})},VC=new WeakSet,cre=function(n){const r=Ze(this,bs).ticker;return new Promise(i=>{const o=s=>{n.alpha-=s/Xr.targetFPMS/Ze(this,pi).animationDuration,n.alpha<0&&(r.remove(o),i())};n.alpha=1,r.add(o)})};const aWe=u8e(sWe,{components:["rect","circle","path","polygon"],id:"d2-renderer",name:"Pixi",description:"Provides 2D Visualisation Support",version:"1.0.0"}),lWe={"d2-renderer":aWe};var cWe=function(t,n){if(n=n.split(":")[0],t=+t,!t)return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0},Pj={},uWe=Object.prototype.hasOwnProperty,dWe;function bV(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function xV(e){try{return encodeURIComponent(e)}catch{return null}}function fWe(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var i=bV(r[1]),o=bV(r[2]);i===null||o===null||i in n||(n[i]=o)}return n}function hWe(e,t){t=t||"";var n=[],r,i;typeof t!="string"&&(t="?");for(i in e)if(uWe.call(e,i)){if(r=e[i],!r&&(r===null||r===dWe||isNaN(r))&&(r=""),i=xV(i),r=xV(r),i===null||r===null)continue;n.push(i+"="+r)}return n.length?t+n.join("&"):""}Pj.stringify=hWe;Pj.parse=fWe;var ure=cWe,Qk=Pj,pWe=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,dre=/[\n\r\t]/g,mWe=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,fre=/:\d+$/,gWe=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,vWe=/^[a-zA-Z]:/;function Oj(e){return(e||"").toString().replace(pWe,"")}var e5=[["#","hash"],["?","query"],function(t,n){return Vl(n.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],wV={hash:1,query:1};function hre(e){var t;typeof window<"u"?t=window:typeof Nt<"u"?t=Nt:typeof self<"u"?t=self:t={};var n=t.location||{};e=e||n;var r={},i=typeof e,o;if(e.protocol==="blob:")r=new Jl(unescape(e.pathname),{});else if(i==="string"){r=new Jl(e,{});for(o in wV)delete r[o]}else if(i==="object"){for(o in e)o in wV||(r[o]=e[o]);r.slashes===void 0&&(r.slashes=mWe.test(e.href))}return r}function Vl(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function pre(e,t){e=Oj(e),e=e.replace(dre,""),t=t||{};var n=gWe.exec(e),r=n[1]?n[1].toLowerCase():"",i=!!n[2],o=!!n[3],s=0,l;return i?o?(l=n[2]+n[3]+n[4],s=n[2].length+n[3].length):(l=n[2]+n[4],s=n[2].length):o?(l=n[3]+n[4],s=n[3].length):l=n[4],r==="file:"?s>=2&&(l=l.slice(2)):Vl(r)?l=n[4]:r?i&&(l=l.slice(2)):s>=2&&Vl(t.protocol)&&(l=n[4]),{protocol:r,slashes:i||Vl(r),slashesCount:s,rest:l}}function yWe(e,t){if(e==="")return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,s=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),s++):s&&(r===0&&(o=!0),n.splice(r,1),s--);return o&&n.unshift(""),(i==="."||i==="..")&&n.push(""),n.join("/")}function Jl(e,t,n){if(e=Oj(e),e=e.replace(dre,""),!(this instanceof Jl))return new Jl(e,t,n);var r,i,o,s,l,c,d=e5.slice(),f=typeof t,h=this,p=0;for(f!=="object"&&f!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=Qk.parse),t=hre(t),i=pre(e||"",t),r=!i.protocol&&!i.slashes,h.slashes=i.slashes||r&&t.slashes,h.protocol=i.protocol||t.protocol||"",e=i.rest,(i.protocol==="file:"&&(i.slashesCount!==2||vWe.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!Vl(h.protocol)))&&(d[3]=[/(.*)/,"pathname"]);p{const n=[];for(const{transport:r,url:i,key:o,disabled:s}of e??[])if(!s){const l=new gre[r].constructor({url:i});n.push({key:o,url:i,renderer:await l.get()})}t(()=>n)},[e,t]),C.jsx(C.Fragment,{})}const EWe={connected:"success.light",connecting:"warning.light",error:"error.light",disabled:"text.disabled"};function CWe({value:e,onValueChange:t}){const[n]=Tk(),r=ee.find(n,{key:e.key});function i(s){t==null||t(sk(e,s))}const o=e!=null&&e.disabled?"disabled":r?"connected":"error";return C.jsx(C.Fragment,{children:C.jsxs(bn,{alignItems:"center",py:.5,children:[C.jsx(rte,{sx:{color:EWe[o]}}),C.jsx(Kr,{}),C.jsxs(dt,{flex:1,children:[C.jsx(zt,{children:r?`${r.renderer.meta.name} ${r.renderer.meta.version}`:ee.startCase(o)}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:r?C.jsxs(C.Fragment,{children:[C.jsx("span",{children:r.renderer.meta.description}),C.jsx("br",{}),C.jsxs("span",{children:["Contributes: ",ee.join(r.renderer.meta.components,", ")]})]}):(e==null?void 0:e.url)||"No URL"})]}),C.jsx(Kd,{title:`${e.disabled?"Enable":"Disable"} Renderer`,children:C.jsx(dt,{children:C.jsx(Tg,{checked:!e.disabled,onChange:(s,l)=>i({disabled:!l})})})}),C.jsx(cj,{trigger:s=>C.jsx(Fm,{icon:C.jsx(ok,{}),label:"Edit Renderer",onClick:s}),appBar:{children:C.jsx(lj,{children:"Edit Renderer"})},children:C.jsxs(dt,{p:2.5,children:[C.jsx(X1,{value:e.url,onChange:s=>i({url:s.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(mx,{placeholder:"Renderer Type",items:ee.entries(gre).map(([s,{name:l}])=>({value:s,label:l})),fullWidth:!0,value:e.transport,onChange:s=>i({transport:s})})]})})]})})}var Mj={},Jk={},xw={};(function(e){var t=Nt&&Nt.__extends||function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var b in _)Object.prototype.hasOwnProperty.call(_,b)&&(S[b]=_[b])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function S(){this.constructor=v}v.prototype=y===null?Object.create(y):(S.prototype=y.prototype,new S)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.createJSONRPCNotification=e.createJSONRPCRequest=e.createJSONRPCSuccessResponse=e.createJSONRPCErrorResponse=e.JSONRPCErrorCode=e.JSONRPCErrorException=e.isJSONRPCResponses=e.isJSONRPCResponse=e.isJSONRPCRequests=e.isJSONRPCRequest=e.isJSONRPCID=e.JSONRPC=void 0,e.JSONRPC="2.0";var n=function(g){return typeof g=="string"||typeof g=="number"||g===null};e.isJSONRPCID=n;var r=function(g){return g.jsonrpc===e.JSONRPC&&g.method!==void 0&&g.result===void 0&&g.error===void 0};e.isJSONRPCRequest=r;var i=function(g){return Array.isArray(g)&&g.every(e.isJSONRPCRequest)};e.isJSONRPCRequests=i;var o=function(g){return g.jsonrpc===e.JSONRPC&&g.id!==void 0&&(g.result!==void 0||g.error!==void 0)};e.isJSONRPCResponse=o;var s=function(g){return Array.isArray(g)&&g.every(e.isJSONRPCResponse)};e.isJSONRPCResponses=s;var l=function(g,v,y){var S={code:g,message:v};return y!=null&&(S.data=y),S},c=function(g){t(v,g);function v(y,S,_){var b=g.call(this,y)||this;return Object.setPrototypeOf(b,v.prototype),b.code=S,b.data=_,b}return v.prototype.toObject=function(){return l(this.code,this.message,this.data)},v}(Error);e.JSONRPCErrorException=c,function(g){g[g.ParseError=-32700]="ParseError",g[g.InvalidRequest=-32600]="InvalidRequest",g[g.MethodNotFound=-32601]="MethodNotFound",g[g.InvalidParams=-32602]="InvalidParams",g[g.InternalError=-32603]="InternalError"}(e.JSONRPCErrorCode||(e.JSONRPCErrorCode={}));var d=function(g,v,y,S){return{jsonrpc:e.JSONRPC,id:g,error:l(v,y,S)}};e.createJSONRPCErrorResponse=d;var f=function(g,v){return{jsonrpc:e.JSONRPC,id:g,result:v??null}};e.createJSONRPCSuccessResponse=f;var h=function(g,v,y){return{jsonrpc:e.JSONRPC,id:g,method:v,params:y}};e.createJSONRPCRequest=h;var p=function(g,v){return{jsonrpc:e.JSONRPC,method:g,params:v}};e.createJSONRPCNotification=p})(xw);var ww={};Object.defineProperty(ww,"__esModule",{value:!0});ww.DefaultErrorCode=void 0;ww.DefaultErrorCode=0;var _V=Nt&&Nt.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function l(f){try{d(r.next(f))}catch(h){s(h)}}function c(f){try{d(r.throw(f))}catch(h){s(h)}}function d(f){f.done?o(f.value):i(f.value).then(l,c)}d((r=r.apply(e,t||[])).next())})},SV=Nt&&Nt.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(n=0)),n;)try{if(r=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]{const r=({data:i})=>{i.id===n.id&&(this.rpc.receive(i),this.worker.removeEventListener("message",r))};this.worker.postMessage(n),this.worker.addEventListener("message",r)})}connect(){return this.worker.postMessage(this.options.url),new Promise(t=>{const n=()=>{t(),this.worker.removeEventListener("message",n)};this.worker.addEventListener("message",n)})}async disconnect(){this.worker.terminate()}async call(t,n){return await this.rpc.request(t,n)}}const UWe={trace:async(e,t)=>{switch(e){case"about":return{name:"Search Trace",description:"Provides JSON Search Trace Support",version:"1.0.2"};case"features/formats":return[{id:"grid",name:"Grid"},{id:"xy",name:"Network"},{id:"mesh",name:"Mesh"}];case"features/algorithms":return[{id:"identity",name:"Unknown",hidden:!0}];case"solve/pathfinding":{const{parameters:n}=t;try{return JSON.parse((n==null?void 0:n.content)??"")}catch{return{}}}}}};class HWe{constructor(t){Gp(this,"handler");this.options=t;const{hostname:n}=mre(t.url);this.handler=UWe[n]}async connect(){}async disconnect(){}async call(t,n){return await this.handler(t,n)}}const Zl=Object.create(null);Zl.open="0";Zl.close="1";Zl.ping="2";Zl.pong="3";Zl.message="4";Zl.upgrade="5";Zl.noop="6";const qS=Object.create(null);Object.keys(Zl).forEach(e=>{qS[Zl[e]]=e});const t5={type:"error",data:"parser error"},yre=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",bre=typeof ArrayBuffer=="function",xre=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Dj=({type:e,data:t},n,r)=>yre&&t instanceof Blob?n?r(t):kV(t,r):bre&&(t instanceof ArrayBuffer||xre(t))?n?r(t):kV(new Blob([t]),r):r(Zl[e]+(t||"")),kV=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function AV(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let YB;function WWe(e,t){if(yre&&e.data instanceof Blob)return e.data.arrayBuffer().then(AV).then(t);if(bre&&(e.data instanceof ArrayBuffer||xre(e.data)))return t(AV(e.data));Dj(e,!1,n=>{YB||(YB=new TextEncoder),t(YB.encode(n))})}const RV="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jb=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,s,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),f=new Uint8Array(d);for(r=0;r>4,f[i++]=(s&15)<<4|l>>2,f[i++]=(l&3)<<6|c&63;return d},VWe=typeof ArrayBuffer=="function",Lj=(e,t)=>{if(typeof e!="string")return{type:"message",data:wre(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:qWe(e.substring(1),t)}:qS[n]?e.length>1?{type:qS[n],data:e.substring(1)}:{type:qS[n]}:t5},qWe=(e,t)=>{if(VWe){const n=GWe(e);return wre(n,t)}else return{base64:!0,data:e}},wre=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},_re=String.fromCharCode(30),XWe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Dj(o,!1,l=>{r[s]=l,++i===n&&t(r.join(_re))})})},YWe=(e,t)=>{const n=e.split(_re),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let KB;function rS(e){return e.reduce((t,n)=>t+n.length,0)}function iS(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){l.enqueue(t5);break}i=f*Math.pow(2,32)+d.getUint32(4),r=3}else{if(rS(n)e){l.enqueue(t5);break}}}})}const Sre=4;function Qr(e){if(e)return JWe(e)}function JWe(e){for(var t in Qr.prototype)e[t]=Qr.prototype[t];return e}Qr.prototype.on=Qr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Qr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Qr.prototype.off=Qr.prototype.removeListener=Qr.prototype.removeAllListeners=Qr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function Ere(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const ZWe=Zs.setTimeout,eGe=Zs.clearTimeout;function tA(e,t){t.useNativeTimers?(e.setTimeoutFn=ZWe.bind(Zs),e.clearTimeoutFn=eGe.bind(Zs)):(e.setTimeoutFn=Zs.setTimeout.bind(Zs),e.clearTimeoutFn=Zs.clearTimeout.bind(Zs))}const tGe=1.33;function nGe(e){return typeof e=="string"?rGe(e):Math.ceil((e.byteLength||e.size)*tGe)}function rGe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function iGe(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function oGe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function Tre(){const e=OV(+new Date);return e!==PV?(IV=0,PV=e):e+"."+OV(IV++)}for(;oS{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};YWe(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,XWe(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Tre()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ql(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class ql extends Qr{constructor(t,n){super(),tA(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=Ere(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Are(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=ql.requestsCount++,ql.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=cGe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ql.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}ql.requestsCount=0;ql.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",MV);else if(typeof addEventListener=="function"){const e="onpagehide"in Zs?"pagehide":"unload";addEventListener(e,MV,!1)}}function MV(){for(let e in ql.requests)ql.requests.hasOwnProperty(e)&&ql.requests[e].abort()}const Bj=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),sS=Zs.WebSocket||Zs.MozWebSocket,DV=!0,fGe="arraybuffer",LV=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class hGe extends Nj{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=LV?{}:Ere(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=DV&&!LV?n?new sS(t,n):new sS(t):new sS(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const s={};try{DV&&this.ws.send(o)}catch{}i&&Bj(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Tre()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!sS}}class pGe extends Nj{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=QWe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=KWe();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:c})=>{l||(this.onPacket(c),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&Bj(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const mGe={websocket:hGe,webtransport:pGe,polling:dGe},gGe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vGe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function r5(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=gGe.exec(e||""),o={},s=14;for(;s--;)o[vGe[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=yGe(o,o.path),o.queryKey=bGe(o,o.query),o}function yGe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function bGe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Rre=class ym extends Qr{constructor(t,n={}){super(),this.binaryType=fGe,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=r5(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=r5(n.host).host),tA(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=oGe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Sre,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new mGe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&ym.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;ym.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ym.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const s=h=>{const p=new Error("probe error: "+h);p.transport=n.name,o(),this.emitReserved("upgradeError",p)};function l(){s("transport closed")}function c(){s("socket closed")}function d(h){n&&h.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",c),this.off("upgrading",d)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",c),this.once("upgrading",d),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",ym.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){ym.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Ire=Object.prototype.toString,SGe=typeof Blob=="function"||typeof Blob<"u"&&Ire.call(Blob)==="[object BlobConstructor]",EGe=typeof File=="function"||typeof File<"u"&&Ire.call(File)==="[object FileConstructor]";function $j(e){return wGe&&(e instanceof ArrayBuffer||_Ge(e))||SGe&&e instanceof Blob||EGe&&e instanceof File}function XS(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,l)=>r?s?o(s):i(l):i(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:hn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case hn.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case hn.EVENT:case hn.BINARY_EVENT:this.onevent(t);break;case hn.ACK:case hn.BINARY_ACK:this.onack(t);break;case hn.DISCONNECT:this.ondisconnect();break;case hn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:hn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:hn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}vv.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};vv.prototype.reset=function(){this.attempts=0};vv.prototype.setMin=function(e){this.ms=e};vv.prototype.setMax=function(e){this.max=e};vv.prototype.setJitter=function(e){this.jitter=e};class s5 extends Qr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,tA(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new vv({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||PGe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Rre(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Xa(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=Xa(n,"error",o);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Xa(t,"ping",this.onping.bind(this)),Xa(t,"data",this.ondata.bind(this)),Xa(t,"error",this.onerror.bind(this)),Xa(t,"close",this.onclose.bind(this)),Xa(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Bj(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Pre(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Pb={};function YS(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=xGe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=Pb[i]&&o in Pb[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let c;return l?c=new s5(r,t):(Pb[i]||(Pb[i]=new s5(r,t)),c=Pb[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(YS,{Manager:s5,Socket:Pre,io:YS,connect:YS});class MGe{constructor(t){Gp(this,"rpc");Gp(this,"socket");this.options=t,this.socket=YS(t.url),this.rpc=new Mj.JSONRPCClient(async n=>{const r=i=>{i.id===n.id&&(this.socket.off("response",r),this.rpc.receive(i))};this.socket.emit("request",n),this.socket.on("response",r)})}async connect(){this.socket.connect()}async disconnect(){this.socket.disconnect()}async call(t,n){return await this.rpc.request(t,n)}}const zj={socketio:{name:"socket.io",constructor:MGe},ipc:{name:"Web Worker",constructor:jWe},native:{name:"Internal",constructor:HWe}};function DGe(e){return zj[e].constructor}const Ore=ee.first(ee.keys(zj));function LGe(){const[{renderer:e},t]=Lu();return C.jsx(C.Fragment,{children:C.jsx(Dk,{editor:n=>C.jsx(CWe,{value:n}),icon:null,value:e,onChange:ee.debounce(n=>t(()=>({renderer:n})),300),addItemLabel:"Add Renderer",create:()=>({transport:Ore,url:"",disabled:!0}),extras:C.jsx($d,{icon:C.jsx(KK,{}),sx:{ml:2},onClick:()=>t(()=>({renderer:GQ})),children:"Reset to Defaults"})})})}function NGe(e){const[{connections:t}]=yk(),n=Lz(),[{remote:r}]=Lu(),i=ee.find(r,{url:e});return i&&!(i!=null&&i.disabled)?n({url:e})?"connected":t?"connecting":e?"error":"not-connected":"not-connected"}const BGe={connected:"success.light",connecting:"warning.light",error:"error.light","not-connected":"text.disabled"};function $Ge({value:e,onValueChange:t}){const n=R2e(e.url),r=NGe(e.url);function i(o){t==null||t(sk(e,o))}return C.jsx(C.Fragment,{children:C.jsxs(bn,{alignItems:"center",py:.5,children:[C.jsx(rte,{sx:{color:BGe[r]}}),C.jsx(Kr,{}),C.jsxs(dt,{flex:1,children:[C.jsx(zt,{children:n?`${n.name} ${n.version}`:ee.startCase(r)}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:(n==null?void 0:n.description)??((e==null?void 0:e.url)||"No URL")})]}),C.jsx(Kd,{title:`${e.disabled?"Enable":"Disable"} Connection`,children:C.jsx(dt,{children:C.jsx(Tg,{checked:!e.disabled,onChange:(o,s)=>i({disabled:!s})})})}),C.jsx(cj,{trigger:o=>C.jsx(Fm,{icon:C.jsx(ok,{}),label:"Edit Connection",onClick:o}),appBar:{children:C.jsx(lj,{children:"Edit Connection"})},children:C.jsxs(dt,{p:2.5,children:[C.jsx(X1,{value:e.url,onChange:o=>i({url:o.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(mx,{placeholder:"Connection Type",items:ee.entries(zj).map(([o,{name:s}])=>({value:o,label:s})),fullWidth:!0,value:e.transport,onChange:o=>i({transport:o})})]})})]})})}function FGe(){const[{remote:e},t]=Lu();return C.jsx(C.Fragment,{children:C.jsx(Dk,{editor:n=>C.jsx($Ge,{value:n}),icon:null,value:e,onChange:ee.debounce(n=>t(()=>({remote:n})),300),addItemLabel:"Add Solver",create:()=>({transport:Ore,url:"",disabled:!0}),extras:C.jsx($d,{icon:C.jsx(KK,{}),sx:{ml:2},onClick:()=>t(()=>({remote:WQ})),children:"Reset to Defaults"})})})}const BV=e=>`${e}x`;function zGe(){const{controls:e,onChange:t,state:n}=Du(),[{playbackRate:r=1,acrylic:i,theme:o="light",accentColor:s="teal"},l]=Lu(),[c,d]=I.useState("general");function f(p){return C.jsx(zt,{variant:"overline",color:"text.secondary",children:p})}function h(p){return C.jsx(zt,{variant:"body1",children:p})}return C.jsx(XQ,{value:c,children:C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Options,{children:C.jsxs(JQ,{onChange:(p,g)=>d(g),children:[C.jsx(Mm,{label:"General",value:"general"}),C.jsx(Mm,{label:"Connections",value:"connections"}),C.jsx(Mm,{label:"Renderers",value:"renderers"}),C.jsx(Mm,{label:"Map Parsers",value:"map-parsers"})]})}),C.jsx(Sn.Content,{children:C.jsx(bn,{vertical:!0,children:C.jsx(rv,{y:!0,children:C.jsxs(bn,{vertical:!0,pt:6,children:[C.jsx(Bm,{value:"general",children:C.jsxs(dt,{children:[f("Playback"),C.jsxs(bn,{alignItems:"center",children:[h("Playback Rate"),C.jsx(Kr,{flex:1}),C.jsx(H0e,{sx:{maxWidth:320,mr:2},marks:[1,2,5,10].map(p=>({value:p*cm,label:BV(p)})),step:1*cm,min:1*cm,max:10*cm,valueLabelFormat:p=>BV(p/cm),valueLabelDisplay:"auto",defaultValue:r,onChangeCommitted:(p,g)=>l(()=>({playbackRate:g}))})]}),f("UI"),C.jsxs(bn,{alignItems:"center",children:[h("Acrylic"),C.jsx(Kr,{flex:1}),C.jsx(Tg,{defaultChecked:!!i,onChange:(p,g)=>l(()=>({acrylic:g}))})]}),C.jsxs(bn,{alignItems:"center",children:[h("Dark Mode"),C.jsx(Kr,{flex:1}),C.jsx(Tg,{defaultChecked:o==="dark",onChange:(p,g)=>l(()=>({theme:g?"dark":"light"}))})]}),C.jsxs(bn,{alignItems:"center",children:[h("Accent"),C.jsx(Kr,{flex:1}),C.jsx(Xo,{value:s,items:ee.map(ee.keys(v_e),p=>({id:p,name:ee.startCase(p)})),showArrow:!0,onChange:p=>l(()=>({accentColor:p}))})]})]})}),C.jsx(Bm,{value:"connections",children:C.jsxs(dt,{children:[f("Solvers"),C.jsx(FGe,{})]})}),C.jsx(Bm,{value:"renderers",children:C.jsxs(dt,{children:[f("Renderers"),C.jsx(LGe,{})]})}),C.jsx(Bm,{value:"map-parsers",children:C.jsxs(dt,{children:[f("Map Parsers"),C.jsx(jGe,{})]})})]})})})}),C.jsx(Sn.Extras,{children:e})]})})}function jGe(){return C.jsx(yp,{children:ee.keys(bz).map(e=>C.jsx(Qm,{children:C.jsx(sl,{primary:e,secondary:"Internal"})},e))})}const nA=0,nf=1,yv=2,Mre=4;function Dre(e,t){return n=>e(t(n))}function UGe(e,t){return t(e)}function Lre(e,t){return n=>e(t,n)}function $V(e,t){return()=>e(t)}function rA(e,t){return t(e),e}function gr(...e){return e}function HGe(e){e()}function FV(e){return()=>e}function WGe(...e){return()=>{e.map(HGe)}}function jj(e){return e!==void 0}function bv(){}function jn(e,t){return e(nf,t)}function en(e,t){e(nA,t)}function Uj(e){e(yv)}function As(e){return e(Mre)}function St(e,t){return jn(e,Lre(t,nA))}function Ru(e,t){const n=e(nf,r=>{n(),t(r)});return n}function yn(){const e=[];return(t,n)=>{switch(t){case yv:e.splice(0,e.length);return;case nf:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case nA:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function et(e){let t=e;const n=yn();return(r,i)=>{switch(r){case nf:i(t);break;case nA:t=i;break;case Mre:return t}return n(r,i)}}function GGe(e){let t,n;const r=()=>t&&t();return function(i,o){switch(i){case nf:return o?n===o?void 0:(r(),n=o,t=jn(e,o),t):(r(),bv);case yv:r(),n=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function Ds(e){return rA(yn(),t=>St(e,t))}function To(e,t){return rA(et(t),n=>St(e,n))}function VGe(...e){return t=>e.reduceRight(UGe,t)}function Pe(e,...t){const n=VGe(...t);return(r,i)=>{switch(r){case nf:return jn(e,n(i));case yv:Uj(e);return}}}function Nre(e,t){return e===t}function hr(e=Nre){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ht(e){return t=>n=>{e(n)&&t(n)}}function lt(e){return t=>Dre(t,e)}function lu(e){return t=>()=>t(e)}function Nl(e,t){return n=>r=>n(t=e(t,r))}function Wg(e){return t=>n=>{e>0?e--:t(n)}}function vd(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function zV(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function an(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);jn(o,c=>{const d=n;n=n|l,t[s]=c,d!==i&&n===i&&r&&(r(),r=null)})}),o=>s=>{const l=()=>o([s].concat(t));n===i?l():r=l}}function jV(...e){return function(t,n){switch(t){case nf:return WGe(...e.map(r=>jn(r,n)));case yv:return;default:throw new Error(`unrecognized action ${t}`)}}}function Ut(e,t=Nre){return Pe(e,hr(t))}function yi(...e){const t=yn(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);jn(o,c=>{n[s]=c,r=r|l,r===i&&en(t,n)})}),function(o,s){switch(o){case nf:return r===i&&s(n),jn(t,s);case yv:return Uj(t);default:throw new Error(`unrecognized action ${o}`)}}}function $n(e,t=[],{singleton:n}={singleton:!0}){return{id:qGe(),constructor:e,dependencies:t,singleton:n}}const qGe=()=>Symbol();function XGe(e){const t=new Map,n=({id:r,constructor:i,dependencies:o,singleton:s})=>{if(s&&t.has(r))return t.get(r);const l=i(o.map(c=>n(c)));return s&&t.set(r,l),l};return n(e)}function YGe(e,t){const n={},r={};let i=0;const o=e.length;for(;i(S[_]=b=>{const x=y[t.methods[_]];en(x,b)},S),{})}function f(y){return s.reduce((S,_)=>(S[_]=GGe(y[t.events[_]]),S),{})}return{Component:de.forwardRef((y,S)=>{const{children:_,...b}=y,[x]=de.useState(()=>rA(XGe(e),A=>c(A,b))),[E]=de.useState($V(f,x));return aS(()=>{for(const A of s)A in b&&jn(E[A],b[A]);return()=>{Object.values(E).map(Uj)}},[b,E,x]),aS(()=>{c(x,b)}),de.useImperativeHandle(S,FV(d(x))),de.createElement(l.Provider,{value:x},n?de.createElement(n,YGe([...r,...i,...s],b),_):_)}),usePublisher:y=>de.useCallback(Lre(en,de.useContext(l)[y]),[y]),useEmitterValue:y=>{const _=de.useContext(l)[y],[b,x]=de.useState($V(As,_));return aS(()=>jn(_,E=>{E!==b&&x(FV(E))}),[_,b]),b},useEmitter:(y,S)=>{const b=de.useContext(l)[y];aS(()=>jn(b,S),[S,b])}}}const KGe=typeof document<"u"?de.useLayoutEffect:de.useEffect,QGe=KGe;var Ls=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Ls||{});const JGe={0:"debug",1:"log",2:"warn",3:"error"},ZGe=()=>typeof globalThis>"u"?window:globalThis,rf=$n(()=>{const e=et(3);return{log:et((n,r,i=1)=>{var o;const s=(o=ZGe().VIRTUOSO_LOG_LEVEL)!=null?o:As(e);i>=s&&console[JGe[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Hj(e,t=!0){const n=de.useRef(null);let r=i=>{};if(typeof ResizeObserver<"u"){const i=de.useMemo(()=>new ResizeObserver(o=>{const s=o[0].target;s.offsetParent!==null&&e(s)}),[e]);r=o=>{o&&t?(i.observe(o),n.current=o):(n.current&&i.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function Hp(e,t=!0){return Hj(e,t).callbackRef}function e9e(e,t,n,r,i,o,s){const l=de.useCallback(c=>{const d=t9e(c.children,t,"offsetHeight",i);let f=c.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const h=f.lastElementChild.dataset.viewportType==="window",p=s?s.scrollTop:h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,g=s?s.scrollHeight:h?document.documentElement.scrollHeight:f.scrollHeight,v=s?s.offsetHeight:h?window.innerHeight:f.offsetHeight;r({scrollTop:Math.max(p,0),scrollHeight:g,viewportHeight:v}),o==null||o(n9e("row-gap",getComputedStyle(c).rowGap,i)),d!==null&&e(d)},[e,t,i,o,s,r]);return Hj(l,n)}function t9e(e,t,n,r){const i=e.length;if(i===0)return null;const o=[];for(let s=0;s{const p=h.target,g=p===window||p===document,v=g?window.pageYOffset||document.documentElement.scrollTop:p.scrollTop,y=g?document.documentElement.scrollHeight:p.scrollHeight,S=g?window.innerHeight:p.offsetHeight,_=()=>{e({scrollTop:Math.max(v,0),scrollHeight:y,viewportHeight:S})};h.suppressFlushSync?_():Om.flushSync(_),s.current!==null&&(v===s.current||v<=0||v===y-S)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);de.useEffect(()=>{const h=i||o.current;return r(i||o.current),c({target:h,suppressFlushSync:!0}),h.addEventListener("scroll",c,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",c)}},[o,c,n,r,i]);function d(h){const p=o.current;if(!p||"offsetHeight"in p&&p.offsetHeight===0)return;const g=h.behavior==="smooth";let v,y,S;p===window?(y=Math.max(Wd(document.documentElement,"height"),document.documentElement.scrollHeight),v=window.innerHeight,S=document.documentElement.scrollTop):(y=p.scrollHeight,v=Wd(p,"height"),S=p.scrollTop);const _=y-v;if(h.top=Math.ceil(Math.max(Math.min(_,h.top),0)),$re(v,y)||h.top===S){e({scrollTop:S,scrollHeight:y,viewportHeight:v}),g&&t(!0);return}g?(s.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,p.scrollTo(h)}function f(h){o.current.scrollBy(h)}return{scrollerRef:o,scrollByCallback:f,scrollToCallback:d}}const Po=$n(()=>{const e=yn(),t=yn(),n=et(0),r=yn(),i=et(0),o=yn(),s=yn(),l=et(0),c=et(0),d=et(0),f=et(0),h=yn(),p=yn(),g=et(!1);return St(Pe(e,lt(({scrollTop:v})=>v)),t),St(Pe(e,lt(({scrollHeight:v})=>v)),s),St(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:o,headerHeight:l,fixedHeaderHeight:c,fixedFooterHeight:d,footerHeight:f,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:h,scrollBy:p,statefulScrollTop:i,deviation:n,scrollingInProgress:g}},[],{singleton:!0}),R1={lvl:0};function zre(e,t,n,r=R1,i=R1){return{k:e,v:t,lvl:n,l:r,r:i}}function Kn(e){return e===R1}function cg(){return R1}function a5(e,t){if(Kn(e))return R1;const{k:n,l:r,r:i}=e;if(t===n){if(Kn(r))return i;if(Kn(i))return r;{const[o,s]=jre(r);return KS(ui(e,{k:o,v:s,l:Ure(r)}))}}else return tt&&(l=l.concat(l5(o,t,n))),r>=t&&r<=n&&l.push({k:r,v:i}),r<=n&&(l=l.concat(l5(s,t,n))),l}function Kh(e){return Kn(e)?[]:[...Kh(e.l),{k:e.k,v:e.v},...Kh(e.r)]}function jre(e){return Kn(e.r)?[e.k,e.v]:jre(e.r)}function Ure(e){return Kn(e.r)?e.l:KS(ui(e,{r:Ure(e.r)}))}function ui(e,t){return zre(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function QB(e){return Kn(e)||e.lvl>e.r.lvl}function UV(e){return c5(Wre(e))}function KS(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(QB(t))return Wre(ui(e,{lvl:r-1}));if(!Kn(t)&&!Kn(t.r))return ui(t.r,{l:ui(t,{r:t.r.l}),r:ui(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(QB(e))return c5(ui(e,{lvl:r-1}));if(!Kn(n)&&!Kn(n.l)){const i=n.l,o=QB(i)?n.lvl-1:n.lvl;return ui(i,{l:ui(e,{r:i.l,lvl:r-1}),r:c5(ui(n,{l:i.r,lvl:o})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function iA(e,t,n){if(Kn(e))return[];const r=ml(e,t)[0];return r9e(l5(e,r,n))}function Hre(e,t){const n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]);const o=[];for(let s=1;s({index:t,value:n}))}function c5(e){const{r:t,lvl:n}=e;return!Kn(t)&&!Kn(t.r)&&t.lvl===n&&t.r.lvl===n?ui(t,{l:ui(e,{r:t.l}),lvl:n+1}):e}function Wre(e){const{l:t}=e;return!Kn(t)&&t.lvl===e.lvl?ui(t,{r:ui(e,{l:t.r})}):e}function PC(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const o=Math.floor((r+i)/2),s=e[o],l=n(s,t);if(l===0)return o;if(l===-1){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Gre(e,t,n){return e[PC(e,t,n)]}function i9e(e,t,n,r){const i=PC(e,t,r),o=PC(e,n,r,i);return e.slice(i,o+1)}const Wj=$n(()=>({recalcInProgress:et(!1)}),[],{singleton:!0});function o9e(e){const{size:t,startIndex:n,endIndex:r}=e;return i=>i.start===n&&(i.end===r||i.end===1/0)&&i.value===t}function HV(e,t){let n=0,r=0;for(;n=f||i===p)&&(e=a5(e,f)):(d=p!==i,c=!0),h>s&&s>=f&&p!==i&&(e=Cs(e,s+1,p));d&&(e=Cs(e,o,i))}return[e,n]}function a9e(){return{offsetTree:[],sizeTree:cg(),groupOffsetTree:cg(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Gj({index:e},t){return t===e?0:t0&&(t=Math.max(t,Gre(e,r,Gj).offset)),Hre(i9e(e,t,n,l9e),c9e)}function u5(e,t,n,r){let i=e,o=0,s=0,l=0,c=0;if(t!==0){c=PC(i,t-1,Gj),l=i[c].offset;const f=ml(n,t-1);o=f[0],s=f[1],i.length&&i[c].size===ml(n,t)[1]&&(c-=1),i=i.slice(0,c+1)}else i=[];for(const{start:d,value:f}of iA(n,t,1/0)){const h=d-o,p=h*s+l+h*r;i.push({offset:p,size:f,index:d}),o=d,l=p,s=f}return{offsetTree:i,lastIndex:o,lastOffset:l,lastSize:s}}function d9e(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Ls.DEBUG);const o=e.sizeTree;let s=o,l=0;if(n.length>0&&Kn(o)&&t.length===2){const p=t[0].size,g=t[1].size;s=n.reduce((v,y)=>Cs(Cs(v,y,p),y+1,g),s)}else[s,l]=s9e(s,t);if(s===o)return e;const{offsetTree:c,lastIndex:d,lastSize:f,lastOffset:h}=u5(e.offsetTree,l,s,i);return{sizeTree:s,offsetTree:c,lastIndex:d,lastOffset:h,lastSize:f,groupOffsetTree:n.reduce((p,g)=>Cs(p,g,P1(g,c,i)),cg()),groupIndices:n}}function P1(e,t,n){if(t.length===0)return 0;const{offset:r,index:i,size:o}=Gre(t,e,Gj),s=e-i,l=o*s+(s-1)*n+r;return l>0?l+n:l}function f9e(e){return typeof e.groupIndex<"u"}function Vre(e,t,n){if(f9e(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=qre(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function qre(e,t){if(!oA(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function oA(e){return!Kn(e.groupOffsetTree)}function h9e(e){return Kh(e).map(({k:t,v:n},r,i)=>{const o=i[r+1],s=o?o.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const p9e={offsetHeight:"height",offsetWidth:"width"},sc=$n(([{log:e},{recalcInProgress:t}])=>{const n=yn(),r=yn(),i=To(r,0),o=yn(),s=yn(),l=et(0),c=et([]),d=et(void 0),f=et(void 0),h=et((A,R)=>Wd(A,p9e[R])),p=et(void 0),g=et(0),v=a9e(),y=To(Pe(n,an(c,e,g),Nl(d9e,v),hr()),v),S=To(Pe(c,hr(),Nl((A,R)=>({prev:A.current,current:R}),{prev:[],current:[]}),lt(({prev:A})=>A)),[]);St(Pe(c,Ht(A=>A.length>0),an(y,g),lt(([A,R,k])=>{const O=A.reduce((L,N,H)=>Cs(L,N,P1(N,R.offsetTree,k)||H),cg());return{...R,groupIndices:A,groupOffsetTree:O}})),y),St(Pe(r,an(y),Ht(([A,{lastIndex:R}])=>A[{startIndex:A,endIndex:R,size:k}])),n),St(d,f);const _=To(Pe(d,lt(A=>A===void 0)),!0);St(Pe(f,Ht(A=>A!==void 0&&Kn(As(y).sizeTree)),lt(A=>[{startIndex:0,endIndex:0,size:A}])),n);const b=Ds(Pe(n,an(y),Nl(({sizes:A},[R,k])=>({changed:k!==A,sizes:k}),{changed:!1,sizes:v}),lt(A=>A.changed)));jn(Pe(l,Nl((A,R)=>({diff:A.prev-R,prev:R}),{diff:0,prev:0}),lt(A=>A.diff)),A=>{const{groupIndices:R}=As(y);if(A>0)en(t,!0),en(o,A+HV(A,R));else if(A<0){const k=As(S);k.length>0&&(A-=HV(-A,k)),en(s,A)}}),jn(Pe(l,an(e)),([A,R])=>{A<0&&R("`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:l},Ls.ERROR)});const x=Ds(o);St(Pe(o,an(y),lt(([A,R])=>{const k=R.groupIndices.length>0,O=[],L=R.lastSize;if(k){const N=I1(R.sizeTree,0);let H=0,W=0;for(;H{let G=F.ranges;return F.prevSize!==0&&(G=[...F.ranges,{startIndex:F.prevIndex,endIndex:j+A-1,size:F.prevSize}]),{ranges:G,prevIndex:j+A,prevSize:V}},{ranges:O,prevIndex:A,prevSize:0}).ranges}return Kh(R.sizeTree).reduce((N,{k:H,v:W})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:H+A-1,size:N.prevSize}],prevIndex:H+A,prevSize:W}),{ranges:[],prevIndex:0,prevSize:L}).ranges})),n);const E=Ds(Pe(s,an(y,g),lt(([A,{offsetTree:R},k])=>{const O=-A;return P1(O,R,k)})));return St(Pe(s,an(y,g),lt(([A,R,k])=>{if(R.groupIndices.length>0){if(Kn(R.sizeTree))return R;let L=cg();const N=As(S);let H=0,W=0,z=0;for(;H<-A;){z=N[W];const F=N[W+1]-z-1;W++,H+=F+1}if(L=Kh(R.sizeTree).reduce((F,{k:j,v:V})=>Cs(F,Math.max(0,j+A),V),L),H!==-A){const F=I1(R.sizeTree,z);L=Cs(L,0,F);const j=ml(R.sizeTree,-A+1)[1];L=Cs(L,1,j)}return{...R,sizeTree:L,...u5(R.offsetTree,0,L,k)}}else{const L=Kh(R.sizeTree).reduce((N,{k:H,v:W})=>Cs(N,Math.max(0,H+A),W),cg());return{...R,sizeTree:L,...u5(R.offsetTree,0,L,k)}}})),y),{data:p,totalCount:r,sizeRanges:n,groupIndices:c,defaultItemSize:f,fixedItemSize:d,unshiftWith:o,shiftWith:s,shiftWithOffset:E,beforeUnshiftWith:x,firstItemIndex:l,gap:g,sizes:y,listRefresh:b,statefulTotalCount:i,trackItemSizes:_,itemSize:h}},gr(rf,Wj),{singleton:!0}),m9e=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Xre(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!m9e)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const _w=$n(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:i,viewportHeight:o,scrollTo:s,smoothScrollTargetReached:l,headerHeight:c,footerHeight:d,fixedHeaderHeight:f,fixedFooterHeight:h},{log:p}])=>{const g=yn(),v=et(0);let y=null,S=null,_=null;function b(){y&&(y(),y=null),_&&(_(),_=null),S&&(clearTimeout(S),S=null),en(i,!1)}return St(Pe(g,an(e,o,t,v,c,d,p),an(r,f,h),lt(([[x,E,A,R,k,O,L,N],H,W,z])=>{const D=Xre(x),{align:F,behavior:j,offset:V}=D,G=R-1,K=Vre(D,E,G);let Y=P1(K,E.offsetTree,H)+O;F==="end"?(Y+=W+ml(E.sizeTree,K)[1]-A+z,K===G&&(Y+=L)):F==="center"?Y+=(W+ml(E.sizeTree,K)[1]-A+z)/2:Y-=k,V&&(Y+=V);const J=ie=>{b(),ie?(N("retrying to scroll to",{location:x},Ls.DEBUG),en(g,x)):N("list did not change, scroll successful",{},Ls.DEBUG)};if(b(),j==="smooth"){let ie=!1;_=jn(n,ce=>{ie=ie||ce}),y=Ru(l,()=>{J(ie)})}else y=Ru(Pe(n,g9e(150)),J);return S=setTimeout(()=>{b()},1200),en(i,!0),N("scrolling from index to",{index:K,top:Y,behavior:j},Ls.DEBUG),{top:Y,behavior:j}})),s),{scrollToIndex:g,topListHeight:v}},gr(sc,Po,rf),{singleton:!0});function g9e(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const O1="up",Ax="down",v9e="none",y9e={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},b9e=0,Sw=$n(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:o}])=>{const s=et(!1),l=et(!0),c=yn(),d=yn(),f=et(4),h=et(b9e),p=To(Pe(jV(Pe(Ut(t),Wg(1),lu(!0)),Pe(Ut(t),Wg(1),lu(!1),zV(100))),hr()),!1),g=To(Pe(jV(Pe(o,lu(!0)),Pe(o,lu(!1),zV(200))),hr()),!1);St(Pe(yi(Ut(t),Ut(h)),lt(([b,x])=>b<=x),hr()),l),St(Pe(l,vd(50)),d);const v=Ds(Pe(yi(e,Ut(n),Ut(r),Ut(i),Ut(f)),Nl((b,[{scrollTop:x,scrollHeight:E},A,R,k,O])=>{const L=x+A-E>-O,N={viewportHeight:A,scrollTop:x,scrollHeight:E};if(L){let W,z;return x>b.state.scrollTop?(W="SCROLLED_DOWN",z=b.state.scrollTop-x):(W="SIZE_DECREASED",z=b.state.scrollTop-x||b.scrollTopDelta),{atBottom:!0,state:N,atBottomBecause:W,scrollTopDelta:z}}let H;return N.scrollHeight>b.state.scrollHeight?H="SIZE_INCREASED":Ab&&b.atBottom===x.atBottom))),y=To(Pe(e,Nl((b,{scrollTop:x,scrollHeight:E,viewportHeight:A})=>{if($re(b.scrollHeight,E))return{scrollTop:x,scrollHeight:E,jump:0,changed:!1};{const R=E-(x+A)<1;return b.scrollTop!==x&&R?{scrollHeight:E,scrollTop:x,jump:b.scrollTop-x,changed:!0}:{scrollHeight:E,scrollTop:x,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),Ht(b=>b.changed),lt(b=>b.jump)),0);St(Pe(v,lt(b=>b.atBottom)),s),St(Pe(s,vd(50)),c);const S=et(Ax);St(Pe(e,lt(({scrollTop:b})=>b),hr(),Nl((b,x)=>As(g)?{direction:b.direction,prevScrollTop:x}:{direction:xb.direction)),S),St(Pe(e,vd(50),lu(v9e)),S);const _=et(0);return St(Pe(p,Ht(b=>!b),lu(0)),_),St(Pe(t,vd(100),an(p),Ht(([b,x])=>!!x),Nl(([b,x],[E])=>[x,E],[0,0]),lt(([b,x])=>x-b)),_),{isScrolling:p,isAtTop:l,isAtBottom:s,atBottomState:v,atTopStateChange:d,atBottomStateChange:c,scrollDirection:S,atBottomThreshold:f,atTopThreshold:h,scrollVelocity:_,lastJumpDueToItemResize:y}},gr(Po)),of=$n(([{log:e}])=>{const t=et(!1),n=Ds(Pe(t,Ht(r=>r),hr()));return jn(t,r=>{r&&As(e)("props updated",{},Ls.DEBUG)}),{propsReady:t,didMount:n}},gr(rf),{singleton:!0});function Vj(e,t){e==0?t():requestAnimationFrame(()=>Vj(e-1,t))}function qj(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ew=$n(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:i},{didMount:o}])=>{const s=et(!0),l=et(0),c=et(!1);return St(Pe(o,an(l),Ht(([d,f])=>!!f),lu(!1)),s),jn(Pe(yi(t,o),an(s,e,n,c),Ht(([[,d],f,{sizeTree:h},p,g])=>d&&(!Kn(h)||jj(p))&&!f&&!g),an(l)),([,d])=>{en(c,!0),Vj(3,()=>{Ru(r,()=>en(s,!0)),en(i,d)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:l}},gr(sc,Po,_w,of),{singleton:!0});function WV(e){return e?e==="smooth"?"smooth":"auto":!1}const x9e=(e,t)=>typeof e=="function"?WV(e(t)):t&&WV(e),w9e=$n(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:i},{scrolledToInitialItem:o},{propsReady:s,didMount:l},{log:c},{scrollingInProgress:d}])=>{const f=et(!1),h=yn();let p=null;function g(y){en(i,{index:"LAST",align:"end",behavior:y})}jn(Pe(yi(Pe(Ut(e),Wg(1)),l),an(Ut(f),n,o,d),lt(([[y,S],_,b,x,E])=>{let A=S&&x,R="auto";return A&&(R=x9e(_,b||E),A=A&&!!R),{totalCount:y,shouldFollow:A,followOutputBehavior:R}}),Ht(({shouldFollow:y})=>y)),({totalCount:y,followOutputBehavior:S})=>{p&&(p(),p=null),p=Ru(t,()=>{As(c)("following output to ",{totalCount:y},Ls.DEBUG),g(S),p=null})});function v(y){const S=Ru(r,_=>{y&&!_.atBottom&&_.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(As(c)("scrolling to bottom due to increased size",{},Ls.DEBUG),g("auto"))});setTimeout(S,100)}return jn(Pe(yi(Ut(f),e,s),Ht(([y,,S])=>y&&S),Nl(({value:y},[,S])=>({refreshed:y===S,value:S}),{refreshed:!1,value:0}),Ht(({refreshed:y})=>y),an(f,e)),([,y])=>{v(y!==!1)}),jn(h,()=>{v(As(f)!==!1)}),jn(yi(Ut(f),r),([y,S])=>{y&&!S.atBottom&&S.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&g("auto")}),{followOutput:f,autoscrollToBottom:h}},gr(sc,Sw,_w,Ew,of,rf,Po));function _9e(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Yre=$n(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:i}])=>{const o=yn(),s=yn(),l=Ds(Pe(o,lt(_9e)));return St(Pe(l,lt(c=>c.totalCount)),e),St(Pe(l,lt(c=>c.groupIndices)),t),St(Pe(yi(r,n,i),Ht(([c,d])=>oA(d)),lt(([c,d,f])=>ml(d.groupOffsetTree,Math.max(c-f,0),"v")[0]),hr(),lt(c=>[c])),s),{groupCounts:o,topItemsIndexes:s}},gr(sc,Po));function M1(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Kre(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const OC="top",MC="bottom",GV="none";function VV(e,t,n){return typeof e=="number"?n===O1&&t===OC||n===Ax&&t===MC?e:0:n===O1?t===OC?e.main:e.reverse:t===MC?e.main:e.reverse}function qV(e,t){return typeof e=="number"?e:e[t]||0}const Xj=$n(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{const o=yn(),s=et(0),l=et(0),c=et(0),d=To(Pe(yi(Ut(e),Ut(t),Ut(r),Ut(o,M1),Ut(c),Ut(s),Ut(i),Ut(n),Ut(l)),lt(([f,h,p,[g,v],y,S,_,b,x])=>{const E=f-b,A=S+_,R=Math.max(p-E,0);let k=GV;const O=qV(x,OC),L=qV(x,MC);return g-=b,g+=p+_,v+=p+_,v-=b,g>f+A-O&&(k=O1),vf!=null),hr(M1)),[0,0]);return{listBoundary:o,overscan:c,topListHeight:s,increaseViewportBy:l,visibleRange:d}},gr(Po),{singleton:!0});function S9e(e,t,n){if(oA(t)){const r=qre(e,t);return[{index:ml(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const JB={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function XV(e,t,n){if(e.length===0)return[];if(!oA(t))return e.map(d=>({...d,index:d.index+n,originalIndex:d.index}));const r=e[0].index,i=e[e.length-1].index,o=[],s=iA(t.groupOffsetTree,r,i);let l,c=0;for(const d of e){(!l||l.end0){d=e[0].offset;const y=e[e.length-1];f=y.offset+y.size}const h=n-c,p=l+h*s+(h-1)*r,g=d,v=p-f;return{items:XV(e,i,o),topItems:XV(t,i,o),topListHeight:t.reduce((y,S)=>S.size+y,0),offsetTop:d,offsetBottom:v,top:g,bottom:f,totalCount:n,firstItemIndex:o}}function Qre(e,t,n,r,i,o){let s=0;if(n.groupIndices.length>0)for(const f of n.groupIndices){if(f-s>=e)break;s++}const l=e+s,c=qj(t,l),d=Array.from({length:l}).map((f,h)=>({index:h+c,size:0,offset:0,data:o[h+c]}));return QS(d,[],l,i,n,r)}const Wp=$n(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:i},o,{visibleRange:s,listBoundary:l,topListHeight:c},{scrolledToInitialItem:d,initialTopMostItemIndex:f},{topListHeight:h},p,{didMount:g},{recalcInProgress:v}])=>{const y=et([]),S=et(0),_=yn();St(o.topItemsIndexes,y);const b=To(Pe(yi(g,v,Ut(s,M1),Ut(t),Ut(e),Ut(f),d,Ut(y),Ut(r),Ut(i),n),Ht(([R,k,,O,,,,,,,L])=>{const N=L&&L.length!==O;return R&&!k&&!N}),lt(([,,[R,k],O,L,N,H,W,z,D,F])=>{const j=L,{sizeTree:V,offsetTree:G}=j,K=As(S);if(O===0)return{...JB,totalCount:O};if(R===0&&k===0)return K===0?{...JB,totalCount:O}:Qre(K,N,L,z,D,F||[]);if(Kn(V))return K>0?null:QS(S9e(qj(N,O),j,F),[],O,D,j,z);const Y=[];if(W.length>0){const se=W[0],Q=W[W.length-1];let ae=0;for(const le of iA(V,se,Q)){const he=le.value,pe=Math.max(le.start,se),ve=Math.min(le.end,Q);for(let ye=pe;ye<=ve;ye++)Y.push({index:ye,size:he,offset:ae,data:F&&F[ye]}),ae+=he}}if(!H)return QS([],Y,O,D,j,z);const J=W.length>0?W[W.length-1]+1:0,ie=u9e(G,R,k,J);if(ie.length===0)return null;const ce=O-1,ue=rA([],se=>{for(const Q of ie){const ae=Q.value;let le=ae.offset,he=Q.start;const pe=ae.size;if(ae.offset=k);ye++)se.push({index:ye,size:pe,offset:le,data:F&&F[ye]}),le+=pe+D}});return QS(ue,Y,O,D,j,z)}),Ht(R=>R!==null),hr()),JB);St(Pe(n,Ht(jj),lt(R=>R==null?void 0:R.length)),t),St(Pe(b,lt(R=>R.topListHeight)),h),St(h,c),St(Pe(b,lt(R=>[R.top,R.bottom])),l),St(Pe(b,lt(R=>R.items)),_);const x=Ds(Pe(b,Ht(({items:R})=>R.length>0),an(t,n),Ht(([{items:R},k])=>R[R.length-1].originalIndex===k-1),lt(([,R,k])=>[R-1,k]),hr(M1),lt(([R])=>R))),E=Ds(Pe(b,vd(200),Ht(({items:R,topItems:k})=>R.length>0&&R[0].originalIndex===k.length),lt(({items:R})=>R[0].index),hr())),A=Ds(Pe(b,Ht(({items:R})=>R.length>0),lt(({items:R})=>{let k=0,O=R.length-1;for(;R[k].type==="group"&&kk;)O--;return{startIndex:R[k].index,endIndex:R[O].index}}),hr(Kre)));return{listState:b,topItemsIndexes:y,endReached:x,startReached:E,rangeChanged:A,itemsRendered:_,initialItemCount:S,...p}},gr(sc,Yre,Xj,Ew,_w,Sw,of,Wj),{singleton:!0}),E9e=$n(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:l}])=>(St(Pe(l,an(o),Ht(([,c])=>c!==0),an(i,e,t,r,n),lt(([[,c],d,f,h,p,g=[]])=>Qre(c,d,f,h,p,g))),s),{}),gr(sc,Ew,Wp,of),{singleton:!0}),Jre=$n(([{scrollVelocity:e}])=>{const t=et(!1),n=yn(),r=et(!1);return St(Pe(e,an(r,t,n),Ht(([i,o])=>!!o),lt(([i,o,s,l])=>{const{exit:c,enter:d}=o;if(s){if(c(i,l))return!1}else if(d(i,l))return!0;return s}),hr()),t),jn(Pe(yi(t,e,n),an(r)),([[i,o,s],l])=>i&&l&&l.change&&l.change(o,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},gr(Sw),{singleton:!0}),C9e=$n(([{topItemsIndexes:e}])=>{const t=et(0);return St(Pe(t,Ht(n=>n>0),lt(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},gr(Wp)),Zre=$n(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{const o=yn(),s=To(Pe(yi(e,r,t,n,i),lt(([l,c,d,f,h])=>l+c+d+f+h.offsetBottom+h.bottom)),0);return St(Ut(s),o),{totalListHeight:s,totalListHeightChanged:o}},gr(Po,Wp),{singleton:!0});function eie(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const T9e=eie(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),k9e=$n(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:i,isAtBottom:o,scrollDirection:s,lastJumpDueToItemResize:l},{listState:c},{beforeUnshiftWith:d,shiftWithOffset:f,sizes:h,gap:p},{log:g},{recalcInProgress:v}])=>{const y=Ds(Pe(c,an(l),Nl(([,_,b,x],[{items:E,totalCount:A,bottom:R,offsetBottom:k},O])=>{const L=R+k;let N=0;return b===A&&_.length>0&&E.length>0&&(E[0].originalIndex===0&&_[0].originalIndex===0||(N=L-x,N!==0&&(N+=O))),[N,E,A,L]},[0,[],0,0]),Ht(([_])=>_!==0),an(t,s,r,o,g,v),Ht(([,_,b,x,,,E])=>!E&&!x&&_!==0&&b===O1),lt(([[_],,,,,b])=>(b("Upward scrolling compensation",{amount:_},Ls.DEBUG),_))));function S(_){_>0?(en(e,{top:-_,behavior:"auto"}),en(n,0)):(en(n,0),en(e,{top:-_,behavior:"auto"}))}return jn(Pe(y,an(n,i)),([_,b,x])=>{x&&T9e()?en(n,b-_):S(-_)}),jn(Pe(yi(To(i,!1),n,v),Ht(([_,b,x])=>!_&&!x&&b!==0),lt(([_,b])=>b),vd(1)),S),St(Pe(f,lt(_=>({top:-_}))),e),jn(Pe(d,an(h,p),lt(([_,{lastSize:b,groupIndices:x,sizeTree:E},A])=>{function R(k){return k*(b+A)}if(x.length===0)return R(_);{let k=0;const O=I1(E,0);let L=0,N=0;for(;L<_;){L++,k+=O;let H=x.length===N+1?1/0:x[N+1]-x[N]-1;L+H>_&&(k-=O,H=_-L+1),L+=H,k+=R(H),N++}return k}})),_=>{en(n,_),requestAnimationFrame(()=>{en(e,{top:_}),requestAnimationFrame(()=>{en(n,0),en(v,!1)})})}),{deviation:n}},gr(Po,Sw,Wp,sc,rf,Wj)),A9e=$n(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=et(0);return jn(Pe(e,an(r),Ht(([,i])=>i!==0),lt(([,i])=>({top:i}))),i=>{Ru(Pe(n,Wg(1),Ht(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{en(t,i)})})}),{initialScrollTop:r}},gr(of,Po,Wp),{singleton:!0}),R9e=$n(([{viewportHeight:e},{totalListHeight:t}])=>{const n=et(!1),r=To(Pe(yi(n,e,t),Ht(([i])=>i),lt(([,i,o])=>Math.max(0,i-o)),vd(0),hr()),0);return{alignToBottom:n,paddingTopAddition:r}},gr(Po,Zre),{singleton:!0}),Yj=$n(([{scrollTo:e,scrollContainerState:t}])=>{const n=yn(),r=yn(),i=yn(),o=et(!1),s=et(void 0);return St(Pe(yi(n,r),lt(([{viewportHeight:l,scrollTop:c,scrollHeight:d},{offsetTop:f}])=>({scrollTop:Math.max(0,c-f),scrollHeight:d,viewportHeight:l}))),t),St(Pe(e,an(r),lt(([l,{offsetTop:c}])=>({...l,top:l.top+c}))),i),{useWindowScroll:o,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},gr(Po)),I9e=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:o,...s}})=>er?{...s,behavior:i,align:o??"end"}:null,P9e=$n(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:o,fixedHeaderHeight:s,fixedFooterHeight:l,scrollingInProgress:c},{scrollToIndex:d}])=>{const f=yn();return St(Pe(f,an(e,i,t,o,s,l,r),an(n),lt(([[h,p,g,v,y,S,_,b],x])=>{const{done:E,behavior:A,align:R,calculateViewLocation:k=I9e,...O}=h,L=Vre(h,p,v-1),N=P1(L,p.offsetTree,x)+y+S,H=N+ml(p.sizeTree,L)[1],W=b+S,z=b+g-_,D=k({itemTop:N,itemBottom:H,viewportTop:W,viewportBottom:z,locationParams:{behavior:A,align:R,...O}});return D?E&&Ru(Pe(c,Ht(F=>F===!1),Wg(As(c)?1:2)),E):E&&E(),D}),Ht(h=>h!==null)),d),{scrollIntoView:f}},gr(sc,Po,_w,Wp,rf),{singleton:!0}),O9e=$n(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=yn(),d=et(void 0),f=et(null),h=et(null);return St(s,f),St(l,h),jn(Pe(c,an(e,n,o,f,h)),([p,g,v,y,S,_])=>{const b=h9e(g.sizeTree);y&&S!==null&&_!==null&&(v=S.scrollTop-_.offsetTop),p({ranges:b,scrollTop:v})}),St(Pe(d,Ht(jj),lt(M9e)),r),St(Pe(i,an(d),Ht(([,p])=>p!==void 0),hr(),lt(([,p])=>p.ranges)),t),{getState:c,restoreStateFrom:d}},gr(sc,Po,Ew,of,Yj));function M9e(e){return{offset:e.scrollTop,index:0,align:"start"}}const D9e=$n(([e,t,n,r,i,o,s,l,c,d])=>({...e,...t,...n,...r,...i,...o,...s,...l,...c,...d}),gr(Xj,E9e,of,Jre,Zre,A9e,R9e,Yj,P9e,rf)),L9e=$n(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:i,itemSize:o,data:s,firstItemIndex:l,groupIndices:c,statefulTotalCount:d,gap:f,sizes:h},{initialTopMostItemIndex:p,scrolledToInitialItem:g},v,y,S,{listState:_,topItemsIndexes:b,...x},{scrollToIndex:E},A,{topItemCount:R},{groupCounts:k},O])=>(St(x.rangeChanged,O.scrollSeekRangeChanged),St(Pe(O.windowViewportRect,lt(L=>L.visibleHeight)),v.viewportHeight),{totalCount:e,data:s,firstItemIndex:l,sizeRanges:t,initialTopMostItemIndex:p,scrolledToInitialItem:g,topItemsIndexes:b,topItemCount:R,groupCounts:k,fixedItemHeight:n,defaultItemHeight:r,gap:f,...S,statefulTotalCount:d,listState:_,scrollToIndex:E,trackItemSizes:i,itemSize:o,groupIndices:c,...x,...O,...v,sizes:h,...y}),gr(sc,Ew,Po,O9e,w9e,Wp,_w,k9e,C9e,Yre,D9e)),ZB="-webkit-sticky",YV="sticky",tie=eie(()=>{if(typeof document>"u")return YV;const e=document.createElement("div");return e.style.position=ZB,e.style.position===ZB?ZB:YV});function nie(e,t){const n=de.useRef(null),r=de.useCallback(l=>{if(l===null||!l.offsetParent)return;const c=l.getBoundingClientRect(),d=c.width;let f,h;if(t){const p=t.getBoundingClientRect(),g=c.top-p.top;f=p.height-Math.max(0,g),h=g+t.scrollTop}else f=window.innerHeight-Math.max(0,c.top),h=c.top+window.pageYOffset;n.current={offsetTop:h,visibleHeight:f,visibleWidth:d},e(n.current)},[e,t]),{callbackRef:i,ref:o}=Hj(r),s=de.useCallback(()=>{r(o.current)},[r,o]);return de.useEffect(()=>{if(t){t.addEventListener("scroll",s);const l=new ResizeObserver(s);return l.observe(t),()=>{t.removeEventListener("scroll",s),l.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),i}const rie=de.createContext(void 0),iie=de.createContext(void 0);function oie(e){return e}const N9e=$n(()=>{const e=et(c=>`Item ${c}`),t=et(null),n=et(c=>`Group ${c}`),r=et({}),i=et(oie),o=et("div"),s=et(bv),l=(c,d=null)=>To(Pe(r,lt(f=>f[c]),hr()),d);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:i,headerFooterTag:o,scrollerRef:s,FooterComponent:l("Footer"),HeaderComponent:l("Header"),TopItemListComponent:l("TopItemList"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),GroupComponent:l("Group","div"),ScrollerComponent:l("Scroller","div"),EmptyPlaceholder:l("EmptyPlaceholder"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder")}}),B9e=$n(([e,t])=>({...e,...t}),gr(L9e,N9e)),$9e=({height:e})=>de.createElement("div",{style:{height:e}}),F9e={position:tie(),zIndex:1,overflowAnchor:"none"},z9e={overflowAnchor:"none"},KV=de.memo(function({showTopList:t=!1}){const n=mn("listState"),r=aa("sizeRanges"),i=mn("useWindowScroll"),o=mn("customScrollParent"),s=aa("windowScrollContainerState"),l=aa("scrollContainerState"),c=o||i?s:l,d=mn("itemContent"),f=mn("context"),h=mn("groupContent"),p=mn("trackItemSizes"),g=mn("itemSize"),v=mn("log"),y=aa("gap"),{callbackRef:S}=e9e(r,g,p,t?bv:c,v,y,o),[_,b]=de.useState(0);Kj("deviation",D=>{_!==D&&b(D)});const x=mn("EmptyPlaceholder"),E=mn("ScrollSeekPlaceholder")||$9e,A=mn("ListComponent"),R=mn("ItemComponent"),k=mn("GroupComponent"),O=mn("computeItemKey"),L=mn("isSeeking"),N=mn("groupIndices").length>0,H=mn("paddingTopAddition"),W=mn("scrolledToInitialItem"),z=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+H,paddingBottom:n.offsetBottom,marginTop:_,...W?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&x?de.createElement(x,Fo(x,f)):de.createElement(A,{...Fo(A,f),ref:S,style:z,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(D=>{const F=D.originalIndex,j=O(F+n.firstItemIndex,D.data,f);return L?de.createElement(E,{...Fo(E,f),key:j,index:D.index,height:D.size,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?de.createElement(k,{...Fo(k,f),key:j,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,style:F9e},h(D.index,f)):de.createElement(R,{...Fo(R,f),key:j,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,"data-item-group-index":D.groupIndex,item:D.data,style:z9e},N?d(D.index,D.groupIndex,D.data,f):d(D.index,D.data,f))}))}),j9e={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},sA={width:"100%",height:"100%",position:"absolute",top:0},U9e={width:"100%",position:tie(),top:0,zIndex:1};function Fo(e,t){if(typeof e!="string")return{context:t}}const H9e=de.memo(function(){const t=mn("HeaderComponent"),n=aa("headerHeight"),r=mn("headerFooterTag"),i=Hp(s=>n(Wd(s,"height"))),o=mn("context");return t?de.createElement(r,{ref:i},de.createElement(t,Fo(t,o))):null}),W9e=de.memo(function(){const t=mn("FooterComponent"),n=aa("footerHeight"),r=mn("headerFooterTag"),i=Hp(s=>n(Wd(s,"height"))),o=mn("context");return t?de.createElement(r,{ref:i},de.createElement(t,Fo(t,o))):null});function sie({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...l}){const c=e("scrollContainerState"),d=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("scrollerRef"),p=n("context"),{scrollerRef:g,scrollByCallback:v,scrollToCallback:y}=Fre(c,f,d,h);return t("scrollTo",y),t("scrollBy",v),de.createElement(d,{ref:g,style:{...j9e,...o},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...l,...Fo(d,p)},s)})}function aie({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...l}){const c=e("windowScrollContainerState"),d=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("totalListHeight"),p=n("deviation"),g=n("customScrollParent"),v=n("context"),{scrollerRef:y,scrollByCallback:S,scrollToCallback:_}=Fre(c,f,d,bv,g);return QGe(()=>(y.current=g||window,()=>{y.current=null}),[y,g]),t("windowScrollTo",_),t("scrollBy",S),de.createElement(d,{style:{position:"relative",...o,...h!==0?{height:h+p}:{}},"data-virtuoso-scroller":!0,...l,...Fo(d,v)},s)})}const G9e=({children:e})=>{const t=de.useContext(rie),n=aa("viewportHeight"),r=aa("fixedItemHeight"),i=Hp(Dre(n,o=>Wd(o,"height")));return de.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),de.createElement("div",{style:sA,ref:i,"data-viewport-type":"element"},e)},V9e=({children:e})=>{const t=de.useContext(rie),n=aa("windowViewportRect"),r=aa("fixedItemHeight"),i=mn("customScrollParent"),o=nie(n,i);return de.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),de.createElement("div",{ref:o,style:sA,"data-viewport-type":"window"},e)},q9e=({children:e})=>{const t=mn("TopItemListComponent"),n=mn("headerHeight"),r={...U9e,marginTop:`${n}px`},i=mn("context");return de.createElement(t||"div",{style:r,context:i},e)},X9e=de.memo(function(t){const n=mn("useWindowScroll"),r=mn("topItemsIndexes").length>0,i=mn("customScrollParent"),o=i||n?Q9e:K9e,s=i||n?V9e:G9e;return de.createElement(o,{...t},r&&de.createElement(q9e,null,de.createElement(KV,{showTopList:!0})),de.createElement(s,null,de.createElement(H9e,null),de.createElement(KV,null),de.createElement(W9e,null)))}),{Component:Y9e,usePublisher:aa,useEmitterValue:mn,useEmitter:Kj}=Bre(B9e,{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"},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"}},X9e),K9e=sie({usePublisher:aa,useEmitterValue:mn,useEmitter:Kj}),Q9e=aie({usePublisher:aa,useEmitterValue:mn,useEmitter:Kj}),J9e=Y9e,QV={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Z9e={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:JV,ceil:ZV,floor:DC,min:e$,max:Rx}=Math;function e7e(e){return{...Z9e,items:e}}function eq(e,t,n){return Array.from({length:t-e+1}).map((r,i)=>{const o=n===null?null:n[i+e];return{index:i+e,data:o}})}function t7e(e,t){return e&&e.column===t.column&&e.row===t.row}function lS(e,t){return e&&e.width===t.width&&e.height===t.height}const n7e=$n(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:i,scrollBy:o,scrollTo:s,smoothScrollTargetReached:l,scrollContainerState:c,footerHeight:d,headerHeight:f},h,p,{propsReady:g,didMount:v},{windowViewportRect:y,useWindowScroll:S,customScrollParent:_,windowScrollContainerState:b,windowScrollTo:x},E])=>{const A=et(0),R=et(0),k=et(QV),O=et({height:0,width:0}),L=et({height:0,width:0}),N=yn(),H=yn(),W=et(0),z=et(null),D=et({row:0,column:0}),F=yn(),j=yn(),V=et(!1),G=et(0),K=et(!0),Y=et(!1);jn(Pe(v,an(G),Ht(([Q,ae])=>!!ae)),()=>{en(K,!1),en(R,0)}),jn(Pe(yi(v,K,L,O,G,Y),Ht(([Q,ae,le,he,,pe])=>Q&&!ae&&le.height!==0&&he.height!==0&&!pe)),([,,,,Q])=>{en(Y,!0),Vj(1,()=>{en(N,Q)}),Ru(Pe(r),()=>{en(n,[0,0]),en(K,!0)})}),St(Pe(j,Ht(Q=>Q!=null&&Q.scrollTop>0),lu(0)),R),jn(Pe(v,an(j),Ht(([,Q])=>Q!=null)),([,Q])=>{Q&&(en(O,Q.viewport),en(L,Q==null?void 0:Q.item),en(D,Q.gap),Q.scrollTop>0&&(en(V,!0),Ru(Pe(r,Wg(1)),ae=>{en(V,!1)}),en(s,{top:Q.scrollTop})))}),St(Pe(O,lt(({height:Q})=>Q)),i),St(Pe(yi(Ut(O,lS),Ut(L,lS),Ut(D,(Q,ae)=>Q&&Q.column===ae.column&&Q.row===ae.row),Ut(r)),lt(([Q,ae,le,he])=>({viewport:Q,item:ae,gap:le,scrollTop:he}))),F),St(Pe(yi(Ut(A),t,Ut(D,t7e),Ut(L,lS),Ut(O,lS),Ut(z),Ut(R),Ut(V),Ut(K),Ut(G)),Ht(([,,,,,,,Q])=>!Q),lt(([Q,[ae,le],he,pe,ve,ye,xe,,me,be])=>{const{row:Qe,column:qe}=he,{height:at,width:Lt}=pe,{width:Ie}=ve;if(xe===0&&(Q===0||Ie===0))return QV;if(Lt===0){const Rt=qj(be,Q),ct=Rt===0?Math.max(xe-1,0):Rt;return e7e(eq(Rt,ct,ye))}const ze=lie(Ie,Lt,qe);let it,pt;me?ae===0&&le===0&&xe>0?(it=0,pt=xe-1):(it=ze*DC((ae+Qe)/(at+Qe)),pt=ze*ZV((le+Qe)/(at+Qe))-1,pt=e$(Q-1,Rx(pt,ze-1)),it=e$(pt,Rx(0,it))):(it=0,pt=-1);const mt=eq(it,pt,ye),{top:_e,bottom:je}=tq(ve,he,pe,mt),Ye=ZV(Q/ze),Ne=Ye*at+(Ye-1)*Qe-je;return{items:mt,offsetTop:_e,offsetBottom:Ne,top:_e,bottom:je,itemHeight:at,itemWidth:Lt}})),k),St(Pe(z,Ht(Q=>Q!==null),lt(Q=>Q.length)),A),St(Pe(yi(O,L,k,D),Ht(([Q,ae,{items:le}])=>le.length>0&&ae.height!==0&&Q.height!==0),lt(([Q,ae,{items:le},he])=>{const{top:pe,bottom:ve}=tq(Q,he,ae,le);return[pe,ve]}),hr(M1)),n);const J=et(!1);St(Pe(r,an(J),lt(([Q,ae])=>ae||Q!==0)),J);const ie=Ds(Pe(Ut(k),Ht(({items:Q})=>Q.length>0),an(A,J),Ht(([{items:Q},ae,le])=>le&&Q[Q.length-1].index===ae-1),lt(([,Q])=>Q-1),hr())),ce=Ds(Pe(Ut(k),Ht(({items:Q})=>Q.length>0&&Q[0].index===0),lu(0),hr())),ue=Ds(Pe(Ut(k),an(V),Ht(([{items:Q},ae])=>Q.length>0&&!ae),lt(([{items:Q}])=>({startIndex:Q[0].index,endIndex:Q[Q.length-1].index})),hr(Kre),vd(0)));St(ue,p.scrollSeekRangeChanged),St(Pe(N,an(O,L,A,D),lt(([Q,ae,le,he,pe])=>{const ve=Xre(Q),{align:ye,behavior:xe,offset:me}=ve;let be=ve.index;be==="LAST"&&(be=he-1),be=Rx(0,be,e$(he-1,be));let Qe=d5(ae,pe,le,be);return ye==="end"?Qe=JV(Qe-ae.height+le.height):ye==="center"&&(Qe=JV(Qe-ae.height/2+le.height/2)),me&&(Qe+=me),{top:Qe,behavior:xe}})),s);const se=To(Pe(k,lt(Q=>Q.offsetBottom+Q.bottom)),0);return St(Pe(y,lt(Q=>({width:Q.visibleWidth,height:Q.visibleHeight}))),O),{data:z,totalCount:A,viewportDimensions:O,itemDimensions:L,scrollTop:r,scrollHeight:H,overscan:e,scrollBy:o,scrollTo:s,scrollToIndex:N,smoothScrollTargetReached:l,windowViewportRect:y,windowScrollTo:x,useWindowScroll:S,customScrollParent:_,windowScrollContainerState:b,deviation:W,scrollContainerState:c,footerHeight:d,headerHeight:f,initialItemCount:R,gap:D,restoreStateFrom:j,...p,initialTopMostItemIndex:G,gridState:k,totalListHeight:se,...h,startReached:ce,endReached:ie,rangeChanged:ue,stateChanged:F,propsReady:g,stateRestoreInProgress:V,...E}},gr(Xj,Po,Sw,Jre,of,Yj,rf));function tq(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{top:0,bottom:0};const o=d5(e,t,n,r[0].index),s=d5(e,t,n,r[r.length-1].index)+i;return{top:o,bottom:s}}function d5(e,t,n,r){const i=lie(e.width,n.width,t.column),o=DC(r/i),s=o*n.height+Rx(0,o-1)*t.row;return s>0?s+t.row:s}function lie(e,t,n){return Rx(1,DC((e+n)/(DC(t)+n)))}const r7e=$n(()=>{const e=et(d=>`Item ${d}`),t=et({}),n=et(null),r=et("virtuoso-grid-item"),i=et("virtuoso-grid-list"),o=et(oie),s=et("div"),l=et(bv),c=(d,f=null)=>To(Pe(t,lt(h=>h[d]),hr()),f);return{context:n,itemContent:e,components:t,computeItemKey:o,itemClassName:r,listClassName:i,headerFooterTag:s,scrollerRef:l,FooterComponent:c("Footer"),HeaderComponent:c("Header"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),ScrollerComponent:c("Scroller","div"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),i7e=$n(([e,t])=>({...e,...t}),gr(n7e,r7e)),o7e=de.memo(function(){const t=Sr("gridState"),n=Sr("listClassName"),r=Sr("itemClassName"),i=Sr("itemContent"),o=Sr("computeItemKey"),s=Sr("isSeeking"),l=dl("scrollHeight"),c=Sr("ItemComponent"),d=Sr("ListComponent"),f=Sr("ScrollSeekPlaceholder"),h=Sr("context"),p=dl("itemDimensions"),g=dl("gap"),v=Sr("log"),y=Sr("stateRestoreInProgress"),S=Hp(_=>{const b=_.parentElement.parentElement.scrollHeight;l(b);const x=_.firstChild;if(x){const{width:E,height:A}=x.getBoundingClientRect();p({width:E,height:A})}g({row:nq("row-gap",getComputedStyle(_).rowGap,v),column:nq("column-gap",getComputedStyle(_).columnGap,v)})});return y?null:de.createElement(d,{ref:S,className:n,...Fo(d,h),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(_=>{const b=o(_.index,_.data,h);return s?de.createElement(f,{key:b,...Fo(f,h),index:_.index,height:t.itemHeight,width:t.itemWidth}):de.createElement(c,{...Fo(c,h),className:r,"data-index":_.index,key:b},i(_.index,_.data,h))}))}),s7e=de.memo(function(){const t=Sr("HeaderComponent"),n=dl("headerHeight"),r=Sr("headerFooterTag"),i=Hp(s=>n(Wd(s,"height"))),o=Sr("context");return t?de.createElement(r,{ref:i},de.createElement(t,Fo(t,o))):null}),a7e=de.memo(function(){const t=Sr("FooterComponent"),n=dl("footerHeight"),r=Sr("headerFooterTag"),i=Hp(s=>n(Wd(s,"height"))),o=Sr("context");return t?de.createElement(r,{ref:i},de.createElement(t,Fo(t,o))):null}),l7e=({children:e})=>{const t=de.useContext(iie),n=dl("itemDimensions"),r=dl("viewportDimensions"),i=Hp(o=>{r(o.getBoundingClientRect())});return de.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),de.createElement("div",{style:sA,ref:i},e)},c7e=({children:e})=>{const t=de.useContext(iie),n=dl("windowViewportRect"),r=dl("itemDimensions"),i=Sr("customScrollParent"),o=nie(n,i);return de.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),de.createElement("div",{ref:o,style:sA},e)},u7e=de.memo(function({...t}){const n=Sr("useWindowScroll"),r=Sr("customScrollParent"),i=r||n?f7e:d7e,o=r||n?c7e:l7e;return de.createElement(i,{...t},de.createElement(o,null,de.createElement(s7e,null),de.createElement(o7e,null),de.createElement(a7e,null)))}),{Component:kVe,usePublisher:dl,useEmitterValue:Sr,useEmitter:cie}=Bre(i7e,{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"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},u7e),d7e=sie({usePublisher:dl,useEmitterValue:Sr,useEmitter:cie}),f7e=aie({usePublisher:dl,useEmitterValue:Sr,useEmitter:cie});function nq(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Ls.WARN),t==="normal"?0:parseInt(t??"0",10)}const h7e=I.forwardRef(({style:e,children:t,...n},r)=>{const i=I.useRef(null),{palette:o,spacing:s}=In(),l=Zx({".os-scrollbar":{visibility:"visible",opacity:1},".os-scrollbar-vertical > .os-scrollbar-track > .os-scrollbar-handle":{"min-height":s(12)},"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${s(6)})`,marginTop:s(6)}}),[c]=MQ({options:{overflow:{x:"hidden",y:"scroll"},scrollbars:{autoHide:"move",theme:o.mode==="dark"?"os-theme-light":"os-theme-dark"}}});I.useEffect(()=>{typeof r!="function"&&(r!=null&&r.current)&&(i!=null&&i.current)&&c({target:i.current,elements:{viewport:r.current}})},[c]);const d=I.useCallback(f=>{f&&r&&(typeof r=="function"?r(f):r.current=f)},[r]);return C.jsx("div",{ref:i,style:e,className:l,children:C.jsx("div",{ref:d,...n,children:t})})});function p7e({items:e=[],renderItem:t,listOptions:n,placeholder:r,...i}){return C.jsx(dt,{...i,children:C.jsx(J9e,{components:{Scroller:h7e},totalCount:e.length,itemContent:o=>t==null?void 0:t(e[o],o),...n})})}function m7e({event:e,hidden:t}){return C.jsxs(UFe,{children:[ee.startCase(`${(e==null?void 0:e.type)??"unsupported"} #${(e==null?void 0:e.id)??"-"}`)," ",t&&C.jsx(Txe,{sx:{opacity:.56,fontSize:12,ml:1,transform:"translateY(1.75px)"}})]})}function g7e({event:e,index:t,selected:n,...r}){const{spacing:i}=In();return C.jsx(Kd,{title:C.jsx(dt,{p:1,children:C.jsx(ZE,{event:e,flexDirection:"column"})}),followCursor:!0,children:C.jsxs(PE,{selected:n,...r,sx:{borderLeft:`${i(.5)} solid ${Pg(e==null?void 0:e.type)}`,...r.sx},children:[C.jsx(Ul,{children:C.jsx(zt,{variant:"body2",children:t})}),C.jsx(sl,{sx:{overflow:"hidden"},primary:C.jsx(m7e,{event:e,hidden:!1}),secondary:C.jsx(ZE,{event:ee.pick(e,"f","g","pId")})})]})})}function v7e({event:e}){const{spacing:t}=In();return C.jsxs(C.Fragment,{children:[C.jsx(Qm,{sx:{height:80,borderLeft:`${t(.5)} solid ${Pg(e==null?void 0:e.type)}`},children:C.jsx(Ul,{children:C.jsx(C0e,{animation:!1,width:t(4)})})}),C.jsx(tc,{variant:"inset"})]})}const y7e=C.jsx(tc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),b7e=e=>Number(e.replace(/px$/,""));function x7e(){const{spacing:e}=In(),{controls:t,onChange:n,state:r}=Du(),i=I.useRef(null),{key:o,setKey:s,layers:l,layer:c}=Kl(),{step:d,playing:f,stepTo:h}=Nz(o),p=I.useMemo(()=>{var v;if(c)return I.createElement(uw[((v=c==null?void 0:c.source)==null?void 0:v.type)??""].steps,{layer:c})},[c]),g=I.useCallback(ee.throttle(v=>{var y,S;return(S=(y=i==null?void 0:i.current)==null?void 0:y.scrollToIndex)==null?void 0:S.call(y,{index:v,align:"start",behavior:"smooth",offset:-b7e(e(6+2))})},1e3/30),[i]);return I.useEffect(()=>{ee.defer(()=>g(d))},[g,d]),C.jsxs(Sn,{onChange:n,stack:r,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{vertical:!0,alignItems:"center",children:p?I.cloneElement(p,{children:v=>c?v.length?C.jsx(p7e,{sx:{width:"100%",height:"100%"},items:v,listOptions:{ref:i,defaultItemHeight:80,overscan:0},renderItem:(y,S)=>f?C.jsx(v7e,{event:y}):C.jsxs(dt,{sx:{height:e(S?10:16),pt:S?0:e(6)},children:[C.jsx(g7e,{event:y,index:S,selected:S===d,sx:{height:"100%"},onClick:()=>h(S)}),C.jsx(tc,{variant:"inset"})]})}):C.jsx(eg,{icon:C.jsx(TS,{}),label:`${$o(c)} has no steps to display`}):C.jsx(eg,{icon:C.jsx(TS,{}),label:"Steps"})}):C.jsx(eg,{icon:C.jsx(TS,{}),label:"Steps"})})}),C.jsxs(Sn.Options,{children:[C.jsx(Xo,{icon:C.jsx(tv,{}),label:"Layer",value:o,items:ee.map(l,v=>({id:v.key,name:$o(v)})),onChange:s,showArrow:!0}),y7e,C.jsx(U2e,{layer:c})]}),C.jsx(Sn.Extras,{children:t})]})}const w7e=e=>e?48:36,_7e=8;function S7e({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Options",defaultChecked:o}){const s=uz(),l=ee.max([ee.findIndex(t,({value:c})=>!!(n!=null&&n[c])),0])??0;return C.jsx(Op,{variant:"popover",children:c=>C.jsxs(C.Fragment,{children:[C.jsx(Kd,{title:i,children:C.jsx("span",{children:e==null?void 0:e(mk(c))})}),C.jsx(Pp,{...sw(c),anchorOrigin:{horizontal:"center",vertical:-w7e(s)*l-_7e},transformOrigin:{vertical:"top",horizontal:"center"},children:ee.map(t,({value:d,label:f,disabled:h})=>C.jsxs(gu,{disabled:h,onClick:()=>{r==null||r({...n,[d]:!((n==null?void 0:n[d])??o)})},children:[C.jsx(Ul,{children:C.jsx(Rme,{sx:{p:0},checked:!!((n==null?void 0:n[d])??o)})}),f]},d))})]})})}function E7e({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,defaultChecked:s}){var d;const l=ee.filter(r,({id:f})=>!!((t==null?void 0:t[f])??s)),c=l.length?l.length===1?(d=ee.head(l))==null?void 0:d.name:`${l.length} Selected`:e;return C.jsx(S7e,{defaultChecked:!0,placeholder:ee.startCase(e),trigger:f=>C.jsx($d,{...f,disabled:!(r!=null&&r.length),icon:i,showArrow:o,children:c}),items:ee.map(r,({id:f,name:h,description:p,hidden:g})=>({value:f,label:C.jsxs(C.Fragment,{children:[C.jsx(zt,{children:h}),C.jsx(Kr,{}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:p})]}),disabled:g})),value:t,onChange:n})}const rq=C.jsx(tc,{orientation:"vertical",flexItem:!0,sx:{m:1}});function C7e(){var p,g,v,y;const{controls:e,onChange:t,state:n}=Du(),[r]=Tk(),[{layers:i}]=Bp(),[o,s]=I.useState({}),l=I.useMemo(()=>ee.filter(i,S=>(o==null?void 0:o[S.key])??!0),[o,i]),[c,d]=I.useState(),f=I.useMemo(()=>ee.head(r),[r]),h=n!=null&&n.renderer&&n.renderer!=="internal:auto"?n.renderer:(g=(p=f==null?void 0:f.renderer)==null?void 0:p.meta)==null?void 0:g.id;return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{children:C.jsx(vk,{children:S=>C.jsx(dt,{children:C.jsx(C2e,{...S,layers:l,renderer:h,rendererRef:d})})})})}),C.jsx(Sn.Options,{children:C.jsxs(Nd,{direction:"row",children:[C.jsx(Xo,{label:"Renderer",icon:C.jsx(mxe,{}),value:(n==null?void 0:n.renderer)??"internal:auto",onChange:S=>t==null?void 0:t({renderer:S}),items:[{id:"internal:auto",name:`Auto (${((y=(v=f==null?void 0:f.renderer)==null?void 0:v.meta)==null?void 0:y.name)??"None"})`},...ee.map(r,({renderer:S})=>({id:S.meta.id,name:S.meta.name,description:S.meta.id}))],showArrow:!0}),rq,C.jsx(E7e,{defaultChecked:!0,label:"Layers",icon:C.jsx(tv,{}),value:o,onChange:s,items:ee.map(i,S=>({id:S.key,name:$o(S)})),showArrow:!0}),rq,C.jsx($d,{disabled:!c,onClick:()=>{c==null||c.fitCamera()},icon:C.jsx(yxe,{}),children:"Fit"}),C.jsx($d,{disabled:!c,onClick:()=>{c==null||c.initialCamera()},icon:C.jsx(_xe,{}),children:"1:1"})]})}),C.jsx(Sn.Extras,{children:e})]})}const T7e="modulepreload",k7e=function(e,t){return new URL(e,t).href},iq={},qs=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=k7e(o,r),o in iq)return;iq[o]=!0;const s=o.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!r)for(let f=i.length-1;f>=0;f--){const h=i[f];if(h.href===o&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":T7e,s||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),s)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};var uie={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Nt,function(){return function n(r,i,o){var s=window,l="application/octet-stream",c=o||l,d=r,f=!i&&!o&&d,h=document.createElement("a"),p=function(k){return String(k)},g=s.Blob||s.MozBlob||s.WebKitBlob||p,v=i||"download",y,S;if(g=g.call?g.bind(s):Blob,String(this)==="true"&&(d=[d,c],c=d[0],d=d[1]),f&&f.length<2048&&(v=f.split("/").pop().split("?")[0],h.href=f,h.href.indexOf(f)!==-1)){var _=new XMLHttpRequest;return _.open("GET",f,!0),_.responseType="blob",_.onload=function(k){n(k.target.response,v,l)},setTimeout(function(){_.send()},0),_}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(d))if(d.length>1024*1024*1.999&&g!==p)d=A(d),c=d.type||l;else return navigator.msSaveBlob?navigator.msSaveBlob(A(d),v):R(d);else if(/([\x80-\xff])/.test(d)){var b=0,x=new Uint8Array(d.length),E=x.length;for(b;b{const p=(0,n.randomBytes)(4).readUInt32BE(0);return d+p%(f-d+1)},i=d=>{let f;switch(d){case 1:f=Math.floor(r(1,9)).toString();break;case 2:f=Math.floor(r(10,90)).toString();break;case 3:f=Math.floor(r(100,900)).toString();break;case 4:f=Math.floor(r(1e3,9e3)).toString();break;case 5:f=Math.floor(r(1e4,9e4)).toString();break;case 6:f=Math.floor(r(1e5,9e5)).toString();break;default:f="";break}return f};function o(d,f){return d.replace(/@.+/,"").replace(/[&/\\#,+()$~%._@'":*?<>{}]/g,"")+i(f)}e.generateFromEmail=o;function s(d,f,h){const p=t.nouns[Math.floor(Math.random()*t.nouns.length)],g=t.adjectives[Math.floor(Math.random()*t.adjectives.length)];let v;return d?v=g+d+p+i(f):v=g+p+i(f),h?v.substring(0,h):v}e.generateUsername=s;function l(d){if(d.dictionaries){const f=d.dictionaries.length;let h="";for(let g=0;g{const l=s??await hz({accept:die,strict:!0});l&&(P7e(l)?await o(async()=>{const c=I7e(l)?await STe(new Uint8Array(await l.arrayBuffer())):await l.text(),d=await RJ(c);d&&(n(()=>d.layers),i(()=>d.UIState))},`Opening workspace (${yz(l.size)})`):e(`${l==null?void 0:l.name} is not a workspace file`))},save:async s=>{e("Saving workspace...");const l=JSON.stringify({layers:t,UIState:r});if(s){const c=`${f5.generateUsername("-")}.workspace.json`;oq(l,c,"application/json"),e("Workspace saved",c)}else{const c=`${f5.generateUsername("-")}.workspace`;oq(await _Te(l),c,"application/octet-stream"),e("Workspace saved",c)}}}}function I7e(e){return e.name.endsWith(".workspace")}function P7e(e){return ee.find(die,t=>e.name.endsWith(t))}function O7e(e){return e.split(".")[0]}function bm(e){return e.split("/").pop()}function M7e(){const e=ba(),{controls:t,onChange:n,state:r}=Du(),{load:i}=Zj(),o=Jd(),{result:s,loading:l}=lv(async()=>{const d=Object.assign({"/public/recipes/astar-jps-small-maze.workspace":()=>qs(()=>import("./astar-jps-small-maze-9a90ce2a.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/aurora-polyanya.workspace":()=>qs(()=>import("./aurora-polyanya-ceb55900.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/dynamic-starcraft.workspace":()=>qs(()=>import("./dynamic-starcraft-4ceed441.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/frozen-sea-astar.workspace":()=>qs(()=>import("./frozen-sea-astar-d8dfa04c.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/jps-vs-jps-prune2.workspace":()=>qs(()=>import("./jps-vs-jps-prune2-defbda61.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/lacam-random-32-32-20.workspace":()=>qs(()=>import("./lacam-random-32-32-20-2163bf6f.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/mapf-large.workspace":()=>qs(()=>import("./mapf-large-867abdea.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/mapf-sortation.workspace":()=>qs(()=>import("./mapf-sortation-4ea4dd13.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/melbourne-routing.workspace":()=>qs(()=>import("./melbourne-routing-b5c14300.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/new-york-astar.workspace":()=>qs(()=>import("./new-york-astar-03f71297.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/nine-tile.workspace":()=>qs(()=>import("./nine-tile-6376158b.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/rayscan-arena2.workspace":()=>qs(()=>import("./rayscan-arena2-f6f7b81d.js"),[],import.meta.url).then(f=>f.default)});return await Promise.all(ee.entries(d).map(f=>D7e(...f)))},[]),c=d=>o(async()=>{try{e(`Loading ${bm(d)}...`);const f=await fetch(d);f.ok||e(`Couldn't load ${bm(d)}`,"Network error",{error:!0});const h=await f.blob(),p=new File([h],bm(d),{type:h.type});i(p)}catch(f){e(`Couldn't load ${bm(d)}`,`${f}`,{error:!0})}});return C.jsxs(Sn,{onChange:n,stack:r,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{vertical:!0,children:C.jsx(rv,{y:!0,children:C.jsx(dt,{sx:{pt:6},children:l?C.jsx(q1,{sx:{m:2}}):C.jsx(yp,{children:ee.map(s,({name:d,path:f},h)=>C.jsxs(PE,{onClick:()=>c(f),children:[C.jsx(Ul,{children:C.jsx(V4,{})}),C.jsx(sl,{primary:d,secondary:bm(f)})]},h))})})})})}),C.jsx(Sn.Extras,{children:t})]})}async function D7e(e,t){return{name:ee.chain(e).thru(bm).thru(O7e).startCase().value(),path:await t()}}const h5={recipes:{id:"recipes",name:"Recipes",icon:C.jsx(V4,{}),content:M7e},viewport:{id:"viewport",name:"Viewport",icon:C.jsx(QK,{}),content:E7e},tree:{id:"tree",name:"Tree",icon:C.jsx(VK,{}),content:g2e},steps:{id:"steps",name:"Steps",icon:C.jsx(TS,{}),content:b7e},info:{id:"info",name:"Logs",icon:C.jsx(YK,{}),content:AFe},layers:{id:"layers",name:"Layers",icon:C.jsx(tv,{}),content:zFe},debug:{id:"debug",name:"Debugger",icon:C.jsx(vxe,{}),content:kFe},settings:{id:"settings",name:"Settings",icon:C.jsx(Lxe,{}),content:FGe},about:{id:"about",name:"About",icon:C.jsx(kxe,{}),content:T_e}},[L7e,N7e]=nc({view:{type:"branch",key:Do(),orientation:"horizontal",children:[{size:75,type:"branch",key:Do(),orientation:"horizontal",children:[{type:"leaf",size:25,key:Do(),content:{type:"layers"}},{size:75,type:"branch",key:Do(),orientation:"vertical",children:[{type:"leaf",size:75,key:Do(),content:{type:"viewport"}},{type:"leaf",size:25,key:Do(),content:{type:"info"}}]}]},{size:25,type:"leaf",key:Do(),content:{type:"steps"}}]}});function B7e(){const[e]=OJ(),t=dz(),n=ee.values(e);return C.jsx(nk,{sx:{...t,zIndex:r=>r.zIndex.tooltip+1,WebkitAppRegion:"drag"},open:!!n.length,children:C.jsxs(Nd,{alignItems:"center",spacing:4,children:[C.jsx(q1,{}),n.map((r,i)=>C.jsx(zt,{variant:"body2",color:"textSecondary",children:r},i))]})})}var fie={},$7e=Nt&&Nt.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),hie=Nt&&Nt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fie,"__esModule",{value:!0});var Xs=hie(Vg),t$=hie(I),F7e=function(e){$7e(t,e);function t(n){var r=e.call(this,n)||this;return r.resetDragging=function(){r.frameDragCounter=0,r.setState({draggingOverFrame:!1,draggingOverTarget:!1})},r.handleWindowDragOverOrDrop=function(i){i.preventDefault()},r.handleFrameDrag=function(i){if(t.eventHasFiles(i)){if(r.frameDragCounter+=i.type==="dragenter"?1:-1,r.frameDragCounter===1){r.setState({draggingOverFrame:!0}),r.props.onFrameDragEnter&&r.props.onFrameDragEnter(i);return}if(r.frameDragCounter===0){r.setState({draggingOverFrame:!1}),r.props.onFrameDragLeave&&r.props.onFrameDragLeave(i);return}}},r.handleFrameDrop=function(i){r.state.draggingOverTarget||(r.resetDragging(),r.props.onFrameDrop&&r.props.onFrameDrop(i))},r.handleDragOver=function(i){t.eventHasFiles(i)&&(r.setState({draggingOverTarget:!0}),!t.isIE()&&r.props.dropEffect&&(i.dataTransfer.dropEffect=r.props.dropEffect),r.props.onDragOver&&r.props.onDragOver(i))},r.handleDragLeave=function(i){r.setState({draggingOverTarget:!1}),r.props.onDragLeave&&r.props.onDragLeave(i)},r.handleDrop=function(i){if(r.props.onDrop&&t.eventHasFiles(i)){var o=i.dataTransfer?i.dataTransfer.files:null;r.props.onDrop(o,i)}r.resetDragging()},r.handleTargetClick=function(i){r.props.onTargetClick&&r.props.onTargetClick(i),r.resetDragging()},r.stopFrameListeners=function(i){i&&(i.removeEventListener("dragenter",r.handleFrameDrag),i.removeEventListener("dragleave",r.handleFrameDrag),i.removeEventListener("drop",r.handleFrameDrop))},r.startFrameListeners=function(i){i&&(i.addEventListener("dragenter",r.handleFrameDrag),i.addEventListener("dragleave",r.handleFrameDrag),i.addEventListener("drop",r.handleFrameDrop))},r.frameDragCounter=0,r.state={draggingOverFrame:!1,draggingOverTarget:!1},r}return t.prototype.componentDidMount=function(){this.startFrameListeners(this.props.frame),this.resetDragging(),window.addEventListener("dragover",this.handleWindowDragOverOrDrop),window.addEventListener("drop",this.handleWindowDragOverOrDrop)},t.prototype.componentDidUpdate=function(n){n.frame!==this.props.frame&&(this.resetDragging(),this.stopFrameListeners(n.frame),this.startFrameListeners(this.props.frame))},t.prototype.componentWillUnmount=function(){this.stopFrameListeners(this.props.frame),window.removeEventListener("dragover",this.handleWindowDragOverOrDrop),window.removeEventListener("drop",this.handleWindowDragOverOrDrop)},t.prototype.render=function(){var n=this.props,r=n.children,i=n.className,o=n.targetClassName,s=n.draggingOverFrameClassName,l=n.draggingOverTargetClassName,c=this.state,d=c.draggingOverTarget,f=c.draggingOverFrame,h=o;return f&&(h+=" "+s),d&&(h+=" "+l),t$.default.createElement("div",{className:i,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},t$.default.createElement("div",{className:h,onClick:this.handleTargetClick},r))},t.isIE=function(){return typeof window<"u"&&(window.navigator.userAgent.indexOf("MSIE")!==-1||window.navigator.appVersion.indexOf("Trident/")>0)},t.eventHasFiles=function(n){var r=!1;if(n.dataTransfer){var i=n.dataTransfer.types;for(var o in i)if(i[o]==="Files"){r=!0;break}}return r},t.propTypes={className:Xs.default.string,targetClassName:Xs.default.string,draggingOverFrameClassName:Xs.default.string,draggingOverTargetClassName:Xs.default.string,onDragOver:Xs.default.func,onDragLeave:Xs.default.func,onDrop:Xs.default.func,onTargetClick:Xs.default.func,dropEffect:Xs.default.oneOf(["copy","move","link","none"]),frame:function(n,r,i){var o=n[r];if(o==null)return new Error("Warning: Required prop `"+r+"` was not specified in `"+i+"`");if(o!==document&&!(o instanceof HTMLElement))return new Error("Warning: Prop `"+r+"` must be one of the following: document, HTMLElement!")},onFrameDragEnter:Xs.default.func,onFrameDragLeave:Xs.default.func,onFrameDrop:Xs.default.func},t.defaultProps={dropEffect:"copy",frame:typeof window>"u"?void 0:window.document,className:"file-drop",targetClassName:"file-drop-target",draggingOverFrameClassName:"file-drop-dragging-over-frame",draggingOverTargetClassName:"file-drop-dragging-over-target"},t}(t$.default.PureComponent),z7e=fie.FileDrop=F7e;function j7e(){const e=dz(),{load:t}=Zj(),[n,r]=I.useState(!1);return C.jsx(C.Fragment,{children:C.jsx(z7e,{onFrameDragLeave:()=>r(!1),onFrameDragEnter:()=>r(!0),onFrameDrop:()=>r(!1),onDragLeave:()=>r(!1),onDrop:i=>(i==null?void 0:i.length)&&t(ee.head(i)),children:C.jsx(nk,{sx:{...e,zIndex:i=>i.zIndex.tooltip+1},open:n,children:C.jsxs(Nd,{alignItems:"center",spacing:4,children:[C.jsx(V4,{}),C.jsx(zt,{variant:"body2",color:"textSecondary",children:"Open workspace"})]})})})})}function U7e(e){const t=eEe(),[{view:n},r]=L7e();return C.jsxs(C.Fragment,{children:[C.jsx(bn,{...e,children:C.jsx(HQ,{root:n,onChange:i=>r(()=>({view:i})),renderLeaf:({content:i})=>{var o;return C.jsx(vp,{in:!0,children:C.jsx(dt,{sx:{width:"100%",height:"100%"},children:I.createElement((o=h5[(i==null?void 0:i.type)??""])==null?void 0:o.content)})})}})}),C.jsx(vp,{in:t,children:C.jsx(bve,{variant:"indeterminate",sx:{position:"absolute",bottom:0,width:"100%",zIndex:1}})}),C.jsx(B7e,{}),C.jsx(j7e,{})]})}const H7e=e=>l$(e,"#ffffff")>l$(e,"#000000")?"#ffffff":"#000000";function W7e(e){I.useEffect(()=>{ee.defer(()=>document.querySelector('meta[name="theme-color"]').setAttribute("content",e)),document.title=EF,"electron"in window&&window.electron.invoke("title-bar","#00000000",H7e(e))},[e])}function G7e(e){return new Promise(t=>ee.delay(t,e))}async function V7e(e,t=2500){const n=ee.now();return{result:await Promise.any([e(),G7e(t)]),delta:ee.now()-n}}function q7e(){const e=ba(),[{remote:t}]=Lu(),[,n]=Ig(),r=Jd("connections");return I.useEffect(()=>{let i=!1,o=[];return r(async()=>{if(t!=null&&t.length){for(const{transport:s,url:l,disabled:c}of t){if(c!==!0){e(`Connecting to ${l}...`);const d=new(MGe(s))({url:l});await d.connect();const{result:f,delta:h}=await V7e(()=>d.call("about"));f?(e(`Connected to ${f.name}`),o=[...o,{...f,url:l,ping:h,call:d.call.bind(d),disconnect:d.disconnect.bind(d)}]):await d.disconnect()}i||n(()=>o)}i||e(`Connected to ${o.length} of ${t.length} solvers`)}}),()=>{i=!0,o.map(s=>s.disconnect())}},[t,n,e,r]),C.jsx(C.Fragment,{})}const X7e=e=>t=>({...t,source:e});function Y7e(){const[e]=Ig(),[,t]=WE(),n=Jd("features");return _Z(r=>n(async()=>{const i={algorithms:[],formats:ee.keys(bz).map(o=>({id:o,source:"internal"})),maps:[]};for(const{call:o,url:s}of e)for(const l of["algorithms","formats","maps"])i[l]=ee.uniqBy([...i[l],...ee.map(await o(`features/${l}`),X7e(s))],"id");r.aborted||t(()=>i)}),[e,t]),C.jsx(C.Fragment,{})}function K7e(){const[{layers:e},t]=Bp();return I.useMemo(()=>ee.map(e,n=>{const r=GZ(n).service;if(r)return I.createElement(r,{key:n.key,value:n,onChange:i=>t(({layers:o})=>({layers:ee.map(o,s=>s.key===n.key?i(s):s)}))})}),[e,t])}function Q7e(){const e=K7e();return C.jsx(C.Fragment,{children:e})}function pie({slices:e,children:t,services:n}){return C.jsx(C.Fragment,{children:ee.reduce(ee.map(e,r=>I.createElement(r)),(r,i)=>I.cloneElement(i,{},r),C.jsxs(C.Fragment,{children:[t,ee.map(n,(r,i)=>I.createElement(r,{key:i}))]}))})}const J7e=()=>{const{save:e,load:t}=Zj(),[n,r]=I.useState(!1);return I.useEffect(()=>{if("windowControlsOverlay"in navigator){const i=()=>{r(!!navigator.windowControlsOverlay.visible)};return navigator.windowControlsOverlay.addEventListener("geometrychange",i),i(),()=>navigator.windowControlsOverlay.removeEventListener("geometrychange",i)}},[r]),C.jsx(dt,{sx:{mt:-.5,minHeight:36,height:n?"env(titlebar-area-height, 50px)":0,width:"env(titlebar-area-width, 100%)",WebkitAppRegion:"drag",overflowX:"auto"},children:C.jsx(rv,{x:!0,style:{height:"100%"},children:C.jsx(dt,{sx:{height:"100%"},children:C.jsxs(Nd,{direction:"row",spacing:1,sx:{height:"100%"},alignItems:"center",children:[C.jsx(dt,{sx:{p:1,height:"100%"},children:C.jsx("img",{src:VQ,style:{height:"100%"}})}),[{key:"workspace",items:[{name:"Open workspace",key:"workspace-load",action:t},{name:"Save workspace",key:"workspace-save",action:e},{name:"Save workspace (JSON)",key:"workspace-save",action:()=>e(!0)}]},{key:"help",items:[{name:"Open repository in GitHub",key:"github",action:()=>open(S_e,"_blank")},{name:"Open changelog",key:"changelog",action:()=>open(`${E_e}/changelog-${w_e}.md`,"_blank")}]}].map(({key:i,items:o})=>C.jsx(Op,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(Pp,{...sw(s),children:C.jsx(ik,{dense:!0,sx:{p:0},children:o.map(({name:l,key:c,action:d})=>C.jsx(gu,{onClick:()=>{d==null||d(),s.close()},children:l},c))})}),C.jsx($d,{...mk(s),sx:{WebkitAppRegion:"no-drag",minWidth:"fit-content",p:.5,px:1},children:ee.startCase(i)})]})},i)),C.jsx(dt,{sx:{p:.75,height:"100%"},children:C.jsx(Z7e,{})})]})})})})};function Z7e(){const e=ba();return C.jsxs(Ou,{onClick:()=>e("Commands are not yet implemented"),sx:{WebkitAppRegion:"no-drag",fontSize:14,borderRadius:t=>t.shape.borderRadius,"&:hover":{bgcolor:"background.paper"},height:"100%",m:0,display:"flex",alignItems:"center",px:1,pr:2,gap:t=>t.spacing(1),color:"text.secondary",cursor:"text"},children:[C.jsx(Dxe,{fontSize:"small",color:"disabled"})," ",C.jsx(zt,{sx:{mt:0},children:"Commands"})]})}const eVe=[q7e,Y7e,_We,Q7e];function tVe(){const t=In().palette.background.default;return W7e(t),C.jsxs(bn,{vertical:!0,sx:{bgcolor:t,p:.5,color:"text.primary"},children:[C.jsx(J7e,{}),C.jsx(U7e,{flex:1})]})}function nVe(){const[{theme:e="light",accentColor:t="teal"}]=Lu(),n=I.useMemo(()=>b_e(e,t),[e,t]);return C.jsx(Vle,{theme:n,children:C.jsx(g1e,{children:C.jsx(pie,{services:eVe,children:C.jsx(tVe,{})})})})}var mie,sq=Jg;mie=sq.createRoot,sq.hydrateRoot;const rVe=mie(document.getElementById("root")),iVe=[kTe,g_e,QSe,JSe,qSe,ZSe,x2e,m1e,N7e,YPe];rVe.render(C.jsx(Ume,{children:C.jsx(pie,{slices:iVe,children:C.jsx(nVe,{})})})); +Use Save As... to download, then click back to return to this page.`)&&(location.href=k),!0;var L=document.createElement("iframe");document.body.appendChild(L),!O&&/^data:/.test(k)&&(k="data:"+k.replace(/^data:([\w\/\-\+]+)/,l)),L.src=k,setTimeout(function(){document.body.removeChild(L)},333)}if(navigator.msSaveBlob)return navigator.msSaveBlob(y,v);if(s.URL)R(s.URL.createObjectURL(y),!0);else{if(typeof y=="string"||y.constructor===p)try{return R("data:"+c+";base64,"+s.btoa(y))}catch{return R("data:"+c+","+encodeURIComponent(y))}S=new FileReader,S.onload=function(k){R(this.result)},S.readAsDataURL(y)}return!0}})})(uie);var A7e=uie.exports;const oq=js(A7e);var f5={},kp={},Qj={};Object.defineProperty(Qj,"__esModule",{value:!0});Qj.default=["other","new","good","old","little","great","small","young","long","black","high","only","big","white","political","right","large","real","sure","different","important","public","possible","full","whole","certain","human","major","military","bad","social","dead","true","economic","open","early","free","national","strong","hard","special","clear","local","private","wrong","late","short","poor","recent","dark","fine","foreign","ready","red","cold","low","heavy","serious","single","personal","difficult","left","blue","federal","necessary","general","easy","likely","beautiful","happy","past","hot","close","common","afraid","simple","natural","main","various","available","nice","present","final","sorry","entire","current","similar","deep","huge","rich","nuclear","empty","strange","quiet","front","wide","modern","concerned","green","very","alone","particular","bright","supposed","basic","medical","aware","total","financial","legal","original","international","soft","alive","interested","tall","warm","popular","tiny","top","normal","powerful","silent","religious","impossible","quick","safe","thin","familiar","gray","fresh","physical","individual","willing","crazy","sick","angry","perfect","tired","wild","moral","brown","dangerous","famous","married","terrible","successful","fair","professional","official","obvious","glad","central","chief","effective","light","complete","interesting","thick","proper","involved","responsible","narrow","civil","industrial","dry","yellow","specific","sharp","sudden","direct","following","growing","significant","traditional","slow","previous","vast","surprised","busy","usual","clean","funny","regular","scientific","ordinary","ancient","senior","sweet","future","annual","secret","equal","independent","wonderful","tough","broad","additional","careful","domestic","brief","enormous","commercial","grand","average","sexual","nervous","pale","immediate","critical","proud","like","complex","separate","considerable","still","extra","expensive","guilty","active","mad","asleep","wooden","cool","presidential","apparent","weak","essential","living","pretty","cultural","useful","actual","unusual","daily","potential","wet","solid","lovely","comfortable","formal","outside","massive","sad","corporate","distant","loose","rare","stupid","visible","liberal","flat","pleased","pure","curious","practical","upper","technical","male","appropriate","fat","just","due","mere","handsome","mental","conservative","positive","leading","naked","false","drunk","dirty","friendly","constant","well","used","emotional","internal","odd","historical","female","ill","broken","capable","southern","pleasant","bare","minor","eager","lucky","urban","steady","fiscal","rough","primary","reasonable","typical","inner","favorite","attractive","slight","innocent","limited","straight","pink","excellent","double","dramatic","violent","honest","electric","fellow","substantial","opposite","awful","severe","joint","armed","hungry","remarkable","increased","gentle","illegal","middle","bitter","mass","permanent","increasing","damn","golden","correct","intense","round","northern","proposed","so-called","criminal","healthy","plain","vital","blind","native","intellectual","unknown","extreme","existing","raw","prime","brilliant","sensitive","extraordinary","sufficient","remaining","ultimate","unique","royal","initial","negative","fundamental","nearby","smart","strategic","educational","unlikely","smooth","modest","conventional","giant","scared","cheap","dear","delicate","anxious","valuable","standard","desperate","lonely","diplomatic","firm","wise","principal","congressional","occasional","ugly","vice","radical","faint","working","absolute","intelligent","racial","mutual","silly","fast","musical","tight","complicated","numerous","crucial","square","contemporary","bloody","western","endless","inevitable","environmental","constitutional","rapid","worried","lost","genuine","temporary","democratic","rural","regional","given","painful","literary","chemical","sophisticated","decent","academic","awake","conscious","revolutionary","surprising","elderly","agricultural","psychological","pregnant","live","adequate","superior","grateful","prominent","frightened","remote","overall","stiff","harsh","electronic","spiritual","okay","closed","excited","convinced","long-term","unexpected","dull","evident","civilian","mysterious","romantic","impressive","continuing","exciting","logical","peculiar","exact","widespread","foolish","extensive","evil","continued","confident","generous","legislative","stable","vulnerable","elegant","embarrassed","hostile","efficient","blond","dumb","advanced","defensive","outer","neat","estimated","wealthy","dying","loud","creative","acceptable","unhappy","sheer","competitive","concrete","reluctant","precious","tremendous","burning","precise","uncertain","holy","artificial","vague","ideal","universal","moderate","subtle","mild","peaceful","assistant","invisible","casual","crowded","crude","running","classic","controversial","ridiculous","frequent","grim","accurate","detailed","goddamn","fun","fierce","cruel","incredible","blank","dim","suitable","classical","elaborate","collective","eastern","legitimate","aggressive","rear","administrative","automatic","dependent","ashamed","distinct","fit","clever","brave","ethnic","maximum","relative","primitive","uncomfortable","profound","sacred","biological","identical","furious","loyal","rational","mechanical","mean","naval","noble","ambitious","purple","historic","dominant","suburban","developing","calm","frozen","subsequent","charming","damp","fixed","rigid","offensive","electrical","shy","continuous","urgent","weary","immense","splendid","downtown","uneasy","disappointed","helpless","voluntary","polite","junior","gross","striking","overwhelming","unconscious","steep","outstanding","tender","tragic","costly","miserable","near","useless","welcome","external","helpful","weekly","middle-aged","suspicious","old-fashioned","technological","damned","awkward","visual","organized","ideological","orange","horrible","strict","magnificent","deadly","dusty","mighty","puzzled","bold","global","passing","magic","fond","judicial","missing","definite","changing","rubber","theoretical","satisfied","promising","abstract","excessive","comparable","fatal","distinguished","inadequate","slender","artistic","known","sympathetic","favorable","cheerful","faithful","delighted","unnecessary","sole","cautious","productive","reliable","patient","sensible","desirable","depressed","atomic","able","instant","relevant","alien","spectacular","lesser","swift","comic","enthusiastic","marvelous","experimental","weird","retired","fascinating","content","medieval","inclined","bored","ruling","flying","consistent","organic","alleged","grave","smiling","realistic","amazing","exotic","symbolic","confused","underground","spare","philosophical","vigorous","troubled","shallow","amused","lively","genetic","impatient","brutal","solar","unfair","formidable","tense","unfortunate","minimum","sleeping","secondary","shiny","jealous","insane","gay","vivid","wounded","hurt","intimate","monthly","sour","socialist","worthy","preliminary","colonial","middle-class","alternative","influential","unpleasant","comprehensive","devoted","upset","secure","absurd","neutral","frightening","profitable","fragile","civilized","slim","partial","added","fearful","optimistic","isolated","eternal","vocal","beloved","alert","verbal","rising","skilled","antique","municipal","written","restless","outdoor","governmental","driving","sore","informal","loving","retail","hidden","determined","monetary","convenient","thoughtful","colored","progressive","bizarre","sweeping","fancy","expected","fantastic","editorial","intact","bottom","multiple","well-known","nasty","protective","acute","combined","related","fortunate","earnest","divine","passionate","icy","noisy","vicious","dreadful","apt","boring","unprecedented","decisive","sunny","marked","experienced","disturbing","satisfactory","sober","random","electoral","shocked","deliberate","coming","orderly","surrounding","unwilling","inherent","mixed","naive","dense","hopeless","aesthetic","supreme","encouraging","institutional","solemn","stubborn","required","relaxed","bald","frantic","exclusive","rotten","filthy","flexible","explicit","glorious","lean","ignorant","extended","embarrassing","architectural","mortal","corrupt","hopeful","regulatory","valid","characteristic","tribal","capitalist","diverse","functional","improved","ironic","graceful","unaware","respectable","eligible","lousy","established","postwar","objective","wary","elementary","moving","superb","cute","minimal","meaningful","notable","structural","developed","rolling","fashionable","persistent","distinctive","terrific","thorough","skeptical","secular","chronic","level","everyday","visiting","infinite","short-term","terrorist","youthful","unemployed","forced","liquid","explosive","rude","colorful","renewed","semantic","astonishing","passive","heroic","gleaming","indifferent","vertical","prior","anonymous","absent","customary","mobile","uniform","solitary","probable","amazed","petty","bleak","athletic","tentative","harmless","ample","right-wing","polished","obscure","sincere","dried","intensive","equivalent","convincing","idle","vacant","mature","amusing","competent","ominous","savage","motionless","tropical","blunt","drunken","delicious","lazy","ragged","longtime","nationwide","startling","civic","freezing","muscular","circular","imperial","irrelevant","countless","gloomy","startled","disastrous","skinny","hollow","upward","ethical","underlying","careless","wholesale","abandoned","unfamiliar","mandatory","imaginary","bewildered","annoyed","magnetic","dazzling","lengthy","stern","surgical","clinical","full-time","metropolitan","moist","unlike","doubtful","prosperous","keen","awesome","humble","interior","psychiatric","clumsy","outraged","theatrical","educated","gigantic","scattered","privileged","sleepy","battered","meaningless","predictable","gradual","miniature","radioactive","prospective","aging","destructive","authentic","portable","bearded","balanced","shining","spontaneous","bureaucratic","inferior","sturdy","cynical","exquisite","talented","immune","imaginative","ripe","shared","kind","parliamentary","glowing","frail","astonished","forward","inside","operational","faded","closing","pro","coastal","shrewd","preoccupied","celebrated","wicked","bourgeois","marginal","transparent","dynamic","psychic","plump","coarse","bleeding","striped","eventual","residential","hysterical","pathetic","planned","fake","imminent","sentimental","stunning","worldwide","militant","sizable","representative","incapable","provincial","poetic","injured","tactical","selfish","winning","foul","repeated","novel","dubious","part-time","abrupt","lone","overseas","grey","varied","cooperative","muddy","scheduled","legendary","arrogant","conspicuous","varying","devastating","vulgar","martial","amateur","mathematical","deaf","scarce","specialized","honorable","outrageous","confidential","fallen","goddamned","five-year","feminine","monstrous","brisk","systematic","exhausted","frank","lunar","daring","shadowy","respected","stark","accepted","successive","pending","prolonged","unseen","uniformed","wretched","sullen","arbitrary","drastic","crooked","resulting","intricate","unpredictable","printed","utter","satisfying","delightful","linguistic","shabby","statistical","accessible","prestigious","trivial","waiting","futile","prepared","aged","misleading","cognitive","shocking","childish","elected","magical","forthcoming","exceptional","gifted","stricken","fiery","cardboard","shaky","conflicting","commanding","starving","accustomed","rocky","long-range","floating","sinister","potent","phony","lasting","understandable","curved","barren","lethal","toxic","deserted","ambiguous","notorious","synthetic","worthwhile","imported","intent","reduced","painted","taut","sociological","questionable","crisp","pointed","harmful","horizontal","rival","somber","benign","prevailing","selected","organizational","excess","dedicated","veteran","implicit","prudent","plausible","confusing","smoking","large-scale","subdued","constructive","marital","scarlet","rugged","darkened","untouched","above","matching","covert","communal","sticky","affluent","energetic","stale","controlled","qualified","reminiscent","shut","blonde","handy","ritual","straightforward","terminal","dizzy","sane","twisted","occupied","finished","opposing","sly","depressing","irregular","marine","communist","obscene","wrinkled","unsuccessful","gracious","static","consecutive","reserve","exposed","scholarly","sleek","reckless","oral","comforting","pressing","swollen","viable","carved","obsessed","projected","hideous","unthinkable","mock","susceptible","respective","goddam","downward","memorable","worn","raised","glittering","beneficial","lingering","patriotic","stunned","hairy","worrying","lighted","sexy","abundant","tangled","perpetual","irresistible","terrified","compelling","unmistakable","feeble","uneven","trained","folded","relentless","killed","gorgeous","conservation","serene","eerie","premature","dismal","competing","risky","unacceptable","indirect","witty","muffled","feasible","interstate","heated","uncommon","accidental","queer","innovative","parallel","fried","unnatural","cracked","persuasive","integrated","ongoing","homosexual","sound","fertile","canned","preceding","worldly","onstage","declining","advisory","juvenile","slippery","numb","postal","olive","eccentric","lay","chilly","shrill","ceremonial","registered","boiling","contradictory","irresponsible","then","industrialized","obsolete","rusty","inflationary","split","discreet","intolerable","barefoot","territorial","outspoken","audible","adverse","associate","impending","decorative","luminous","two-year","expanding","unchanged","outstretched","momentary","good-looking","cunning","overnight","sprawling","unbelievable","bland","liable","terrifying","televised","appealing","breathless","alarming","supporting","greasy","affirmative","guiding","homeless","triumphant","rainy","stolen","empirical","timid","provocative","knowledgeable","pragmatic","touching","desired","amiable","attempted","humane","adjacent","superficial","greedy","assorted","elusive","ruthless","lush","soothing","imposing","preferred","lavish","pervasive","managing","sandy","inappropriate","desolate","nude","reassuring","shimmering","first-class","unfinished","insistent","comparative","conceivable","admirable","courageous","aristocratic","meager","subjective","vain","disgusted","dual","towering","responsive","ailing","compact","torn","sortal","entertaining","dreary","metallic","tedious","irrational","immoral","teen-age","interim","jagged","selective","volatile","cozy","unanimous","unlimited","hired","cosmic","indoor","retarded","gold","fabulous","dignified","long-distance","high-school","classified","luxurious","insufficient","pious","incomplete","oblivious","imperialist","stately","lifelong","subordinate","extravagant","intrinsic","unpopular","scant","surplus","radiant","ruined","grotesque","hazardous","disabled","intriguing","worthless","reported","hoarse","utmost","muted","bony","disgusting","monumental","pleasing","sterile","agreeable","three-year","tricky","lucrative","respectful","inexpensive","bulky","troublesome","affectionate","coherent","unreasonable","nineteenth-century","curly","indispensable","nursing","incompetent","governing","alternate","suspected","left-wing","refined","overt","chilling","virtual","devoid","perverse","enduring","outright","overhead","unnoticed","nonprofit","pointless","appalling","dental","chosen","enlightened","robust","commonplace","damaging","conscientious","eloquent","erratic","applied","merry","ardent","flowing","incoming","chaotic","noticeable","pitiful","locked","swelling","definitive","homemade","super","pronounced","kindly","prone","attentive","unstable","unrelated","charitable","armored","unclear","tangible","medium","winding","slick","credible","frustrating","shifting","spacious","day-to-day","surviving","expanded","arid","unwanted","unbearable","hesitant","recognizable","multinational","abdominal","murderous","glossy","mute","working-class","insignificant","ingenious","masculine","blessed","gaunt","miraculous","unconstitutional","parental","rigorous","bodily","impersonal","backward","computerized","four-year","unmarried","wry","resident","luxury","high-level","partisan","powerless","seasonal","self-conscious","triple","onetime","ecological","periodic","racist","exaggerated","facial","erotic","unreal","durable","manual","rounded","concentrated","literal","mystical","stimulating","staggering","tempting","last-minute","erect","feudal","head","emerging","hind","brooding","candid","paranoid","defective","linear","immortal","shattered","unsure","swinging","compatible","ghastly","investigative","rosy","convicted","sensational","committed","makeshift","tolerant","forceful","supernatural","joyous","limp","improper","hanging","sliding","renowned","tattered","nonexistent","supportive","frustrated","undercover","handicapped","apprehensive","plentiful","authoritative","sustained","disappointing","hereditary","photographic","impoverished","ornate","respiratory","substantive","acting","nutritional","unofficial","innumerable","prevalent","dire","menacing","outward","brittle","hasty","sparkling","sled","geographical","therapeutic","melancholy","adolescent","hearty","disturbed","sweaty","poisonous","paid","ineffective","humorous","burly","rebellious","reddish","stout","teenage","eminent","rhythmic","physiological","guaranteed","opaque","folding","fleeting","full-scale","low-income","infectious","stringent","stained","beige","stirring","soaring","glamorous","airborne","improbable","austere","anticipated","designated","oval","restrictive","yearly","precarious","relieved","said","feverish","occupational","holding","speculative","abnormal","challenging","healing","boyish","forbidding","divorced","famed","sluggish","struggling","united","undesirable","steaming","consulting","answering","recreational","accompanying","cramped","journalistic","neighboring","fictional","chopped","phenomenal","bankrupt","illicit","advancing","upcoming","racing","protected","padded","venerable","fuzzy","behavioral","roast","mocking","reactionary","inefficient","packed","sloppy","sparse","foster","revealing","reverse","gaping","blue-collar","thankful","down","unimportant","traveling","corresponding","maternal","autonomous","conceptual","smoky","baked","stuffed","murky","totalitarian","ghostly","seeming","flickering","sensual","clenched","offshore","stinging","oppressive","strained","messy","executive","evolutionary","theological","damaged","unrealistic","rectangular","off","mainstream","benevolent","thirsty","blinding","loaded","applicable","unused","crushed","tan","factual","involuntary","brand-new","akin","scary","modified","mindless","born","feminist","integral","uncanny","aloof","spreading","watery","playful","stocky","wasted","compulsory","indignant","pertinent","incredulous","simultaneous","turbulent","framed","aching","falling","cardiac","trim","silvery","accused","pastoral","barbed","adjoining","inspired","courteous","skillful","majestic","gilded","published","perennial","upright","seasoned","continual","papal","victorious","optical","ecstatic","agonizing","shameful","expressive","inconsistent","insulting","cloudy","defiant","restricted","approaching","aggregate","orthodox","unified","all-out","wooded","nationalist","favored","lofty","assured","smug","earthly","improving","instrumental","stray","clandestine","managerial","animated","intended","flawed","bent","clerical","outgoing","righteous","unspoken","poignant","faulty","defeated","authoritarian","treacherous","catastrophic","refreshing","unidentified","suicidal","sickly","disciplined","meticulous","preferable","trusted","hectic","husky","distraught","select","snowy","ferocious","crumpled","humiliating","divided","crippled","infamous","chic","broke","sovereign","continental","idealistic","first-rate","guarded","learned","nameless","runaway","metaphysical","senseless","boiled","needy","silver","recorded","polar","real-estate","stormy","incomprehensible","wiry","raging","composite","flamboyant","crimson","reproductive","intermediate","ubiquitous","repressive","hefty","listening","good-natured","parochial","stylish","high-tech","flaming","coronary","overweight","bathing","three-day","tidy","beleaguered","manifest","ludicrous","indigenous","adamant","placid","inept","exuberant","stony","salty","seductive","accomplished","impassive","grazing","congenial","misguided","wide-eyed","revised","bass","sonic","budgetary","halfway","ensuing","admiring","palpable","nightly","hooded","best-known","eighteenth-century","dissident","morbid","incumbent","demanding","inexperienced","hazy","revolving","rented","disadvantaged","innate","dietary","minute","cultivated","sealed","contemptuous","rhetorical","conciliatory","articulate","jobless","macho","forgotten","lifeless","proven","latent","secretive","perilous","token","graphic","alcoholic","overdue","permissible","shattering","preventive","illiterate","back","atmospheric","thermal","quaint","negotiated","preposterous","temporal","restrained","triangular","mayoral","spatial","heady","biblical","fitting","pessimistic","mammoth","allied","failed","intuitive","nagging","tidal","angular","speechless","finishing","protracted","watchful","businesslike","automated","versatile","booming","pouring","misty","deceptive","sunken","singular","suspended","unworthy","immigrant","expressionless","airy","mournful","neurotic","cubic","unauthorized","economical","fund-raising","captive","blatant","far-reaching","subversive","imperfect","jolly","inaccurate","resentful","strenuous","suffering","hardened","malicious","unjust","perceptive","newborn","promised","differing","virgin","alarmed","grassy","frivolous","apologetic","wasteful","endangered","unarmed","adept","unavoidable","approved","trembling","stuck","high-ranking","crushing","prescribed","dependable","fragrant","expansive","unfriendly","covered","bemused","digital","probing","sloping","man-made","festive","unilateral","unmarked","bipartisan","statewide","burgeoning","devout","sickening","mediocre","adventurous","elevated","suggestive","accountable","virtuous","lame","heavenly","bruised","unbroken","irritable","affected","inconceivable","sometime","vile","baggy","timely","glistening","imagined","unprepared","unresolved","windy","humanitarian","overriding","detached","annoying","narrative","interminable","appalled","penal","unsatisfactory","instinctive","variable","cumulative","obedient","deficient","colossal","unaffected","extinct","routine","microscopic","compassionate","nominal","forlorn","distorted","mistaken","enclosed","infected","fervent","analogous","frigid","instructive","appointed","one-way","gnarled","problematic","sardonic","two-hour","hypothetical","prompt","anguished","electromagnetic","sensuous","homely","beaten","malignant","rotting","concealed","peripheral","creaking","impeccable","khaki","grinning","irreversible","rampant","wondrous","inward","manufactured","grisly","cooked","discriminatory","cerebral","knowing","auxiliary","operative","losing","genial","phonetic","ecclesiastical","sarcastic","incorrect","ruddy","well-to-do","inexplicable","unreliable","developmental","woolen","agitated","lyrical","consequent","calculated","molecular","pompous","present-day","shaggy","even","inhuman","sublime","diagnostic","manly","raucous","balding","after","bilateral","mounted","blackened","assembled","separated","gaudy","evangelical","darling","juicy","impotent","receptive","irritating","pulmonary","dazed","cross-country","unavailable","parked","habitual","lexical","lowered","unwise","planetary","throbbing","enigmatic","superstitious","threatening","manned","childlike","sporting","right-hand","adult","reflective","white-haired","discernible","celestial","prodigious","translucent","equitable","epic","frayed","arduous","flimsy","penetrating","howling","disparate","alike","all-time","deformed","comical","inert","procedural","resistant","vibrant","geographic","wistful","specified","rightful","spirited","unborn","enjoyable","regal","cumbersome","burned","frenzied","gubernatorial","deteriorating","haunted","evasive","neglected","anthropological","inescapable","clear-cut","visionary","bloated","accumulated","agrarian","pained","dwindling","heightened","gray-haired","distressing","grinding","insecure","archaic","piercing","fluent","leisurely","giddy","slimy","oncoming","short-lived","spinal","wholesome","unanswered","illegitimate","staunch","two-day","rumpled","speedy","soaked","rocking","invaluable","gallant","tacit","finite","inviting","sporadic","powdered","cheery","volcanic","optional","mischievous","flowered","contagious","automotive","inflated","mythic","analytical","infrared","two-week","binding","ancestral","dissatisfied","upstate","veritable","unaccustomed","oily","monotonous","seated","feeding","fluorescent","undue","impassioned","picturesque","vocational","tranquil","tumultuous","rustic","patterned","two-story","pagan","flash","playing","exhilarating","maiden","three-dimensional","mythical","thriving","drab","black-and-white","honorary","dingy","founding","imperative","indistinguishable","lightweight","avid","dreamy","everlasting","obsessive","tional","homogeneous","inner-city","changed","tame","colorless","haggard","implacable","altered","unequal","focal","perceptual","literate","priceless","diminishing","harmonious","dark-haired","fatty","squat","undecided","banal","fruitful","pioneering","innocuous","cordial","rewarding","unsafe","maritime","overcrowded","timeless","fledgling","nostalgic","abreast","one-time","humid","astronomical","one-man","deepening","blazing","fleshy","dishonest","succeeding","qualitative","needless","rickety","joyful","stated","ambivalent","hybrid","six-month","limiting","workable","sleepless","unpaid","mundane","flashy","stagnant","bumper","recurring","sinful","immaculate","synonymous","measured","thrilling","long-standing","unruly","bewildering","unfit","edgy","numerical","sumptuous","fragmented","puffy","elastic","high-pitched","momentous","woven","unsteady","unnamed","cosmetic","snap","impenetrable","floral","waving","promotional","tenuous","lonesome","embroidered","strident","cherished","aghast","fundamentalist","white-collar","afloat","disruptive","law-enforcement","gathered","indefinite","intervening","publicized","geometric","disciplinary","descriptive","wavy","edible","disgruntled","obligatory","untrue","amber","snug","resolute","awed","simplistic","grandiose","crippling","high-speed","mounting","glaring","small-town","cavernous","hushed","wage-price","demographic","diseased","unpublished","causal","defenseless","sheltered","dormant","compulsive","loved","willful","truthful","punitive","disposable","ajar","drowsy","statutory","tanned","proprietary","informed","unheard","decision-making","transient","unlawful","dour","negligible","underwater","optimum","illusory","imaginable","borrowed","divergent","looking","exempt","contentious","forbidden","cowardly","masked","crazed","silken","parched","furry","wandering","insensitive","over-all","elated","waxed","veiled","envious","insidious","scrawny","unwarranted","lithe","abrasive","pretentious","far-off","murdered","deft","prickly","musty","shapeless","incongruous","gruesome","honored","perceived","grieving","unspecified","dizzying","privy","noteworthy","charred","median","fearless","twisting","unattractive","flawless","welcoming","flushed","hardy","glum","scenic","devious","recurrent","distasteful","jubilant","ballistic","hilarious","naughty","bustling","discarded","pristine","exemplary","fading","complacent","incessant","engaging","twentieth-century","protectionist","rudimentary","traumatic","steamy","emphatic","hard-line","teeming","generating","stuffy","connecting","stationary","genteel","populist","supple","hateful","retrospective","glazed","lawful","arched","tiresome","lucid","reserved","pivotal","grimy","surly","anti-Soviet","contrary","quarterly","old-time","residual","spiral","decaying","threatened","docile","appreciative","jovial","fascist","worrisome","red-haired","undisturbed","creamy","well-dressed","serial","existential","mountainous","pastel","self-sufficient","spoken","express","tasty","maroon","infrequent","deceased","full-fledged","transitional","leafy","gravitational","furtive","prophetic","nasal","unwelcome","troubling","immobile","merciful","uncontrollable","impartial","unfavorable","attendant","associated","high-rise","vascular","fateful","concerted","rash","stubby","paramount","impulsive","fraudulent","drooping","reciprocal","usable","fast-food","touchy","astute","oversized","mottled","slack","fruitless","unhealthy","decorated","shady","shaped","fanciful","quivering","charismatic","sordid","oppressed","inaccessible","fastidious","brazen","gloved","crumbling","underdeveloped","scarred","rambling","incipient","remedial","derelict","incompatible","fanatical","smoked","secondhand","hypnotic","failing","marching","flattened","paradoxical","unskilled","esthetic","tolerable","pungent","substitute","soggy","terse","tiring","fictitious","manageable","inventive","haughty","normative","premier","grudging","vested","exhausting","cross-legged","self-evident","away","horrified","prolific","incoherent","quantitative","full-length","year-round","unkind","provisional","exterior","brash","inconclusive","landed","breathtaking","acrid","noted","resultant","long-time","resounding","lovable","hypocritical","plush","foggy","acknowledged","idiotic","tracking","ceramic","taxable","enterprising","flashing","wee","barbaric","deafening","orbital","lurid","dated","hated","buoyant","mating","pictorial","overlapping","lax","archetypal","manic","limitless","puzzling","condescending","hapless","meek","faceless","uncommitted","horrid","greenish","unorthodox","unending","accelerated","day-care","undeniable","bushy","searing","fearsome","unharmed","divisive","overpowering","diving","telling","determining","uptight","cast","enlarged","ebullient","disagreeable","insatiable","grown-up","demented","puffing","inconvenient","uncontrolled","inland","repulsive","unintelligible","blue-eyed","pallid","nonviolent","dilapidated","unyielding","astounded","marvellous","low-cost","purposeful","courtly","predominant","conversational","erroneous","resourceful","converted","disconcerting","oblique","dreaded","indicative","silky","six-year","front-page","biting","flowering","sunlit","licensed","unspeakable","adrift","awash","identifiable","girlish","zealous","spooky","uncompromising","deserving","driven","certified","unlucky","temperate","budding","impractical","public-relations","inflexible","sensory","pornographic","outlandish","resonant","belligerent","wan","leftover","spotted","soybean","easygoing","vengeful","proportional","inaugural","dank","screaming","heterosexual","sliced","year-old","considerate","thunderous","distressed","warring","assertive","foreseeable","psychotic","intermittent","anti-Communist","generalized","unable","molten","excruciating","illustrious","voluminous","offending","trustworthy","grating","laughing","one-year","industrious","uninterrupted","dashing","speaking","metabolic","flattering","one-sided","ineffectual","primal","digestive","taped","floppy","jaunty","practiced","walled","hospitable","dutiful","melodramatic","intestinal","cluttered","conclusive","complementary","unprotected","buzzing","attributable","tasteless","forthright","wily","hourly","delayed","sweating","affable","studied","chubby","thyroid","chilled","conducive","childless","faltering","authorized","buried","land-based","observable","hurried","curving","dismayed","pernicious","upturned","believable","questioning","syndicated","pharmaceutical","high-risk","resigned","discrete","likable","imprisoned","cocky","outdated","autocratic","ablaze","askew","grammatical","wintry","incidental","matter-of-fact","disputed","exorbitant","low-level","sodden","skeletal","disproportionate","soiled","cellular","ephemeral","perfunctory","inconsequential","flourishing","intentional","two-way","elemental","whispered","four-day","stinking","informative","tenacious","outlying","virulent","horrendous","horrifying","burnt","longstanding","senile","unmoving","deprived","interpersonal","intimidating","posh","dainty","portly","nondescript","inquisitive","exiled","capricious","scandalous","severed","debilitating","widowed","horny","sallow","up-to-date","self-contained","carefree","boisterous","coordinated","anti-Semitic","superfluous","metric","expressed","enchanting","disorderly","paternal","wanton","frightful","free-lance","extremist","lined","scornful","inseparable","obese","ponderous","imperious","indistinct","adrenal","belated","rippling","valiant","livid","mystic","cracking","subterranean","invading","rusted","esoteric","red-faced","segregated","lanky","departmental","allergic","predatory","enforced","anti-inflation","implied","flagrant","best-selling","haphazard","trailing","seedy","real-life","unannounced","utilitarian","roving","despairing","immature","simulated","embattled","poisoned","patronizing","baffled","centralized","weathered","weeping","mutilated","painstaking","tax-exempt","socioeconomic","tearful","stringy","projecting","low-key","single-minded","shadowed","vehement","darn","fluffy","apocalyptic","completed","intelligible","furnished","elongated","worsening","eclectic","bacterial","earthy","sagging","wide-ranging","face-to-face","settled","dogmatic","anti","secluded","baffling","coy","pathological","echoing","bridal","autobiographical","instantaneous","ornamental","satirical","voluptuous","movable","kinetic","merciless","tireless","three-month","unconcerned","impromptu","turning","follow-up","retaliatory","arcane","waterproof","justifiable","glassy","unearthly","shuttered","inverted","bogus","petrified","simmering","guided","gritty","widening","generic","pretrial","returning","boundless","swirling","northeastern","swell","tive","minuscule","estranged","upbeat","explanatory","repetitive","repressed","vindictive","shrinking","canny","little-known","hydraulic","unrelenting","looming","supersonic","justified","lukewarm","unmoved","blurred","double-breasted","sanitary","unforgettable","diligent","unconventional","ashen","wordless","stainless","inlaid","irritated","spotless","pudgy","yellowish","lateral","adopted","lowly","obnoxious","utopian","called","unimaginable","hairless","foregoing","opulent","garish","nocturnal","rousing","unexplained","cosmopolitan","milky","medium-sized","all-night","bloodshot","rueful","hard-working","crafty","familial","iced","violet","arctic","ceaseless","exasperated","warped","aquatic","gruff","terrestrial","contrasting","egalitarian","needful","spent","untrained","escalating","liberated","long-haired","abortive","syntactic","consummate","lumpy","spoiled","ten-year-old","talkative","whimsical","weighty","audio","inflammatory","deplorable","spicy","corrugated","morose","sobering","southwestern","three-year-old","methodical","prehistoric","carpeted","smelly","processed","overheated","interstellar","agile","approximate","sadistic","living-room","irate","smashed","frontal","venereal","indiscriminate","suggested","cultured","creeping","recognized","toothless","handmade","mellow","fetal","disinterested","gratifying","trusting","small-scale","intravenous","crashing","exhaustive","afire","clammy","sleazy","florid","heartless","transcendent","restored","demonic","abusive","avowed","shrunken","objectionable","tailored","arms-control","listless","polluted","palatable","funded","elective","entrenched","classy","operatic","daunting","roaring","preferential","languid","three-hour","virile","inspiring","enhanced","scrupulous","bottomless","ginger","wispy","advantageous","rapt","umbilical","uphill","ordered","enraged","detrimental","curt","exalted","hard-pressed","intangible","fussy","forgiving","facile","populous","condemned","mashed","hard-boiled","introductory","rowdy","switching","perplexing","spilled","southeastern","undulating","fractured","inherited","inscrutable","measurable","stunted","hormonal","stylized","hierarchical","air-conditioned","aimless","subsidized","paying","symmetrical","nomadic","cloudless","reigning","thatched","perceptible","anesthetic","anti-American","miscellaneous","homesick","preparatory","seven-year","big-city","decadent","searching","all-important","inanimate","senatorial","diminutive","soft-spoken","contingent","dusky","smashing","precipitous","bulging","standardized","biographical","restive","indecent","upper-class","ecumenical","interchangeable","lumbering","fascinated","untidy","indulgent","leaden","wanted","endemic","doomed","wanting","receiving","engaged","unparalleled","abbreviated","malevolent","wishful","carnival","world-wide","protruding","resplendent","stranded","structured","biased","frosty","northwestern","viral","mindful","paved","indeterminate","painless","second-floor","geological","permissive","downhill","unsuspecting","expectant","fabled","jittery","windowless","evocative","unsolved","disoriented","monastic","soluble","misshapen","antiquated","repugnant","non-Communist","retiring","shaded","combative","high-powered","resilient","antagonistic","starched","vice-presidential","speckled","lopsided","bluish","late-night","prim","unrestrained","almighty","tyrannical","unkempt","menstrual","bleached","overgrown","idiosyncratic","shoddy","hallowed","trying","halting","princely","drugged","gratuitous","descending","fatherly","avant-garde","laborious","pinched","disguised","caustic","bespectacled","handwritten","goodly","itinerant","cryptic","undisclosed","affordable","outmoded","expedient","moody","tepid","firsthand","digging","elitist","observed","chartered","slain","five-day","unimpressed","tactful","idyllic","prostrate","ramshackle","expert","deferred","undistinguished","prized","transatlantic","crystalline","tacky","haunting","nutritious","bereft","turquoise","time-consuming","sanguine","culinary","fraught","precocious","assigned","scrambled","advisable","nationalistic","long-awaited","unwrapped","unchallenged","circumstantial","pleasurable","compressed","humanistic","unforeseen","diversified","frenetic","disapproving","proletarian","conspiratorial","featureless","going","commendable","no-nonsense","chipped","surreal","salient","pissed","insurmountable","backstage","contented","indebted","adoring","one-room","prewar","potted","accelerating","thorny","possessive","abiding","ever-increasing","bloodless","high-technology","counterproductive","attracting","entrepreneurial","cooling","unoccupied","craggy","leathery","degenerate","additive","weakened","quilted","untold","incandescent","intractable","middle-income","abject","self-made","gaseous","anal","displaced","unabashed","immutable","fluttering","ten-year","bearable","stamped","darkening","beefy","petite","charging","high-quality","left-hand","age-old","checkered","stupendous","priestly","loath","endearing","exacting","correctional","freak","sneaky","disgraceful","unholy","oriental","wayward","societal","hard-core","bilingual","flipping","staid","paramilitary","heartfelt","shapely","kosher","heedless","incurable","controlling","in-house","choral","manicured","cardinal","inconspicuous","steely","vanishing","misplaced","centre-fire","enchanted","unfounded","wrecked","womanly","delirious","deposed","panicky","differential","tawny","articulated","coded","wide-open","unregulated","lenient","feathered","simplified","beguiling","sectarian","producing","tiled","inorganic","frosted","lusty","scented","rotating","grievous","dissimilar","salaried","unequivocal","strangled","grubby","alluring","downcast","restraining","unjustified","contaminated","lacy","cinematic","second-class","splintered","adorable","derisive","state-owned","requisite","fleeing","uncomplicated","motherly","inter","high-heeled","climatic","republican","unqualified","leveraged","intercontinental","uncharacteristic","compositional","unwritten","patriarchal","brusque","unresponsive","replete","corrective","reflected","scraping","doctoral","premium","deductible","alternating","amorous","overjoyed","recalcitrant","presumptuous","vaulted","declared","inexorable","groggy","diminished","restful","retroactive","presumed","monolithic","curtained","tortured","ground","trendy","brassy","prosaic","inactive","chaste","bumpy","aggrieved","corny","centrist","trapped","noxious","jerky","concomitant","withholding","poorly","stolid","unguarded","methodological","primordial","retreating","telescopic","sidelong","off-duty","pleated","dissenting","agreed","double-action","optimal","plaintive","banned","kindred","quintessential","impervious","jumping","disenchanted","observant","congested","second-rate","reasoned","extrinsic","infantile","transitory","coveted","small-time","doctrinal","incomparable","jaded","special-interest","sociable","shameless","coloured","ascending","fraternal","queasy","wont","exhilarated","salted","disquieting","listed","unchanging","nine-year-old","unrestricted","uppermost","reputable","dummy","skimpy","crusty","corrosive","bubbling","decrepit","unsuitable","snarling","destitute","illuminating","systemic","material","unwashed","rushing","dialectical","jeweled","attached","liberating","judicious","errant","vanished","worn-out","erstwhile","uninformed","twelve-year-old","longterm","petulant","twin","self-righteous","afflicted","snappy","tantamount","sworn","unethical","drained","hydroelectric","perplexed","logistical","concentric","unifying","lunatic","invincible","diffident","inexhaustible","discouraging","dreamlike","artful","rolled","suppressed","secretarial","smoldering","redundant","forensic","million-dollar","self-styled","earned","weightless","signed","compensatory","glacial","unmanned","stalwart","funky","intensified","uninterested","submerged","urbane","glib","ascetic","contractual","warlike","high-priced","diagonal","cylindrical","gargantuan","illuminated","unconditional","hulking","supplementary","dictatorial","puny","sedate","moonlit","eight-year-old","gullible","counterfeit","alienated","spinning","analytic","nimble","adaptive","individualistic","numbered","blissful","insolent","supplemental","delectable","inordinate","unbalanced","tormented","unchecked","aspiring","punishing","self-serving","crossed","discretionary","box-office","snow-covered","improvised","squalid","orphaned","grizzled","unsmiling","disappearing","affiliated","readable","blocking","bullish","contending","burned-out","bloodied","subsidiary","complimentary","unclean","scanty","uprooted","farfetched","solicitous","regulated","threadbare","choppy","ever-present","negligent","nonstop","one-day","wild-eyed","infuriating","vivacious","abominable","wrought","inaudible","braided","transcendental","desultory","climactic","appellate","interlocking","submissive","unmatched","dapper","demeaning","adaptable","well-meaning","lustrous","tax-free","ungrateful","gentlemanly","missed","loathsome","incalculable","blistering","amenable","tremulous","massed","nonpartisan","unsettled","three-story","succulent","trite","masterful","reticent","unsettling","proverbial","strapping","spurious","invulnerable","paltry","embryonic","repeating","neural","sultry","metaphorical","foreign-policy","linked","pubic","beaming","ministerial","phantom","quizzical","hilly","cold-blooded","gregarious","three-piece","untroubled","bisexual","pensive","unpretentious","exploratory","unscathed","irrepressible","pelvic","newfound","starry","corned","overworked","illogical","unfaithful","interrelated","saintly","overcast","connected","ungainly","organizing","carnal","philosophic","nationalized","fickle","ultraviolet","crass","undeveloped","unprofitable","sheepish","archaeological","out-of-town","balmy","spongy","infallible","callous","scathing","rheumatic","audacious","participating","swarthy","hand-held","comatose","modernist","stellar","antinuclear","delinquent","time-honored","presiding","relaxing","high-pressure","impetuous","hypodermic","fringed","favourite","unscrupulous","inspirational","mystified","wobbly","intrepid","deferential","burdensome","stored","supervisory","seventeenth-century","six-day","interdependent","updated","all-powerful","unitary","stand-up","laconic","penniless","steadfast","dogged","scholastic","convertible","mingled","sorrowful","symptomatic","stylistic","well-intentioned","consuming","sketchy","weakening","generative","atrocious","first-quarter","irrevocable","charged","stoned","dividing","apathetic","debatable","uncomprehending","overhanging","galloping","kinky","uncritical","suave","undisputed","spiky","inarticulate","extracurricular","guttural","impressed","departing","yellowed","discontented","adroit","high-fiber","second-hand","blinking","formless","unsavory","new-found","withered","collected","menial","unobserved","flabby","afterward","vanquished","stained-glass","hour-long","bittersweet","invalid","incriminating","commensurate","all-American","assumed","tried","cursory","absorbing","clearing","confirmed","stressful","depleted","eight-year","participatory","stripped","concave","regrettable","fortified","effortless","regressive","irreverent","collegiate","defunct","grainy","inhospitable","gripping","grizzly","restoring","arterial","busted","indomitable","demure","rabid","headlong","blue-green","bound","breezy","materialistic","uneducated","scruffy","cohesive","full-blown","cranky","motivated","mauve","hardworking","melodic","genital","decorous","comely","rife","purported","hurtful","six-foot","macabre","odious","convulsive","well-trained","heterogeneous","curled","pearly","spindly","latter-day","innermost","clipped","checked","masterly","laughable","naturalistic","tinkling","impudent","fitful","illustrated","speeding","roasted","in-depth","helluva","vigilant","empty-handed","forged","wrought-iron","disgraced","agonized","infirm","preserving","tasteful","onerous","shredded","impregnable","slanted","tainted","opened","first-time","machine-gun","bottled","seismic","fetid","saturated","insubstantial","full-page","aromatic","stingy","promiscuous","unlit","regimental","spellbound","streamlined","bereaved","ruffled","creepy","treasured","ensconced","one-party","well-educated","pert","mercantile","all-purpose","voracious","tortuous","despised","unadorned","offhand","qualifying","manipulative","indelible","well-established","revolting","ethereal","roasting","prohibitive","domed","whipped","overstuffed","garrulous","skittish","revived","heartening","jumpy","grilled","melted","unfocused","spectral","unproductive","top-level","life-size","three-way","negotiable","disloyal","turn-of-the-century","four-hour","unopened","devilish","amorphous","antiseptic","sharpened","primeval","unrecognizable","ineligible","expendable","deathly","auspicious","insoluble","inimical","unquestioned","far-flung","medicinal","deep-seated","formative","iridescent","fragmentary","distinguishable","auburn","closed-circuit","emeritus","third-floor","hazel","tumbling","departed","obstinate","portentous","quixotic","scorched","adjustable","winged","intrusive","taxing","high-ceilinged","barbarous","decreasing","sleeveless","unattended","tight-lipped","concluding","unobtrusive","starved","quirky","big-time","sooty","copious","stalled","scriptural","unconvincing","earthen","throaty","august","extant","sexist","exultant","cancerous","psychedelic","yielding","matched","chunky","unfathomable","concise","admitting","knitted","projective","euphoric","garbled","divisional","despondent","recommended","passable","vegetarian","indefatigable","irreparable","feisty","untenable","contrite","angelic","reputed","untimely","dejected","appreciable","remembered","hellish","rear-view","open-air","ill-fated","nonpolitical","factional","separatist","contributing","post-war","uneventful","metaphoric","unsound","unwitting","venomous","harried","engraved","collapsing","reformist","thematic","inclusive","cheering","springy","obliging","contemplative","unbridled","state-run","reflex","allegorical","geopolitical","disembodied","issuing","bountiful","alright","overbearing","muddled","congenital","distinguishing","absorbed","tart","french","autumnal","verifiable","grueling","crackling","aft","punishable","freckled","indestructible","imprecise","hard-nosed","thoughtless","through","proficient","pent-up","never-ending","hunted","defensible","arresting","across-the-board","spotty","orchestral","undefined","stacked","implausible","antitank","unwary","inflamed","sacrificial","oil-producing","leaky","mint","chronological","conquering","jumbo","three-week","addictive","uninhibited","substandard","contracting","degenerative","triumphal","flowery","cardiovascular","shaken","undefeated","unassuming","luscious","unperturbed","gleeful","sentencing","brawny","perfumed","mild-mannered","healthful","left-handed","rancid","well-defined","unmanageable","drowning","clinging","anachronistic","revered","enriched","capitalistic","good-by","invigorating","practicing","unsold","long-legged","unruffled","aboriginal","inane","bedraggled","early-morning","run-down","straight-backed","reverent","acquired","bestselling","top-secret","woolly","foolhardy","sticking","blue-black","impassable","overcome","coiled","front-line","tinted","acquisitive","slatted","octagonal","receding","investing","doctrinaire","all-white","caring","prejudiced","slow-moving","circulating","science-fiction","shortsighted","disaffected","lawless","chastened","lewd","rubbery","foaming","unsympathetic","ladylike","betrayed","neurological","shouting","good-sized","electrostatic","untoward","flabbergasted","citywide","unanticipated","knotted","whitewashed","year-end","enticing","migratory","multicolored","hashish","ascorbic","topless","heathen","spherical","filmy","deviant","centennial","proportionate","instructional","contrived","savvy","over-the-counter","fast-moving","measuring","uptown","compliant","favourable","unforgivable","undamaged","psychoanalytic","gebling","bubbly","ready-made","caged","ostentatious","superhuman","busing","cream-colored","self-destructive","ostensible","cobbled","whirling","released","showy","baleful","red-hot","named","monogamous","fallow","disdainful","cyclical","long-running","pitiless","diffuse","omnipresent","mossy","cutting","astounding","lyric","dark-blue","unsophisticated","indigent","coincidental","imperceptible","veterinary","coercive","multilateral","ageless","law-abiding","functioning","beneficent","crawling","overturned","steamed","comprehensible","oil-rich","undetected","ribbed","nautical","textured","fast-growing","nauseous","vaunted","paralyzed","maimed","short-range","impure","unintended","practicable","intermediate-range","unfulfilled","behind-the-scenes","backhand","voluble","goofy","apolitical","contraceptive","waning","blasted","sundry","profane","binary","rock-and-roll","ruinous","open-ended","next-door","withering","conical","flustered","decided","able-bodied","round-trip","decreased","half-empty","sponsored","riotous","stereotyped","five-minute","irreplaceable","harrowing","uninteresting","salutary","frugal","disjointed","cupped","freshwater","shaven","ravenous","bulbous","stepped-up","swaying","two-room","valued","planted","bright-eyed","unreadable","trucking","infatuated","dysfunctional","pinkish","futuristic","airtight","unseemly","sizzling","mercurial","conic","unfettered","undisciplined","unrecognized","well-publicized","income-tax","self-appointed","ice-cold","biochemical","contemptible","barefooted","droll","mythological","tree-lined","rearing","luxuriant","heartbreaking","tufted","well-organized","selfless","world-class","unwieldy","contested","rasping","downright","ingratiating","self-proclaimed","parasitic","graying","reformed","cautionary","untested","beaded","maniacal","eucalyptus","pliable","air-conditioning","moot","traceable","anti-abortion","antisocial","reprehensible","self-imposed","yellowing","teasing","porous","ersatz","unwavering","untouchable","underprivileged","auditory","escaping","subservient","unspoiled","anterior","fatuous","lordly","infernal","bouncing","taboo","orthopedic","spiteful","surging","nuts","esteemed","outlawed","pushy","displeased","self-confident","attainable","bowed","cast-iron","despicable","unconvinced","famished","coed","bygone","nonaligned","sectional","typed","squeaky","disparaging","cut-rate","heart-shaped","offbeat","velvety","well-worn","upsetting","leery","long-lost","horse-drawn","puritanical","payable","fertilized","predicted","allowable","peaceable","soundless","marshy","discordant","intoxicating","concurrent","uncut","tantalizing","pedagogical","accursed","two-man","connective","hawkish","ripped","cleared","double-digit","unencumbered","yawning","manifold","stopped","untreated","subliminal","grayish","gory","upper-middle-class","avenging","self-fulfilling","equatorial","saucy","barred","arch","midwestern","blue-gray","tarnished","leafless","incisive","unearned","botanical","feline","extraneous","prep","intransigent","change-minimizing","insurgent","acrimonious","thermonuclear","blue-chip","crummy","acoustic","oversize","fated","galactic","cantankerous","ill-advised","detectable","lower-class","sacrosanct","palatial","conditional","insulated","step-by-step","nebulous","two-dimensional","well-heeled","bronchial","subatomic","semifinal","first-year","dark-eyed","tinny","attacking","indecisive","anatomical","brotherly","blooming","sinuous","meditative","socalled","rheumatoid","received","bleary","half-naked","leaded","woody","averse","shuddering","door-to-door","heretical","suspect","untapped","ravaged","decentralized","rutted","ineffable","intolerant","mechanized","fortuitous","equestrian","seven-year-old","darting","consoling","modern-day","ground-floor","emblematic","lurking","two-year-old","purplish","disorganized","vaudeville","circulatory","eight-hour","presentable","anarchic","unsatisfied","labored","maudlin","trampled","gibberish","unaccountable","sedentary","heavy-duty","thrilled","tutoring","self-centered","do-it-yourself","inquiring","uncaring","disillusioned","bloodstained","surface-to-air","consular","subconscious","four-year-old","collaborative","terraced","figurative","sinewy","horn-rimmed","impertinent","hit-and-run","standby","medium-size","peremptory","incremental","first-aid","dyed","centrifugal","omnipotent","lascivious","two-month","unionized","discredited","mass-produced","feathery","self-indulgent","liturgical","enviable","fifteen-year-old","buxom","abashed","urinary","newsworthy","flailing","beastly","undiscovered","strong-willed","prenatal","brownish","announced","flaky","washed","nightmarish","broad-shouldered","short-sleeved","two-bit","self-assured","whitish","suffocating","black-haired","full-size","self-help","created","uninhabited","smokeless","no-fault","unfashionable","mushy","forested","adhesive","creased","insufferable","down-to-earth","trifling","landless","disreputable","self-effacing","sporty","confined","adoptive","monogrammed","motley","duplicate","silver-haired","rejected","undifferentiated","blasphemous","institutionalized","blue-and-white","hip","winsome","button-down","discerning","abused","clean-cut","bracing","self-supporting","unsupported","premarital","flattered","studious","repetitious","marketable","anemic","meaty","airless","unhurried","galvanized","feal","peace-keeping","rapacious","bulletproof","well-placed","helmeted","packaged","court-ordered","aggravated","gastrointestinal","hand-to-hand","sixteen-year-old","fretful","fourth-quarter","conquered","satiric","nutty","befuddled","humorless","pitched","burnished","mirrored","fishy","fluted","conditioned","military-industrial","one-story","barbarian","branching","dynastic","unthinking","unconscionable","hunched","post-World","capital","putative","incendiary","shaving","topical","self-satisfied","farcical","narcissistic","kneeling","born-again","old-line","amateurish","ill-fitting","scaly","unpainted","eroding"];var Jj={};Object.defineProperty(Jj,"__esModule",{value:!0});Jj.default=["man","world","hand","room","face","thing","place","door","woman","house","money","father","government","country","mother","water","state","family","voice","fact","moment","power","city","business","war","school","system","car","number","office","point","body","wife","air","mind","girl","home","company","table","group","boy","problem","bed","death","hair","child","sense","job","light","question","idea","law","word","party","food","floor","book","reason","story","son","heart","friend","interest","right","town","history","land","program","game","control","matter","policy","oil","window","nation","position","ground","blood","action","wall","street","husband","fire","mouth","arm","sound","service","chance","information","price","building","road","paper","court","attention","space","trouble","form","society","art","market","force","effect","nature","chair","period","order","television","president","tax","field","glass","thought","industry","process","phone","plan","center","truth","couple","decision","change","eye","campaign","issue","situation","effort","report","sun","experience","peace","letter","level","energy","role","development","result","evidence","meeting","smile","support","baby","team","show","community","brother","picture","kitchen","production","press","study","daughter","director","dinner","class","defense","piece","record","desk","stage","earth","movement","future","board","security","sea","horse","language","public","church","course","bill","river","coffee","wind","bank","corner","committee","pain","help","answer","subject","hospital","film","economy","trade","feeling","member","apartment","ship","silence","seat","gold","education","leader","pressure","doctor","shoulder","sight","scene","figure","crowd","fear","telephone","labor","success","population","style","station","value","sky","growth","foot","radio","sign","strength","capital","neck","college","budget","breath","choice","direction","guy","agreement","speech","skin","will","amount","plane","practice","marriage","audience","movie","gun","living","hall","concern","income","quality","dog","cause","hotel","race","difference","stone","box","army","trip","distance","attack","chairman","election","presence","computer","science","color","theory","spring","machine","purpose","organization","material","image","tree","surface","officer","administration","act","statement","battle","page","suit","lady","play","stock","list","freedom","bar","relationship","farm","authority","student","conference","ball","structure","nose","plant","career","wood","basis","deal","source","chest","message","stuff","middle","sister","drink","majority","sex","store","trial","character","boat","union","animal","ice","front","firm","heat","hope","rock","weight","disease","spirit","memory","king","response","manner","opinion","operation","increase","lawyer","expression","kid","bag","department","crime","train","executive","aid","dream","beginning","rain","prison","conversation","shirt","lunch","possibility","pleasure","management","danger","rule","throat","wine","behavior","return","hat","surprise","snow","property","flight","training","ability","project","camp","range","approach","agency","treatment","reality","village","bottle","attempt","crisis","drug","violence","inflation","enemy","responsibility","opposition","newspaper","victory","dress","condition","darkness","opportunity","account","degree","pocket","performance","manager","visit","threat","failure","brain","driver","charge","beer","coat","shot","metal","activity","influence","intelligence","bit","official","existence","example","truck","note","construction","shape","event","screen","faith","safety","path","culture","chief","relief","grass","contract","product","investment","weather","soul","murder","bedroom","magazine","model","cup","leg","traffic","writer","beauty","song","share","cancer","patient","credit","club","argument","speed","quarter","design","desire","vision","candidate","bottom","pattern","date","finger","teacher","tea","section","article","flesh","island","balance","spot","meaning","technology","crew","proposal","leadership","concept","object","impact","guard","analysis","birth","shop","knife","advantage","generation","appearance","variety","anger","religion","reaction","fight","star","exchange","agent","investigation","milk","judge","silver","region","steel","ear","sugar","strike","youth","hole","thinking","attitude","supply","start","jacket","jury","taste","secretary","mountain","confidence","master","artist","spokesman","demand","cigarette","track","captain","network","whole","university","conflict","noise","smoke","commission","mirror","accident","plastic","garden","debate","interview","command","tradition","protection","dust","watch","lead","solution","measure","motion","discussion","mission","opening","respect","extent","struggle","goal","tongue","moon","author","iron","breakfast","competition","cover","legislation","environment","sake","justice","fuel","hill","key","length","shock","band","version","contact","engine","settlement","mistake","restaurant","revolution","estate","camera","beach","post","pool","fashion","football","border","touch","laughter","title","background","principle","strategy","roof","forest","philosophy","entrance","pause","doubt","bird","tape","belief","card","ring","occasion","wheel","capacity","cat","collection","passage","writing","bridge","owner","novel","pride","damage","contrast","judgment","gift","division","professor","bathroom","plate","explanation","smell","district","park","wave","player","present","theater","atmosphere","emergency","leather","impression","painting","neighborhood","block","function","circle","sentence","priest","method","warning","editor","ceiling","target","tour","gate","site","baseball","airport","shadow","walk","approval","gesture","individual","difficulty","attorney","criticism","affair","request","doorway","reputation","minority","consumer","notion","general","convention","being","honor","partner","chain","commitment","weapon","joke","coal","meal","reading","detail","library","debt","other","mail","drive","fellow","profit","soldier","forehead","housing","excitement","soil","literature","pilot","dance","reform","volume","scale","imagination","challenge","desert","secret","poet","cabin","average","factor","corn","check","wonder","absence","search","wedding","yard","hero","address","confusion","fool","package","victim","fault","platform","democracy","regime","terror","nurse","stream","offer","medicine","flow","grain","row","county","self","glance","humor","promise","employment","advance","planet","recreation","trail","chicken","storm","creature","mass","stand","ass","gaze","poetry","coast","lake","council","breast","corridor","conclusion","talent","tension","reporter","cut","appeal","total","belt","jail","passion","mayor","claim","combination","highway","wire","rifle","cheek","frame","exercise","incident","testimony","ticket","coach","connection","expert","disaster","valley","minister","deck","territory","chin","universe","independence","counter","resistance","cell","governor","salt","elevator","loan","release","schedule","porch","sheet","cloth","personality","actor","bomb","temperature","bench","break","code","journey","childhood","emphasis","aspect","pot","branch","identity","guest","arrival","recognition","hearing","lap","diet","factory","horror","fence","survey","fate","habit","lobby","bone","routine","discovery","comment","burden","treaty","knee","route","cry","ocean","fund","map","signal","ride","bear","deficit","height","element","sword","birthday","standing","cream","panel","fighting","travel","grandfather","creation","appointment","chapter","funeral","phrase","shore","planning","couch","survival","engineer","wagon","suggestion","waste","guilt","chamber","commander","clock","establishment","flag","content","supper","consciousness","proof","pack","beard","portion","comfort","resolution","sunlight","substance","benefit","honey","protest","prayer","stick","description","device","cloud","display","uniform","gasoline","tail","satisfaction","blanket","mess","consumption","drop","invasion","theme","mystery","belly","association","prospect","port","pipe","reference","skill","rear","heaven","destruction","worker","concentration","file","flat","cab","consideration","uncle","customer","laugh","radiation","favor","studio","boss","transportation","wage","fortune","tent","poem","procedure","clerk","surgery","percentage","expense","cap","household","match","bunch","column","intention","cousin","involvement","host","definition","wheat","permission","can","warmth","draft","silk","aide","lip","conviction","rope","illness","instrument","gap","string","adult","sweat","lover","evil","faculty","enthusiasm","farmer","missile","grin","tank","expansion","emotion","waist","discipline","distinction","technique","profession","wisdom","square","laboratory","tie","review","stranger","communication","pile","arrangement","palm","ceremony","tower","sympathy","deputy","script","nomination","friendship","institution","pass","civilization","magic","client","standard","significance","sport","defeat","announcement","reduction","grandmother","bowl","closet","genius","league","citizen","delivery","button","necessity","reader","lesson","trust","green","experiment","escape","craft","pistol","limit","witness","error","assistant","grace","salary","alarm","fist","potential","withdrawal","phase","bell","perspective","rose","score","amendment","fever","tip","god","crop","vehicle","barn","symbol","tale","exception","shift","scheme","suicide","tendency","logic","license","pollution","trend","bath","focus","producer","distribution","cotton","alternative","vacation","muscle","cycle","steam","palace","harm","location","beef","shame","policeman","compromise","tube","participation","fat","item","curiosity","blade","membership","lord","departure","shade","acid","enterprise","jet","selection","jungle","bond","retirement","alliance","bow","railroad","soup","airline","divorce","sofa","gear","gentleman","robe","plot","speaker","examination","egg","handful","recovery","embassy","entry","bastard","improvement","grip","invitation","barrel","context","controversy","fiction","revenue","reply","garage","crash","collar","landscape","grief","pen","teaching","angle","trunk","acceptance","recession","abortion","explosion","application","counsel","dignity","paint","landing","mixture","triumph","stove","winner","summit","thumb","depth","feature","setting","payment","grave","notice","museum","cop","graduate","sidewalk","taxi","trick","lamp","photograph","index","tray","essence","empire","tragedy","alcohol","flower","phenomenon","contribution","shower","castle","cross","booth","lawn","intensity","abuse","determination","passenger","opera","publication","wrist","hint","learning","punishment","ad","skirt","servant","prisoner","physician","midst","purse","rank","neighbor","elbow","contempt","round","cave","coverage","weakness","panic","basketball","juice","shooting","exposure","brick","miracle","unity","accent","coalition","fur","envelope","horizon","glory","stress","delight","politician","conscience","despair","rail","virtue","parent","dispute","killing","corruption","pound","core","stake","proportion","assault","curtain","efficiency","infant","count","suspicion","complex","formation","lock","entertainment","conduct","wit","outcome","shuttle","companion","discrimination","aunt","anxiety","shelter","confrontation","tool","climate","peak","cage","darling","assumption","stability","well","flame","marketing","currency","electricity","text","regulation","comedy","automobile","scientist","cake","scandal","contest","glow","cigar","arrest","brush","boom","basement","document","assembly","output","hut","slave","marble","breathing","pitch","loyalty","affection","resignation","guide","frustration","bureau","adviser","fleet","sector","privacy","awareness","fantasy","speculation","queen","tide","brass","formula","curve","zone","skull","sin","cable","corporation","foundation","achievement","countryside","monster","killer","strain","mask","breeze","whiskey","gang","rhythm","interpretation","basket","extension","tissue","satellite","doctrine","motor","hunger","intervention","kiss","fee","portrait","drawer","analyst","economist","reflection","visitor","transit","reception","provision","slope","sheriff","tunnel","complaint","devil","liquor","throne","hook","temple","tribe","preparation","handle","shoe","origin","helicopter","ruling","injury","crack","flash","gown","jaw","hallway","consequence","depression","subway","leave","drawing","cabinet","initiative","embarrassment","holiday","wilderness","towel","purchase","indication","sink","morality","impulse","rent","enforcement","utility","detective","comparison","critic","dish","hack","photo","crown","operator","conspiracy","rhetoric","bull","inquiry","humanity","demonstration","grade","alley","male","plain","pillow","remark","beast","seed","observation","guerrilla","straw","occupation","champion","excuse","possession","kingdom","snake","nerve","roll","horn","objective","cargo","mate","offense","resort","sequence","apple","bullet","presidency","strip","stroke","pig","print","champagne","saddle","dialogue","suitcase","protein","cook","quantity","toilet","chill","ranch","squad","priority","concert","van","adventure","representative","custom","shell","pension","prince","wound","video","courtroom","suffering","clay","actress","pencil","assignment","shelf","primary","waiter","charm","wool","sweater","soap","psychology","widow","delay","obligation","therapy","sergeant","shortage","myth","collapse","delegation","wish","perception","receiver","sauce","painter","reach","dear","fabric","carrier","ladder","hatred","dancing","cottage","opponent","dealer","prosecution","whisper","spread","poll","beam","exhibition","sigh","fog","harbor","successor","relation","gallery","prize","fireplace","fighter","pit","representation","prosecutor","liberty","bargaining","ownership","root","tin","celebration","stretch","nightmare","transport","link","diplomat","flood","architect","peasant","female","lab","category","inside","tune","carpet","mercy","fraud","introduction","facility","net","temper","rug","conception","eating","legend","tourist","refusal","disappointment","sensation","innocence","transfer","powder","parade","pursuit","parlor","pine","orbit","promotion","senator","colony","cart","interior","productivity","trap","identification","ambition","hip","admiration","corpse","emperor","patch","realm","barrier","ambassador","carriage","residence","maid","gathering","switch","lieutenant","sorrow","contrary","legislature","cliff","lightning","ritual","mist","salad","separation","flour","continent","poison","elite","radar","assessment","outfit","ideology","pad","exile","praise","employee","succession","gain","illusion","option","gravity","journalist","businessman","constitution","singer","sentiment","scope","transition","warrior","cast","march","herd","intent","inspection","episode","uncertainty","spell","isolation","observer","glimpse","privilege","spy","toy","thread","margin","anniversary","irony","organ","lecture","misery","needle","revolver","composition","admission","odor","candy","bid","classroom","bride","vitamin","refrigerator","sandwich","subcommittee","rescue","lad","defendant","blast","angel","compartment","vegetable","minimum","violation","agony","edition","compensation","evolution","treasure","salesman","log","clinic","layer","pitcher","publisher","suite","estimate","airplane","tournament","trace","hammer","reward","broadcasting","running","raid","specialist","mortgage","oak","pole","rocket","aisle","brandy","bureaucracy","mustache","vessel","penalty","export","orange","ignorance","hostility","integration","motive","ban","consultant","timing","equivalent","patrol","liver","assassination","instruction","leaf","railway","freeze","mention","designer","daylight","velvet","amusement","bush","fly","cloak","copper","orchestra","mechanism","chocolate","instinct","circuit","feed","courtyard","mob","profile","bombing","retreat","favorite","revenge","infection","historian","theatre","consent","bucket","mill","insult","pregnancy","psychiatrist","employer","presentation","swing","removal","financing","destiny","label","finish","ghost","channel","equality","requirement","dock","statue","doll","fan","mistress","oven","rim","scent","restraint","frontier","twin","framework","surveillance","diamond","pie","lion","cord","posture","wallet","stool","rally","realization","banker","invention","province","colonel","ally","inspiration","encounter","makeup","certainty","venture","takeover","daddy","ratio","fatigue","verdict","pardon","caution","scream","sleeve","coin","album","acquisition","laundry","transformation","handkerchief","candle","terminal","elephant","madness","appetite","rod","manufacturer","voyage","locker","pulse","indictment","riot","giant","sample","heritage","instance","hay","cure","clan","navy","monopoly","photographer","cowboy","bishop","linen","sacrifice","mortality","dilemma","frequency","harmony","junk","component","bargain","dragon","ruler","replacement","maker","blessing","resentment","surge","costume","editorial","mansion","hood","cellar","bout","driveway","championship","ambulance","sickness","guitar","rejection","compound","launch","journal","sculpture","preference","balcony","lid","toast","chart","motel","agenda","sadness","dimension","verse","scholar","submarine","confession","carbon","thunder","canal","socialism","merchant","bolt","insight","tub","topic","wolf","ridge","shed","gambling","arrow","con","lodge","bicycle","complexity","liberation","disorder","urge","circulation","pickup","distress","spine","romance","anticipation","military","lamb","gloom","pond","republic","ballet","bankruptcy","appreciation","rebellion","custody","feast","fluid","expedition","altar","recipe","array","anguish","harvest","sack","fraction","loneliness","trailer","notebook","surgeon","slip","festival","inability","pan","clearing","making","revival","rack","flashlight","sociology","heir","segment","moonlight","reign","exploration","burst","pet","charity","bundle","assurance","murderer","thrust","conservation","confirmation","outrage","quest","grant","perfection","liquid","stance","jar","essay","addition","diplomacy","rat","outlook","capability","broadcast","cocktail","breeding","immigration","optimism","urgency","helmet","correspondent","breakdown","domain","dressing","dancer","pork","colleague","crystal","insistence","guarantee","lane","dependence","chapel","transmission","hunt","turkey","veto","canoe","interference","sailor","arena","refuge","attraction","thesis","waitress","trigger","founder","briefcase","scholarship","commissioner","stack","lift","greeting","mining","partnership","cane","devotion","thief","troop","menu","finance","coincidence","sleeping","picnic","lounge","dose","jeep","brand","reasoning","proposition","administrator","cylinder","execution","commodity","drum","bronze","staircase","pin","whistle","robbery","catch","thigh","descent","canyon","ballot","shotgun","curb","nod","continuity","shaft","guess","gossip","jurisdiction","revolt","worry","recording","repair","saw","suspect","dome","globe","runway","resident","cemetery","conversion","black","passport","cease-fire","imitation","salvation","cement","creek","nephew","buddy","lung","embrace","ink","simplicity","sunset","astonishment","butt","oath","typewriter","outline","tribute","deadline","hostage","underwear","revelation","reluctance","dread","nest","nut","disposal","disclosure","destination","terrain","procession","recommendation","recorder","potato","ramp","accounting","bat","precision","heap","justification","fork","idiot","biography","prey","ivory","rumor","toll","robot","mix","glare","seal","sweep","haven","bike","courtesy","interaction","secrecy","ham","superiority","synagogue","calendar","ledge","engagement","lace","timber","turmoil","tooth","perfume","magnitude","veteran","lemon","cutting","tomb","accord","ammunition","spear","hunter","acquaintance","grocery","coming","pump","reservation","slide","award","institute","fringe","freight","accuracy","spectrum","ski","diameter","battery","desperation","pounding","variation","ankle","pepper","encouragement","cathedral","expectation","calf","monkey","suburb","rabbit","objection","dismay","boot","pipeline","lust","firing","aggression","ghetto","armor","merger","sphere","texture","moisture","kidney","broker","auction","hose","patent","hesitation","mound","cruise","goat","declaration","regret","conductor","terrace","contention","crap","manuscript","incentive","buyer","gin","principal","steak","novelist","criminal","heel","intellectual","conservative","quarterback","collector","motorcycle","refugee","punch","cluster","clown","preacher","torture","headache","pact","lump","buying","flavor","toe","spectacle","apron","banner","convenience","import","attendant","kindness","verge","dairy","umbrella","dam","inventory","turning","homeland","remainder","gum","plight","container","diversity","drought","reporting","biology","chemistry","curse","scar","merit","spray","reactor","shield","clarity","bamboo","metaphor","vocabulary","runner","luxury","diagnosis","bunk","white","statute","knock","garment","breed","railing","zoo","rival","supermarket","streak","pavement","discomfort","congregation","twilight","bacon","slot","scarf","dime","charter","grammar","theft","sensitivity","mainland","classification","coffin","rider","competence","adoption","reserve","fascination","specialty","mike","temptation","yield","evaluation","passing","intimacy","translation","philosopher","cafe","sitting","superintendent","pill","housewife","signature","correspondence","siege","inn","leftist","injustice","assertion","restoration","registration","farmhouse","denial","endorsement","predecessor","final","demon","greed","transaction","repression","mattress","nobility","embargo","bosom","gym","tenure","addiction","apology","double","litter","nail","incidence","merchandise","volunteer","labour","basin","fiber","whip","payroll","microphone","cruelty","ax","supervisor","resource","maturity","resemblance","cult","stadium","limousine","welcome","knot","probability","menace","nominee","characteristic","stare","vodka","obsession","nursery","paragraph","discourse","candidacy","battlefield","saint","hierarchy","precedent","imperialism","pope","intake","burial","freshman","rebel","mandate","clause","tile","electorate","torch","adjustment","implication","farewell","curriculum","fountain","satin","subsidiary","humiliation","slaughter","discount","crest","princess","asset","greenhouse","reorganization","irritation","ending","messenger","jealousy","breakthrough","mineral","baggage","mouse","tiger","memorandum","kit","substitute","paradise","stride","deed","accumulation","pledge","hull","projection","apprehension","glue","excellence","composer","decay","ditch","slice","beating","syndrome","parole","pony","saying","vulnerability","rental","wax","renewal","disk","athlete","warehouse","organism","disagreement","suspension","documentary","soda","availability","dedication","delegate","reminder","domination","leap","span","obstacle","counselor","taxation","grandson","banana","rehabilitation","stamp","anchor","diary","tunic","boycott","meadow","backyard","dismissal","rating","disc","glove","pasture","catalogue","inspector","exploitation","missionary","density","sail","excess","chemical","disposition","headline","wartime","atom","bartender","blue","wash","shark","negotiation","monument","mom","faction","echo","tomato","scrap","expenditure","plague","fortress","web","briefing","luncheon","vanity","ribbon","nostalgia","drill","frown","dioxide","sovereignty","sweetheart","cot","tag","laser","purity","melody","sanctuary","citizenship","poster","pal","marketplace","girlfriend","programme","retaliation","researcher","allowance","bedside","yacht","scenario","concession","offering","instructor","motivation","litigation","tolerance","puzzle","compliance","duration","quarrel","aura","crusade","salute","intellect","debut","eternity","monastery","immunity","flock","choir","stern","medal","meter","auditorium","equity","fairy","windshield","mare","conquest","razor","push","kick","battalion","generosity","whale","den","mama","emptiness","hysteria","hillside","ideal","landlord","stem","drain","temperament","orientation","spoon","associate","ash","wig","elimination","bark","boost","activist","stature","liar","vein","tract","telegram","completion","pizza","urine","hollow","ordeal","admiral","psychologist","rehearsal","questioning","musician","installation","ministry","puppet","axe","nitrogen","contractor","poker","arch","tractor","reverse","relative","buffalo","deployment","outbreak","pier","veil","summary","courthouse","academy","confinement","catastrophe","technician","specimen","bachelor","lobster","tyranny","discharge","graduation","shout","monitor","traveler","dope","user","vegetation","deposit","investigator","attic","rabbi","reversal","knight","innovation","probe","altitude","legacy","raft","boyfriend","twist","plaza","paradox","witch","folly","physicist","prophet","threshold","plaster","dentist","telescope","vault","climax","parish","balloon","probation","prescription","liability","wheelchair","blackness","colour","booze","exhibit","vest","abundance","hatch","sketch","cartoon","horseback","investor","violin","hazard","trader","stall","healing","prejudice","scorn","rum","accomplishment","limb","produce","epidemic","tumor","camel","starvation","insect","tenderness","cockpit","maximum","patriotism","chauffeur","parliament","capsule","deficiency","massacre","dessert","bail","meditation","petition","hypothesis","ruin","voter","wait","saving","imprisonment","nationalism","lawsuit","surrender","celebrity","contradiction","disgrace","betrayal","slogan","thrill","enjoyment","narrative","canopy","might","vaccine","fort","stereo","hearth","relaxation","asshole","avenue","fright","drift","width","guardian","portfolio","longing","brutality","frenzy","chaplain","chop","tactic","viewpoint","chip","banquet","closing","re-election","impeachment","wardrobe","cradle","facade","finding","tangle","adaptation","hamburger","analogy","fancy","counterpart","dissent","skepticism","gut","advocate","granite","equation","slump","vice-president","nap","foam","buildup","geography","scratch","major","preservation","folder","entity","defiance","nickel","monarchy","shack","teaspoon","chase","remedy","disappearance","foreman","seller","rag","youngster","allegiance","earthquake","columnist","goose","feather","bulb","imagery","bomber","overcoat","harassment","outsider","maze","reproduction","printing","reconciliation","kinship","grease","harp","parallel","stew","particle","accusation","criterion","garlic","boundary","scalp","recess","bearing","warrant","dictatorship","breach","bladder","elegance","fervor","disapproval","monk","tweed","loser","hen","shrug","junta","disguise","gulf","landmark","bourbon","reconstruction","decency","register","feat","hostess","workshop","accommodation","wreck","referendum","viewer","niece","flank","autopsy","boarding","grove","decoration","stain","cape","prophecy","bubble","asylum","commentary","grandeur","subsidy","seizure","badge","limitation","armchair","pro","spark","blaze","centre","split","peril","fusion","goodbye","ringing","solitude","handwriting","crossing","onion","rubber","forefinger","bait","solidarity","measurement","multitude","dump","novelty","truce","perimeter","alien","decree","opposite","constituency","maneuver","ransom","supplier","performer","murmur","coordination","hobby","dough","lantern","cherry","fox","quota","deterioration","flaw","millionaire","raincoat","skeleton","bum","washing","plantation","spotlight","arsenal","villa","sermon","compliment","podium","collision","ratification","jam","loft","theology","escort","tyrant","ore","caste","brokerage","lighter","screw","inheritance","eagle","annoyance","napkin","rationale","flurry","mall","dresser","autobiography","slate","cheer","sulfur","assortment","memorial","electron","detachment","addict","shrine","mold","rookie","astronaut","diesel","neon","heroine","clash","recollection","sweetness","complexion","stewardess","adversary","trance","virgin","screening","classic","nuisance","uprising","shipment","mug","stairway","supporter","famine","stench","click","stupidity","bug","throw","lumber","current","mentality","regiment","galaxy","patron","tap","mischief","contingent","gospel","racket","liaison","honeymoon","foliage","leak","doom","irrigation","mechanic","chef","viewing","swamp","void","mule","lottery","pastor","steward","ranking","survivor","tuition","medication","misunderstanding","prediction","forum","oppression","ale","expanse","consultation","pawn","attachment","franchise","intercom","chunk","mat","pioneer","prairie","familiarity","undergraduate","tenant","chimney","cereal","thirst","pub","packet","aftermath","outburst","habitat","federation","deduction","pageant","circumstance","discontent","microscope","sausage","coma","want","intersection","detention","shrimp","deception","illustration","manipulation","ecstasy","dash","eyebrow","ray","persuasion","builder","injunction","foe","inclination","precinct","slab","anthropologist","amnesty","loaf","radical","intrusion","dwelling","calculation","paperback","usage","paste","ashtray","shovel","capture","ferry","preoccupation","joint","filing","spit","womb","puff","quilt","squadron","playwright","rotation","lease","brilliance","burn","cough","spouse","assassin","flu","cabbage","reliance","console","carpenter","dependency","advertisement","lipstick","mahogany","disadvantage","holder","furnace","certificate","alienation","collaboration","extinction","austerity","pupil","tenor","foyer","bluff","whisky","similarity","pouch","chant","nun","hike","babe","com","input","pianist","treason","brake","shake","dividend","repetition","fisherman","pinch","persecution","brightness","disdain","sunrise","gleam","premise","shawl","kettle","forecast","recipient","strap","outlet","chalk","plywood","nickname","fulfillment","doorbell","keyboard","peanut","knob","compass","interval","intuition","clearance","format","shuffling","dent","ambush","chatter","lettuce","harness","hiring","ache","continuation","fit","friction","pretense","velocity","tavern","abdomen","scout","splendor","barber","flap","plateau","hedge","raising","visa","dictator","housekeeper","cafeteria","enrollment","sailing","ingenuity","limp","bard","consistency","ordinance","bathrobe","gauge","strand","taxpayer","spider","coward","reservoir","brigade","self-interest","crackdown","crib","hum","roommate","traitor","blend","kitten","setup","dagger","sophistication","clout","goddess","disability","touchdown","fertilizer","punk","agitation","seminar","hitter","crust","comprehension","nightgown","gamble","freak","stump","microwave","lever","libel","playground","exhaust","abstraction","picket","diversion","advancement","bourgeoisie","coordinator","myriad","dial","diagram","sensibility","donor","endurance","prominence","playgroup","transmitter","revision","consolation","storyteller","jewel","mourning","burglary","competitor","narrator","verb","butterfly","rationality","ant","mister","satire","placement","reunion","plunge","comb","commuter","carving","hormone","creator","swim","clip","necklace","frost","fix","allocation","thickness","happening","disruption","caravan","rodeo","axis","submission","insanity","protocol","caller","porcelain","aristocracy","interrogation","boyhood","muzzle","delicacy","teenager","undertaking","textile","tailor","defence","comeback","zero","wizard","cupboard","cynicism","behaviour","holster","bulletin","broom","receptionist","listener","exemption","flicker","exam","treasury","hug","interruption","no","drugstore","roast","trifle","jerk","exclusion","inmate","contra","permit","gene","melancholy","alcoholic","trainer","perspiration","instability","doorman","deterrent","occurrence","hem","pricing","wear","hog","cushion","commune","courtship","paradigm","down","participant","triangle","apprentice","prevention","forearm","symptom","flush","newcomer","announcer","gorge","frog","platoon","hawk","rivalry","trench","geometry","clubhouse","feller","hymn","dictionary","showing","homicide","crow","pneumonia","gourmet","flannel","congress","dislike","illumination","jockey","superpower","papa","absorption","fragment","catalog","genre","hypocrisy","duel","cone","organizer","fraternity","cubicle","hardship","restriction","gasp","authorization","partition","barrage","groan","waterfront","aerial","cinema","proximity","mockery","compulsion","slum","default","evacuation","fugitive","carton","chariot","masterpiece","nylon","dialect","tee","bathtub","congressman","vapor","disturbance","mailbox","take","groin","moss","shepherd","formulation","foreigner","solo","elder","textbook","predicament","trait","reef","intruder","captivity","commotion","farce","royalty","exasperation","developer","expulsion","plaid","believer","migration","gal","fitness","idealism","galley","offensive","hometown","sophomore","clump","launching","mast","slowdown","generator","make-up","mount","worm","chuckle","prototype","catcher","crotch","interpreter","graveyard","mane","premium","cuisine","jeopardy","reassurance","vantage","condemnation","vase","blackout","token","abandonment","maple","magician","bust","syrup","cassette","pick","madman","cleaner","throng","hanging","riding","villain","squeeze","wallpaper","lime","blur","modification","clatter","anonymity","lineup","polish","accountant","setback","neutrality","modernization","borrowing","kill","dwarf","amateur","expectancy","donkey","fella","contamination","ballroom","kidnapping","popcorn","entourage","crook","ambiguity","coral","roadside","fragrance","slack","spectator","stimulation","groom","rattle","synthesis","tan","skipper","distrust","siren","spin","revulsion","signing","booster","savage","glamour","flute","civilian","flask","tug","misfortune","therapist","plug","standpoint","weed","ecology","footing","patio","decor","malpractice","residue","passageway","chopper","batch","acceleration","depot","quarry","hound","pilgrimage","deference","splash","heartbeat","rap","wedge","indicator","pretext","make","saloon","clientele","poisoning","hemisphere","grotto","ignition","cover-up","ape","transcript","blizzard","crab","ration","puck","propriety","hunch","madam","imbalance","jug","manual","raise","silhouette","sponsor","bore","volcano","crate","humility","devaluation","rocker","rainbow","chap","informant","freezer","limestone","guise","valve","appraisal","handicap","correction","bra","sinking","turnout","manure","pail","cardinal","grape","bee","rumble","miner","dissatisfaction","pamphlet","plaque","chat","injection","pulpit","platter","symphony","molecule","rib","pyramid","shudder","dissolution","vinegar","calling","acreage","chick","cuff","scrub","orphan","porter","saucer","antenna","trophy","rig","convent","good-bye","troupe","ploy","niche","veal","semester","contender","grenade","hilt","spiral","stink","marathon","boulder","treasurer","cookie","peninsula","freeway","rainfall","showdown","parody","telling","statesman","decrease","symbolism","pillar","tremor","penetration","carcass","breadth","psyche","hiss","suppression","pottery","dormitory","scare","overtime","bean","schoolteacher","timetable","buzzer","mesh","jack","marshal","windfall","lance","uterus","inconvenience","chrome","brute","gardener","whim","pearl","fold","trim","ravine","critique","adultery","stretcher","trolley","elevation","worthy","vibration","bracelet","plank","jelly","foil","wrestling","colon","layout","quotation","sting","son-in-law","jargon","likeness","knack","defect","sedan","tilt","chore","moratorium","convoy","piety","acknowledgment","formality","thud","blockade","chord","hush","takeoff","lining","marsh","manifestation","humidity","ingredient","crater","liking","pigeon","abolition","granddaughter","vintage","flourish","playoff","prostitute","prick","oblivion","sociologist","helping","locomotive","contraction","bookstore","surrogate","hippie","sherry","scotch","packing","wink","spasm","conglomerate","ensemble","dugout","insider","sect","inclusion","feedback","trumpet","massage","constituent","brotherhood","directory","newsletter","comrade","grid","turtle","restructuring","reel","spur","comet","dummy","combustion","moustache","oversight","motto","mantle","handshake","mouthful","monologue","buffet","miss","crunch","waking","gray","exaggeration","gait","clutch","courier","hangar","dive","curator","ridicule","diaphragm","tow","projector","eclipse","parcel","lure","transplant","township","squash","commentator","mentor","gutter","stint","treat","germ","infinity","impasse","burglar","proprietor","tariff","dispatch","torment","dove","superstition","going","tempo","warden","sponge","rooster","barge","gorilla","draw","wharf","stallion","countenance","orchard","navigation","tar","biographer","wheelbarrow","imposition","hurricane","stronghold","distortion","starter","rash","feud","parting","interviewer","wrongdoing","lavender","low","leash","envoy","stairwell","backup","doorstep","negotiator","heading","excursion","sewer","endeavor","backbone","rite","vine","gypsy","directive","defender","scoring","esteem","torrent","gland","consortium","nightclub","swell","employe","obscenity","cavity","pulp","lifestyle","butler","peach","tack","fossil","glitter","liner","destroyer","flyer","individuality","roller","outcry","felony","artery","cruiser","bedding","dude","bounty","blindness","bodyguard","corral","coroner","spice","martini","contingency","gag","serving","wail","wrench","sock","safe","spite","broth","trustee","moth","vice","gender","cartel","casting","puppy","prohibition","ox","sculptor","treachery","stir","printer","audit","brim","handbag","lobbyist","jolt","comedian","distraction","challenger","telegraph","homage","evasion","detector","filling","overhead","cartridge","walnut","sonar","puddle","quake","flooding","crescent","thrift","following","tanker","stoop","clergyman","opener","latitude","anatomy","convertible","arbitration","leukemia","absurdity","stab","biologist","baseman","fuse","specialization","carnival","scarcity","gangster","stalemate","trickle","mallet","working","receipt","charcoal","mortar","drainage","mother-in-law","regularity","emigration","plasma","condominium","muck","workplace","roster","stroll","softness","serpent","owl","infield","sill","swallow","backdrop","fidelity","historiography","thicket","baking","omen","yell","functioning","bribe","dynasty","trough","pudding","alcove","ancestor","ripple","flint","bracket","cube","pasta","proxy","groove","commercial","holocaust","countess","scroll","bang","planting","premiere","norm","bloom","gunman","vow","arithmetic","accelerator","postcard","relish","semblance","whine","inventor","sarcasm","designation","pat","symmetry","quiet","chisel","experimentation","cutter","differentiation","stud","apathy","relay","seminary","escalation","life-style","coil","mythology","futility","intimidation","childbirth","flare","glint","rue","mural","whiff","deposition","vogue","animation","migrant","caretaker","dot","mediator","lookout","captive","blackboard","pocketbook","recourse","negation","plaintiff","shriek","obstruction","latch","manor","casualty","grunt","gambler","erection","nationality","epic","starch","delusion","linkage","provocation","avalanche","offender","melodrama","contentment","appropriation","tonic","salon","accompaniment","paranoia","grimace","communion","cancellation","pendulum","shoreline","hail","refinery","subtlety","videotape","commando","repertoire","refinement","dryer","rust","lapse","haircut","errand","ailment","reanimation","ther","tab","prom","contemplation","bin","gilt","bunker","protector","sage","hilltop","hue","blueprint","correlation","brochure","roadway","arson","remnant","breaking","bouquet","exertion","garrison","beneficiary","colt","turbulence","refuse","bravery","indulgence","assimilation","coastline","livelihood","swarm","configuration","lecturer","paw","upheaval","switchboard","sub","claw","downfall","dye","immigrant","specter","deprivation","shrink","marker","sampling","fellowship","beak","pantry","mouthpiece","gratification","qualification","finality","debacle","extortion","chieftain","speaking","totalitarianism","mole","incumbent","jumper","crush","stubble","terrorist","comic","farmland","contributor","gravy","blossom","keeper","craftsman","pavilion","obscurity","loading","affiliation","vacancy","proclamation","gaiety","yarn","enclosure","clamor","sucker","recruitment","subversion","boiler","emblem","spade","stocking","staple","vocation","sling","maniac","musket","primitive","periphery","idol","snack","antique","redemption","listing","airliner","bandage","bulge","glimmer","priesthood","diner","astronomer","ovation","kindergarten","module","lifting","radiator","booklet","resurrection","precaution","affinity","thinker","quote","turbine","tally","vise","landslide","bakery","portal","majesty","abyss","admirer","turnaround","airfield","wastebasket","lapel","pennant","complication","slick","initiation","rustle","hearse","schooner","carrot","inscription","wench","embryo","vet","poise","disintegration","procurement","speck","kite","vent","plow","homosexual","membrane","waterfall","teevee","matron","utterance","buffer","memoir","cork","recital","loathing","cameraman","throttle","insecurity","trooper","hinge","hoard","umpire","slug","mountainside","affliction","pastime","felt","sentry","denomination","mushroom","linebacker","parachute","teller","fender","trademark","specification","harem","plum","metabolism","certification","neutron","organisation","heresy","relocation","payoff","lizard","termination","dropout","torpedo","stepmother","helm","resonance","heed","progression","braid","cardboard","walkout","shiver","gust","foreground","replica","repertory","sparkle","seam","bump","substitution","rapport","casket","dew","squirrel","palate","hitch","rebirth","reverie","boon","pirate","foresight","vinyl","delta","moat","presumption","tablespoon","aroma","digging","heartland","healer","malaise","creed","archway","exterior","screenplay","examiner","parity","copyright","strawberry","outpost","bookcase","cashmere","bikini","sheaf","pastry","respite","divinity","impossibility","legislator","saga","thump","inauguration","seaman","degradation","strategist","emerald","anthem","affront","burner","entrepreneur","thorn","marvel","stair","cavern","swivel","outlaw","underside","cleanup","fin","catalyst","forage","tapestry","dosage","covering","proletariat","turnover","notch","misconduct","onslaught","upbringing","coyote","bumper","champ","creep","boxer","mileage","vigil","fodder","occupant","dashboard","rarity","centerpiece","consul","ascent","paddle","martyr","doctorate","runoff","grudge","tattoo","robber","carbine","holding","oratory","distributor","heavyweight","footnote","terminology","infrastructure","drummer","chili","tableau","dung","magnet","deceit","caricature","itch","refund","cripple","rectangle","mortal","ancestry","inequality","generalization","furor","relativity","jukebox","dune","endowment","pathology","calibre","subpoena","attrition","hump","congestion","reflex","hoax","honour","herb","mantel","articulation","washer","judgement","brace","printout","helper","wording","crisp","shortstop","boulevard","characterization","cashier","matrix","documentation","deadlock","oyster","chasm","outing","expiration","heater","nutrient","beacon","bile","grievance","janitor","skyline","patrolman","juncture","antagonism","rump","hardwood","solace","warhead","assent","litany","enactment","chimpanzee","rye","feeding","suede","coke","inference","ivy","mosquito","eruption","symposium","variable","cooler","filter","storeroom","mailing","chancellor","beggar","antiquity","inertia","motif","absentee","float","blush","embankment","riverbank","demeanor","vampire","disciple","inadequacy","reinforcement","pedestrian","persona","berserker","tumult","incline","beaver","grill","morgue","denim","wreath","grouping","relic","syndicate","rancher","idiom","hegemony","seating","affirmation","physiology","repose","blight","jest","turret","slit","goalie","clarification","avoidance","volley","redhead","inefficiency","folklore","embodiment","afterthought","steer","cyanide","digestion","continuum","mania","giggle","buggy","willow","pantomime","fireman","growl","devastation","navel","halo","yearning","laborer","alligator","prelude","verification","brown","bead","midget","sleeper","riddle","portrayal","counterattack","lectern","tutor","chestnut","remembrance","aversion","taking","billing","regimen","translator","headmaster","duke","ace","snort","fanfare","imprint","calamity","exposition","cedar","intrigue","transistor","bowel","boardwalk","tramp","ornament","sticker","processor","voltage","sovereign","whistling","orgasm","caliber","exuberance","snout","enclave","kilt","bombardment","corporal","overhaul","syllable","curfew","layman","consolidation","insignia","mediocrity","coherence","hospitalization","flick","pew","coloring","sanction","baritone","radicalism","savagery","pallet","stead","cadet","shutdown","supplement","unicorn","stepfather","excise","spelling","rebound","puzzlement","tenement","souvenir","veneer","safari","quartet","whirlwind","hamlet","practitioner","parasite","installment","emission","kissing","chronology","mosque","chairmanship","blonde","steamer","caption","shave","standstill","maiden","polling","condor","twinge","campfire","drinker","exhilaration","seafood","gala","crane","hickory","cathode","graph","orgy","deliberation","planner","marrow","bud","mediation","cutoff","tit","tic","parchment","noun","culprit","lair","showcase","hangover","chemist","aggregate","thriller","smack","efficacy","smear","heiress","crank","fig","finale","pea","staging","die","rebuke","curry","scum","potency","acclaim","collateral","schoolboy","canteen","radius","deportation","grate","madame","mop","pronunciation","sheen","respiration","breakup","professional","omission","gunshot","ugliness","fanatic","barbecue","dorm","trot","flattery","stereotype","hatchet","capitalist","purge","brew","totality","fern","enzyme","plumber","subscription","cholera","bruise","forge","nipple","commencement","superstar","ether","gem","sash","extraction","spaceship","golfer","realist","encampment","necktie","repayment","skillet","darky","disparity","bedspread","haul","questionnaire","promoter","wand","windowsill","victor","rector","enamel","hoop","coronation","patriot","chandelier","watchdog","glade","renovation","goblet","zipper","communique","crevice","motorcade","sequel","scourge","serum","single","icebox","junction","cache","berth","streetcar","syringe","antithesis","bureaucrat","blacksmith","oval","bun","loot","fiasco","tomahawk","ulcer","pinball","jersey","asthma","brook","pedestal","feeder","soot","inevitability","alteration","carrying","showroom","gimmick","lunatic","gall","fir","borough","hash","woe","controller","sponsorship","applicant","twig","screaming","librarian","intermission","sister-in-law","bushel","inflammation","pomp","vial","extravagance","pate","prostate","dolphin","tuxedo","mathematician","guinea","veranda","aperture","disillusionment","gavel","dating","knocking","oasis","nebula","woodland","yellow","ambivalence","hardness","oxide","socket","wasteland","leopard","blazer","follower","asking","urn","weaving","swimmer","closure","dart","loudspeaker","bazaar","bog","transfusion","reproach","sham","parka","affiliate","scowl","primate","attacker","rink","funnel","spate","elaboration","legality","tablet","heyday","tripod","bully","sharpness","demolition","flip","dandy","appliance","slant","sentimentality","knoll","gloss","defection","explorer","ram","stupor","clone","baton","cohesion","bearer","penance","bandit","aberration","gallop","swirl","coconut","spree","pedal","detergent","canon","teen","brood","phonograph","tabletop","enlargement","sniper","cohort","fable","rising","spill","affidavit","imperative","snapshot","apparition","stunt","wristwatch","chute","teammate","carelessness","over","stripe","postponement","rapture","savior","pacifist","admonition","pear","junkie","surcharge","wavelength","horseman","hag","confessional","comptroller","orthodoxy","financier","snarl","cliche","refreshment","incest","adolescent","teapot","seaweed","drilling","roadblock","antibody","sheath","pallor","constable","misuse","arcade","lee","keep","anarchist","watering","rhyme","exclamation","backseat","great-grandfather","han","pod","daughter-in-law","mailman","alphabet","sloop","reckoning","grower","simulation","homer","birthplace","ence","actuality","depletion","novice","diffusion","concealment","cadre","pathway","fungus","ouster","loner","autograph","descendant","aspiration","better","sick","variant","fragmentation","pesticide","frigate","bestseller","propensity","foul","senate","trouser","airstrip","insurrection","chronicle","coating","stigma","toothbrush","pumpkin","apprenticeship","widower","paycheck","query","teen-ager","shifting","informer","doorknob","ardor","pebble","finesse","scrapbook","fiddle","dowager","sod","wrap","turtleneck","clipboard","rogue","mutiny","suitor","bulkhead","babble","fad","billboard","beverage","hairline","grille","exporter","pathologist","mesa","goblin","scapegoat","crucifix","backpack","observance","forgery","dungeon","methodology","gauze","bonanza","inkling","beret","shouting","ex-wife","wickedness","toil","preview","porridge","cornerstone","scanner","smoker","rebate","mite","brawl","axle","easel","allegation","grab","parrot","antidote","drawl","hijacker","telltale","venom","el","baron","intermediary","seduction","birch","contour","redistribution","cam","protagonist","enmity","hulk","stockbroker","decorator","cookbook","protege","mage","cricket","smock","apex","cortex","modem","shareholder","lament","determinism","rift","tablecloth","trajectory","preface","sneer","gamma","rendition","insemination","aristocrat","hare","labyrinth","thaw","invalid","staffer","alpha","fingernail","medic","crutch","entertainer","jade","eminence","discrepancy","yawn","flea","ledger","orphanage","getaway","manifesto","hijacking","incarnation","elm","adobe","spruce","gist","grit","boar","oracle","mobilization","cantor","crypt","cutback","musical","fallacy","corduroy","fray","racetrack","buckle","foreboding","pest","clap","ber","notation","peek","sow","ballad","brat","constellation","lard","industrialist","hunk","assailant","splinter","bridegroom","dip","fixture","cadence","watchman","windmill","prerogative","drawback","bungalow","heaving","nationalization","mating","writ","rationalization","milking","modernism","landlady","calculator","animosity","workout","skirmish","glycogen","discord","portico","vestibule","renegade","overdose","iceberg","lineage","mosaic","liturgy","watershed","playing","lobe","dowel","ranger","dossier","anvil","co-operation","satchel","fa","corollary","bridle","gateway","brothel","monotony","vendor","mysticism","saucepan","accomplice","hernia","guild","pup","hoof","sparrow","dreamer","craving","outpouring","blink","overlap","duct","brownstone","maneuvering","stagger","foothold","craze","monsoon","induction","handgun","scan","constraint","citadel","rigidity","anecdote","halter","occupancy","rightist","convict","tribunal","stalk","waterway","debtor","yoke","audition","inconsistency","peg","sliver","midwife","premonition","ruby","conduit","excavation","fart","condenser","hop","poodle","upsurge","attainment","stitch","crimson","anomaly","backlog","yeast","chimp","awning","gig","parable","drumming","tiptoe","prow","bypass","crease","reformer","intestine","counterpoint","enormity","anthology","rudder","shroud","magistrate","twitch","commonwealth","circumference","stuffing","sweating","scattering","lender","dripping","legion","refrain","mummy","covenant","morbidity","prop","initial","alignment","licence","infusion","unification","rebuttal","adjective","humour","larceny","mistrust","horde","assemblage","delinquency","testament","convert","patrician","dissension","cider","infidelity","bonnet","displacement","crackle","edifice","conciliation","bondage","schizophrenia","embroidery","standoff","monotone","oddity","mobile","tornado","semicircle","panorama","ex","ping","yogurt","screech","underdog","quay","tai-pan","extract","podesta","ticking","shrubbery","backside","communicator","sorcerer","interlude","dominion","battleground","taboo","blunder","conjecture","drone","cove","maverick","secondary","companionway","rook","gauntlet","ordering","violinist","rooftop","slash","thermometer","vomit","anteroom","deity","nave","acquittal","talker","reed","concussion","malfunction","tundra","cub","anemia","constructivist","cocoon","divide","keeping","percussion","freighter","noose","narcotic","expediency","grandchild","gully","innkeeper","pigment","bloodstream","quiver","alderman","halftime","stable","fission","aggressor","denunciation","abduction","expressway","uniformity","faucet","buff","broiler","allusion","jock","spike","herald","polyester","genocide","fer","parapet","classmate","tinge","sandstone","lurch","skunk","huddle","mum","tranquilizer","pharmacy","susceptibility","penicillin","lark","hoe","lily","hanger","headset","john","appointee","advisor","twine","slumber","magnetism","schoolgirl","smash","screwdriver","newsman","sleet","cleavage","lacquer","milestone","commandant","crick","splitting","rosary","edict","hurdle","fixation","appendix","lock-mechanism","eyelid","swath","fingerprint","carbohydrate","tick","magnate","heck","sailboat","donation","malady","polishing","clipping","collective","sensuality","loom","swagger","facet","variance","mean","walkway","aptitude","prodigy","solemnity","understatement","ebb","scoop","wrapper","narration","icon","prerequisite","planter","gash","interplay","evangelist","drip","vulgarity","subdivision","backwater","euphemism","lotion","corpus","broadcaster","toothpaste","curmudgeon","fo","thong","thatch","baptism","peacock","workman","downturn","scoundrel","machete","creak","five-year-old","dissertation","dishwasher","pimp","electrician","tycoon","otter","shove","snail","rendering","nobleman","booking","pronghorn","deadpan","shutter","escalator","girdle","fling","hire","alibi","flop","stampede","prognosis","itinerary","cologne","spoonful","detour","violet","watcher","falsehood","hype","locale","estimation","propeller","squaw","pickle","lass","pun","racist","scratching","rout","downpour","casing","complacency","camper","equator","reticence","learner","outcast","brunette","improvisation","stag","maxim","loophole","livery","blasphemy","shoot","solvent","misdemeanor","buyout","tiller","jetliner","checkbook","awakening","sideboard","romanticism","squire","newsstand","nuance","consulate","excrement","reprisal","bastion","beginner","obituary","softball","conjunction","scripture","phalanx","vindication","grub","swig","inaction","redwood","scabbard","bonfire","casserole","ovulation","unreality","totem","palette","choreographer","peasantry","skyscraper","penitentiary","outfield","melon","bounce","yolk","diver","archbishop","plurality","amber","recurrence","adulation","piston","insurgency","stoan","coop","tart","eyeball","toss","giveaway","cross-examination","dissident","hermit","ruse","ture","pore","leaving","dowry","gunner","epitome","snowstorm","summation","switchblade","crock","ity","frock","luster","piazza","rotor","impropriety","pivot","blender","immediacy","borrower","slaying","feminist","preserve","bidder","depiction","parasol","clover","intern","asteroid","stub","barricade","medley","multiplier","smirk","knapsack","hank","cognac","headway","treatise","homestead","troublemaker","giraffe","mover","allotment","drowning","naturalist","orderly","attribute","scalpel","shipyard","estrogen","educator","enrichment","grandstand","sire","perversion","sideline","landowner","confidant","gel","deviation","clemency","liberal","bigotry","filly","six-year-old","lifeguard","shred","adversity","shelling","pineapple","referee","knockout","jigsaw","retailer","extremity","outgrowth","amplifier","sinner","campground","teasing","steamboat","turban","mutton","cobra","contraption","chopping","schoolhouse","varnish","pane","observatory","ballerina","czar","immensity","lethargy","reimbursement","undershirt","concierge","fracture","variability","accordion","slime","meanness","gelding","practicality","advertiser","graft","gull","stockholder","pilgrim","hooker","puritan","benediction","barbershop","stanza","hallmark","mishap","harpy","silage","enchantment","whirlpool","conditioner","gadget","divestiture","lathe","incarceration","amalgam","antibiotic","annexation","martyrdom","pyre","shank","alert","shale","artifact","interchange","mystic","meet","grinding","triple","boutique","antagonist","fermentation","twinkle","sweetie","shin","creditor","amulet","pall","posse","homeowner","skier","vastness","smith","allegory","oxidation","cracker","levy","ark","sporophyte","enthusiast","snob","spinster","searchlight","waistband","lorry","repeat","reprieve","slalom","respirator","visor","reviewer","putt","miscalculation","shortfall","concourse","dialectic","native","hairdresser","normality","immorality","sprinkling","allure","lick","drudgery","habitation","gondola","vista","ice-cream","cheerleader","predator","countdown","juxtaposition","stumbling","muffler","derby","timer","salvage","boast","cabbie","clam","windbreaker","retardation","antelope","shampoo","raccoon","bible","glider","momma","valise","coffeepot","emissary","compression","grail","guideline","lavatory","glaze","outpatient","thunderstorm","foray","co-op","valet","baker","sycamore","thumbnail","nozzle","timidity","orator","liquidation","spokeswoman","militant","jig","naivete","motorist","dumping","armpit","margarine","exultation","headboard","plume","amplitude","flutter","pronouncement","finery","trepidation","airing","coupon","knuckle","gametophyte","deathbed","extermination","alleyway","hybrid","gambit","nova","binge","original","froth","lighthouse","coolant","continuance","collaborator","fuselage","profanity","whirl","saber","filmmaker","checkup","shaman","rancor","retort","earring","sieve","post-mortem","implantation","conceit","simplification","vat","proficiency","deluge","kiosk","outlay","tantrum","flooring","veterinarian","fireball","carousel","bandanna","glacier","censure","citation","oar","fridge","metamorphosis","superior","approximation","girth","tirade","grocer","holdup","forward","snobbery","cleansing","replay","recitation","facsimile","patter","jubilation","snare","frailty","rampage","pick-up","overture","tumble","residency","prevalence","repository","reentry","battleship","mutation","hammock","importation","thug","semiconductor","ballast","spurt","extreme","artichoke","convergence","circular","rigor","realignment","physique","handbook","bugle","precipice","sauna","whorehouse","skater","furcot","volatility","valuation","barbarian","peddler","layoff","overall","deliverance","chromosome","innuendo","lexicon","empress","polarization","dictum","fitting","impediment","piracy","crocodile","cucumber","keel","sitcom","hypocrite","roaring","encroachment","steamship","resin","fairway","eyewitness","broadside","washroom","sighting","mantra","swan","supposition","governess","upswing","rep","solicitude","rustling","invocation","heather","rectory","orchid","brocade","raiser","invective","fragility","acronym","ostrich","col","absolutism","vicar","psychotherapy","navigator","cartoonist","doe","landfill","invader","werowance","ble","flatness","locality","druid","visitation","headlight","rapist","benefactor","colonization","excerpt","nick","kangaroo","pink","buy","cascade","campsite","slander","headdress","topcoat","causality","karma","trestle","atheist","checkpoint","renunciation","eater","payload","pointer","theologian","beet","undertaker","lineman","hart","gourd","doubling","shuffle","cabaret","periscope","bodice","shootout","grandma","wildcat","proton","dioxin","sorcery","torchlight","stopover","executioner","collage","mesquite","reincarnation","kidnaping","programmer","disloyalty","muslin","throb","mint","aquarium","tel","eccentricity","purification","kerchief","warranty","rigging","breeder","nite","conservatory","fastball","magnification","spa","favour","regeneration","incision","saxophone","detriment","scam","android","coloration","bunny","restitution","rake","serf","despotism","pollen","sidewinder","upstart","revisionist","birthright","multiple","lifeline","queue","follow-up","swipe","boardinghouse","armament","travesty","stirrup","caper","chloride","crepe","primer","clich","inflection","skid","repudiation","serve","spire","peep","inducement","clothesline","fabrication","morsel","spleen","coon","bustle","crossword","back-up","assessor","biopsy","sidecar","hassle","shingle","tint","fixing","collarbone","taint","pusher","gestation","mantelpiece","vaulting","ra","peat","indignity","adequacy","genus","scrape","scaffolding","serial","neurologist","duffel","cipher","rote","horseshoe","bulldog","electrode","joker","juror","fibre","misconception","rut","connoisseur","flowering","op","flirtation","highlander","wisp","sounding","bugger","pharmacist","doughnut","toaster","pinnacle","slob","promenade","amphitheater","singsong","beau","whimper","importer","locket","watermelon","marking","beta","co-author","crossbow","atrocity","desktop","inhibition","draught","rowboat","volleyball","snowfall","extravaganza","teddy","miscarriage","storefront","toxicity","abode","hearty","handyman","centurion","phrasing","anachronism","newspaperman","annex","walker","till","volition","tributary","close-up","nook","cleric","ferment","proverb","inlet","heretic","waistcoat","duet","sniff","crewman","campaigner","wearing","grizzly","p","optimist","placard","overflow","pedigree","clang","brig","cinder","bunting","wag","dishonor","denominator","gong","siding","trilogy","deli","fluoride","questioner","squat","competency","partisan","putter","entree","cynic","tombstone","scoreboard","biscuit","souffle","homecoming","overseer","hideout","brewery","emancipation","interface","premier","auditor","troll","conscription","stout","trucker","beetle","dealing","bookkeeper","build-up","yardstick","da","polity","wick","wrinkle","private","outflow","borderline","outfielder","visage","leper","chiffon","arbor","weave","barnyard","checklist","granny","insensitivity","ex-husband","barometer","rupture","infirmary","desertion","wonderment","encyclopedia","slaughterhouse","nostril","ineptitude","implant","infatuation","laundromat","warship","rub","benchmark","polygraph","dinghy","behind","tween","filibuster","wearer","crayon","sensor","hustler","sinew","progeny","dig","pediatrician","foursome","buckskin","cornfield","safeguard","divergence","ting","coupling","dislocation","the","immersion","purchaser","cleft","overhang","booty","scuffle","rattlesnake","teacup","retinue","hallucination","potion","yeshiva","tapping","rip","multiplication","canister","gallantry","morn","thermostat","grind","aviator","ecosystem","pariah","recruit","vestige","ro","phosphate","abomination","laurel","sweatshirt","vaccination","psychoanalyst","blind","psychosis","sidekick","shopkeeper","theorist","delicatessen","sheepskin","billionaire","receptacle","salami","paddock","glen","beech","leer","mime","ty","perfectionist","seedling","wil","bind","intolerance","dint","plural","rouge","skylight","mammy","drab","microcosm","sole","organist","court-martial","matinee","bulwark","must","expatriate","stethoscope","daydream","backer","godfather","breech","artifice","auxiliary","adventurer","atrium","counterman","idiocy","grotesque","dishonesty","runaway","digit","baseline","reflector","preamble","sellout","falcon","scribe","retainer","louse","grapevine","sojourn","lash","marquee","schoolmaster","squeak","squeal","shooter","townhouse","nationalist","billiard","backfield","auctioneer","aria","avant-garde","hostler","smattering","giving","coaster","arraignment","duo","malignancy","throwback","doc","turnabout","seeker","deletion","vernacular","bulldozer","tedium","hustle","raspberry","estrangement","mutilation","styling","incinerator","wrong","shortcut","mastectomy","infringement","bonding","timbre","cameo","workroom","grassland","spraying","cooperative","tarpaulin","determinant","thyme","innocent","clique","racer","leakage","conflagration","jingle","duplicity","diaper","conqueror","committeeman","robin","reprimand","marina","cross-section","flagship","denouement","recluse","homemaker","moron","rind","gent","magnificence","dispatcher","detonation","harbour","toddler","rotunda","sedition","fell","dolly","laureate","woodsman","syndication","clot","guitarist","blemish","password","overview","eggplant","incantation","drapery","incapacity","florist","hive","civility","mod","screenwriter","intoxication","barman","ern","furrow","cant","clapboard","tumbler","walkie-talkie","pajama","vortex","defenseman","hostel","subjugation","interception","armory","fanaticism","sibling","inhalation","undercurrent","husk","mead","maw","padlock","abnormality","penguin","undersecretary","damnation","independent","airlift","peel","schoolroom","rascal","fingertip","cartilage","dichotomy","blank","lingo","clasp","racquet","acknowledgement","rebuff","bier","aerosol","taping","checkout","arse","thoroughfare","pelt","copse","keg","fissure","tern","mirage","blockbuster","balm","arbiter","shutout","schism","fluff","circumcision","insertion","pseudonym","heathen","eulogy","snowball","penthouse","kinsman","gebling","regulator","proponent","yearbook","barbarism","mutt","reopening","paunch","governorship","differential","airship","subscriber","alloy","adjunct","impairment","incongruity","pheasant","grownup","predicate","loo","sleigh","seer","flitter","sunburn","plebiscite","stockade","pout","sledge","stipulation","lordship","bayonet","wretch","vulture","postman","breaker","newsroom","consort","grinder","ballpoint","tequila","unpleasantness","wrapping","squall","adage","monograph","privation","streetlight","hilarity","sacrament","diminution","mannequin","duplication","banishment","rasp","biochemist","goatee","cranberry","sultan","blip","disservice","idealist","middleman","shaping","apocalypse","strut","oligarchy","moor","zombie","certitude","javelin","azure","turnpike","forger","commode","bleach","sideshow","banister","closeup","dysentery","steeple","offence","commandment","furlough","best-seller","filament","mountaintop","censor","snowmobile","kaleidoscope","elf","imp","slipper","lunacy","telecast","nanny","kernel","eventuality","subordination","sonnet","nitrate","foal","prank","expropriation","fedora","zigzag","resale","namesake","highlight","supplication","concurrence","medallion","jailer","loin","tread","quill","cardigan","prune","slur","surtax","internist","strait","smuggler","panacea","turd","wanderer","crude","darlin","epitaph","docking","seashore","cheeseburger","netting","provider","dispenser","intonation","marching","caress","hootch","morass","chum","sanctum","headband","powerhouse","axiom","terrier","springboard","tot","latrine","toad","clink","herbicide","figger","hick","manger","poppy","chaise","archetype","undoing","beehive","illustrator","withholding","sterility","paddy","coven","custodian","half-life","embezzlement","armoire","kickoff","possessor","rectum","sit","daisy","housecoat","pollster","policewoman","ointment","expressionist","stockpile","bombshell","impresario","co-pilot","chessboard","dazzle","scepter","archdiocese","linguist","odyssey","capitol","accession","lute","liter","multimillionaire","decoy","warp","conveyor","grandpa","ance","mumble","betterment","bullfighter","chador","ampule","indiscretion","shake-up","clarinet","catapult","normalcy","shanty","dinosaur","epithet","tang","scaffold","immunization","repairman","suntan","mu","environmentalist","nightcap","tempest","artisan","orbiter","spiel","needlepoint","geologist","humanist","stutter","perplexity","roundup","concoction","treadmill","cacophony","antipathy","blackberry","bloodbath","brassiere","allergy","hitchhiker","grunting","choke","sitter","elixir","ba","repatriation","whack","decanter","crusader","burlap","incursion","lyric","compilation","seaport","coachman","philanthropy","secretion","collie","inquest","taper","moral","quartermaster","jeweler","salutation","confluence","gullet","tram","hideaway","by-product","drybone","copulation","divorcee","mausoleum","peeling","annuity","set-up","skiff","neurosis","windpipe","buoy","glide","archaeologist","pendant","junkyard","bullhorn","porthole","quandary","irrationality","acidity","pragmatist","derivation","stylist","duplicate","panther","brigadier","introspection","depravity","keynote","vexation","psi","weighing","deserter","speculator","teak","armful","remission","precursor","sorghum","harmonica","olive","gangway","contraband","defector","purgatory","genie","expedient","crowbar","desecration","bathhouse","enhancement","tenet","seasoning","wrangling","downhill","venue","tracery","dictation","bailout","undertone","pecker","prep","forerunner","bandstand","letdown","luminosity","tonnage","catwalk","brunch","sapphire","ballplayer","wineglass","readout","genealogy","horsepower","messiah","blackjack","hemorrhage","damask","registry","gunwale","jerkin","humorist","bowler","tingle","engraving","chauvinist","spirituality","eyepiece","twang","constancy","blot","blob","chard","highschool","sportswriter","tiara","domino","contestant","migraine","newscast","mainstay","hammering","tracker","wager","offshoot","buster","informality","python","felon","imperfection","slag","convulsion","sedative","cellblock","punt","headwaiter","outhouse","monstrosity","nonwhite","override","raisin","inversion","pancake","flavour","cataract","reclamation","churchyard","pidgin","suction","chanting","aggravation","dynamo","pee","fistful","hogan","byproduct","brooch","lullaby","workday","slop","silencer","dealership","earner","anchorman","pittance","crumb","custard","rainstorm","tote","mulch","mason","earl","barroom","levee","discouragement","falsity","compressor","lodging","gynecologist","divination","calico","bibliography","cyclone","senor","gatehouse","lagoon","squirt","artwork","songwriter","derivative","supernova","divan","photon","surety","cobbler","fatality","gout","eleven-year-old","ent","cropping","mainspring","prism","confederation","weaver","neighbour","yuppie","muffin","juniper","ovum","lesbian","pi","shimmer","fax","increment","co-ordination","splashing","thanksgiving","exaltation","confiscation","fairy-tale","fudge","brief","priestess","re-creation","hydrocarbon","ford","usurper","maelstrom","spaceport","swordsman","vegetarian","newness","grad","potter","manservant","fullback","fiend","giver","subculture","debutante","striving","scorer","catechism","charger","armada","blond","paign","handball","wince","appetizer","guidebook","jog","millet","hoot","inferno","pardner","mash","mousse","mammography","launcher","battering","predilection","portent","beep","exhortation","notification","warm-up","diatribe","panda","menstruation","telex","revitalization","workingman","cordon","charmer","fumble","hamper","moralist","settler","chowder","ley","mannerism","drunkard","posting","turquoise","elasticity","abbot","bookie","tusk","paragon","precondition","rollback","lunge","conundrum","eviction","sealer","cellist","cosmology","turntable","outside","fortification","nightstand","spook","shoemaker","sac","sulfate","isle","antigen","steed","bacterium","utopia","stunner","hillock","clove","irritant","tat","memento","rung","gaffe","portraiture","solicitor","rodent","barter","intensification","gallbladder","condom","antiquarian","peck","cheering","meteor","inflow","stenographer","blinking","icing","jackass","dweller","fiesta","irrelevance","harpoon","appendage","stipend","mommy","cassock","microfilm","dead-end","vermouth","scarecrow","fielder","referral","mart","burger","ticker","hindrance","coverlet","speedboat","wafer","sluice","bellboy","hangout","figurehead","midterm","petticoat","matador","skein","beholder","flier","waiver","flotilla","smudge","inequity","mixer","sulfide","banality","roach","billy","tailgate","gaggle","softening","loincloth","gore","bib","chrissake","changer","muse","longitude","tourney","mil","aorta","poop","regression","soviet","placing","winch","apostle","constant","squabble","blimp","abdication","porpoise","puncture","workbench","parameter","conventionalist","flagpole","unfairness","reptile","typist","bookshop","hesitancy","strongman","headland","sprint","manhole","blowing","archipelago","ideologue","slouch","poke","gush","stratum","mulatto","echelon","postmaster","sheik","emigre","alto","affectation","rad","climber","deerskin","bower","idolatry","reciprocity","sweet","wasp","dissection","baby-sitter","purple","toothpick","lyre","archer","sprawl","councilor","contrivance","flake","kynd","suffocation","damp","ware","travail","candelabra","wrestler","patina","moaning","paisley","recruiter","moderator","respondent","marmalade","bellow","harpsichord","atrophy","ejector","jetty","stripper","monorail","dramatist","hysterectomy","riverbed","revaluation","stoppage","conspirator","fetish","sunflower","cognition","scrim","rec","retriever","aphrodisiac","redneck","palsy","pullover","flywheel","roundness","peculiarity","ernment","nectar","ruck","swimsuit","curd","underclass","polka","conservationist","mire","drumbeat","cinch","cordiality","deacon","speechwriter","purr","gelatin","muddle","booby","solid","cloakroom","stopwatch","sportsman","burlesque","overload","mademoiselle","divider","bailiff","handout","ordination","stiff","languor","paperweight","opiate","snap","causation","mower","perversity","snatch","touchstone","self-indulgence","shrub","interceptor","mammoth","proceeding","cheekbone","spoke","repellent","cardiologist","reminiscence","sprinter","evocation","postscript","enlistment","blotter","troika","dacha","cabdriver","fund-raiser","switching","para","tendon","fireside","effigy","leech","veneration","reek","schoolyard","pellet","shellac","weasel","jab","carcinogen","restroom","cauliflower","levity","caftan","topside","fruitcake","bickering","drawing-room","dovetail","culvert","chateau","bugging","tinker","hobo","corset","automaker","actualization","oration","handhold","nutmeg","tentacle","quicksand","handler","panoply","bowhead","testimonial","mammal","bellhop","devotee","technicality","trainee","mongrel","newscaster","aggregation","footpath","fawn","accreditation","heave","jib","rationalist","vendetta","midpoint","buckboard","screwball","hatchway","disinfectant","cramp","causeway","tease","corkscrew","sledgehammer","sloth","materialist","mogul","stopper","bevel","carbonate","berry","snore","throwaway","agribusiness","rerun","guillotine","nip","computation","keyhole","storybook","watercolor","cer","porcupine","urging","cockroach","esse","headman","settee","usher","short","obstetrician","faggot","ballpark","palisade","whimsy","co-owner","spout","nub","pectin","dun","cypress","trombone","scat","lite","dame","quip","invisibility","baboon","sneeze","swish","originator","biennial","newsreel","chameleon","dressmaker","storehouse","trapping","statistician","bloke","helmsman","ewe","drape","trump","great-grandmother","cloister","caterer","grounding","hotbed","life-span","urinal","funk","bedchamber","boudoir","theoretician","oddball","nameplate","raven","ditty","canary","anticommunist","reconsideration","playboy","skate","transparency","uplift","six-pack","rambling","commendation","wimp","pestilence","sufferer","kelp","counterforce","self-doubt","deformity","croak","marine","marksman","directorate","reversion","stimulant","dence","beloved","eraser","slurry","tracing","bigot","compendium","entitlement","monolith","misrepresentation","darkroom","nutshell","torque","concubine","peephole","lesion","bogey","spindle","birdie","nugget","tenon","supercomputer","weakling","provenance","vowel","empiricist","filet","co-founder","prelate","onlooker","tricycle","sax","catheter","accessory","fresco","prod","oscillator","self-image","refraction","excretion","prance","insurer","cask","impersonation","rangeland","toothache","magnum","accuser","rubbing","carver","carnation","masquerade","pervert","trapdoor","shaker","mittee","tux","poignancy","payday","captor","couplet","mutant","jogger","raider","dilution","sickle","prowl","blister","reassessment","infirmity","matchmaker","workload","restaurateur","tuning","wiretap","perpetrator","davenport","lamppost","inductivist","affect","sterilization","booming","rucksack","repurchase","starship","bystander","taker","spaniel","teletype","cuckoo","sneaker","aspen","soundtrack","sacrilege","surname","succor","co-chairman","anticlimax","hopper","jumpsuit","rinse","rummy","cigaret","washcloth","butchery","almond","cooker","implement","effluent","cheat","threshing","silicone","draining","vector","shopper","dandelion","pecking","brazier","cobblestone","slugger","sacrificer","airlock","lunchroom","zebra","ejection","cutthroat","wizardry","crony","kennel","internship","cohabitation","omelet","wheelhouse","redundancy","schema","psychopath","buttock","grasshopper","playmate","lamentation","socialite","cornucopia","lichen","coterie","warlord","discomfiture","frieze","montage","traveller","curvature","condensation","vineyard","scraper","generality","archive","half-sister","gangplank","intimation","doublet","pleading","tome","quadrangle","connotation","lifeboat","blueberry","coinage","prospector","bash","disciplinarian","dualism","bookshelf","adjutant","clod","apportionment","footbridge","tourniquet","spore","slicker","jetport","magenta","schizophrenic","oilman","harbinger","trespass","merry-go-round","sabra","old-timer","vigilante","melanoma","torpor","gliding","refutation","dab","jurist","plumage","kitty","cauldron","abbey","jasmine","lefty","cabal","detonator","retiree","abatement","clamp","roost","councilman","halfback","centimeter","shirttail","whispering","stratagem","exponent","cheesecake","truism","jaunt","node","ironclad","undertow","self-portrait","urchin","idealization","splendour","antechamber","living-room","sampler","friar","irregularity","lateness","playback","binder","washbasin","tummy","capitulation","felicity","canter","birthrate","earthenware","kitchenette","foundry","ladle","babushka","chlorophyll","adjournment","villager","recrimination","hotshot","blaster","pruning","soloist","hummingbird","recuperation","bequest","hemlock","cottonwood","drawbridge","alternation","malt","interconnection","mugger","tuft","keystone","riverboat","thrall","ayatollah","highland","mistrial","bunkhouse","anesthesiologist","dredging","anode","salsa","prizefighter","neckline","chile","foreclosure","cola","digression","scythe","lout","chamberlain","minefield","sabbatical","appraiser","isotope","demarcation","garnet","buzzard","repulsion","lowland","snifter","bending","weekly","dispensation","botanist","sari","stabbing","ovary","skullcap","journeyman","thievery","look-alike","parson","heartbreak","distillate","neophyte","blower","storekeeper","firmament","taxicab","corona","fusillade","publicist","resume","breather","casement","smokestack","interrogator","outcropping","mecca","dilettante","shoestring","belch","behemoth","negligee","heath","smut","negative","fistfight","regent","incumbency","curragh","toga","ministration","turnip","beamer","stepladder","loon","businesswoman","jumbo","whining","spoor","posturing","parlour","concertina","alkali","rampart","chime","warmup","taffeta","hyena","firehouse","sweetener","guessing","pronoun","madhouse","lioness","breadwinner","diocese","escarpment","mimic","retina","larder","gnat","hothouse","ponytail","markup","bevy","revocation","depressive","garner","redefinition","lifter","stateroom","nutritionist","isolationist","surveyor","polemic","ornamentation","gouge","counterweight","thrower","illegality","joining","lumberyard","wholesaler","obeisance","stagecoach","substage","lockup","nudge","rejoinder","compost","carburetor","peacemaker","prologue","swinger","right-of-way","precipitate","sprinkler","crone","valentine","vassal","tabloid","minstrel","nursemaid","attribution","courtier","docket","spool","convocation","serviceman","letterhead","zealot","negro","cackle","masthead","dispersion","underwriting","armload","noodle","squawk","periodical","reformation","boa","starlet","about-face","ejaculation","encore","harangue","woodpile","earlobe","reaffirmation","handlebar","compunction","contemporary","midriff","nimbus","householder","postgraduate","quirk","innovator","sneak","straitjacket","pussycat","belle","kidnapper","spacing","laying","standout","estuary","duster","jackpot","motorboat","welterweight","kicker","expectant","revue","senior","epistemology","yeoman","firearm","granddaddy","projectile","stammer","crossfire","toxin","hookup","phantom","transgression","flagstone","acuity","twick","acolyte","directorship","corpsman","worktable","mammogram","wart","liqueur","unbutton","receivership","duchess","delinquent","picker","earphone","blare","promontory","formalism","infamy","operative","hock","crusher","megaphone","retrenchment","chaser","dementia","wane","triviality","quadrant","curate","pairing","forging","dermatologist","mango","bon","moccasin","hayloft","marionette","seedship","ooze","interloper","twill","solicitation","trowel","professorship","scrimmage","scrawl","blockage","parkway","motorman","snapper","transcription","vasectomy","binary","flagon","choirboy","butte","throbbing","bound","thunderbolt","dike","cowbell","elect","prodding","lynching","rant","drifter","snot","preservative","brogue","tary","tortoise","lattice","strudel","composite","churn","median","neurosurgeon","mariner","kiln","boarder","ama","petal","friendly","clearinghouse","swastika","filler","enquiry","dispensary","chump","archeologist","rescuer","dy","draftsman","snicker","shakedown","romp","construct","conclave","winery","polarity","breakin","wailing","gurgle","bedroll","commissar","albatross","shading","peal","taverna","chicanery","has-been","waistline","oaf","satirist","faint","myosin","dimple","landfall","fornication","smithy","tough","gunboat","busboy","cassava","poplar","discontinuity","obelisk","blubber","demonstrator","meltdown","abolitionist","thorax","holler","pimple","sending","druggist","indirection","leotard","ken","showman","despot","ombudsman","lyricist","dearie","lumberjack","gaff","pagan","cremation","infarction","sturgeon","publican","bottleneck","chambermaid","pectoral","purser","godsend","whisk","canard","concentrate","copter","shipwreck","laundering","clipper","notepad","jackal","indentation","basilica","adhesive","mermaid","knighthood","personage","omelette","whoosh","embellishment","misgiving","tracer","brawling","crucifixion","steal","transference","sleight","threesome","windowpane","bereavement","viceroy","betrothal","refresher","seagull","jay","needler","discoverer","goiter","caterpillar","impostor","diminutive","cation","playpen","amputation","confidante","dockside","inquisition","chronicler","seamstress","lath","absolutist","cadaver","perusal","subterfuge","self-satisfaction","sawmill","agitator","shortcoming","breakwater","microcomputer","lima","greatcoat","mahout","prima","undress","superstructure","stopgap","moo","bio","fret","pomposity","bough","autocracy","anchorage","samovar","gen","burrow","rosebud","segregationist","mortise","hydrant","postmortem","oversimplification","entryway","paintbrush","rea","balustrade","chuck","trumpeter","ferret","opportunist","pinnace","salamander","transom","mace","individualist","synthesizer","thoroughbred","cupola","tomboy","ensign","bottling","whir","poultice","entranceway","saver","gurdwara","renegotiation","tossing","ruffle","footprint","skeptic","birthmark","tailspin","kickback","chalice","plagiarism","passer","inhumanity","ceremonial","sapling","babysitter","creeper","galleon","bellman","holly","hacienda","cur","transplantation","scab","ballgame","demotion","flimsy","hovel","lug","layup","firefighter","gravestone","nymph","cajole","tickle","boxcar","secession","refractor","somersault","personification","treacle","tutorial","voucher","thimble","stickler","front-runner","paroxysm","exorcism","psalm","infestation","scrubbing","castor","peppermint","orchestration","extremist","oppressor","lode","prompting","watchword","swindle","statehouse","floater","nightdress","bloak","elegy","woodshed","trembling","banning","adornment","redoubt","lightweight","postulate","anti-Semite","tasting","viewscreen","sentinel","nation-state","heft","nurture","villainy","manhunt","invoice","sprig","self-denial","selector","piglet","commemoration","crucible","piper","curtsy","lackey","breastplate","gadfly","octave","epilogue","self-examination","thyroid","apologist","chemise","super","figment","waif","essayist","brewer","miniature","sediment","cannibal","tulip","caramel","caseload","synonym","analogue","ver","shirtwaist","cornerback","insecticide","debauchery","lien","strangulation","intricacy","guesthouse","crumbling","glassware","cachet","thumping","damper","colonist","frolic","ogre","heist","sorting","pawl","muttering","refill","cowl","imbecile","painkiller","garter","creole","overpass","simile","potpourri","piling","predisposition","corsage","mobster","sandal","aphorism","vice-chairman","heartache","converter","pecan","ecologist","substrate","quagmire","trenchcoat","voyce","overstatement","soapbox","rediscovery","effusion","agronomist","firecracker","haunt","murmuring","henhouse","fluctuation","signora","mulberry","hoist","bullfight","discotheque","finder","tureen","hairstyle","dignitary","consummation","spar","pogrom","beeper","read","outboard","sho","skit","impurity","sadist","parafoil","bouncer","spender","locust","boardroom","burnout","inoculation","surfeit","welder","propagandist","mortuary","pessimist","equivalence","juke","spatter","incubator","reproof","gulch","notary","speedometer","lodger","mitt","southpaw","footman","amity","bloodline","cleaver","coffeehouse","confederate","assist","ation","lecher","abrasion","daybed","knit","laddie","forfeit","kebele","filigree","frisbee","cantina","oscillation","countryman","juggler","scion","acrobat","hourglass","realtor","onyx","pettiness","chancellery","footfall","slippage","mandarin","eral","lob","impertinence","providence","dom","idyll","democrat","deferral","sorority","slamming","badger","mutter","ling","strobe","explosive","municipality","crossover","bedstead","spatula","tug-of-war","goon","pauper","lation","sacking","alder","nightstick","salve","infraction","prowler","falsification","pant","drunk","rumbling","ce","minuet","plaything","yelling","kiddie","duction","buttress","carapace","sobbing","insufficiency","prig","bidet","bloodhound","madwoman","buffoon","vignette","doorjamb","caprice","gable","converse","cad","creche","mullah","spectre","spotter","ingenue","chalet","automatic","stash","truckload","tailback","static","productivist","dissipation","haunch","nag","awl","self-delusion","rattler","blacklist","beagle","trapeze","obstinacy","fiddler","theorem","rearrangement","changeover","reassignment","courtesan","fillet","nay","cutout","luncheonette","purveyor","incitement","remarriage","amelioration","executor","buttonhole","duality","churchman","sickroom","farmstead","jester","perfidy","cuticle","weal","snub","pretension","roadbed","furnishing","quickie","workweek","conveyance","pseudopatient","turbocharger","fleece","abbreviation","spigot","leaflet","great-aunt","ninny","beaker","experimenter","validation","inhabitant","grading","cantaloupe","potentiality","flue","commoner","playroom","readjustment","boathouse","vivacity","brakeman","petitioner","singularity","gage","delineation","fester","paratrooper","font","pitchfork","signifier","crossbar","playhouse","tripe","stylus","pacemaker","clustering","hone","runt","emporium","ragtag","aneurysm","trapper","pulley","thrashing","candlestick","checkerboard","swoop","surcoat","dystrophy","bristle","beck","toolbox","hunchback","subcompact","doze","seaway","disclaimer","arbitrator","miller","crackpot","loafer","instigation","sen","bale","skim","skip","dollop","tender","oeuvre","goner","sor","tort","cropland","profundity","caf","zoom","gabardine","quack","cataclysm","condolence","foxhole","circlet","brave","misfit","bivouac","artificiality","dachshund","puke","bagel","sortie","nomad","opal","ethnicity","firebox","ratchet","cud","worsted","squabbling","cheque","jean","avatar","dirge","footstool","velour","barrister","pression","microchip","coda","reappraisal","cess","hangman","centenary","plough","broomstick","headstone","tormentor","sore","rathorn","voyeur","world-view","co-star","warren","fail","deflation","noble","fleck","saleswoman","hap","machinist","waffle","tom","ell","prefab","suckling","guardhouse","sabre","entanglement","integrator","quarterly","paraffin","heifer","frivolity","good","bougainvillea","excommunication","distillation","cyclist","meteorologist","rubric","cul-de-sac","misnomer","phobia","demagogue","bloodletting","raconteur","ger","astrologer","zygote","counterrevolution","reinstatement","anchovy","getup","tryout","scullery","turnstile","cyst","mustang","gaslight","self-deception","emanation","grown-up","escapade","versity","fishery","paprika","grailstone","gurney","fount","holdout","licensee","jackknife","asterisk","still","fundamentalist","humbug","repast","christening","butternut","miniskirt","fortune-teller","spillway","ference","salver","payout","nodule","high","tugboat","gizzard","sympathizer","fibrillation","incompatibility","dodge","trove","mercenary","pigtail","matchbook","masterwork","barb","endeavour","confection","ephor","yarmulke","char","mimeograph","holdover","subtitle","saddlebag","metronome","tine","testicle","caveat","etching","auntie","guarantor","ringer","airman","boatman","carnivore","armband","polder","tryst","lem","sitting-room","barrow","reappearance","pastiche","bankroll","stroller","saxophonist","blanc","redesign","plotting","gruel","juicer","slat","scooter","socialist","gradient","ember","scorecard","remembering","bo","forecaster","flirt","backache","parakeet","pixie","guffaw","anesthetist","logjam","pursuer","physiologist","follicle","coverall","patsy","bunt","lubricant","jawbone","numeral","mourner","rune","bettor","solder","nitrite","rime","pinstripe","pistachio","monocle","equivocation","crystallization","twit","two-year-old","toupee","eyelash","recognizance","cy","sophistry","seesaw","loony","do-gooder","dusting","commonality","yearling","disbarment","self-congratulation","tsar","vagabond","rhinestone","viper","planetoid","crochet","laird","flatland","prompt","catamaran","wigwam","mainframe","shivering","stringer","vane","iniquity","hoodlum","tableware","smelter","overlay","umber","placenta","yew","right-hander","laggard","cornice","philanthropist","scouring","dissenter","mainsail","showplace","conch","sentimentalist","protectorate","sanitarium","truancy","angler","showpiece","carotene","pollutant","diabetic","hairbrush","videodisc","intellectualist","pothole","setter","tense","grader","kneecap","birdbath","dell","typhoid","tuba","torturer","commie","houseboat","revelry","medalist","hinterland","jowl","splotch","sable","mouf","ripoff","coolie","streetlamp","damn","sharecropper","oral","schoolmate","commander-in-chief","capitalization","flex","shtetl","chenille","pullback","pharaoh","claret","fulfilment","glower","remuneration","internationalist","pap","pediment","sonata","toke","co-director","dollhouse","salesgirl","greenback","analog","ofa","freelancer","hairpin","aphasia","kicking","bummer","lawmaker","thickening","juggernaut","comma","sander","claimant","triad","rhizome","prolongation","placer","transvestite","faceplate","shortening","coffle","surfer","greengrocer","roughage","nudist","dumbbell","coiffure","pinky","ex-President","start-up","bobby","sidearm","paean","raiment","conceptualization","surmise","agnostic","cranny","tassel","infarct","pitchman","minor","stationmaster","sublet","puter","dramatization","mounting","washstand","counsellor","penknife","curtailment","remake","millimeter","sextant","vocalist","blowup","walleye","pickax","fanny","ascendant","brushing","highball","bandleader","winning","godmother","horoscope","disequilibrium","run-up","grazer","sandbar","motorbike","hassock","piggy","teat","reprise","wheeling","psychotherapist","calabash","cob","relativist","packer","slayer","digger","banshee","autocrat","knave","muskrat","extinguisher","foreleg","sobriquet","hospice","accretion","mastermind","figurine","newsmagazine","epidemiologist","pic","minaret","dereliction","city-state","jawline","escapist","legation","weatherman","sinker","cabby","guardrail","objector","timepiece","cistern","werewolf","decadent","harlot","epiphany","bricklayer","doorkeeper","obsidian","bedpost","constriction","refectory","blackbird","enforcer","riposte","schmuck","squab","pop-up","handrail","sandbag","superman","underbelly","alarmist","sesame","paratroop","droplet","proclivity","theorizing","quark","tactician","sundae","poolhall","behaviorist","dipper","postmark","co-conspirator","carload","electrocution","mould","goodnight","appendectomy","statuette","coefficient","cornet","scolding","prude","platitude","carport","lilac","geisha","foist","mitigation","percussionist","lechery","wyrm","charlatan","tussle","slough","jamb","twister","lakeshore","scavenger","pinkie","changeling","pinhead","muster","exploring","fief","critter","haystack","skimmer","geyser","stumble","update","tabernacle","gargoyle","projectionist","requisite","suffix","ramrod","betrayer","perience","tance","fluting","flare-up","fatherland","guardianship","douche","good-night","trawler","headsman","stoplight","operetta","spend","hater","teakettle","geneticist","particular","wardroom","slider","deuce","gingham","telethon","acclamation","centrifuge","workstation","pretender","prong","lampshade","ureter","hiccup","acetate","molding","wallop","vagrant","three-star","carafe","blowout","equinox","rave","junior","spoof","confessor","troubleshooter","braggart","judgeship","rapier","landmass","stoic","cuckold","inheritor","forester","jangle","gymnast","wingman","stein","gnome","drumstick","whatnot","yachtsman","realty","glob","by-election","academic","deflection","knocker","wondering","mugging","petit","frosting","pillowcase","panelling","grendel","tribune","tabulation","simulator","whaler","stork","gill","cavalcade","workhorse","locksmith","preppie","henchman","countertop","groundcar","puree","wellspring","debasement","prankster","tration","insert","put-down","typer","chartreuse","crematorium","headpiece","noncom","wipe","drove","sportscaster","impersonator","shrew","twitching","loader","magnolia","dropping","functionary","dissonance","cudgel","forfeiture","glutton","reject","doubleheader","tarp","suburbanite","afghan","chaperone","bas-relief","oscilloscope","imposter","newel","trusteeship","shocker","cannonball","half-breed","woodpecker","tumbleweed","snip","consignment","left-hander","spoil","also-ran","exhalation","signification","tester","ashram","gardenia","deductible","frontline","subtraction","bowstring","upland","bearskin","gramophone","mock-up","serenade","mix-up","extrapolation","tidbit","semaphore","banging","dogwood","carol","mapping","exchanger","ignominy","retraction","videocassette","precept","sirloin","mortification","pagoda","belfry","cubbyhole","mindstone","greyhound","clank","snowbank","instep","sanatorium","savanna","longshoreman","copier","nightshirt","boatyard","brigand","usurpation","understudy","interrelationship","undercarriage","sulphate","quasar","marshmallow","thrush","sweeper","alleviation","feint","chimera","infidel","modifier","perennial","simpleton","gridiron","overlord","airway","binding","abstention","algorithm","amalgamation","ascension","herdsman","lollipop","pastel","laminate","tendril","synopsis","drawstring","intermarriage","restorer","swoon","firefight","civilisation","self-criticism","hanky","ventricle","jot","interferon","circel","avenger","stepson","amethyst","beachhead","loggia","sizzle","burp","watchtower","endearment","dryad","prefect","tong","croissant","blocker","brioche","thistle","sunburst","savor","dumpling","checker","soliloquy","marketer","wheeze","molar","oboe","inbound","masochist","superficiality","tabby","outcrop","deputation","bassist","particularity","strop","thang","doggy","zation","ghoul","domestic","frostbite","relapse","floorboard","clicking","paraphrase","sinkhole","pushcart","overdraft","spinnaker","sourdough","sweatshop","meteorite","lander","caboose","junket","planer","iguana","brouhaha","reaper","sharpshooter","eggshell","self-sacrifice","minnow","skyrocket","connexion","effrontery","oblong","biker","flinch","cog","bullock","retrial","underwriter","gentlewoman","noggin","sissy","collect","dogmatism","sweatsuit","biplane","polariser","server","hiker","electrolyte","thunderclap","bronc","snooze","mascot","sherbet","carillon","decal","womanizer","underground","tailcoat","worshipper","automaton","proscription","sleuth","honeybee","abutment","foller","palladium","partake","jailing","counterfeit","pompadour","moneymaker","acacia","monthly","geographer","doghouse","bludgeon","fitter","conservator","indecency","atoll","fife","acquit","barracuda","mortician","striker","plait","untruth","hoarding","eighteen-wheeler","shakeup","grounder","abuser","hamstring","parishioner","cherub","cubist","antler","kisser","shunt","cravat","admixture","whinny","scorpion","amenity","matchup","spacer","settling","insinuation","possum","tenancy","girder","adapter","mousetrap","cubble","steppe","hypochondriac","covey","whipping","taunt","pocketful","pug","panhandle","conga","citron","foul-up","plaint","nouveau","oilskin","meridian","lifer","bolster","wren","gripe","mountaineer","transceiver","treetop","hex","harrow","tampering","photocopy","redskin","cesspool","barrette","cleanser","missive","breakfront","mini","ridgeline","semi","pasha","byword","phoneme","seducer","miser","cookstove","limerick","cummerbund","labourer","ascot","wraith","tarantula","toffee","pituitary","liana","cleat","line-up","helix","highboy","bicep","partment","coed","expletive","dumpster","deferment","progenitor","sandbox","mignon","typhoon","sublimation","backdoor","alchemist","pacifier","insomniac","hairpiece","lintel","indemnity","blurb","republican","electrocardiogram","futurist","recliner","mote","sketchbook","fulcrum","gratuity","aqueduct","adherent","masque","sundial","template","handmaiden","hedgehog","coding","corsair","solstice","orifice","sonobuoy","prizewinner","spinner","townsman","rosette","mind-set","unkindness","pushover","bility","infielder","hutch","erasure","parallelism","avowal","fastness","broadcloth","hellhole","grandparent","toehold","ident","sleepwalker","watching","aerie","database","mismatch","hombre","scrambler","spoiler","putdown","rookery","spinoff","ringleader","duchy","sealskin","transformer","doggie","bedsheet","cowhide","ceramic","prostration","cheroot","houseboy","giantess","tomcat","speedster","basalt","minicomputer","rapacity","spaceman","in-law","equerry","humpback","academician","harvester","fairground","ream","carat","entreaty","groundswell","obfuscation","provocateur","fugue","denigration","rifleman","manipulator","panting","synod","glitch","nightie","goaltender","kingpin","comforter","anesthetic","klaxon","hijack","orb","hostelry","gladiator","misadventure","bombard","fixity","tanner","stringency","wonderland","x-ray","plainclothesman","roadhouse","travelogue","gasket","nibble","hacking","nude","tincture","receptor","fink","schoolmarm","washtub","homesteader","hacker","portiere","hatbox","tamer","howitzer","grouper","frontage","amoeba","clime","flashback","teamster","accolade","polluter","officeholder","inpatient","altercation","reverberation","coproduction","phosphor","substation","bandana","sapper","preserver","pigeonhole","prefecture","milkman","avocation","argyle","amphetamine","linker","leviathan","hamster","bondsman","comer","bumpkin","sheikh","beefsteak","tyke","discoloration","kingmaker","quotient","excision","whitey","asymmetry","trill","discourtesy","bleat","hatching","crier","creel","seabed","witticism","riser","lurcher","moviemaker","pantsuit","linchpin","deformation","deodorant","soybean","washboard","egotist","underpass","dysfunction","tingling","barstool","paramour","udder","microbe","radiologist","qualm","welt","salesperson","signpost","sepulcher","lumpectomy","slaver","shopgirl","peregrine","siesta","reiteration","profligacy","iodide","iconoclast","rollcall","fillip","oratorio","splat","incoherence","accompanist","motorcar","nunnery","busybody","carryall","nettle","jaguar","pretence","odometer","potentate","mussel","prophetess","monetarist","proach","typescript","hacksaw","broadsword","miter","fatty","terrarium","archangel","powerboat","stooge","cannery","pylon","pulsation","misstep","yucca","hearthstone","rumour","lockout","toboggan","trampoline","concatenation","debility","acorn","forklift","psion","dragonet","ligament","folio","tie-up","picking","swatch","arrowhead","martinet","fisher","quintet","ellipse","sumbitch","legitimation","nightwatch","hardback","schemer","conversationalist","collectivist","reallocation","diorama","cutaway","point-of-view","cattleman","abscess","talc","incubus","dribble","sis","rhododendron","rolling","spiderweb","nonsmoker","crissake","refusenik","save","obstructionist","suture","parenthesis","reefer","great-grandson","steelworker","bumblebee","bullfrog","festivity","embolism","defeatist","tankard","ferryman","garret","co-worker","consonant","copywriter","bookseller","compress","dogfight","embezzler","quiche","liege","dissector","taskmaster","prosthesis","emulsion","spitball","modulation","squint","retelling","baiting","whirr","air-conditioner","individuation","geezer","aspirant","pensioner","re-enactment","flapper","looker","marshland","sexton","adverb","coenzyme","misapprehension","inaccuracy","barmaid","beautician","daredevil","racehorse","oxford","spume","busload","tradesman","manicure","propellant","apothecary","ruffian","titillation","instigator","siting","ringmaster","enumeration","twirl","bookmaker","technocrat","mouth-harp","quaver","icehouse","ventilator","roadster","subpena","carter","comedienne","savannah","milkmaid","pumper","signer","deadbeat","cofounder","bootlegger","tribesman","wildfire","shard","hailstorm","struction","routing","dolmen","idiosyncrasy","poniard","honky-tonk","spendthrift","draftee","hermaphrodite","pinafore","roundabout","frill","redeployment","ophthalmologist","caldron","reinvestment","troubadour","fjord","leave-taking","elongation","clinch","trinket","suasion","neutralist","finalist","whiplash","ventriloquist","violator","monarchist","spanking","grindstone","initiator","standard-bearer","sender","atelier","distemper","ingot","frontiersman","altarpiece","endgame","homily","synapse","pillbox","ochre","scimitar","jubilee","presentiment","tation","aggrandizement","truncheon","damsel","fallibility","papaya","piggyback","puppeteer","workhouse","nightingale","entomologist","wicket","debriefing","logician","moorland","minimalist","matte","skirmishing","tonality","maidservant","yam","gatekeeper","whammy","drudge","angora","garland","manoeuvre","moviegoer","slingshot","titan","re-evaluation","ironwork","ambassadorship","lanch","pollination","riage","vocalization","brawler","shaving","particulate","inhaler","impoundment","surfboard","waterman","almanac","pepperoni","kook","colonnade","infantryman","scruple","functionalist","wisecrack","conscript","boor","bannister","pretzel","analgesic","firebrand","microprocessor","frame-up","guardsman","teetotaler","broad","pallbearer","airframe","wrangle","backboard","knockdown","reparation","poorhouse","milkshake","battlement","dragonfly","paymaster","snuffler","crudeness","nerd","blockhouse","donut","backhoe","principality","dimmer","wounding","collier","beater","footlocker","barkeep","absurdist","brickwork","great-uncle","rumination","appellation","joiner","hydrolysis","interlocutor","raindrop","hardtop","groping","cymbal","miscellany","pomegranate","hearer","abortionist","corncob","shoal","dunce","bellowing","bridgehead","mangrove","blotch","boxwood","briar","which","trickster","epileptic","dependent","encumbrance","claque","pickpocket","half-truth","bilge","overrun","caveman","posterior","derriere","sty","maggot","vibrator","imbecility","hang-up","syllogism","blindfold","sunbeam","chrysanthemum","amour","ne'er-do-well","odour","flowerpot","satrap","reconnoiter","tonsillectomy","clampdown","coliseum","menage","warbler","hubcap","crudity","baseboard","lithograph","homeroom","stanchion","amphitheatre","disquisition","commonplace","feedlot","reprint","shire","kraken","careerist","goatskin","worldview","waddle","washout","doormat","diadem","sniffer","spat","superhighway","snooper","libation","zoologist","subtext","bailiwick","exterminator","popsicle","actuary","cabinetmaker","swami","contraceptive","softener","margarita","hatter","tention","earpiece","dormer","timberland","katun","crooner","one-liner","adjudication","snitch","referent","subset","disavowal","starburst","merchantman","dalliance","polymer","hypnotist","monogram","peerage","claymore","satyr","twerp","matchstick","rubber-stamp","clapper","exhibitionist","warhorse","eatery","seashell","radish","router","dinette","trombonist","rivet","requiem","breakaway","hard-liner","locator","shindig","corrective","truffle","whelp","expediter","savant","mitten","canton","wobble","misinterpretation","fense","headwrap","conciliator","chine","topping","assemblyman","divine","scuffling","boomlet","dervish","yellow-green","stockyard","hummock","trimming","royalist","calumny","vandal","prickle","strikeout","apologia","afterburner","hunker","flippancy","fop","embrasure","hornet","tithe","oilfield","lawman","turnkey","fledgling","coauthor","blowpipe","subjectivist","backstop","fishbowl","bedpan","sedge","protrusion","crybaby","freedman","seminarian","spacesuit","tautology","footstep","fiveyear","stoneware","mance","generalist","quitter","domicile","requisition","seance","cabana","wastrel","underling","looter","glassful","wallow","boater","disharmony","shiksa","herringbone","flyleaf","eyesore","lawnmower","walk-up","hemline","wiggle","posing","whirring","cropper","reappointment","psychodrama","shaver","orthodontist","granary","extrovert","calfskin","thinning","foghorn","trainload","carbide","metier","harpist","minim","ballcarrier","rayon","bursting","flipper","fastening","mullet","exploit","squatter","nullity","commodore","newlywed","eavesdropper","chiropractor","miler","arsonist","wrecker","transmutation","incompetency","subcontractor","tress","meatball","bobcat","distributorship","camcorder","pasty","glimmering","groaning","classicist","stakeout","supplicant","repeater","crackling","cryptographer","croupier","honeycomb","insincerity","inhibitor","mystification","greaser","barker","anthill","barbarity","strangle","myrtle","segmentation","marlin","capon","toenail","flip-flop","auger","blasphemer","dipping","pawnshop","penumbra","mohole","bauble","rube","flophouse","triplicate","sardine","master-mason","fang","brainstorm","derangement","hanker","molestation","smokescreen","cavalryman","edging","layover","signalman","clavicle","crewcut","tricolor","cochairman","liberationist","foreskin","bleacher","semi-circle","quince","flatcar","abattoir","farmboy","tibia","thrum","conformist","southerner","docudrama","whorl","break-up","conglomeration","exhibitor","bramble","cutie","woodchuck","compatriot","stole","tuner","housemother","dharma","femme","teahouse","banquette","bottomland","arranger","philistine","vacillation","chiton","retch","caddie","reissue","teaser","swampland","deejay","libertarian","pegboard","greenhorn","dork","cellmate","jobber","wishbone","millstone","haunting","blow-up","snorkel","snowplow","trespasser","punter","snowflake","snowdrift","gunnysack","surround","evergreen","clog","radioisotope","cougar","pundit","wattle","subgroup","oviduct","mixup","misstatement","sulfite","pansy","splint","counterproposal","pulsar","remove","landau","four-year-old","rebbe","disconnection","neomort","exegesis","meteoroid","meringue","sheepherder","radioman","strumpet","opment","millionth","speakeasy","conformation","cultivator","goof","annual","gazelle","demitasse","fishhook","preferment","homebody","skewer","chancre","sorbet","hologram","rivulet","oldster","prisoner-of-war","tulle","riff","restatement","debit","emplacement","repre","invariance","half-circle","objectivist","passer-by","scarlet","flail","impala","persimmon","purist","gation","burgher","snowman","starling","barony","annulment","lifespan","herder","embolden","swathe","ex-convict","trouper","half-wit","fuchsia","grange","ricochet","stinker","opacity","colander","absorber","armadillo","pleasantry","noncommunist","taxiway","overtone","debater","taillight","advisement","birdcage","baroness","aureole","breakout","colouring","astrophysicist","flatboat","stilt","eyeshade","barbell","deliverer","fishnet","prise","jackrabbit","manifold","chattel","jimmy","workshirt","thornbush","chatty","frisson","recount","patentee","oceanographer","forepaw","murderess","whalebone","frontrunner","cerebrum","jector","militiaman","lobsterman","earthling","clean","swindler","scree","begat","doorsill","housedress","strangler","shantytown","roughhouse","scenarist","foothill","contaminant","hamadryad","phony","fairyland","seascape","treble","prodigality","hobble","gantry","backroom","enticement","sawhorse","interviewee","cliffside","dustpan","scrubber","imbroglio","acquaintanceship","woodworker","aesthete","octogenarian","mauling","archivist","pungency","interweaving","jabber","bassinet","doubler","torte","linkup","outdoorsman","fixer","caddy","fumbling","defile","meristem","microbiologist","urologist","stovepipe","tambourine","constructionist","egomaniac","adjuster","liniment","impiety","timeline","cowgirl","sinecure","chillun","foreword","frat","retary","bagpipe","coif","visualization","colleen","shirtmaker","flounce","adder","riffle","underboss","reinterpretation","bender","seeding","fiver","sicken","decoder","holothete","figuring","stave","earplug","acrylic","epigraph","fairytale","flasher","sally","inkwell","nitwit","hussy","constrictor","stabilizer","stickup","seaplane","shimmy","dredge","updraft","speciality","insulator","frond","storyboard","shill","rafter","blowgun","dukedom","favourite","populist","striper","blowtorch","mallard","licking","poetess","tetracycline","ad-lib","toxicologist","fencer","gnawing","eration","photocell","golem","heirloom","penitence","gence","latecomer","broil","outdistance","howler","canine","replenishment","traditionalist","emcee","eyeglass","billow","eyelet","khaki","assignation","tepee","buccaneer","bellyache","parkland","musicologist","phaeton","spirochete","lanyard","mischance","tobacconist","blusher","castaway","meson","bouillabaisse","scrivener","stinger","life-cycle","harridan","motivator","mooring","crimp","inlay","purveyance","vertical","jackhammer","strongbox","dishpan","cobweb","couturier","chalkboard","basilisk","duckling","penitent","footrest","tangent","facing","peroration","floodlight","nouvelle","truss","sprite","drier","esplanade","banding","insulter","dialog","pincer","battlefront","missal","hayseed","parvenu","baronet","shipwright","whisker","no-hitter","double-dealing","moire","conjurer","rickshaw","crevasse","switchback","nicety","provincialism","novella","liberator","biggie","tune-up","ferryboat","remover","twosome","loveseat","tektite","sharpener","cartwheel","diva","flirting","disproportion","tortilla","rover","whodunit","birder","parley","birdsong","fiefdom","augury","harrier","tamale","judging","snakebite","diagnostician","tannin","qualifier","cheetah","distillery","protester","stockroom","factotum","newswoman","cosmopolitan","iridescence","aeroplane","toddy","co-defendant","parry","duocorn","boasting","elector","clarinetist","undergarment","psych","supergiant","armature","environ","collectivity","keepsake","gunfighter","wingspan","perforation","worshiper","groupie","cityscape","worrier","shipload","scallop","hatchery","portraitist","screamer","blaspheme","pacer","presenter","malcontent","seine","equivalency","scriptwriter","lieve","discard","bantam","centaur","typology","loiter","nigguh","drubbing","airfoil","curio","grandmaster","finisher","luminary","alliteration","phantasy","blooper","fasting","samba","gearbox","islet","apricot","smidgen","inset","firestorm","madcap","seedbed","gunsight","forelock","disjunction","writhing","huckleberry","abstract","squirm","ironist","monosaccharide","pushbutton","terracotta","artiste","showgirl","cornea","temptress","popularization","free-fall","scribbling","conviviality","flange","thwack","droop","rower","sweatband","gopher","mandolin","slobber","stricture","calyx","dietician","rehash","padre","ancient","dotage","jacaranda","pensione","contravention","undulation","ironworker","currant","hankie","face-lift","anthropoid","depressant","war-horse","tithing","greeter","matchbox","woodcutter","magpie","wayfarer","handcuff","lawgiver","traverse","minion","cavalier","sonarman","defoliant","scamp","snowshoe","polyp","gainer","honkie","bottler","halloo","amputee","ontology","bromide","brisket","goodie","tavern-keeper","choker","preaching","molester","tonsure","recapitulation","aviary","stevedore","raffle","bootstrap","angiogram","plantain","tipper","hooting","seismometer","persecutor","lobotomy","pigsty","virologist","gamete","presbytery","stepping-stone","dressing-room","cyclamate","chipmunk","platelet","flogging","tuber","reservist","blinker","demographer","turncoat","demesne","fancier","ideologist","self-justification","bucketful","m'lord","rapping","bestiality","irrelevancy","oiler","mackinaw","flutist","trafficker","categorization","pram","world-system","cathouse","deceiver","idjit","double-take","reformulation","brushfire","separator","neigh","whimpering","crisscross","regurgitation","auteur","backwash","refiner","broadsheet","hedonist","recitative","nonentity","codger","tinting","policymaker","tutu","boondoggle","entrant","wok","small","boatload","searcher","taMing","sycophant","substructure","megalomaniac","rusher","saleslady","registrar","blackguard","neckerchief","oldie","clinician","flushing","pinwheel","dition","charioteer","beastie","stridency","verity","eyedropper","canvass","desperado","teardrop","farmyard","mannerist","macaw","valedictorian","whopper","pertinence","assay","puncher","manse","anatomist","dishtowel","nuke","egalitarian","tribulation","cinematographer","sailer","icicle","legume","spiritualist","nativist","these","progressive","blastocyst","harpooner","pedant","instrumentality","connector","masseur","vertebra","moonshiner","bowsprit","grabber","stele","clanking","renter","antihero","bankbook","jailbird","handicraft","fighter-bomber","streamer","retardant","wallflower","flamethrower","agate","cairn","bantamweight","agglomeration","roustabout","linden","roughneck","formance","moray","cession","rashness","capstone","derailment","declivity","snowfield","talon","haymaker","abductor","diffuser","geosector","camisole"];Object.defineProperty(kp,"__esModule",{value:!0});kp.nouns=kp.adjectives=void 0;const R7e=Qj;kp.adjectives=R7e.default;const I7e=Jj;kp.nouns=I7e.default;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nouns=e.adjectives=e.uniqueUsernameGenerator=e.generateUsername=e.generateFromEmail=void 0;const t=kp,n=hte,r=(d,f)=>{const p=(0,n.randomBytes)(4).readUInt32BE(0);return d+p%(f-d+1)},i=d=>{let f;switch(d){case 1:f=Math.floor(r(1,9)).toString();break;case 2:f=Math.floor(r(10,90)).toString();break;case 3:f=Math.floor(r(100,900)).toString();break;case 4:f=Math.floor(r(1e3,9e3)).toString();break;case 5:f=Math.floor(r(1e4,9e4)).toString();break;case 6:f=Math.floor(r(1e5,9e5)).toString();break;default:f="";break}return f};function o(d,f){return d.replace(/@.+/,"").replace(/[&/\\#,+()$~%._@'":*?<>{}]/g,"")+i(f)}e.generateFromEmail=o;function s(d,f,h){const p=t.nouns[Math.floor(Math.random()*t.nouns.length)],g=t.adjectives[Math.floor(Math.random()*t.adjectives.length)];let v;return d?v=g+d+p+i(f):v=g+p+i(f),h?v.substring(0,h):v}e.generateUsername=s;function l(d){if(d.dictionaries){const f=d.dictionaries.length;let h="";for(let g=0;g{const l=s??await hz({accept:die,strict:!0});l&&(O7e(l)?await o(async()=>{const c=P7e(l)?await STe(new Uint8Array(await l.arrayBuffer())):await l.text(),d=await RJ(c);d&&(n(()=>d.layers),i(()=>d.UIState))},`Opening workspace (${yz(l.size)})`):e(`${l==null?void 0:l.name} is not a workspace file`))},save:async s=>{e("Saving workspace...");const l=JSON.stringify({layers:t,UIState:r});if(s){const c=`${f5.generateUsername("-")}.workspace.json`;oq(l,c,"application/json"),e("Workspace saved",c)}else{const c=`${f5.generateUsername("-")}.workspace`;oq(await _Te(l),c,"application/octet-stream"),e("Workspace saved",c)}}}}function P7e(e){return e.name.endsWith(".workspace")}function O7e(e){return ee.find(die,t=>e.name.endsWith(t))}function M7e(e){return e.split(".")[0]}function bm(e){return e.split("/").pop()}function D7e(){const e=ba(),{controls:t,onChange:n,state:r}=Du(),{load:i}=Zj(),o=Jd(),{result:s,loading:l}=lv(async()=>{const d=Object.assign({"/public/recipes/astar-jps-small-maze.workspace":()=>qs(()=>import("./astar-jps-small-maze-9a90ce2a.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/aurora-polyanya.workspace":()=>qs(()=>import("./aurora-polyanya-ceb55900.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/dynamic-starcraft.workspace":()=>qs(()=>import("./dynamic-starcraft-4ceed441.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/frozen-sea-astar.workspace":()=>qs(()=>import("./frozen-sea-astar-d8dfa04c.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/jps-vs-jps-prune2.workspace":()=>qs(()=>import("./jps-vs-jps-prune2-defbda61.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/lacam-random-32-32-20.workspace":()=>qs(()=>import("./lacam-random-32-32-20-2163bf6f.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/mapf-large.workspace":()=>qs(()=>import("./mapf-large-867abdea.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/mapf-sortation.workspace":()=>qs(()=>import("./mapf-sortation-4ea4dd13.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/melbourne-routing.workspace":()=>qs(()=>import("./melbourne-routing-b5c14300.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/new-york-astar.workspace":()=>qs(()=>import("./new-york-astar-03f71297.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/nine-tile.workspace":()=>qs(()=>import("./nine-tile-6376158b.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/rayscan-arena2.workspace":()=>qs(()=>import("./rayscan-arena2-f6f7b81d.js"),[],import.meta.url).then(f=>f.default)});return await Promise.all(ee.entries(d).map(f=>L7e(...f)))},[]),c=d=>o(async()=>{try{e(`Loading ${bm(d)}...`);const f=await fetch(d);f.ok||e(`Couldn't load ${bm(d)}`,"Network error",{error:!0});const h=await f.blob(),p=new File([h],bm(d),{type:h.type});i(p)}catch(f){e(`Couldn't load ${bm(d)}`,`${f}`,{error:!0})}});return C.jsxs(Sn,{onChange:n,stack:r,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{vertical:!0,children:C.jsx(rv,{y:!0,children:C.jsx(dt,{sx:{pt:6},children:l?C.jsx(q1,{sx:{m:2}}):C.jsx(yp,{children:ee.map(s,({name:d,path:f},h)=>C.jsxs(PE,{onClick:()=>c(f),children:[C.jsx(Ul,{children:C.jsx(V4,{})}),C.jsx(sl,{primary:d,secondary:bm(f)})]},h))})})})})}),C.jsx(Sn.Extras,{children:t})]})}async function L7e(e,t){return{name:ee.chain(e).thru(bm).thru(M7e).startCase().value(),path:await t()}}const h5={recipes:{id:"recipes",name:"Recipes",icon:C.jsx(V4,{}),content:D7e},viewport:{id:"viewport",name:"Viewport",icon:C.jsx(QK,{}),content:C7e},tree:{id:"tree",name:"Tree",icon:C.jsx(VK,{}),content:g2e},steps:{id:"steps",name:"Steps",icon:C.jsx(TS,{}),content:x7e},info:{id:"info",name:"Logs",icon:C.jsx(YK,{}),content:AFe},layers:{id:"layers",name:"Layers",icon:C.jsx(tv,{}),content:jFe},debug:{id:"debug",name:"Debugger",icon:C.jsx(vxe,{}),content:kFe},settings:{id:"settings",name:"Settings",icon:C.jsx(Lxe,{}),content:zGe},about:{id:"about",name:"About",icon:C.jsx(kxe,{}),content:T_e}},[N7e,B7e]=nc({view:{type:"branch",key:Do(),orientation:"horizontal",children:[{size:75,type:"branch",key:Do(),orientation:"horizontal",children:[{type:"leaf",size:25,key:Do(),content:{type:"layers"}},{size:75,type:"branch",key:Do(),orientation:"vertical",children:[{type:"leaf",size:75,key:Do(),content:{type:"viewport"}},{type:"leaf",size:25,key:Do(),content:{type:"info"}}]}]},{size:25,type:"leaf",key:Do(),content:{type:"steps"}}]}});function $7e(){const[e]=OJ(),t=dz(),n=ee.values(e);return C.jsx(nk,{sx:{...t,zIndex:r=>r.zIndex.tooltip+1,WebkitAppRegion:"drag"},open:!!n.length,children:C.jsxs(Nd,{alignItems:"center",spacing:4,children:[C.jsx(q1,{}),n.map((r,i)=>C.jsx(zt,{variant:"body2",color:"textSecondary",children:r},i))]})})}var fie={},F7e=Nt&&Nt.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),hie=Nt&&Nt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fie,"__esModule",{value:!0});var Xs=hie(Vg),t$=hie(I),z7e=function(e){F7e(t,e);function t(n){var r=e.call(this,n)||this;return r.resetDragging=function(){r.frameDragCounter=0,r.setState({draggingOverFrame:!1,draggingOverTarget:!1})},r.handleWindowDragOverOrDrop=function(i){i.preventDefault()},r.handleFrameDrag=function(i){if(t.eventHasFiles(i)){if(r.frameDragCounter+=i.type==="dragenter"?1:-1,r.frameDragCounter===1){r.setState({draggingOverFrame:!0}),r.props.onFrameDragEnter&&r.props.onFrameDragEnter(i);return}if(r.frameDragCounter===0){r.setState({draggingOverFrame:!1}),r.props.onFrameDragLeave&&r.props.onFrameDragLeave(i);return}}},r.handleFrameDrop=function(i){r.state.draggingOverTarget||(r.resetDragging(),r.props.onFrameDrop&&r.props.onFrameDrop(i))},r.handleDragOver=function(i){t.eventHasFiles(i)&&(r.setState({draggingOverTarget:!0}),!t.isIE()&&r.props.dropEffect&&(i.dataTransfer.dropEffect=r.props.dropEffect),r.props.onDragOver&&r.props.onDragOver(i))},r.handleDragLeave=function(i){r.setState({draggingOverTarget:!1}),r.props.onDragLeave&&r.props.onDragLeave(i)},r.handleDrop=function(i){if(r.props.onDrop&&t.eventHasFiles(i)){var o=i.dataTransfer?i.dataTransfer.files:null;r.props.onDrop(o,i)}r.resetDragging()},r.handleTargetClick=function(i){r.props.onTargetClick&&r.props.onTargetClick(i),r.resetDragging()},r.stopFrameListeners=function(i){i&&(i.removeEventListener("dragenter",r.handleFrameDrag),i.removeEventListener("dragleave",r.handleFrameDrag),i.removeEventListener("drop",r.handleFrameDrop))},r.startFrameListeners=function(i){i&&(i.addEventListener("dragenter",r.handleFrameDrag),i.addEventListener("dragleave",r.handleFrameDrag),i.addEventListener("drop",r.handleFrameDrop))},r.frameDragCounter=0,r.state={draggingOverFrame:!1,draggingOverTarget:!1},r}return t.prototype.componentDidMount=function(){this.startFrameListeners(this.props.frame),this.resetDragging(),window.addEventListener("dragover",this.handleWindowDragOverOrDrop),window.addEventListener("drop",this.handleWindowDragOverOrDrop)},t.prototype.componentDidUpdate=function(n){n.frame!==this.props.frame&&(this.resetDragging(),this.stopFrameListeners(n.frame),this.startFrameListeners(this.props.frame))},t.prototype.componentWillUnmount=function(){this.stopFrameListeners(this.props.frame),window.removeEventListener("dragover",this.handleWindowDragOverOrDrop),window.removeEventListener("drop",this.handleWindowDragOverOrDrop)},t.prototype.render=function(){var n=this.props,r=n.children,i=n.className,o=n.targetClassName,s=n.draggingOverFrameClassName,l=n.draggingOverTargetClassName,c=this.state,d=c.draggingOverTarget,f=c.draggingOverFrame,h=o;return f&&(h+=" "+s),d&&(h+=" "+l),t$.default.createElement("div",{className:i,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},t$.default.createElement("div",{className:h,onClick:this.handleTargetClick},r))},t.isIE=function(){return typeof window<"u"&&(window.navigator.userAgent.indexOf("MSIE")!==-1||window.navigator.appVersion.indexOf("Trident/")>0)},t.eventHasFiles=function(n){var r=!1;if(n.dataTransfer){var i=n.dataTransfer.types;for(var o in i)if(i[o]==="Files"){r=!0;break}}return r},t.propTypes={className:Xs.default.string,targetClassName:Xs.default.string,draggingOverFrameClassName:Xs.default.string,draggingOverTargetClassName:Xs.default.string,onDragOver:Xs.default.func,onDragLeave:Xs.default.func,onDrop:Xs.default.func,onTargetClick:Xs.default.func,dropEffect:Xs.default.oneOf(["copy","move","link","none"]),frame:function(n,r,i){var o=n[r];if(o==null)return new Error("Warning: Required prop `"+r+"` was not specified in `"+i+"`");if(o!==document&&!(o instanceof HTMLElement))return new Error("Warning: Prop `"+r+"` must be one of the following: document, HTMLElement!")},onFrameDragEnter:Xs.default.func,onFrameDragLeave:Xs.default.func,onFrameDrop:Xs.default.func},t.defaultProps={dropEffect:"copy",frame:typeof window>"u"?void 0:window.document,className:"file-drop",targetClassName:"file-drop-target",draggingOverFrameClassName:"file-drop-dragging-over-frame",draggingOverTargetClassName:"file-drop-dragging-over-target"},t}(t$.default.PureComponent),j7e=fie.FileDrop=z7e;function U7e(){const e=dz(),{load:t}=Zj(),[n,r]=I.useState(!1);return C.jsx(C.Fragment,{children:C.jsx(j7e,{onFrameDragLeave:()=>r(!1),onFrameDragEnter:()=>r(!0),onFrameDrop:()=>r(!1),onDragLeave:()=>r(!1),onDrop:i=>(i==null?void 0:i.length)&&t(ee.head(i)),children:C.jsx(nk,{sx:{...e,zIndex:i=>i.zIndex.tooltip+1},open:n,children:C.jsxs(Nd,{alignItems:"center",spacing:4,children:[C.jsx(V4,{}),C.jsx(zt,{variant:"body2",color:"textSecondary",children:"Open workspace"})]})})})})}function H7e(e){const t=eEe(),[{view:n},r]=N7e();return C.jsxs(C.Fragment,{children:[C.jsx(bn,{...e,children:C.jsx(HQ,{root:n,onChange:i=>r(()=>({view:i})),renderLeaf:({content:i})=>{var o;return C.jsx(vp,{in:!0,children:C.jsx(dt,{sx:{width:"100%",height:"100%"},children:I.createElement((o=h5[(i==null?void 0:i.type)??""])==null?void 0:o.content)})})}})}),C.jsx(vp,{in:t,children:C.jsx(bve,{variant:"indeterminate",sx:{position:"absolute",bottom:0,width:"100%",zIndex:1}})}),C.jsx($7e,{}),C.jsx(U7e,{})]})}const W7e=e=>l$(e,"#ffffff")>l$(e,"#000000")?"#ffffff":"#000000";function G7e(e){I.useEffect(()=>{ee.defer(()=>document.querySelector('meta[name="theme-color"]').setAttribute("content",e)),document.title=EF,"electron"in window&&window.electron.invoke("title-bar","#00000000",W7e(e))},[e])}function V7e(e){return new Promise(t=>ee.delay(t,e))}async function q7e(e,t=2500){const n=ee.now();return{result:await Promise.any([e(),V7e(t)]),delta:ee.now()-n}}function X7e(){const e=ba(),[{remote:t}]=Lu(),[,n]=Ig(),r=Jd("connections");return I.useEffect(()=>{let i=!1,o=[];return r(async()=>{if(t!=null&&t.length){for(const{transport:s,url:l,disabled:c}of t){if(c!==!0){e(`Connecting to ${l}...`);const d=new(DGe(s))({url:l});await d.connect();const{result:f,delta:h}=await q7e(()=>d.call("about"));f?(e(`Connected to ${f.name}`),o=[...o,{...f,url:l,ping:h,call:d.call.bind(d),disconnect:d.disconnect.bind(d)}]):await d.disconnect()}i||n(()=>o)}i||e(`Connected to ${o.length} of ${t.length} solvers`)}}),()=>{i=!0,o.map(s=>s.disconnect())}},[t,n,e,r]),C.jsx(C.Fragment,{})}const Y7e=e=>t=>({...t,source:e});function K7e(){const[e]=Ig(),[,t]=WE(),n=Jd("features");return _Z(r=>n(async()=>{const i={algorithms:[],formats:ee.keys(bz).map(o=>({id:o,source:"internal"})),maps:[]};for(const{call:o,url:s}of e)for(const l of["algorithms","formats","maps"])i[l]=ee.uniqBy([...i[l],...ee.map(await o(`features/${l}`),Y7e(s))],"id");r.aborted||t(()=>i)}),[e,t]),C.jsx(C.Fragment,{})}function Q7e(){const[{layers:e},t]=Bp();return I.useMemo(()=>ee.map(e,n=>{const r=GZ(n).service;if(r)return I.createElement(r,{key:n.key,value:n,onChange:i=>t(({layers:o})=>({layers:ee.map(o,s=>s.key===n.key?i(s):s)}))})}),[e,t])}function J7e(){const e=Q7e();return C.jsx(C.Fragment,{children:e})}function pie({slices:e,children:t,services:n}){return C.jsx(C.Fragment,{children:ee.reduce(ee.map(e,r=>I.createElement(r)),(r,i)=>I.cloneElement(i,{},r),C.jsxs(C.Fragment,{children:[t,ee.map(n,(r,i)=>I.createElement(r,{key:i}))]}))})}const Z7e=()=>{const{save:e,load:t}=Zj(),[n,r]=I.useState(!1);return I.useEffect(()=>{if("windowControlsOverlay"in navigator){const i=()=>{r(!!navigator.windowControlsOverlay.visible)};return navigator.windowControlsOverlay.addEventListener("geometrychange",i),i(),()=>navigator.windowControlsOverlay.removeEventListener("geometrychange",i)}},[r]),C.jsx(dt,{sx:{mt:-.5,minHeight:36,height:n?"env(titlebar-area-height, 50px)":0,width:"env(titlebar-area-width, 100%)",WebkitAppRegion:"drag",overflowX:"auto"},children:C.jsx(rv,{x:!0,style:{height:"100%"},children:C.jsx(dt,{sx:{height:"100%"},children:C.jsxs(Nd,{direction:"row",spacing:1,sx:{height:"100%"},alignItems:"center",children:[C.jsx(dt,{sx:{p:1,height:"100%"},children:C.jsx("img",{src:VQ,style:{height:"100%"}})}),[{key:"workspace",items:[{name:"Open workspace",key:"workspace-load",action:t},{name:"Save workspace",key:"workspace-save",action:e},{name:"Save workspace (JSON)",key:"workspace-save",action:()=>e(!0)}]},{key:"help",items:[{name:"Open repository in GitHub",key:"github",action:()=>open(S_e,"_blank")},{name:"Open changelog",key:"changelog",action:()=>open(`${E_e}/changelog-${w_e}.md`,"_blank")}]}].map(({key:i,items:o})=>C.jsx(Op,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(Pp,{...sw(s),children:C.jsx(ik,{dense:!0,sx:{p:0},children:o.map(({name:l,key:c,action:d})=>C.jsx(gu,{onClick:()=>{d==null||d(),s.close()},children:l},c))})}),C.jsx($d,{...mk(s),sx:{WebkitAppRegion:"no-drag",minWidth:"fit-content",p:.5,px:1},children:ee.startCase(i)})]})},i)),C.jsx(dt,{sx:{p:.75,height:"100%"},children:C.jsx(eVe,{})})]})})})})};function eVe(){const e=ba();return C.jsxs(Ou,{onClick:()=>e("Commands are not yet implemented"),sx:{WebkitAppRegion:"no-drag",fontSize:14,borderRadius:t=>t.shape.borderRadius,"&:hover":{bgcolor:"background.paper"},height:"100%",m:0,display:"flex",alignItems:"center",px:1,pr:2,gap:t=>t.spacing(1),color:"text.secondary",cursor:"text"},children:[C.jsx(Dxe,{fontSize:"small",color:"disabled"})," ",C.jsx(zt,{sx:{mt:0},children:"Commands"})]})}const tVe=[X7e,K7e,SWe,J7e];function nVe(){const t=In().palette.background.default;return G7e(t),C.jsxs(bn,{vertical:!0,sx:{bgcolor:t,p:.5,color:"text.primary"},children:[C.jsx(Z7e,{}),C.jsx(H7e,{flex:1})]})}function rVe(){const[{theme:e="light",accentColor:t="teal"}]=Lu(),n=I.useMemo(()=>b_e(e,t),[e,t]);return C.jsx(Vle,{theme:n,children:C.jsx(g1e,{children:C.jsx(pie,{services:tVe,children:C.jsx(nVe,{})})})})}var mie,sq=Jg;mie=sq.createRoot,sq.hydrateRoot;const iVe=mie(document.getElementById("root")),oVe=[kTe,g_e,QSe,JSe,qSe,ZSe,x2e,m1e,B7e,YPe];iVe.render(C.jsx(Ume,{children:C.jsx(pie,{slices:oVe,children:C.jsx(rVe,{})})})); diff --git a/index.html b/index.html index fcf15515..424c20c0 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - + diff --git a/manifest.json b/manifest.json index 728c06b0..8c284d27 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,9 @@ { "short_name": "Visualiser", "name": "Visualiser", - "version": "1.1.0", + "version": "1.1.1", "description": "Visualise pathfinding search and more", - "version_name": "1.1.0; mid November 2023", + "version_name": "1.1.1; early December 2023", "repository": "https://github.com/path-visualiser/app", "docs": "https://github.com/path-visualiser/app/blob/master/docs", "icons": [