@ledgerhq/device-management-kit-devtools-rozenite 0.0.0-develop-20260909001452 → 0.0.0-develop-20260912001326

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  function k5(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var P5=e=>e.disabled||Array.isArray(e.accessibilityStates)&&e.accessibilityStates.indexOf("disabled")>-1,M5={adjustable:"slider",button:"button",header:"heading",image:"img",imagebutton:null,keyboardkey:null,label:null,link:"link",none:"presentation",search:"search",summary:"region",text:null},y$=e=>{var t=e.accessibilityRole,r=e.role,n=r||t;if(n){var i=M5[n];if(i!==null)return i||n}},D5={article:"article",banner:"header",blockquote:"blockquote",button:"button",code:"code",complementary:"aside",contentinfo:"footer",deletion:"del",emphasis:"em",figure:"figure",insertion:"ins",form:"form",list:"ul",listitem:"li",main:"main",navigation:"nav",paragraph:"p",region:"section",strong:"strong"},L5={},F5=function(t){t===void 0&&(t=L5);var r=t.role||t.accessibilityRole;if(r==="label")return"label";var n=y$(t);if(n){if(n==="heading"){var i=t.accessibilityLevel||t["aria-level"];return i!=null?"h"+i:"h1"}return D5[n]}},b$={isDisabled:P5,propsToAccessibilityComponent:F5,propsToAriaRole:y$};function ut(e){"@babel/helpers - typeof";return ut=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},ut(e)}function N5(e,t){if(ut(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ut(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S$(e){var t=N5(e,"string");return ut(t)=="symbol"?t:t+""}function oe(e,t,r){return(t=S$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jw(Object(r),!0).forEach(function(n){oe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cc(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Pd={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexOrder:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,gridRow:!0,gridRowEnd:!0,gridRowGap:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridColumnStart:!0,lineClamp:!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,scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,shadowOpacity:!0},j5=["ms","Moz","O","Webkit"],z5=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1);Object.keys(Pd).forEach(e=>{j5.forEach(t=>{Pd[z5(t,e)]=Pd[e]})});var B5=e=>e==="currentcolor"||e==="currentColor"||e==="inherit"||e.indexOf("var(")===0;function Nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function w$(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var Tg,zw;function V5(){if(zw)return Tg;zw=1;function e(S){if(typeof S=="number")return S>>>0===S&&S>=0&&S<=4294967295?S:null;if(typeof S!="string")return null;const _=p();let C;if(C=_.hex6.exec(S))return parseInt(C[1]+"ff",16)>>>0;const O=b(S);return O??((C=_.rgb.exec(S))?(g(C[1])<<24|g(C[2])<<16|g(C[3])<<8|255)>>>0:(C=_.rgba.exec(S))?C[6]!==void 0?(g(C[6])<<24|g(C[7])<<16|g(C[8])<<8|m(C[9]))>>>0:(g(C[2])<<24|g(C[3])<<16|g(C[4])<<8|m(C[5]))>>>0:(C=_.hex3.exec(S))?parseInt(C[1]+C[1]+C[2]+C[2]+C[3]+C[3]+"ff",16)>>>0:(C=_.hex8.exec(S))?parseInt(C[1],16)>>>0:(C=_.hex4.exec(S))?parseInt(C[1]+C[1]+C[2]+C[2]+C[3]+C[3]+C[4]+C[4],16)>>>0:(C=_.hsl.exec(S))?(r(h(C[1]),y(C[2]),y(C[3]))|255)>>>0:(C=_.hsla.exec(S))?C[6]!==void 0?(r(h(C[6]),y(C[7]),y(C[8]))|m(C[9]))>>>0:(r(h(C[2]),y(C[3]),y(C[4]))|m(C[5]))>>>0:(C=_.hwb.exec(S))?(n(h(C[1]),y(C[2]),y(C[3]))|255)>>>0:null)}function t(S,_,C){return C<0&&(C+=1),C>1&&(C-=1),C<1/6?S+(_-S)*6*C:C<1/2?_:C<2/3?S+(_-S)*(2/3-C)*6:S}function r(S,_,C){const O=C<.5?C*(1+_):C+_-C*_,R=2*C-O,$=t(R,O,S+1/3),T=t(R,O,S),P=t(R,O,S-1/3);return Math.round($*255)<<24|Math.round(T*255)<<16|Math.round(P*255)<<8}function n(S,_,C){if(_+C>=1){const T=Math.round(_*255/(_+C));return T<<24|T<<16|T<<8}const O=t(0,1,S+1/3)*(1-_-C)+_,R=t(0,1,S)*(1-_-C)+_,$=t(0,1,S-1/3)*(1-_-C)+_;return Math.round(O*255)<<24|Math.round(R*255)<<16|Math.round($*255)<<8}const i="[-+]?\\d*\\.?\\d+",o=i+"%";function s(...S){return"\\(\\s*("+S.join(")\\s*,?\\s*(")+")\\s*\\)"}function u(...S){return"\\(\\s*("+S.slice(0,S.length-1).join(")\\s*,?\\s*(")+")\\s*/\\s*("+S[S.length-1]+")\\s*\\)"}function c(...S){return"\\(\\s*("+S.join(")\\s*,\\s*(")+")\\s*\\)"}let f;function p(){return f===void 0&&(f={rgb:new RegExp("rgb"+s(i,i,i)),rgba:new RegExp("rgba("+c(i,i,i,i)+"|"+u(i,i,i,i)+")"),hsl:new RegExp("hsl"+s(i,o,o)),hsla:new RegExp("hsla("+c(i,o,o,i)+"|"+u(i,o,o,i)+")"),hwb:new RegExp("hwb"+s(i,o,o)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/}),f}function g(S){const _=parseInt(S,10);return _<0?0:_>255?255:_}function h(S){return(parseFloat(S)%360+360)%360/360}function m(S){const _=parseFloat(S);return _<0?0:_>1?255:Math.round(_*255)}function y(S){const _=parseFloat(S);return _<0?0:_>100?1:_/100}function b(S){switch(S){case"transparent":return 0;case"aliceblue":return 4042850303;case"antiquewhite":return 4209760255;case"aqua":return 16777215;case"aquamarine":return 2147472639;case"azure":return 4043309055;case"beige":return 4126530815;case"bisque":return 4293182719;case"black":return 255;case"blanchedalmond":return 4293643775;case"blue":return 65535;case"blueviolet":return 2318131967;case"brown":return 2771004159;case"burlywood":return 3736635391;case"burntsienna":return 3934150143;case"cadetblue":return 1604231423;case"chartreuse":return 2147418367;case"chocolate":return 3530104575;case"coral":return 4286533887;case"cornflowerblue":return 1687547391;case"cornsilk":return 4294499583;case"crimson":return 3692313855;case"cyan":return 16777215;case"darkblue":return 35839;case"darkcyan":return 9145343;case"darkgoldenrod":return 3095792639;case"darkgray":return 2846468607;case"darkgreen":return 6553855;case"darkgrey":return 2846468607;case"darkkhaki":return 3182914559;case"darkmagenta":return 2332068863;case"darkolivegreen":return 1433087999;case"darkorange":return 4287365375;case"darkorchid":return 2570243327;case"darkred":return 2332033279;case"darksalmon":return 3918953215;case"darkseagreen":return 2411499519;case"darkslateblue":return 1211993087;case"darkslategray":return 793726975;case"darkslategrey":return 793726975;case"darkturquoise":return 13554175;case"darkviolet":return 2483082239;case"deeppink":return 4279538687;case"deepskyblue":return 12582911;case"dimgray":return 1768516095;case"dimgrey":return 1768516095;case"dodgerblue":return 512819199;case"firebrick":return 2988581631;case"floralwhite":return 4294635775;case"forestgreen":return 579543807;case"fuchsia":return 4278255615;case"gainsboro":return 3705462015;case"ghostwhite":return 4177068031;case"gold":return 4292280575;case"goldenrod":return 3668254975;case"gray":return 2155905279;case"green":return 8388863;case"greenyellow":return 2919182335;case"grey":return 2155905279;case"honeydew":return 4043305215;case"hotpink":return 4285117695;case"indianred":return 3445382399;case"indigo":return 1258324735;case"ivory":return 4294963455;case"khaki":return 4041641215;case"lavender":return 3873897215;case"lavenderblush":return 4293981695;case"lawngreen":return 2096890111;case"lemonchiffon":return 4294626815;case"lightblue":return 2916673279;case"lightcoral":return 4034953471;case"lightcyan":return 3774873599;case"lightgoldenrodyellow":return 4210742015;case"lightgray":return 3553874943;case"lightgreen":return 2431553791;case"lightgrey":return 3553874943;case"lightpink":return 4290167295;case"lightsalmon":return 4288707327;case"lightseagreen":return 548580095;case"lightskyblue":return 2278488831;case"lightslategray":return 2005441023;case"lightslategrey":return 2005441023;case"lightsteelblue":return 2965692159;case"lightyellow":return 4294959359;case"lime":return 16711935;case"limegreen":return 852308735;case"linen":return 4210091775;case"magenta":return 4278255615;case"maroon":return 2147483903;case"mediumaquamarine":return 1724754687;case"mediumblue":return 52735;case"mediumorchid":return 3126187007;case"mediumpurple":return 2473647103;case"mediumseagreen":return 1018393087;case"mediumslateblue":return 2070474495;case"mediumspringgreen":return 16423679;case"mediumturquoise":return 1221709055;case"mediumvioletred":return 3340076543;case"midnightblue":return 421097727;case"mintcream":return 4127193855;case"mistyrose":return 4293190143;case"moccasin":return 4293178879;case"navajowhite":return 4292783615;case"navy":return 33023;case"oldlace":return 4260751103;case"olive":return 2155872511;case"olivedrab":return 1804477439;case"orange":return 4289003775;case"orangered":return 4282712319;case"orchid":return 3664828159;case"palegoldenrod":return 4008225535;case"palegreen":return 2566625535;case"paleturquoise":return 2951671551;case"palevioletred":return 3681588223;case"papayawhip":return 4293907967;case"peachpuff":return 4292524543;case"peru":return 3448061951;case"pink":return 4290825215;case"plum":return 3718307327;case"powderblue":return 2967529215;case"purple":return 2147516671;case"rebeccapurple":return 1714657791;case"red":return 4278190335;case"rosybrown":return 3163525119;case"royalblue":return 1097458175;case"saddlebrown":return 2336560127;case"salmon":return 4202722047;case"sandybrown":return 4104413439;case"seagreen":return 780883967;case"seashell":return 4294307583;case"sienna":return 2689740287;case"silver":return 3233857791;case"skyblue":return 2278484991;case"slateblue":return 1784335871;case"slategray":return 1887473919;case"slategrey":return 1887473919;case"snow":return 4294638335;case"springgreen":return 16744447;case"steelblue":return 1182971135;case"tan":return 3535047935;case"teal":return 8421631;case"thistle":return 3636451583;case"tomato":return 4284696575;case"turquoise":return 1088475391;case"violet":return 4001558271;case"wheat":return 4125012991;case"white":return 4294967295;case"whitesmoke":return 4126537215;case"yellow":return 4294902015;case"yellowgreen":return 2597139199}return null}return Tg=e,Tg}var H5=V5();const U5=Nr(H5);var W5=e=>{if(e==null)return e;var t=U5(e);if(t!=null)return t=(t<<24|t>>>8)>>>0,t},i1=function(t,r){if(r===void 0&&(r=1),t!=null){if(typeof t=="string"&&B5(t))return t;var n=W5(t);if(n!=null){var i=n>>16&255,o=n>>8&255,s=n&255,u=(n>>24&255)/255,c=(u*r).toFixed(2);return"rgba("+i+","+o+","+s+","+c+")"}}},G5={backgroundColor:!0,borderColor:!0,borderTopColor:!0,borderRightColor:!0,borderBottomColor:!0,borderLeftColor:!0,color:!0,shadowColor:!0,textDecorationColor:!0,textShadowColor:!0};function un(e,t){var r=e;return(t==null||!Pd[t])&&typeof e=="number"?r=e+"px":t!=null&&G5[t]&&(r=i1(e)),r}var ws=!!(typeof window<"u"&&window.document&&window.document.createElement),q5={},X5=!ws||window.CSS!=null&&window.CSS.supports!=null&&(window.CSS.supports("text-decoration-line","none")||window.CSS.supports("-webkit-text-decoration-line","none")),K5="monospace,monospace",Bw='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif',Y5={borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderBlockColor:["borderTopColor","borderBottomColor"],borderInlineColor:["borderRightColor","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderStyle:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],borderBlockStyle:["borderTopStyle","borderBottomStyle"],borderInlineStyle:["borderRightStyle","borderLeftStyle"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],borderBlockWidth:["borderTopWidth","borderBottomWidth"],borderInlineWidth:["borderRightWidth","borderLeftWidth"],insetBlock:["top","bottom"],insetInline:["left","right"],marginBlock:["marginTop","marginBottom"],marginInline:["marginRight","marginLeft"],paddingBlock:["paddingTop","paddingBottom"],paddingInline:["paddingRight","paddingLeft"],overflow:["overflowX","overflowY"],overscrollBehavior:["overscrollBehaviorX","overscrollBehaviorY"],borderBlockStartColor:["borderTopColor"],borderBlockStartStyle:["borderTopStyle"],borderBlockStartWidth:["borderTopWidth"],borderBlockEndColor:["borderBottomColor"],borderBlockEndStyle:["borderBottomStyle"],borderBlockEndWidth:["borderBottomWidth"],borderEndStartRadius:["borderBottomLeftRadius"],borderEndEndRadius:["borderBottomRightRadius"],borderStartStartRadius:["borderTopLeftRadius"],borderStartEndRadius:["borderTopRightRadius"],insetBlockEnd:["bottom"],insetBlockStart:["top"],marginBlockStart:["marginTop"],marginBlockEnd:["marginBottom"],paddingBlockStart:["paddingTop"],paddingBlockEnd:["paddingBottom"]},x$=(e,t)=>{if(!e)return q5;var r={},n=function(){var u=e[i];if(u==null)return"continue";if(i==="backgroundClip")u==="text"&&(r.backgroundClip=u,r.WebkitBackgroundClip=u);else if(i==="flex")u===-1?(r.flexGrow=0,r.flexShrink=1,r.flexBasis="auto"):r.flex=u;else if(i==="font")r[i]=u.replace("System",Bw);else if(i==="fontFamily")if(u.indexOf("System")>-1){var c=u.split(/,\s*/);c[c.indexOf("System")]=Bw,r[i]=c.join(",")}else u==="monospace"?r[i]=K5:r[i]=u;else if(i==="textDecorationLine")X5?r.textDecorationLine=u:r.textDecoration=u;else if(i==="writingDirection")r.direction=u;else{var f=un(e[i],i),p=Y5[i];t&&i==="inset"?(e.insetInline==null&&(r.left=f,r.right=f),e.insetBlock==null&&(r.top=f,r.bottom=f)):t&&i==="margin"?(e.marginInline==null&&(r.marginLeft=f,r.marginRight=f),e.marginBlock==null&&(r.marginTop=f,r.marginBottom=f)):t&&i==="padding"?(e.paddingInline==null&&(r.paddingLeft=f,r.paddingRight=f),e.paddingBlock==null&&(r.paddingTop=f,r.paddingBottom=f)):p?p.forEach((g,h)=>{e[g]==null&&(r[g]=f)}):r[i]=f}};for(var i in e)var o=n();return r};function Q5(e,t){for(var r=e.length,n=t^r,i=0,o;r>=4;)o=e.charCodeAt(i)&255|(e.charCodeAt(++i)&255)<<8|(e.charCodeAt(++i)&255)<<16|(e.charCodeAt(++i)&255)<<24,o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16),o^=o>>>24,o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16),n=(n&65535)*1540483477+(((n>>>16)*1540483477&65535)<<16)^o,r-=4,++i;switch(r){case 3:n^=(e.charCodeAt(i+2)&255)<<16;case 2:n^=(e.charCodeAt(i+1)&255)<<8;case 1:n^=e.charCodeAt(i)&255,n=(n&65535)*1540483477+(((n>>>16)*1540483477&65535)<<16)}return n^=n>>>13,n=(n&65535)*1540483477+(((n>>>16)*1540483477&65535)<<16),n^=n>>>15,n>>>0}var J5=e=>Q5(e,1).toString(36),Z5=/[A-Z]/g,eP=/^ms-/,Ig={};function tP(e){return"-"+e.toLowerCase()}function rP(e){if(e in Ig)return Ig[e];var t=e.replace(Z5,tP);return Ig[e]=eP.test(t)?"-"+t:t}var zf={},Bf={},Vf={},Vw;function E$(){if(Vw)return Vf;Vw=1,Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.default=e;function e(t){return t.charAt(0).toUpperCase()+t.slice(1)}return Vf}var Hw;function nP(){if(Hw)return Bf;Hw=1,Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.default=n;var e=E$(),t=r(e);function r(i){return i&&i.__esModule?i:{default:i}}function n(i,o,s){var u=i[o];if(u&&s.hasOwnProperty(o))for(var c=(0,t.default)(o),f=0;f<u.length;++f){var p=u[f]+c;s[p]||(s[p]=s[o])}return s}return Bf}var Hf={},Uw;function iP(){if(Uw)return Hf;Uw=1,Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.default=e;function e(t,r,n,i,o){for(var s=0,u=t.length;s<u;++s){var c=t[s](r,n,i,o);if(c)return c}}return Hf}var Uf={},Ww;function oP(){if(Ww)return Uf;Ww=1,Object.defineProperty(Uf,"__esModule",{value:!0}),Uf.default=t;function e(r,n){r.indexOf(n)===-1&&r.push(n)}function t(r,n){if(Array.isArray(n))for(var i=0,o=n.length;i<o;++i)e(r,n[i]);else e(r,n)}return Uf}var Wf={},Gw;function aP(){if(Gw)return Wf;Gw=1,Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.default=e;function e(t){return t instanceof Object&&!Array.isArray(t)}return Wf}var qw;function sP(){if(qw)return zf;qw=1,Object.defineProperty(zf,"__esModule",{value:!0}),zf.default=f;var e=nP(),t=c(e),r=iP(),n=c(r),i=oP(),o=c(i),s=aP(),u=c(s);function c(p){return p&&p.__esModule?p:{default:p}}function f(p){var g=p.prefixMap,h=p.plugins;return function m(y){for(var b in y){var S=y[b];if((0,u.default)(S))y[b]=m(S);else if(Array.isArray(S)){for(var _=[],C=0,O=S.length;C<O;++C){var R=(0,n.default)(h,b,S[C],y,g);(0,o.default)(_,R||S[C])}_.length>0&&(y[b]=_)}else{var $=(0,n.default)(h,b,S,y,g);$&&(y[b]=$),y=(0,t.default)(g,b,y)}}return y}}return zf}var lP=sP();const uP=Nr(lP);var Gf={};function Md(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Md=function(r){return typeof r}:Md=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Md(e)}function cP(e){return hP(e)||pP(e)||dP(e)||fP()}function fP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dP(e,t){if(e){if(typeof e=="string")return d0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d0(e,t)}}function pP(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function hP(e){if(Array.isArray(e))return d0(e)}function d0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xw(e){return e.filter(function(t,r){return e.lastIndexOf(t)===r})}function C$(e){for(var t=0,r=arguments.length<=1?0:arguments.length-1;t<r;++t){var n=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];for(var i in n){var o=n[i],s=e[i];if(s&&o){if(Array.isArray(s)){e[i]=Xw(s.concat(o));continue}if(Array.isArray(o)){e[i]=Xw([s].concat(cP(o)));continue}if(Md(o)==="object"){e[i]=C$({},s,o);continue}}e[i]=o}}return e}var gP=/-([a-z])/g,vP=/^Ms/g,Ag={};function mP(e){return e[1].toUpperCase()}function _$(e){if(Ag.hasOwnProperty(e))return Ag[e];var t=e.replace(gP,mP).replace(vP,"ms");return Ag[e]=t,t}var yP=/[A-Z]/g,bP=/^ms-/,kg={};function SP(e){return"-"+e.toLowerCase()}function R$(e){if(kg.hasOwnProperty(e))return kg[e];var t=e.replace(yP,SP);return kg[e]=bP.test(t)?"-"+t:t}const wP=Object.freeze(Object.defineProperty({__proto__:null,default:R$},Symbol.toStringTag,{value:"Module"}));function $p(e){return R$(e)}function O$(e,t){return $p(e)+":"+t}function xP(e){var t="";for(var r in e){var n=e[r];typeof n!="string"&&typeof n!="number"||(t&&(t+=";"),t+=O$(r,n))}return t}var EP=/^(Webkit|Moz|O|ms)/;function CP(e){return EP.test(e)}var _P=/-webkit-|-moz-|-ms-/;function RP(e){return typeof e=="string"&&_P.test(e)}var Zu={borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,fontWeight:!0,lineHeight:!0,opacity:!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},Kw=["animationIterationCount","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","order"],Yw=["Webkit","ms","Moz","O"];function OP(e,t){return e+t.charAt(0).toUpperCase()+t.slice(1)}for(var Pg=0,$P=Kw.length;Pg<$P;++Pg){var Qw=Kw[Pg];Zu[Qw]=!0;for(var Mg=0,TP=Yw.length;Mg<TP;++Mg)Zu[OP(Yw[Mg],Qw)]=!0}for(var IP in Zu)Zu[$p(IP)]=!0;function AP(e){return Zu.hasOwnProperty(e)}var kP=/^(ms|Webkit|Moz|O)/;function $$(e){var t=e.replace(kP,"");return t.charAt(0).toLowerCase()+t.slice(1)}function PP(e){return $$(_$(e))}function MP(e,t){return t.join(";"+$p(e)+":")}var DP=/(-ms-|-webkit-|-moz-|-o-)/g;function LP(e){return typeof e=="string"?e.replace(DP,""):e}const FP=Object.freeze(Object.defineProperty({__proto__:null,assignStyle:C$,camelCaseProperty:_$,cssifyDeclaration:O$,cssifyObject:xP,hyphenateProperty:$p,isPrefixedProperty:CP,isPrefixedValue:RP,isUnitlessProperty:AP,normalizeProperty:PP,resolveArrayValue:MP,unprefixProperty:$$,unprefixValue:LP},Symbol.toStringTag,{value:"Module"})),NP=w$(FP);var Jw;function jP(){if(Jw)return Gf;Jw=1,Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.default=n;var e=NP,t=/cross-fade\(/g,r=["-webkit-",""];function n(i,o){if(typeof o=="string"&&!(0,e.isPrefixedValue)(o)&&o.indexOf("cross-fade(")!==-1)return r.map(function(s){return o.replace(t,s+"cross-fade(")})}return Gf}var zP=jP();const BP=Nr(zP);var qf={},Dg={},Zw;function T$(){return Zw||(Zw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var t=/-webkit-|-moz-|-ms-/;function r(n){return typeof n=="string"&&t.test(n)}})(Dg)),Dg}var ex;function VP(){if(ex)return qf;ex=1,Object.defineProperty(qf,"__esModule",{value:!0}),qf.default=i;var e=T$(),t=r(e);function r(o){return o&&o.__esModule?o:{default:o}}var n=["-webkit-",""];function i(o,s){if(typeof s=="string"&&!(0,t.default)(s)&&s.indexOf("image-set(")>-1)return n.map(function(u){return s.replace(/image-set\(/g,u+"image-set(")})}return qf}var HP=VP();const UP=Nr(HP);var Xf={},tx;function WP(){if(tx)return Xf;tx=1,Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.default=t;var e={marginBlockStart:["WebkitMarginBefore"],marginBlockEnd:["WebkitMarginAfter"],marginInlineStart:["WebkitMarginStart","MozMarginStart"],marginInlineEnd:["WebkitMarginEnd","MozMarginEnd"],paddingBlockStart:["WebkitPaddingBefore"],paddingBlockEnd:["WebkitPaddingAfter"],paddingInlineStart:["WebkitPaddingStart","MozPaddingStart"],paddingInlineEnd:["WebkitPaddingEnd","MozPaddingEnd"],borderBlockStart:["WebkitBorderBefore"],borderBlockStartColor:["WebkitBorderBeforeColor"],borderBlockStartStyle:["WebkitBorderBeforeStyle"],borderBlockStartWidth:["WebkitBorderBeforeWidth"],borderBlockEnd:["WebkitBorderAfter"],borderBlockEndColor:["WebkitBorderAfterColor"],borderBlockEndStyle:["WebkitBorderAfterStyle"],borderBlockEndWidth:["WebkitBorderAfterWidth"],borderInlineStart:["WebkitBorderStart","MozBorderStart"],borderInlineStartColor:["WebkitBorderStartColor","MozBorderStartColor"],borderInlineStartStyle:["WebkitBorderStartStyle","MozBorderStartStyle"],borderInlineStartWidth:["WebkitBorderStartWidth","MozBorderStartWidth"],borderInlineEnd:["WebkitBorderEnd","MozBorderEnd"],borderInlineEndColor:["WebkitBorderEndColor","MozBorderEndColor"],borderInlineEndStyle:["WebkitBorderEndStyle","MozBorderEndStyle"],borderInlineEndWidth:["WebkitBorderEndWidth","MozBorderEndWidth"]};function t(r,n,i){if(Object.prototype.hasOwnProperty.call(e,r))for(var o=e[r],s=0,u=o.length;s<u;++s)i[o[s]]=n}return Xf}var GP=WP();const qP=Nr(GP);var Kf={},rx;function XP(){if(rx)return Kf;rx=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.default=e;function e(t,r){if(t==="position"&&r==="sticky")return["-webkit-sticky","sticky"]}return Kf}var KP=XP();const YP=Nr(KP);var Yf={},nx;function QP(){if(nx)return Yf;nx=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.default=n;var e=["-webkit-","-moz-",""],t={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},r={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function n(i,o){if(t.hasOwnProperty(i)&&r.hasOwnProperty(o))return e.map(function(s){return s+o})}return Yf}var JP=QP();const ZP=Nr(JP);var Qf={},Lg={};const eM=w$(wP);var ix;function tM(){return ix||(ix=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var t=eM,r=n(t);function n(o){return o&&o.__esModule?o:{default:o}}function i(o){return(0,r.default)(o)}})(Lg)),Lg}var ox;function rM(){if(ox)return Qf;ox=1,Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.default=p;var e=tM(),t=s(e),r=T$(),n=s(r),i=E$(),o=s(i);function s(g){return g&&g.__esModule?g:{default:g}}var u={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},c={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function f(g,h){if((0,n.default)(g))return g;for(var m=g.split(/,(?![^()]*(?:\([^()]*\))?\))/g),y=0,b=m.length;y<b;++y){var S=m[y],_=[S];for(var C in h){var O=(0,t.default)(C);if(S.indexOf(O)>-1&&O!=="order")for(var R=h[C],$=0,T=R.length;$<T;++$)_.unshift(S.replace(O,c[R[$]]+O))}m[y]=_.join(",")}return m.join(",")}function p(g,h,m,y){if(typeof h=="string"&&u.hasOwnProperty(g)){var b=f(h,y),S=b.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(C){return!/-moz-|-ms-/.test(C)}).join(",");if(g.indexOf("Webkit")>-1)return S;var _=b.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(C){return!/-webkit-|-ms-/.test(C)}).join(",");return g.indexOf("Moz")>-1?_:(m["Webkit"+(0,o.default)(g)]=S,m["Moz"+(0,o.default)(g)]=_,b)}}return Qf}var nM=rM();const iM=Nr(nM);var Ht=["Webkit"],oM=["Moz"],aM=["Webkit","Moz"],or=["Webkit","ms"],sM=["Webkit","Moz","ms"];const lM={plugins:[BP,UP,qP,YP,ZP,iM],prefixMap:{appearance:sM,userSelect:aM,textEmphasisPosition:or,textEmphasis:or,textEmphasisStyle:or,textEmphasisColor:or,boxDecorationBreak:or,clipPath:Ht,maskImage:or,maskMode:or,maskRepeat:or,maskPosition:or,maskClip:or,maskOrigin:or,maskSize:or,maskComposite:or,mask:or,maskBorderSource:or,maskBorderMode:or,maskBorderSlice:or,maskBorderWidth:or,maskBorderOutset:or,maskBorderRepeat:or,maskBorder:or,maskType:or,textDecorationStyle:Ht,textDecorationSkip:Ht,textDecorationLine:Ht,textDecorationColor:Ht,filter:Ht,breakAfter:Ht,breakBefore:Ht,breakInside:Ht,columnCount:Ht,columnFill:Ht,columnGap:Ht,columnRule:Ht,columnRuleColor:Ht,columnRuleStyle:Ht,columnRuleWidth:Ht,columns:Ht,columnSpan:Ht,columnWidth:Ht,backdropFilter:Ht,hyphens:Ht,flowInto:Ht,flowFrom:Ht,regionFragment:Ht,textOrientation:Ht,tabSize:oM,fontKerning:Ht,textSizeAdjust:Ht}};var uM=uP(lM),cM=["animationKeyframes"],ax=new Map,fM={},dM=1,pM=3,hM={borderColor:2,borderRadius:2,borderStyle:2,borderWidth:2,display:2,flex:2,inset:2,margin:2,overflow:2,overscrollBehavior:2,padding:2,insetBlock:2.1,insetInline:2.1,marginInline:2.1,marginBlock:2.1,paddingInline:2.1,paddingBlock:2.1,borderBlockStartColor:2.2,borderBlockStartStyle:2.2,borderBlockStartWidth:2.2,borderBlockEndColor:2.2,borderBlockEndStyle:2.2,borderBlockEndWidth:2.2,borderInlineStartColor:2.2,borderInlineStartStyle:2.2,borderInlineStartWidth:2.2,borderInlineEndColor:2.2,borderInlineEndStyle:2.2,borderInlineEndWidth:2.2,borderEndStartRadius:2.2,borderEndEndRadius:2.2,borderStartStartRadius:2.2,borderStartEndRadius:2.2,insetBlockEnd:2.2,insetBlockStart:2.2,insetInlineEnd:2.2,insetInlineStart:2.2,marginBlockStart:2.2,marginBlockEnd:2.2,marginInlineStart:2.2,marginInlineEnd:2.2,paddingBlockStart:2.2,paddingBlockEnd:2.2,paddingInlineStart:2.2,paddingInlineEnd:2.2},p0="borderTopLeftRadius",h0="borderTopRightRadius",g0="borderBottomLeftRadius",v0="borderBottomRightRadius",m0="borderLeftColor",y0="borderLeftStyle",b0="borderLeftWidth",S0="borderRightColor",w0="borderRightStyle",x0="borderRightWidth",E0="right",C0="marginLeft",_0="marginRight",R0="paddingLeft",O0="paddingRight",$0="left",tp={[p0]:h0,[h0]:p0,[g0]:v0,[v0]:g0,[m0]:S0,[y0]:w0,[b0]:x0,[S0]:m0,[w0]:y0,[x0]:b0,[$0]:E0,[C0]:_0,[_0]:C0,[R0]:O0,[O0]:R0,[E0]:$0},ju={borderStartStartRadius:p0,borderStartEndRadius:h0,borderEndStartRadius:g0,borderEndEndRadius:v0,borderInlineStartColor:m0,borderInlineStartStyle:y0,borderInlineStartWidth:b0,borderInlineEndColor:S0,borderInlineEndStyle:w0,borderInlineEndWidth:x0,insetInlineEnd:E0,insetInlineStart:$0,marginInlineStart:C0,marginInlineEnd:_0,paddingInlineStart:R0,paddingInlineEnd:O0},I$=["clear","float","textAlign"];function gM(e){var t={$$css:!0},r=[];function n(i,o,s){var u=yM(s,o),c=o+u,f=ax.get(c),p;if(f!=null)p=f[0],r.push(f[1]);else{var g=i!==o?c:u;p=o1("r",i,g);var h=hM[i]||pM,m=bM(p,o,s),y=[m,h];r.push(y),ax.set(c,[p,y])}return p}return Object.keys(e).sort().forEach(i=>{var o=e[i];if(o!=null){var s;if(I$.indexOf(i)>-1){var u=n(i,i,"left"),c=n(i,i,"right");o==="start"?s=[u,c]:o==="end"&&(s=[c,u])}var f=ju[i];if(f!=null){var p=n(i,f,o),g=n(i,tp[f],o);s=[p,g]}if(i==="transitionProperty"){for(var h=Array.isArray(o)?o:[o],m=[],y=0;y<h.length;y++){var b=h[y];typeof b=="string"&&ju[b]!=null&&m.push(y)}if(m.length>0){var S=[...h],_=[...h];m.forEach(C=>{var O=S[C];if(typeof O=="string"){var R=ju[O],$=tp[R];S[C]=R,_[C]=$;var T=n(i,i,S),P=n(i,i,_);s=[T,P]}})}}s==null?s=n(i,i,o):t.$$css$localize=!0,t[i]=s}}),[t,r]}function vM(e,t){var r={$$css:!0},n=[],i=e.animationKeyframes,o=Cc(e,cM),s=o1("css",t,JSON.stringify(e)),u="."+s,c;if(i!=null){var f=A$(i),p=f[0],g=f[1];c=p.join(","),n.push(...g)}var h=Yo(de(de({},o),{},{animationName:c}));return n.push(""+u+h),r[s]=s,[r,[[n,dM]]]}function mM(e,t){var r=e||fM,n={},i={},o=function(){var f=r[s],p=s,g=f;if(!Object.prototype.hasOwnProperty.call(r,s)||f==null)return"continue";I$.indexOf(s)>-1&&(f==="start"?g=t?"right":"left":f==="end"&&(g=t?"left":"right"));var h=ju[s];if(h!=null&&(p=t?tp[h]:h),s==="transitionProperty"){var m=Array.isArray(f)?f:[f];m.forEach((y,b)=>{if(typeof y=="string"){var S=ju[y];S!=null&&(m[b]=t?tp[S]:S,g=m.join(" "))}})}n[p]||(i[p]=g),p===s&&(n[p]=!0)};for(var s in r)var u=o();return x$(i,!0)}function yM(e,t){var r=un(e,t);return typeof r!="string"?JSON.stringify(r||""):r}function bM(e,t,r){var n=[],i="."+e;switch(t){case"animationKeyframes":{var o=A$(r),s=o[0],u=o[1],c=Yo({animationName:s.join(",")});n.push(""+i+c,...u);break}case"placeholderTextColor":{var f=Yo({color:r,opacity:1});n.push(i+"::-webkit-input-placeholder"+f,i+"::-moz-placeholder"+f,i+":-ms-input-placeholder"+f,i+"::placeholder"+f);break}case"pointerEvents":{var p=r;if(r==="auto"||r==="box-only"){if(p="auto!important",r==="box-only"){var g=Yo({pointerEvents:"none"});n.push(i+">*"+g)}}else if((r==="none"||r==="box-none")&&(p="none!important",r==="box-none")){var h=Yo({pointerEvents:"auto"});n.push(i+" * "+h)}var m=Yo({pointerEvents:p});n.push(""+i+m);break}case"scrollbarWidth":{r==="none"&&n.push(i+"::-webkit-scrollbar{display:none}");var y=Yo({scrollbarWidth:r});n.push(""+i+y);break}default:{var b=Yo({[t]:r});n.push(""+i+b);break}}return n}function Yo(e){var t=uM(x$(e)),r=Object.keys(t).map(n=>{var i=t[n],o=rP(n);return Array.isArray(i)?i.map(s=>o+":"+s).join(";"):o+":"+i}).sort().join(";");return"{"+r+";}"}function o1(e,t,r){var n=J5(t+r);return e+"-"+n}function SM(e){var t=["-webkit-",""],r=o1("r","animation",JSON.stringify(e)),n="{"+Object.keys(e).map(o=>{var s=e[o],u=Yo(s);return""+o+u}).join("")+"}",i=t.map(o=>"@"+o+"keyframes "+r+n);return[r,i]}function A$(e){if(typeof e=="number")throw new Error("Invalid CSS keyframes type: "+typeof e);var t=[],r=[],n=Array.isArray(e)?e:[e];return n.forEach(i=>{if(typeof i=="string")t.push(i);else{var o=SM(i),s=o[0],u=o[1];t.push(s),r.push(...u)}}),[t,r]}function Fg(e,t,r){if(ws){var n=t??document,i=n.getElementById(e);if(i==null)if(i=document.createElement("style"),i.setAttribute("id",e),typeof r=="string"&&i.appendChild(document.createTextNode(r)),n instanceof ShadowRoot)n.insertBefore(i,n.firstChild);else{var o=n.head;o&&o.insertBefore(i,o.firstChild)}return i.sheet}else return null}var wM=Array.prototype.slice;function Ng(e){var t={},r={};if(e!=null){var n;wM.call(e.cssRules).forEach((s,u)=>{var c=s.cssText;if(c.indexOf("stylesheet-group")>-1)n=CM(s),t[n]={start:u,rules:[c]};else{var f=lx(c);f!=null&&(r[f]=!0,t[n].rules.push(c))}})}function i(s,u,c){var f=sx(t),p=f.indexOf(u),g=p+1,h=f[g],m=h!=null&&t[h].start!=null?t[h].start:s.cssRules.length,y=RM(s,c,m);if(y){t[u].start==null&&(t[u].start=m);for(var b=g;b<f.length;b+=1){var S=f[b],_=t[S].start||0;t[S].start=_+1}}return y}var o={getTextContent(){return sx(t).map(s=>{var u=t[s].rules,c=u.shift();return u.sort(),u.unshift(c),u.join(`
3
3
  `)}).join(`
4
- `)},insert(s,u){var c=Number(u);if(t[c]==null){var f=xM(c);t[c]={start:null,rules:[f]},e!=null&&i(e,c,f)}var p=lx(s);if(p!=null&&r[p]==null&&(r[p]=!0,t[c].rules.push(s),e!=null)){var g=i(e,c,s);g||t[c].rules.pop()}}};return o}function xM(e){return'[stylesheet-group="'+e+'"]{}'}var EM=/["']/g;function CM(e){return Number(e.selectorText.split(EM)[1])}function sx(e){return Object.keys(e).map(Number).sort((t,r)=>t>r?1:-1)}var _M=/\s*([,])\s*/g;function lx(e){var t=e.split("{")[0].trim();return t!==""?t.replace(_M,"$1"):null}function RM(e,t,r){try{return e.insertRule(t,r),!0}catch{return!1}}var OM="react-native-stylesheet",jg=new WeakMap,Hi=[],ux=["html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}","body{margin:0;}","button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}","input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"];function a1(e,t){t===void 0&&(t=OM);var r;if(ws){var n=e!=null?e.getRootNode():document;if(Hi.length===0)r=Ng(Fg(t)),ux.forEach(u=>{r.insert(u,0)}),jg.set(n,Hi.length),Hi.push(r);else{var i=jg.get(n);if(i==null){var o=Hi[0],s=o!=null?o.getTextContent():"";r=Ng(Fg(t,n,s)),jg.set(n,Hi.length),Hi.push(r)}else r=Hi[i]}}else Hi.length===0?(r=Ng(Fg(t)),ux.forEach(u=>{r.insert(u,0)}),Hi.push(r)):r=Hi[0];return{getTextContent(){return r.getTextContent()},id:t,insert(u,c){Hi.forEach(f=>{f.insert(u,c)})}}}var Jf={},cx;function $M(){if(cx)return Jf;cx=1,Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.localizeStyle=n;var e=new WeakMap,t="$$css$localize";function r(i,o){var s={};for(var u in i)if(u!==t){var c=i[u];Array.isArray(c)?s[u]=o?c[1]:c[0]:s[u]=c}return s}function n(i,o){if(i[t]!=null){var s=o?1:0;if(e.has(i)){var u=e.get(i),c=u[s];return c==null&&(c=r(i,o),u[s]=c,e.set(i,u)),c}var f=r(i,o),p=new Array(2);return p[s]=f,e.set(i,p),f}return i}return Jf}var zg,fx;function TM(){return fx||(fx=1,zg=$M()),zg}var IM=TM(),AM={},k$={height:0,width:0},kM=e=>{var t=e.shadowColor,r=e.shadowOffset,n=e.shadowOpacity,i=e.shadowRadius,o=r||k$,s=o.height,u=o.width,c=un(u),f=un(s),p=un(i||0),g=i1(t||"black",n);if(g!=null&&c!=null&&f!=null&&p!=null)return c+" "+f+" "+p+" "+g},PM=e=>{var t=e.textShadowColor,r=e.textShadowOffset,n=e.textShadowRadius,i=r||k$,o=i.height,s=i.width,u=n||0,c=un(s),f=un(o),p=un(u),g=un(t,"textShadowColor");if(g&&(o!==0||s!==0||u!==0)&&c!=null&&f!=null&&p!=null)return c+" "+f+" "+p+" "+g},MM=e=>{if(typeof e=="string")return e;var t=un(e.offsetX)||0,r=un(e.offsetY)||0,n=un(e.blurRadius)||0,i=un(e.spreadDistance)||0,o=i1(e.color)||"black",s=e.inset?"inset ":"";return""+s+t+" "+r+" "+n+" "+i+" "+o},DM=e=>e.map(MM).join(", "),LM=e=>{var t=Object.keys(e)[0],r=e[t];if(t==="matrix"||t==="matrix3d")return t+"("+r.join(",")+")";var n=un(r,t);return t+"("+n+")"},FM=e=>e.map(LM).join(" "),NM=e=>e.map(t=>un(t)).join(" "),jM={borderBottomEndRadius:"borderEndEndRadius",borderBottomStartRadius:"borderEndStartRadius",borderTopEndRadius:"borderStartEndRadius",borderTopStartRadius:"borderStartStartRadius",borderEndColor:"borderInlineEndColor",borderEndStyle:"borderInlineEndStyle",borderEndWidth:"borderInlineEndWidth",borderStartColor:"borderInlineStartColor",borderStartStyle:"borderInlineStartStyle",borderStartWidth:"borderInlineStartWidth",end:"insetInlineEnd",marginEnd:"marginInlineEnd",marginHorizontal:"marginInline",marginStart:"marginInlineStart",marginVertical:"marginBlock",paddingEnd:"paddingInlineEnd",paddingHorizontal:"paddingInline",paddingStart:"paddingInlineStart",paddingVertical:"paddingBlock",start:"insetInlineStart"},zM={elevation:!0,overlayColor:!0,resizeMode:!0,tintColor:!0},P$=function(t,r){r===void 0&&(r={});var n=t||AM,i={};if(r.shadow,n.shadowColor!=null||n.shadowOffset!=null||n.shadowOpacity!=null||n.shadowRadius!=null){var o=kM(n);o!=null&&(i.boxShadow=o)}if(r.textShadow,n.textShadowColor!=null||n.textShadowOffset!=null||n.textShadowRadius!=null){var s=PM(n);if(s!=null&&i.textShadow==null){var u=n.textShadow,c=u?u+", "+s:s;i.textShadow=c}}for(var f in n)if(!(zM[f]!=null||f==="shadowColor"||f==="shadowOffset"||f==="shadowOpacity"||f==="shadowRadius"||f==="textShadowColor"||f==="textShadowOffset"||f==="textShadowRadius")){var p=n[f],g=jM[f]||f,h=p;if(!(!Object.prototype.hasOwnProperty.call(n,f)||g!==f&&n[g]!=null))if(g==="aspectRatio"&&typeof h=="number")i[g]=h.toString();else if(g==="boxShadow"){Array.isArray(h)&&(h=DM(h));var m=i.boxShadow;i.boxShadow=m?h+", "+m:h}else g==="fontVariant"?(Array.isArray(h)&&h.length>0&&(h=h.join(" ")),i[g]=h):g==="textAlignVertical"?n.verticalAlign==null&&(i.verticalAlign=h==="center"?"middle":h):g==="transform"?(Array.isArray(h)&&(h=FM(h)),i.transform=h):g==="transformOrigin"?(Array.isArray(h)&&(h=NM(h)),i.transformOrigin=h):i[g]=h}return i},wu={},dx;function BM(){if(dx)return wu;dx=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.styleq=void 0;var e=new WeakMap,t="$$css";function r(i){var o,s,u;return i!=null&&(o=i.disableCache===!0,s=i.disableMix===!0,u=i.transform),function(){for(var f=[],p="",g=null,h=o?null:e,m=new Array(arguments.length),y=0;y<arguments.length;y++)m[y]=arguments[y];for(;m.length>0;){var b=m.pop();if(!(b==null||b===!1)){if(Array.isArray(b)){for(var S=0;S<b.length;S++)m.push(b[S]);continue}var _=u!=null?u(b):b;if(_.$$css){var C="";if(h!=null&&h.has(_)){var O=h.get(_);O!=null&&(C=O[0],f.push.apply(f,O[1]),h=O[2])}else{var R=[];for(var $ in _){var T=_[$];$!==t&&(typeof T=="string"||T===null?f.includes($)||(f.push($),h!=null&&R.push($),typeof T=="string"&&(C+=C?" "+T:T)):console.error("styleq: ".concat($," typeof ").concat(String(T),' is not "string" or "null".')))}if(h!=null){var P=new WeakMap;h.set(_,[C,R,P]),h=P}}C&&(p=p?C+" "+p:C)}else if(s)g==null&&(g={}),g=Object.assign({},_,g);else{var L=null;for(var z in _){var B=_[z];B!==void 0&&(f.includes(z)||(B!=null&&(g==null&&(g={}),L==null&&(L={}),L[z]=B),f.push(z),h=null))}L!=null&&(g=Object.assign(L,g))}}}var X=[p,g];return X}}var n=r();return wu.styleq=n,n.factory=r,wu}var VM=BM(),HM=["writingDirection"],M$=new WeakMap,rp=a1(),D$={shadow:!0,textShadow:!0};function UM(e,t){t===void 0&&(t={});var r=t,n=r.writingDirection,i=Cc(r,HM),o=n==="rtl";return VM.styleq.factory({transform(s){var u=M$.get(s);return u!=null?IM.localizeStyle(u,o):P$(s,de(de({},D$),i))}})(e)}function L$(e){e.forEach(t=>{var r=t[0],n=t[1];rp!=null&&r.forEach(i=>{rp.insert(i,n)})})}function WM(e){var t=gM(P$(e,D$)),r=t[0],n=t[1];return L$(n),r}function GM(e,t){var r=vM(e,t),n=r[0],i=r[1];return L$(i),n}var F$={position:"absolute",left:0,right:0,top:0,bottom:0},qM=N$({x:de({},F$)}).x;function N$(e){return Object.keys(e).forEach(t=>{var r=e[t];if(r!=null&&r.$$css!==!0){var n;t.indexOf("$raw")>-1?n=GM(r,t.split("$raw")[0]):n=WM(r),M$.set(r,n)}}),e}function XM(e,t){return[e,t]}function KM(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n=t.flat(1/0),i={},o=0;o<n.length;o++){var s=n[o];s!=null&&typeof s=="object"&&Object.assign(i,s)}return i}function YM(){return{id:rp.id,textContent:rp.getTextContent()}}function ia(e,t){t===void 0&&(t={});var r=t.writingDirection==="rtl",n=UM(e,t);return Array.isArray(n)&&n[1]!=null&&(n[1]=mM(n[1],r)),n}ia.absoluteFill=qM;ia.absoluteFillObject=F$;ia.create=N$;ia.compose=XM;ia.flatten=KM;ia.getSheet=YM;ia.hairlineWidth=1;ws&&window.__REACT_DEVTOOLS_GLOBAL_HOOK__&&(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle=ia.flatten);var _c=ia,QM=["aria-activedescendant","accessibilityActiveDescendant","aria-atomic","accessibilityAtomic","aria-autocomplete","accessibilityAutoComplete","aria-busy","accessibilityBusy","aria-checked","accessibilityChecked","aria-colcount","accessibilityColumnCount","aria-colindex","accessibilityColumnIndex","aria-colspan","accessibilityColumnSpan","aria-controls","accessibilityControls","aria-current","accessibilityCurrent","aria-describedby","accessibilityDescribedBy","aria-details","accessibilityDetails","aria-disabled","accessibilityDisabled","aria-errormessage","accessibilityErrorMessage","aria-expanded","accessibilityExpanded","aria-flowto","accessibilityFlowTo","aria-haspopup","accessibilityHasPopup","aria-hidden","accessibilityHidden","aria-invalid","accessibilityInvalid","aria-keyshortcuts","accessibilityKeyShortcuts","aria-label","accessibilityLabel","aria-labelledby","accessibilityLabelledBy","aria-level","accessibilityLevel","aria-live","accessibilityLiveRegion","aria-modal","accessibilityModal","aria-multiline","accessibilityMultiline","aria-multiselectable","accessibilityMultiSelectable","aria-orientation","accessibilityOrientation","aria-owns","accessibilityOwns","aria-placeholder","accessibilityPlaceholder","aria-posinset","accessibilityPosInSet","aria-pressed","accessibilityPressed","aria-readonly","accessibilityReadOnly","aria-required","accessibilityRequired","role","accessibilityRole","aria-roledescription","accessibilityRoleDescription","aria-rowcount","accessibilityRowCount","aria-rowindex","accessibilityRowIndex","aria-rowspan","accessibilityRowSpan","aria-selected","accessibilitySelected","aria-setsize","accessibilitySetSize","aria-sort","accessibilitySort","aria-valuemax","accessibilityValueMax","aria-valuemin","accessibilityValueMin","aria-valuenow","accessibilityValueNow","aria-valuetext","accessibilityValueText","dataSet","focusable","id","nativeID","pointerEvents","style","tabIndex","testID"],JM={},ZM=Object.prototype.hasOwnProperty,eD=Array.isArray,tD=/[A-Z]/g;function rD(e){return"-"+e.toLowerCase()}function nD(e){return e.replace(tD,rD)}function Ys(e){return eD(e)?e.join(" "):e}var iD=_c.create({auto:{pointerEvents:"auto"},"box-none":{pointerEvents:"box-none"},"box-only":{pointerEvents:"box-only"},none:{pointerEvents:"none"}}),oD=(e,t,r)=>{t||(t=JM);var n=t,i=n["aria-activedescendant"],o=n.accessibilityActiveDescendant,s=n["aria-atomic"],u=n.accessibilityAtomic,c=n["aria-autocomplete"],f=n.accessibilityAutoComplete,p=n["aria-busy"],g=n.accessibilityBusy,h=n["aria-checked"],m=n.accessibilityChecked,y=n["aria-colcount"],b=n.accessibilityColumnCount,S=n["aria-colindex"],_=n.accessibilityColumnIndex,C=n["aria-colspan"],O=n.accessibilityColumnSpan,R=n["aria-controls"],$=n.accessibilityControls,T=n["aria-current"],P=n.accessibilityCurrent,L=n["aria-describedby"],z=n.accessibilityDescribedBy,B=n["aria-details"],X=n.accessibilityDetails,Y=n["aria-disabled"],N=n.accessibilityDisabled,j=n["aria-errormessage"],F=n.accessibilityErrorMessage,q=n["aria-expanded"],U=n.accessibilityExpanded,M=n["aria-flowto"],G=n.accessibilityFlowTo,K=n["aria-haspopup"],D=n.accessibilityHasPopup,A=n["aria-hidden"],J=n.accessibilityHidden,Z=n["aria-invalid"],ne=n.accessibilityInvalid,W=n["aria-keyshortcuts"],ve=n.accessibilityKeyShortcuts,se=n["aria-label"],Ee=n.accessibilityLabel,we=n["aria-labelledby"],Me=n.accessibilityLabelledBy,Oe=n["aria-level"],je=n.accessibilityLevel,Ae=n["aria-live"],$e=n.accessibilityLiveRegion,Ne=n["aria-modal"],Ie=n.accessibilityModal,Ke=n["aria-multiline"],nt=n.accessibilityMultiline,ze=n["aria-multiselectable"],Ue=n.accessibilityMultiSelectable,Qe=n["aria-orientation"],Ve=n.accessibilityOrientation,ye=n["aria-owns"],Ge=n.accessibilityOwns,ct=n["aria-placeholder"],Lt=n.accessibilityPlaceholder,ht=n["aria-posinset"],Kt=n.accessibilityPosInSet,Ft=n["aria-pressed"],re=n.accessibilityPressed,ie=n["aria-readonly"],ue=n.accessibilityReadOnly,V=n["aria-required"],pe=n.accessibilityRequired;n.role,n.accessibilityRole;var _e=n["aria-roledescription"],De=n.accessibilityRoleDescription,fe=n["aria-rowcount"],he=n.accessibilityRowCount,me=n["aria-rowindex"],Ce=n.accessibilityRowIndex,Te=n["aria-rowspan"],Xe=n.accessibilityRowSpan,it=n["aria-selected"],Je=n.accessibilitySelected,ot=n["aria-setsize"],zr=n.accessibilitySetSize,ft=n["aria-sort"],pt=n.accessibilitySort,wt=n["aria-valuemax"],mt=n.accessibilityValueMax,xt=n["aria-valuemin"],Bt=n.accessibilityValueMin,Jt=n["aria-valuenow"],Tr=n.accessibilityValueNow,Ir=n["aria-valuetext"],Br=n.accessibilityValueText,hn=n.dataSet,gn=n.focusable,An=n.id,Ar=n.nativeID,ri=n.pointerEvents,er=n.style,Vr=n.tabIndex,kn=n.testID,Pe=Cc(n,QM),Co=Y||N,Vt=b$.propsToAriaRole(t),ni=i??o;ni!=null&&(Pe["aria-activedescendant"]=ni);var _o=s!=null?i:u;_o!=null&&(Pe["aria-atomic"]=_o);var Nt=c??f;Nt!=null&&(Pe["aria-autocomplete"]=Nt);var ii=p??g;ii!=null&&(Pe["aria-busy"]=ii);var ki=h??m;ki!=null&&(Pe["aria-checked"]=ki);var Ro=y??b;Ro!=null&&(Pe["aria-colcount"]=Ro);var oi=S??_;oi!=null&&(Pe["aria-colindex"]=oi);var Oo=C??O;Oo!=null&&(Pe["aria-colspan"]=Oo);var Pn=R??$;Pn!=null&&(Pe["aria-controls"]=Ys(Pn));var rn=T??P;rn!=null&&(Pe["aria-current"]=rn);var gr=L??z;gr!=null&&(Pe["aria-describedby"]=Ys(gr));var ai=B??X;ai!=null&&(Pe["aria-details"]=ai),Co===!0&&(Pe["aria-disabled"]=!0,(e==="button"||e==="form"||e==="input"||e==="select"||e==="textarea")&&(Pe.disabled=!0));var dr=j??F;dr!=null&&(Pe["aria-errormessage"]=dr);var Pi=q??U;Pi!=null&&(Pe["aria-expanded"]=Pi);var Hr=M??G;Hr!=null&&(Pe["aria-flowto"]=Ys(Hr));var Mn=K??D;Mn!=null&&(Pe["aria-haspopup"]=Mn);var Ur=A??J;Ur===!0&&(Pe["aria-hidden"]=Ur);var Wr=Z??ne;Wr!=null&&(Pe["aria-invalid"]=Wr);var vn=W??ve;vn!=null&&(Pe["aria-keyshortcuts"]=Ys(vn));var Mi=se??Ee;Mi!=null&&(Pe["aria-label"]=Mi);var $o=we??Me;$o!=null&&(Pe["aria-labelledby"]=Ys($o));var To=Oe??je;To!=null&&(Pe["aria-level"]=To);var si=Ae??$e;si!=null&&(Pe["aria-live"]=si==="none"?"off":si);var Io=Ne??Ie;Io!=null&&(Pe["aria-modal"]=Io);var no=Ke??nt;no!=null&&(Pe["aria-multiline"]=no);var Dn=ze??Ue;Dn!=null&&(Pe["aria-multiselectable"]=Dn);var sa=Qe??Ve;sa!=null&&(Pe["aria-orientation"]=sa);var io=ye??Ge;io!=null&&(Pe["aria-owns"]=Ys(io));var yt=ct??Lt;yt!=null&&(Pe["aria-placeholder"]=yt);var Ao=ht??Kt;Ao!=null&&(Pe["aria-posinset"]=Ao);var ko=Ft??re;ko!=null&&(Pe["aria-pressed"]=ko);var oo=ie??ue;oo!=null&&(Pe["aria-readonly"]=oo,(e==="input"||e==="select"||e==="textarea")&&(Pe.readOnly=!0));var Gr=V??pe;Gr!=null&&(Pe["aria-required"]=Gr,(e==="input"||e==="select"||e==="textarea")&&(Pe.required=pe)),Vt!=null&&(Pe.role=Vt==="none"?"presentation":Vt);var Di=_e??De;Di!=null&&(Pe["aria-roledescription"]=Di);var Po=fe??he;Po!=null&&(Pe["aria-rowcount"]=Po);var Mo=me??Ce;Mo!=null&&(Pe["aria-rowindex"]=Mo);var li=Te??Xe;li!=null&&(Pe["aria-rowspan"]=li);var Gt=it??Je;Gt!=null&&(Pe["aria-selected"]=Gt);var vr=ot??zr;vr!=null&&(Pe["aria-setsize"]=vr);var Er=ft??pt;Er!=null&&(Pe["aria-sort"]=Er);var kr=wt??mt;kr!=null&&(Pe["aria-valuemax"]=kr);var nn=xt??Bt;nn!=null&&(Pe["aria-valuemin"]=nn);var qr=Jt??Tr;qr!=null&&(Pe["aria-valuenow"]=qr);var Do=Ir??Br;if(Do!=null&&(Pe["aria-valuetext"]=Do),hn!=null){for(var ao in hn)if(ZM.call(hn,ao)){var Le=nD(ao),Ze=hn[ao];Ze!=null&&(Pe["data-"+Le]=Ze)}}Vr===0||Vr==="0"||Vr===-1||Vr==="-1"?Pe.tabIndex=Vr:(gn===!1&&(Pe.tabIndex="-1"),e==="a"||e==="button"||e==="input"||e==="select"||e==="textarea"?(gn===!1||N===!0)&&(Pe.tabIndex="-1"):Vt==="button"||Vt==="checkbox"||Vt==="link"||Vt==="radio"||Vt==="textbox"||Vt==="switch"?gn!==!1&&(Pe.tabIndex="0"):gn===!0&&(Pe.tabIndex="0"));var $t=_c([er,ri&&iD[ri]],de({writingDirection:"ltr"},r)),Pt=$t[0],Tt=$t[1];Pt&&(Pe.className=Pt),Tt&&(Pe.style=Tt);var Lo=An??Ar;return Lo!=null&&(Pe.id=Lo),kn!=null&&(Pe["data-testid"]=kn),Pe.type==null&&e==="button"&&(Pe.type="button"),Pe},Bg={exports:{}},vt={},px;function aD(){if(px)return vt;px=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function h(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,b={};function S(D,A,J){this.props=D,this.context=A,this.refs=b,this.updater=J||m}S.prototype.isReactComponent={},S.prototype.setState=function(D,A){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,A,"setState")},S.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function _(){}_.prototype=S.prototype;function C(D,A,J){this.props=D,this.context=A,this.refs=b,this.updater=J||m}var O=C.prototype=new _;O.constructor=C,y(O,S.prototype),O.isPureReactComponent=!0;var R=Array.isArray,$=Object.prototype.hasOwnProperty,T={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function L(D,A,J){var Z,ne={},W=null,ve=null;if(A!=null)for(Z in A.ref!==void 0&&(ve=A.ref),A.key!==void 0&&(W=""+A.key),A)$.call(A,Z)&&!P.hasOwnProperty(Z)&&(ne[Z]=A[Z]);var se=arguments.length-2;if(se===1)ne.children=J;else if(1<se){for(var Ee=Array(se),we=0;we<se;we++)Ee[we]=arguments[we+2];ne.children=Ee}if(D&&D.defaultProps)for(Z in se=D.defaultProps,se)ne[Z]===void 0&&(ne[Z]=se[Z]);return{$$typeof:e,type:D,key:W,ref:ve,props:ne,_owner:T.current}}function z(D,A){return{$$typeof:e,type:D.type,key:A,ref:D.ref,props:D.props,_owner:D._owner}}function B(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function X(D){var A={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(J){return A[J]})}var Y=/\/+/g;function N(D,A){return typeof D=="object"&&D!==null&&D.key!=null?X(""+D.key):A.toString(36)}function j(D,A,J,Z,ne){var W=typeof D;(W==="undefined"||W==="boolean")&&(D=null);var ve=!1;if(D===null)ve=!0;else switch(W){case"string":case"number":ve=!0;break;case"object":switch(D.$$typeof){case e:case t:ve=!0}}if(ve)return ve=D,ne=ne(ve),D=Z===""?"."+N(ve,0):Z,R(ne)?(J="",D!=null&&(J=D.replace(Y,"$&/")+"/"),j(ne,A,J,"",function(we){return we})):ne!=null&&(B(ne)&&(ne=z(ne,J+(!ne.key||ve&&ve.key===ne.key?"":(""+ne.key).replace(Y,"$&/")+"/")+D)),A.push(ne)),1;if(ve=0,Z=Z===""?".":Z+":",R(D))for(var se=0;se<D.length;se++){W=D[se];var Ee=Z+N(W,se);ve+=j(W,A,J,Ee,ne)}else if(Ee=h(D),typeof Ee=="function")for(D=Ee.call(D),se=0;!(W=D.next()).done;)W=W.value,Ee=Z+N(W,se++),ve+=j(W,A,J,Ee,ne);else if(W==="object")throw A=String(D),Error("Objects are not valid as a React child (found: "+(A==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":A)+"). If you meant to render a collection of children, use an array instead.");return ve}function F(D,A,J){if(D==null)return D;var Z=[],ne=0;return j(D,Z,"","",function(W){return A.call(J,W,ne++)}),Z}function q(D){if(D._status===-1){var A=D._result;A=A(),A.then(function(J){(D._status===0||D._status===-1)&&(D._status=1,D._result=J)},function(J){(D._status===0||D._status===-1)&&(D._status=2,D._result=J)}),D._status===-1&&(D._status=0,D._result=A)}if(D._status===1)return D._result.default;throw D._result}var U={current:null},M={transition:null},G={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:M,ReactCurrentOwner:T};function K(){throw Error("act(...) is not supported in production builds of React.")}return vt.Children={map:F,forEach:function(D,A,J){F(D,function(){A.apply(this,arguments)},J)},count:function(D){var A=0;return F(D,function(){A++}),A},toArray:function(D){return F(D,function(A){return A})||[]},only:function(D){if(!B(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},vt.Component=S,vt.Fragment=r,vt.Profiler=i,vt.PureComponent=C,vt.StrictMode=n,vt.Suspense=c,vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,vt.act=K,vt.cloneElement=function(D,A,J){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var Z=y({},D.props),ne=D.key,W=D.ref,ve=D._owner;if(A!=null){if(A.ref!==void 0&&(W=A.ref,ve=T.current),A.key!==void 0&&(ne=""+A.key),D.type&&D.type.defaultProps)var se=D.type.defaultProps;for(Ee in A)$.call(A,Ee)&&!P.hasOwnProperty(Ee)&&(Z[Ee]=A[Ee]===void 0&&se!==void 0?se[Ee]:A[Ee])}var Ee=arguments.length-2;if(Ee===1)Z.children=J;else if(1<Ee){se=Array(Ee);for(var we=0;we<Ee;we++)se[we]=arguments[we+2];Z.children=se}return{$$typeof:e,type:D.type,key:ne,ref:W,props:Z,_owner:ve}},vt.createContext=function(D){return D={$$typeof:s,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:o,_context:D},D.Consumer=D},vt.createElement=L,vt.createFactory=function(D){var A=L.bind(null,D);return A.type=D,A},vt.createRef=function(){return{current:null}},vt.forwardRef=function(D){return{$$typeof:u,render:D}},vt.isValidElement=B,vt.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:q}},vt.memo=function(D,A){return{$$typeof:f,type:D,compare:A===void 0?null:A}},vt.startTransition=function(D){var A=M.transition;M.transition={};try{D()}finally{M.transition=A}},vt.unstable_act=K,vt.useCallback=function(D,A){return U.current.useCallback(D,A)},vt.useContext=function(D){return U.current.useContext(D)},vt.useDebugValue=function(){},vt.useDeferredValue=function(D){return U.current.useDeferredValue(D)},vt.useEffect=function(D,A){return U.current.useEffect(D,A)},vt.useId=function(){return U.current.useId()},vt.useImperativeHandle=function(D,A,J){return U.current.useImperativeHandle(D,A,J)},vt.useInsertionEffect=function(D,A){return U.current.useInsertionEffect(D,A)},vt.useLayoutEffect=function(D,A){return U.current.useLayoutEffect(D,A)},vt.useMemo=function(D,A){return U.current.useMemo(D,A)},vt.useReducer=function(D,A,J){return U.current.useReducer(D,A,J)},vt.useRef=function(D){return U.current.useRef(D)},vt.useState=function(D){return U.current.useState(D)},vt.useSyncExternalStore=function(D,A,J){return U.current.useSyncExternalStore(D,A,J)},vt.useTransition=function(){return U.current.useTransition()},vt.version="18.3.1",vt}var hx;function s1(){return hx||(hx=1,Bg.exports=aD()),Bg.exports}var x=s1();const te=Nr(x),Tp=k5({__proto__:null,default:te},[x]);var sD=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gx=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","far","glk","he","iw","khw","ks","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]),vx=new Map;function lD(e){var t=vx.get(e);if(t)return t;var r=!1;if(Intl.Locale)try{var n=new Intl.Locale(e).maximize().script;r=sD.has(n)}catch{var i=e.split("-")[0];r=gx.has(i)}else{var o=e.split("-")[0];r=gx.has(o)}return vx.set(e,r),r}var uD={direction:"ltr",locale:"en-US"},j$=x.createContext(uD);function z$(e){return lD(e)?"rtl":"ltr"}function cD(e){var t=e.direction,r=e.locale,n=e.children,i=t||r;return i?te.createElement(j$.Provider,{children:n,value:{direction:r?z$(r):t,locale:r}}):n}function fD(){return x.useContext(j$)}var dD=(e,t,r)=>{var n;e&&e.constructor===String&&(n=b$.propsToAccessibilityComponent(t));var i=n||e,o=oD(i,t,r),s=te.createElement(i,o),u=o.dir?te.createElement(cD,{children:s,direction:o.dir,locale:o.lang}):s;return u},Zf={},Vg={exports:{}},xn={},Hg={exports:{}},Ug={},mx;function pD(){return mx||(mx=1,(function(e){function t(M,G){var K=M.length;M.push(G);e:for(;0<K;){var D=K-1>>>1,A=M[D];if(0<i(A,G))M[D]=G,M[K]=A,K=D;else break e}}function r(M){return M.length===0?null:M[0]}function n(M){if(M.length===0)return null;var G=M[0],K=M.pop();if(K!==G){M[0]=K;e:for(var D=0,A=M.length,J=A>>>1;D<J;){var Z=2*(D+1)-1,ne=M[Z],W=Z+1,ve=M[W];if(0>i(ne,K))W<A&&0>i(ve,ne)?(M[D]=ve,M[W]=K,D=W):(M[D]=ne,M[Z]=K,D=Z);else if(W<A&&0>i(ve,K))M[D]=ve,M[W]=K,D=W;else break e}}return G}function i(M,G){var K=M.sortIndex-G.sortIndex;return K!==0?K:M.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],f=[],p=1,g=null,h=3,m=!1,y=!1,b=!1,S=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(M){for(var G=r(f);G!==null;){if(G.callback===null)n(f);else if(G.startTime<=M)n(f),G.sortIndex=G.expirationTime,t(c,G);else break;G=r(f)}}function R(M){if(b=!1,O(M),!y)if(r(c)!==null)y=!0,q($);else{var G=r(f);G!==null&&U(R,G.startTime-M)}}function $(M,G){y=!1,b&&(b=!1,_(L),L=-1),m=!0;var K=h;try{for(O(G),g=r(c);g!==null&&(!(g.expirationTime>G)||M&&!X());){var D=g.callback;if(typeof D=="function"){g.callback=null,h=g.priorityLevel;var A=D(g.expirationTime<=G);G=e.unstable_now(),typeof A=="function"?g.callback=A:g===r(c)&&n(c),O(G)}else n(c);g=r(c)}if(g!==null)var J=!0;else{var Z=r(f);Z!==null&&U(R,Z.startTime-G),J=!1}return J}finally{g=null,h=K,m=!1}}var T=!1,P=null,L=-1,z=5,B=-1;function X(){return!(e.unstable_now()-B<z)}function Y(){if(P!==null){var M=e.unstable_now();B=M;var G=!0;try{G=P(!0,M)}finally{G?N():(T=!1,P=null)}}else T=!1}var N;if(typeof C=="function")N=function(){C(Y)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,F=j.port2;j.port1.onmessage=Y,N=function(){F.postMessage(null)}}else N=function(){S(Y,0)};function q(M){P=M,T||(T=!0,N())}function U(M,G){L=S(function(){M(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_continueExecution=function(){y||m||(y=!0,q($))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(M){switch(h){case 1:case 2:case 3:var G=3;break;default:G=h}var K=h;h=G;try{return M()}finally{h=K}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,G){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var K=h;h=M;try{return G()}finally{h=K}},e.unstable_scheduleCallback=function(M,G,K){var D=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?D+K:D):K=D,M){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=K+A,M={id:p++,callback:G,priorityLevel:M,startTime:K,expirationTime:A,sortIndex:-1},K>D?(M.sortIndex=K,t(f,M),r(c)===null&&M===r(f)&&(b?(_(L),L=-1):b=!0,U(R,K-D))):(M.sortIndex=A,t(c,M),y||m||(y=!0,q($))),M},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(M){var G=h;return function(){var K=h;h=G;try{return M.apply(this,arguments)}finally{h=K}}}})(Ug)),Ug}var yx;function hD(){return yx||(yx=1,Hg.exports=pD()),Hg.exports}var bx;function gD(){if(bx)return xn;bx=1;var e=s1(),t=hD();function r(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function o(a,l){s(a,l),s(a+"Capture",l)}function s(a,l){for(i[a]=l,a=0;a<l.length;a++)n.add(l[a])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,f=/^[: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]*$/,p={},g={};function h(a){return c.call(g,a)?!0:c.call(p,a)?!1:f.test(a)?g[a]=!0:(p[a]=!0,!1)}function m(a,l,d,v){if(d!==null&&d.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return v?!1:d!==null?!d.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function y(a,l,d,v){if(l===null||typeof l>"u"||m(a,l,d,v))return!0;if(v)return!1;if(d!==null)switch(d.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function b(a,l,d,v,w,E,I){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=v,this.attributeNamespace=w,this.mustUseProperty=d,this.propertyName=a,this.type=l,this.sanitizeURL=E,this.removeEmptyString=I}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){S[a]=new b(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var l=a[0];S[l]=new b(l,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){S[a]=new b(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){S[a]=new b(a,2,!1,a,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(a){S[a]=new b(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){S[a]=new b(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){S[a]=new b(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){S[a]=new b(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){S[a]=new b(a,5,!1,a.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function C(a){return a[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(a){var l=a.replace(_,C);S[l]=new b(l,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var l=a.replace(_,C);S[l]=new b(l,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var l=a.replace(_,C);S[l]=new b(l,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){S[a]=new b(a,1,!1,a.toLowerCase(),null,!1,!1)}),S.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){S[a]=new b(a,1,!1,a.toLowerCase(),null,!0,!0)});function O(a,l,d,v){var w=S.hasOwnProperty(l)?S[l]:null;(w!==null?w.type!==0:v||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(y(l,d,w,v)&&(d=null),v||w===null?h(l)&&(d===null?a.removeAttribute(l):a.setAttribute(l,""+d)):w.mustUseProperty?a[w.propertyName]=d===null?w.type===3?!1:"":d:(l=w.attributeName,v=w.attributeNamespace,d===null?a.removeAttribute(l):(w=w.type,d=w===3||w===4&&d===!0?"":""+d,v?a.setAttributeNS(v,l,d):a.setAttribute(l,d))))}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$=Symbol.for("react.element"),T=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),X=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),U=Symbol.for("react.offscreen"),M=Symbol.iterator;function G(a){return a===null||typeof a!="object"?null:(a=M&&a[M]||a["@@iterator"],typeof a=="function"?a:null)}var K=Object.assign,D;function A(a){if(D===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);D=l&&l[1]||""}return`
4
+ `)},insert(s,u){var c=Number(u);if(t[c]==null){var f=xM(c);t[c]={start:null,rules:[f]},e!=null&&i(e,c,f)}var p=lx(s);if(p!=null&&r[p]==null&&(r[p]=!0,t[c].rules.push(s),e!=null)){var g=i(e,c,s);g||t[c].rules.pop()}}};return o}function xM(e){return'[stylesheet-group="'+e+'"]{}'}var EM=/["']/g;function CM(e){return Number(e.selectorText.split(EM)[1])}function sx(e){return Object.keys(e).map(Number).sort((t,r)=>t>r?1:-1)}var _M=/\s*([,])\s*/g;function lx(e){var t=e.split("{")[0].trim();return t!==""?t.replace(_M,"$1"):null}function RM(e,t,r){try{return e.insertRule(t,r),!0}catch{return!1}}var OM="react-native-stylesheet",jg=new WeakMap,Hi=[],ux=["html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}","body{margin:0;}","button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}","input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"];function a1(e,t){t===void 0&&(t=OM);var r;if(ws){var n=e!=null?e.getRootNode():document;if(Hi.length===0)r=Ng(Fg(t)),ux.forEach(u=>{r.insert(u,0)}),jg.set(n,Hi.length),Hi.push(r);else{var i=jg.get(n);if(i==null){var o=Hi[0],s=o!=null?o.getTextContent():"";r=Ng(Fg(t,n,s)),jg.set(n,Hi.length),Hi.push(r)}else r=Hi[i]}}else Hi.length===0?(r=Ng(Fg(t)),ux.forEach(u=>{r.insert(u,0)}),Hi.push(r)):r=Hi[0];return{getTextContent(){return r.getTextContent()},id:t,insert(u,c){Hi.forEach(f=>{f.insert(u,c)})}}}var Jf={},cx;function $M(){if(cx)return Jf;cx=1,Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.localizeStyle=n;var e=new WeakMap,t="$$css$localize";function r(i,o){var s={};for(var u in i)if(u!==t){var c=i[u];Array.isArray(c)?s[u]=o?c[1]:c[0]:s[u]=c}return s}function n(i,o){if(i[t]!=null){var s=o?1:0;if(e.has(i)){var u=e.get(i),c=u[s];return c==null&&(c=r(i,o),u[s]=c,e.set(i,u)),c}var f=r(i,o),p=new Array(2);return p[s]=f,e.set(i,p),f}return i}return Jf}var zg,fx;function TM(){return fx||(fx=1,zg=$M()),zg}var IM=TM(),AM={},k$={height:0,width:0},kM=e=>{var t=e.shadowColor,r=e.shadowOffset,n=e.shadowOpacity,i=e.shadowRadius,o=r||k$,s=o.height,u=o.width,c=un(u),f=un(s),p=un(i||0),g=i1(t||"black",n);if(g!=null&&c!=null&&f!=null&&p!=null)return c+" "+f+" "+p+" "+g},PM=e=>{var t=e.textShadowColor,r=e.textShadowOffset,n=e.textShadowRadius,i=r||k$,o=i.height,s=i.width,u=n||0,c=un(s),f=un(o),p=un(u),g=un(t,"textShadowColor");if(g&&(o!==0||s!==0||u!==0)&&c!=null&&f!=null&&p!=null)return c+" "+f+" "+p+" "+g},MM=e=>{if(typeof e=="string")return e;var t=un(e.offsetX)||0,r=un(e.offsetY)||0,n=un(e.blurRadius)||0,i=un(e.spreadDistance)||0,o=i1(e.color)||"black",s=e.inset?"inset ":"";return""+s+t+" "+r+" "+n+" "+i+" "+o},DM=e=>e.map(MM).join(", "),LM=e=>{var t=Object.keys(e)[0],r=e[t];if(t==="matrix"||t==="matrix3d")return t+"("+r.join(",")+")";var n=un(r,t);return t+"("+n+")"},FM=e=>e.map(LM).join(" "),NM=e=>e.map(t=>un(t)).join(" "),jM={borderBottomEndRadius:"borderEndEndRadius",borderBottomStartRadius:"borderEndStartRadius",borderTopEndRadius:"borderStartEndRadius",borderTopStartRadius:"borderStartStartRadius",borderEndColor:"borderInlineEndColor",borderEndStyle:"borderInlineEndStyle",borderEndWidth:"borderInlineEndWidth",borderStartColor:"borderInlineStartColor",borderStartStyle:"borderInlineStartStyle",borderStartWidth:"borderInlineStartWidth",end:"insetInlineEnd",marginEnd:"marginInlineEnd",marginHorizontal:"marginInline",marginStart:"marginInlineStart",marginVertical:"marginBlock",paddingEnd:"paddingInlineEnd",paddingHorizontal:"paddingInline",paddingStart:"paddingInlineStart",paddingVertical:"paddingBlock",start:"insetInlineStart"},zM={elevation:!0,overlayColor:!0,resizeMode:!0,tintColor:!0},P$=function(t,r){r===void 0&&(r={});var n=t||AM,i={};if(r.shadow,n.shadowColor!=null||n.shadowOffset!=null||n.shadowOpacity!=null||n.shadowRadius!=null){var o=kM(n);o!=null&&(i.boxShadow=o)}if(r.textShadow,n.textShadowColor!=null||n.textShadowOffset!=null||n.textShadowRadius!=null){var s=PM(n);if(s!=null&&i.textShadow==null){var u=n.textShadow,c=u?u+", "+s:s;i.textShadow=c}}for(var f in n)if(!(zM[f]!=null||f==="shadowColor"||f==="shadowOffset"||f==="shadowOpacity"||f==="shadowRadius"||f==="textShadowColor"||f==="textShadowOffset"||f==="textShadowRadius")){var p=n[f],g=jM[f]||f,h=p;if(!(!Object.prototype.hasOwnProperty.call(n,f)||g!==f&&n[g]!=null))if(g==="aspectRatio"&&typeof h=="number")i[g]=h.toString();else if(g==="boxShadow"){Array.isArray(h)&&(h=DM(h));var m=i.boxShadow;i.boxShadow=m?h+", "+m:h}else g==="fontVariant"?(Array.isArray(h)&&h.length>0&&(h=h.join(" ")),i[g]=h):g==="textAlignVertical"?n.verticalAlign==null&&(i.verticalAlign=h==="center"?"middle":h):g==="transform"?(Array.isArray(h)&&(h=FM(h)),i.transform=h):g==="transformOrigin"?(Array.isArray(h)&&(h=NM(h)),i.transformOrigin=h):i[g]=h}return i},wu={},dx;function BM(){if(dx)return wu;dx=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.styleq=void 0;var e=new WeakMap,t="$$css";function r(i){var o,s,u;return i!=null&&(o=i.disableCache===!0,s=i.disableMix===!0,u=i.transform),function(){for(var f=[],p="",g=null,h=o?null:e,m=new Array(arguments.length),y=0;y<arguments.length;y++)m[y]=arguments[y];for(;m.length>0;){var b=m.pop();if(!(b==null||b===!1)){if(Array.isArray(b)){for(var S=0;S<b.length;S++)m.push(b[S]);continue}var _=u!=null?u(b):b;if(_.$$css){var C="";if(h!=null&&h.has(_)){var O=h.get(_);O!=null&&(C=O[0],f.push.apply(f,O[1]),h=O[2])}else{var R=[];for(var $ in _){var T=_[$];$!==t&&(typeof T=="string"||T===null?f.includes($)||(f.push($),h!=null&&R.push($),typeof T=="string"&&(C+=C?" "+T:T)):console.error("styleq: ".concat($," typeof ").concat(String(T),' is not "string" or "null".')))}if(h!=null){var P=new WeakMap;h.set(_,[C,R,P]),h=P}}C&&(p=p?C+" "+p:C)}else if(s)g==null&&(g={}),g=Object.assign({},_,g);else{var L=null;for(var z in _){var B=_[z];B!==void 0&&(f.includes(z)||(B!=null&&(g==null&&(g={}),L==null&&(L={}),L[z]=B),f.push(z),h=null))}L!=null&&(g=Object.assign(L,g))}}}var X=[p,g];return X}}var n=r();return wu.styleq=n,n.factory=r,wu}var VM=BM(),HM=["writingDirection"],M$=new WeakMap,rp=a1(),D$={shadow:!0,textShadow:!0};function UM(e,t){t===void 0&&(t={});var r=t,n=r.writingDirection,i=Cc(r,HM),o=n==="rtl";return VM.styleq.factory({transform(s){var u=M$.get(s);return u!=null?IM.localizeStyle(u,o):P$(s,de(de({},D$),i))}})(e)}function L$(e){e.forEach(t=>{var r=t[0],n=t[1];rp!=null&&r.forEach(i=>{rp.insert(i,n)})})}function WM(e){var t=gM(P$(e,D$)),r=t[0],n=t[1];return L$(n),r}function GM(e,t){var r=vM(e,t),n=r[0],i=r[1];return L$(i),n}var F$={position:"absolute",left:0,right:0,top:0,bottom:0},qM=N$({x:de({},F$)}).x;function N$(e){return Object.keys(e).forEach(t=>{var r=e[t];if(r!=null&&r.$$css!==!0){var n;t.indexOf("$raw")>-1?n=GM(r,t.split("$raw")[0]):n=WM(r),M$.set(r,n)}}),e}function XM(e,t){return[e,t]}function KM(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n=t.flat(1/0),i={},o=0;o<n.length;o++){var s=n[o];s!=null&&typeof s=="object"&&Object.assign(i,s)}return i}function YM(){return{id:rp.id,textContent:rp.getTextContent()}}function ia(e,t){t===void 0&&(t={});var r=t.writingDirection==="rtl",n=UM(e,t);return Array.isArray(n)&&n[1]!=null&&(n[1]=mM(n[1],r)),n}ia.absoluteFill=qM;ia.absoluteFillObject=F$;ia.create=N$;ia.compose=XM;ia.flatten=KM;ia.getSheet=YM;ia.hairlineWidth=1;ws&&window.__REACT_DEVTOOLS_GLOBAL_HOOK__&&(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle=ia.flatten);var _c=ia,QM=["aria-activedescendant","accessibilityActiveDescendant","aria-atomic","accessibilityAtomic","aria-autocomplete","accessibilityAutoComplete","aria-busy","accessibilityBusy","aria-checked","accessibilityChecked","aria-colcount","accessibilityColumnCount","aria-colindex","accessibilityColumnIndex","aria-colspan","accessibilityColumnSpan","aria-controls","accessibilityControls","aria-current","accessibilityCurrent","aria-describedby","accessibilityDescribedBy","aria-details","accessibilityDetails","aria-disabled","accessibilityDisabled","aria-errormessage","accessibilityErrorMessage","aria-expanded","accessibilityExpanded","aria-flowto","accessibilityFlowTo","aria-haspopup","accessibilityHasPopup","aria-hidden","accessibilityHidden","aria-invalid","accessibilityInvalid","aria-keyshortcuts","accessibilityKeyShortcuts","aria-label","accessibilityLabel","aria-labelledby","accessibilityLabelledBy","aria-level","accessibilityLevel","aria-live","accessibilityLiveRegion","aria-modal","accessibilityModal","aria-multiline","accessibilityMultiline","aria-multiselectable","accessibilityMultiSelectable","aria-orientation","accessibilityOrientation","aria-owns","accessibilityOwns","aria-placeholder","accessibilityPlaceholder","aria-posinset","accessibilityPosInSet","aria-pressed","accessibilityPressed","aria-readonly","accessibilityReadOnly","aria-required","accessibilityRequired","role","accessibilityRole","aria-roledescription","accessibilityRoleDescription","aria-rowcount","accessibilityRowCount","aria-rowindex","accessibilityRowIndex","aria-rowspan","accessibilityRowSpan","aria-selected","accessibilitySelected","aria-setsize","accessibilitySetSize","aria-sort","accessibilitySort","aria-valuemax","accessibilityValueMax","aria-valuemin","accessibilityValueMin","aria-valuenow","accessibilityValueNow","aria-valuetext","accessibilityValueText","dataSet","focusable","id","nativeID","pointerEvents","style","tabIndex","testID"],JM={},ZM=Object.prototype.hasOwnProperty,eD=Array.isArray,tD=/[A-Z]/g;function rD(e){return"-"+e.toLowerCase()}function nD(e){return e.replace(tD,rD)}function Ys(e){return eD(e)?e.join(" "):e}var iD=_c.create({auto:{pointerEvents:"auto"},"box-none":{pointerEvents:"box-none"},"box-only":{pointerEvents:"box-only"},none:{pointerEvents:"none"}}),oD=(e,t,r)=>{t||(t=JM);var n=t,i=n["aria-activedescendant"],o=n.accessibilityActiveDescendant,s=n["aria-atomic"],u=n.accessibilityAtomic,c=n["aria-autocomplete"],f=n.accessibilityAutoComplete,p=n["aria-busy"],g=n.accessibilityBusy,h=n["aria-checked"],m=n.accessibilityChecked,y=n["aria-colcount"],b=n.accessibilityColumnCount,S=n["aria-colindex"],_=n.accessibilityColumnIndex,C=n["aria-colspan"],O=n.accessibilityColumnSpan,R=n["aria-controls"],$=n.accessibilityControls,T=n["aria-current"],P=n.accessibilityCurrent,L=n["aria-describedby"],z=n.accessibilityDescribedBy,B=n["aria-details"],X=n.accessibilityDetails,Y=n["aria-disabled"],N=n.accessibilityDisabled,j=n["aria-errormessage"],F=n.accessibilityErrorMessage,q=n["aria-expanded"],U=n.accessibilityExpanded,M=n["aria-flowto"],G=n.accessibilityFlowTo,K=n["aria-haspopup"],D=n.accessibilityHasPopup,A=n["aria-hidden"],J=n.accessibilityHidden,Z=n["aria-invalid"],ne=n.accessibilityInvalid,W=n["aria-keyshortcuts"],ve=n.accessibilityKeyShortcuts,se=n["aria-label"],Ee=n.accessibilityLabel,we=n["aria-labelledby"],Me=n.accessibilityLabelledBy,Oe=n["aria-level"],je=n.accessibilityLevel,Ae=n["aria-live"],$e=n.accessibilityLiveRegion,Ne=n["aria-modal"],Ie=n.accessibilityModal,Ke=n["aria-multiline"],nt=n.accessibilityMultiline,ze=n["aria-multiselectable"],Ue=n.accessibilityMultiSelectable,Qe=n["aria-orientation"],Ve=n.accessibilityOrientation,ye=n["aria-owns"],Ge=n.accessibilityOwns,ct=n["aria-placeholder"],Lt=n.accessibilityPlaceholder,ht=n["aria-posinset"],Kt=n.accessibilityPosInSet,Ft=n["aria-pressed"],re=n.accessibilityPressed,ie=n["aria-readonly"],ue=n.accessibilityReadOnly,V=n["aria-required"],pe=n.accessibilityRequired;n.role,n.accessibilityRole;var _e=n["aria-roledescription"],De=n.accessibilityRoleDescription,fe=n["aria-rowcount"],he=n.accessibilityRowCount,me=n["aria-rowindex"],Ce=n.accessibilityRowIndex,Te=n["aria-rowspan"],Xe=n.accessibilityRowSpan,it=n["aria-selected"],Je=n.accessibilitySelected,ot=n["aria-setsize"],zr=n.accessibilitySetSize,ft=n["aria-sort"],pt=n.accessibilitySort,wt=n["aria-valuemax"],mt=n.accessibilityValueMax,xt=n["aria-valuemin"],Bt=n.accessibilityValueMin,Jt=n["aria-valuenow"],Tr=n.accessibilityValueNow,Ir=n["aria-valuetext"],Br=n.accessibilityValueText,hn=n.dataSet,gn=n.focusable,An=n.id,Ar=n.nativeID,ri=n.pointerEvents,er=n.style,Vr=n.tabIndex,kn=n.testID,Pe=Cc(n,QM),Co=Y||N,Vt=b$.propsToAriaRole(t),ni=i??o;ni!=null&&(Pe["aria-activedescendant"]=ni);var _o=s!=null?i:u;_o!=null&&(Pe["aria-atomic"]=_o);var Nt=c??f;Nt!=null&&(Pe["aria-autocomplete"]=Nt);var ii=p??g;ii!=null&&(Pe["aria-busy"]=ii);var ki=h??m;ki!=null&&(Pe["aria-checked"]=ki);var Ro=y??b;Ro!=null&&(Pe["aria-colcount"]=Ro);var oi=S??_;oi!=null&&(Pe["aria-colindex"]=oi);var Oo=C??O;Oo!=null&&(Pe["aria-colspan"]=Oo);var Pn=R??$;Pn!=null&&(Pe["aria-controls"]=Ys(Pn));var rn=T??P;rn!=null&&(Pe["aria-current"]=rn);var gr=L??z;gr!=null&&(Pe["aria-describedby"]=Ys(gr));var ai=B??X;ai!=null&&(Pe["aria-details"]=ai),Co===!0&&(Pe["aria-disabled"]=!0,(e==="button"||e==="form"||e==="input"||e==="select"||e==="textarea")&&(Pe.disabled=!0));var dr=j??F;dr!=null&&(Pe["aria-errormessage"]=dr);var Pi=q??U;Pi!=null&&(Pe["aria-expanded"]=Pi);var Hr=M??G;Hr!=null&&(Pe["aria-flowto"]=Ys(Hr));var Mn=K??D;Mn!=null&&(Pe["aria-haspopup"]=Mn);var Ur=A??J;Ur===!0&&(Pe["aria-hidden"]=Ur);var Wr=Z??ne;Wr!=null&&(Pe["aria-invalid"]=Wr);var vn=W??ve;vn!=null&&(Pe["aria-keyshortcuts"]=Ys(vn));var Mi=se??Ee;Mi!=null&&(Pe["aria-label"]=Mi);var $o=we??Me;$o!=null&&(Pe["aria-labelledby"]=Ys($o));var To=Oe??je;To!=null&&(Pe["aria-level"]=To);var si=Ae??$e;si!=null&&(Pe["aria-live"]=si==="none"?"off":si);var Io=Ne??Ie;Io!=null&&(Pe["aria-modal"]=Io);var no=Ke??nt;no!=null&&(Pe["aria-multiline"]=no);var Dn=ze??Ue;Dn!=null&&(Pe["aria-multiselectable"]=Dn);var sa=Qe??Ve;sa!=null&&(Pe["aria-orientation"]=sa);var io=ye??Ge;io!=null&&(Pe["aria-owns"]=Ys(io));var yt=ct??Lt;yt!=null&&(Pe["aria-placeholder"]=yt);var Ao=ht??Kt;Ao!=null&&(Pe["aria-posinset"]=Ao);var ko=Ft??re;ko!=null&&(Pe["aria-pressed"]=ko);var oo=ie??ue;oo!=null&&(Pe["aria-readonly"]=oo,(e==="input"||e==="select"||e==="textarea")&&(Pe.readOnly=!0));var Gr=V??pe;Gr!=null&&(Pe["aria-required"]=Gr,(e==="input"||e==="select"||e==="textarea")&&(Pe.required=pe)),Vt!=null&&(Pe.role=Vt==="none"?"presentation":Vt);var Di=_e??De;Di!=null&&(Pe["aria-roledescription"]=Di);var Po=fe??he;Po!=null&&(Pe["aria-rowcount"]=Po);var Mo=me??Ce;Mo!=null&&(Pe["aria-rowindex"]=Mo);var li=Te??Xe;li!=null&&(Pe["aria-rowspan"]=li);var Gt=it??Je;Gt!=null&&(Pe["aria-selected"]=Gt);var vr=ot??zr;vr!=null&&(Pe["aria-setsize"]=vr);var Cr=ft??pt;Cr!=null&&(Pe["aria-sort"]=Cr);var kr=wt??mt;kr!=null&&(Pe["aria-valuemax"]=kr);var nn=xt??Bt;nn!=null&&(Pe["aria-valuemin"]=nn);var qr=Jt??Tr;qr!=null&&(Pe["aria-valuenow"]=qr);var Do=Ir??Br;if(Do!=null&&(Pe["aria-valuetext"]=Do),hn!=null){for(var ao in hn)if(ZM.call(hn,ao)){var Le=nD(ao),Ze=hn[ao];Ze!=null&&(Pe["data-"+Le]=Ze)}}Vr===0||Vr==="0"||Vr===-1||Vr==="-1"?Pe.tabIndex=Vr:(gn===!1&&(Pe.tabIndex="-1"),e==="a"||e==="button"||e==="input"||e==="select"||e==="textarea"?(gn===!1||N===!0)&&(Pe.tabIndex="-1"):Vt==="button"||Vt==="checkbox"||Vt==="link"||Vt==="radio"||Vt==="textbox"||Vt==="switch"?gn!==!1&&(Pe.tabIndex="0"):gn===!0&&(Pe.tabIndex="0"));var $t=_c([er,ri&&iD[ri]],de({writingDirection:"ltr"},r)),Pt=$t[0],Tt=$t[1];Pt&&(Pe.className=Pt),Tt&&(Pe.style=Tt);var Lo=An??Ar;return Lo!=null&&(Pe.id=Lo),kn!=null&&(Pe["data-testid"]=kn),Pe.type==null&&e==="button"&&(Pe.type="button"),Pe},Bg={exports:{}},vt={},px;function aD(){if(px)return vt;px=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function h(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,b={};function S(D,A,J){this.props=D,this.context=A,this.refs=b,this.updater=J||m}S.prototype.isReactComponent={},S.prototype.setState=function(D,A){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,A,"setState")},S.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function _(){}_.prototype=S.prototype;function C(D,A,J){this.props=D,this.context=A,this.refs=b,this.updater=J||m}var O=C.prototype=new _;O.constructor=C,y(O,S.prototype),O.isPureReactComponent=!0;var R=Array.isArray,$=Object.prototype.hasOwnProperty,T={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function L(D,A,J){var Z,ne={},W=null,ve=null;if(A!=null)for(Z in A.ref!==void 0&&(ve=A.ref),A.key!==void 0&&(W=""+A.key),A)$.call(A,Z)&&!P.hasOwnProperty(Z)&&(ne[Z]=A[Z]);var se=arguments.length-2;if(se===1)ne.children=J;else if(1<se){for(var Ee=Array(se),we=0;we<se;we++)Ee[we]=arguments[we+2];ne.children=Ee}if(D&&D.defaultProps)for(Z in se=D.defaultProps,se)ne[Z]===void 0&&(ne[Z]=se[Z]);return{$$typeof:e,type:D,key:W,ref:ve,props:ne,_owner:T.current}}function z(D,A){return{$$typeof:e,type:D.type,key:A,ref:D.ref,props:D.props,_owner:D._owner}}function B(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function X(D){var A={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(J){return A[J]})}var Y=/\/+/g;function N(D,A){return typeof D=="object"&&D!==null&&D.key!=null?X(""+D.key):A.toString(36)}function j(D,A,J,Z,ne){var W=typeof D;(W==="undefined"||W==="boolean")&&(D=null);var ve=!1;if(D===null)ve=!0;else switch(W){case"string":case"number":ve=!0;break;case"object":switch(D.$$typeof){case e:case t:ve=!0}}if(ve)return ve=D,ne=ne(ve),D=Z===""?"."+N(ve,0):Z,R(ne)?(J="",D!=null&&(J=D.replace(Y,"$&/")+"/"),j(ne,A,J,"",function(we){return we})):ne!=null&&(B(ne)&&(ne=z(ne,J+(!ne.key||ve&&ve.key===ne.key?"":(""+ne.key).replace(Y,"$&/")+"/")+D)),A.push(ne)),1;if(ve=0,Z=Z===""?".":Z+":",R(D))for(var se=0;se<D.length;se++){W=D[se];var Ee=Z+N(W,se);ve+=j(W,A,J,Ee,ne)}else if(Ee=h(D),typeof Ee=="function")for(D=Ee.call(D),se=0;!(W=D.next()).done;)W=W.value,Ee=Z+N(W,se++),ve+=j(W,A,J,Ee,ne);else if(W==="object")throw A=String(D),Error("Objects are not valid as a React child (found: "+(A==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":A)+"). If you meant to render a collection of children, use an array instead.");return ve}function F(D,A,J){if(D==null)return D;var Z=[],ne=0;return j(D,Z,"","",function(W){return A.call(J,W,ne++)}),Z}function q(D){if(D._status===-1){var A=D._result;A=A(),A.then(function(J){(D._status===0||D._status===-1)&&(D._status=1,D._result=J)},function(J){(D._status===0||D._status===-1)&&(D._status=2,D._result=J)}),D._status===-1&&(D._status=0,D._result=A)}if(D._status===1)return D._result.default;throw D._result}var U={current:null},M={transition:null},G={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:M,ReactCurrentOwner:T};function K(){throw Error("act(...) is not supported in production builds of React.")}return vt.Children={map:F,forEach:function(D,A,J){F(D,function(){A.apply(this,arguments)},J)},count:function(D){var A=0;return F(D,function(){A++}),A},toArray:function(D){return F(D,function(A){return A})||[]},only:function(D){if(!B(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},vt.Component=S,vt.Fragment=r,vt.Profiler=i,vt.PureComponent=C,vt.StrictMode=n,vt.Suspense=c,vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,vt.act=K,vt.cloneElement=function(D,A,J){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var Z=y({},D.props),ne=D.key,W=D.ref,ve=D._owner;if(A!=null){if(A.ref!==void 0&&(W=A.ref,ve=T.current),A.key!==void 0&&(ne=""+A.key),D.type&&D.type.defaultProps)var se=D.type.defaultProps;for(Ee in A)$.call(A,Ee)&&!P.hasOwnProperty(Ee)&&(Z[Ee]=A[Ee]===void 0&&se!==void 0?se[Ee]:A[Ee])}var Ee=arguments.length-2;if(Ee===1)Z.children=J;else if(1<Ee){se=Array(Ee);for(var we=0;we<Ee;we++)se[we]=arguments[we+2];Z.children=se}return{$$typeof:e,type:D.type,key:ne,ref:W,props:Z,_owner:ve}},vt.createContext=function(D){return D={$$typeof:s,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:o,_context:D},D.Consumer=D},vt.createElement=L,vt.createFactory=function(D){var A=L.bind(null,D);return A.type=D,A},vt.createRef=function(){return{current:null}},vt.forwardRef=function(D){return{$$typeof:u,render:D}},vt.isValidElement=B,vt.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:q}},vt.memo=function(D,A){return{$$typeof:f,type:D,compare:A===void 0?null:A}},vt.startTransition=function(D){var A=M.transition;M.transition={};try{D()}finally{M.transition=A}},vt.unstable_act=K,vt.useCallback=function(D,A){return U.current.useCallback(D,A)},vt.useContext=function(D){return U.current.useContext(D)},vt.useDebugValue=function(){},vt.useDeferredValue=function(D){return U.current.useDeferredValue(D)},vt.useEffect=function(D,A){return U.current.useEffect(D,A)},vt.useId=function(){return U.current.useId()},vt.useImperativeHandle=function(D,A,J){return U.current.useImperativeHandle(D,A,J)},vt.useInsertionEffect=function(D,A){return U.current.useInsertionEffect(D,A)},vt.useLayoutEffect=function(D,A){return U.current.useLayoutEffect(D,A)},vt.useMemo=function(D,A){return U.current.useMemo(D,A)},vt.useReducer=function(D,A,J){return U.current.useReducer(D,A,J)},vt.useRef=function(D){return U.current.useRef(D)},vt.useState=function(D){return U.current.useState(D)},vt.useSyncExternalStore=function(D,A,J){return U.current.useSyncExternalStore(D,A,J)},vt.useTransition=function(){return U.current.useTransition()},vt.version="18.3.1",vt}var hx;function s1(){return hx||(hx=1,Bg.exports=aD()),Bg.exports}var x=s1();const te=Nr(x),Tp=k5({__proto__:null,default:te},[x]);var sD=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gx=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","far","glk","he","iw","khw","ks","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]),vx=new Map;function lD(e){var t=vx.get(e);if(t)return t;var r=!1;if(Intl.Locale)try{var n=new Intl.Locale(e).maximize().script;r=sD.has(n)}catch{var i=e.split("-")[0];r=gx.has(i)}else{var o=e.split("-")[0];r=gx.has(o)}return vx.set(e,r),r}var uD={direction:"ltr",locale:"en-US"},j$=x.createContext(uD);function z$(e){return lD(e)?"rtl":"ltr"}function cD(e){var t=e.direction,r=e.locale,n=e.children,i=t||r;return i?te.createElement(j$.Provider,{children:n,value:{direction:r?z$(r):t,locale:r}}):n}function fD(){return x.useContext(j$)}var dD=(e,t,r)=>{var n;e&&e.constructor===String&&(n=b$.propsToAccessibilityComponent(t));var i=n||e,o=oD(i,t,r),s=te.createElement(i,o),u=o.dir?te.createElement(cD,{children:s,direction:o.dir,locale:o.lang}):s;return u},Zf={},Vg={exports:{}},xn={},Hg={exports:{}},Ug={},mx;function pD(){return mx||(mx=1,(function(e){function t(M,G){var K=M.length;M.push(G);e:for(;0<K;){var D=K-1>>>1,A=M[D];if(0<i(A,G))M[D]=G,M[K]=A,K=D;else break e}}function r(M){return M.length===0?null:M[0]}function n(M){if(M.length===0)return null;var G=M[0],K=M.pop();if(K!==G){M[0]=K;e:for(var D=0,A=M.length,J=A>>>1;D<J;){var Z=2*(D+1)-1,ne=M[Z],W=Z+1,ve=M[W];if(0>i(ne,K))W<A&&0>i(ve,ne)?(M[D]=ve,M[W]=K,D=W):(M[D]=ne,M[Z]=K,D=Z);else if(W<A&&0>i(ve,K))M[D]=ve,M[W]=K,D=W;else break e}}return G}function i(M,G){var K=M.sortIndex-G.sortIndex;return K!==0?K:M.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],f=[],p=1,g=null,h=3,m=!1,y=!1,b=!1,S=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(M){for(var G=r(f);G!==null;){if(G.callback===null)n(f);else if(G.startTime<=M)n(f),G.sortIndex=G.expirationTime,t(c,G);else break;G=r(f)}}function R(M){if(b=!1,O(M),!y)if(r(c)!==null)y=!0,q($);else{var G=r(f);G!==null&&U(R,G.startTime-M)}}function $(M,G){y=!1,b&&(b=!1,_(L),L=-1),m=!0;var K=h;try{for(O(G),g=r(c);g!==null&&(!(g.expirationTime>G)||M&&!X());){var D=g.callback;if(typeof D=="function"){g.callback=null,h=g.priorityLevel;var A=D(g.expirationTime<=G);G=e.unstable_now(),typeof A=="function"?g.callback=A:g===r(c)&&n(c),O(G)}else n(c);g=r(c)}if(g!==null)var J=!0;else{var Z=r(f);Z!==null&&U(R,Z.startTime-G),J=!1}return J}finally{g=null,h=K,m=!1}}var T=!1,P=null,L=-1,z=5,B=-1;function X(){return!(e.unstable_now()-B<z)}function Y(){if(P!==null){var M=e.unstable_now();B=M;var G=!0;try{G=P(!0,M)}finally{G?N():(T=!1,P=null)}}else T=!1}var N;if(typeof C=="function")N=function(){C(Y)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,F=j.port2;j.port1.onmessage=Y,N=function(){F.postMessage(null)}}else N=function(){S(Y,0)};function q(M){P=M,T||(T=!0,N())}function U(M,G){L=S(function(){M(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_continueExecution=function(){y||m||(y=!0,q($))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(M){switch(h){case 1:case 2:case 3:var G=3;break;default:G=h}var K=h;h=G;try{return M()}finally{h=K}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,G){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var K=h;h=M;try{return G()}finally{h=K}},e.unstable_scheduleCallback=function(M,G,K){var D=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?D+K:D):K=D,M){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=K+A,M={id:p++,callback:G,priorityLevel:M,startTime:K,expirationTime:A,sortIndex:-1},K>D?(M.sortIndex=K,t(f,M),r(c)===null&&M===r(f)&&(b?(_(L),L=-1):b=!0,U(R,K-D))):(M.sortIndex=A,t(c,M),y||m||(y=!0,q($))),M},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(M){var G=h;return function(){var K=h;h=G;try{return M.apply(this,arguments)}finally{h=K}}}})(Ug)),Ug}var yx;function hD(){return yx||(yx=1,Hg.exports=pD()),Hg.exports}var bx;function gD(){if(bx)return xn;bx=1;var e=s1(),t=hD();function r(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function o(a,l){s(a,l),s(a+"Capture",l)}function s(a,l){for(i[a]=l,a=0;a<l.length;a++)n.add(l[a])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,f=/^[: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]*$/,p={},g={};function h(a){return c.call(g,a)?!0:c.call(p,a)?!1:f.test(a)?g[a]=!0:(p[a]=!0,!1)}function m(a,l,d,v){if(d!==null&&d.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return v?!1:d!==null?!d.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function y(a,l,d,v){if(l===null||typeof l>"u"||m(a,l,d,v))return!0;if(v)return!1;if(d!==null)switch(d.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function b(a,l,d,v,w,E,I){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=v,this.attributeNamespace=w,this.mustUseProperty=d,this.propertyName=a,this.type=l,this.sanitizeURL=E,this.removeEmptyString=I}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){S[a]=new b(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var l=a[0];S[l]=new b(l,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){S[a]=new b(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){S[a]=new b(a,2,!1,a,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(a){S[a]=new b(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){S[a]=new b(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){S[a]=new b(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){S[a]=new b(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){S[a]=new b(a,5,!1,a.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function C(a){return a[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(a){var l=a.replace(_,C);S[l]=new b(l,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var l=a.replace(_,C);S[l]=new b(l,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var l=a.replace(_,C);S[l]=new b(l,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){S[a]=new b(a,1,!1,a.toLowerCase(),null,!1,!1)}),S.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){S[a]=new b(a,1,!1,a.toLowerCase(),null,!0,!0)});function O(a,l,d,v){var w=S.hasOwnProperty(l)?S[l]:null;(w!==null?w.type!==0:v||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(y(l,d,w,v)&&(d=null),v||w===null?h(l)&&(d===null?a.removeAttribute(l):a.setAttribute(l,""+d)):w.mustUseProperty?a[w.propertyName]=d===null?w.type===3?!1:"":d:(l=w.attributeName,v=w.attributeNamespace,d===null?a.removeAttribute(l):(w=w.type,d=w===3||w===4&&d===!0?"":""+d,v?a.setAttributeNS(v,l,d):a.setAttribute(l,d))))}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$=Symbol.for("react.element"),T=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),X=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),U=Symbol.for("react.offscreen"),M=Symbol.iterator;function G(a){return a===null||typeof a!="object"?null:(a=M&&a[M]||a["@@iterator"],typeof a=="function"?a:null)}var K=Object.assign,D;function A(a){if(D===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);D=l&&l[1]||""}return`
5
5
  `+D+a}var J=!1;function Z(a,l){if(!a||J)return"";J=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(ce){var v=ce}Reflect.construct(a,[],l)}else{try{l.call()}catch(ce){v=ce}a.call(l.prototype)}else{try{throw Error()}catch(ce){v=ce}a()}}catch(ce){if(ce&&v&&typeof ce.stack=="string"){for(var w=ce.stack.split(`
6
6
  `),E=v.stack.split(`
7
7
  `),I=w.length-1,H=E.length-1;1<=I&&0<=H&&w[I]!==E[H];)H--;for(;1<=I&&0<=H;I--,H--)if(w[I]!==E[H]){if(I!==1||H!==1)do if(I--,H--,0>H||w[I]!==E[H]){var Q=`
8
- `+w[I].replace(" at new "," at ");return a.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",a.displayName)),Q}while(1<=I&&0<=H);break}}}finally{J=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?A(a):""}function ne(a){switch(a.tag){case 5:return A(a.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return a=Z(a.type,!1),a;case 11:return a=Z(a.type.render,!1),a;case 1:return a=Z(a.type,!0),a;default:return""}}function W(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case P:return"Fragment";case T:return"Portal";case z:return"Profiler";case L:return"StrictMode";case N:return"Suspense";case j:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case X:return(a.displayName||"Context")+".Consumer";case B:return(a._context.displayName||"Context")+".Provider";case Y:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case F:return l=a.displayName||null,l!==null?l:W(a.type)||"Memo";case q:l=a._payload,a=a._init;try{return W(a(l))}catch{}}return null}function ve(a){var l=a.type;switch(a.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=l.render,a=a.displayName||a.name||"",l.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W(l);case 8:return l===L?"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 l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function se(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Ee(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function we(a){var l=Ee(a)?"checked":"value",d=Object.getOwnPropertyDescriptor(a.constructor.prototype,l),v=""+a[l];if(!a.hasOwnProperty(l)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var w=d.get,E=d.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return w.call(this)},set:function(I){v=""+I,E.call(this,I)}}),Object.defineProperty(a,l,{enumerable:d.enumerable}),{getValue:function(){return v},setValue:function(I){v=""+I},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function Me(a){a._valueTracker||(a._valueTracker=we(a))}function Oe(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var d=l.getValue(),v="";return a&&(v=Ee(a)?a.checked?"true":"false":a.value),a=v,a!==d?(l.setValue(a),!0):!1}function je(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Ae(a,l){var d=l.checked;return K({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??a._wrapperState.initialChecked})}function $e(a,l){var d=l.defaultValue==null?"":l.defaultValue,v=l.checked!=null?l.checked:l.defaultChecked;d=se(l.value!=null?l.value:d),a._wrapperState={initialChecked:v,initialValue:d,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function Ne(a,l){l=l.checked,l!=null&&O(a,"checked",l,!1)}function Ie(a,l){Ne(a,l);var d=se(l.value),v=l.type;if(d!=null)v==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+d):a.value!==""+d&&(a.value=""+d);else if(v==="submit"||v==="reset"){a.removeAttribute("value");return}l.hasOwnProperty("value")?nt(a,l.type,d):l.hasOwnProperty("defaultValue")&&nt(a,l.type,se(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(a.defaultChecked=!!l.defaultChecked)}function Ke(a,l,d){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var v=l.type;if(!(v!=="submit"&&v!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+a._wrapperState.initialValue,d||l===a.value||(a.value=l),a.defaultValue=l}d=a.name,d!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,d!==""&&(a.name=d)}function nt(a,l,d){(l!=="number"||je(a.ownerDocument)!==a)&&(d==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+d&&(a.defaultValue=""+d))}var ze=Array.isArray;function Ue(a,l,d,v){if(a=a.options,l){l={};for(var w=0;w<d.length;w++)l["$"+d[w]]=!0;for(d=0;d<a.length;d++)w=l.hasOwnProperty("$"+a[d].value),a[d].selected!==w&&(a[d].selected=w),w&&v&&(a[d].defaultSelected=!0)}else{for(d=""+se(d),l=null,w=0;w<a.length;w++){if(a[w].value===d){a[w].selected=!0,v&&(a[w].defaultSelected=!0);return}l!==null||a[w].disabled||(l=a[w])}l!==null&&(l.selected=!0)}}function Qe(a,l){if(l.dangerouslySetInnerHTML!=null)throw Error(r(91));return K({},l,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Ve(a,l){var d=l.value;if(d==null){if(d=l.children,l=l.defaultValue,d!=null){if(l!=null)throw Error(r(92));if(ze(d)){if(1<d.length)throw Error(r(93));d=d[0]}l=d}l==null&&(l=""),d=l}a._wrapperState={initialValue:se(d)}}function ye(a,l){var d=se(l.value),v=se(l.defaultValue);d!=null&&(d=""+d,d!==a.value&&(a.value=d),l.defaultValue==null&&a.defaultValue!==d&&(a.defaultValue=d)),v!=null&&(a.defaultValue=""+v)}function Ge(a){var l=a.textContent;l===a._wrapperState.initialValue&&l!==""&&l!==null&&(a.value=l)}function ct(a){switch(a){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Lt(a,l){return a==null||a==="http://www.w3.org/1999/xhtml"?ct(l):a==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var ht,Kt=(function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,d,v,w){MSApp.execUnsafeLocalFunction(function(){return a(l,d,v,w)})}:a})(function(a,l){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=l;else{for(ht=ht||document.createElement("div"),ht.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=ht.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}});function Ft(a,l){if(l){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=l;return}}a.textContent=l}var re={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},ie=["Webkit","ms","Moz","O"];Object.keys(re).forEach(function(a){ie.forEach(function(l){l=l+a.charAt(0).toUpperCase()+a.substring(1),re[l]=re[a]})});function ue(a,l,d){return l==null||typeof l=="boolean"||l===""?"":d||typeof l!="number"||l===0||re.hasOwnProperty(a)&&re[a]?(""+l).trim():l+"px"}function V(a,l){a=a.style;for(var d in l)if(l.hasOwnProperty(d)){var v=d.indexOf("--")===0,w=ue(d,l[d],v);d==="float"&&(d="cssFloat"),v?a.setProperty(d,w):a[d]=w}}var pe=K({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 _e(a,l){if(l){if(pe[a]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,a));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function De(a,l){if(a.indexOf("-")===-1)return typeof l.is=="string";switch(a){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 fe=null;function he(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var me=null,Ce=null,Te=null;function Xe(a){if(a=au(a)){if(typeof me!="function")throw Error(r(280));var l=a.stateNode;l&&(l=ef(l),me(a.stateNode,a.type,l))}}function it(a){Ce?Te?Te.push(a):Te=[a]:Ce=a}function Je(){if(Ce){var a=Ce,l=Te;if(Te=Ce=null,Xe(a),l)for(a=0;a<l.length;a++)Xe(l[a])}}function ot(a,l){return a(l)}function zr(){}var ft=!1;function pt(a,l,d){if(ft)return a(l,d);ft=!0;try{return ot(a,l,d)}finally{ft=!1,(Ce!==null||Te!==null)&&(zr(),Je())}}function wt(a,l){var d=a.stateNode;if(d===null)return null;var v=ef(d);if(v===null)return null;d=v[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(a=a.type,v=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!v;break e;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var mt=!1;if(u)try{var xt={};Object.defineProperty(xt,"passive",{get:function(){mt=!0}}),window.addEventListener("test",xt,xt),window.removeEventListener("test",xt,xt)}catch{mt=!1}function Bt(a,l,d,v,w,E,I,H,Q){var ce=Array.prototype.slice.call(arguments,3);try{l.apply(d,ce)}catch(Se){this.onError(Se)}}var Jt=!1,Tr=null,Ir=!1,Br=null,hn={onError:function(a){Jt=!0,Tr=a}};function gn(a,l,d,v,w,E,I,H,Q){Jt=!1,Tr=null,Bt.apply(hn,arguments)}function An(a,l,d,v,w,E,I,H,Q){if(gn.apply(this,arguments),Jt){if(Jt){var ce=Tr;Jt=!1,Tr=null}else throw Error(r(198));Ir||(Ir=!0,Br=ce)}}function Ar(a){var l=a,d=a;if(a.alternate)for(;l.return;)l=l.return;else{a=l;do l=a,(l.flags&4098)!==0&&(d=l.return),a=l.return;while(a)}return l.tag===3?d:null}function ri(a){if(a.tag===13){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function er(a){if(Ar(a)!==a)throw Error(r(188))}function Vr(a){var l=a.alternate;if(!l){if(l=Ar(a),l===null)throw Error(r(188));return l!==a?null:a}for(var d=a,v=l;;){var w=d.return;if(w===null)break;var E=w.alternate;if(E===null){if(v=w.return,v!==null){d=v;continue}break}if(w.child===E.child){for(E=w.child;E;){if(E===d)return er(w),a;if(E===v)return er(w),l;E=E.sibling}throw Error(r(188))}if(d.return!==v.return)d=w,v=E;else{for(var I=!1,H=w.child;H;){if(H===d){I=!0,d=w,v=E;break}if(H===v){I=!0,v=w,d=E;break}H=H.sibling}if(!I){for(H=E.child;H;){if(H===d){I=!0,d=E,v=w;break}if(H===v){I=!0,v=E,d=w;break}H=H.sibling}if(!I)throw Error(r(189))}}if(d.alternate!==v)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?a:l}function kn(a){return a=Vr(a),a!==null?Pe(a):null}function Pe(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var l=Pe(a);if(l!==null)return l;a=a.sibling}return null}var Co=t.unstable_scheduleCallback,Vt=t.unstable_cancelCallback,ni=t.unstable_shouldYield,_o=t.unstable_requestPaint,Nt=t.unstable_now,ii=t.unstable_getCurrentPriorityLevel,ki=t.unstable_ImmediatePriority,Ro=t.unstable_UserBlockingPriority,oi=t.unstable_NormalPriority,Oo=t.unstable_LowPriority,Pn=t.unstable_IdlePriority,rn=null,gr=null;function ai(a){if(gr&&typeof gr.onCommitFiberRoot=="function")try{gr.onCommitFiberRoot(rn,a,void 0,(a.current.flags&128)===128)}catch{}}var dr=Math.clz32?Math.clz32:Mn,Pi=Math.log,Hr=Math.LN2;function Mn(a){return a>>>=0,a===0?32:31-(Pi(a)/Hr|0)|0}var Ur=64,Wr=4194304;function vn(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Mi(a,l){var d=a.pendingLanes;if(d===0)return 0;var v=0,w=a.suspendedLanes,E=a.pingedLanes,I=d&268435455;if(I!==0){var H=I&~w;H!==0?v=vn(H):(E&=I,E!==0&&(v=vn(E)))}else I=d&~w,I!==0?v=vn(I):E!==0&&(v=vn(E));if(v===0)return 0;if(l!==0&&l!==v&&(l&w)===0&&(w=v&-v,E=l&-l,w>=E||w===16&&(E&4194240)!==0))return l;if((v&4)!==0&&(v|=d&16),l=a.entangledLanes,l!==0)for(a=a.entanglements,l&=v;0<l;)d=31-dr(l),w=1<<d,v|=a[d],l&=~w;return v}function $o(a,l){switch(a){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function To(a,l){for(var d=a.suspendedLanes,v=a.pingedLanes,w=a.expirationTimes,E=a.pendingLanes;0<E;){var I=31-dr(E),H=1<<I,Q=w[I];Q===-1?((H&d)===0||(H&v)!==0)&&(w[I]=$o(H,l)):Q<=l&&(a.expiredLanes|=H),E&=~H}}function si(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function Io(){var a=Ur;return Ur<<=1,(Ur&4194240)===0&&(Ur=64),a}function no(a){for(var l=[],d=0;31>d;d++)l.push(a);return l}function Dn(a,l,d){a.pendingLanes|=l,l!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,l=31-dr(l),a[l]=d}function sa(a,l){var d=a.pendingLanes&~l;a.pendingLanes=l,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=l,a.mutableReadLanes&=l,a.entangledLanes&=l,l=a.entanglements;var v=a.eventTimes;for(a=a.expirationTimes;0<d;){var w=31-dr(d),E=1<<w;l[w]=0,v[w]=-1,a[w]=-1,d&=~E}}function io(a,l){var d=a.entangledLanes|=l;for(a=a.entanglements;d;){var v=31-dr(d),w=1<<v;w&l|a[v]&l&&(a[v]|=l),d&=~w}}var yt=0;function Ao(a){return a&=-a,1<a?4<a?(a&268435455)!==0?16:536870912:4:1}var ko,oo,Gr,Di,Po,Mo=!1,li=[],Gt=null,vr=null,Er=null,kr=new Map,nn=new Map,qr=[],Do="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ao(a,l){switch(a){case"focusin":case"focusout":Gt=null;break;case"dragenter":case"dragleave":vr=null;break;case"mouseover":case"mouseout":Er=null;break;case"pointerover":case"pointerout":kr.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":nn.delete(l.pointerId)}}function Le(a,l,d,v,w,E){return a===null||a.nativeEvent!==E?(a={blockedOn:l,domEventName:d,eventSystemFlags:v,nativeEvent:E,targetContainers:[w]},l!==null&&(l=au(l),l!==null&&oo(l)),a):(a.eventSystemFlags|=v,l=a.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),a)}function Ze(a,l,d,v,w){switch(l){case"focusin":return Gt=Le(Gt,a,l,d,v,w),!0;case"dragenter":return vr=Le(vr,a,l,d,v,w),!0;case"mouseover":return Er=Le(Er,a,l,d,v,w),!0;case"pointerover":var E=w.pointerId;return kr.set(E,Le(kr.get(E)||null,a,l,d,v,w)),!0;case"gotpointercapture":return E=w.pointerId,nn.set(E,Le(nn.get(E)||null,a,l,d,v,w)),!0}return!1}function $t(a){var l=Ha(a.target);if(l!==null){var d=Ar(l);if(d!==null){if(l=d.tag,l===13){if(l=ri(d),l!==null){a.blockedOn=l,Po(a.priority,function(){Gr(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Pt(a){if(a.blockedOn!==null)return!1;for(var l=a.targetContainers;0<l.length;){var d=rh(a.domEventName,a.eventSystemFlags,l[0],a.nativeEvent);if(d===null){d=a.nativeEvent;var v=new d.constructor(d.type,d);fe=v,d.target.dispatchEvent(v),fe=null}else return l=au(d),l!==null&&oo(l),a.blockedOn=d,!1;l.shift()}return!0}function Tt(a,l,d){Pt(a)&&d.delete(l)}function Lo(){Mo=!1,Gt!==null&&Pt(Gt)&&(Gt=null),vr!==null&&Pt(vr)&&(vr=null),Er!==null&&Pt(Er)&&(Er=null),kr.forEach(Tt),nn.forEach(Tt)}function Fo(a,l){a.blockedOn===l&&(a.blockedOn=null,Mo||(Mo=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Lo)))}function la(a){function l(w){return Fo(w,a)}if(0<li.length){Fo(li[0],a);for(var d=1;d<li.length;d++){var v=li[d];v.blockedOn===a&&(v.blockedOn=null)}}for(Gt!==null&&Fo(Gt,a),vr!==null&&Fo(vr,a),Er!==null&&Fo(Er,a),kr.forEach(l),nn.forEach(l),d=0;d<qr.length;d++)v=qr[d],v.blockedOn===a&&(v.blockedOn=null);for(;0<qr.length&&(d=qr[0],d.blockedOn===null);)$t(d),d.blockedOn===null&&qr.shift()}var Li=R.ReactCurrentBatchConfig,Bc=!0;function nk(a,l,d,v){var w=yt,E=Li.transition;Li.transition=null;try{yt=1,th(a,l,d,v)}finally{yt=w,Li.transition=E}}function ik(a,l,d,v){var w=yt,E=Li.transition;Li.transition=null;try{yt=4,th(a,l,d,v)}finally{yt=w,Li.transition=E}}function th(a,l,d,v){if(Bc){var w=rh(a,l,d,v);if(w===null)bh(a,l,v,Vc,d),ao(a,v);else if(Ze(w,a,l,d,v))v.stopPropagation();else if(ao(a,v),l&4&&-1<Do.indexOf(a)){for(;w!==null;){var E=au(w);if(E!==null&&ko(E),E=rh(a,l,d,v),E===null&&bh(a,l,v,Vc,d),E===w)break;w=E}w!==null&&v.stopPropagation()}else bh(a,l,v,null,d)}}var Vc=null;function rh(a,l,d,v){if(Vc=null,a=he(v),a=Ha(a),a!==null)if(l=Ar(a),l===null)a=null;else if(d=l.tag,d===13){if(a=ri(l),a!==null)return a;a=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;a=null}else l!==a&&(a=null);return Vc=a,null}function _b(a){switch(a){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ii()){case ki:return 1;case Ro:return 4;case oi:case Oo:return 16;case Pn:return 536870912;default:return 16}default:return 16}}var ua=null,nh=null,Hc=null;function Rb(){if(Hc)return Hc;var a,l=nh,d=l.length,v,w="value"in ua?ua.value:ua.textContent,E=w.length;for(a=0;a<d&&l[a]===w[a];a++);var I=d-a;for(v=1;v<=I&&l[d-v]===w[E-v];v++);return Hc=w.slice(a,1<v?1-v:void 0)}function Uc(a){var l=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&l===13&&(a=13)):a=l,a===10&&(a=13),32<=a||a===13?a:0}function Wc(){return!0}function Ob(){return!1}function Ln(a){function l(d,v,w,E,I){this._reactName=d,this._targetInst=w,this.type=v,this.nativeEvent=E,this.target=I,this.currentTarget=null;for(var H in a)a.hasOwnProperty(H)&&(d=a[H],this[H]=d?d(E):E[H]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?Wc:Ob,this.isPropagationStopped=Ob,this}return K(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Wc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Wc)},persist:function(){},isPersistent:Wc}),l}var Ts={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ih=Ln(Ts),Kl=K({},Ts,{view:0,detail:0}),ok=Ln(Kl),oh,ah,Yl,Gc=K({},Kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lh,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Yl&&(Yl&&a.type==="mousemove"?(oh=a.screenX-Yl.screenX,ah=a.screenY-Yl.screenY):ah=oh=0,Yl=a),oh)},movementY:function(a){return"movementY"in a?a.movementY:ah}}),$b=Ln(Gc),ak=K({},Gc,{dataTransfer:0}),sk=Ln(ak),lk=K({},Kl,{relatedTarget:0}),sh=Ln(lk),uk=K({},Ts,{animationName:0,elapsedTime:0,pseudoElement:0}),ck=Ln(uk),fk=K({},Ts,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),dk=Ln(fk),pk=K({},Ts,{data:0}),Tb=Ln(pk),hk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},vk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mk(a){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(a):(a=vk[a])?!!l[a]:!1}function lh(){return mk}var yk=K({},Kl,{key:function(a){if(a.key){var l=hk[a.key]||a.key;if(l!=="Unidentified")return l}return a.type==="keypress"?(a=Uc(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?gk[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lh,charCode:function(a){return a.type==="keypress"?Uc(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Uc(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),bk=Ln(yk),Sk=K({},Gc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ib=Ln(Sk),wk=K({},Kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lh}),xk=Ln(wk),Ek=K({},Ts,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ck=Ln(Ek),_k=K({},Gc,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Rk=Ln(_k),Ok=[9,13,27,32],uh=u&&"CompositionEvent"in window,Ql=null;u&&"documentMode"in document&&(Ql=document.documentMode);var $k=u&&"TextEvent"in window&&!Ql,Ab=u&&(!uh||Ql&&8<Ql&&11>=Ql),kb=" ",Pb=!1;function Mb(a,l){switch(a){case"keyup":return Ok.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Db(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Is=!1;function Tk(a,l){switch(a){case"compositionend":return Db(l);case"keypress":return l.which!==32?null:(Pb=!0,kb);case"textInput":return a=l.data,a===kb&&Pb?null:a;default:return null}}function Ik(a,l){if(Is)return a==="compositionend"||!uh&&Mb(a,l)?(a=Rb(),Hc=nh=ua=null,Is=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Ab&&l.locale!=="ko"?null:l.data;default:return null}}var Ak={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Lb(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l==="input"?!!Ak[a.type]:l==="textarea"}function Fb(a,l,d,v){it(v),l=Qc(l,"onChange"),0<l.length&&(d=new ih("onChange","change",null,d,v),a.push({event:d,listeners:l}))}var Jl=null,Zl=null;function kk(a){tS(a,0)}function qc(a){var l=Ds(a);if(Oe(l))return a}function Pk(a,l){if(a==="change")return l}var Nb=!1;if(u){var ch;if(u){var fh="oninput"in document;if(!fh){var jb=document.createElement("div");jb.setAttribute("oninput","return;"),fh=typeof jb.oninput=="function"}ch=fh}else ch=!1;Nb=ch&&(!document.documentMode||9<document.documentMode)}function zb(){Jl&&(Jl.detachEvent("onpropertychange",Bb),Zl=Jl=null)}function Bb(a){if(a.propertyName==="value"&&qc(Zl)){var l=[];Fb(l,Zl,a,he(a)),pt(kk,l)}}function Mk(a,l,d){a==="focusin"?(zb(),Jl=l,Zl=d,Jl.attachEvent("onpropertychange",Bb)):a==="focusout"&&zb()}function Dk(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return qc(Zl)}function Lk(a,l){if(a==="click")return qc(l)}function Fk(a,l){if(a==="input"||a==="change")return qc(l)}function Nk(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var Fi=typeof Object.is=="function"?Object.is:Nk;function eu(a,l){if(Fi(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;var d=Object.keys(a),v=Object.keys(l);if(d.length!==v.length)return!1;for(v=0;v<d.length;v++){var w=d[v];if(!c.call(l,w)||!Fi(a[w],l[w]))return!1}return!0}function Vb(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Hb(a,l){var d=Vb(a);a=0;for(var v;d;){if(d.nodeType===3){if(v=a+d.textContent.length,a<=l&&v>=l)return{node:d,offset:l-a};a=v}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Vb(d)}}function Ub(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?Ub(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function Wb(){for(var a=window,l=je();l instanceof a.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)a=l.contentWindow;else break;l=je(a.document)}return l}function dh(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}function jk(a){var l=Wb(),d=a.focusedElem,v=a.selectionRange;if(l!==d&&d&&d.ownerDocument&&Ub(d.ownerDocument.documentElement,d)){if(v!==null&&dh(d)){if(l=v.start,a=v.end,a===void 0&&(a=l),"selectionStart"in d)d.selectionStart=l,d.selectionEnd=Math.min(a,d.value.length);else if(a=(l=d.ownerDocument||document)&&l.defaultView||window,a.getSelection){a=a.getSelection();var w=d.textContent.length,E=Math.min(v.start,w);v=v.end===void 0?E:Math.min(v.end,w),!a.extend&&E>v&&(w=v,v=E,E=w),w=Hb(d,E);var I=Hb(d,v);w&&I&&(a.rangeCount!==1||a.anchorNode!==w.node||a.anchorOffset!==w.offset||a.focusNode!==I.node||a.focusOffset!==I.offset)&&(l=l.createRange(),l.setStart(w.node,w.offset),a.removeAllRanges(),E>v?(a.addRange(l),a.extend(I.node,I.offset)):(l.setEnd(I.node,I.offset),a.addRange(l)))}}for(l=[],a=d;a=a.parentNode;)a.nodeType===1&&l.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<l.length;d++)a=l[d],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var zk=u&&"documentMode"in document&&11>=document.documentMode,As=null,ph=null,tu=null,hh=!1;function Gb(a,l,d){var v=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;hh||As==null||As!==je(v)||(v=As,"selectionStart"in v&&dh(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),tu&&eu(tu,v)||(tu=v,v=Qc(ph,"onSelect"),0<v.length&&(l=new ih("onSelect","select",null,l,d),a.push({event:l,listeners:v}),l.target=As)))}function Xc(a,l){var d={};return d[a.toLowerCase()]=l.toLowerCase(),d["Webkit"+a]="webkit"+l,d["Moz"+a]="moz"+l,d}var ks={animationend:Xc("Animation","AnimationEnd"),animationiteration:Xc("Animation","AnimationIteration"),animationstart:Xc("Animation","AnimationStart"),transitionend:Xc("Transition","TransitionEnd")},gh={},qb={};u&&(qb=document.createElement("div").style,"AnimationEvent"in window||(delete ks.animationend.animation,delete ks.animationiteration.animation,delete ks.animationstart.animation),"TransitionEvent"in window||delete ks.transitionend.transition);function Kc(a){if(gh[a])return gh[a];if(!ks[a])return a;var l=ks[a],d;for(d in l)if(l.hasOwnProperty(d)&&d in qb)return gh[a]=l[d];return a}var Xb=Kc("animationend"),Kb=Kc("animationiteration"),Yb=Kc("animationstart"),Qb=Kc("transitionend"),Jb=new Map,Zb="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ca(a,l){Jb.set(a,l),o(l,[a])}for(var vh=0;vh<Zb.length;vh++){var mh=Zb[vh],Bk=mh.toLowerCase(),Vk=mh[0].toUpperCase()+mh.slice(1);ca(Bk,"on"+Vk)}ca(Xb,"onAnimationEnd"),ca(Kb,"onAnimationIteration"),ca(Yb,"onAnimationStart"),ca("dblclick","onDoubleClick"),ca("focusin","onFocus"),ca("focusout","onBlur"),ca(Qb,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ru="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Hk=new Set("cancel close invalid load scroll toggle".split(" ").concat(ru));function eS(a,l,d){var v=a.type||"unknown-event";a.currentTarget=d,An(v,l,void 0,a),a.currentTarget=null}function tS(a,l){l=(l&4)!==0;for(var d=0;d<a.length;d++){var v=a[d],w=v.event;v=v.listeners;e:{var E=void 0;if(l)for(var I=v.length-1;0<=I;I--){var H=v[I],Q=H.instance,ce=H.currentTarget;if(H=H.listener,Q!==E&&w.isPropagationStopped())break e;eS(w,H,ce),E=Q}else for(I=0;I<v.length;I++){if(H=v[I],Q=H.instance,ce=H.currentTarget,H=H.listener,Q!==E&&w.isPropagationStopped())break e;eS(w,H,ce),E=Q}}}if(Ir)throw a=Br,Ir=!1,Br=null,a}function Yt(a,l){var d=l[_h];d===void 0&&(d=l[_h]=new Set);var v=a+"__bubble";d.has(v)||(rS(l,a,2,!1),d.add(v))}function yh(a,l,d){var v=0;l&&(v|=4),rS(d,a,v,l)}var Yc="_reactListening"+Math.random().toString(36).slice(2);function nu(a){if(!a[Yc]){a[Yc]=!0,n.forEach(function(d){d!=="selectionchange"&&(Hk.has(d)||yh(d,!1,a),yh(d,!0,a))});var l=a.nodeType===9?a:a.ownerDocument;l===null||l[Yc]||(l[Yc]=!0,yh("selectionchange",!1,l))}}function rS(a,l,d,v){switch(_b(l)){case 1:var w=nk;break;case 4:w=ik;break;default:w=th}d=w.bind(null,l,d,a),w=void 0,!mt||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(w=!0),v?w!==void 0?a.addEventListener(l,d,{capture:!0,passive:w}):a.addEventListener(l,d,!0):w!==void 0?a.addEventListener(l,d,{passive:w}):a.addEventListener(l,d,!1)}function bh(a,l,d,v,w){var E=v;if((l&1)===0&&(l&2)===0&&v!==null)e:for(;;){if(v===null)return;var I=v.tag;if(I===3||I===4){var H=v.stateNode.containerInfo;if(H===w||H.nodeType===8&&H.parentNode===w)break;if(I===4)for(I=v.return;I!==null;){var Q=I.tag;if((Q===3||Q===4)&&(Q=I.stateNode.containerInfo,Q===w||Q.nodeType===8&&Q.parentNode===w))return;I=I.return}for(;H!==null;){if(I=Ha(H),I===null)return;if(Q=I.tag,Q===5||Q===6){v=E=I;continue e}H=H.parentNode}}v=v.return}pt(function(){var ce=E,Se=he(d),xe=[];e:{var be=Jb.get(a);if(be!==void 0){var Fe=ih,He=a;switch(a){case"keypress":if(Uc(d)===0)break e;case"keydown":case"keyup":Fe=bk;break;case"focusin":He="focus",Fe=sh;break;case"focusout":He="blur",Fe=sh;break;case"beforeblur":case"afterblur":Fe=sh;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Fe=$b;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Fe=sk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Fe=xk;break;case Xb:case Kb:case Yb:Fe=ck;break;case Qb:Fe=Ck;break;case"scroll":Fe=ok;break;case"wheel":Fe=Rk;break;case"copy":case"cut":case"paste":Fe=dk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Fe=Ib}var We=(l&4)!==0,sr=!We&&a==="scroll",ae=We?be!==null?be+"Capture":null:be;We=[];for(var ee=ce,le;ee!==null;){le=ee;var Re=le.stateNode;if(le.tag===5&&Re!==null&&(le=Re,ae!==null&&(Re=wt(ee,ae),Re!=null&&We.push(iu(ee,Re,le)))),sr)break;ee=ee.return}0<We.length&&(be=new Fe(be,He,null,d,Se),xe.push({event:be,listeners:We}))}}if((l&7)===0){e:{if(be=a==="mouseover"||a==="pointerover",Fe=a==="mouseout"||a==="pointerout",be&&d!==fe&&(He=d.relatedTarget||d.fromElement)&&(Ha(He)||He[No]))break e;if((Fe||be)&&(be=Se.window===Se?Se:(be=Se.ownerDocument)?be.defaultView||be.parentWindow:window,Fe?(He=d.relatedTarget||d.toElement,Fe=ce,He=He?Ha(He):null,He!==null&&(sr=Ar(He),He!==sr||He.tag!==5&&He.tag!==6)&&(He=null)):(Fe=null,He=ce),Fe!==He)){if(We=$b,Re="onMouseLeave",ae="onMouseEnter",ee="mouse",(a==="pointerout"||a==="pointerover")&&(We=Ib,Re="onPointerLeave",ae="onPointerEnter",ee="pointer"),sr=Fe==null?be:Ds(Fe),le=He==null?be:Ds(He),be=new We(Re,ee+"leave",Fe,d,Se),be.target=sr,be.relatedTarget=le,Re=null,Ha(Se)===ce&&(We=new We(ae,ee+"enter",He,d,Se),We.target=le,We.relatedTarget=sr,Re=We),sr=Re,Fe&&He)t:{for(We=Fe,ae=He,ee=0,le=We;le;le=Ps(le))ee++;for(le=0,Re=ae;Re;Re=Ps(Re))le++;for(;0<ee-le;)We=Ps(We),ee--;for(;0<le-ee;)ae=Ps(ae),le--;for(;ee--;){if(We===ae||ae!==null&&We===ae.alternate)break t;We=Ps(We),ae=Ps(ae)}We=null}else We=null;Fe!==null&&nS(xe,be,Fe,We,!1),He!==null&&sr!==null&&nS(xe,sr,He,We,!0)}}e:{if(be=ce?Ds(ce):window,Fe=be.nodeName&&be.nodeName.toLowerCase(),Fe==="select"||Fe==="input"&&be.type==="file")var qe=Pk;else if(Lb(be))if(Nb)qe=Fk;else{qe=Dk;var et=Mk}else(Fe=be.nodeName)&&Fe.toLowerCase()==="input"&&(be.type==="checkbox"||be.type==="radio")&&(qe=Lk);if(qe&&(qe=qe(a,ce))){Fb(xe,qe,d,Se);break e}et&&et(a,be,ce),a==="focusout"&&(et=be._wrapperState)&&et.controlled&&be.type==="number"&&nt(be,"number",be.value)}switch(et=ce?Ds(ce):window,a){case"focusin":(Lb(et)||et.contentEditable==="true")&&(As=et,ph=ce,tu=null);break;case"focusout":tu=ph=As=null;break;case"mousedown":hh=!0;break;case"contextmenu":case"mouseup":case"dragend":hh=!1,Gb(xe,d,Se);break;case"selectionchange":if(zk)break;case"keydown":case"keyup":Gb(xe,d,Se)}var tt;if(uh)e:{switch(a){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else Is?Mb(a,d)&&(lt="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(lt="onCompositionStart");lt&&(Ab&&d.locale!=="ko"&&(Is||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&Is&&(tt=Rb()):(ua=Se,nh="value"in ua?ua.value:ua.textContent,Is=!0)),et=Qc(ce,lt),0<et.length&&(lt=new Tb(lt,a,null,d,Se),xe.push({event:lt,listeners:et}),tt?lt.data=tt:(tt=Db(d),tt!==null&&(lt.data=tt)))),(tt=$k?Tk(a,d):Ik(a,d))&&(ce=Qc(ce,"onBeforeInput"),0<ce.length&&(Se=new Tb("onBeforeInput","beforeinput",null,d,Se),xe.push({event:Se,listeners:ce}),Se.data=tt))}tS(xe,l)})}function iu(a,l,d){return{instance:a,listener:l,currentTarget:d}}function Qc(a,l){for(var d=l+"Capture",v=[];a!==null;){var w=a,E=w.stateNode;w.tag===5&&E!==null&&(w=E,E=wt(a,d),E!=null&&v.unshift(iu(a,E,w)),E=wt(a,l),E!=null&&v.push(iu(a,E,w))),a=a.return}return v}function Ps(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function nS(a,l,d,v,w){for(var E=l._reactName,I=[];d!==null&&d!==v;){var H=d,Q=H.alternate,ce=H.stateNode;if(Q!==null&&Q===v)break;H.tag===5&&ce!==null&&(H=ce,w?(Q=wt(d,E),Q!=null&&I.unshift(iu(d,Q,H))):w||(Q=wt(d,E),Q!=null&&I.push(iu(d,Q,H)))),d=d.return}I.length!==0&&a.push({event:l,listeners:I})}var Uk=/\r\n?/g,Wk=/\u0000|\uFFFD/g;function iS(a){return(typeof a=="string"?a:""+a).replace(Uk,`
9
- `).replace(Wk,"")}function Jc(a,l,d){if(l=iS(l),iS(a)!==l&&d)throw Error(r(425))}function Zc(){}var Sh=null,wh=null;function xh(a,l){return a==="textarea"||a==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Eh=typeof setTimeout=="function"?setTimeout:void 0,Gk=typeof clearTimeout=="function"?clearTimeout:void 0,oS=typeof Promise=="function"?Promise:void 0,qk=typeof queueMicrotask=="function"?queueMicrotask:typeof oS<"u"?function(a){return oS.resolve(null).then(a).catch(Xk)}:Eh;function Xk(a){setTimeout(function(){throw a})}function Ch(a,l){var d=l,v=0;do{var w=d.nextSibling;if(a.removeChild(d),w&&w.nodeType===8)if(d=w.data,d==="/$"){if(v===0){a.removeChild(w),la(l);return}v--}else d!=="$"&&d!=="$?"&&d!=="$!"||v++;d=w}while(d);la(l)}function fa(a){for(;a!=null;a=a.nextSibling){var l=a.nodeType;if(l===1||l===3)break;if(l===8){if(l=a.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return a}function aS(a){a=a.previousSibling;for(var l=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"){if(l===0)return a;l--}else d==="/$"&&l++}a=a.previousSibling}return null}var Ms=Math.random().toString(36).slice(2),so="__reactFiber$"+Ms,ou="__reactProps$"+Ms,No="__reactContainer$"+Ms,_h="__reactEvents$"+Ms,Kk="__reactListeners$"+Ms,Yk="__reactHandles$"+Ms;function Ha(a){var l=a[so];if(l)return l;for(var d=a.parentNode;d;){if(l=d[No]||d[so]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(a=aS(a);a!==null;){if(d=a[so])return d;a=aS(a)}return l}a=d,d=a.parentNode}return null}function au(a){return a=a[so]||a[No],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function Ds(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(r(33))}function ef(a){return a[ou]||null}var Rh=[],Ls=-1;function da(a){return{current:a}}function Qt(a){0>Ls||(a.current=Rh[Ls],Rh[Ls]=null,Ls--)}function qt(a,l){Ls++,Rh[Ls]=a.current,a.current=l}var pa={},Xr=da(pa),mn=da(!1),Ua=pa;function Fs(a,l){var d=a.type.contextTypes;if(!d)return pa;var v=a.stateNode;if(v&&v.__reactInternalMemoizedUnmaskedChildContext===l)return v.__reactInternalMemoizedMaskedChildContext;var w={},E;for(E in d)w[E]=l[E];return v&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=l,a.__reactInternalMemoizedMaskedChildContext=w),w}function yn(a){return a=a.childContextTypes,a!=null}function tf(){Qt(mn),Qt(Xr)}function sS(a,l,d){if(Xr.current!==pa)throw Error(r(168));qt(Xr,l),qt(mn,d)}function lS(a,l,d){var v=a.stateNode;if(l=l.childContextTypes,typeof v.getChildContext!="function")return d;v=v.getChildContext();for(var w in v)if(!(w in l))throw Error(r(108,ve(a)||"Unknown",w));return K({},d,v)}function rf(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||pa,Ua=Xr.current,qt(Xr,a),qt(mn,mn.current),!0}function uS(a,l,d){var v=a.stateNode;if(!v)throw Error(r(169));d?(a=lS(a,l,Ua),v.__reactInternalMemoizedMergedChildContext=a,Qt(mn),Qt(Xr),qt(Xr,a)):Qt(mn),qt(mn,d)}var jo=null,nf=!1,Oh=!1;function cS(a){jo===null?jo=[a]:jo.push(a)}function Qk(a){nf=!0,cS(a)}function ha(){if(!Oh&&jo!==null){Oh=!0;var a=0,l=yt;try{var d=jo;for(yt=1;a<d.length;a++){var v=d[a];do v=v(!0);while(v!==null)}jo=null,nf=!1}catch(w){throw jo!==null&&(jo=jo.slice(a+1)),Co(ki,ha),w}finally{yt=l,Oh=!1}}return null}var Ns=[],js=0,of=null,af=0,ui=[],ci=0,Wa=null,zo=1,Bo="";function Ga(a,l){Ns[js++]=af,Ns[js++]=of,of=a,af=l}function fS(a,l,d){ui[ci++]=zo,ui[ci++]=Bo,ui[ci++]=Wa,Wa=a;var v=zo;a=Bo;var w=32-dr(v)-1;v&=~(1<<w),d+=1;var E=32-dr(l)+w;if(30<E){var I=w-w%5;E=(v&(1<<I)-1).toString(32),v>>=I,w-=I,zo=1<<32-dr(l)+w|d<<w|v,Bo=E+a}else zo=1<<E|d<<w|v,Bo=a}function $h(a){a.return!==null&&(Ga(a,1),fS(a,1,0))}function Th(a){for(;a===of;)of=Ns[--js],Ns[js]=null,af=Ns[--js],Ns[js]=null;for(;a===Wa;)Wa=ui[--ci],ui[ci]=null,Bo=ui[--ci],ui[ci]=null,zo=ui[--ci],ui[ci]=null}var Fn=null,Nn=null,Zt=!1,Ni=null;function dS(a,l){var d=hi(5,null,null,0);d.elementType="DELETED",d.stateNode=l,d.return=a,l=a.deletions,l===null?(a.deletions=[d],a.flags|=16):l.push(d)}function pS(a,l){switch(a.tag){case 5:var d=a.type;return l=l.nodeType!==1||d.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(a.stateNode=l,Fn=a,Nn=fa(l.firstChild),!0):!1;case 6:return l=a.pendingProps===""||l.nodeType!==3?null:l,l!==null?(a.stateNode=l,Fn=a,Nn=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(d=Wa!==null?{id:zo,overflow:Bo}:null,a.memoizedState={dehydrated:l,treeContext:d,retryLane:1073741824},d=hi(18,null,null,0),d.stateNode=l,d.return=a,a.child=d,Fn=a,Nn=null,!0):!1;default:return!1}}function Ih(a){return(a.mode&1)!==0&&(a.flags&128)===0}function Ah(a){if(Zt){var l=Nn;if(l){var d=l;if(!pS(a,l)){if(Ih(a))throw Error(r(418));l=fa(d.nextSibling);var v=Fn;l&&pS(a,l)?dS(v,d):(a.flags=a.flags&-4097|2,Zt=!1,Fn=a)}}else{if(Ih(a))throw Error(r(418));a.flags=a.flags&-4097|2,Zt=!1,Fn=a}}}function hS(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;Fn=a}function sf(a){if(a!==Fn)return!1;if(!Zt)return hS(a),Zt=!0,!1;var l;if((l=a.tag!==3)&&!(l=a.tag!==5)&&(l=a.type,l=l!=="head"&&l!=="body"&&!xh(a.type,a.memoizedProps)),l&&(l=Nn)){if(Ih(a))throw gS(),Error(r(418));for(;l;)dS(a,l),l=fa(l.nextSibling)}if(hS(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));e:{for(a=a.nextSibling,l=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"){if(l===0){Nn=fa(a.nextSibling);break e}l--}else d!=="$"&&d!=="$!"&&d!=="$?"||l++}a=a.nextSibling}Nn=null}}else Nn=Fn?fa(a.stateNode.nextSibling):null;return!0}function gS(){for(var a=Nn;a;)a=fa(a.nextSibling)}function zs(){Nn=Fn=null,Zt=!1}function kh(a){Ni===null?Ni=[a]:Ni.push(a)}var Jk=R.ReactCurrentBatchConfig;function su(a,l,d){if(a=d.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var v=d.stateNode}if(!v)throw Error(r(147,a));var w=v,E=""+a;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===E?l.ref:(l=function(I){var H=w.refs;I===null?delete H[E]:H[E]=I},l._stringRef=E,l)}if(typeof a!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,a))}return a}function lf(a,l){throw a=Object.prototype.toString.call(l),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":a))}function vS(a){var l=a._init;return l(a._payload)}function mS(a){function l(ae,ee){if(a){var le=ae.deletions;le===null?(ae.deletions=[ee],ae.flags|=16):le.push(ee)}}function d(ae,ee){if(!a)return null;for(;ee!==null;)l(ae,ee),ee=ee.sibling;return null}function v(ae,ee){for(ae=new Map;ee!==null;)ee.key!==null?ae.set(ee.key,ee):ae.set(ee.index,ee),ee=ee.sibling;return ae}function w(ae,ee){return ae=xa(ae,ee),ae.index=0,ae.sibling=null,ae}function E(ae,ee,le){return ae.index=le,a?(le=ae.alternate,le!==null?(le=le.index,le<ee?(ae.flags|=2,ee):le):(ae.flags|=2,ee)):(ae.flags|=1048576,ee)}function I(ae){return a&&ae.alternate===null&&(ae.flags|=2),ae}function H(ae,ee,le,Re){return ee===null||ee.tag!==6?(ee=Eg(le,ae.mode,Re),ee.return=ae,ee):(ee=w(ee,le),ee.return=ae,ee)}function Q(ae,ee,le,Re){var qe=le.type;return qe===P?Se(ae,ee,le.props.children,Re,le.key):ee!==null&&(ee.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===q&&vS(qe)===ee.type)?(Re=w(ee,le.props),Re.ref=su(ae,ee,le),Re.return=ae,Re):(Re=kf(le.type,le.key,le.props,null,ae.mode,Re),Re.ref=su(ae,ee,le),Re.return=ae,Re)}function ce(ae,ee,le,Re){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==le.containerInfo||ee.stateNode.implementation!==le.implementation?(ee=Cg(le,ae.mode,Re),ee.return=ae,ee):(ee=w(ee,le.children||[]),ee.return=ae,ee)}function Se(ae,ee,le,Re,qe){return ee===null||ee.tag!==7?(ee=es(le,ae.mode,Re,qe),ee.return=ae,ee):(ee=w(ee,le),ee.return=ae,ee)}function xe(ae,ee,le){if(typeof ee=="string"&&ee!==""||typeof ee=="number")return ee=Eg(""+ee,ae.mode,le),ee.return=ae,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case $:return le=kf(ee.type,ee.key,ee.props,null,ae.mode,le),le.ref=su(ae,null,ee),le.return=ae,le;case T:return ee=Cg(ee,ae.mode,le),ee.return=ae,ee;case q:var Re=ee._init;return xe(ae,Re(ee._payload),le)}if(ze(ee)||G(ee))return ee=es(ee,ae.mode,le,null),ee.return=ae,ee;lf(ae,ee)}return null}function be(ae,ee,le,Re){var qe=ee!==null?ee.key:null;if(typeof le=="string"&&le!==""||typeof le=="number")return qe!==null?null:H(ae,ee,""+le,Re);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case $:return le.key===qe?Q(ae,ee,le,Re):null;case T:return le.key===qe?ce(ae,ee,le,Re):null;case q:return qe=le._init,be(ae,ee,qe(le._payload),Re)}if(ze(le)||G(le))return qe!==null?null:Se(ae,ee,le,Re,null);lf(ae,le)}return null}function Fe(ae,ee,le,Re,qe){if(typeof Re=="string"&&Re!==""||typeof Re=="number")return ae=ae.get(le)||null,H(ee,ae,""+Re,qe);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case $:return ae=ae.get(Re.key===null?le:Re.key)||null,Q(ee,ae,Re,qe);case T:return ae=ae.get(Re.key===null?le:Re.key)||null,ce(ee,ae,Re,qe);case q:var et=Re._init;return Fe(ae,ee,le,et(Re._payload),qe)}if(ze(Re)||G(Re))return ae=ae.get(le)||null,Se(ee,ae,Re,qe,null);lf(ee,Re)}return null}function He(ae,ee,le,Re){for(var qe=null,et=null,tt=ee,lt=ee=0,Rr=null;tt!==null&&lt<le.length;lt++){tt.index>lt?(Rr=tt,tt=null):Rr=tt.sibling;var _t=be(ae,tt,le[lt],Re);if(_t===null){tt===null&&(tt=Rr);break}a&&tt&&_t.alternate===null&&l(ae,tt),ee=E(_t,ee,lt),et===null?qe=_t:et.sibling=_t,et=_t,tt=Rr}if(lt===le.length)return d(ae,tt),Zt&&Ga(ae,lt),qe;if(tt===null){for(;lt<le.length;lt++)tt=xe(ae,le[lt],Re),tt!==null&&(ee=E(tt,ee,lt),et===null?qe=tt:et.sibling=tt,et=tt);return Zt&&Ga(ae,lt),qe}for(tt=v(ae,tt);lt<le.length;lt++)Rr=Fe(tt,ae,lt,le[lt],Re),Rr!==null&&(a&&Rr.alternate!==null&&tt.delete(Rr.key===null?lt:Rr.key),ee=E(Rr,ee,lt),et===null?qe=Rr:et.sibling=Rr,et=Rr);return a&&tt.forEach(function(Ea){return l(ae,Ea)}),Zt&&Ga(ae,lt),qe}function We(ae,ee,le,Re){var qe=G(le);if(typeof qe!="function")throw Error(r(150));if(le=qe.call(le),le==null)throw Error(r(151));for(var et=qe=null,tt=ee,lt=ee=0,Rr=null,_t=le.next();tt!==null&&!_t.done;lt++,_t=le.next()){tt.index>lt?(Rr=tt,tt=null):Rr=tt.sibling;var Ea=be(ae,tt,_t.value,Re);if(Ea===null){tt===null&&(tt=Rr);break}a&&tt&&Ea.alternate===null&&l(ae,tt),ee=E(Ea,ee,lt),et===null?qe=Ea:et.sibling=Ea,et=Ea,tt=Rr}if(_t.done)return d(ae,tt),Zt&&Ga(ae,lt),qe;if(tt===null){for(;!_t.done;lt++,_t=le.next())_t=xe(ae,_t.value,Re),_t!==null&&(ee=E(_t,ee,lt),et===null?qe=_t:et.sibling=_t,et=_t);return Zt&&Ga(ae,lt),qe}for(tt=v(ae,tt);!_t.done;lt++,_t=le.next())_t=Fe(tt,ae,lt,_t.value,Re),_t!==null&&(a&&_t.alternate!==null&&tt.delete(_t.key===null?lt:_t.key),ee=E(_t,ee,lt),et===null?qe=_t:et.sibling=_t,et=_t);return a&&tt.forEach(function(A5){return l(ae,A5)}),Zt&&Ga(ae,lt),qe}function sr(ae,ee,le,Re){if(typeof le=="object"&&le!==null&&le.type===P&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case $:e:{for(var qe=le.key,et=ee;et!==null;){if(et.key===qe){if(qe=le.type,qe===P){if(et.tag===7){d(ae,et.sibling),ee=w(et,le.props.children),ee.return=ae,ae=ee;break e}}else if(et.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===q&&vS(qe)===et.type){d(ae,et.sibling),ee=w(et,le.props),ee.ref=su(ae,et,le),ee.return=ae,ae=ee;break e}d(ae,et);break}else l(ae,et);et=et.sibling}le.type===P?(ee=es(le.props.children,ae.mode,Re,le.key),ee.return=ae,ae=ee):(Re=kf(le.type,le.key,le.props,null,ae.mode,Re),Re.ref=su(ae,ee,le),Re.return=ae,ae=Re)}return I(ae);case T:e:{for(et=le.key;ee!==null;){if(ee.key===et)if(ee.tag===4&&ee.stateNode.containerInfo===le.containerInfo&&ee.stateNode.implementation===le.implementation){d(ae,ee.sibling),ee=w(ee,le.children||[]),ee.return=ae,ae=ee;break e}else{d(ae,ee);break}else l(ae,ee);ee=ee.sibling}ee=Cg(le,ae.mode,Re),ee.return=ae,ae=ee}return I(ae);case q:return et=le._init,sr(ae,ee,et(le._payload),Re)}if(ze(le))return He(ae,ee,le,Re);if(G(le))return We(ae,ee,le,Re);lf(ae,le)}return typeof le=="string"&&le!==""||typeof le=="number"?(le=""+le,ee!==null&&ee.tag===6?(d(ae,ee.sibling),ee=w(ee,le),ee.return=ae,ae=ee):(d(ae,ee),ee=Eg(le,ae.mode,Re),ee.return=ae,ae=ee),I(ae)):d(ae,ee)}return sr}var Bs=mS(!0),yS=mS(!1),uf=da(null),cf=null,Vs=null,Ph=null;function Mh(){Ph=Vs=cf=null}function Dh(a){var l=uf.current;Qt(uf),a._currentValue=l}function Lh(a,l,d){for(;a!==null;){var v=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,v!==null&&(v.childLanes|=l)):v!==null&&(v.childLanes&l)!==l&&(v.childLanes|=l),a===d)break;a=a.return}}function Hs(a,l){cf=a,Ph=Vs=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&l)!==0&&(bn=!0),a.firstContext=null)}function fi(a){var l=a._currentValue;if(Ph!==a)if(a={context:a,memoizedValue:l,next:null},Vs===null){if(cf===null)throw Error(r(308));Vs=a,cf.dependencies={lanes:0,firstContext:a}}else Vs=Vs.next=a;return l}var qa=null;function Fh(a){qa===null?qa=[a]:qa.push(a)}function bS(a,l,d,v){var w=l.interleaved;return w===null?(d.next=d,Fh(l)):(d.next=w.next,w.next=d),l.interleaved=d,Vo(a,v)}function Vo(a,l){a.lanes|=l;var d=a.alternate;for(d!==null&&(d.lanes|=l),d=a,a=a.return;a!==null;)a.childLanes|=l,d=a.alternate,d!==null&&(d.childLanes|=l),d=a,a=a.return;return d.tag===3?d.stateNode:null}var ga=!1;function Nh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function SS(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Ho(a,l){return{eventTime:a,lane:l,tag:0,payload:null,callback:null,next:null}}function va(a,l,d){var v=a.updateQueue;if(v===null)return null;if(v=v.shared,(Ct&2)!==0){var w=v.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),v.pending=l,Vo(a,d)}return w=v.interleaved,w===null?(l.next=l,Fh(v)):(l.next=w.next,w.next=l),v.interleaved=l,Vo(a,d)}function ff(a,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194240)!==0)){var v=l.lanes;v&=a.pendingLanes,d|=v,l.lanes=d,io(a,d)}}function wS(a,l){var d=a.updateQueue,v=a.alternate;if(v!==null&&(v=v.updateQueue,d===v)){var w=null,E=null;if(d=d.firstBaseUpdate,d!==null){do{var I={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};E===null?w=E=I:E=E.next=I,d=d.next}while(d!==null);E===null?w=E=l:E=E.next=l}else w=E=l;d={baseState:v.baseState,firstBaseUpdate:w,lastBaseUpdate:E,shared:v.shared,effects:v.effects},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=l:a.next=l,d.lastBaseUpdate=l}function df(a,l,d,v){var w=a.updateQueue;ga=!1;var E=w.firstBaseUpdate,I=w.lastBaseUpdate,H=w.shared.pending;if(H!==null){w.shared.pending=null;var Q=H,ce=Q.next;Q.next=null,I===null?E=ce:I.next=ce,I=Q;var Se=a.alternate;Se!==null&&(Se=Se.updateQueue,H=Se.lastBaseUpdate,H!==I&&(H===null?Se.firstBaseUpdate=ce:H.next=ce,Se.lastBaseUpdate=Q))}if(E!==null){var xe=w.baseState;I=0,Se=ce=Q=null,H=E;do{var be=H.lane,Fe=H.eventTime;if((v&be)===be){Se!==null&&(Se=Se.next={eventTime:Fe,lane:0,tag:H.tag,payload:H.payload,callback:H.callback,next:null});e:{var He=a,We=H;switch(be=l,Fe=d,We.tag){case 1:if(He=We.payload,typeof He=="function"){xe=He.call(Fe,xe,be);break e}xe=He;break e;case 3:He.flags=He.flags&-65537|128;case 0:if(He=We.payload,be=typeof He=="function"?He.call(Fe,xe,be):He,be==null)break e;xe=K({},xe,be);break e;case 2:ga=!0}}H.callback!==null&&H.lane!==0&&(a.flags|=64,be=w.effects,be===null?w.effects=[H]:be.push(H))}else Fe={eventTime:Fe,lane:be,tag:H.tag,payload:H.payload,callback:H.callback,next:null},Se===null?(ce=Se=Fe,Q=xe):Se=Se.next=Fe,I|=be;if(H=H.next,H===null){if(H=w.shared.pending,H===null)break;be=H,H=be.next,be.next=null,w.lastBaseUpdate=be,w.shared.pending=null}}while(!0);if(Se===null&&(Q=xe),w.baseState=Q,w.firstBaseUpdate=ce,w.lastBaseUpdate=Se,l=w.shared.interleaved,l!==null){w=l;do I|=w.lane,w=w.next;while(w!==l)}else E===null&&(w.shared.lanes=0);Ya|=I,a.lanes=I,a.memoizedState=xe}}function xS(a,l,d){if(a=l.effects,l.effects=null,a!==null)for(l=0;l<a.length;l++){var v=a[l],w=v.callback;if(w!==null){if(v.callback=null,v=d,typeof w!="function")throw Error(r(191,w));w.call(v)}}}var lu={},lo=da(lu),uu=da(lu),cu=da(lu);function Xa(a){if(a===lu)throw Error(r(174));return a}function jh(a,l){switch(qt(cu,l),qt(uu,a),qt(lo,lu),a=l.nodeType,a){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:Lt(null,"");break;default:a=a===8?l.parentNode:l,l=a.namespaceURI||null,a=a.tagName,l=Lt(l,a)}Qt(lo),qt(lo,l)}function Us(){Qt(lo),Qt(uu),Qt(cu)}function ES(a){Xa(cu.current);var l=Xa(lo.current),d=Lt(l,a.type);l!==d&&(qt(uu,a),qt(lo,d))}function zh(a){uu.current===a&&(Qt(lo),Qt(uu))}var tr=da(0);function pf(a){for(var l=a;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Bh=[];function Vh(){for(var a=0;a<Bh.length;a++)Bh[a]._workInProgressVersionPrimary=null;Bh.length=0}var hf=R.ReactCurrentDispatcher,Hh=R.ReactCurrentBatchConfig,Ka=0,rr=null,mr=null,Cr=null,gf=!1,fu=!1,du=0,Zk=0;function Kr(){throw Error(r(321))}function Uh(a,l){if(l===null)return!1;for(var d=0;d<l.length&&d<a.length;d++)if(!Fi(a[d],l[d]))return!1;return!0}function Wh(a,l,d,v,w,E){if(Ka=E,rr=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,hf.current=a===null||a.memoizedState===null?n5:i5,a=d(v,w),fu){E=0;do{if(fu=!1,du=0,25<=E)throw Error(r(301));E+=1,Cr=mr=null,l.updateQueue=null,hf.current=o5,a=d(v,w)}while(fu)}if(hf.current=yf,l=mr!==null&&mr.next!==null,Ka=0,Cr=mr=rr=null,gf=!1,l)throw Error(r(300));return a}function Gh(){var a=du!==0;return du=0,a}function uo(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Cr===null?rr.memoizedState=Cr=a:Cr=Cr.next=a,Cr}function di(){if(mr===null){var a=rr.alternate;a=a!==null?a.memoizedState:null}else a=mr.next;var l=Cr===null?rr.memoizedState:Cr.next;if(l!==null)Cr=l,mr=a;else{if(a===null)throw Error(r(310));mr=a,a={memoizedState:mr.memoizedState,baseState:mr.baseState,baseQueue:mr.baseQueue,queue:mr.queue,next:null},Cr===null?rr.memoizedState=Cr=a:Cr=Cr.next=a}return Cr}function pu(a,l){return typeof l=="function"?l(a):l}function qh(a){var l=di(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var v=mr,w=v.baseQueue,E=d.pending;if(E!==null){if(w!==null){var I=w.next;w.next=E.next,E.next=I}v.baseQueue=w=E,d.pending=null}if(w!==null){E=w.next,v=v.baseState;var H=I=null,Q=null,ce=E;do{var Se=ce.lane;if((Ka&Se)===Se)Q!==null&&(Q=Q.next={lane:0,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null}),v=ce.hasEagerState?ce.eagerState:a(v,ce.action);else{var xe={lane:Se,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null};Q===null?(H=Q=xe,I=v):Q=Q.next=xe,rr.lanes|=Se,Ya|=Se}ce=ce.next}while(ce!==null&&ce!==E);Q===null?I=v:Q.next=H,Fi(v,l.memoizedState)||(bn=!0),l.memoizedState=v,l.baseState=I,l.baseQueue=Q,d.lastRenderedState=v}if(a=d.interleaved,a!==null){w=a;do E=w.lane,rr.lanes|=E,Ya|=E,w=w.next;while(w!==a)}else w===null&&(d.lanes=0);return[l.memoizedState,d.dispatch]}function Xh(a){var l=di(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var v=d.dispatch,w=d.pending,E=l.memoizedState;if(w!==null){d.pending=null;var I=w=w.next;do E=a(E,I.action),I=I.next;while(I!==w);Fi(E,l.memoizedState)||(bn=!0),l.memoizedState=E,l.baseQueue===null&&(l.baseState=E),d.lastRenderedState=E}return[E,v]}function CS(){}function _S(a,l){var d=rr,v=di(),w=l(),E=!Fi(v.memoizedState,w);if(E&&(v.memoizedState=w,bn=!0),v=v.queue,Kh($S.bind(null,d,v,a),[a]),v.getSnapshot!==l||E||Cr!==null&&Cr.memoizedState.tag&1){if(d.flags|=2048,hu(9,OS.bind(null,d,v,w,l),void 0,null),_r===null)throw Error(r(349));(Ka&30)!==0||RS(d,l,w)}return w}function RS(a,l,d){a.flags|=16384,a={getSnapshot:l,value:d},l=rr.updateQueue,l===null?(l={lastEffect:null,stores:null},rr.updateQueue=l,l.stores=[a]):(d=l.stores,d===null?l.stores=[a]:d.push(a))}function OS(a,l,d,v){l.value=d,l.getSnapshot=v,TS(l)&&IS(a)}function $S(a,l,d){return d(function(){TS(l)&&IS(a)})}function TS(a){var l=a.getSnapshot;a=a.value;try{var d=l();return!Fi(a,d)}catch{return!0}}function IS(a){var l=Vo(a,1);l!==null&&Vi(l,a,1,-1)}function AS(a){var l=uo();return typeof a=="function"&&(a=a()),l.memoizedState=l.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:pu,lastRenderedState:a},l.queue=a,a=a.dispatch=r5.bind(null,rr,a),[l.memoizedState,a]}function hu(a,l,d,v){return a={tag:a,create:l,destroy:d,deps:v,next:null},l=rr.updateQueue,l===null?(l={lastEffect:null,stores:null},rr.updateQueue=l,l.lastEffect=a.next=a):(d=l.lastEffect,d===null?l.lastEffect=a.next=a:(v=d.next,d.next=a,a.next=v,l.lastEffect=a)),a}function kS(){return di().memoizedState}function vf(a,l,d,v){var w=uo();rr.flags|=a,w.memoizedState=hu(1|l,d,void 0,v===void 0?null:v)}function mf(a,l,d,v){var w=di();v=v===void 0?null:v;var E=void 0;if(mr!==null){var I=mr.memoizedState;if(E=I.destroy,v!==null&&Uh(v,I.deps)){w.memoizedState=hu(l,d,E,v);return}}rr.flags|=a,w.memoizedState=hu(1|l,d,E,v)}function PS(a,l){return vf(8390656,8,a,l)}function Kh(a,l){return mf(2048,8,a,l)}function MS(a,l){return mf(4,2,a,l)}function DS(a,l){return mf(4,4,a,l)}function LS(a,l){if(typeof l=="function")return a=a(),l(a),function(){l(null)};if(l!=null)return a=a(),l.current=a,function(){l.current=null}}function FS(a,l,d){return d=d!=null?d.concat([a]):null,mf(4,4,LS.bind(null,l,a),d)}function Yh(){}function NS(a,l){var d=di();l=l===void 0?null:l;var v=d.memoizedState;return v!==null&&l!==null&&Uh(l,v[1])?v[0]:(d.memoizedState=[a,l],a)}function jS(a,l){var d=di();l=l===void 0?null:l;var v=d.memoizedState;return v!==null&&l!==null&&Uh(l,v[1])?v[0]:(a=a(),d.memoizedState=[a,l],a)}function zS(a,l,d){return(Ka&21)===0?(a.baseState&&(a.baseState=!1,bn=!0),a.memoizedState=d):(Fi(d,l)||(d=Io(),rr.lanes|=d,Ya|=d,a.baseState=!0),l)}function e5(a,l){var d=yt;yt=d!==0&&4>d?d:4,a(!0);var v=Hh.transition;Hh.transition={};try{a(!1),l()}finally{yt=d,Hh.transition=v}}function BS(){return di().memoizedState}function t5(a,l,d){var v=Sa(a);if(d={lane:v,action:d,hasEagerState:!1,eagerState:null,next:null},VS(a))HS(l,d);else if(d=bS(a,l,d,v),d!==null){var w=an();Vi(d,a,v,w),US(d,l,v)}}function r5(a,l,d){var v=Sa(a),w={lane:v,action:d,hasEagerState:!1,eagerState:null,next:null};if(VS(a))HS(l,w);else{var E=a.alternate;if(a.lanes===0&&(E===null||E.lanes===0)&&(E=l.lastRenderedReducer,E!==null))try{var I=l.lastRenderedState,H=E(I,d);if(w.hasEagerState=!0,w.eagerState=H,Fi(H,I)){var Q=l.interleaved;Q===null?(w.next=w,Fh(l)):(w.next=Q.next,Q.next=w),l.interleaved=w;return}}catch{}d=bS(a,l,w,v),d!==null&&(w=an(),Vi(d,a,v,w),US(d,l,v))}}function VS(a){var l=a.alternate;return a===rr||l!==null&&l===rr}function HS(a,l){fu=gf=!0;var d=a.pending;d===null?l.next=l:(l.next=d.next,d.next=l),a.pending=l}function US(a,l,d){if((d&4194240)!==0){var v=l.lanes;v&=a.pendingLanes,d|=v,l.lanes=d,io(a,d)}}var yf={readContext:fi,useCallback:Kr,useContext:Kr,useEffect:Kr,useImperativeHandle:Kr,useInsertionEffect:Kr,useLayoutEffect:Kr,useMemo:Kr,useReducer:Kr,useRef:Kr,useState:Kr,useDebugValue:Kr,useDeferredValue:Kr,useTransition:Kr,useMutableSource:Kr,useSyncExternalStore:Kr,useId:Kr,unstable_isNewReconciler:!1},n5={readContext:fi,useCallback:function(a,l){return uo().memoizedState=[a,l===void 0?null:l],a},useContext:fi,useEffect:PS,useImperativeHandle:function(a,l,d){return d=d!=null?d.concat([a]):null,vf(4194308,4,LS.bind(null,l,a),d)},useLayoutEffect:function(a,l){return vf(4194308,4,a,l)},useInsertionEffect:function(a,l){return vf(4,2,a,l)},useMemo:function(a,l){var d=uo();return l=l===void 0?null:l,a=a(),d.memoizedState=[a,l],a},useReducer:function(a,l,d){var v=uo();return l=d!==void 0?d(l):l,v.memoizedState=v.baseState=l,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:l},v.queue=a,a=a.dispatch=t5.bind(null,rr,a),[v.memoizedState,a]},useRef:function(a){var l=uo();return a={current:a},l.memoizedState=a},useState:AS,useDebugValue:Yh,useDeferredValue:function(a){return uo().memoizedState=a},useTransition:function(){var a=AS(!1),l=a[0];return a=e5.bind(null,a[1]),uo().memoizedState=a,[l,a]},useMutableSource:function(){},useSyncExternalStore:function(a,l,d){var v=rr,w=uo();if(Zt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),_r===null)throw Error(r(349));(Ka&30)!==0||RS(v,l,d)}w.memoizedState=d;var E={value:d,getSnapshot:l};return w.queue=E,PS($S.bind(null,v,E,a),[a]),v.flags|=2048,hu(9,OS.bind(null,v,E,d,l),void 0,null),d},useId:function(){var a=uo(),l=_r.identifierPrefix;if(Zt){var d=Bo,v=zo;d=(v&~(1<<32-dr(v)-1)).toString(32)+d,l=":"+l+"R"+d,d=du++,0<d&&(l+="H"+d.toString(32)),l+=":"}else d=Zk++,l=":"+l+"r"+d.toString(32)+":";return a.memoizedState=l},unstable_isNewReconciler:!1},i5={readContext:fi,useCallback:NS,useContext:fi,useEffect:Kh,useImperativeHandle:FS,useInsertionEffect:MS,useLayoutEffect:DS,useMemo:jS,useReducer:qh,useRef:kS,useState:function(){return qh(pu)},useDebugValue:Yh,useDeferredValue:function(a){var l=di();return zS(l,mr.memoizedState,a)},useTransition:function(){var a=qh(pu)[0],l=di().memoizedState;return[a,l]},useMutableSource:CS,useSyncExternalStore:_S,useId:BS,unstable_isNewReconciler:!1},o5={readContext:fi,useCallback:NS,useContext:fi,useEffect:Kh,useImperativeHandle:FS,useInsertionEffect:MS,useLayoutEffect:DS,useMemo:jS,useReducer:Xh,useRef:kS,useState:function(){return Xh(pu)},useDebugValue:Yh,useDeferredValue:function(a){var l=di();return mr===null?l.memoizedState=a:zS(l,mr.memoizedState,a)},useTransition:function(){var a=Xh(pu)[0],l=di().memoizedState;return[a,l]},useMutableSource:CS,useSyncExternalStore:_S,useId:BS,unstable_isNewReconciler:!1};function ji(a,l){if(a&&a.defaultProps){l=K({},l),a=a.defaultProps;for(var d in a)l[d]===void 0&&(l[d]=a[d]);return l}return l}function Qh(a,l,d,v){l=a.memoizedState,d=d(v,l),d=d==null?l:K({},l,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var bf={isMounted:function(a){return(a=a._reactInternals)?Ar(a)===a:!1},enqueueSetState:function(a,l,d){a=a._reactInternals;var v=an(),w=Sa(a),E=Ho(v,w);E.payload=l,d!=null&&(E.callback=d),l=va(a,E,w),l!==null&&(Vi(l,a,w,v),ff(l,a,w))},enqueueReplaceState:function(a,l,d){a=a._reactInternals;var v=an(),w=Sa(a),E=Ho(v,w);E.tag=1,E.payload=l,d!=null&&(E.callback=d),l=va(a,E,w),l!==null&&(Vi(l,a,w,v),ff(l,a,w))},enqueueForceUpdate:function(a,l){a=a._reactInternals;var d=an(),v=Sa(a),w=Ho(d,v);w.tag=2,l!=null&&(w.callback=l),l=va(a,w,v),l!==null&&(Vi(l,a,v,d),ff(l,a,v))}};function WS(a,l,d,v,w,E,I){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(v,E,I):l.prototype&&l.prototype.isPureReactComponent?!eu(d,v)||!eu(w,E):!0}function GS(a,l,d){var v=!1,w=pa,E=l.contextType;return typeof E=="object"&&E!==null?E=fi(E):(w=yn(l)?Ua:Xr.current,v=l.contextTypes,E=(v=v!=null)?Fs(a,w):pa),l=new l(d,E),a.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=bf,a.stateNode=l,l._reactInternals=a,v&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=w,a.__reactInternalMemoizedMaskedChildContext=E),l}function qS(a,l,d,v){a=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,v),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,v),l.state!==a&&bf.enqueueReplaceState(l,l.state,null)}function Jh(a,l,d,v){var w=a.stateNode;w.props=d,w.state=a.memoizedState,w.refs={},Nh(a);var E=l.contextType;typeof E=="object"&&E!==null?w.context=fi(E):(E=yn(l)?Ua:Xr.current,w.context=Fs(a,E)),w.state=a.memoizedState,E=l.getDerivedStateFromProps,typeof E=="function"&&(Qh(a,l,E,d),w.state=a.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(l=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),l!==w.state&&bf.enqueueReplaceState(w,w.state,null),df(a,d,w,v),w.state=a.memoizedState),typeof w.componentDidMount=="function"&&(a.flags|=4194308)}function Ws(a,l){try{var d="",v=l;do d+=ne(v),v=v.return;while(v);var w=d}catch(E){w=`
8
+ `+w[I].replace(" at new "," at ");return a.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",a.displayName)),Q}while(1<=I&&0<=H);break}}}finally{J=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?A(a):""}function ne(a){switch(a.tag){case 5:return A(a.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return a=Z(a.type,!1),a;case 11:return a=Z(a.type.render,!1),a;case 1:return a=Z(a.type,!0),a;default:return""}}function W(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case P:return"Fragment";case T:return"Portal";case z:return"Profiler";case L:return"StrictMode";case N:return"Suspense";case j:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case X:return(a.displayName||"Context")+".Consumer";case B:return(a._context.displayName||"Context")+".Provider";case Y:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case F:return l=a.displayName||null,l!==null?l:W(a.type)||"Memo";case q:l=a._payload,a=a._init;try{return W(a(l))}catch{}}return null}function ve(a){var l=a.type;switch(a.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=l.render,a=a.displayName||a.name||"",l.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W(l);case 8:return l===L?"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 l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function se(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Ee(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function we(a){var l=Ee(a)?"checked":"value",d=Object.getOwnPropertyDescriptor(a.constructor.prototype,l),v=""+a[l];if(!a.hasOwnProperty(l)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var w=d.get,E=d.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return w.call(this)},set:function(I){v=""+I,E.call(this,I)}}),Object.defineProperty(a,l,{enumerable:d.enumerable}),{getValue:function(){return v},setValue:function(I){v=""+I},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function Me(a){a._valueTracker||(a._valueTracker=we(a))}function Oe(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var d=l.getValue(),v="";return a&&(v=Ee(a)?a.checked?"true":"false":a.value),a=v,a!==d?(l.setValue(a),!0):!1}function je(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Ae(a,l){var d=l.checked;return K({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??a._wrapperState.initialChecked})}function $e(a,l){var d=l.defaultValue==null?"":l.defaultValue,v=l.checked!=null?l.checked:l.defaultChecked;d=se(l.value!=null?l.value:d),a._wrapperState={initialChecked:v,initialValue:d,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function Ne(a,l){l=l.checked,l!=null&&O(a,"checked",l,!1)}function Ie(a,l){Ne(a,l);var d=se(l.value),v=l.type;if(d!=null)v==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+d):a.value!==""+d&&(a.value=""+d);else if(v==="submit"||v==="reset"){a.removeAttribute("value");return}l.hasOwnProperty("value")?nt(a,l.type,d):l.hasOwnProperty("defaultValue")&&nt(a,l.type,se(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(a.defaultChecked=!!l.defaultChecked)}function Ke(a,l,d){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var v=l.type;if(!(v!=="submit"&&v!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+a._wrapperState.initialValue,d||l===a.value||(a.value=l),a.defaultValue=l}d=a.name,d!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,d!==""&&(a.name=d)}function nt(a,l,d){(l!=="number"||je(a.ownerDocument)!==a)&&(d==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+d&&(a.defaultValue=""+d))}var ze=Array.isArray;function Ue(a,l,d,v){if(a=a.options,l){l={};for(var w=0;w<d.length;w++)l["$"+d[w]]=!0;for(d=0;d<a.length;d++)w=l.hasOwnProperty("$"+a[d].value),a[d].selected!==w&&(a[d].selected=w),w&&v&&(a[d].defaultSelected=!0)}else{for(d=""+se(d),l=null,w=0;w<a.length;w++){if(a[w].value===d){a[w].selected=!0,v&&(a[w].defaultSelected=!0);return}l!==null||a[w].disabled||(l=a[w])}l!==null&&(l.selected=!0)}}function Qe(a,l){if(l.dangerouslySetInnerHTML!=null)throw Error(r(91));return K({},l,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Ve(a,l){var d=l.value;if(d==null){if(d=l.children,l=l.defaultValue,d!=null){if(l!=null)throw Error(r(92));if(ze(d)){if(1<d.length)throw Error(r(93));d=d[0]}l=d}l==null&&(l=""),d=l}a._wrapperState={initialValue:se(d)}}function ye(a,l){var d=se(l.value),v=se(l.defaultValue);d!=null&&(d=""+d,d!==a.value&&(a.value=d),l.defaultValue==null&&a.defaultValue!==d&&(a.defaultValue=d)),v!=null&&(a.defaultValue=""+v)}function Ge(a){var l=a.textContent;l===a._wrapperState.initialValue&&l!==""&&l!==null&&(a.value=l)}function ct(a){switch(a){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Lt(a,l){return a==null||a==="http://www.w3.org/1999/xhtml"?ct(l):a==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var ht,Kt=(function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,d,v,w){MSApp.execUnsafeLocalFunction(function(){return a(l,d,v,w)})}:a})(function(a,l){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=l;else{for(ht=ht||document.createElement("div"),ht.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=ht.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}});function Ft(a,l){if(l){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=l;return}}a.textContent=l}var re={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},ie=["Webkit","ms","Moz","O"];Object.keys(re).forEach(function(a){ie.forEach(function(l){l=l+a.charAt(0).toUpperCase()+a.substring(1),re[l]=re[a]})});function ue(a,l,d){return l==null||typeof l=="boolean"||l===""?"":d||typeof l!="number"||l===0||re.hasOwnProperty(a)&&re[a]?(""+l).trim():l+"px"}function V(a,l){a=a.style;for(var d in l)if(l.hasOwnProperty(d)){var v=d.indexOf("--")===0,w=ue(d,l[d],v);d==="float"&&(d="cssFloat"),v?a.setProperty(d,w):a[d]=w}}var pe=K({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 _e(a,l){if(l){if(pe[a]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,a));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function De(a,l){if(a.indexOf("-")===-1)return typeof l.is=="string";switch(a){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 fe=null;function he(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var me=null,Ce=null,Te=null;function Xe(a){if(a=au(a)){if(typeof me!="function")throw Error(r(280));var l=a.stateNode;l&&(l=ef(l),me(a.stateNode,a.type,l))}}function it(a){Ce?Te?Te.push(a):Te=[a]:Ce=a}function Je(){if(Ce){var a=Ce,l=Te;if(Te=Ce=null,Xe(a),l)for(a=0;a<l.length;a++)Xe(l[a])}}function ot(a,l){return a(l)}function zr(){}var ft=!1;function pt(a,l,d){if(ft)return a(l,d);ft=!0;try{return ot(a,l,d)}finally{ft=!1,(Ce!==null||Te!==null)&&(zr(),Je())}}function wt(a,l){var d=a.stateNode;if(d===null)return null;var v=ef(d);if(v===null)return null;d=v[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(a=a.type,v=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!v;break e;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var mt=!1;if(u)try{var xt={};Object.defineProperty(xt,"passive",{get:function(){mt=!0}}),window.addEventListener("test",xt,xt),window.removeEventListener("test",xt,xt)}catch{mt=!1}function Bt(a,l,d,v,w,E,I,H,Q){var ce=Array.prototype.slice.call(arguments,3);try{l.apply(d,ce)}catch(Se){this.onError(Se)}}var Jt=!1,Tr=null,Ir=!1,Br=null,hn={onError:function(a){Jt=!0,Tr=a}};function gn(a,l,d,v,w,E,I,H,Q){Jt=!1,Tr=null,Bt.apply(hn,arguments)}function An(a,l,d,v,w,E,I,H,Q){if(gn.apply(this,arguments),Jt){if(Jt){var ce=Tr;Jt=!1,Tr=null}else throw Error(r(198));Ir||(Ir=!0,Br=ce)}}function Ar(a){var l=a,d=a;if(a.alternate)for(;l.return;)l=l.return;else{a=l;do l=a,(l.flags&4098)!==0&&(d=l.return),a=l.return;while(a)}return l.tag===3?d:null}function ri(a){if(a.tag===13){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function er(a){if(Ar(a)!==a)throw Error(r(188))}function Vr(a){var l=a.alternate;if(!l){if(l=Ar(a),l===null)throw Error(r(188));return l!==a?null:a}for(var d=a,v=l;;){var w=d.return;if(w===null)break;var E=w.alternate;if(E===null){if(v=w.return,v!==null){d=v;continue}break}if(w.child===E.child){for(E=w.child;E;){if(E===d)return er(w),a;if(E===v)return er(w),l;E=E.sibling}throw Error(r(188))}if(d.return!==v.return)d=w,v=E;else{for(var I=!1,H=w.child;H;){if(H===d){I=!0,d=w,v=E;break}if(H===v){I=!0,v=w,d=E;break}H=H.sibling}if(!I){for(H=E.child;H;){if(H===d){I=!0,d=E,v=w;break}if(H===v){I=!0,v=E,d=w;break}H=H.sibling}if(!I)throw Error(r(189))}}if(d.alternate!==v)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?a:l}function kn(a){return a=Vr(a),a!==null?Pe(a):null}function Pe(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var l=Pe(a);if(l!==null)return l;a=a.sibling}return null}var Co=t.unstable_scheduleCallback,Vt=t.unstable_cancelCallback,ni=t.unstable_shouldYield,_o=t.unstable_requestPaint,Nt=t.unstable_now,ii=t.unstable_getCurrentPriorityLevel,ki=t.unstable_ImmediatePriority,Ro=t.unstable_UserBlockingPriority,oi=t.unstable_NormalPriority,Oo=t.unstable_LowPriority,Pn=t.unstable_IdlePriority,rn=null,gr=null;function ai(a){if(gr&&typeof gr.onCommitFiberRoot=="function")try{gr.onCommitFiberRoot(rn,a,void 0,(a.current.flags&128)===128)}catch{}}var dr=Math.clz32?Math.clz32:Mn,Pi=Math.log,Hr=Math.LN2;function Mn(a){return a>>>=0,a===0?32:31-(Pi(a)/Hr|0)|0}var Ur=64,Wr=4194304;function vn(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Mi(a,l){var d=a.pendingLanes;if(d===0)return 0;var v=0,w=a.suspendedLanes,E=a.pingedLanes,I=d&268435455;if(I!==0){var H=I&~w;H!==0?v=vn(H):(E&=I,E!==0&&(v=vn(E)))}else I=d&~w,I!==0?v=vn(I):E!==0&&(v=vn(E));if(v===0)return 0;if(l!==0&&l!==v&&(l&w)===0&&(w=v&-v,E=l&-l,w>=E||w===16&&(E&4194240)!==0))return l;if((v&4)!==0&&(v|=d&16),l=a.entangledLanes,l!==0)for(a=a.entanglements,l&=v;0<l;)d=31-dr(l),w=1<<d,v|=a[d],l&=~w;return v}function $o(a,l){switch(a){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function To(a,l){for(var d=a.suspendedLanes,v=a.pingedLanes,w=a.expirationTimes,E=a.pendingLanes;0<E;){var I=31-dr(E),H=1<<I,Q=w[I];Q===-1?((H&d)===0||(H&v)!==0)&&(w[I]=$o(H,l)):Q<=l&&(a.expiredLanes|=H),E&=~H}}function si(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function Io(){var a=Ur;return Ur<<=1,(Ur&4194240)===0&&(Ur=64),a}function no(a){for(var l=[],d=0;31>d;d++)l.push(a);return l}function Dn(a,l,d){a.pendingLanes|=l,l!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,l=31-dr(l),a[l]=d}function sa(a,l){var d=a.pendingLanes&~l;a.pendingLanes=l,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=l,a.mutableReadLanes&=l,a.entangledLanes&=l,l=a.entanglements;var v=a.eventTimes;for(a=a.expirationTimes;0<d;){var w=31-dr(d),E=1<<w;l[w]=0,v[w]=-1,a[w]=-1,d&=~E}}function io(a,l){var d=a.entangledLanes|=l;for(a=a.entanglements;d;){var v=31-dr(d),w=1<<v;w&l|a[v]&l&&(a[v]|=l),d&=~w}}var yt=0;function Ao(a){return a&=-a,1<a?4<a?(a&268435455)!==0?16:536870912:4:1}var ko,oo,Gr,Di,Po,Mo=!1,li=[],Gt=null,vr=null,Cr=null,kr=new Map,nn=new Map,qr=[],Do="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ao(a,l){switch(a){case"focusin":case"focusout":Gt=null;break;case"dragenter":case"dragleave":vr=null;break;case"mouseover":case"mouseout":Cr=null;break;case"pointerover":case"pointerout":kr.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":nn.delete(l.pointerId)}}function Le(a,l,d,v,w,E){return a===null||a.nativeEvent!==E?(a={blockedOn:l,domEventName:d,eventSystemFlags:v,nativeEvent:E,targetContainers:[w]},l!==null&&(l=au(l),l!==null&&oo(l)),a):(a.eventSystemFlags|=v,l=a.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),a)}function Ze(a,l,d,v,w){switch(l){case"focusin":return Gt=Le(Gt,a,l,d,v,w),!0;case"dragenter":return vr=Le(vr,a,l,d,v,w),!0;case"mouseover":return Cr=Le(Cr,a,l,d,v,w),!0;case"pointerover":var E=w.pointerId;return kr.set(E,Le(kr.get(E)||null,a,l,d,v,w)),!0;case"gotpointercapture":return E=w.pointerId,nn.set(E,Le(nn.get(E)||null,a,l,d,v,w)),!0}return!1}function $t(a){var l=Ha(a.target);if(l!==null){var d=Ar(l);if(d!==null){if(l=d.tag,l===13){if(l=ri(d),l!==null){a.blockedOn=l,Po(a.priority,function(){Gr(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Pt(a){if(a.blockedOn!==null)return!1;for(var l=a.targetContainers;0<l.length;){var d=rh(a.domEventName,a.eventSystemFlags,l[0],a.nativeEvent);if(d===null){d=a.nativeEvent;var v=new d.constructor(d.type,d);fe=v,d.target.dispatchEvent(v),fe=null}else return l=au(d),l!==null&&oo(l),a.blockedOn=d,!1;l.shift()}return!0}function Tt(a,l,d){Pt(a)&&d.delete(l)}function Lo(){Mo=!1,Gt!==null&&Pt(Gt)&&(Gt=null),vr!==null&&Pt(vr)&&(vr=null),Cr!==null&&Pt(Cr)&&(Cr=null),kr.forEach(Tt),nn.forEach(Tt)}function Fo(a,l){a.blockedOn===l&&(a.blockedOn=null,Mo||(Mo=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Lo)))}function la(a){function l(w){return Fo(w,a)}if(0<li.length){Fo(li[0],a);for(var d=1;d<li.length;d++){var v=li[d];v.blockedOn===a&&(v.blockedOn=null)}}for(Gt!==null&&Fo(Gt,a),vr!==null&&Fo(vr,a),Cr!==null&&Fo(Cr,a),kr.forEach(l),nn.forEach(l),d=0;d<qr.length;d++)v=qr[d],v.blockedOn===a&&(v.blockedOn=null);for(;0<qr.length&&(d=qr[0],d.blockedOn===null);)$t(d),d.blockedOn===null&&qr.shift()}var Li=R.ReactCurrentBatchConfig,Bc=!0;function nk(a,l,d,v){var w=yt,E=Li.transition;Li.transition=null;try{yt=1,th(a,l,d,v)}finally{yt=w,Li.transition=E}}function ik(a,l,d,v){var w=yt,E=Li.transition;Li.transition=null;try{yt=4,th(a,l,d,v)}finally{yt=w,Li.transition=E}}function th(a,l,d,v){if(Bc){var w=rh(a,l,d,v);if(w===null)bh(a,l,v,Vc,d),ao(a,v);else if(Ze(w,a,l,d,v))v.stopPropagation();else if(ao(a,v),l&4&&-1<Do.indexOf(a)){for(;w!==null;){var E=au(w);if(E!==null&&ko(E),E=rh(a,l,d,v),E===null&&bh(a,l,v,Vc,d),E===w)break;w=E}w!==null&&v.stopPropagation()}else bh(a,l,v,null,d)}}var Vc=null;function rh(a,l,d,v){if(Vc=null,a=he(v),a=Ha(a),a!==null)if(l=Ar(a),l===null)a=null;else if(d=l.tag,d===13){if(a=ri(l),a!==null)return a;a=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;a=null}else l!==a&&(a=null);return Vc=a,null}function _b(a){switch(a){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ii()){case ki:return 1;case Ro:return 4;case oi:case Oo:return 16;case Pn:return 536870912;default:return 16}default:return 16}}var ua=null,nh=null,Hc=null;function Rb(){if(Hc)return Hc;var a,l=nh,d=l.length,v,w="value"in ua?ua.value:ua.textContent,E=w.length;for(a=0;a<d&&l[a]===w[a];a++);var I=d-a;for(v=1;v<=I&&l[d-v]===w[E-v];v++);return Hc=w.slice(a,1<v?1-v:void 0)}function Uc(a){var l=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&l===13&&(a=13)):a=l,a===10&&(a=13),32<=a||a===13?a:0}function Wc(){return!0}function Ob(){return!1}function Ln(a){function l(d,v,w,E,I){this._reactName=d,this._targetInst=w,this.type=v,this.nativeEvent=E,this.target=I,this.currentTarget=null;for(var H in a)a.hasOwnProperty(H)&&(d=a[H],this[H]=d?d(E):E[H]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?Wc:Ob,this.isPropagationStopped=Ob,this}return K(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Wc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Wc)},persist:function(){},isPersistent:Wc}),l}var Ts={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ih=Ln(Ts),Kl=K({},Ts,{view:0,detail:0}),ok=Ln(Kl),oh,ah,Yl,Gc=K({},Kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lh,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Yl&&(Yl&&a.type==="mousemove"?(oh=a.screenX-Yl.screenX,ah=a.screenY-Yl.screenY):ah=oh=0,Yl=a),oh)},movementY:function(a){return"movementY"in a?a.movementY:ah}}),$b=Ln(Gc),ak=K({},Gc,{dataTransfer:0}),sk=Ln(ak),lk=K({},Kl,{relatedTarget:0}),sh=Ln(lk),uk=K({},Ts,{animationName:0,elapsedTime:0,pseudoElement:0}),ck=Ln(uk),fk=K({},Ts,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),dk=Ln(fk),pk=K({},Ts,{data:0}),Tb=Ln(pk),hk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},vk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mk(a){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(a):(a=vk[a])?!!l[a]:!1}function lh(){return mk}var yk=K({},Kl,{key:function(a){if(a.key){var l=hk[a.key]||a.key;if(l!=="Unidentified")return l}return a.type==="keypress"?(a=Uc(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?gk[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lh,charCode:function(a){return a.type==="keypress"?Uc(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Uc(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),bk=Ln(yk),Sk=K({},Gc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ib=Ln(Sk),wk=K({},Kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lh}),xk=Ln(wk),Ek=K({},Ts,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ck=Ln(Ek),_k=K({},Gc,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Rk=Ln(_k),Ok=[9,13,27,32],uh=u&&"CompositionEvent"in window,Ql=null;u&&"documentMode"in document&&(Ql=document.documentMode);var $k=u&&"TextEvent"in window&&!Ql,Ab=u&&(!uh||Ql&&8<Ql&&11>=Ql),kb=" ",Pb=!1;function Mb(a,l){switch(a){case"keyup":return Ok.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Db(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Is=!1;function Tk(a,l){switch(a){case"compositionend":return Db(l);case"keypress":return l.which!==32?null:(Pb=!0,kb);case"textInput":return a=l.data,a===kb&&Pb?null:a;default:return null}}function Ik(a,l){if(Is)return a==="compositionend"||!uh&&Mb(a,l)?(a=Rb(),Hc=nh=ua=null,Is=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Ab&&l.locale!=="ko"?null:l.data;default:return null}}var Ak={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Lb(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l==="input"?!!Ak[a.type]:l==="textarea"}function Fb(a,l,d,v){it(v),l=Qc(l,"onChange"),0<l.length&&(d=new ih("onChange","change",null,d,v),a.push({event:d,listeners:l}))}var Jl=null,Zl=null;function kk(a){tS(a,0)}function qc(a){var l=Ds(a);if(Oe(l))return a}function Pk(a,l){if(a==="change")return l}var Nb=!1;if(u){var ch;if(u){var fh="oninput"in document;if(!fh){var jb=document.createElement("div");jb.setAttribute("oninput","return;"),fh=typeof jb.oninput=="function"}ch=fh}else ch=!1;Nb=ch&&(!document.documentMode||9<document.documentMode)}function zb(){Jl&&(Jl.detachEvent("onpropertychange",Bb),Zl=Jl=null)}function Bb(a){if(a.propertyName==="value"&&qc(Zl)){var l=[];Fb(l,Zl,a,he(a)),pt(kk,l)}}function Mk(a,l,d){a==="focusin"?(zb(),Jl=l,Zl=d,Jl.attachEvent("onpropertychange",Bb)):a==="focusout"&&zb()}function Dk(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return qc(Zl)}function Lk(a,l){if(a==="click")return qc(l)}function Fk(a,l){if(a==="input"||a==="change")return qc(l)}function Nk(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var Fi=typeof Object.is=="function"?Object.is:Nk;function eu(a,l){if(Fi(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;var d=Object.keys(a),v=Object.keys(l);if(d.length!==v.length)return!1;for(v=0;v<d.length;v++){var w=d[v];if(!c.call(l,w)||!Fi(a[w],l[w]))return!1}return!0}function Vb(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Hb(a,l){var d=Vb(a);a=0;for(var v;d;){if(d.nodeType===3){if(v=a+d.textContent.length,a<=l&&v>=l)return{node:d,offset:l-a};a=v}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Vb(d)}}function Ub(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?Ub(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function Wb(){for(var a=window,l=je();l instanceof a.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)a=l.contentWindow;else break;l=je(a.document)}return l}function dh(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}function jk(a){var l=Wb(),d=a.focusedElem,v=a.selectionRange;if(l!==d&&d&&d.ownerDocument&&Ub(d.ownerDocument.documentElement,d)){if(v!==null&&dh(d)){if(l=v.start,a=v.end,a===void 0&&(a=l),"selectionStart"in d)d.selectionStart=l,d.selectionEnd=Math.min(a,d.value.length);else if(a=(l=d.ownerDocument||document)&&l.defaultView||window,a.getSelection){a=a.getSelection();var w=d.textContent.length,E=Math.min(v.start,w);v=v.end===void 0?E:Math.min(v.end,w),!a.extend&&E>v&&(w=v,v=E,E=w),w=Hb(d,E);var I=Hb(d,v);w&&I&&(a.rangeCount!==1||a.anchorNode!==w.node||a.anchorOffset!==w.offset||a.focusNode!==I.node||a.focusOffset!==I.offset)&&(l=l.createRange(),l.setStart(w.node,w.offset),a.removeAllRanges(),E>v?(a.addRange(l),a.extend(I.node,I.offset)):(l.setEnd(I.node,I.offset),a.addRange(l)))}}for(l=[],a=d;a=a.parentNode;)a.nodeType===1&&l.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<l.length;d++)a=l[d],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var zk=u&&"documentMode"in document&&11>=document.documentMode,As=null,ph=null,tu=null,hh=!1;function Gb(a,l,d){var v=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;hh||As==null||As!==je(v)||(v=As,"selectionStart"in v&&dh(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),tu&&eu(tu,v)||(tu=v,v=Qc(ph,"onSelect"),0<v.length&&(l=new ih("onSelect","select",null,l,d),a.push({event:l,listeners:v}),l.target=As)))}function Xc(a,l){var d={};return d[a.toLowerCase()]=l.toLowerCase(),d["Webkit"+a]="webkit"+l,d["Moz"+a]="moz"+l,d}var ks={animationend:Xc("Animation","AnimationEnd"),animationiteration:Xc("Animation","AnimationIteration"),animationstart:Xc("Animation","AnimationStart"),transitionend:Xc("Transition","TransitionEnd")},gh={},qb={};u&&(qb=document.createElement("div").style,"AnimationEvent"in window||(delete ks.animationend.animation,delete ks.animationiteration.animation,delete ks.animationstart.animation),"TransitionEvent"in window||delete ks.transitionend.transition);function Kc(a){if(gh[a])return gh[a];if(!ks[a])return a;var l=ks[a],d;for(d in l)if(l.hasOwnProperty(d)&&d in qb)return gh[a]=l[d];return a}var Xb=Kc("animationend"),Kb=Kc("animationiteration"),Yb=Kc("animationstart"),Qb=Kc("transitionend"),Jb=new Map,Zb="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ca(a,l){Jb.set(a,l),o(l,[a])}for(var vh=0;vh<Zb.length;vh++){var mh=Zb[vh],Bk=mh.toLowerCase(),Vk=mh[0].toUpperCase()+mh.slice(1);ca(Bk,"on"+Vk)}ca(Xb,"onAnimationEnd"),ca(Kb,"onAnimationIteration"),ca(Yb,"onAnimationStart"),ca("dblclick","onDoubleClick"),ca("focusin","onFocus"),ca("focusout","onBlur"),ca(Qb,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ru="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Hk=new Set("cancel close invalid load scroll toggle".split(" ").concat(ru));function eS(a,l,d){var v=a.type||"unknown-event";a.currentTarget=d,An(v,l,void 0,a),a.currentTarget=null}function tS(a,l){l=(l&4)!==0;for(var d=0;d<a.length;d++){var v=a[d],w=v.event;v=v.listeners;e:{var E=void 0;if(l)for(var I=v.length-1;0<=I;I--){var H=v[I],Q=H.instance,ce=H.currentTarget;if(H=H.listener,Q!==E&&w.isPropagationStopped())break e;eS(w,H,ce),E=Q}else for(I=0;I<v.length;I++){if(H=v[I],Q=H.instance,ce=H.currentTarget,H=H.listener,Q!==E&&w.isPropagationStopped())break e;eS(w,H,ce),E=Q}}}if(Ir)throw a=Br,Ir=!1,Br=null,a}function Yt(a,l){var d=l[_h];d===void 0&&(d=l[_h]=new Set);var v=a+"__bubble";d.has(v)||(rS(l,a,2,!1),d.add(v))}function yh(a,l,d){var v=0;l&&(v|=4),rS(d,a,v,l)}var Yc="_reactListening"+Math.random().toString(36).slice(2);function nu(a){if(!a[Yc]){a[Yc]=!0,n.forEach(function(d){d!=="selectionchange"&&(Hk.has(d)||yh(d,!1,a),yh(d,!0,a))});var l=a.nodeType===9?a:a.ownerDocument;l===null||l[Yc]||(l[Yc]=!0,yh("selectionchange",!1,l))}}function rS(a,l,d,v){switch(_b(l)){case 1:var w=nk;break;case 4:w=ik;break;default:w=th}d=w.bind(null,l,d,a),w=void 0,!mt||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(w=!0),v?w!==void 0?a.addEventListener(l,d,{capture:!0,passive:w}):a.addEventListener(l,d,!0):w!==void 0?a.addEventListener(l,d,{passive:w}):a.addEventListener(l,d,!1)}function bh(a,l,d,v,w){var E=v;if((l&1)===0&&(l&2)===0&&v!==null)e:for(;;){if(v===null)return;var I=v.tag;if(I===3||I===4){var H=v.stateNode.containerInfo;if(H===w||H.nodeType===8&&H.parentNode===w)break;if(I===4)for(I=v.return;I!==null;){var Q=I.tag;if((Q===3||Q===4)&&(Q=I.stateNode.containerInfo,Q===w||Q.nodeType===8&&Q.parentNode===w))return;I=I.return}for(;H!==null;){if(I=Ha(H),I===null)return;if(Q=I.tag,Q===5||Q===6){v=E=I;continue e}H=H.parentNode}}v=v.return}pt(function(){var ce=E,Se=he(d),xe=[];e:{var be=Jb.get(a);if(be!==void 0){var Fe=ih,He=a;switch(a){case"keypress":if(Uc(d)===0)break e;case"keydown":case"keyup":Fe=bk;break;case"focusin":He="focus",Fe=sh;break;case"focusout":He="blur",Fe=sh;break;case"beforeblur":case"afterblur":Fe=sh;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Fe=$b;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Fe=sk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Fe=xk;break;case Xb:case Kb:case Yb:Fe=ck;break;case Qb:Fe=Ck;break;case"scroll":Fe=ok;break;case"wheel":Fe=Rk;break;case"copy":case"cut":case"paste":Fe=dk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Fe=Ib}var We=(l&4)!==0,sr=!We&&a==="scroll",ae=We?be!==null?be+"Capture":null:be;We=[];for(var ee=ce,le;ee!==null;){le=ee;var Re=le.stateNode;if(le.tag===5&&Re!==null&&(le=Re,ae!==null&&(Re=wt(ee,ae),Re!=null&&We.push(iu(ee,Re,le)))),sr)break;ee=ee.return}0<We.length&&(be=new Fe(be,He,null,d,Se),xe.push({event:be,listeners:We}))}}if((l&7)===0){e:{if(be=a==="mouseover"||a==="pointerover",Fe=a==="mouseout"||a==="pointerout",be&&d!==fe&&(He=d.relatedTarget||d.fromElement)&&(Ha(He)||He[No]))break e;if((Fe||be)&&(be=Se.window===Se?Se:(be=Se.ownerDocument)?be.defaultView||be.parentWindow:window,Fe?(He=d.relatedTarget||d.toElement,Fe=ce,He=He?Ha(He):null,He!==null&&(sr=Ar(He),He!==sr||He.tag!==5&&He.tag!==6)&&(He=null)):(Fe=null,He=ce),Fe!==He)){if(We=$b,Re="onMouseLeave",ae="onMouseEnter",ee="mouse",(a==="pointerout"||a==="pointerover")&&(We=Ib,Re="onPointerLeave",ae="onPointerEnter",ee="pointer"),sr=Fe==null?be:Ds(Fe),le=He==null?be:Ds(He),be=new We(Re,ee+"leave",Fe,d,Se),be.target=sr,be.relatedTarget=le,Re=null,Ha(Se)===ce&&(We=new We(ae,ee+"enter",He,d,Se),We.target=le,We.relatedTarget=sr,Re=We),sr=Re,Fe&&He)t:{for(We=Fe,ae=He,ee=0,le=We;le;le=Ps(le))ee++;for(le=0,Re=ae;Re;Re=Ps(Re))le++;for(;0<ee-le;)We=Ps(We),ee--;for(;0<le-ee;)ae=Ps(ae),le--;for(;ee--;){if(We===ae||ae!==null&&We===ae.alternate)break t;We=Ps(We),ae=Ps(ae)}We=null}else We=null;Fe!==null&&nS(xe,be,Fe,We,!1),He!==null&&sr!==null&&nS(xe,sr,He,We,!0)}}e:{if(be=ce?Ds(ce):window,Fe=be.nodeName&&be.nodeName.toLowerCase(),Fe==="select"||Fe==="input"&&be.type==="file")var qe=Pk;else if(Lb(be))if(Nb)qe=Fk;else{qe=Dk;var et=Mk}else(Fe=be.nodeName)&&Fe.toLowerCase()==="input"&&(be.type==="checkbox"||be.type==="radio")&&(qe=Lk);if(qe&&(qe=qe(a,ce))){Fb(xe,qe,d,Se);break e}et&&et(a,be,ce),a==="focusout"&&(et=be._wrapperState)&&et.controlled&&be.type==="number"&&nt(be,"number",be.value)}switch(et=ce?Ds(ce):window,a){case"focusin":(Lb(et)||et.contentEditable==="true")&&(As=et,ph=ce,tu=null);break;case"focusout":tu=ph=As=null;break;case"mousedown":hh=!0;break;case"contextmenu":case"mouseup":case"dragend":hh=!1,Gb(xe,d,Se);break;case"selectionchange":if(zk)break;case"keydown":case"keyup":Gb(xe,d,Se)}var tt;if(uh)e:{switch(a){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else Is?Mb(a,d)&&(lt="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(lt="onCompositionStart");lt&&(Ab&&d.locale!=="ko"&&(Is||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&Is&&(tt=Rb()):(ua=Se,nh="value"in ua?ua.value:ua.textContent,Is=!0)),et=Qc(ce,lt),0<et.length&&(lt=new Tb(lt,a,null,d,Se),xe.push({event:lt,listeners:et}),tt?lt.data=tt:(tt=Db(d),tt!==null&&(lt.data=tt)))),(tt=$k?Tk(a,d):Ik(a,d))&&(ce=Qc(ce,"onBeforeInput"),0<ce.length&&(Se=new Tb("onBeforeInput","beforeinput",null,d,Se),xe.push({event:Se,listeners:ce}),Se.data=tt))}tS(xe,l)})}function iu(a,l,d){return{instance:a,listener:l,currentTarget:d}}function Qc(a,l){for(var d=l+"Capture",v=[];a!==null;){var w=a,E=w.stateNode;w.tag===5&&E!==null&&(w=E,E=wt(a,d),E!=null&&v.unshift(iu(a,E,w)),E=wt(a,l),E!=null&&v.push(iu(a,E,w))),a=a.return}return v}function Ps(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function nS(a,l,d,v,w){for(var E=l._reactName,I=[];d!==null&&d!==v;){var H=d,Q=H.alternate,ce=H.stateNode;if(Q!==null&&Q===v)break;H.tag===5&&ce!==null&&(H=ce,w?(Q=wt(d,E),Q!=null&&I.unshift(iu(d,Q,H))):w||(Q=wt(d,E),Q!=null&&I.push(iu(d,Q,H)))),d=d.return}I.length!==0&&a.push({event:l,listeners:I})}var Uk=/\r\n?/g,Wk=/\u0000|\uFFFD/g;function iS(a){return(typeof a=="string"?a:""+a).replace(Uk,`
9
+ `).replace(Wk,"")}function Jc(a,l,d){if(l=iS(l),iS(a)!==l&&d)throw Error(r(425))}function Zc(){}var Sh=null,wh=null;function xh(a,l){return a==="textarea"||a==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Eh=typeof setTimeout=="function"?setTimeout:void 0,Gk=typeof clearTimeout=="function"?clearTimeout:void 0,oS=typeof Promise=="function"?Promise:void 0,qk=typeof queueMicrotask=="function"?queueMicrotask:typeof oS<"u"?function(a){return oS.resolve(null).then(a).catch(Xk)}:Eh;function Xk(a){setTimeout(function(){throw a})}function Ch(a,l){var d=l,v=0;do{var w=d.nextSibling;if(a.removeChild(d),w&&w.nodeType===8)if(d=w.data,d==="/$"){if(v===0){a.removeChild(w),la(l);return}v--}else d!=="$"&&d!=="$?"&&d!=="$!"||v++;d=w}while(d);la(l)}function fa(a){for(;a!=null;a=a.nextSibling){var l=a.nodeType;if(l===1||l===3)break;if(l===8){if(l=a.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return a}function aS(a){a=a.previousSibling;for(var l=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"){if(l===0)return a;l--}else d==="/$"&&l++}a=a.previousSibling}return null}var Ms=Math.random().toString(36).slice(2),so="__reactFiber$"+Ms,ou="__reactProps$"+Ms,No="__reactContainer$"+Ms,_h="__reactEvents$"+Ms,Kk="__reactListeners$"+Ms,Yk="__reactHandles$"+Ms;function Ha(a){var l=a[so];if(l)return l;for(var d=a.parentNode;d;){if(l=d[No]||d[so]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(a=aS(a);a!==null;){if(d=a[so])return d;a=aS(a)}return l}a=d,d=a.parentNode}return null}function au(a){return a=a[so]||a[No],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function Ds(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(r(33))}function ef(a){return a[ou]||null}var Rh=[],Ls=-1;function da(a){return{current:a}}function Qt(a){0>Ls||(a.current=Rh[Ls],Rh[Ls]=null,Ls--)}function qt(a,l){Ls++,Rh[Ls]=a.current,a.current=l}var pa={},Xr=da(pa),mn=da(!1),Ua=pa;function Fs(a,l){var d=a.type.contextTypes;if(!d)return pa;var v=a.stateNode;if(v&&v.__reactInternalMemoizedUnmaskedChildContext===l)return v.__reactInternalMemoizedMaskedChildContext;var w={},E;for(E in d)w[E]=l[E];return v&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=l,a.__reactInternalMemoizedMaskedChildContext=w),w}function yn(a){return a=a.childContextTypes,a!=null}function tf(){Qt(mn),Qt(Xr)}function sS(a,l,d){if(Xr.current!==pa)throw Error(r(168));qt(Xr,l),qt(mn,d)}function lS(a,l,d){var v=a.stateNode;if(l=l.childContextTypes,typeof v.getChildContext!="function")return d;v=v.getChildContext();for(var w in v)if(!(w in l))throw Error(r(108,ve(a)||"Unknown",w));return K({},d,v)}function rf(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||pa,Ua=Xr.current,qt(Xr,a),qt(mn,mn.current),!0}function uS(a,l,d){var v=a.stateNode;if(!v)throw Error(r(169));d?(a=lS(a,l,Ua),v.__reactInternalMemoizedMergedChildContext=a,Qt(mn),Qt(Xr),qt(Xr,a)):Qt(mn),qt(mn,d)}var jo=null,nf=!1,Oh=!1;function cS(a){jo===null?jo=[a]:jo.push(a)}function Qk(a){nf=!0,cS(a)}function ha(){if(!Oh&&jo!==null){Oh=!0;var a=0,l=yt;try{var d=jo;for(yt=1;a<d.length;a++){var v=d[a];do v=v(!0);while(v!==null)}jo=null,nf=!1}catch(w){throw jo!==null&&(jo=jo.slice(a+1)),Co(ki,ha),w}finally{yt=l,Oh=!1}}return null}var Ns=[],js=0,of=null,af=0,ui=[],ci=0,Wa=null,zo=1,Bo="";function Ga(a,l){Ns[js++]=af,Ns[js++]=of,of=a,af=l}function fS(a,l,d){ui[ci++]=zo,ui[ci++]=Bo,ui[ci++]=Wa,Wa=a;var v=zo;a=Bo;var w=32-dr(v)-1;v&=~(1<<w),d+=1;var E=32-dr(l)+w;if(30<E){var I=w-w%5;E=(v&(1<<I)-1).toString(32),v>>=I,w-=I,zo=1<<32-dr(l)+w|d<<w|v,Bo=E+a}else zo=1<<E|d<<w|v,Bo=a}function $h(a){a.return!==null&&(Ga(a,1),fS(a,1,0))}function Th(a){for(;a===of;)of=Ns[--js],Ns[js]=null,af=Ns[--js],Ns[js]=null;for(;a===Wa;)Wa=ui[--ci],ui[ci]=null,Bo=ui[--ci],ui[ci]=null,zo=ui[--ci],ui[ci]=null}var Fn=null,Nn=null,Zt=!1,Ni=null;function dS(a,l){var d=hi(5,null,null,0);d.elementType="DELETED",d.stateNode=l,d.return=a,l=a.deletions,l===null?(a.deletions=[d],a.flags|=16):l.push(d)}function pS(a,l){switch(a.tag){case 5:var d=a.type;return l=l.nodeType!==1||d.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(a.stateNode=l,Fn=a,Nn=fa(l.firstChild),!0):!1;case 6:return l=a.pendingProps===""||l.nodeType!==3?null:l,l!==null?(a.stateNode=l,Fn=a,Nn=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(d=Wa!==null?{id:zo,overflow:Bo}:null,a.memoizedState={dehydrated:l,treeContext:d,retryLane:1073741824},d=hi(18,null,null,0),d.stateNode=l,d.return=a,a.child=d,Fn=a,Nn=null,!0):!1;default:return!1}}function Ih(a){return(a.mode&1)!==0&&(a.flags&128)===0}function Ah(a){if(Zt){var l=Nn;if(l){var d=l;if(!pS(a,l)){if(Ih(a))throw Error(r(418));l=fa(d.nextSibling);var v=Fn;l&&pS(a,l)?dS(v,d):(a.flags=a.flags&-4097|2,Zt=!1,Fn=a)}}else{if(Ih(a))throw Error(r(418));a.flags=a.flags&-4097|2,Zt=!1,Fn=a}}}function hS(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;Fn=a}function sf(a){if(a!==Fn)return!1;if(!Zt)return hS(a),Zt=!0,!1;var l;if((l=a.tag!==3)&&!(l=a.tag!==5)&&(l=a.type,l=l!=="head"&&l!=="body"&&!xh(a.type,a.memoizedProps)),l&&(l=Nn)){if(Ih(a))throw gS(),Error(r(418));for(;l;)dS(a,l),l=fa(l.nextSibling)}if(hS(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));e:{for(a=a.nextSibling,l=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"){if(l===0){Nn=fa(a.nextSibling);break e}l--}else d!=="$"&&d!=="$!"&&d!=="$?"||l++}a=a.nextSibling}Nn=null}}else Nn=Fn?fa(a.stateNode.nextSibling):null;return!0}function gS(){for(var a=Nn;a;)a=fa(a.nextSibling)}function zs(){Nn=Fn=null,Zt=!1}function kh(a){Ni===null?Ni=[a]:Ni.push(a)}var Jk=R.ReactCurrentBatchConfig;function su(a,l,d){if(a=d.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var v=d.stateNode}if(!v)throw Error(r(147,a));var w=v,E=""+a;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===E?l.ref:(l=function(I){var H=w.refs;I===null?delete H[E]:H[E]=I},l._stringRef=E,l)}if(typeof a!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,a))}return a}function lf(a,l){throw a=Object.prototype.toString.call(l),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":a))}function vS(a){var l=a._init;return l(a._payload)}function mS(a){function l(ae,ee){if(a){var le=ae.deletions;le===null?(ae.deletions=[ee],ae.flags|=16):le.push(ee)}}function d(ae,ee){if(!a)return null;for(;ee!==null;)l(ae,ee),ee=ee.sibling;return null}function v(ae,ee){for(ae=new Map;ee!==null;)ee.key!==null?ae.set(ee.key,ee):ae.set(ee.index,ee),ee=ee.sibling;return ae}function w(ae,ee){return ae=xa(ae,ee),ae.index=0,ae.sibling=null,ae}function E(ae,ee,le){return ae.index=le,a?(le=ae.alternate,le!==null?(le=le.index,le<ee?(ae.flags|=2,ee):le):(ae.flags|=2,ee)):(ae.flags|=1048576,ee)}function I(ae){return a&&ae.alternate===null&&(ae.flags|=2),ae}function H(ae,ee,le,Re){return ee===null||ee.tag!==6?(ee=Eg(le,ae.mode,Re),ee.return=ae,ee):(ee=w(ee,le),ee.return=ae,ee)}function Q(ae,ee,le,Re){var qe=le.type;return qe===P?Se(ae,ee,le.props.children,Re,le.key):ee!==null&&(ee.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===q&&vS(qe)===ee.type)?(Re=w(ee,le.props),Re.ref=su(ae,ee,le),Re.return=ae,Re):(Re=kf(le.type,le.key,le.props,null,ae.mode,Re),Re.ref=su(ae,ee,le),Re.return=ae,Re)}function ce(ae,ee,le,Re){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==le.containerInfo||ee.stateNode.implementation!==le.implementation?(ee=Cg(le,ae.mode,Re),ee.return=ae,ee):(ee=w(ee,le.children||[]),ee.return=ae,ee)}function Se(ae,ee,le,Re,qe){return ee===null||ee.tag!==7?(ee=es(le,ae.mode,Re,qe),ee.return=ae,ee):(ee=w(ee,le),ee.return=ae,ee)}function xe(ae,ee,le){if(typeof ee=="string"&&ee!==""||typeof ee=="number")return ee=Eg(""+ee,ae.mode,le),ee.return=ae,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case $:return le=kf(ee.type,ee.key,ee.props,null,ae.mode,le),le.ref=su(ae,null,ee),le.return=ae,le;case T:return ee=Cg(ee,ae.mode,le),ee.return=ae,ee;case q:var Re=ee._init;return xe(ae,Re(ee._payload),le)}if(ze(ee)||G(ee))return ee=es(ee,ae.mode,le,null),ee.return=ae,ee;lf(ae,ee)}return null}function be(ae,ee,le,Re){var qe=ee!==null?ee.key:null;if(typeof le=="string"&&le!==""||typeof le=="number")return qe!==null?null:H(ae,ee,""+le,Re);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case $:return le.key===qe?Q(ae,ee,le,Re):null;case T:return le.key===qe?ce(ae,ee,le,Re):null;case q:return qe=le._init,be(ae,ee,qe(le._payload),Re)}if(ze(le)||G(le))return qe!==null?null:Se(ae,ee,le,Re,null);lf(ae,le)}return null}function Fe(ae,ee,le,Re,qe){if(typeof Re=="string"&&Re!==""||typeof Re=="number")return ae=ae.get(le)||null,H(ee,ae,""+Re,qe);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case $:return ae=ae.get(Re.key===null?le:Re.key)||null,Q(ee,ae,Re,qe);case T:return ae=ae.get(Re.key===null?le:Re.key)||null,ce(ee,ae,Re,qe);case q:var et=Re._init;return Fe(ae,ee,le,et(Re._payload),qe)}if(ze(Re)||G(Re))return ae=ae.get(le)||null,Se(ee,ae,Re,qe,null);lf(ee,Re)}return null}function He(ae,ee,le,Re){for(var qe=null,et=null,tt=ee,lt=ee=0,Or=null;tt!==null&&lt<le.length;lt++){tt.index>lt?(Or=tt,tt=null):Or=tt.sibling;var _t=be(ae,tt,le[lt],Re);if(_t===null){tt===null&&(tt=Or);break}a&&tt&&_t.alternate===null&&l(ae,tt),ee=E(_t,ee,lt),et===null?qe=_t:et.sibling=_t,et=_t,tt=Or}if(lt===le.length)return d(ae,tt),Zt&&Ga(ae,lt),qe;if(tt===null){for(;lt<le.length;lt++)tt=xe(ae,le[lt],Re),tt!==null&&(ee=E(tt,ee,lt),et===null?qe=tt:et.sibling=tt,et=tt);return Zt&&Ga(ae,lt),qe}for(tt=v(ae,tt);lt<le.length;lt++)Or=Fe(tt,ae,lt,le[lt],Re),Or!==null&&(a&&Or.alternate!==null&&tt.delete(Or.key===null?lt:Or.key),ee=E(Or,ee,lt),et===null?qe=Or:et.sibling=Or,et=Or);return a&&tt.forEach(function(Ea){return l(ae,Ea)}),Zt&&Ga(ae,lt),qe}function We(ae,ee,le,Re){var qe=G(le);if(typeof qe!="function")throw Error(r(150));if(le=qe.call(le),le==null)throw Error(r(151));for(var et=qe=null,tt=ee,lt=ee=0,Or=null,_t=le.next();tt!==null&&!_t.done;lt++,_t=le.next()){tt.index>lt?(Or=tt,tt=null):Or=tt.sibling;var Ea=be(ae,tt,_t.value,Re);if(Ea===null){tt===null&&(tt=Or);break}a&&tt&&Ea.alternate===null&&l(ae,tt),ee=E(Ea,ee,lt),et===null?qe=Ea:et.sibling=Ea,et=Ea,tt=Or}if(_t.done)return d(ae,tt),Zt&&Ga(ae,lt),qe;if(tt===null){for(;!_t.done;lt++,_t=le.next())_t=xe(ae,_t.value,Re),_t!==null&&(ee=E(_t,ee,lt),et===null?qe=_t:et.sibling=_t,et=_t);return Zt&&Ga(ae,lt),qe}for(tt=v(ae,tt);!_t.done;lt++,_t=le.next())_t=Fe(tt,ae,lt,_t.value,Re),_t!==null&&(a&&_t.alternate!==null&&tt.delete(_t.key===null?lt:_t.key),ee=E(_t,ee,lt),et===null?qe=_t:et.sibling=_t,et=_t);return a&&tt.forEach(function(A5){return l(ae,A5)}),Zt&&Ga(ae,lt),qe}function sr(ae,ee,le,Re){if(typeof le=="object"&&le!==null&&le.type===P&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case $:e:{for(var qe=le.key,et=ee;et!==null;){if(et.key===qe){if(qe=le.type,qe===P){if(et.tag===7){d(ae,et.sibling),ee=w(et,le.props.children),ee.return=ae,ae=ee;break e}}else if(et.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===q&&vS(qe)===et.type){d(ae,et.sibling),ee=w(et,le.props),ee.ref=su(ae,et,le),ee.return=ae,ae=ee;break e}d(ae,et);break}else l(ae,et);et=et.sibling}le.type===P?(ee=es(le.props.children,ae.mode,Re,le.key),ee.return=ae,ae=ee):(Re=kf(le.type,le.key,le.props,null,ae.mode,Re),Re.ref=su(ae,ee,le),Re.return=ae,ae=Re)}return I(ae);case T:e:{for(et=le.key;ee!==null;){if(ee.key===et)if(ee.tag===4&&ee.stateNode.containerInfo===le.containerInfo&&ee.stateNode.implementation===le.implementation){d(ae,ee.sibling),ee=w(ee,le.children||[]),ee.return=ae,ae=ee;break e}else{d(ae,ee);break}else l(ae,ee);ee=ee.sibling}ee=Cg(le,ae.mode,Re),ee.return=ae,ae=ee}return I(ae);case q:return et=le._init,sr(ae,ee,et(le._payload),Re)}if(ze(le))return He(ae,ee,le,Re);if(G(le))return We(ae,ee,le,Re);lf(ae,le)}return typeof le=="string"&&le!==""||typeof le=="number"?(le=""+le,ee!==null&&ee.tag===6?(d(ae,ee.sibling),ee=w(ee,le),ee.return=ae,ae=ee):(d(ae,ee),ee=Eg(le,ae.mode,Re),ee.return=ae,ae=ee),I(ae)):d(ae,ee)}return sr}var Bs=mS(!0),yS=mS(!1),uf=da(null),cf=null,Vs=null,Ph=null;function Mh(){Ph=Vs=cf=null}function Dh(a){var l=uf.current;Qt(uf),a._currentValue=l}function Lh(a,l,d){for(;a!==null;){var v=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,v!==null&&(v.childLanes|=l)):v!==null&&(v.childLanes&l)!==l&&(v.childLanes|=l),a===d)break;a=a.return}}function Hs(a,l){cf=a,Ph=Vs=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&l)!==0&&(bn=!0),a.firstContext=null)}function fi(a){var l=a._currentValue;if(Ph!==a)if(a={context:a,memoizedValue:l,next:null},Vs===null){if(cf===null)throw Error(r(308));Vs=a,cf.dependencies={lanes:0,firstContext:a}}else Vs=Vs.next=a;return l}var qa=null;function Fh(a){qa===null?qa=[a]:qa.push(a)}function bS(a,l,d,v){var w=l.interleaved;return w===null?(d.next=d,Fh(l)):(d.next=w.next,w.next=d),l.interleaved=d,Vo(a,v)}function Vo(a,l){a.lanes|=l;var d=a.alternate;for(d!==null&&(d.lanes|=l),d=a,a=a.return;a!==null;)a.childLanes|=l,d=a.alternate,d!==null&&(d.childLanes|=l),d=a,a=a.return;return d.tag===3?d.stateNode:null}var ga=!1;function Nh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function SS(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Ho(a,l){return{eventTime:a,lane:l,tag:0,payload:null,callback:null,next:null}}function va(a,l,d){var v=a.updateQueue;if(v===null)return null;if(v=v.shared,(Ct&2)!==0){var w=v.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),v.pending=l,Vo(a,d)}return w=v.interleaved,w===null?(l.next=l,Fh(v)):(l.next=w.next,w.next=l),v.interleaved=l,Vo(a,d)}function ff(a,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194240)!==0)){var v=l.lanes;v&=a.pendingLanes,d|=v,l.lanes=d,io(a,d)}}function wS(a,l){var d=a.updateQueue,v=a.alternate;if(v!==null&&(v=v.updateQueue,d===v)){var w=null,E=null;if(d=d.firstBaseUpdate,d!==null){do{var I={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};E===null?w=E=I:E=E.next=I,d=d.next}while(d!==null);E===null?w=E=l:E=E.next=l}else w=E=l;d={baseState:v.baseState,firstBaseUpdate:w,lastBaseUpdate:E,shared:v.shared,effects:v.effects},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=l:a.next=l,d.lastBaseUpdate=l}function df(a,l,d,v){var w=a.updateQueue;ga=!1;var E=w.firstBaseUpdate,I=w.lastBaseUpdate,H=w.shared.pending;if(H!==null){w.shared.pending=null;var Q=H,ce=Q.next;Q.next=null,I===null?E=ce:I.next=ce,I=Q;var Se=a.alternate;Se!==null&&(Se=Se.updateQueue,H=Se.lastBaseUpdate,H!==I&&(H===null?Se.firstBaseUpdate=ce:H.next=ce,Se.lastBaseUpdate=Q))}if(E!==null){var xe=w.baseState;I=0,Se=ce=Q=null,H=E;do{var be=H.lane,Fe=H.eventTime;if((v&be)===be){Se!==null&&(Se=Se.next={eventTime:Fe,lane:0,tag:H.tag,payload:H.payload,callback:H.callback,next:null});e:{var He=a,We=H;switch(be=l,Fe=d,We.tag){case 1:if(He=We.payload,typeof He=="function"){xe=He.call(Fe,xe,be);break e}xe=He;break e;case 3:He.flags=He.flags&-65537|128;case 0:if(He=We.payload,be=typeof He=="function"?He.call(Fe,xe,be):He,be==null)break e;xe=K({},xe,be);break e;case 2:ga=!0}}H.callback!==null&&H.lane!==0&&(a.flags|=64,be=w.effects,be===null?w.effects=[H]:be.push(H))}else Fe={eventTime:Fe,lane:be,tag:H.tag,payload:H.payload,callback:H.callback,next:null},Se===null?(ce=Se=Fe,Q=xe):Se=Se.next=Fe,I|=be;if(H=H.next,H===null){if(H=w.shared.pending,H===null)break;be=H,H=be.next,be.next=null,w.lastBaseUpdate=be,w.shared.pending=null}}while(!0);if(Se===null&&(Q=xe),w.baseState=Q,w.firstBaseUpdate=ce,w.lastBaseUpdate=Se,l=w.shared.interleaved,l!==null){w=l;do I|=w.lane,w=w.next;while(w!==l)}else E===null&&(w.shared.lanes=0);Ya|=I,a.lanes=I,a.memoizedState=xe}}function xS(a,l,d){if(a=l.effects,l.effects=null,a!==null)for(l=0;l<a.length;l++){var v=a[l],w=v.callback;if(w!==null){if(v.callback=null,v=d,typeof w!="function")throw Error(r(191,w));w.call(v)}}}var lu={},lo=da(lu),uu=da(lu),cu=da(lu);function Xa(a){if(a===lu)throw Error(r(174));return a}function jh(a,l){switch(qt(cu,l),qt(uu,a),qt(lo,lu),a=l.nodeType,a){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:Lt(null,"");break;default:a=a===8?l.parentNode:l,l=a.namespaceURI||null,a=a.tagName,l=Lt(l,a)}Qt(lo),qt(lo,l)}function Us(){Qt(lo),Qt(uu),Qt(cu)}function ES(a){Xa(cu.current);var l=Xa(lo.current),d=Lt(l,a.type);l!==d&&(qt(uu,a),qt(lo,d))}function zh(a){uu.current===a&&(Qt(lo),Qt(uu))}var tr=da(0);function pf(a){for(var l=a;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Bh=[];function Vh(){for(var a=0;a<Bh.length;a++)Bh[a]._workInProgressVersionPrimary=null;Bh.length=0}var hf=R.ReactCurrentDispatcher,Hh=R.ReactCurrentBatchConfig,Ka=0,rr=null,mr=null,_r=null,gf=!1,fu=!1,du=0,Zk=0;function Kr(){throw Error(r(321))}function Uh(a,l){if(l===null)return!1;for(var d=0;d<l.length&&d<a.length;d++)if(!Fi(a[d],l[d]))return!1;return!0}function Wh(a,l,d,v,w,E){if(Ka=E,rr=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,hf.current=a===null||a.memoizedState===null?n5:i5,a=d(v,w),fu){E=0;do{if(fu=!1,du=0,25<=E)throw Error(r(301));E+=1,_r=mr=null,l.updateQueue=null,hf.current=o5,a=d(v,w)}while(fu)}if(hf.current=yf,l=mr!==null&&mr.next!==null,Ka=0,_r=mr=rr=null,gf=!1,l)throw Error(r(300));return a}function Gh(){var a=du!==0;return du=0,a}function uo(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _r===null?rr.memoizedState=_r=a:_r=_r.next=a,_r}function di(){if(mr===null){var a=rr.alternate;a=a!==null?a.memoizedState:null}else a=mr.next;var l=_r===null?rr.memoizedState:_r.next;if(l!==null)_r=l,mr=a;else{if(a===null)throw Error(r(310));mr=a,a={memoizedState:mr.memoizedState,baseState:mr.baseState,baseQueue:mr.baseQueue,queue:mr.queue,next:null},_r===null?rr.memoizedState=_r=a:_r=_r.next=a}return _r}function pu(a,l){return typeof l=="function"?l(a):l}function qh(a){var l=di(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var v=mr,w=v.baseQueue,E=d.pending;if(E!==null){if(w!==null){var I=w.next;w.next=E.next,E.next=I}v.baseQueue=w=E,d.pending=null}if(w!==null){E=w.next,v=v.baseState;var H=I=null,Q=null,ce=E;do{var Se=ce.lane;if((Ka&Se)===Se)Q!==null&&(Q=Q.next={lane:0,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null}),v=ce.hasEagerState?ce.eagerState:a(v,ce.action);else{var xe={lane:Se,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null};Q===null?(H=Q=xe,I=v):Q=Q.next=xe,rr.lanes|=Se,Ya|=Se}ce=ce.next}while(ce!==null&&ce!==E);Q===null?I=v:Q.next=H,Fi(v,l.memoizedState)||(bn=!0),l.memoizedState=v,l.baseState=I,l.baseQueue=Q,d.lastRenderedState=v}if(a=d.interleaved,a!==null){w=a;do E=w.lane,rr.lanes|=E,Ya|=E,w=w.next;while(w!==a)}else w===null&&(d.lanes=0);return[l.memoizedState,d.dispatch]}function Xh(a){var l=di(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var v=d.dispatch,w=d.pending,E=l.memoizedState;if(w!==null){d.pending=null;var I=w=w.next;do E=a(E,I.action),I=I.next;while(I!==w);Fi(E,l.memoizedState)||(bn=!0),l.memoizedState=E,l.baseQueue===null&&(l.baseState=E),d.lastRenderedState=E}return[E,v]}function CS(){}function _S(a,l){var d=rr,v=di(),w=l(),E=!Fi(v.memoizedState,w);if(E&&(v.memoizedState=w,bn=!0),v=v.queue,Kh($S.bind(null,d,v,a),[a]),v.getSnapshot!==l||E||_r!==null&&_r.memoizedState.tag&1){if(d.flags|=2048,hu(9,OS.bind(null,d,v,w,l),void 0,null),Rr===null)throw Error(r(349));(Ka&30)!==0||RS(d,l,w)}return w}function RS(a,l,d){a.flags|=16384,a={getSnapshot:l,value:d},l=rr.updateQueue,l===null?(l={lastEffect:null,stores:null},rr.updateQueue=l,l.stores=[a]):(d=l.stores,d===null?l.stores=[a]:d.push(a))}function OS(a,l,d,v){l.value=d,l.getSnapshot=v,TS(l)&&IS(a)}function $S(a,l,d){return d(function(){TS(l)&&IS(a)})}function TS(a){var l=a.getSnapshot;a=a.value;try{var d=l();return!Fi(a,d)}catch{return!0}}function IS(a){var l=Vo(a,1);l!==null&&Vi(l,a,1,-1)}function AS(a){var l=uo();return typeof a=="function"&&(a=a()),l.memoizedState=l.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:pu,lastRenderedState:a},l.queue=a,a=a.dispatch=r5.bind(null,rr,a),[l.memoizedState,a]}function hu(a,l,d,v){return a={tag:a,create:l,destroy:d,deps:v,next:null},l=rr.updateQueue,l===null?(l={lastEffect:null,stores:null},rr.updateQueue=l,l.lastEffect=a.next=a):(d=l.lastEffect,d===null?l.lastEffect=a.next=a:(v=d.next,d.next=a,a.next=v,l.lastEffect=a)),a}function kS(){return di().memoizedState}function vf(a,l,d,v){var w=uo();rr.flags|=a,w.memoizedState=hu(1|l,d,void 0,v===void 0?null:v)}function mf(a,l,d,v){var w=di();v=v===void 0?null:v;var E=void 0;if(mr!==null){var I=mr.memoizedState;if(E=I.destroy,v!==null&&Uh(v,I.deps)){w.memoizedState=hu(l,d,E,v);return}}rr.flags|=a,w.memoizedState=hu(1|l,d,E,v)}function PS(a,l){return vf(8390656,8,a,l)}function Kh(a,l){return mf(2048,8,a,l)}function MS(a,l){return mf(4,2,a,l)}function DS(a,l){return mf(4,4,a,l)}function LS(a,l){if(typeof l=="function")return a=a(),l(a),function(){l(null)};if(l!=null)return a=a(),l.current=a,function(){l.current=null}}function FS(a,l,d){return d=d!=null?d.concat([a]):null,mf(4,4,LS.bind(null,l,a),d)}function Yh(){}function NS(a,l){var d=di();l=l===void 0?null:l;var v=d.memoizedState;return v!==null&&l!==null&&Uh(l,v[1])?v[0]:(d.memoizedState=[a,l],a)}function jS(a,l){var d=di();l=l===void 0?null:l;var v=d.memoizedState;return v!==null&&l!==null&&Uh(l,v[1])?v[0]:(a=a(),d.memoizedState=[a,l],a)}function zS(a,l,d){return(Ka&21)===0?(a.baseState&&(a.baseState=!1,bn=!0),a.memoizedState=d):(Fi(d,l)||(d=Io(),rr.lanes|=d,Ya|=d,a.baseState=!0),l)}function e5(a,l){var d=yt;yt=d!==0&&4>d?d:4,a(!0);var v=Hh.transition;Hh.transition={};try{a(!1),l()}finally{yt=d,Hh.transition=v}}function BS(){return di().memoizedState}function t5(a,l,d){var v=Sa(a);if(d={lane:v,action:d,hasEagerState:!1,eagerState:null,next:null},VS(a))HS(l,d);else if(d=bS(a,l,d,v),d!==null){var w=an();Vi(d,a,v,w),US(d,l,v)}}function r5(a,l,d){var v=Sa(a),w={lane:v,action:d,hasEagerState:!1,eagerState:null,next:null};if(VS(a))HS(l,w);else{var E=a.alternate;if(a.lanes===0&&(E===null||E.lanes===0)&&(E=l.lastRenderedReducer,E!==null))try{var I=l.lastRenderedState,H=E(I,d);if(w.hasEagerState=!0,w.eagerState=H,Fi(H,I)){var Q=l.interleaved;Q===null?(w.next=w,Fh(l)):(w.next=Q.next,Q.next=w),l.interleaved=w;return}}catch{}d=bS(a,l,w,v),d!==null&&(w=an(),Vi(d,a,v,w),US(d,l,v))}}function VS(a){var l=a.alternate;return a===rr||l!==null&&l===rr}function HS(a,l){fu=gf=!0;var d=a.pending;d===null?l.next=l:(l.next=d.next,d.next=l),a.pending=l}function US(a,l,d){if((d&4194240)!==0){var v=l.lanes;v&=a.pendingLanes,d|=v,l.lanes=d,io(a,d)}}var yf={readContext:fi,useCallback:Kr,useContext:Kr,useEffect:Kr,useImperativeHandle:Kr,useInsertionEffect:Kr,useLayoutEffect:Kr,useMemo:Kr,useReducer:Kr,useRef:Kr,useState:Kr,useDebugValue:Kr,useDeferredValue:Kr,useTransition:Kr,useMutableSource:Kr,useSyncExternalStore:Kr,useId:Kr,unstable_isNewReconciler:!1},n5={readContext:fi,useCallback:function(a,l){return uo().memoizedState=[a,l===void 0?null:l],a},useContext:fi,useEffect:PS,useImperativeHandle:function(a,l,d){return d=d!=null?d.concat([a]):null,vf(4194308,4,LS.bind(null,l,a),d)},useLayoutEffect:function(a,l){return vf(4194308,4,a,l)},useInsertionEffect:function(a,l){return vf(4,2,a,l)},useMemo:function(a,l){var d=uo();return l=l===void 0?null:l,a=a(),d.memoizedState=[a,l],a},useReducer:function(a,l,d){var v=uo();return l=d!==void 0?d(l):l,v.memoizedState=v.baseState=l,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:l},v.queue=a,a=a.dispatch=t5.bind(null,rr,a),[v.memoizedState,a]},useRef:function(a){var l=uo();return a={current:a},l.memoizedState=a},useState:AS,useDebugValue:Yh,useDeferredValue:function(a){return uo().memoizedState=a},useTransition:function(){var a=AS(!1),l=a[0];return a=e5.bind(null,a[1]),uo().memoizedState=a,[l,a]},useMutableSource:function(){},useSyncExternalStore:function(a,l,d){var v=rr,w=uo();if(Zt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Rr===null)throw Error(r(349));(Ka&30)!==0||RS(v,l,d)}w.memoizedState=d;var E={value:d,getSnapshot:l};return w.queue=E,PS($S.bind(null,v,E,a),[a]),v.flags|=2048,hu(9,OS.bind(null,v,E,d,l),void 0,null),d},useId:function(){var a=uo(),l=Rr.identifierPrefix;if(Zt){var d=Bo,v=zo;d=(v&~(1<<32-dr(v)-1)).toString(32)+d,l=":"+l+"R"+d,d=du++,0<d&&(l+="H"+d.toString(32)),l+=":"}else d=Zk++,l=":"+l+"r"+d.toString(32)+":";return a.memoizedState=l},unstable_isNewReconciler:!1},i5={readContext:fi,useCallback:NS,useContext:fi,useEffect:Kh,useImperativeHandle:FS,useInsertionEffect:MS,useLayoutEffect:DS,useMemo:jS,useReducer:qh,useRef:kS,useState:function(){return qh(pu)},useDebugValue:Yh,useDeferredValue:function(a){var l=di();return zS(l,mr.memoizedState,a)},useTransition:function(){var a=qh(pu)[0],l=di().memoizedState;return[a,l]},useMutableSource:CS,useSyncExternalStore:_S,useId:BS,unstable_isNewReconciler:!1},o5={readContext:fi,useCallback:NS,useContext:fi,useEffect:Kh,useImperativeHandle:FS,useInsertionEffect:MS,useLayoutEffect:DS,useMemo:jS,useReducer:Xh,useRef:kS,useState:function(){return Xh(pu)},useDebugValue:Yh,useDeferredValue:function(a){var l=di();return mr===null?l.memoizedState=a:zS(l,mr.memoizedState,a)},useTransition:function(){var a=Xh(pu)[0],l=di().memoizedState;return[a,l]},useMutableSource:CS,useSyncExternalStore:_S,useId:BS,unstable_isNewReconciler:!1};function ji(a,l){if(a&&a.defaultProps){l=K({},l),a=a.defaultProps;for(var d in a)l[d]===void 0&&(l[d]=a[d]);return l}return l}function Qh(a,l,d,v){l=a.memoizedState,d=d(v,l),d=d==null?l:K({},l,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var bf={isMounted:function(a){return(a=a._reactInternals)?Ar(a)===a:!1},enqueueSetState:function(a,l,d){a=a._reactInternals;var v=an(),w=Sa(a),E=Ho(v,w);E.payload=l,d!=null&&(E.callback=d),l=va(a,E,w),l!==null&&(Vi(l,a,w,v),ff(l,a,w))},enqueueReplaceState:function(a,l,d){a=a._reactInternals;var v=an(),w=Sa(a),E=Ho(v,w);E.tag=1,E.payload=l,d!=null&&(E.callback=d),l=va(a,E,w),l!==null&&(Vi(l,a,w,v),ff(l,a,w))},enqueueForceUpdate:function(a,l){a=a._reactInternals;var d=an(),v=Sa(a),w=Ho(d,v);w.tag=2,l!=null&&(w.callback=l),l=va(a,w,v),l!==null&&(Vi(l,a,v,d),ff(l,a,v))}};function WS(a,l,d,v,w,E,I){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(v,E,I):l.prototype&&l.prototype.isPureReactComponent?!eu(d,v)||!eu(w,E):!0}function GS(a,l,d){var v=!1,w=pa,E=l.contextType;return typeof E=="object"&&E!==null?E=fi(E):(w=yn(l)?Ua:Xr.current,v=l.contextTypes,E=(v=v!=null)?Fs(a,w):pa),l=new l(d,E),a.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=bf,a.stateNode=l,l._reactInternals=a,v&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=w,a.__reactInternalMemoizedMaskedChildContext=E),l}function qS(a,l,d,v){a=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,v),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,v),l.state!==a&&bf.enqueueReplaceState(l,l.state,null)}function Jh(a,l,d,v){var w=a.stateNode;w.props=d,w.state=a.memoizedState,w.refs={},Nh(a);var E=l.contextType;typeof E=="object"&&E!==null?w.context=fi(E):(E=yn(l)?Ua:Xr.current,w.context=Fs(a,E)),w.state=a.memoizedState,E=l.getDerivedStateFromProps,typeof E=="function"&&(Qh(a,l,E,d),w.state=a.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(l=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),l!==w.state&&bf.enqueueReplaceState(w,w.state,null),df(a,d,w,v),w.state=a.memoizedState),typeof w.componentDidMount=="function"&&(a.flags|=4194308)}function Ws(a,l){try{var d="",v=l;do d+=ne(v),v=v.return;while(v);var w=d}catch(E){w=`
10
10
  Error generating stack: `+E.message+`
11
- `+E.stack}return{value:a,source:l,stack:w,digest:null}}function Zh(a,l,d){return{value:a,source:null,stack:d??null,digest:l??null}}function eg(a,l){try{console.error(l.value)}catch(d){setTimeout(function(){throw d})}}var a5=typeof WeakMap=="function"?WeakMap:Map;function XS(a,l,d){d=Ho(-1,d),d.tag=3,d.payload={element:null};var v=l.value;return d.callback=function(){Rf||(Rf=!0,gg=v),eg(a,l)},d}function KS(a,l,d){d=Ho(-1,d),d.tag=3;var v=a.type.getDerivedStateFromError;if(typeof v=="function"){var w=l.value;d.payload=function(){return v(w)},d.callback=function(){eg(a,l)}}var E=a.stateNode;return E!==null&&typeof E.componentDidCatch=="function"&&(d.callback=function(){eg(a,l),typeof v!="function"&&(ya===null?ya=new Set([this]):ya.add(this));var I=l.stack;this.componentDidCatch(l.value,{componentStack:I!==null?I:""})}),d}function YS(a,l,d){var v=a.pingCache;if(v===null){v=a.pingCache=new a5;var w=new Set;v.set(l,w)}else w=v.get(l),w===void 0&&(w=new Set,v.set(l,w));w.has(d)||(w.add(d),a=S5.bind(null,a,l,d),l.then(a,a))}function QS(a){do{var l;if((l=a.tag===13)&&(l=a.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return a;a=a.return}while(a!==null);return null}function JS(a,l,d,v,w){return(a.mode&1)===0?(a===l?a.flags|=65536:(a.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(l=Ho(-1,1),l.tag=2,va(d,l,1))),d.lanes|=1),a):(a.flags|=65536,a.lanes=w,a)}var s5=R.ReactCurrentOwner,bn=!1;function on(a,l,d,v){l.child=a===null?yS(l,null,d,v):Bs(l,a.child,d,v)}function ZS(a,l,d,v,w){d=d.render;var E=l.ref;return Hs(l,w),v=Wh(a,l,d,v,E,w),d=Gh(),a!==null&&!bn?(l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~w,Uo(a,l,w)):(Zt&&d&&$h(l),l.flags|=1,on(a,l,v,w),l.child)}function ew(a,l,d,v,w){if(a===null){var E=d.type;return typeof E=="function"&&!xg(E)&&E.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(l.tag=15,l.type=E,tw(a,l,E,v,w)):(a=kf(d.type,null,v,l,l.mode,w),a.ref=l.ref,a.return=l,l.child=a)}if(E=a.child,(a.lanes&w)===0){var I=E.memoizedProps;if(d=d.compare,d=d!==null?d:eu,d(I,v)&&a.ref===l.ref)return Uo(a,l,w)}return l.flags|=1,a=xa(E,v),a.ref=l.ref,a.return=l,l.child=a}function tw(a,l,d,v,w){if(a!==null){var E=a.memoizedProps;if(eu(E,v)&&a.ref===l.ref)if(bn=!1,l.pendingProps=v=E,(a.lanes&w)!==0)(a.flags&131072)!==0&&(bn=!0);else return l.lanes=a.lanes,Uo(a,l,w)}return tg(a,l,d,v,w)}function rw(a,l,d){var v=l.pendingProps,w=v.children,E=a!==null?a.memoizedState:null;if(v.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},qt(qs,jn),jn|=d;else{if((d&1073741824)===0)return a=E!==null?E.baseLanes|d:d,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:a,cachePool:null,transitions:null},l.updateQueue=null,qt(qs,jn),jn|=a,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},v=E!==null?E.baseLanes:d,qt(qs,jn),jn|=v}else E!==null?(v=E.baseLanes|d,l.memoizedState=null):v=d,qt(qs,jn),jn|=v;return on(a,l,w,d),l.child}function nw(a,l){var d=l.ref;(a===null&&d!==null||a!==null&&a.ref!==d)&&(l.flags|=512,l.flags|=2097152)}function tg(a,l,d,v,w){var E=yn(d)?Ua:Xr.current;return E=Fs(l,E),Hs(l,w),d=Wh(a,l,d,v,E,w),v=Gh(),a!==null&&!bn?(l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~w,Uo(a,l,w)):(Zt&&v&&$h(l),l.flags|=1,on(a,l,d,w),l.child)}function iw(a,l,d,v,w){if(yn(d)){var E=!0;rf(l)}else E=!1;if(Hs(l,w),l.stateNode===null)wf(a,l),GS(l,d,v),Jh(l,d,v,w),v=!0;else if(a===null){var I=l.stateNode,H=l.memoizedProps;I.props=H;var Q=I.context,ce=d.contextType;typeof ce=="object"&&ce!==null?ce=fi(ce):(ce=yn(d)?Ua:Xr.current,ce=Fs(l,ce));var Se=d.getDerivedStateFromProps,xe=typeof Se=="function"||typeof I.getSnapshotBeforeUpdate=="function";xe||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(H!==v||Q!==ce)&&qS(l,I,v,ce),ga=!1;var be=l.memoizedState;I.state=be,df(l,v,I,w),Q=l.memoizedState,H!==v||be!==Q||mn.current||ga?(typeof Se=="function"&&(Qh(l,d,Se,v),Q=l.memoizedState),(H=ga||WS(l,d,H,v,be,Q,ce))?(xe||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount()),typeof I.componentDidMount=="function"&&(l.flags|=4194308)):(typeof I.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=v,l.memoizedState=Q),I.props=v,I.state=Q,I.context=ce,v=H):(typeof I.componentDidMount=="function"&&(l.flags|=4194308),v=!1)}else{I=l.stateNode,SS(a,l),H=l.memoizedProps,ce=l.type===l.elementType?H:ji(l.type,H),I.props=ce,xe=l.pendingProps,be=I.context,Q=d.contextType,typeof Q=="object"&&Q!==null?Q=fi(Q):(Q=yn(d)?Ua:Xr.current,Q=Fs(l,Q));var Fe=d.getDerivedStateFromProps;(Se=typeof Fe=="function"||typeof I.getSnapshotBeforeUpdate=="function")||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(H!==xe||be!==Q)&&qS(l,I,v,Q),ga=!1,be=l.memoizedState,I.state=be,df(l,v,I,w);var He=l.memoizedState;H!==xe||be!==He||mn.current||ga?(typeof Fe=="function"&&(Qh(l,d,Fe,v),He=l.memoizedState),(ce=ga||WS(l,d,ce,v,be,He,Q)||!1)?(Se||typeof I.UNSAFE_componentWillUpdate!="function"&&typeof I.componentWillUpdate!="function"||(typeof I.componentWillUpdate=="function"&&I.componentWillUpdate(v,He,Q),typeof I.UNSAFE_componentWillUpdate=="function"&&I.UNSAFE_componentWillUpdate(v,He,Q)),typeof I.componentDidUpdate=="function"&&(l.flags|=4),typeof I.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof I.componentDidUpdate!="function"||H===a.memoizedProps&&be===a.memoizedState||(l.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||H===a.memoizedProps&&be===a.memoizedState||(l.flags|=1024),l.memoizedProps=v,l.memoizedState=He),I.props=v,I.state=He,I.context=Q,v=ce):(typeof I.componentDidUpdate!="function"||H===a.memoizedProps&&be===a.memoizedState||(l.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||H===a.memoizedProps&&be===a.memoizedState||(l.flags|=1024),v=!1)}return rg(a,l,d,v,E,w)}function rg(a,l,d,v,w,E){nw(a,l);var I=(l.flags&128)!==0;if(!v&&!I)return w&&uS(l,d,!1),Uo(a,l,E);v=l.stateNode,s5.current=l;var H=I&&typeof d.getDerivedStateFromError!="function"?null:v.render();return l.flags|=1,a!==null&&I?(l.child=Bs(l,a.child,null,E),l.child=Bs(l,null,H,E)):on(a,l,H,E),l.memoizedState=v.state,w&&uS(l,d,!0),l.child}function ow(a){var l=a.stateNode;l.pendingContext?sS(a,l.pendingContext,l.pendingContext!==l.context):l.context&&sS(a,l.context,!1),jh(a,l.containerInfo)}function aw(a,l,d,v,w){return zs(),kh(w),l.flags|=256,on(a,l,d,v),l.child}var ng={dehydrated:null,treeContext:null,retryLane:0};function ig(a){return{baseLanes:a,cachePool:null,transitions:null}}function sw(a,l,d){var v=l.pendingProps,w=tr.current,E=!1,I=(l.flags&128)!==0,H;if((H=I)||(H=a!==null&&a.memoizedState===null?!1:(w&2)!==0),H?(E=!0,l.flags&=-129):(a===null||a.memoizedState!==null)&&(w|=1),qt(tr,w&1),a===null)return Ah(l),a=l.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?((l.mode&1)===0?l.lanes=1:a.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(I=v.children,a=v.fallback,E?(v=l.mode,E=l.child,I={mode:"hidden",children:I},(v&1)===0&&E!==null?(E.childLanes=0,E.pendingProps=I):E=Pf(I,v,0,null),a=es(a,v,d,null),E.return=l,a.return=l,E.sibling=a,l.child=E,l.child.memoizedState=ig(d),l.memoizedState=ng,a):og(l,I));if(w=a.memoizedState,w!==null&&(H=w.dehydrated,H!==null))return l5(a,l,I,v,H,w,d);if(E){E=v.fallback,I=l.mode,w=a.child,H=w.sibling;var Q={mode:"hidden",children:v.children};return(I&1)===0&&l.child!==w?(v=l.child,v.childLanes=0,v.pendingProps=Q,l.deletions=null):(v=xa(w,Q),v.subtreeFlags=w.subtreeFlags&14680064),H!==null?E=xa(H,E):(E=es(E,I,d,null),E.flags|=2),E.return=l,v.return=l,v.sibling=E,l.child=v,v=E,E=l.child,I=a.child.memoizedState,I=I===null?ig(d):{baseLanes:I.baseLanes|d,cachePool:null,transitions:I.transitions},E.memoizedState=I,E.childLanes=a.childLanes&~d,l.memoizedState=ng,v}return E=a.child,a=E.sibling,v=xa(E,{mode:"visible",children:v.children}),(l.mode&1)===0&&(v.lanes=d),v.return=l,v.sibling=null,a!==null&&(d=l.deletions,d===null?(l.deletions=[a],l.flags|=16):d.push(a)),l.child=v,l.memoizedState=null,v}function og(a,l){return l=Pf({mode:"visible",children:l},a.mode,0,null),l.return=a,a.child=l}function Sf(a,l,d,v){return v!==null&&kh(v),Bs(l,a.child,null,d),a=og(l,l.pendingProps.children),a.flags|=2,l.memoizedState=null,a}function l5(a,l,d,v,w,E,I){if(d)return l.flags&256?(l.flags&=-257,v=Zh(Error(r(422))),Sf(a,l,I,v)):l.memoizedState!==null?(l.child=a.child,l.flags|=128,null):(E=v.fallback,w=l.mode,v=Pf({mode:"visible",children:v.children},w,0,null),E=es(E,w,I,null),E.flags|=2,v.return=l,E.return=l,v.sibling=E,l.child=v,(l.mode&1)!==0&&Bs(l,a.child,null,I),l.child.memoizedState=ig(I),l.memoizedState=ng,E);if((l.mode&1)===0)return Sf(a,l,I,null);if(w.data==="$!"){if(v=w.nextSibling&&w.nextSibling.dataset,v)var H=v.dgst;return v=H,E=Error(r(419)),v=Zh(E,v,void 0),Sf(a,l,I,v)}if(H=(I&a.childLanes)!==0,bn||H){if(v=_r,v!==null){switch(I&-I){case 4:w=2;break;case 16:w=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:w=32;break;case 536870912:w=268435456;break;default:w=0}w=(w&(v.suspendedLanes|I))!==0?0:w,w!==0&&w!==E.retryLane&&(E.retryLane=w,Vo(a,w),Vi(v,a,w,-1))}return wg(),v=Zh(Error(r(421))),Sf(a,l,I,v)}return w.data==="$?"?(l.flags|=128,l.child=a.child,l=w5.bind(null,a),w._reactRetry=l,null):(a=E.treeContext,Nn=fa(w.nextSibling),Fn=l,Zt=!0,Ni=null,a!==null&&(ui[ci++]=zo,ui[ci++]=Bo,ui[ci++]=Wa,zo=a.id,Bo=a.overflow,Wa=l),l=og(l,v.children),l.flags|=4096,l)}function lw(a,l,d){a.lanes|=l;var v=a.alternate;v!==null&&(v.lanes|=l),Lh(a.return,l,d)}function ag(a,l,d,v,w){var E=a.memoizedState;E===null?a.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:v,tail:d,tailMode:w}:(E.isBackwards=l,E.rendering=null,E.renderingStartTime=0,E.last=v,E.tail=d,E.tailMode=w)}function uw(a,l,d){var v=l.pendingProps,w=v.revealOrder,E=v.tail;if(on(a,l,v.children,d),v=tr.current,(v&2)!==0)v=v&1|2,l.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=l.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&lw(a,d,l);else if(a.tag===19)lw(a,d,l);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break e;for(;a.sibling===null;){if(a.return===null||a.return===l)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}v&=1}if(qt(tr,v),(l.mode&1)===0)l.memoizedState=null;else switch(w){case"forwards":for(d=l.child,w=null;d!==null;)a=d.alternate,a!==null&&pf(a)===null&&(w=d),d=d.sibling;d=w,d===null?(w=l.child,l.child=null):(w=d.sibling,d.sibling=null),ag(l,!1,w,d,E);break;case"backwards":for(d=null,w=l.child,l.child=null;w!==null;){if(a=w.alternate,a!==null&&pf(a)===null){l.child=w;break}a=w.sibling,w.sibling=d,d=w,w=a}ag(l,!0,d,null,E);break;case"together":ag(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function wf(a,l){(l.mode&1)===0&&a!==null&&(a.alternate=null,l.alternate=null,l.flags|=2)}function Uo(a,l,d){if(a!==null&&(l.dependencies=a.dependencies),Ya|=l.lanes,(d&l.childLanes)===0)return null;if(a!==null&&l.child!==a.child)throw Error(r(153));if(l.child!==null){for(a=l.child,d=xa(a,a.pendingProps),l.child=d,d.return=l;a.sibling!==null;)a=a.sibling,d=d.sibling=xa(a,a.pendingProps),d.return=l;d.sibling=null}return l.child}function u5(a,l,d){switch(l.tag){case 3:ow(l),zs();break;case 5:ES(l);break;case 1:yn(l.type)&&rf(l);break;case 4:jh(l,l.stateNode.containerInfo);break;case 10:var v=l.type._context,w=l.memoizedProps.value;qt(uf,v._currentValue),v._currentValue=w;break;case 13:if(v=l.memoizedState,v!==null)return v.dehydrated!==null?(qt(tr,tr.current&1),l.flags|=128,null):(d&l.child.childLanes)!==0?sw(a,l,d):(qt(tr,tr.current&1),a=Uo(a,l,d),a!==null?a.sibling:null);qt(tr,tr.current&1);break;case 19:if(v=(d&l.childLanes)!==0,(a.flags&128)!==0){if(v)return uw(a,l,d);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),qt(tr,tr.current),v)break;return null;case 22:case 23:return l.lanes=0,rw(a,l,d)}return Uo(a,l,d)}var cw,sg,fw,dw;cw=function(a,l){for(var d=l.child;d!==null;){if(d.tag===5||d.tag===6)a.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},sg=function(){},fw=function(a,l,d,v){var w=a.memoizedProps;if(w!==v){a=l.stateNode,Xa(lo.current);var E=null;switch(d){case"input":w=Ae(a,w),v=Ae(a,v),E=[];break;case"select":w=K({},w,{value:void 0}),v=K({},v,{value:void 0}),E=[];break;case"textarea":w=Qe(a,w),v=Qe(a,v),E=[];break;default:typeof w.onClick!="function"&&typeof v.onClick=="function"&&(a.onclick=Zc)}_e(d,v);var I;d=null;for(ce in w)if(!v.hasOwnProperty(ce)&&w.hasOwnProperty(ce)&&w[ce]!=null)if(ce==="style"){var H=w[ce];for(I in H)H.hasOwnProperty(I)&&(d||(d={}),d[I]="")}else ce!=="dangerouslySetInnerHTML"&&ce!=="children"&&ce!=="suppressContentEditableWarning"&&ce!=="suppressHydrationWarning"&&ce!=="autoFocus"&&(i.hasOwnProperty(ce)?E||(E=[]):(E=E||[]).push(ce,null));for(ce in v){var Q=v[ce];if(H=w?.[ce],v.hasOwnProperty(ce)&&Q!==H&&(Q!=null||H!=null))if(ce==="style")if(H){for(I in H)!H.hasOwnProperty(I)||Q&&Q.hasOwnProperty(I)||(d||(d={}),d[I]="");for(I in Q)Q.hasOwnProperty(I)&&H[I]!==Q[I]&&(d||(d={}),d[I]=Q[I])}else d||(E||(E=[]),E.push(ce,d)),d=Q;else ce==="dangerouslySetInnerHTML"?(Q=Q?Q.__html:void 0,H=H?H.__html:void 0,Q!=null&&H!==Q&&(E=E||[]).push(ce,Q)):ce==="children"?typeof Q!="string"&&typeof Q!="number"||(E=E||[]).push(ce,""+Q):ce!=="suppressContentEditableWarning"&&ce!=="suppressHydrationWarning"&&(i.hasOwnProperty(ce)?(Q!=null&&ce==="onScroll"&&Yt("scroll",a),E||H===Q||(E=[])):(E=E||[]).push(ce,Q))}d&&(E=E||[]).push("style",d);var ce=E;(l.updateQueue=ce)&&(l.flags|=4)}},dw=function(a,l,d,v){d!==v&&(l.flags|=4)};function gu(a,l){if(!Zt)switch(a.tailMode){case"hidden":l=a.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var v=null;d!==null;)d.alternate!==null&&(v=d),d=d.sibling;v===null?l||a.tail===null?a.tail=null:a.tail.sibling=null:v.sibling=null}}function Yr(a){var l=a.alternate!==null&&a.alternate.child===a.child,d=0,v=0;if(l)for(var w=a.child;w!==null;)d|=w.lanes|w.childLanes,v|=w.subtreeFlags&14680064,v|=w.flags&14680064,w.return=a,w=w.sibling;else for(w=a.child;w!==null;)d|=w.lanes|w.childLanes,v|=w.subtreeFlags,v|=w.flags,w.return=a,w=w.sibling;return a.subtreeFlags|=v,a.childLanes=d,l}function c5(a,l,d){var v=l.pendingProps;switch(Th(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yr(l),null;case 1:return yn(l.type)&&tf(),Yr(l),null;case 3:return v=l.stateNode,Us(),Qt(mn),Qt(Xr),Vh(),v.pendingContext&&(v.context=v.pendingContext,v.pendingContext=null),(a===null||a.child===null)&&(sf(l)?l.flags|=4:a===null||a.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Ni!==null&&(yg(Ni),Ni=null))),sg(a,l),Yr(l),null;case 5:zh(l);var w=Xa(cu.current);if(d=l.type,a!==null&&l.stateNode!=null)fw(a,l,d,v,w),a.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!v){if(l.stateNode===null)throw Error(r(166));return Yr(l),null}if(a=Xa(lo.current),sf(l)){v=l.stateNode,d=l.type;var E=l.memoizedProps;switch(v[so]=l,v[ou]=E,a=(l.mode&1)!==0,d){case"dialog":Yt("cancel",v),Yt("close",v);break;case"iframe":case"object":case"embed":Yt("load",v);break;case"video":case"audio":for(w=0;w<ru.length;w++)Yt(ru[w],v);break;case"source":Yt("error",v);break;case"img":case"image":case"link":Yt("error",v),Yt("load",v);break;case"details":Yt("toggle",v);break;case"input":$e(v,E),Yt("invalid",v);break;case"select":v._wrapperState={wasMultiple:!!E.multiple},Yt("invalid",v);break;case"textarea":Ve(v,E),Yt("invalid",v)}_e(d,E),w=null;for(var I in E)if(E.hasOwnProperty(I)){var H=E[I];I==="children"?typeof H=="string"?v.textContent!==H&&(E.suppressHydrationWarning!==!0&&Jc(v.textContent,H,a),w=["children",H]):typeof H=="number"&&v.textContent!==""+H&&(E.suppressHydrationWarning!==!0&&Jc(v.textContent,H,a),w=["children",""+H]):i.hasOwnProperty(I)&&H!=null&&I==="onScroll"&&Yt("scroll",v)}switch(d){case"input":Me(v),Ke(v,E,!0);break;case"textarea":Me(v),Ge(v);break;case"select":case"option":break;default:typeof E.onClick=="function"&&(v.onclick=Zc)}v=w,l.updateQueue=v,v!==null&&(l.flags|=4)}else{I=w.nodeType===9?w:w.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=ct(d)),a==="http://www.w3.org/1999/xhtml"?d==="script"?(a=I.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof v.is=="string"?a=I.createElement(d,{is:v.is}):(a=I.createElement(d),d==="select"&&(I=a,v.multiple?I.multiple=!0:v.size&&(I.size=v.size))):a=I.createElementNS(a,d),a[so]=l,a[ou]=v,cw(a,l,!1,!1),l.stateNode=a;e:{switch(I=De(d,v),d){case"dialog":Yt("cancel",a),Yt("close",a),w=v;break;case"iframe":case"object":case"embed":Yt("load",a),w=v;break;case"video":case"audio":for(w=0;w<ru.length;w++)Yt(ru[w],a);w=v;break;case"source":Yt("error",a),w=v;break;case"img":case"image":case"link":Yt("error",a),Yt("load",a),w=v;break;case"details":Yt("toggle",a),w=v;break;case"input":$e(a,v),w=Ae(a,v),Yt("invalid",a);break;case"option":w=v;break;case"select":a._wrapperState={wasMultiple:!!v.multiple},w=K({},v,{value:void 0}),Yt("invalid",a);break;case"textarea":Ve(a,v),w=Qe(a,v),Yt("invalid",a);break;default:w=v}_e(d,w),H=w;for(E in H)if(H.hasOwnProperty(E)){var Q=H[E];E==="style"?V(a,Q):E==="dangerouslySetInnerHTML"?(Q=Q?Q.__html:void 0,Q!=null&&Kt(a,Q)):E==="children"?typeof Q=="string"?(d!=="textarea"||Q!=="")&&Ft(a,Q):typeof Q=="number"&&Ft(a,""+Q):E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&E!=="autoFocus"&&(i.hasOwnProperty(E)?Q!=null&&E==="onScroll"&&Yt("scroll",a):Q!=null&&O(a,E,Q,I))}switch(d){case"input":Me(a),Ke(a,v,!1);break;case"textarea":Me(a),Ge(a);break;case"option":v.value!=null&&a.setAttribute("value",""+se(v.value));break;case"select":a.multiple=!!v.multiple,E=v.value,E!=null?Ue(a,!!v.multiple,E,!1):v.defaultValue!=null&&Ue(a,!!v.multiple,v.defaultValue,!0);break;default:typeof w.onClick=="function"&&(a.onclick=Zc)}switch(d){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}}v&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return Yr(l),null;case 6:if(a&&l.stateNode!=null)dw(a,l,a.memoizedProps,v);else{if(typeof v!="string"&&l.stateNode===null)throw Error(r(166));if(d=Xa(cu.current),Xa(lo.current),sf(l)){if(v=l.stateNode,d=l.memoizedProps,v[so]=l,(E=v.nodeValue!==d)&&(a=Fn,a!==null))switch(a.tag){case 3:Jc(v.nodeValue,d,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&Jc(v.nodeValue,d,(a.mode&1)!==0)}E&&(l.flags|=4)}else v=(d.nodeType===9?d:d.ownerDocument).createTextNode(v),v[so]=l,l.stateNode=v}return Yr(l),null;case 13:if(Qt(tr),v=l.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(Zt&&Nn!==null&&(l.mode&1)!==0&&(l.flags&128)===0)gS(),zs(),l.flags|=98560,E=!1;else if(E=sf(l),v!==null&&v.dehydrated!==null){if(a===null){if(!E)throw Error(r(318));if(E=l.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(r(317));E[so]=l}else zs(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Yr(l),E=!1}else Ni!==null&&(yg(Ni),Ni=null),E=!0;if(!E)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=d,l):(v=v!==null,v!==(a!==null&&a.memoizedState!==null)&&v&&(l.child.flags|=8192,(l.mode&1)!==0&&(a===null||(tr.current&1)!==0?yr===0&&(yr=3):wg())),l.updateQueue!==null&&(l.flags|=4),Yr(l),null);case 4:return Us(),sg(a,l),a===null&&nu(l.stateNode.containerInfo),Yr(l),null;case 10:return Dh(l.type._context),Yr(l),null;case 17:return yn(l.type)&&tf(),Yr(l),null;case 19:if(Qt(tr),E=l.memoizedState,E===null)return Yr(l),null;if(v=(l.flags&128)!==0,I=E.rendering,I===null)if(v)gu(E,!1);else{if(yr!==0||a!==null&&(a.flags&128)!==0)for(a=l.child;a!==null;){if(I=pf(a),I!==null){for(l.flags|=128,gu(E,!1),v=I.updateQueue,v!==null&&(l.updateQueue=v,l.flags|=4),l.subtreeFlags=0,v=d,d=l.child;d!==null;)E=d,a=v,E.flags&=14680066,I=E.alternate,I===null?(E.childLanes=0,E.lanes=a,E.child=null,E.subtreeFlags=0,E.memoizedProps=null,E.memoizedState=null,E.updateQueue=null,E.dependencies=null,E.stateNode=null):(E.childLanes=I.childLanes,E.lanes=I.lanes,E.child=I.child,E.subtreeFlags=0,E.deletions=null,E.memoizedProps=I.memoizedProps,E.memoizedState=I.memoizedState,E.updateQueue=I.updateQueue,E.type=I.type,a=I.dependencies,E.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),d=d.sibling;return qt(tr,tr.current&1|2),l.child}a=a.sibling}E.tail!==null&&Nt()>Xs&&(l.flags|=128,v=!0,gu(E,!1),l.lanes=4194304)}else{if(!v)if(a=pf(I),a!==null){if(l.flags|=128,v=!0,d=a.updateQueue,d!==null&&(l.updateQueue=d,l.flags|=4),gu(E,!0),E.tail===null&&E.tailMode==="hidden"&&!I.alternate&&!Zt)return Yr(l),null}else 2*Nt()-E.renderingStartTime>Xs&&d!==1073741824&&(l.flags|=128,v=!0,gu(E,!1),l.lanes=4194304);E.isBackwards?(I.sibling=l.child,l.child=I):(d=E.last,d!==null?d.sibling=I:l.child=I,E.last=I)}return E.tail!==null?(l=E.tail,E.rendering=l,E.tail=l.sibling,E.renderingStartTime=Nt(),l.sibling=null,d=tr.current,qt(tr,v?d&1|2:d&1),l):(Yr(l),null);case 22:case 23:return Sg(),v=l.memoizedState!==null,a!==null&&a.memoizedState!==null!==v&&(l.flags|=8192),v&&(l.mode&1)!==0?(jn&1073741824)!==0&&(Yr(l),l.subtreeFlags&6&&(l.flags|=8192)):Yr(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function f5(a,l){switch(Th(l),l.tag){case 1:return yn(l.type)&&tf(),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return Us(),Qt(mn),Qt(Xr),Vh(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 5:return zh(l),null;case 13:if(Qt(tr),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));zs()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return Qt(tr),null;case 4:return Us(),null;case 10:return Dh(l.type._context),null;case 22:case 23:return Sg(),null;case 24:return null;default:return null}}var xf=!1,Qr=!1,d5=typeof WeakSet=="function"?WeakSet:Set,Be=null;function Gs(a,l){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(v){ir(a,l,v)}else d.current=null}function lg(a,l,d){try{d()}catch(v){ir(a,l,v)}}var pw=!1;function p5(a,l){if(Sh=Bc,a=Wb(),dh(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var v=d.getSelection&&d.getSelection();if(v&&v.rangeCount!==0){d=v.anchorNode;var w=v.anchorOffset,E=v.focusNode;v=v.focusOffset;try{d.nodeType,E.nodeType}catch{d=null;break e}var I=0,H=-1,Q=-1,ce=0,Se=0,xe=a,be=null;t:for(;;){for(var Fe;xe!==d||w!==0&&xe.nodeType!==3||(H=I+w),xe!==E||v!==0&&xe.nodeType!==3||(Q=I+v),xe.nodeType===3&&(I+=xe.nodeValue.length),(Fe=xe.firstChild)!==null;)be=xe,xe=Fe;for(;;){if(xe===a)break t;if(be===d&&++ce===w&&(H=I),be===E&&++Se===v&&(Q=I),(Fe=xe.nextSibling)!==null)break;xe=be,be=xe.parentNode}xe=Fe}d=H===-1||Q===-1?null:{start:H,end:Q}}else d=null}d=d||{start:0,end:0}}else d=null;for(wh={focusedElem:a,selectionRange:d},Bc=!1,Be=l;Be!==null;)if(l=Be,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,Be=a;else for(;Be!==null;){l=Be;try{var He=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(He!==null){var We=He.memoizedProps,sr=He.memoizedState,ae=l.stateNode,ee=ae.getSnapshotBeforeUpdate(l.elementType===l.type?We:ji(l.type,We),sr);ae.__reactInternalSnapshotBeforeUpdate=ee}break;case 3:var le=l.stateNode.containerInfo;le.nodeType===1?le.textContent="":le.nodeType===9&&le.documentElement&&le.removeChild(le.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Re){ir(l,l.return,Re)}if(a=l.sibling,a!==null){a.return=l.return,Be=a;break}Be=l.return}return He=pw,pw=!1,He}function vu(a,l,d){var v=l.updateQueue;if(v=v!==null?v.lastEffect:null,v!==null){var w=v=v.next;do{if((w.tag&a)===a){var E=w.destroy;w.destroy=void 0,E!==void 0&&lg(l,d,E)}w=w.next}while(w!==v)}}function Ef(a,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&a)===a){var v=d.create;d.destroy=v()}d=d.next}while(d!==l)}}function ug(a){var l=a.ref;if(l!==null){var d=a.stateNode;a.tag,a=d,typeof l=="function"?l(a):l.current=a}}function hw(a){var l=a.alternate;l!==null&&(a.alternate=null,hw(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&(delete l[so],delete l[ou],delete l[_h],delete l[Kk],delete l[Yk])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function gw(a){return a.tag===5||a.tag===3||a.tag===4}function vw(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||gw(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function cg(a,l,d){var v=a.tag;if(v===5||v===6)a=a.stateNode,l?d.nodeType===8?d.parentNode.insertBefore(a,l):d.insertBefore(a,l):(d.nodeType===8?(l=d.parentNode,l.insertBefore(a,d)):(l=d,l.appendChild(a)),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Zc));else if(v!==4&&(a=a.child,a!==null))for(cg(a,l,d),a=a.sibling;a!==null;)cg(a,l,d),a=a.sibling}function fg(a,l,d){var v=a.tag;if(v===5||v===6)a=a.stateNode,l?d.insertBefore(a,l):d.appendChild(a);else if(v!==4&&(a=a.child,a!==null))for(fg(a,l,d),a=a.sibling;a!==null;)fg(a,l,d),a=a.sibling}var Pr=null,zi=!1;function ma(a,l,d){for(d=d.child;d!==null;)mw(a,l,d),d=d.sibling}function mw(a,l,d){if(gr&&typeof gr.onCommitFiberUnmount=="function")try{gr.onCommitFiberUnmount(rn,d)}catch{}switch(d.tag){case 5:Qr||Gs(d,l);case 6:var v=Pr,w=zi;Pr=null,ma(a,l,d),Pr=v,zi=w,Pr!==null&&(zi?(a=Pr,d=d.stateNode,a.nodeType===8?a.parentNode.removeChild(d):a.removeChild(d)):Pr.removeChild(d.stateNode));break;case 18:Pr!==null&&(zi?(a=Pr,d=d.stateNode,a.nodeType===8?Ch(a.parentNode,d):a.nodeType===1&&Ch(a,d),la(a)):Ch(Pr,d.stateNode));break;case 4:v=Pr,w=zi,Pr=d.stateNode.containerInfo,zi=!0,ma(a,l,d),Pr=v,zi=w;break;case 0:case 11:case 14:case 15:if(!Qr&&(v=d.updateQueue,v!==null&&(v=v.lastEffect,v!==null))){w=v=v.next;do{var E=w,I=E.destroy;E=E.tag,I!==void 0&&((E&2)!==0||(E&4)!==0)&&lg(d,l,I),w=w.next}while(w!==v)}ma(a,l,d);break;case 1:if(!Qr&&(Gs(d,l),v=d.stateNode,typeof v.componentWillUnmount=="function"))try{v.props=d.memoizedProps,v.state=d.memoizedState,v.componentWillUnmount()}catch(H){ir(d,l,H)}ma(a,l,d);break;case 21:ma(a,l,d);break;case 22:d.mode&1?(Qr=(v=Qr)||d.memoizedState!==null,ma(a,l,d),Qr=v):ma(a,l,d);break;default:ma(a,l,d)}}function yw(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new d5),l.forEach(function(v){var w=x5.bind(null,a,v);d.has(v)||(d.add(v),v.then(w,w))})}}function Bi(a,l){var d=l.deletions;if(d!==null)for(var v=0;v<d.length;v++){var w=d[v];try{var E=a,I=l,H=I;e:for(;H!==null;){switch(H.tag){case 5:Pr=H.stateNode,zi=!1;break e;case 3:Pr=H.stateNode.containerInfo,zi=!0;break e;case 4:Pr=H.stateNode.containerInfo,zi=!0;break e}H=H.return}if(Pr===null)throw Error(r(160));mw(E,I,w),Pr=null,zi=!1;var Q=w.alternate;Q!==null&&(Q.return=null),w.return=null}catch(ce){ir(w,l,ce)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)bw(l,a),l=l.sibling}function bw(a,l){var d=a.alternate,v=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(Bi(l,a),co(a),v&4){try{vu(3,a,a.return),Ef(3,a)}catch(We){ir(a,a.return,We)}try{vu(5,a,a.return)}catch(We){ir(a,a.return,We)}}break;case 1:Bi(l,a),co(a),v&512&&d!==null&&Gs(d,d.return);break;case 5:if(Bi(l,a),co(a),v&512&&d!==null&&Gs(d,d.return),a.flags&32){var w=a.stateNode;try{Ft(w,"")}catch(We){ir(a,a.return,We)}}if(v&4&&(w=a.stateNode,w!=null)){var E=a.memoizedProps,I=d!==null?d.memoizedProps:E,H=a.type,Q=a.updateQueue;if(a.updateQueue=null,Q!==null)try{H==="input"&&E.type==="radio"&&E.name!=null&&Ne(w,E),De(H,I);var ce=De(H,E);for(I=0;I<Q.length;I+=2){var Se=Q[I],xe=Q[I+1];Se==="style"?V(w,xe):Se==="dangerouslySetInnerHTML"?Kt(w,xe):Se==="children"?Ft(w,xe):O(w,Se,xe,ce)}switch(H){case"input":Ie(w,E);break;case"textarea":ye(w,E);break;case"select":var be=w._wrapperState.wasMultiple;w._wrapperState.wasMultiple=!!E.multiple;var Fe=E.value;Fe!=null?Ue(w,!!E.multiple,Fe,!1):be!==!!E.multiple&&(E.defaultValue!=null?Ue(w,!!E.multiple,E.defaultValue,!0):Ue(w,!!E.multiple,E.multiple?[]:"",!1))}w[ou]=E}catch(We){ir(a,a.return,We)}}break;case 6:if(Bi(l,a),co(a),v&4){if(a.stateNode===null)throw Error(r(162));w=a.stateNode,E=a.memoizedProps;try{w.nodeValue=E}catch(We){ir(a,a.return,We)}}break;case 3:if(Bi(l,a),co(a),v&4&&d!==null&&d.memoizedState.isDehydrated)try{la(l.containerInfo)}catch(We){ir(a,a.return,We)}break;case 4:Bi(l,a),co(a);break;case 13:Bi(l,a),co(a),w=a.child,w.flags&8192&&(E=w.memoizedState!==null,w.stateNode.isHidden=E,!E||w.alternate!==null&&w.alternate.memoizedState!==null||(hg=Nt())),v&4&&yw(a);break;case 22:if(Se=d!==null&&d.memoizedState!==null,a.mode&1?(Qr=(ce=Qr)||Se,Bi(l,a),Qr=ce):Bi(l,a),co(a),v&8192){if(ce=a.memoizedState!==null,(a.stateNode.isHidden=ce)&&!Se&&(a.mode&1)!==0)for(Be=a,Se=a.child;Se!==null;){for(xe=Be=Se;Be!==null;){switch(be=Be,Fe=be.child,be.tag){case 0:case 11:case 14:case 15:vu(4,be,be.return);break;case 1:Gs(be,be.return);var He=be.stateNode;if(typeof He.componentWillUnmount=="function"){v=be,d=be.return;try{l=v,He.props=l.memoizedProps,He.state=l.memoizedState,He.componentWillUnmount()}catch(We){ir(v,d,We)}}break;case 5:Gs(be,be.return);break;case 22:if(be.memoizedState!==null){xw(xe);continue}}Fe!==null?(Fe.return=be,Be=Fe):xw(xe)}Se=Se.sibling}e:for(Se=null,xe=a;;){if(xe.tag===5){if(Se===null){Se=xe;try{w=xe.stateNode,ce?(E=w.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none"):(H=xe.stateNode,Q=xe.memoizedProps.style,I=Q!=null&&Q.hasOwnProperty("display")?Q.display:null,H.style.display=ue("display",I))}catch(We){ir(a,a.return,We)}}}else if(xe.tag===6){if(Se===null)try{xe.stateNode.nodeValue=ce?"":xe.memoizedProps}catch(We){ir(a,a.return,We)}}else if((xe.tag!==22&&xe.tag!==23||xe.memoizedState===null||xe===a)&&xe.child!==null){xe.child.return=xe,xe=xe.child;continue}if(xe===a)break e;for(;xe.sibling===null;){if(xe.return===null||xe.return===a)break e;Se===xe&&(Se=null),xe=xe.return}Se===xe&&(Se=null),xe.sibling.return=xe.return,xe=xe.sibling}}break;case 19:Bi(l,a),co(a),v&4&&yw(a);break;case 21:break;default:Bi(l,a),co(a)}}function co(a){var l=a.flags;if(l&2){try{e:{for(var d=a.return;d!==null;){if(gw(d)){var v=d;break e}d=d.return}throw Error(r(160))}switch(v.tag){case 5:var w=v.stateNode;v.flags&32&&(Ft(w,""),v.flags&=-33);var E=vw(a);fg(a,E,w);break;case 3:case 4:var I=v.stateNode.containerInfo,H=vw(a);cg(a,H,I);break;default:throw Error(r(161))}}catch(Q){ir(a,a.return,Q)}a.flags&=-3}l&4096&&(a.flags&=-4097)}function h5(a,l,d){Be=a,Sw(a)}function Sw(a,l,d){for(var v=(a.mode&1)!==0;Be!==null;){var w=Be,E=w.child;if(w.tag===22&&v){var I=w.memoizedState!==null||xf;if(!I){var H=w.alternate,Q=H!==null&&H.memoizedState!==null||Qr;H=xf;var ce=Qr;if(xf=I,(Qr=Q)&&!ce)for(Be=w;Be!==null;)I=Be,Q=I.child,I.tag===22&&I.memoizedState!==null?Ew(w):Q!==null?(Q.return=I,Be=Q):Ew(w);for(;E!==null;)Be=E,Sw(E),E=E.sibling;Be=w,xf=H,Qr=ce}ww(a)}else(w.subtreeFlags&8772)!==0&&E!==null?(E.return=w,Be=E):ww(a)}}function ww(a){for(;Be!==null;){var l=Be;if((l.flags&8772)!==0){var d=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:Qr||Ef(5,l);break;case 1:var v=l.stateNode;if(l.flags&4&&!Qr)if(d===null)v.componentDidMount();else{var w=l.elementType===l.type?d.memoizedProps:ji(l.type,d.memoizedProps);v.componentDidUpdate(w,d.memoizedState,v.__reactInternalSnapshotBeforeUpdate)}var E=l.updateQueue;E!==null&&xS(l,E,v);break;case 3:var I=l.updateQueue;if(I!==null){if(d=null,l.child!==null)switch(l.child.tag){case 5:d=l.child.stateNode;break;case 1:d=l.child.stateNode}xS(l,I,d)}break;case 5:var H=l.stateNode;if(d===null&&l.flags&4){d=H;var Q=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":Q.autoFocus&&d.focus();break;case"img":Q.src&&(d.src=Q.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var ce=l.alternate;if(ce!==null){var Se=ce.memoizedState;if(Se!==null){var xe=Se.dehydrated;xe!==null&&la(xe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Qr||l.flags&512&&ug(l)}catch(be){ir(l,l.return,be)}}if(l===a){Be=null;break}if(d=l.sibling,d!==null){d.return=l.return,Be=d;break}Be=l.return}}function xw(a){for(;Be!==null;){var l=Be;if(l===a){Be=null;break}var d=l.sibling;if(d!==null){d.return=l.return,Be=d;break}Be=l.return}}function Ew(a){for(;Be!==null;){var l=Be;try{switch(l.tag){case 0:case 11:case 15:var d=l.return;try{Ef(4,l)}catch(Q){ir(l,d,Q)}break;case 1:var v=l.stateNode;if(typeof v.componentDidMount=="function"){var w=l.return;try{v.componentDidMount()}catch(Q){ir(l,w,Q)}}var E=l.return;try{ug(l)}catch(Q){ir(l,E,Q)}break;case 5:var I=l.return;try{ug(l)}catch(Q){ir(l,I,Q)}}}catch(Q){ir(l,l.return,Q)}if(l===a){Be=null;break}var H=l.sibling;if(H!==null){H.return=l.return,Be=H;break}Be=l.return}}var g5=Math.ceil,Cf=R.ReactCurrentDispatcher,dg=R.ReactCurrentOwner,pi=R.ReactCurrentBatchConfig,Ct=0,_r=null,pr=null,Mr=0,jn=0,qs=da(0),yr=0,mu=null,Ya=0,_f=0,pg=0,yu=null,Sn=null,hg=0,Xs=1/0,Wo=null,Rf=!1,gg=null,ya=null,Of=!1,ba=null,$f=0,bu=0,vg=null,Tf=-1,If=0;function an(){return(Ct&6)!==0?Nt():Tf!==-1?Tf:Tf=Nt()}function Sa(a){return(a.mode&1)===0?1:(Ct&2)!==0&&Mr!==0?Mr&-Mr:Jk.transition!==null?(If===0&&(If=Io()),If):(a=yt,a!==0||(a=window.event,a=a===void 0?16:_b(a.type)),a)}function Vi(a,l,d,v){if(50<bu)throw bu=0,vg=null,Error(r(185));Dn(a,d,v),((Ct&2)===0||a!==_r)&&(a===_r&&((Ct&2)===0&&(_f|=d),yr===4&&wa(a,Mr)),wn(a,v),d===1&&Ct===0&&(l.mode&1)===0&&(Xs=Nt()+500,nf&&ha()))}function wn(a,l){var d=a.callbackNode;To(a,l);var v=Mi(a,a===_r?Mr:0);if(v===0)d!==null&&Vt(d),a.callbackNode=null,a.callbackPriority=0;else if(l=v&-v,a.callbackPriority!==l){if(d!=null&&Vt(d),l===1)a.tag===0?Qk(_w.bind(null,a)):cS(_w.bind(null,a)),qk(function(){(Ct&6)===0&&ha()}),d=null;else{switch(Ao(v)){case 1:d=ki;break;case 4:d=Ro;break;case 16:d=oi;break;case 536870912:d=Pn;break;default:d=oi}d=Pw(d,Cw.bind(null,a))}a.callbackPriority=l,a.callbackNode=d}}function Cw(a,l){if(Tf=-1,If=0,(Ct&6)!==0)throw Error(r(327));var d=a.callbackNode;if(Ks()&&a.callbackNode!==d)return null;var v=Mi(a,a===_r?Mr:0);if(v===0)return null;if((v&30)!==0||(v&a.expiredLanes)!==0||l)l=Af(a,v);else{l=v;var w=Ct;Ct|=2;var E=Ow();(_r!==a||Mr!==l)&&(Wo=null,Xs=Nt()+500,Ja(a,l));do try{y5();break}catch(H){Rw(a,H)}while(!0);Mh(),Cf.current=E,Ct=w,pr!==null?l=0:(_r=null,Mr=0,l=yr)}if(l!==0){if(l===2&&(w=si(a),w!==0&&(v=w,l=mg(a,w))),l===1)throw d=mu,Ja(a,0),wa(a,v),wn(a,Nt()),d;if(l===6)wa(a,v);else{if(w=a.current.alternate,(v&30)===0&&!v5(w)&&(l=Af(a,v),l===2&&(E=si(a),E!==0&&(v=E,l=mg(a,E))),l===1))throw d=mu,Ja(a,0),wa(a,v),wn(a,Nt()),d;switch(a.finishedWork=w,a.finishedLanes=v,l){case 0:case 1:throw Error(r(345));case 2:Za(a,Sn,Wo);break;case 3:if(wa(a,v),(v&130023424)===v&&(l=hg+500-Nt(),10<l)){if(Mi(a,0)!==0)break;if(w=a.suspendedLanes,(w&v)!==v){an(),a.pingedLanes|=a.suspendedLanes&w;break}a.timeoutHandle=Eh(Za.bind(null,a,Sn,Wo),l);break}Za(a,Sn,Wo);break;case 4:if(wa(a,v),(v&4194240)===v)break;for(l=a.eventTimes,w=-1;0<v;){var I=31-dr(v);E=1<<I,I=l[I],I>w&&(w=I),v&=~E}if(v=w,v=Nt()-v,v=(120>v?120:480>v?480:1080>v?1080:1920>v?1920:3e3>v?3e3:4320>v?4320:1960*g5(v/1960))-v,10<v){a.timeoutHandle=Eh(Za.bind(null,a,Sn,Wo),v);break}Za(a,Sn,Wo);break;case 5:Za(a,Sn,Wo);break;default:throw Error(r(329))}}}return wn(a,Nt()),a.callbackNode===d?Cw.bind(null,a):null}function mg(a,l){var d=yu;return a.current.memoizedState.isDehydrated&&(Ja(a,l).flags|=256),a=Af(a,l),a!==2&&(l=Sn,Sn=d,l!==null&&yg(l)),a}function yg(a){Sn===null?Sn=a:Sn.push.apply(Sn,a)}function v5(a){for(var l=a;;){if(l.flags&16384){var d=l.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var v=0;v<d.length;v++){var w=d[v],E=w.getSnapshot;w=w.value;try{if(!Fi(E(),w))return!1}catch{return!1}}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function wa(a,l){for(l&=~pg,l&=~_f,a.suspendedLanes|=l,a.pingedLanes&=~l,a=a.expirationTimes;0<l;){var d=31-dr(l),v=1<<d;a[d]=-1,l&=~v}}function _w(a){if((Ct&6)!==0)throw Error(r(327));Ks();var l=Mi(a,0);if((l&1)===0)return wn(a,Nt()),null;var d=Af(a,l);if(a.tag!==0&&d===2){var v=si(a);v!==0&&(l=v,d=mg(a,v))}if(d===1)throw d=mu,Ja(a,0),wa(a,l),wn(a,Nt()),d;if(d===6)throw Error(r(345));return a.finishedWork=a.current.alternate,a.finishedLanes=l,Za(a,Sn,Wo),wn(a,Nt()),null}function bg(a,l){var d=Ct;Ct|=1;try{return a(l)}finally{Ct=d,Ct===0&&(Xs=Nt()+500,nf&&ha())}}function Qa(a){ba!==null&&ba.tag===0&&(Ct&6)===0&&Ks();var l=Ct;Ct|=1;var d=pi.transition,v=yt;try{if(pi.transition=null,yt=1,a)return a()}finally{yt=v,pi.transition=d,Ct=l,(Ct&6)===0&&ha()}}function Sg(){jn=qs.current,Qt(qs)}function Ja(a,l){a.finishedWork=null,a.finishedLanes=0;var d=a.timeoutHandle;if(d!==-1&&(a.timeoutHandle=-1,Gk(d)),pr!==null)for(d=pr.return;d!==null;){var v=d;switch(Th(v),v.tag){case 1:v=v.type.childContextTypes,v!=null&&tf();break;case 3:Us(),Qt(mn),Qt(Xr),Vh();break;case 5:zh(v);break;case 4:Us();break;case 13:Qt(tr);break;case 19:Qt(tr);break;case 10:Dh(v.type._context);break;case 22:case 23:Sg()}d=d.return}if(_r=a,pr=a=xa(a.current,null),Mr=jn=l,yr=0,mu=null,pg=_f=Ya=0,Sn=yu=null,qa!==null){for(l=0;l<qa.length;l++)if(d=qa[l],v=d.interleaved,v!==null){d.interleaved=null;var w=v.next,E=d.pending;if(E!==null){var I=E.next;E.next=w,v.next=I}d.pending=v}qa=null}return a}function Rw(a,l){do{var d=pr;try{if(Mh(),hf.current=yf,gf){for(var v=rr.memoizedState;v!==null;){var w=v.queue;w!==null&&(w.pending=null),v=v.next}gf=!1}if(Ka=0,Cr=mr=rr=null,fu=!1,du=0,dg.current=null,d===null||d.return===null){yr=1,mu=l,pr=null;break}e:{var E=a,I=d.return,H=d,Q=l;if(l=Mr,H.flags|=32768,Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var ce=Q,Se=H,xe=Se.tag;if((Se.mode&1)===0&&(xe===0||xe===11||xe===15)){var be=Se.alternate;be?(Se.updateQueue=be.updateQueue,Se.memoizedState=be.memoizedState,Se.lanes=be.lanes):(Se.updateQueue=null,Se.memoizedState=null)}var Fe=QS(I);if(Fe!==null){Fe.flags&=-257,JS(Fe,I,H,E,l),Fe.mode&1&&YS(E,ce,l),l=Fe,Q=ce;var He=l.updateQueue;if(He===null){var We=new Set;We.add(Q),l.updateQueue=We}else He.add(Q);break e}else{if((l&1)===0){YS(E,ce,l),wg();break e}Q=Error(r(426))}}else if(Zt&&H.mode&1){var sr=QS(I);if(sr!==null){(sr.flags&65536)===0&&(sr.flags|=256),JS(sr,I,H,E,l),kh(Ws(Q,H));break e}}E=Q=Ws(Q,H),yr!==4&&(yr=2),yu===null?yu=[E]:yu.push(E),E=I;do{switch(E.tag){case 3:E.flags|=65536,l&=-l,E.lanes|=l;var ae=XS(E,Q,l);wS(E,ae);break e;case 1:H=Q;var ee=E.type,le=E.stateNode;if((E.flags&128)===0&&(typeof ee.getDerivedStateFromError=="function"||le!==null&&typeof le.componentDidCatch=="function"&&(ya===null||!ya.has(le)))){E.flags|=65536,l&=-l,E.lanes|=l;var Re=KS(E,H,l);wS(E,Re);break e}}E=E.return}while(E!==null)}Tw(d)}catch(qe){l=qe,pr===d&&d!==null&&(pr=d=d.return);continue}break}while(!0)}function Ow(){var a=Cf.current;return Cf.current=yf,a===null?yf:a}function wg(){(yr===0||yr===3||yr===2)&&(yr=4),_r===null||(Ya&268435455)===0&&(_f&268435455)===0||wa(_r,Mr)}function Af(a,l){var d=Ct;Ct|=2;var v=Ow();(_r!==a||Mr!==l)&&(Wo=null,Ja(a,l));do try{m5();break}catch(w){Rw(a,w)}while(!0);if(Mh(),Ct=d,Cf.current=v,pr!==null)throw Error(r(261));return _r=null,Mr=0,yr}function m5(){for(;pr!==null;)$w(pr)}function y5(){for(;pr!==null&&!ni();)$w(pr)}function $w(a){var l=kw(a.alternate,a,jn);a.memoizedProps=a.pendingProps,l===null?Tw(a):pr=l,dg.current=null}function Tw(a){var l=a;do{var d=l.alternate;if(a=l.return,(l.flags&32768)===0){if(d=c5(d,l,jn),d!==null){pr=d;return}}else{if(d=f5(d,l),d!==null){d.flags&=32767,pr=d;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{yr=6,pr=null;return}}if(l=l.sibling,l!==null){pr=l;return}pr=l=a}while(l!==null);yr===0&&(yr=5)}function Za(a,l,d){var v=yt,w=pi.transition;try{pi.transition=null,yt=1,b5(a,l,d,v)}finally{pi.transition=w,yt=v}return null}function b5(a,l,d,v){do Ks();while(ba!==null);if((Ct&6)!==0)throw Error(r(327));d=a.finishedWork;var w=a.finishedLanes;if(d===null)return null;if(a.finishedWork=null,a.finishedLanes=0,d===a.current)throw Error(r(177));a.callbackNode=null,a.callbackPriority=0;var E=d.lanes|d.childLanes;if(sa(a,E),a===_r&&(pr=_r=null,Mr=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||Of||(Of=!0,Pw(oi,function(){return Ks(),null})),E=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||E){E=pi.transition,pi.transition=null;var I=yt;yt=1;var H=Ct;Ct|=4,dg.current=null,p5(a,d),bw(d,a),jk(wh),Bc=!!Sh,wh=Sh=null,a.current=d,h5(d),_o(),Ct=H,yt=I,pi.transition=E}else a.current=d;if(Of&&(Of=!1,ba=a,$f=w),E=a.pendingLanes,E===0&&(ya=null),ai(d.stateNode),wn(a,Nt()),l!==null)for(v=a.onRecoverableError,d=0;d<l.length;d++)w=l[d],v(w.value,{componentStack:w.stack,digest:w.digest});if(Rf)throw Rf=!1,a=gg,gg=null,a;return($f&1)!==0&&a.tag!==0&&Ks(),E=a.pendingLanes,(E&1)!==0?a===vg?bu++:(bu=0,vg=a):bu=0,ha(),null}function Ks(){if(ba!==null){var a=Ao($f),l=pi.transition,d=yt;try{if(pi.transition=null,yt=16>a?16:a,ba===null)var v=!1;else{if(a=ba,ba=null,$f=0,(Ct&6)!==0)throw Error(r(331));var w=Ct;for(Ct|=4,Be=a.current;Be!==null;){var E=Be,I=E.child;if((Be.flags&16)!==0){var H=E.deletions;if(H!==null){for(var Q=0;Q<H.length;Q++){var ce=H[Q];for(Be=ce;Be!==null;){var Se=Be;switch(Se.tag){case 0:case 11:case 15:vu(8,Se,E)}var xe=Se.child;if(xe!==null)xe.return=Se,Be=xe;else for(;Be!==null;){Se=Be;var be=Se.sibling,Fe=Se.return;if(hw(Se),Se===ce){Be=null;break}if(be!==null){be.return=Fe,Be=be;break}Be=Fe}}}var He=E.alternate;if(He!==null){var We=He.child;if(We!==null){He.child=null;do{var sr=We.sibling;We.sibling=null,We=sr}while(We!==null)}}Be=E}}if((E.subtreeFlags&2064)!==0&&I!==null)I.return=E,Be=I;else e:for(;Be!==null;){if(E=Be,(E.flags&2048)!==0)switch(E.tag){case 0:case 11:case 15:vu(9,E,E.return)}var ae=E.sibling;if(ae!==null){ae.return=E.return,Be=ae;break e}Be=E.return}}var ee=a.current;for(Be=ee;Be!==null;){I=Be;var le=I.child;if((I.subtreeFlags&2064)!==0&&le!==null)le.return=I,Be=le;else e:for(I=ee;Be!==null;){if(H=Be,(H.flags&2048)!==0)try{switch(H.tag){case 0:case 11:case 15:Ef(9,H)}}catch(qe){ir(H,H.return,qe)}if(H===I){Be=null;break e}var Re=H.sibling;if(Re!==null){Re.return=H.return,Be=Re;break e}Be=H.return}}if(Ct=w,ha(),gr&&typeof gr.onPostCommitFiberRoot=="function")try{gr.onPostCommitFiberRoot(rn,a)}catch{}v=!0}return v}finally{yt=d,pi.transition=l}}return!1}function Iw(a,l,d){l=Ws(d,l),l=XS(a,l,1),a=va(a,l,1),l=an(),a!==null&&(Dn(a,1,l),wn(a,l))}function ir(a,l,d){if(a.tag===3)Iw(a,a,d);else for(;l!==null;){if(l.tag===3){Iw(l,a,d);break}else if(l.tag===1){var v=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(ya===null||!ya.has(v))){a=Ws(d,a),a=KS(l,a,1),l=va(l,a,1),a=an(),l!==null&&(Dn(l,1,a),wn(l,a));break}}l=l.return}}function S5(a,l,d){var v=a.pingCache;v!==null&&v.delete(l),l=an(),a.pingedLanes|=a.suspendedLanes&d,_r===a&&(Mr&d)===d&&(yr===4||yr===3&&(Mr&130023424)===Mr&&500>Nt()-hg?Ja(a,0):pg|=d),wn(a,l)}function Aw(a,l){l===0&&((a.mode&1)===0?l=1:(l=Wr,Wr<<=1,(Wr&130023424)===0&&(Wr=4194304)));var d=an();a=Vo(a,l),a!==null&&(Dn(a,l,d),wn(a,d))}function w5(a){var l=a.memoizedState,d=0;l!==null&&(d=l.retryLane),Aw(a,d)}function x5(a,l){var d=0;switch(a.tag){case 13:var v=a.stateNode,w=a.memoizedState;w!==null&&(d=w.retryLane);break;case 19:v=a.stateNode;break;default:throw Error(r(314))}v!==null&&v.delete(l),Aw(a,d)}var kw;kw=function(a,l,d){if(a!==null)if(a.memoizedProps!==l.pendingProps||mn.current)bn=!0;else{if((a.lanes&d)===0&&(l.flags&128)===0)return bn=!1,u5(a,l,d);bn=(a.flags&131072)!==0}else bn=!1,Zt&&(l.flags&1048576)!==0&&fS(l,af,l.index);switch(l.lanes=0,l.tag){case 2:var v=l.type;wf(a,l),a=l.pendingProps;var w=Fs(l,Xr.current);Hs(l,d),w=Wh(null,l,v,a,w,d);var E=Gh();return l.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,yn(v)?(E=!0,rf(l)):E=!1,l.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,Nh(l),w.updater=bf,l.stateNode=w,w._reactInternals=l,Jh(l,v,a,d),l=rg(null,l,v,!0,E,d)):(l.tag=0,Zt&&E&&$h(l),on(null,l,w,d),l=l.child),l;case 16:v=l.elementType;e:{switch(wf(a,l),a=l.pendingProps,w=v._init,v=w(v._payload),l.type=v,w=l.tag=C5(v),a=ji(v,a),w){case 0:l=tg(null,l,v,a,d);break e;case 1:l=iw(null,l,v,a,d);break e;case 11:l=ZS(null,l,v,a,d);break e;case 14:l=ew(null,l,v,ji(v.type,a),d);break e}throw Error(r(306,v,""))}return l;case 0:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:ji(v,w),tg(a,l,v,w,d);case 1:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:ji(v,w),iw(a,l,v,w,d);case 3:e:{if(ow(l),a===null)throw Error(r(387));v=l.pendingProps,E=l.memoizedState,w=E.element,SS(a,l),df(l,v,null,d);var I=l.memoizedState;if(v=I.element,E.isDehydrated)if(E={element:v,isDehydrated:!1,cache:I.cache,pendingSuspenseBoundaries:I.pendingSuspenseBoundaries,transitions:I.transitions},l.updateQueue.baseState=E,l.memoizedState=E,l.flags&256){w=Ws(Error(r(423)),l),l=aw(a,l,v,d,w);break e}else if(v!==w){w=Ws(Error(r(424)),l),l=aw(a,l,v,d,w);break e}else for(Nn=fa(l.stateNode.containerInfo.firstChild),Fn=l,Zt=!0,Ni=null,d=yS(l,null,v,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(zs(),v===w){l=Uo(a,l,d);break e}on(a,l,v,d)}l=l.child}return l;case 5:return ES(l),a===null&&Ah(l),v=l.type,w=l.pendingProps,E=a!==null?a.memoizedProps:null,I=w.children,xh(v,w)?I=null:E!==null&&xh(v,E)&&(l.flags|=32),nw(a,l),on(a,l,I,d),l.child;case 6:return a===null&&Ah(l),null;case 13:return sw(a,l,d);case 4:return jh(l,l.stateNode.containerInfo),v=l.pendingProps,a===null?l.child=Bs(l,null,v,d):on(a,l,v,d),l.child;case 11:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:ji(v,w),ZS(a,l,v,w,d);case 7:return on(a,l,l.pendingProps,d),l.child;case 8:return on(a,l,l.pendingProps.children,d),l.child;case 12:return on(a,l,l.pendingProps.children,d),l.child;case 10:e:{if(v=l.type._context,w=l.pendingProps,E=l.memoizedProps,I=w.value,qt(uf,v._currentValue),v._currentValue=I,E!==null)if(Fi(E.value,I)){if(E.children===w.children&&!mn.current){l=Uo(a,l,d);break e}}else for(E=l.child,E!==null&&(E.return=l);E!==null;){var H=E.dependencies;if(H!==null){I=E.child;for(var Q=H.firstContext;Q!==null;){if(Q.context===v){if(E.tag===1){Q=Ho(-1,d&-d),Q.tag=2;var ce=E.updateQueue;if(ce!==null){ce=ce.shared;var Se=ce.pending;Se===null?Q.next=Q:(Q.next=Se.next,Se.next=Q),ce.pending=Q}}E.lanes|=d,Q=E.alternate,Q!==null&&(Q.lanes|=d),Lh(E.return,d,l),H.lanes|=d;break}Q=Q.next}}else if(E.tag===10)I=E.type===l.type?null:E.child;else if(E.tag===18){if(I=E.return,I===null)throw Error(r(341));I.lanes|=d,H=I.alternate,H!==null&&(H.lanes|=d),Lh(I,d,l),I=E.sibling}else I=E.child;if(I!==null)I.return=E;else for(I=E;I!==null;){if(I===l){I=null;break}if(E=I.sibling,E!==null){E.return=I.return,I=E;break}I=I.return}E=I}on(a,l,w.children,d),l=l.child}return l;case 9:return w=l.type,v=l.pendingProps.children,Hs(l,d),w=fi(w),v=v(w),l.flags|=1,on(a,l,v,d),l.child;case 14:return v=l.type,w=ji(v,l.pendingProps),w=ji(v.type,w),ew(a,l,v,w,d);case 15:return tw(a,l,l.type,l.pendingProps,d);case 17:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:ji(v,w),wf(a,l),l.tag=1,yn(v)?(a=!0,rf(l)):a=!1,Hs(l,d),GS(l,v,w),Jh(l,v,w,d),rg(null,l,v,!0,a,d);case 19:return uw(a,l,d);case 22:return rw(a,l,d)}throw Error(r(156,l.tag))};function Pw(a,l){return Co(a,l)}function E5(a,l,d,v){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hi(a,l,d,v){return new E5(a,l,d,v)}function xg(a){return a=a.prototype,!(!a||!a.isReactComponent)}function C5(a){if(typeof a=="function")return xg(a)?1:0;if(a!=null){if(a=a.$$typeof,a===Y)return 11;if(a===F)return 14}return 2}function xa(a,l){var d=a.alternate;return d===null?(d=hi(a.tag,l,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=l,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&14680064,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,l=a.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function kf(a,l,d,v,w,E){var I=2;if(v=a,typeof a=="function")xg(a)&&(I=1);else if(typeof a=="string")I=5;else e:switch(a){case P:return es(d.children,w,E,l);case L:I=8,w|=8;break;case z:return a=hi(12,d,l,w|2),a.elementType=z,a.lanes=E,a;case N:return a=hi(13,d,l,w),a.elementType=N,a.lanes=E,a;case j:return a=hi(19,d,l,w),a.elementType=j,a.lanes=E,a;case U:return Pf(d,w,E,l);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case B:I=10;break e;case X:I=9;break e;case Y:I=11;break e;case F:I=14;break e;case q:I=16,v=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return l=hi(I,d,l,w),l.elementType=a,l.type=v,l.lanes=E,l}function es(a,l,d,v){return a=hi(7,a,v,l),a.lanes=d,a}function Pf(a,l,d,v){return a=hi(22,a,v,l),a.elementType=U,a.lanes=d,a.stateNode={isHidden:!1},a}function Eg(a,l,d){return a=hi(6,a,null,l),a.lanes=d,a}function Cg(a,l,d){return l=hi(4,a.children!==null?a.children:[],a.key,l),l.lanes=d,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}function _5(a,l,d,v,w){this.tag=l,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=no(0),this.expirationTimes=no(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=no(0),this.identifierPrefix=v,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function _g(a,l,d,v,w,E,I,H,Q){return a=new _5(a,l,d,H,Q),l===1?(l=1,E===!0&&(l|=8)):l=0,E=hi(3,null,null,l),a.current=E,E.stateNode=a,E.memoizedState={element:v,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nh(E),a}function R5(a,l,d){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:v==null?null:""+v,children:a,containerInfo:l,implementation:d}}function Mw(a){if(!a)return pa;a=a._reactInternals;e:{if(Ar(a)!==a||a.tag!==1)throw Error(r(170));var l=a;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(yn(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(r(171))}if(a.tag===1){var d=a.type;if(yn(d))return lS(a,d,l)}return l}function Dw(a,l,d,v,w,E,I,H,Q){return a=_g(d,v,!0,a,w,E,I,H,Q),a.context=Mw(null),d=a.current,v=an(),w=Sa(d),E=Ho(v,w),E.callback=l??null,va(d,E,w),a.current.lanes=w,Dn(a,w,v),wn(a,v),a}function Mf(a,l,d,v){var w=l.current,E=an(),I=Sa(w);return d=Mw(d),l.context===null?l.context=d:l.pendingContext=d,l=Ho(E,I),l.payload={element:a},v=v===void 0?null:v,v!==null&&(l.callback=v),a=va(w,l,I),a!==null&&(Vi(a,w,I,E),ff(a,w,I)),I}function Df(a){return a=a.current,a.child?(a.child.tag===5,a.child.stateNode):null}function Lw(a,l){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<l?d:l}}function Rg(a,l){Lw(a,l),(a=a.alternate)&&Lw(a,l)}function O5(){return null}var Fw=typeof reportError=="function"?reportError:function(a){console.error(a)};function Og(a){this._internalRoot=a}Lf.prototype.render=Og.prototype.render=function(a){var l=this._internalRoot;if(l===null)throw Error(r(409));Mf(a,l,null,null)},Lf.prototype.unmount=Og.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var l=a.containerInfo;Qa(function(){Mf(null,a,null,null)}),l[No]=null}};function Lf(a){this._internalRoot=a}Lf.prototype.unstable_scheduleHydration=function(a){if(a){var l=Di();a={blockedOn:null,target:a,priority:l};for(var d=0;d<qr.length&&l!==0&&l<qr[d].priority;d++);qr.splice(d,0,a),d===0&&$t(a)}};function $g(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function Ff(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function Nw(){}function $5(a,l,d,v,w){if(w){if(typeof v=="function"){var E=v;v=function(){var ce=Df(I);E.call(ce)}}var I=Dw(l,v,a,0,null,!1,!1,"",Nw);return a._reactRootContainer=I,a[No]=I.current,nu(a.nodeType===8?a.parentNode:a),Qa(),I}for(;w=a.lastChild;)a.removeChild(w);if(typeof v=="function"){var H=v;v=function(){var ce=Df(Q);H.call(ce)}}var Q=_g(a,0,!1,null,null,!1,!1,"",Nw);return a._reactRootContainer=Q,a[No]=Q.current,nu(a.nodeType===8?a.parentNode:a),Qa(function(){Mf(l,Q,d,v)}),Q}function Nf(a,l,d,v,w){var E=d._reactRootContainer;if(E){var I=E;if(typeof w=="function"){var H=w;w=function(){var Q=Df(I);H.call(Q)}}Mf(l,I,a,w)}else I=$5(d,l,a,w,v);return Df(I)}ko=function(a){switch(a.tag){case 3:var l=a.stateNode;if(l.current.memoizedState.isDehydrated){var d=vn(l.pendingLanes);d!==0&&(io(l,d|1),wn(l,Nt()),(Ct&6)===0&&(Xs=Nt()+500,ha()))}break;case 13:Qa(function(){var v=Vo(a,1);if(v!==null){var w=an();Vi(v,a,1,w)}}),Rg(a,1)}},oo=function(a){if(a.tag===13){var l=Vo(a,134217728);if(l!==null){var d=an();Vi(l,a,134217728,d)}Rg(a,134217728)}},Gr=function(a){if(a.tag===13){var l=Sa(a),d=Vo(a,l);if(d!==null){var v=an();Vi(d,a,l,v)}Rg(a,l)}},Di=function(){return yt},Po=function(a,l){var d=yt;try{return yt=a,l()}finally{yt=d}},me=function(a,l,d){switch(l){case"input":if(Ie(a,d),l=d.name,d.type==="radio"&&l!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<d.length;l++){var v=d[l];if(v!==a&&v.form===a.form){var w=ef(v);if(!w)throw Error(r(90));Oe(v),Ie(v,w)}}}break;case"textarea":ye(a,d);break;case"select":l=d.value,l!=null&&Ue(a,!!d.multiple,l,!1)}},ot=bg,zr=Qa;var T5={usingClientEntryPoint:!1,Events:[au,Ds,ef,it,Je,bg]},Su={findFiberByHostInstance:Ha,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},I5={bundleType:Su.bundleType,version:Su.version,rendererPackageName:Su.rendererPackageName,rendererConfig:Su.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=kn(a),a===null?null:a.stateNode},findFiberByHostInstance:Su.findFiberByHostInstance||O5,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var jf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!jf.isDisabled&&jf.supportsFiber)try{rn=jf.inject(I5),gr=jf}catch{}}return xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T5,xn.createPortal=function(a,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$g(l))throw Error(r(200));return R5(a,l,null,d)},xn.createRoot=function(a,l){if(!$g(a))throw Error(r(299));var d=!1,v="",w=Fw;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),l=_g(a,1,!1,null,null,d,!1,v,w),a[No]=l.current,nu(a.nodeType===8?a.parentNode:a),new Og(l)},xn.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var l=a._reactInternals;if(l===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=kn(l),a=a===null?null:a.stateNode,a},xn.flushSync=function(a){return Qa(a)},xn.hydrate=function(a,l,d){if(!Ff(l))throw Error(r(200));return Nf(null,a,l,!0,d)},xn.hydrateRoot=function(a,l,d){if(!$g(a))throw Error(r(405));var v=d!=null&&d.hydratedSources||null,w=!1,E="",I=Fw;if(d!=null&&(d.unstable_strictMode===!0&&(w=!0),d.identifierPrefix!==void 0&&(E=d.identifierPrefix),d.onRecoverableError!==void 0&&(I=d.onRecoverableError)),l=Dw(l,null,a,1,d??null,w,!1,E,I),a[No]=l.current,nu(a),v)for(a=0;a<v.length;a++)d=v[a],w=d._getVersion,w=w(d._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[d,w]:l.mutableSourceEagerHydrationData.push(d,w);return new Lf(l)},xn.render=function(a,l,d){if(!Ff(l))throw Error(r(200));return Nf(null,a,l,!1,d)},xn.unmountComponentAtNode=function(a){if(!Ff(a))throw Error(r(40));return a._reactRootContainer?(Qa(function(){Nf(null,null,a,!1,function(){a._reactRootContainer=null,a[No]=null})}),!0):!1},xn.unstable_batchedUpdates=bg,xn.unstable_renderSubtreeIntoContainer=function(a,l,d,v){if(!Ff(d))throw Error(r(200));if(a==null||a._reactInternals===void 0)throw Error(r(38));return Nf(a,l,d,!1,v)},xn.version="18.3.1-next-f1338f8080-20240426",xn}var Sx;function B$(){if(Sx)return Vg.exports;Sx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Vg.exports=gD(),Vg.exports}var wx;function vD(){if(wx)return Zf;wx=1;var e=B$();return Zf.createRoot=e.createRoot,Zf.hydrateRoot=e.hydrateRoot,Zf}var V$=vD();function mD(e,t){return a1(t),V$.hydrateRoot(t,e)}function yD(e,t){a1(t);var r=V$.createRoot(t);return r.render(e),r}function bD(e){return e.unmount(),!0}var T0=e=>{if(e!=null){var t=e.nodeType===1;if(t&&typeof e.getBoundingClientRect=="function")return e.getBoundingClientRect()}},zu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexOrder:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,gridRow:!0,gridRowEnd:!0,gridRowGap:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridColumnStart:!0,lineClamp:!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,scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,shadowOpacity:!0},SD=["ms","Moz","O","Webkit"],wD=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1);Object.keys(zu).forEach(e=>{SD.forEach(t=>{zu[wD(t,e)]=zu[e]})});function xD(e,t,r){var n=t==null||typeof t=="boolean"||t==="";return n?"":!r&&typeof t=="number"&&t!==0&&!(zu.hasOwnProperty(e)&&zu[e])?t+"px":(""+t).trim()}function ED(e,t){var r=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,o=xD(n,t[n],i);n==="float"&&(n="cssFloat"),i?r.setProperty(n,o):r[n]=o}}var xx=e=>{var t=e.offsetHeight,r=e.offsetWidth,n=e.offsetLeft,i=e.offsetTop;for(e=e.offsetParent;e&&e.nodeType===1;)n+=e.offsetLeft+e.clientLeft-e.scrollLeft,i+=e.offsetTop+e.clientTop-e.scrollTop,e=e.offsetParent;return i-=window.scrollY,n-=window.scrollX,{width:r,height:t,top:i,left:n}},Ex=(e,t,r)=>{var n=t||e&&e.parentNode;e&&n&&setTimeout(()=>{if(e.isConnected&&n.isConnected){var i=xx(n),o=xx(e),s=o.height,u=o.left,c=o.top,f=o.width,p=u-i.left,g=c-i.top;r(p,g,f,s,u,c)}},0)},CD={A:!0,BODY:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0},Dd={blur(e){try{e.blur()}catch{}},focus(e){try{var t=e.nodeName;e.getAttribute("tabIndex")==null&&e.isContentEditable!==!0&&CD[t]==null&&e.setAttribute("tabIndex","-1"),e.focus()}catch{}},measure(e,t){Ex(e,null,t)},measureInWindow(e,t){e&&setTimeout(()=>{var r=T0(e),n=r.height,i=r.left,o=r.top,s=r.width;t(i,o,s,n)},0)},measureLayout(e,t,r,n){Ex(e,t,n)},updateView(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=t[r];switch(r){case"style":{ED(e,n);break}case"class":case"className":{e.setAttribute("class",n);break}case"text":case"value":e.value=n;break;default:e.setAttribute(r,n)}}},configureNextLayoutAnimation(e,t){t()},setLayoutAnimationEnabledExperimental(){}};function fr(){return fr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fr.apply(null,arguments)}var _D={children:!0,dataSet:!0,dir:!0,id:!0,ref:!0,suppressHydrationWarning:!0,tabIndex:!0,testID:!0,focusable:!0,nativeID:!0},RD={"aria-activedescendant":!0,"aria-atomic":!0,"aria-autocomplete":!0,"aria-busy":!0,"aria-checked":!0,"aria-colcount":!0,"aria-colindex":!0,"aria-colspan":!0,"aria-controls":!0,"aria-current":!0,"aria-describedby":!0,"aria-details":!0,"aria-disabled":!0,"aria-errormessage":!0,"aria-expanded":!0,"aria-flowto":!0,"aria-haspopup":!0,"aria-hidden":!0,"aria-invalid":!0,"aria-keyshortcuts":!0,"aria-label":!0,"aria-labelledby":!0,"aria-level":!0,"aria-live":!0,"aria-modal":!0,"aria-multiline":!0,"aria-multiselectable":!0,"aria-orientation":!0,"aria-owns":!0,"aria-placeholder":!0,"aria-posinset":!0,"aria-pressed":!0,"aria-readonly":!0,"aria-required":!0,role:!0,"aria-roledescription":!0,"aria-rowcount":!0,"aria-rowindex":!0,"aria-rowspan":!0,"aria-selected":!0,"aria-setsize":!0,"aria-sort":!0,"aria-valuemax":!0,"aria-valuemin":!0,"aria-valuenow":!0,"aria-valuetext":!0,accessibilityActiveDescendant:!0,accessibilityAtomic:!0,accessibilityAutoComplete:!0,accessibilityBusy:!0,accessibilityChecked:!0,accessibilityColumnCount:!0,accessibilityColumnIndex:!0,accessibilityColumnSpan:!0,accessibilityControls:!0,accessibilityCurrent:!0,accessibilityDescribedBy:!0,accessibilityDetails:!0,accessibilityDisabled:!0,accessibilityErrorMessage:!0,accessibilityExpanded:!0,accessibilityFlowTo:!0,accessibilityHasPopup:!0,accessibilityHidden:!0,accessibilityInvalid:!0,accessibilityKeyShortcuts:!0,accessibilityLabel:!0,accessibilityLabelledBy:!0,accessibilityLevel:!0,accessibilityLiveRegion:!0,accessibilityModal:!0,accessibilityMultiline:!0,accessibilityMultiSelectable:!0,accessibilityOrientation:!0,accessibilityOwns:!0,accessibilityPlaceholder:!0,accessibilityPosInSet:!0,accessibilityPressed:!0,accessibilityReadOnly:!0,accessibilityRequired:!0,accessibilityRole:!0,accessibilityRoleDescription:!0,accessibilityRowCount:!0,accessibilityRowIndex:!0,accessibilityRowSpan:!0,accessibilitySelected:!0,accessibilitySetSize:!0,accessibilitySort:!0,accessibilityValueMax:!0,accessibilityValueMin:!0,accessibilityValueNow:!0,accessibilityValueText:!0},OD={onClick:!0,onAuxClick:!0,onContextMenu:!0,onGotPointerCapture:!0,onLostPointerCapture:!0,onPointerCancel:!0,onPointerDown:!0,onPointerEnter:!0,onPointerMove:!0,onPointerLeave:!0,onPointerOut:!0,onPointerOver:!0,onPointerUp:!0},$D={onBlur:!0,onFocus:!0},TD={onKeyDown:!0,onKeyDownCapture:!0,onKeyUp:!0,onKeyUpCapture:!0},ID={onMouseDown:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseOver:!0,onMouseOut:!0,onMouseUp:!0},AD={onTouchCancel:!0,onTouchCancelCapture:!0,onTouchEnd:!0,onTouchEndCapture:!0,onTouchMove:!0,onTouchMoveCapture:!0,onTouchStart:!0,onTouchStartCapture:!0},kD={style:!0};function PD(e,t){var r={};for(var n in e)e.hasOwnProperty(n)&&t[n]===!0&&(r[n]=e[n]);return r}var Cx=ws?x.useLayoutEffect:x.useEffect,I0="__reactLayoutHandler",Wg=null;function MD(){return ws&&typeof window.ResizeObserver<"u"&&Wg==null&&(Wg=new window.ResizeObserver(function(e){e.forEach(t=>{var r=t.target,n=r[I0];typeof n=="function"&&Dd.measure(r,(i,o,s,u,c,f)=>{var p={nativeEvent:{layout:{x:i,y:o,width:s,height:u,left:c,top:f}},timeStamp:Date.now()};Object.defineProperty(p.nativeEvent,"target",{enumerable:!0,get:()=>t.target}),n(p)})})})),Wg}function DD(e,t){var r=MD();Cx(()=>{var n=e.current;n!=null&&(n[I0]=t)},[e,t]),Cx(()=>{var n=e.current;return n!=null&&r!=null&&(typeof n[I0]=="function"?r.observe(n):r.unobserve(n)),()=>{n!=null&&r!=null&&r.unobserve(n)}},[e,r])}function LD(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(i){t.forEach(o=>{if(o!=null){if(typeof o=="function"){o(i);return}if(typeof o=="object"){o.current=i;return}console.error("mergeRefs cannot handle Refs of type boolean, number or string, received ref "+String(o))}})}}function FD(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return x.useMemo(()=>LD(...t),[...t])}var _x=typeof Symbol=="function"&&typeof Symbol()=="symbol"?Symbol():Object.freeze({});function ND(e){var t=x.useRef(_x);return t.current===_x&&(t.current=e()),t.current}function jD(e){e.pointerEvents,e.style;var t=ND(()=>r=>{r!=null&&(r.measure=n=>Dd.measure(r,n),r.measureLayout=(n,i,o)=>Dd.measureLayout(r,n,o,i),r.measureInWindow=n=>Dd.measureInWindow(r,n))});return t}var Rx=()=>{},zD={},BD=[];function Ox(e){return e>20?e%20:e}function H$(e,t){var r,n=!1,i,o,s=e.changedTouches,u=e.type,c=e.metaKey===!0,f=e.shiftKey===!0,p=s&&s[0].force||0,g=Ox(s&&s[0].identifier||0),h=s&&s[0].clientX||e.clientX,m=s&&s[0].clientY||e.clientY,y=s&&s[0].pageX||e.pageX,b=s&&s[0].pageY||e.pageY,S=typeof e.preventDefault=="function"?e.preventDefault.bind(e):Rx,_=e.timeStamp;function C(P){return Array.prototype.slice.call(P).map(L=>({force:L.force,identifier:Ox(L.identifier),get locationX(){return $(L.clientX)},get locationY(){return T(L.clientY)},pageX:L.pageX,pageY:L.pageY,target:L.target,timestamp:_}))}if(s!=null)i=C(s),o=C(e.touches);else{var O=[{force:p,identifier:g,get locationX(){return $(h)},get locationY(){return T(m)},pageX:y,pageY:b,target:e.target,timestamp:_}];i=O,o=u==="mouseup"||u==="dragstart"?BD:O}var R={bubbles:!0,cancelable:!0,currentTarget:null,defaultPrevented:e.defaultPrevented,dispatchConfig:zD,eventPhase:e.eventPhase,isDefaultPrevented(){return e.defaultPrevented},isPropagationStopped(){return n},isTrusted:e.isTrusted,nativeEvent:{altKey:!1,ctrlKey:!1,metaKey:c,shiftKey:f,changedTouches:i,force:p,identifier:g,get locationX(){return $(h)},get locationY(){return T(m)},pageX:y,pageY:b,target:e.target,timestamp:_,touches:o,type:u},persist:Rx,preventDefault:S,stopPropagation(){n=!0},target:e.target,timeStamp:_,touchHistory:t.touchHistory};function $(P){if(r=r||T0(R.currentTarget),r)return P-r.left}function T(P){if(r=r||T0(R.currentTarget),r)return P-r.top}return R}var VD="mousedown",HD="mousemove",UD="mouseup",WD="dragstart",GD="touchstart",qD="touchmove",XD="touchend",KD="touchcancel",YD="scroll",QD="select",JD="selectionchange";function U$(e){return e===GD||e===VD}function W$(e){return e===qD||e===HD}function G$(e){return e===XD||e===UD||q$(e)}function q$(e){return e===KD||e===WD}function ZD(e){return e===YD}function eL(e){return e===QD||e===JD}function tL(){var e=window.getSelection(),t=e.toString(),r=e.anchorNode,n=e.focusNode,i=r&&r.nodeType===window.Node.TEXT_NODE||n&&n.nodeType===window.Node.TEXT_NODE;return t.length>=1&&t!==`
11
+ `+E.stack}return{value:a,source:l,stack:w,digest:null}}function Zh(a,l,d){return{value:a,source:null,stack:d??null,digest:l??null}}function eg(a,l){try{console.error(l.value)}catch(d){setTimeout(function(){throw d})}}var a5=typeof WeakMap=="function"?WeakMap:Map;function XS(a,l,d){d=Ho(-1,d),d.tag=3,d.payload={element:null};var v=l.value;return d.callback=function(){Rf||(Rf=!0,gg=v),eg(a,l)},d}function KS(a,l,d){d=Ho(-1,d),d.tag=3;var v=a.type.getDerivedStateFromError;if(typeof v=="function"){var w=l.value;d.payload=function(){return v(w)},d.callback=function(){eg(a,l)}}var E=a.stateNode;return E!==null&&typeof E.componentDidCatch=="function"&&(d.callback=function(){eg(a,l),typeof v!="function"&&(ya===null?ya=new Set([this]):ya.add(this));var I=l.stack;this.componentDidCatch(l.value,{componentStack:I!==null?I:""})}),d}function YS(a,l,d){var v=a.pingCache;if(v===null){v=a.pingCache=new a5;var w=new Set;v.set(l,w)}else w=v.get(l),w===void 0&&(w=new Set,v.set(l,w));w.has(d)||(w.add(d),a=S5.bind(null,a,l,d),l.then(a,a))}function QS(a){do{var l;if((l=a.tag===13)&&(l=a.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return a;a=a.return}while(a!==null);return null}function JS(a,l,d,v,w){return(a.mode&1)===0?(a===l?a.flags|=65536:(a.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(l=Ho(-1,1),l.tag=2,va(d,l,1))),d.lanes|=1),a):(a.flags|=65536,a.lanes=w,a)}var s5=R.ReactCurrentOwner,bn=!1;function on(a,l,d,v){l.child=a===null?yS(l,null,d,v):Bs(l,a.child,d,v)}function ZS(a,l,d,v,w){d=d.render;var E=l.ref;return Hs(l,w),v=Wh(a,l,d,v,E,w),d=Gh(),a!==null&&!bn?(l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~w,Uo(a,l,w)):(Zt&&d&&$h(l),l.flags|=1,on(a,l,v,w),l.child)}function ew(a,l,d,v,w){if(a===null){var E=d.type;return typeof E=="function"&&!xg(E)&&E.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(l.tag=15,l.type=E,tw(a,l,E,v,w)):(a=kf(d.type,null,v,l,l.mode,w),a.ref=l.ref,a.return=l,l.child=a)}if(E=a.child,(a.lanes&w)===0){var I=E.memoizedProps;if(d=d.compare,d=d!==null?d:eu,d(I,v)&&a.ref===l.ref)return Uo(a,l,w)}return l.flags|=1,a=xa(E,v),a.ref=l.ref,a.return=l,l.child=a}function tw(a,l,d,v,w){if(a!==null){var E=a.memoizedProps;if(eu(E,v)&&a.ref===l.ref)if(bn=!1,l.pendingProps=v=E,(a.lanes&w)!==0)(a.flags&131072)!==0&&(bn=!0);else return l.lanes=a.lanes,Uo(a,l,w)}return tg(a,l,d,v,w)}function rw(a,l,d){var v=l.pendingProps,w=v.children,E=a!==null?a.memoizedState:null;if(v.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},qt(qs,jn),jn|=d;else{if((d&1073741824)===0)return a=E!==null?E.baseLanes|d:d,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:a,cachePool:null,transitions:null},l.updateQueue=null,qt(qs,jn),jn|=a,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},v=E!==null?E.baseLanes:d,qt(qs,jn),jn|=v}else E!==null?(v=E.baseLanes|d,l.memoizedState=null):v=d,qt(qs,jn),jn|=v;return on(a,l,w,d),l.child}function nw(a,l){var d=l.ref;(a===null&&d!==null||a!==null&&a.ref!==d)&&(l.flags|=512,l.flags|=2097152)}function tg(a,l,d,v,w){var E=yn(d)?Ua:Xr.current;return E=Fs(l,E),Hs(l,w),d=Wh(a,l,d,v,E,w),v=Gh(),a!==null&&!bn?(l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~w,Uo(a,l,w)):(Zt&&v&&$h(l),l.flags|=1,on(a,l,d,w),l.child)}function iw(a,l,d,v,w){if(yn(d)){var E=!0;rf(l)}else E=!1;if(Hs(l,w),l.stateNode===null)wf(a,l),GS(l,d,v),Jh(l,d,v,w),v=!0;else if(a===null){var I=l.stateNode,H=l.memoizedProps;I.props=H;var Q=I.context,ce=d.contextType;typeof ce=="object"&&ce!==null?ce=fi(ce):(ce=yn(d)?Ua:Xr.current,ce=Fs(l,ce));var Se=d.getDerivedStateFromProps,xe=typeof Se=="function"||typeof I.getSnapshotBeforeUpdate=="function";xe||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(H!==v||Q!==ce)&&qS(l,I,v,ce),ga=!1;var be=l.memoizedState;I.state=be,df(l,v,I,w),Q=l.memoizedState,H!==v||be!==Q||mn.current||ga?(typeof Se=="function"&&(Qh(l,d,Se,v),Q=l.memoizedState),(H=ga||WS(l,d,H,v,be,Q,ce))?(xe||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount()),typeof I.componentDidMount=="function"&&(l.flags|=4194308)):(typeof I.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=v,l.memoizedState=Q),I.props=v,I.state=Q,I.context=ce,v=H):(typeof I.componentDidMount=="function"&&(l.flags|=4194308),v=!1)}else{I=l.stateNode,SS(a,l),H=l.memoizedProps,ce=l.type===l.elementType?H:ji(l.type,H),I.props=ce,xe=l.pendingProps,be=I.context,Q=d.contextType,typeof Q=="object"&&Q!==null?Q=fi(Q):(Q=yn(d)?Ua:Xr.current,Q=Fs(l,Q));var Fe=d.getDerivedStateFromProps;(Se=typeof Fe=="function"||typeof I.getSnapshotBeforeUpdate=="function")||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(H!==xe||be!==Q)&&qS(l,I,v,Q),ga=!1,be=l.memoizedState,I.state=be,df(l,v,I,w);var He=l.memoizedState;H!==xe||be!==He||mn.current||ga?(typeof Fe=="function"&&(Qh(l,d,Fe,v),He=l.memoizedState),(ce=ga||WS(l,d,ce,v,be,He,Q)||!1)?(Se||typeof I.UNSAFE_componentWillUpdate!="function"&&typeof I.componentWillUpdate!="function"||(typeof I.componentWillUpdate=="function"&&I.componentWillUpdate(v,He,Q),typeof I.UNSAFE_componentWillUpdate=="function"&&I.UNSAFE_componentWillUpdate(v,He,Q)),typeof I.componentDidUpdate=="function"&&(l.flags|=4),typeof I.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof I.componentDidUpdate!="function"||H===a.memoizedProps&&be===a.memoizedState||(l.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||H===a.memoizedProps&&be===a.memoizedState||(l.flags|=1024),l.memoizedProps=v,l.memoizedState=He),I.props=v,I.state=He,I.context=Q,v=ce):(typeof I.componentDidUpdate!="function"||H===a.memoizedProps&&be===a.memoizedState||(l.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||H===a.memoizedProps&&be===a.memoizedState||(l.flags|=1024),v=!1)}return rg(a,l,d,v,E,w)}function rg(a,l,d,v,w,E){nw(a,l);var I=(l.flags&128)!==0;if(!v&&!I)return w&&uS(l,d,!1),Uo(a,l,E);v=l.stateNode,s5.current=l;var H=I&&typeof d.getDerivedStateFromError!="function"?null:v.render();return l.flags|=1,a!==null&&I?(l.child=Bs(l,a.child,null,E),l.child=Bs(l,null,H,E)):on(a,l,H,E),l.memoizedState=v.state,w&&uS(l,d,!0),l.child}function ow(a){var l=a.stateNode;l.pendingContext?sS(a,l.pendingContext,l.pendingContext!==l.context):l.context&&sS(a,l.context,!1),jh(a,l.containerInfo)}function aw(a,l,d,v,w){return zs(),kh(w),l.flags|=256,on(a,l,d,v),l.child}var ng={dehydrated:null,treeContext:null,retryLane:0};function ig(a){return{baseLanes:a,cachePool:null,transitions:null}}function sw(a,l,d){var v=l.pendingProps,w=tr.current,E=!1,I=(l.flags&128)!==0,H;if((H=I)||(H=a!==null&&a.memoizedState===null?!1:(w&2)!==0),H?(E=!0,l.flags&=-129):(a===null||a.memoizedState!==null)&&(w|=1),qt(tr,w&1),a===null)return Ah(l),a=l.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?((l.mode&1)===0?l.lanes=1:a.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(I=v.children,a=v.fallback,E?(v=l.mode,E=l.child,I={mode:"hidden",children:I},(v&1)===0&&E!==null?(E.childLanes=0,E.pendingProps=I):E=Pf(I,v,0,null),a=es(a,v,d,null),E.return=l,a.return=l,E.sibling=a,l.child=E,l.child.memoizedState=ig(d),l.memoizedState=ng,a):og(l,I));if(w=a.memoizedState,w!==null&&(H=w.dehydrated,H!==null))return l5(a,l,I,v,H,w,d);if(E){E=v.fallback,I=l.mode,w=a.child,H=w.sibling;var Q={mode:"hidden",children:v.children};return(I&1)===0&&l.child!==w?(v=l.child,v.childLanes=0,v.pendingProps=Q,l.deletions=null):(v=xa(w,Q),v.subtreeFlags=w.subtreeFlags&14680064),H!==null?E=xa(H,E):(E=es(E,I,d,null),E.flags|=2),E.return=l,v.return=l,v.sibling=E,l.child=v,v=E,E=l.child,I=a.child.memoizedState,I=I===null?ig(d):{baseLanes:I.baseLanes|d,cachePool:null,transitions:I.transitions},E.memoizedState=I,E.childLanes=a.childLanes&~d,l.memoizedState=ng,v}return E=a.child,a=E.sibling,v=xa(E,{mode:"visible",children:v.children}),(l.mode&1)===0&&(v.lanes=d),v.return=l,v.sibling=null,a!==null&&(d=l.deletions,d===null?(l.deletions=[a],l.flags|=16):d.push(a)),l.child=v,l.memoizedState=null,v}function og(a,l){return l=Pf({mode:"visible",children:l},a.mode,0,null),l.return=a,a.child=l}function Sf(a,l,d,v){return v!==null&&kh(v),Bs(l,a.child,null,d),a=og(l,l.pendingProps.children),a.flags|=2,l.memoizedState=null,a}function l5(a,l,d,v,w,E,I){if(d)return l.flags&256?(l.flags&=-257,v=Zh(Error(r(422))),Sf(a,l,I,v)):l.memoizedState!==null?(l.child=a.child,l.flags|=128,null):(E=v.fallback,w=l.mode,v=Pf({mode:"visible",children:v.children},w,0,null),E=es(E,w,I,null),E.flags|=2,v.return=l,E.return=l,v.sibling=E,l.child=v,(l.mode&1)!==0&&Bs(l,a.child,null,I),l.child.memoizedState=ig(I),l.memoizedState=ng,E);if((l.mode&1)===0)return Sf(a,l,I,null);if(w.data==="$!"){if(v=w.nextSibling&&w.nextSibling.dataset,v)var H=v.dgst;return v=H,E=Error(r(419)),v=Zh(E,v,void 0),Sf(a,l,I,v)}if(H=(I&a.childLanes)!==0,bn||H){if(v=Rr,v!==null){switch(I&-I){case 4:w=2;break;case 16:w=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:w=32;break;case 536870912:w=268435456;break;default:w=0}w=(w&(v.suspendedLanes|I))!==0?0:w,w!==0&&w!==E.retryLane&&(E.retryLane=w,Vo(a,w),Vi(v,a,w,-1))}return wg(),v=Zh(Error(r(421))),Sf(a,l,I,v)}return w.data==="$?"?(l.flags|=128,l.child=a.child,l=w5.bind(null,a),w._reactRetry=l,null):(a=E.treeContext,Nn=fa(w.nextSibling),Fn=l,Zt=!0,Ni=null,a!==null&&(ui[ci++]=zo,ui[ci++]=Bo,ui[ci++]=Wa,zo=a.id,Bo=a.overflow,Wa=l),l=og(l,v.children),l.flags|=4096,l)}function lw(a,l,d){a.lanes|=l;var v=a.alternate;v!==null&&(v.lanes|=l),Lh(a.return,l,d)}function ag(a,l,d,v,w){var E=a.memoizedState;E===null?a.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:v,tail:d,tailMode:w}:(E.isBackwards=l,E.rendering=null,E.renderingStartTime=0,E.last=v,E.tail=d,E.tailMode=w)}function uw(a,l,d){var v=l.pendingProps,w=v.revealOrder,E=v.tail;if(on(a,l,v.children,d),v=tr.current,(v&2)!==0)v=v&1|2,l.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=l.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&lw(a,d,l);else if(a.tag===19)lw(a,d,l);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break e;for(;a.sibling===null;){if(a.return===null||a.return===l)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}v&=1}if(qt(tr,v),(l.mode&1)===0)l.memoizedState=null;else switch(w){case"forwards":for(d=l.child,w=null;d!==null;)a=d.alternate,a!==null&&pf(a)===null&&(w=d),d=d.sibling;d=w,d===null?(w=l.child,l.child=null):(w=d.sibling,d.sibling=null),ag(l,!1,w,d,E);break;case"backwards":for(d=null,w=l.child,l.child=null;w!==null;){if(a=w.alternate,a!==null&&pf(a)===null){l.child=w;break}a=w.sibling,w.sibling=d,d=w,w=a}ag(l,!0,d,null,E);break;case"together":ag(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function wf(a,l){(l.mode&1)===0&&a!==null&&(a.alternate=null,l.alternate=null,l.flags|=2)}function Uo(a,l,d){if(a!==null&&(l.dependencies=a.dependencies),Ya|=l.lanes,(d&l.childLanes)===0)return null;if(a!==null&&l.child!==a.child)throw Error(r(153));if(l.child!==null){for(a=l.child,d=xa(a,a.pendingProps),l.child=d,d.return=l;a.sibling!==null;)a=a.sibling,d=d.sibling=xa(a,a.pendingProps),d.return=l;d.sibling=null}return l.child}function u5(a,l,d){switch(l.tag){case 3:ow(l),zs();break;case 5:ES(l);break;case 1:yn(l.type)&&rf(l);break;case 4:jh(l,l.stateNode.containerInfo);break;case 10:var v=l.type._context,w=l.memoizedProps.value;qt(uf,v._currentValue),v._currentValue=w;break;case 13:if(v=l.memoizedState,v!==null)return v.dehydrated!==null?(qt(tr,tr.current&1),l.flags|=128,null):(d&l.child.childLanes)!==0?sw(a,l,d):(qt(tr,tr.current&1),a=Uo(a,l,d),a!==null?a.sibling:null);qt(tr,tr.current&1);break;case 19:if(v=(d&l.childLanes)!==0,(a.flags&128)!==0){if(v)return uw(a,l,d);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),qt(tr,tr.current),v)break;return null;case 22:case 23:return l.lanes=0,rw(a,l,d)}return Uo(a,l,d)}var cw,sg,fw,dw;cw=function(a,l){for(var d=l.child;d!==null;){if(d.tag===5||d.tag===6)a.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},sg=function(){},fw=function(a,l,d,v){var w=a.memoizedProps;if(w!==v){a=l.stateNode,Xa(lo.current);var E=null;switch(d){case"input":w=Ae(a,w),v=Ae(a,v),E=[];break;case"select":w=K({},w,{value:void 0}),v=K({},v,{value:void 0}),E=[];break;case"textarea":w=Qe(a,w),v=Qe(a,v),E=[];break;default:typeof w.onClick!="function"&&typeof v.onClick=="function"&&(a.onclick=Zc)}_e(d,v);var I;d=null;for(ce in w)if(!v.hasOwnProperty(ce)&&w.hasOwnProperty(ce)&&w[ce]!=null)if(ce==="style"){var H=w[ce];for(I in H)H.hasOwnProperty(I)&&(d||(d={}),d[I]="")}else ce!=="dangerouslySetInnerHTML"&&ce!=="children"&&ce!=="suppressContentEditableWarning"&&ce!=="suppressHydrationWarning"&&ce!=="autoFocus"&&(i.hasOwnProperty(ce)?E||(E=[]):(E=E||[]).push(ce,null));for(ce in v){var Q=v[ce];if(H=w?.[ce],v.hasOwnProperty(ce)&&Q!==H&&(Q!=null||H!=null))if(ce==="style")if(H){for(I in H)!H.hasOwnProperty(I)||Q&&Q.hasOwnProperty(I)||(d||(d={}),d[I]="");for(I in Q)Q.hasOwnProperty(I)&&H[I]!==Q[I]&&(d||(d={}),d[I]=Q[I])}else d||(E||(E=[]),E.push(ce,d)),d=Q;else ce==="dangerouslySetInnerHTML"?(Q=Q?Q.__html:void 0,H=H?H.__html:void 0,Q!=null&&H!==Q&&(E=E||[]).push(ce,Q)):ce==="children"?typeof Q!="string"&&typeof Q!="number"||(E=E||[]).push(ce,""+Q):ce!=="suppressContentEditableWarning"&&ce!=="suppressHydrationWarning"&&(i.hasOwnProperty(ce)?(Q!=null&&ce==="onScroll"&&Yt("scroll",a),E||H===Q||(E=[])):(E=E||[]).push(ce,Q))}d&&(E=E||[]).push("style",d);var ce=E;(l.updateQueue=ce)&&(l.flags|=4)}},dw=function(a,l,d,v){d!==v&&(l.flags|=4)};function gu(a,l){if(!Zt)switch(a.tailMode){case"hidden":l=a.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var v=null;d!==null;)d.alternate!==null&&(v=d),d=d.sibling;v===null?l||a.tail===null?a.tail=null:a.tail.sibling=null:v.sibling=null}}function Yr(a){var l=a.alternate!==null&&a.alternate.child===a.child,d=0,v=0;if(l)for(var w=a.child;w!==null;)d|=w.lanes|w.childLanes,v|=w.subtreeFlags&14680064,v|=w.flags&14680064,w.return=a,w=w.sibling;else for(w=a.child;w!==null;)d|=w.lanes|w.childLanes,v|=w.subtreeFlags,v|=w.flags,w.return=a,w=w.sibling;return a.subtreeFlags|=v,a.childLanes=d,l}function c5(a,l,d){var v=l.pendingProps;switch(Th(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yr(l),null;case 1:return yn(l.type)&&tf(),Yr(l),null;case 3:return v=l.stateNode,Us(),Qt(mn),Qt(Xr),Vh(),v.pendingContext&&(v.context=v.pendingContext,v.pendingContext=null),(a===null||a.child===null)&&(sf(l)?l.flags|=4:a===null||a.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Ni!==null&&(yg(Ni),Ni=null))),sg(a,l),Yr(l),null;case 5:zh(l);var w=Xa(cu.current);if(d=l.type,a!==null&&l.stateNode!=null)fw(a,l,d,v,w),a.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!v){if(l.stateNode===null)throw Error(r(166));return Yr(l),null}if(a=Xa(lo.current),sf(l)){v=l.stateNode,d=l.type;var E=l.memoizedProps;switch(v[so]=l,v[ou]=E,a=(l.mode&1)!==0,d){case"dialog":Yt("cancel",v),Yt("close",v);break;case"iframe":case"object":case"embed":Yt("load",v);break;case"video":case"audio":for(w=0;w<ru.length;w++)Yt(ru[w],v);break;case"source":Yt("error",v);break;case"img":case"image":case"link":Yt("error",v),Yt("load",v);break;case"details":Yt("toggle",v);break;case"input":$e(v,E),Yt("invalid",v);break;case"select":v._wrapperState={wasMultiple:!!E.multiple},Yt("invalid",v);break;case"textarea":Ve(v,E),Yt("invalid",v)}_e(d,E),w=null;for(var I in E)if(E.hasOwnProperty(I)){var H=E[I];I==="children"?typeof H=="string"?v.textContent!==H&&(E.suppressHydrationWarning!==!0&&Jc(v.textContent,H,a),w=["children",H]):typeof H=="number"&&v.textContent!==""+H&&(E.suppressHydrationWarning!==!0&&Jc(v.textContent,H,a),w=["children",""+H]):i.hasOwnProperty(I)&&H!=null&&I==="onScroll"&&Yt("scroll",v)}switch(d){case"input":Me(v),Ke(v,E,!0);break;case"textarea":Me(v),Ge(v);break;case"select":case"option":break;default:typeof E.onClick=="function"&&(v.onclick=Zc)}v=w,l.updateQueue=v,v!==null&&(l.flags|=4)}else{I=w.nodeType===9?w:w.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=ct(d)),a==="http://www.w3.org/1999/xhtml"?d==="script"?(a=I.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof v.is=="string"?a=I.createElement(d,{is:v.is}):(a=I.createElement(d),d==="select"&&(I=a,v.multiple?I.multiple=!0:v.size&&(I.size=v.size))):a=I.createElementNS(a,d),a[so]=l,a[ou]=v,cw(a,l,!1,!1),l.stateNode=a;e:{switch(I=De(d,v),d){case"dialog":Yt("cancel",a),Yt("close",a),w=v;break;case"iframe":case"object":case"embed":Yt("load",a),w=v;break;case"video":case"audio":for(w=0;w<ru.length;w++)Yt(ru[w],a);w=v;break;case"source":Yt("error",a),w=v;break;case"img":case"image":case"link":Yt("error",a),Yt("load",a),w=v;break;case"details":Yt("toggle",a),w=v;break;case"input":$e(a,v),w=Ae(a,v),Yt("invalid",a);break;case"option":w=v;break;case"select":a._wrapperState={wasMultiple:!!v.multiple},w=K({},v,{value:void 0}),Yt("invalid",a);break;case"textarea":Ve(a,v),w=Qe(a,v),Yt("invalid",a);break;default:w=v}_e(d,w),H=w;for(E in H)if(H.hasOwnProperty(E)){var Q=H[E];E==="style"?V(a,Q):E==="dangerouslySetInnerHTML"?(Q=Q?Q.__html:void 0,Q!=null&&Kt(a,Q)):E==="children"?typeof Q=="string"?(d!=="textarea"||Q!=="")&&Ft(a,Q):typeof Q=="number"&&Ft(a,""+Q):E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&E!=="autoFocus"&&(i.hasOwnProperty(E)?Q!=null&&E==="onScroll"&&Yt("scroll",a):Q!=null&&O(a,E,Q,I))}switch(d){case"input":Me(a),Ke(a,v,!1);break;case"textarea":Me(a),Ge(a);break;case"option":v.value!=null&&a.setAttribute("value",""+se(v.value));break;case"select":a.multiple=!!v.multiple,E=v.value,E!=null?Ue(a,!!v.multiple,E,!1):v.defaultValue!=null&&Ue(a,!!v.multiple,v.defaultValue,!0);break;default:typeof w.onClick=="function"&&(a.onclick=Zc)}switch(d){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}}v&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return Yr(l),null;case 6:if(a&&l.stateNode!=null)dw(a,l,a.memoizedProps,v);else{if(typeof v!="string"&&l.stateNode===null)throw Error(r(166));if(d=Xa(cu.current),Xa(lo.current),sf(l)){if(v=l.stateNode,d=l.memoizedProps,v[so]=l,(E=v.nodeValue!==d)&&(a=Fn,a!==null))switch(a.tag){case 3:Jc(v.nodeValue,d,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&Jc(v.nodeValue,d,(a.mode&1)!==0)}E&&(l.flags|=4)}else v=(d.nodeType===9?d:d.ownerDocument).createTextNode(v),v[so]=l,l.stateNode=v}return Yr(l),null;case 13:if(Qt(tr),v=l.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(Zt&&Nn!==null&&(l.mode&1)!==0&&(l.flags&128)===0)gS(),zs(),l.flags|=98560,E=!1;else if(E=sf(l),v!==null&&v.dehydrated!==null){if(a===null){if(!E)throw Error(r(318));if(E=l.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(r(317));E[so]=l}else zs(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Yr(l),E=!1}else Ni!==null&&(yg(Ni),Ni=null),E=!0;if(!E)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=d,l):(v=v!==null,v!==(a!==null&&a.memoizedState!==null)&&v&&(l.child.flags|=8192,(l.mode&1)!==0&&(a===null||(tr.current&1)!==0?yr===0&&(yr=3):wg())),l.updateQueue!==null&&(l.flags|=4),Yr(l),null);case 4:return Us(),sg(a,l),a===null&&nu(l.stateNode.containerInfo),Yr(l),null;case 10:return Dh(l.type._context),Yr(l),null;case 17:return yn(l.type)&&tf(),Yr(l),null;case 19:if(Qt(tr),E=l.memoizedState,E===null)return Yr(l),null;if(v=(l.flags&128)!==0,I=E.rendering,I===null)if(v)gu(E,!1);else{if(yr!==0||a!==null&&(a.flags&128)!==0)for(a=l.child;a!==null;){if(I=pf(a),I!==null){for(l.flags|=128,gu(E,!1),v=I.updateQueue,v!==null&&(l.updateQueue=v,l.flags|=4),l.subtreeFlags=0,v=d,d=l.child;d!==null;)E=d,a=v,E.flags&=14680066,I=E.alternate,I===null?(E.childLanes=0,E.lanes=a,E.child=null,E.subtreeFlags=0,E.memoizedProps=null,E.memoizedState=null,E.updateQueue=null,E.dependencies=null,E.stateNode=null):(E.childLanes=I.childLanes,E.lanes=I.lanes,E.child=I.child,E.subtreeFlags=0,E.deletions=null,E.memoizedProps=I.memoizedProps,E.memoizedState=I.memoizedState,E.updateQueue=I.updateQueue,E.type=I.type,a=I.dependencies,E.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),d=d.sibling;return qt(tr,tr.current&1|2),l.child}a=a.sibling}E.tail!==null&&Nt()>Xs&&(l.flags|=128,v=!0,gu(E,!1),l.lanes=4194304)}else{if(!v)if(a=pf(I),a!==null){if(l.flags|=128,v=!0,d=a.updateQueue,d!==null&&(l.updateQueue=d,l.flags|=4),gu(E,!0),E.tail===null&&E.tailMode==="hidden"&&!I.alternate&&!Zt)return Yr(l),null}else 2*Nt()-E.renderingStartTime>Xs&&d!==1073741824&&(l.flags|=128,v=!0,gu(E,!1),l.lanes=4194304);E.isBackwards?(I.sibling=l.child,l.child=I):(d=E.last,d!==null?d.sibling=I:l.child=I,E.last=I)}return E.tail!==null?(l=E.tail,E.rendering=l,E.tail=l.sibling,E.renderingStartTime=Nt(),l.sibling=null,d=tr.current,qt(tr,v?d&1|2:d&1),l):(Yr(l),null);case 22:case 23:return Sg(),v=l.memoizedState!==null,a!==null&&a.memoizedState!==null!==v&&(l.flags|=8192),v&&(l.mode&1)!==0?(jn&1073741824)!==0&&(Yr(l),l.subtreeFlags&6&&(l.flags|=8192)):Yr(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function f5(a,l){switch(Th(l),l.tag){case 1:return yn(l.type)&&tf(),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return Us(),Qt(mn),Qt(Xr),Vh(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 5:return zh(l),null;case 13:if(Qt(tr),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));zs()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return Qt(tr),null;case 4:return Us(),null;case 10:return Dh(l.type._context),null;case 22:case 23:return Sg(),null;case 24:return null;default:return null}}var xf=!1,Qr=!1,d5=typeof WeakSet=="function"?WeakSet:Set,Be=null;function Gs(a,l){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(v){ir(a,l,v)}else d.current=null}function lg(a,l,d){try{d()}catch(v){ir(a,l,v)}}var pw=!1;function p5(a,l){if(Sh=Bc,a=Wb(),dh(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var v=d.getSelection&&d.getSelection();if(v&&v.rangeCount!==0){d=v.anchorNode;var w=v.anchorOffset,E=v.focusNode;v=v.focusOffset;try{d.nodeType,E.nodeType}catch{d=null;break e}var I=0,H=-1,Q=-1,ce=0,Se=0,xe=a,be=null;t:for(;;){for(var Fe;xe!==d||w!==0&&xe.nodeType!==3||(H=I+w),xe!==E||v!==0&&xe.nodeType!==3||(Q=I+v),xe.nodeType===3&&(I+=xe.nodeValue.length),(Fe=xe.firstChild)!==null;)be=xe,xe=Fe;for(;;){if(xe===a)break t;if(be===d&&++ce===w&&(H=I),be===E&&++Se===v&&(Q=I),(Fe=xe.nextSibling)!==null)break;xe=be,be=xe.parentNode}xe=Fe}d=H===-1||Q===-1?null:{start:H,end:Q}}else d=null}d=d||{start:0,end:0}}else d=null;for(wh={focusedElem:a,selectionRange:d},Bc=!1,Be=l;Be!==null;)if(l=Be,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,Be=a;else for(;Be!==null;){l=Be;try{var He=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(He!==null){var We=He.memoizedProps,sr=He.memoizedState,ae=l.stateNode,ee=ae.getSnapshotBeforeUpdate(l.elementType===l.type?We:ji(l.type,We),sr);ae.__reactInternalSnapshotBeforeUpdate=ee}break;case 3:var le=l.stateNode.containerInfo;le.nodeType===1?le.textContent="":le.nodeType===9&&le.documentElement&&le.removeChild(le.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Re){ir(l,l.return,Re)}if(a=l.sibling,a!==null){a.return=l.return,Be=a;break}Be=l.return}return He=pw,pw=!1,He}function vu(a,l,d){var v=l.updateQueue;if(v=v!==null?v.lastEffect:null,v!==null){var w=v=v.next;do{if((w.tag&a)===a){var E=w.destroy;w.destroy=void 0,E!==void 0&&lg(l,d,E)}w=w.next}while(w!==v)}}function Ef(a,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&a)===a){var v=d.create;d.destroy=v()}d=d.next}while(d!==l)}}function ug(a){var l=a.ref;if(l!==null){var d=a.stateNode;a.tag,a=d,typeof l=="function"?l(a):l.current=a}}function hw(a){var l=a.alternate;l!==null&&(a.alternate=null,hw(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&(delete l[so],delete l[ou],delete l[_h],delete l[Kk],delete l[Yk])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function gw(a){return a.tag===5||a.tag===3||a.tag===4}function vw(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||gw(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function cg(a,l,d){var v=a.tag;if(v===5||v===6)a=a.stateNode,l?d.nodeType===8?d.parentNode.insertBefore(a,l):d.insertBefore(a,l):(d.nodeType===8?(l=d.parentNode,l.insertBefore(a,d)):(l=d,l.appendChild(a)),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Zc));else if(v!==4&&(a=a.child,a!==null))for(cg(a,l,d),a=a.sibling;a!==null;)cg(a,l,d),a=a.sibling}function fg(a,l,d){var v=a.tag;if(v===5||v===6)a=a.stateNode,l?d.insertBefore(a,l):d.appendChild(a);else if(v!==4&&(a=a.child,a!==null))for(fg(a,l,d),a=a.sibling;a!==null;)fg(a,l,d),a=a.sibling}var Pr=null,zi=!1;function ma(a,l,d){for(d=d.child;d!==null;)mw(a,l,d),d=d.sibling}function mw(a,l,d){if(gr&&typeof gr.onCommitFiberUnmount=="function")try{gr.onCommitFiberUnmount(rn,d)}catch{}switch(d.tag){case 5:Qr||Gs(d,l);case 6:var v=Pr,w=zi;Pr=null,ma(a,l,d),Pr=v,zi=w,Pr!==null&&(zi?(a=Pr,d=d.stateNode,a.nodeType===8?a.parentNode.removeChild(d):a.removeChild(d)):Pr.removeChild(d.stateNode));break;case 18:Pr!==null&&(zi?(a=Pr,d=d.stateNode,a.nodeType===8?Ch(a.parentNode,d):a.nodeType===1&&Ch(a,d),la(a)):Ch(Pr,d.stateNode));break;case 4:v=Pr,w=zi,Pr=d.stateNode.containerInfo,zi=!0,ma(a,l,d),Pr=v,zi=w;break;case 0:case 11:case 14:case 15:if(!Qr&&(v=d.updateQueue,v!==null&&(v=v.lastEffect,v!==null))){w=v=v.next;do{var E=w,I=E.destroy;E=E.tag,I!==void 0&&((E&2)!==0||(E&4)!==0)&&lg(d,l,I),w=w.next}while(w!==v)}ma(a,l,d);break;case 1:if(!Qr&&(Gs(d,l),v=d.stateNode,typeof v.componentWillUnmount=="function"))try{v.props=d.memoizedProps,v.state=d.memoizedState,v.componentWillUnmount()}catch(H){ir(d,l,H)}ma(a,l,d);break;case 21:ma(a,l,d);break;case 22:d.mode&1?(Qr=(v=Qr)||d.memoizedState!==null,ma(a,l,d),Qr=v):ma(a,l,d);break;default:ma(a,l,d)}}function yw(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new d5),l.forEach(function(v){var w=x5.bind(null,a,v);d.has(v)||(d.add(v),v.then(w,w))})}}function Bi(a,l){var d=l.deletions;if(d!==null)for(var v=0;v<d.length;v++){var w=d[v];try{var E=a,I=l,H=I;e:for(;H!==null;){switch(H.tag){case 5:Pr=H.stateNode,zi=!1;break e;case 3:Pr=H.stateNode.containerInfo,zi=!0;break e;case 4:Pr=H.stateNode.containerInfo,zi=!0;break e}H=H.return}if(Pr===null)throw Error(r(160));mw(E,I,w),Pr=null,zi=!1;var Q=w.alternate;Q!==null&&(Q.return=null),w.return=null}catch(ce){ir(w,l,ce)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)bw(l,a),l=l.sibling}function bw(a,l){var d=a.alternate,v=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(Bi(l,a),co(a),v&4){try{vu(3,a,a.return),Ef(3,a)}catch(We){ir(a,a.return,We)}try{vu(5,a,a.return)}catch(We){ir(a,a.return,We)}}break;case 1:Bi(l,a),co(a),v&512&&d!==null&&Gs(d,d.return);break;case 5:if(Bi(l,a),co(a),v&512&&d!==null&&Gs(d,d.return),a.flags&32){var w=a.stateNode;try{Ft(w,"")}catch(We){ir(a,a.return,We)}}if(v&4&&(w=a.stateNode,w!=null)){var E=a.memoizedProps,I=d!==null?d.memoizedProps:E,H=a.type,Q=a.updateQueue;if(a.updateQueue=null,Q!==null)try{H==="input"&&E.type==="radio"&&E.name!=null&&Ne(w,E),De(H,I);var ce=De(H,E);for(I=0;I<Q.length;I+=2){var Se=Q[I],xe=Q[I+1];Se==="style"?V(w,xe):Se==="dangerouslySetInnerHTML"?Kt(w,xe):Se==="children"?Ft(w,xe):O(w,Se,xe,ce)}switch(H){case"input":Ie(w,E);break;case"textarea":ye(w,E);break;case"select":var be=w._wrapperState.wasMultiple;w._wrapperState.wasMultiple=!!E.multiple;var Fe=E.value;Fe!=null?Ue(w,!!E.multiple,Fe,!1):be!==!!E.multiple&&(E.defaultValue!=null?Ue(w,!!E.multiple,E.defaultValue,!0):Ue(w,!!E.multiple,E.multiple?[]:"",!1))}w[ou]=E}catch(We){ir(a,a.return,We)}}break;case 6:if(Bi(l,a),co(a),v&4){if(a.stateNode===null)throw Error(r(162));w=a.stateNode,E=a.memoizedProps;try{w.nodeValue=E}catch(We){ir(a,a.return,We)}}break;case 3:if(Bi(l,a),co(a),v&4&&d!==null&&d.memoizedState.isDehydrated)try{la(l.containerInfo)}catch(We){ir(a,a.return,We)}break;case 4:Bi(l,a),co(a);break;case 13:Bi(l,a),co(a),w=a.child,w.flags&8192&&(E=w.memoizedState!==null,w.stateNode.isHidden=E,!E||w.alternate!==null&&w.alternate.memoizedState!==null||(hg=Nt())),v&4&&yw(a);break;case 22:if(Se=d!==null&&d.memoizedState!==null,a.mode&1?(Qr=(ce=Qr)||Se,Bi(l,a),Qr=ce):Bi(l,a),co(a),v&8192){if(ce=a.memoizedState!==null,(a.stateNode.isHidden=ce)&&!Se&&(a.mode&1)!==0)for(Be=a,Se=a.child;Se!==null;){for(xe=Be=Se;Be!==null;){switch(be=Be,Fe=be.child,be.tag){case 0:case 11:case 14:case 15:vu(4,be,be.return);break;case 1:Gs(be,be.return);var He=be.stateNode;if(typeof He.componentWillUnmount=="function"){v=be,d=be.return;try{l=v,He.props=l.memoizedProps,He.state=l.memoizedState,He.componentWillUnmount()}catch(We){ir(v,d,We)}}break;case 5:Gs(be,be.return);break;case 22:if(be.memoizedState!==null){xw(xe);continue}}Fe!==null?(Fe.return=be,Be=Fe):xw(xe)}Se=Se.sibling}e:for(Se=null,xe=a;;){if(xe.tag===5){if(Se===null){Se=xe;try{w=xe.stateNode,ce?(E=w.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none"):(H=xe.stateNode,Q=xe.memoizedProps.style,I=Q!=null&&Q.hasOwnProperty("display")?Q.display:null,H.style.display=ue("display",I))}catch(We){ir(a,a.return,We)}}}else if(xe.tag===6){if(Se===null)try{xe.stateNode.nodeValue=ce?"":xe.memoizedProps}catch(We){ir(a,a.return,We)}}else if((xe.tag!==22&&xe.tag!==23||xe.memoizedState===null||xe===a)&&xe.child!==null){xe.child.return=xe,xe=xe.child;continue}if(xe===a)break e;for(;xe.sibling===null;){if(xe.return===null||xe.return===a)break e;Se===xe&&(Se=null),xe=xe.return}Se===xe&&(Se=null),xe.sibling.return=xe.return,xe=xe.sibling}}break;case 19:Bi(l,a),co(a),v&4&&yw(a);break;case 21:break;default:Bi(l,a),co(a)}}function co(a){var l=a.flags;if(l&2){try{e:{for(var d=a.return;d!==null;){if(gw(d)){var v=d;break e}d=d.return}throw Error(r(160))}switch(v.tag){case 5:var w=v.stateNode;v.flags&32&&(Ft(w,""),v.flags&=-33);var E=vw(a);fg(a,E,w);break;case 3:case 4:var I=v.stateNode.containerInfo,H=vw(a);cg(a,H,I);break;default:throw Error(r(161))}}catch(Q){ir(a,a.return,Q)}a.flags&=-3}l&4096&&(a.flags&=-4097)}function h5(a,l,d){Be=a,Sw(a)}function Sw(a,l,d){for(var v=(a.mode&1)!==0;Be!==null;){var w=Be,E=w.child;if(w.tag===22&&v){var I=w.memoizedState!==null||xf;if(!I){var H=w.alternate,Q=H!==null&&H.memoizedState!==null||Qr;H=xf;var ce=Qr;if(xf=I,(Qr=Q)&&!ce)for(Be=w;Be!==null;)I=Be,Q=I.child,I.tag===22&&I.memoizedState!==null?Ew(w):Q!==null?(Q.return=I,Be=Q):Ew(w);for(;E!==null;)Be=E,Sw(E),E=E.sibling;Be=w,xf=H,Qr=ce}ww(a)}else(w.subtreeFlags&8772)!==0&&E!==null?(E.return=w,Be=E):ww(a)}}function ww(a){for(;Be!==null;){var l=Be;if((l.flags&8772)!==0){var d=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:Qr||Ef(5,l);break;case 1:var v=l.stateNode;if(l.flags&4&&!Qr)if(d===null)v.componentDidMount();else{var w=l.elementType===l.type?d.memoizedProps:ji(l.type,d.memoizedProps);v.componentDidUpdate(w,d.memoizedState,v.__reactInternalSnapshotBeforeUpdate)}var E=l.updateQueue;E!==null&&xS(l,E,v);break;case 3:var I=l.updateQueue;if(I!==null){if(d=null,l.child!==null)switch(l.child.tag){case 5:d=l.child.stateNode;break;case 1:d=l.child.stateNode}xS(l,I,d)}break;case 5:var H=l.stateNode;if(d===null&&l.flags&4){d=H;var Q=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":Q.autoFocus&&d.focus();break;case"img":Q.src&&(d.src=Q.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var ce=l.alternate;if(ce!==null){var Se=ce.memoizedState;if(Se!==null){var xe=Se.dehydrated;xe!==null&&la(xe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Qr||l.flags&512&&ug(l)}catch(be){ir(l,l.return,be)}}if(l===a){Be=null;break}if(d=l.sibling,d!==null){d.return=l.return,Be=d;break}Be=l.return}}function xw(a){for(;Be!==null;){var l=Be;if(l===a){Be=null;break}var d=l.sibling;if(d!==null){d.return=l.return,Be=d;break}Be=l.return}}function Ew(a){for(;Be!==null;){var l=Be;try{switch(l.tag){case 0:case 11:case 15:var d=l.return;try{Ef(4,l)}catch(Q){ir(l,d,Q)}break;case 1:var v=l.stateNode;if(typeof v.componentDidMount=="function"){var w=l.return;try{v.componentDidMount()}catch(Q){ir(l,w,Q)}}var E=l.return;try{ug(l)}catch(Q){ir(l,E,Q)}break;case 5:var I=l.return;try{ug(l)}catch(Q){ir(l,I,Q)}}}catch(Q){ir(l,l.return,Q)}if(l===a){Be=null;break}var H=l.sibling;if(H!==null){H.return=l.return,Be=H;break}Be=l.return}}var g5=Math.ceil,Cf=R.ReactCurrentDispatcher,dg=R.ReactCurrentOwner,pi=R.ReactCurrentBatchConfig,Ct=0,Rr=null,pr=null,Mr=0,jn=0,qs=da(0),yr=0,mu=null,Ya=0,_f=0,pg=0,yu=null,Sn=null,hg=0,Xs=1/0,Wo=null,Rf=!1,gg=null,ya=null,Of=!1,ba=null,$f=0,bu=0,vg=null,Tf=-1,If=0;function an(){return(Ct&6)!==0?Nt():Tf!==-1?Tf:Tf=Nt()}function Sa(a){return(a.mode&1)===0?1:(Ct&2)!==0&&Mr!==0?Mr&-Mr:Jk.transition!==null?(If===0&&(If=Io()),If):(a=yt,a!==0||(a=window.event,a=a===void 0?16:_b(a.type)),a)}function Vi(a,l,d,v){if(50<bu)throw bu=0,vg=null,Error(r(185));Dn(a,d,v),((Ct&2)===0||a!==Rr)&&(a===Rr&&((Ct&2)===0&&(_f|=d),yr===4&&wa(a,Mr)),wn(a,v),d===1&&Ct===0&&(l.mode&1)===0&&(Xs=Nt()+500,nf&&ha()))}function wn(a,l){var d=a.callbackNode;To(a,l);var v=Mi(a,a===Rr?Mr:0);if(v===0)d!==null&&Vt(d),a.callbackNode=null,a.callbackPriority=0;else if(l=v&-v,a.callbackPriority!==l){if(d!=null&&Vt(d),l===1)a.tag===0?Qk(_w.bind(null,a)):cS(_w.bind(null,a)),qk(function(){(Ct&6)===0&&ha()}),d=null;else{switch(Ao(v)){case 1:d=ki;break;case 4:d=Ro;break;case 16:d=oi;break;case 536870912:d=Pn;break;default:d=oi}d=Pw(d,Cw.bind(null,a))}a.callbackPriority=l,a.callbackNode=d}}function Cw(a,l){if(Tf=-1,If=0,(Ct&6)!==0)throw Error(r(327));var d=a.callbackNode;if(Ks()&&a.callbackNode!==d)return null;var v=Mi(a,a===Rr?Mr:0);if(v===0)return null;if((v&30)!==0||(v&a.expiredLanes)!==0||l)l=Af(a,v);else{l=v;var w=Ct;Ct|=2;var E=Ow();(Rr!==a||Mr!==l)&&(Wo=null,Xs=Nt()+500,Ja(a,l));do try{y5();break}catch(H){Rw(a,H)}while(!0);Mh(),Cf.current=E,Ct=w,pr!==null?l=0:(Rr=null,Mr=0,l=yr)}if(l!==0){if(l===2&&(w=si(a),w!==0&&(v=w,l=mg(a,w))),l===1)throw d=mu,Ja(a,0),wa(a,v),wn(a,Nt()),d;if(l===6)wa(a,v);else{if(w=a.current.alternate,(v&30)===0&&!v5(w)&&(l=Af(a,v),l===2&&(E=si(a),E!==0&&(v=E,l=mg(a,E))),l===1))throw d=mu,Ja(a,0),wa(a,v),wn(a,Nt()),d;switch(a.finishedWork=w,a.finishedLanes=v,l){case 0:case 1:throw Error(r(345));case 2:Za(a,Sn,Wo);break;case 3:if(wa(a,v),(v&130023424)===v&&(l=hg+500-Nt(),10<l)){if(Mi(a,0)!==0)break;if(w=a.suspendedLanes,(w&v)!==v){an(),a.pingedLanes|=a.suspendedLanes&w;break}a.timeoutHandle=Eh(Za.bind(null,a,Sn,Wo),l);break}Za(a,Sn,Wo);break;case 4:if(wa(a,v),(v&4194240)===v)break;for(l=a.eventTimes,w=-1;0<v;){var I=31-dr(v);E=1<<I,I=l[I],I>w&&(w=I),v&=~E}if(v=w,v=Nt()-v,v=(120>v?120:480>v?480:1080>v?1080:1920>v?1920:3e3>v?3e3:4320>v?4320:1960*g5(v/1960))-v,10<v){a.timeoutHandle=Eh(Za.bind(null,a,Sn,Wo),v);break}Za(a,Sn,Wo);break;case 5:Za(a,Sn,Wo);break;default:throw Error(r(329))}}}return wn(a,Nt()),a.callbackNode===d?Cw.bind(null,a):null}function mg(a,l){var d=yu;return a.current.memoizedState.isDehydrated&&(Ja(a,l).flags|=256),a=Af(a,l),a!==2&&(l=Sn,Sn=d,l!==null&&yg(l)),a}function yg(a){Sn===null?Sn=a:Sn.push.apply(Sn,a)}function v5(a){for(var l=a;;){if(l.flags&16384){var d=l.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var v=0;v<d.length;v++){var w=d[v],E=w.getSnapshot;w=w.value;try{if(!Fi(E(),w))return!1}catch{return!1}}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function wa(a,l){for(l&=~pg,l&=~_f,a.suspendedLanes|=l,a.pingedLanes&=~l,a=a.expirationTimes;0<l;){var d=31-dr(l),v=1<<d;a[d]=-1,l&=~v}}function _w(a){if((Ct&6)!==0)throw Error(r(327));Ks();var l=Mi(a,0);if((l&1)===0)return wn(a,Nt()),null;var d=Af(a,l);if(a.tag!==0&&d===2){var v=si(a);v!==0&&(l=v,d=mg(a,v))}if(d===1)throw d=mu,Ja(a,0),wa(a,l),wn(a,Nt()),d;if(d===6)throw Error(r(345));return a.finishedWork=a.current.alternate,a.finishedLanes=l,Za(a,Sn,Wo),wn(a,Nt()),null}function bg(a,l){var d=Ct;Ct|=1;try{return a(l)}finally{Ct=d,Ct===0&&(Xs=Nt()+500,nf&&ha())}}function Qa(a){ba!==null&&ba.tag===0&&(Ct&6)===0&&Ks();var l=Ct;Ct|=1;var d=pi.transition,v=yt;try{if(pi.transition=null,yt=1,a)return a()}finally{yt=v,pi.transition=d,Ct=l,(Ct&6)===0&&ha()}}function Sg(){jn=qs.current,Qt(qs)}function Ja(a,l){a.finishedWork=null,a.finishedLanes=0;var d=a.timeoutHandle;if(d!==-1&&(a.timeoutHandle=-1,Gk(d)),pr!==null)for(d=pr.return;d!==null;){var v=d;switch(Th(v),v.tag){case 1:v=v.type.childContextTypes,v!=null&&tf();break;case 3:Us(),Qt(mn),Qt(Xr),Vh();break;case 5:zh(v);break;case 4:Us();break;case 13:Qt(tr);break;case 19:Qt(tr);break;case 10:Dh(v.type._context);break;case 22:case 23:Sg()}d=d.return}if(Rr=a,pr=a=xa(a.current,null),Mr=jn=l,yr=0,mu=null,pg=_f=Ya=0,Sn=yu=null,qa!==null){for(l=0;l<qa.length;l++)if(d=qa[l],v=d.interleaved,v!==null){d.interleaved=null;var w=v.next,E=d.pending;if(E!==null){var I=E.next;E.next=w,v.next=I}d.pending=v}qa=null}return a}function Rw(a,l){do{var d=pr;try{if(Mh(),hf.current=yf,gf){for(var v=rr.memoizedState;v!==null;){var w=v.queue;w!==null&&(w.pending=null),v=v.next}gf=!1}if(Ka=0,_r=mr=rr=null,fu=!1,du=0,dg.current=null,d===null||d.return===null){yr=1,mu=l,pr=null;break}e:{var E=a,I=d.return,H=d,Q=l;if(l=Mr,H.flags|=32768,Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var ce=Q,Se=H,xe=Se.tag;if((Se.mode&1)===0&&(xe===0||xe===11||xe===15)){var be=Se.alternate;be?(Se.updateQueue=be.updateQueue,Se.memoizedState=be.memoizedState,Se.lanes=be.lanes):(Se.updateQueue=null,Se.memoizedState=null)}var Fe=QS(I);if(Fe!==null){Fe.flags&=-257,JS(Fe,I,H,E,l),Fe.mode&1&&YS(E,ce,l),l=Fe,Q=ce;var He=l.updateQueue;if(He===null){var We=new Set;We.add(Q),l.updateQueue=We}else He.add(Q);break e}else{if((l&1)===0){YS(E,ce,l),wg();break e}Q=Error(r(426))}}else if(Zt&&H.mode&1){var sr=QS(I);if(sr!==null){(sr.flags&65536)===0&&(sr.flags|=256),JS(sr,I,H,E,l),kh(Ws(Q,H));break e}}E=Q=Ws(Q,H),yr!==4&&(yr=2),yu===null?yu=[E]:yu.push(E),E=I;do{switch(E.tag){case 3:E.flags|=65536,l&=-l,E.lanes|=l;var ae=XS(E,Q,l);wS(E,ae);break e;case 1:H=Q;var ee=E.type,le=E.stateNode;if((E.flags&128)===0&&(typeof ee.getDerivedStateFromError=="function"||le!==null&&typeof le.componentDidCatch=="function"&&(ya===null||!ya.has(le)))){E.flags|=65536,l&=-l,E.lanes|=l;var Re=KS(E,H,l);wS(E,Re);break e}}E=E.return}while(E!==null)}Tw(d)}catch(qe){l=qe,pr===d&&d!==null&&(pr=d=d.return);continue}break}while(!0)}function Ow(){var a=Cf.current;return Cf.current=yf,a===null?yf:a}function wg(){(yr===0||yr===3||yr===2)&&(yr=4),Rr===null||(Ya&268435455)===0&&(_f&268435455)===0||wa(Rr,Mr)}function Af(a,l){var d=Ct;Ct|=2;var v=Ow();(Rr!==a||Mr!==l)&&(Wo=null,Ja(a,l));do try{m5();break}catch(w){Rw(a,w)}while(!0);if(Mh(),Ct=d,Cf.current=v,pr!==null)throw Error(r(261));return Rr=null,Mr=0,yr}function m5(){for(;pr!==null;)$w(pr)}function y5(){for(;pr!==null&&!ni();)$w(pr)}function $w(a){var l=kw(a.alternate,a,jn);a.memoizedProps=a.pendingProps,l===null?Tw(a):pr=l,dg.current=null}function Tw(a){var l=a;do{var d=l.alternate;if(a=l.return,(l.flags&32768)===0){if(d=c5(d,l,jn),d!==null){pr=d;return}}else{if(d=f5(d,l),d!==null){d.flags&=32767,pr=d;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{yr=6,pr=null;return}}if(l=l.sibling,l!==null){pr=l;return}pr=l=a}while(l!==null);yr===0&&(yr=5)}function Za(a,l,d){var v=yt,w=pi.transition;try{pi.transition=null,yt=1,b5(a,l,d,v)}finally{pi.transition=w,yt=v}return null}function b5(a,l,d,v){do Ks();while(ba!==null);if((Ct&6)!==0)throw Error(r(327));d=a.finishedWork;var w=a.finishedLanes;if(d===null)return null;if(a.finishedWork=null,a.finishedLanes=0,d===a.current)throw Error(r(177));a.callbackNode=null,a.callbackPriority=0;var E=d.lanes|d.childLanes;if(sa(a,E),a===Rr&&(pr=Rr=null,Mr=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||Of||(Of=!0,Pw(oi,function(){return Ks(),null})),E=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||E){E=pi.transition,pi.transition=null;var I=yt;yt=1;var H=Ct;Ct|=4,dg.current=null,p5(a,d),bw(d,a),jk(wh),Bc=!!Sh,wh=Sh=null,a.current=d,h5(d),_o(),Ct=H,yt=I,pi.transition=E}else a.current=d;if(Of&&(Of=!1,ba=a,$f=w),E=a.pendingLanes,E===0&&(ya=null),ai(d.stateNode),wn(a,Nt()),l!==null)for(v=a.onRecoverableError,d=0;d<l.length;d++)w=l[d],v(w.value,{componentStack:w.stack,digest:w.digest});if(Rf)throw Rf=!1,a=gg,gg=null,a;return($f&1)!==0&&a.tag!==0&&Ks(),E=a.pendingLanes,(E&1)!==0?a===vg?bu++:(bu=0,vg=a):bu=0,ha(),null}function Ks(){if(ba!==null){var a=Ao($f),l=pi.transition,d=yt;try{if(pi.transition=null,yt=16>a?16:a,ba===null)var v=!1;else{if(a=ba,ba=null,$f=0,(Ct&6)!==0)throw Error(r(331));var w=Ct;for(Ct|=4,Be=a.current;Be!==null;){var E=Be,I=E.child;if((Be.flags&16)!==0){var H=E.deletions;if(H!==null){for(var Q=0;Q<H.length;Q++){var ce=H[Q];for(Be=ce;Be!==null;){var Se=Be;switch(Se.tag){case 0:case 11:case 15:vu(8,Se,E)}var xe=Se.child;if(xe!==null)xe.return=Se,Be=xe;else for(;Be!==null;){Se=Be;var be=Se.sibling,Fe=Se.return;if(hw(Se),Se===ce){Be=null;break}if(be!==null){be.return=Fe,Be=be;break}Be=Fe}}}var He=E.alternate;if(He!==null){var We=He.child;if(We!==null){He.child=null;do{var sr=We.sibling;We.sibling=null,We=sr}while(We!==null)}}Be=E}}if((E.subtreeFlags&2064)!==0&&I!==null)I.return=E,Be=I;else e:for(;Be!==null;){if(E=Be,(E.flags&2048)!==0)switch(E.tag){case 0:case 11:case 15:vu(9,E,E.return)}var ae=E.sibling;if(ae!==null){ae.return=E.return,Be=ae;break e}Be=E.return}}var ee=a.current;for(Be=ee;Be!==null;){I=Be;var le=I.child;if((I.subtreeFlags&2064)!==0&&le!==null)le.return=I,Be=le;else e:for(I=ee;Be!==null;){if(H=Be,(H.flags&2048)!==0)try{switch(H.tag){case 0:case 11:case 15:Ef(9,H)}}catch(qe){ir(H,H.return,qe)}if(H===I){Be=null;break e}var Re=H.sibling;if(Re!==null){Re.return=H.return,Be=Re;break e}Be=H.return}}if(Ct=w,ha(),gr&&typeof gr.onPostCommitFiberRoot=="function")try{gr.onPostCommitFiberRoot(rn,a)}catch{}v=!0}return v}finally{yt=d,pi.transition=l}}return!1}function Iw(a,l,d){l=Ws(d,l),l=XS(a,l,1),a=va(a,l,1),l=an(),a!==null&&(Dn(a,1,l),wn(a,l))}function ir(a,l,d){if(a.tag===3)Iw(a,a,d);else for(;l!==null;){if(l.tag===3){Iw(l,a,d);break}else if(l.tag===1){var v=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(ya===null||!ya.has(v))){a=Ws(d,a),a=KS(l,a,1),l=va(l,a,1),a=an(),l!==null&&(Dn(l,1,a),wn(l,a));break}}l=l.return}}function S5(a,l,d){var v=a.pingCache;v!==null&&v.delete(l),l=an(),a.pingedLanes|=a.suspendedLanes&d,Rr===a&&(Mr&d)===d&&(yr===4||yr===3&&(Mr&130023424)===Mr&&500>Nt()-hg?Ja(a,0):pg|=d),wn(a,l)}function Aw(a,l){l===0&&((a.mode&1)===0?l=1:(l=Wr,Wr<<=1,(Wr&130023424)===0&&(Wr=4194304)));var d=an();a=Vo(a,l),a!==null&&(Dn(a,l,d),wn(a,d))}function w5(a){var l=a.memoizedState,d=0;l!==null&&(d=l.retryLane),Aw(a,d)}function x5(a,l){var d=0;switch(a.tag){case 13:var v=a.stateNode,w=a.memoizedState;w!==null&&(d=w.retryLane);break;case 19:v=a.stateNode;break;default:throw Error(r(314))}v!==null&&v.delete(l),Aw(a,d)}var kw;kw=function(a,l,d){if(a!==null)if(a.memoizedProps!==l.pendingProps||mn.current)bn=!0;else{if((a.lanes&d)===0&&(l.flags&128)===0)return bn=!1,u5(a,l,d);bn=(a.flags&131072)!==0}else bn=!1,Zt&&(l.flags&1048576)!==0&&fS(l,af,l.index);switch(l.lanes=0,l.tag){case 2:var v=l.type;wf(a,l),a=l.pendingProps;var w=Fs(l,Xr.current);Hs(l,d),w=Wh(null,l,v,a,w,d);var E=Gh();return l.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,yn(v)?(E=!0,rf(l)):E=!1,l.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,Nh(l),w.updater=bf,l.stateNode=w,w._reactInternals=l,Jh(l,v,a,d),l=rg(null,l,v,!0,E,d)):(l.tag=0,Zt&&E&&$h(l),on(null,l,w,d),l=l.child),l;case 16:v=l.elementType;e:{switch(wf(a,l),a=l.pendingProps,w=v._init,v=w(v._payload),l.type=v,w=l.tag=C5(v),a=ji(v,a),w){case 0:l=tg(null,l,v,a,d);break e;case 1:l=iw(null,l,v,a,d);break e;case 11:l=ZS(null,l,v,a,d);break e;case 14:l=ew(null,l,v,ji(v.type,a),d);break e}throw Error(r(306,v,""))}return l;case 0:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:ji(v,w),tg(a,l,v,w,d);case 1:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:ji(v,w),iw(a,l,v,w,d);case 3:e:{if(ow(l),a===null)throw Error(r(387));v=l.pendingProps,E=l.memoizedState,w=E.element,SS(a,l),df(l,v,null,d);var I=l.memoizedState;if(v=I.element,E.isDehydrated)if(E={element:v,isDehydrated:!1,cache:I.cache,pendingSuspenseBoundaries:I.pendingSuspenseBoundaries,transitions:I.transitions},l.updateQueue.baseState=E,l.memoizedState=E,l.flags&256){w=Ws(Error(r(423)),l),l=aw(a,l,v,d,w);break e}else if(v!==w){w=Ws(Error(r(424)),l),l=aw(a,l,v,d,w);break e}else for(Nn=fa(l.stateNode.containerInfo.firstChild),Fn=l,Zt=!0,Ni=null,d=yS(l,null,v,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(zs(),v===w){l=Uo(a,l,d);break e}on(a,l,v,d)}l=l.child}return l;case 5:return ES(l),a===null&&Ah(l),v=l.type,w=l.pendingProps,E=a!==null?a.memoizedProps:null,I=w.children,xh(v,w)?I=null:E!==null&&xh(v,E)&&(l.flags|=32),nw(a,l),on(a,l,I,d),l.child;case 6:return a===null&&Ah(l),null;case 13:return sw(a,l,d);case 4:return jh(l,l.stateNode.containerInfo),v=l.pendingProps,a===null?l.child=Bs(l,null,v,d):on(a,l,v,d),l.child;case 11:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:ji(v,w),ZS(a,l,v,w,d);case 7:return on(a,l,l.pendingProps,d),l.child;case 8:return on(a,l,l.pendingProps.children,d),l.child;case 12:return on(a,l,l.pendingProps.children,d),l.child;case 10:e:{if(v=l.type._context,w=l.pendingProps,E=l.memoizedProps,I=w.value,qt(uf,v._currentValue),v._currentValue=I,E!==null)if(Fi(E.value,I)){if(E.children===w.children&&!mn.current){l=Uo(a,l,d);break e}}else for(E=l.child,E!==null&&(E.return=l);E!==null;){var H=E.dependencies;if(H!==null){I=E.child;for(var Q=H.firstContext;Q!==null;){if(Q.context===v){if(E.tag===1){Q=Ho(-1,d&-d),Q.tag=2;var ce=E.updateQueue;if(ce!==null){ce=ce.shared;var Se=ce.pending;Se===null?Q.next=Q:(Q.next=Se.next,Se.next=Q),ce.pending=Q}}E.lanes|=d,Q=E.alternate,Q!==null&&(Q.lanes|=d),Lh(E.return,d,l),H.lanes|=d;break}Q=Q.next}}else if(E.tag===10)I=E.type===l.type?null:E.child;else if(E.tag===18){if(I=E.return,I===null)throw Error(r(341));I.lanes|=d,H=I.alternate,H!==null&&(H.lanes|=d),Lh(I,d,l),I=E.sibling}else I=E.child;if(I!==null)I.return=E;else for(I=E;I!==null;){if(I===l){I=null;break}if(E=I.sibling,E!==null){E.return=I.return,I=E;break}I=I.return}E=I}on(a,l,w.children,d),l=l.child}return l;case 9:return w=l.type,v=l.pendingProps.children,Hs(l,d),w=fi(w),v=v(w),l.flags|=1,on(a,l,v,d),l.child;case 14:return v=l.type,w=ji(v,l.pendingProps),w=ji(v.type,w),ew(a,l,v,w,d);case 15:return tw(a,l,l.type,l.pendingProps,d);case 17:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:ji(v,w),wf(a,l),l.tag=1,yn(v)?(a=!0,rf(l)):a=!1,Hs(l,d),GS(l,v,w),Jh(l,v,w,d),rg(null,l,v,!0,a,d);case 19:return uw(a,l,d);case 22:return rw(a,l,d)}throw Error(r(156,l.tag))};function Pw(a,l){return Co(a,l)}function E5(a,l,d,v){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hi(a,l,d,v){return new E5(a,l,d,v)}function xg(a){return a=a.prototype,!(!a||!a.isReactComponent)}function C5(a){if(typeof a=="function")return xg(a)?1:0;if(a!=null){if(a=a.$$typeof,a===Y)return 11;if(a===F)return 14}return 2}function xa(a,l){var d=a.alternate;return d===null?(d=hi(a.tag,l,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=l,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&14680064,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,l=a.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function kf(a,l,d,v,w,E){var I=2;if(v=a,typeof a=="function")xg(a)&&(I=1);else if(typeof a=="string")I=5;else e:switch(a){case P:return es(d.children,w,E,l);case L:I=8,w|=8;break;case z:return a=hi(12,d,l,w|2),a.elementType=z,a.lanes=E,a;case N:return a=hi(13,d,l,w),a.elementType=N,a.lanes=E,a;case j:return a=hi(19,d,l,w),a.elementType=j,a.lanes=E,a;case U:return Pf(d,w,E,l);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case B:I=10;break e;case X:I=9;break e;case Y:I=11;break e;case F:I=14;break e;case q:I=16,v=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return l=hi(I,d,l,w),l.elementType=a,l.type=v,l.lanes=E,l}function es(a,l,d,v){return a=hi(7,a,v,l),a.lanes=d,a}function Pf(a,l,d,v){return a=hi(22,a,v,l),a.elementType=U,a.lanes=d,a.stateNode={isHidden:!1},a}function Eg(a,l,d){return a=hi(6,a,null,l),a.lanes=d,a}function Cg(a,l,d){return l=hi(4,a.children!==null?a.children:[],a.key,l),l.lanes=d,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}function _5(a,l,d,v,w){this.tag=l,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=no(0),this.expirationTimes=no(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=no(0),this.identifierPrefix=v,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function _g(a,l,d,v,w,E,I,H,Q){return a=new _5(a,l,d,H,Q),l===1?(l=1,E===!0&&(l|=8)):l=0,E=hi(3,null,null,l),a.current=E,E.stateNode=a,E.memoizedState={element:v,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nh(E),a}function R5(a,l,d){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:v==null?null:""+v,children:a,containerInfo:l,implementation:d}}function Mw(a){if(!a)return pa;a=a._reactInternals;e:{if(Ar(a)!==a||a.tag!==1)throw Error(r(170));var l=a;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(yn(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(r(171))}if(a.tag===1){var d=a.type;if(yn(d))return lS(a,d,l)}return l}function Dw(a,l,d,v,w,E,I,H,Q){return a=_g(d,v,!0,a,w,E,I,H,Q),a.context=Mw(null),d=a.current,v=an(),w=Sa(d),E=Ho(v,w),E.callback=l??null,va(d,E,w),a.current.lanes=w,Dn(a,w,v),wn(a,v),a}function Mf(a,l,d,v){var w=l.current,E=an(),I=Sa(w);return d=Mw(d),l.context===null?l.context=d:l.pendingContext=d,l=Ho(E,I),l.payload={element:a},v=v===void 0?null:v,v!==null&&(l.callback=v),a=va(w,l,I),a!==null&&(Vi(a,w,I,E),ff(a,w,I)),I}function Df(a){return a=a.current,a.child?(a.child.tag===5,a.child.stateNode):null}function Lw(a,l){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<l?d:l}}function Rg(a,l){Lw(a,l),(a=a.alternate)&&Lw(a,l)}function O5(){return null}var Fw=typeof reportError=="function"?reportError:function(a){console.error(a)};function Og(a){this._internalRoot=a}Lf.prototype.render=Og.prototype.render=function(a){var l=this._internalRoot;if(l===null)throw Error(r(409));Mf(a,l,null,null)},Lf.prototype.unmount=Og.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var l=a.containerInfo;Qa(function(){Mf(null,a,null,null)}),l[No]=null}};function Lf(a){this._internalRoot=a}Lf.prototype.unstable_scheduleHydration=function(a){if(a){var l=Di();a={blockedOn:null,target:a,priority:l};for(var d=0;d<qr.length&&l!==0&&l<qr[d].priority;d++);qr.splice(d,0,a),d===0&&$t(a)}};function $g(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function Ff(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function Nw(){}function $5(a,l,d,v,w){if(w){if(typeof v=="function"){var E=v;v=function(){var ce=Df(I);E.call(ce)}}var I=Dw(l,v,a,0,null,!1,!1,"",Nw);return a._reactRootContainer=I,a[No]=I.current,nu(a.nodeType===8?a.parentNode:a),Qa(),I}for(;w=a.lastChild;)a.removeChild(w);if(typeof v=="function"){var H=v;v=function(){var ce=Df(Q);H.call(ce)}}var Q=_g(a,0,!1,null,null,!1,!1,"",Nw);return a._reactRootContainer=Q,a[No]=Q.current,nu(a.nodeType===8?a.parentNode:a),Qa(function(){Mf(l,Q,d,v)}),Q}function Nf(a,l,d,v,w){var E=d._reactRootContainer;if(E){var I=E;if(typeof w=="function"){var H=w;w=function(){var Q=Df(I);H.call(Q)}}Mf(l,I,a,w)}else I=$5(d,l,a,w,v);return Df(I)}ko=function(a){switch(a.tag){case 3:var l=a.stateNode;if(l.current.memoizedState.isDehydrated){var d=vn(l.pendingLanes);d!==0&&(io(l,d|1),wn(l,Nt()),(Ct&6)===0&&(Xs=Nt()+500,ha()))}break;case 13:Qa(function(){var v=Vo(a,1);if(v!==null){var w=an();Vi(v,a,1,w)}}),Rg(a,1)}},oo=function(a){if(a.tag===13){var l=Vo(a,134217728);if(l!==null){var d=an();Vi(l,a,134217728,d)}Rg(a,134217728)}},Gr=function(a){if(a.tag===13){var l=Sa(a),d=Vo(a,l);if(d!==null){var v=an();Vi(d,a,l,v)}Rg(a,l)}},Di=function(){return yt},Po=function(a,l){var d=yt;try{return yt=a,l()}finally{yt=d}},me=function(a,l,d){switch(l){case"input":if(Ie(a,d),l=d.name,d.type==="radio"&&l!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<d.length;l++){var v=d[l];if(v!==a&&v.form===a.form){var w=ef(v);if(!w)throw Error(r(90));Oe(v),Ie(v,w)}}}break;case"textarea":ye(a,d);break;case"select":l=d.value,l!=null&&Ue(a,!!d.multiple,l,!1)}},ot=bg,zr=Qa;var T5={usingClientEntryPoint:!1,Events:[au,Ds,ef,it,Je,bg]},Su={findFiberByHostInstance:Ha,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},I5={bundleType:Su.bundleType,version:Su.version,rendererPackageName:Su.rendererPackageName,rendererConfig:Su.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=kn(a),a===null?null:a.stateNode},findFiberByHostInstance:Su.findFiberByHostInstance||O5,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var jf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!jf.isDisabled&&jf.supportsFiber)try{rn=jf.inject(I5),gr=jf}catch{}}return xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T5,xn.createPortal=function(a,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$g(l))throw Error(r(200));return R5(a,l,null,d)},xn.createRoot=function(a,l){if(!$g(a))throw Error(r(299));var d=!1,v="",w=Fw;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),l=_g(a,1,!1,null,null,d,!1,v,w),a[No]=l.current,nu(a.nodeType===8?a.parentNode:a),new Og(l)},xn.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var l=a._reactInternals;if(l===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=kn(l),a=a===null?null:a.stateNode,a},xn.flushSync=function(a){return Qa(a)},xn.hydrate=function(a,l,d){if(!Ff(l))throw Error(r(200));return Nf(null,a,l,!0,d)},xn.hydrateRoot=function(a,l,d){if(!$g(a))throw Error(r(405));var v=d!=null&&d.hydratedSources||null,w=!1,E="",I=Fw;if(d!=null&&(d.unstable_strictMode===!0&&(w=!0),d.identifierPrefix!==void 0&&(E=d.identifierPrefix),d.onRecoverableError!==void 0&&(I=d.onRecoverableError)),l=Dw(l,null,a,1,d??null,w,!1,E,I),a[No]=l.current,nu(a),v)for(a=0;a<v.length;a++)d=v[a],w=d._getVersion,w=w(d._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[d,w]:l.mutableSourceEagerHydrationData.push(d,w);return new Lf(l)},xn.render=function(a,l,d){if(!Ff(l))throw Error(r(200));return Nf(null,a,l,!1,d)},xn.unmountComponentAtNode=function(a){if(!Ff(a))throw Error(r(40));return a._reactRootContainer?(Qa(function(){Nf(null,null,a,!1,function(){a._reactRootContainer=null,a[No]=null})}),!0):!1},xn.unstable_batchedUpdates=bg,xn.unstable_renderSubtreeIntoContainer=function(a,l,d,v){if(!Ff(d))throw Error(r(200));if(a==null||a._reactInternals===void 0)throw Error(r(38));return Nf(a,l,d,!1,v)},xn.version="18.3.1-next-f1338f8080-20240426",xn}var Sx;function B$(){if(Sx)return Vg.exports;Sx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Vg.exports=gD(),Vg.exports}var wx;function vD(){if(wx)return Zf;wx=1;var e=B$();return Zf.createRoot=e.createRoot,Zf.hydrateRoot=e.hydrateRoot,Zf}var V$=vD();function mD(e,t){return a1(t),V$.hydrateRoot(t,e)}function yD(e,t){a1(t);var r=V$.createRoot(t);return r.render(e),r}function bD(e){return e.unmount(),!0}var T0=e=>{if(e!=null){var t=e.nodeType===1;if(t&&typeof e.getBoundingClientRect=="function")return e.getBoundingClientRect()}},zu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexOrder:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,gridRow:!0,gridRowEnd:!0,gridRowGap:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridColumnStart:!0,lineClamp:!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,scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,shadowOpacity:!0},SD=["ms","Moz","O","Webkit"],wD=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1);Object.keys(zu).forEach(e=>{SD.forEach(t=>{zu[wD(t,e)]=zu[e]})});function xD(e,t,r){var n=t==null||typeof t=="boolean"||t==="";return n?"":!r&&typeof t=="number"&&t!==0&&!(zu.hasOwnProperty(e)&&zu[e])?t+"px":(""+t).trim()}function ED(e,t){var r=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,o=xD(n,t[n],i);n==="float"&&(n="cssFloat"),i?r.setProperty(n,o):r[n]=o}}var xx=e=>{var t=e.offsetHeight,r=e.offsetWidth,n=e.offsetLeft,i=e.offsetTop;for(e=e.offsetParent;e&&e.nodeType===1;)n+=e.offsetLeft+e.clientLeft-e.scrollLeft,i+=e.offsetTop+e.clientTop-e.scrollTop,e=e.offsetParent;return i-=window.scrollY,n-=window.scrollX,{width:r,height:t,top:i,left:n}},Ex=(e,t,r)=>{var n=t||e&&e.parentNode;e&&n&&setTimeout(()=>{if(e.isConnected&&n.isConnected){var i=xx(n),o=xx(e),s=o.height,u=o.left,c=o.top,f=o.width,p=u-i.left,g=c-i.top;r(p,g,f,s,u,c)}},0)},CD={A:!0,BODY:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0},Dd={blur(e){try{e.blur()}catch{}},focus(e){try{var t=e.nodeName;e.getAttribute("tabIndex")==null&&e.isContentEditable!==!0&&CD[t]==null&&e.setAttribute("tabIndex","-1"),e.focus()}catch{}},measure(e,t){Ex(e,null,t)},measureInWindow(e,t){e&&setTimeout(()=>{var r=T0(e),n=r.height,i=r.left,o=r.top,s=r.width;t(i,o,s,n)},0)},measureLayout(e,t,r,n){Ex(e,t,n)},updateView(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=t[r];switch(r){case"style":{ED(e,n);break}case"class":case"className":{e.setAttribute("class",n);break}case"text":case"value":e.value=n;break;default:e.setAttribute(r,n)}}},configureNextLayoutAnimation(e,t){t()},setLayoutAnimationEnabledExperimental(){}};function fr(){return fr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fr.apply(null,arguments)}var _D={children:!0,dataSet:!0,dir:!0,id:!0,ref:!0,suppressHydrationWarning:!0,tabIndex:!0,testID:!0,focusable:!0,nativeID:!0},RD={"aria-activedescendant":!0,"aria-atomic":!0,"aria-autocomplete":!0,"aria-busy":!0,"aria-checked":!0,"aria-colcount":!0,"aria-colindex":!0,"aria-colspan":!0,"aria-controls":!0,"aria-current":!0,"aria-describedby":!0,"aria-details":!0,"aria-disabled":!0,"aria-errormessage":!0,"aria-expanded":!0,"aria-flowto":!0,"aria-haspopup":!0,"aria-hidden":!0,"aria-invalid":!0,"aria-keyshortcuts":!0,"aria-label":!0,"aria-labelledby":!0,"aria-level":!0,"aria-live":!0,"aria-modal":!0,"aria-multiline":!0,"aria-multiselectable":!0,"aria-orientation":!0,"aria-owns":!0,"aria-placeholder":!0,"aria-posinset":!0,"aria-pressed":!0,"aria-readonly":!0,"aria-required":!0,role:!0,"aria-roledescription":!0,"aria-rowcount":!0,"aria-rowindex":!0,"aria-rowspan":!0,"aria-selected":!0,"aria-setsize":!0,"aria-sort":!0,"aria-valuemax":!0,"aria-valuemin":!0,"aria-valuenow":!0,"aria-valuetext":!0,accessibilityActiveDescendant:!0,accessibilityAtomic:!0,accessibilityAutoComplete:!0,accessibilityBusy:!0,accessibilityChecked:!0,accessibilityColumnCount:!0,accessibilityColumnIndex:!0,accessibilityColumnSpan:!0,accessibilityControls:!0,accessibilityCurrent:!0,accessibilityDescribedBy:!0,accessibilityDetails:!0,accessibilityDisabled:!0,accessibilityErrorMessage:!0,accessibilityExpanded:!0,accessibilityFlowTo:!0,accessibilityHasPopup:!0,accessibilityHidden:!0,accessibilityInvalid:!0,accessibilityKeyShortcuts:!0,accessibilityLabel:!0,accessibilityLabelledBy:!0,accessibilityLevel:!0,accessibilityLiveRegion:!0,accessibilityModal:!0,accessibilityMultiline:!0,accessibilityMultiSelectable:!0,accessibilityOrientation:!0,accessibilityOwns:!0,accessibilityPlaceholder:!0,accessibilityPosInSet:!0,accessibilityPressed:!0,accessibilityReadOnly:!0,accessibilityRequired:!0,accessibilityRole:!0,accessibilityRoleDescription:!0,accessibilityRowCount:!0,accessibilityRowIndex:!0,accessibilityRowSpan:!0,accessibilitySelected:!0,accessibilitySetSize:!0,accessibilitySort:!0,accessibilityValueMax:!0,accessibilityValueMin:!0,accessibilityValueNow:!0,accessibilityValueText:!0},OD={onClick:!0,onAuxClick:!0,onContextMenu:!0,onGotPointerCapture:!0,onLostPointerCapture:!0,onPointerCancel:!0,onPointerDown:!0,onPointerEnter:!0,onPointerMove:!0,onPointerLeave:!0,onPointerOut:!0,onPointerOver:!0,onPointerUp:!0},$D={onBlur:!0,onFocus:!0},TD={onKeyDown:!0,onKeyDownCapture:!0,onKeyUp:!0,onKeyUpCapture:!0},ID={onMouseDown:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseOver:!0,onMouseOut:!0,onMouseUp:!0},AD={onTouchCancel:!0,onTouchCancelCapture:!0,onTouchEnd:!0,onTouchEndCapture:!0,onTouchMove:!0,onTouchMoveCapture:!0,onTouchStart:!0,onTouchStartCapture:!0},kD={style:!0};function PD(e,t){var r={};for(var n in e)e.hasOwnProperty(n)&&t[n]===!0&&(r[n]=e[n]);return r}var Cx=ws?x.useLayoutEffect:x.useEffect,I0="__reactLayoutHandler",Wg=null;function MD(){return ws&&typeof window.ResizeObserver<"u"&&Wg==null&&(Wg=new window.ResizeObserver(function(e){e.forEach(t=>{var r=t.target,n=r[I0];typeof n=="function"&&Dd.measure(r,(i,o,s,u,c,f)=>{var p={nativeEvent:{layout:{x:i,y:o,width:s,height:u,left:c,top:f}},timeStamp:Date.now()};Object.defineProperty(p.nativeEvent,"target",{enumerable:!0,get:()=>t.target}),n(p)})})})),Wg}function DD(e,t){var r=MD();Cx(()=>{var n=e.current;n!=null&&(n[I0]=t)},[e,t]),Cx(()=>{var n=e.current;return n!=null&&r!=null&&(typeof n[I0]=="function"?r.observe(n):r.unobserve(n)),()=>{n!=null&&r!=null&&r.unobserve(n)}},[e,r])}function LD(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(i){t.forEach(o=>{if(o!=null){if(typeof o=="function"){o(i);return}if(typeof o=="object"){o.current=i;return}console.error("mergeRefs cannot handle Refs of type boolean, number or string, received ref "+String(o))}})}}function FD(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return x.useMemo(()=>LD(...t),[...t])}var _x=typeof Symbol=="function"&&typeof Symbol()=="symbol"?Symbol():Object.freeze({});function ND(e){var t=x.useRef(_x);return t.current===_x&&(t.current=e()),t.current}function jD(e){e.pointerEvents,e.style;var t=ND(()=>r=>{r!=null&&(r.measure=n=>Dd.measure(r,n),r.measureLayout=(n,i,o)=>Dd.measureLayout(r,n,o,i),r.measureInWindow=n=>Dd.measureInWindow(r,n))});return t}var Rx=()=>{},zD={},BD=[];function Ox(e){return e>20?e%20:e}function H$(e,t){var r,n=!1,i,o,s=e.changedTouches,u=e.type,c=e.metaKey===!0,f=e.shiftKey===!0,p=s&&s[0].force||0,g=Ox(s&&s[0].identifier||0),h=s&&s[0].clientX||e.clientX,m=s&&s[0].clientY||e.clientY,y=s&&s[0].pageX||e.pageX,b=s&&s[0].pageY||e.pageY,S=typeof e.preventDefault=="function"?e.preventDefault.bind(e):Rx,_=e.timeStamp;function C(P){return Array.prototype.slice.call(P).map(L=>({force:L.force,identifier:Ox(L.identifier),get locationX(){return $(L.clientX)},get locationY(){return T(L.clientY)},pageX:L.pageX,pageY:L.pageY,target:L.target,timestamp:_}))}if(s!=null)i=C(s),o=C(e.touches);else{var O=[{force:p,identifier:g,get locationX(){return $(h)},get locationY(){return T(m)},pageX:y,pageY:b,target:e.target,timestamp:_}];i=O,o=u==="mouseup"||u==="dragstart"?BD:O}var R={bubbles:!0,cancelable:!0,currentTarget:null,defaultPrevented:e.defaultPrevented,dispatchConfig:zD,eventPhase:e.eventPhase,isDefaultPrevented(){return e.defaultPrevented},isPropagationStopped(){return n},isTrusted:e.isTrusted,nativeEvent:{altKey:!1,ctrlKey:!1,metaKey:c,shiftKey:f,changedTouches:i,force:p,identifier:g,get locationX(){return $(h)},get locationY(){return T(m)},pageX:y,pageY:b,target:e.target,timestamp:_,touches:o,type:u},persist:Rx,preventDefault:S,stopPropagation(){n=!0},target:e.target,timeStamp:_,touchHistory:t.touchHistory};function $(P){if(r=r||T0(R.currentTarget),r)return P-r.left}function T(P){if(r=r||T0(R.currentTarget),r)return P-r.top}return R}var VD="mousedown",HD="mousemove",UD="mouseup",WD="dragstart",GD="touchstart",qD="touchmove",XD="touchend",KD="touchcancel",YD="scroll",QD="select",JD="selectionchange";function U$(e){return e===GD||e===VD}function W$(e){return e===qD||e===HD}function G$(e){return e===XD||e===UD||q$(e)}function q$(e){return e===KD||e===WD}function ZD(e){return e===YD}function eL(e){return e===QD||e===JD}function tL(){var e=window.getSelection(),t=e.toString(),r=e.anchorNode,n=e.focusNode,i=r&&r.nodeType===window.Node.TEXT_NODE||n&&n.nodeType===window.Node.TEXT_NODE;return t.length>=1&&t!==`
12
12
  `&&i}var X$="__reactResponderId";function rL(e){if(e.type==="selectionchange"){var t=window.getSelection().anchorNode;return $x(t)}else{var r=e.composedPath!=null?e.composedPath():$x(e.target);return r}}function $x(e){for(var t=[];e!=null&&e!==document.body;)t.push(e),e=e.parentNode;return t}function nL(e){return e!=null?e[X$]:null}function iL(e,t){e!=null&&(e[X$]=t)}function oL(e){for(var t=[],r=[],n=rL(e),i=0;i<n.length;i++){var o=n[i],s=nL(o);s!=null&&(t.push(s),r.push(o))}return{idPath:t,nodePath:r}}function aL(e,t){var r=e.length,n=t.length;if(r===0||n===0||e[r-1]!==t[n-1])return null;var i=e[0],o=0,s=t[0],u=0;r-n>0&&(o=r-n,i=e[o],r=n),n-r>0&&(u=n-r,s=t[u],n=r);for(var c=r;c--;){if(i===s)return i;i=e[o++],s=t[u++]}return null}function sL(e,t){if(!t||t.length===0)return!1;for(var r=0;r<t.length;r++){var n=t[r].target;if(n!=null&&e.contains(n))return!0}return!1}function lL(e){return e.type==="selectionchange"?tL():e.type==="select"}function uL(e){var t=e.altKey,r=e.button,n=e.buttons,i=e.ctrlKey,o=e.type,s=o==="touchstart"||o==="touchmove",u=o==="mousedown"&&(r===0||n===1),c=o==="mousemove"&&n===1,f=t===!1&&i===!1;return!!(s||u&&f||c&&f)}var Tx=20;function wi(e){return e.timeStamp||e.timestamp}function cL(e){return{touchActive:!0,startPageX:e.pageX,startPageY:e.pageY,startTimeStamp:wi(e),currentPageX:e.pageX,currentPageY:e.pageY,currentTimeStamp:wi(e),previousPageX:e.pageX,previousPageY:e.pageY,previousTimeStamp:wi(e)}}function fL(e,t){e.touchActive=!0,e.startPageX=t.pageX,e.startPageY=t.pageY,e.startTimeStamp=wi(t),e.currentPageX=t.pageX,e.currentPageY=t.pageY,e.currentTimeStamp=wi(t),e.previousPageX=t.pageX,e.previousPageY=t.pageY,e.previousTimeStamp=wi(t)}function l1(e){var t=e.identifier;return t==null&&console.error("Touch object is missing identifier."),t}function dL(e,t){var r=l1(e),n=t.touchBank[r];n?fL(n,e):t.touchBank[r]=cL(e),t.mostRecentTimeStamp=wi(e)}function pL(e,t){var r=t.touchBank[l1(e)];r?(r.touchActive=!0,r.previousPageX=r.currentPageX,r.previousPageY=r.currentPageY,r.previousTimeStamp=r.currentTimeStamp,r.currentPageX=e.pageX,r.currentPageY=e.pageY,r.currentTimeStamp=wi(e),t.mostRecentTimeStamp=wi(e)):console.warn(`Cannot record touch move without a touch start.
13
13
  `,"Touch Move: "+K$(e)+`
14
14
  `,"Touch Bank: "+Y$(t))}function hL(e,t){var r=t.touchBank[l1(e)];r?(r.touchActive=!1,r.previousPageX=r.currentPageX,r.previousPageY=r.currentPageY,r.previousTimeStamp=r.currentTimeStamp,r.currentPageX=e.pageX,r.currentPageY=e.pageY,r.currentTimeStamp=wi(e),t.mostRecentTimeStamp=wi(e)):console.warn(`Cannot record touch end without a touch start.
@@ -450,7 +450,7 @@ Error generating stack: `+E.message+`
450
450
  height: 100%;
451
451
  min-height: 0;
452
452
  min-width: 0;
453
- `,CE=({direction:e,first:t,second:r,defaultFirstSize:n="50%",minFirstSize:i="20%",minSecondSize:o="20%"})=>k.jsx(rN,{children:k.jsxs(_T,{orientation:e==="horizontal"?"vertical":"horizontal",style:{flex:1},children:[k.jsx(V0,{defaultSize:n,minSize:i,children:k.jsx(EE,{children:t})}),k.jsx(tN,{$direction:e}),k.jsx(V0,{minSize:o,children:k.jsx(EE,{children:r})})]})}),Cu={CONNECTED_DEVICES_UPDATE:"connectedDevicesUpdate",DEVICE_SESSION_STATE_UPDATE:"deviceSessionStateUpdate",PROVIDER_VALUE:"providerValue",APDU_RESPONSE:"apduResponse",DISCOVERED_DEVICES_UPDATE:"discoveredDevicesUpdate"},Jo={DISCONNECT:"disconnect",SEND_APDU:"sendApdu",GET_PROVIDER:"getProvider",SET_PROVIDER:"setProvider",START_LISTENING_DEVICES:"startListeningDevices",STOP_LISTENING_DEVICES:"stopListeningDevices",START_DISCOVERING:"startDiscovering",STOP_DISCOVERING:"stopDiscovering",CONNECT_DEVICE:"connectDevice"},_E={LOGGER:"logger",DMK_INSPECTOR:"dmk-inspector"},nN="moduleConnected";var RE;(function(e){(function(t){var r=typeof globalThis=="object"?globalThis:typeof self=="object"||typeof self=="object"?self:typeof this=="object"?this:u(),n=i(e);typeof r.Reflect<"u"&&(n=i(r.Reflect,n)),t(n,r),typeof r.Reflect>"u"&&(r.Reflect=e);function i(c,f){return function(p,g){Object.defineProperty(c,p,{configurable:!0,writable:!0,value:g}),f&&f(p,g)}}function o(){try{return Function("return this;")()}catch{}}function s(){try{return(0,eval)("(function() { return this; })()")}catch{}}function u(){return o()||s()}})(function(t,r){var n=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",o=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",s=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",u=typeof Object.create=="function",c={__proto__:[]}instanceof Array,f=!u&&!c,p={create:u?function(){return Ft(Object.create(null))}:c?function(){return Ft({__proto__:null})}:function(){return Ft({})},has:f?function(re,ie){return n.call(re,ie)}:function(re,ie){return ie in re},get:f?function(re,ie){return n.call(re,ie)?re[ie]:void 0}:function(re,ie){return re[ie]}},g=Object.getPrototypeOf(Function),h=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Lt(),m=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:ht(),y=typeof WeakMap=="function"?WeakMap:Kt(),b=i?Symbol.for("@reflect-metadata:registry"):void 0,S=Ve(),_=ye(S);function C(re,ie,ue,V){if(A(ue)){if(!Me(re))throw new TypeError;if(!je(ie))throw new TypeError;return Y(re,ie)}else{if(!Me(re))throw new TypeError;if(!ne(ie))throw new TypeError;if(!ne(V)&&!A(V)&&!J(V))throw new TypeError;return J(V)&&(V=void 0),ue=we(ue),N(re,ie,ue,V)}}t("decorate",C);function O(re,ie){function ue(V,pe){if(!ne(V))throw new TypeError;if(!A(pe)&&!Ae(pe))throw new TypeError;M(re,ie,V,pe)}return ue}t("metadata",O);function R(re,ie,ue,V){if(!ne(ue))throw new TypeError;return A(V)||(V=we(V)),M(re,ie,ue,V)}t("defineMetadata",R);function $(re,ie,ue){if(!ne(ie))throw new TypeError;return A(ue)||(ue=we(ue)),j(re,ie,ue)}t("hasMetadata",$);function T(re,ie,ue){if(!ne(ie))throw new TypeError;return A(ue)||(ue=we(ue)),F(re,ie,ue)}t("hasOwnMetadata",T);function P(re,ie,ue){if(!ne(ie))throw new TypeError;return A(ue)||(ue=we(ue)),q(re,ie,ue)}t("getMetadata",P);function L(re,ie,ue){if(!ne(ie))throw new TypeError;return A(ue)||(ue=we(ue)),U(re,ie,ue)}t("getOwnMetadata",L);function z(re,ie){if(!ne(re))throw new TypeError;return A(ie)||(ie=we(ie)),G(re,ie)}t("getMetadataKeys",z);function B(re,ie){if(!ne(re))throw new TypeError;return A(ie)||(ie=we(ie)),K(re,ie)}t("getOwnMetadataKeys",B);function X(re,ie,ue){if(!ne(ie))throw new TypeError;if(A(ue)||(ue=we(ue)),!ne(ie))throw new TypeError;A(ue)||(ue=we(ue));var V=ct(ie,ue,!1);return A(V)?!1:V.OrdinaryDeleteMetadata(re,ie,ue)}t("deleteMetadata",X);function Y(re,ie){for(var ue=re.length-1;ue>=0;--ue){var V=re[ue],pe=V(ie);if(!A(pe)&&!J(pe)){if(!je(pe))throw new TypeError;ie=pe}}return ie}function N(re,ie,ue,V){for(var pe=re.length-1;pe>=0;--pe){var _e=re[pe],De=_e(ie,ue,V);if(!A(De)&&!J(De)){if(!ne(De))throw new TypeError;V=De}}return V}function j(re,ie,ue){var V=F(re,ie,ue);if(V)return!0;var pe=Ue(ie);return J(pe)?!1:j(re,pe,ue)}function F(re,ie,ue){var V=ct(ie,ue,!1);return A(V)?!1:se(V.OrdinaryHasOwnMetadata(re,ie,ue))}function q(re,ie,ue){var V=F(re,ie,ue);if(V)return U(re,ie,ue);var pe=Ue(ie);if(!J(pe))return q(re,pe,ue)}function U(re,ie,ue){var V=ct(ie,ue,!1);if(!A(V))return V.OrdinaryGetOwnMetadata(re,ie,ue)}function M(re,ie,ue,V){var pe=ct(ue,V,!0);pe.OrdinaryDefineOwnMetadata(re,ie,ue,V)}function G(re,ie){var ue=K(re,ie),V=Ue(re);if(V===null)return ue;var pe=G(V,ie);if(pe.length<=0)return ue;if(ue.length<=0)return pe;for(var _e=new m,De=[],fe=0,he=ue;fe<he.length;fe++){var me=he[fe],Ce=_e.has(me);Ce||(_e.add(me),De.push(me))}for(var Te=0,Xe=pe;Te<Xe.length;Te++){var me=Xe[Te],Ce=_e.has(me);Ce||(_e.add(me),De.push(me))}return De}function K(re,ie){var ue=ct(re,ie,!1);return ue?ue.OrdinaryOwnMetadataKeys(re,ie):[]}function D(re){if(re===null)return 1;switch(typeof re){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return re===null?1:6;default:return 6}}function A(re){return re===void 0}function J(re){return re===null}function Z(re){return typeof re=="symbol"}function ne(re){return typeof re=="object"?re!==null:typeof re=="function"}function W(re,ie){switch(D(re)){case 0:return re;case 1:return re;case 2:return re;case 3:return re;case 4:return re;case 5:return re}var ue="string",V=Ne(re,o);if(V!==void 0){var pe=V.call(re,ue);if(ne(pe))throw new TypeError;return pe}return ve(re)}function ve(re,ie){var ue,V,pe;{var _e=re.toString;if(Oe(_e)){var V=_e.call(re);if(!ne(V))return V}var ue=re.valueOf;if(Oe(ue)){var V=ue.call(re);if(!ne(V))return V}}throw new TypeError}function se(re){return!!re}function Ee(re){return""+re}function we(re){var ie=W(re);return Z(ie)?ie:Ee(ie)}function Me(re){return Array.isArray?Array.isArray(re):re instanceof Object?re instanceof Array:Object.prototype.toString.call(re)==="[object Array]"}function Oe(re){return typeof re=="function"}function je(re){return typeof re=="function"}function Ae(re){switch(D(re)){case 3:return!0;case 4:return!0;default:return!1}}function $e(re,ie){return re===ie||re!==re&&ie!==ie}function Ne(re,ie){var ue=re[ie];if(ue!=null){if(!Oe(ue))throw new TypeError;return ue}}function Ie(re){var ie=Ne(re,s);if(!Oe(ie))throw new TypeError;var ue=ie.call(re);if(!ne(ue))throw new TypeError;return ue}function Ke(re){return re.value}function nt(re){var ie=re.next();return ie.done?!1:ie}function ze(re){var ie=re.return;ie&&ie.call(re)}function Ue(re){var ie=Object.getPrototypeOf(re);if(typeof re!="function"||re===g||ie!==g)return ie;var ue=re.prototype,V=ue&&Object.getPrototypeOf(ue);if(V==null||V===Object.prototype)return ie;var pe=V.constructor;return typeof pe!="function"||pe===re?ie:pe}function Qe(){var re;!A(b)&&typeof r.Reflect<"u"&&!(b in r.Reflect)&&typeof r.Reflect.defineMetadata=="function"&&(re=Ge(r.Reflect));var ie,ue,V,pe=new y,_e={registerProvider:De,getProvider:he,setProvider:Ce};return _e;function De(Te){if(!Object.isExtensible(_e))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case re===Te:break;case A(ie):ie=Te;break;case ie===Te:break;case A(ue):ue=Te;break;case ue===Te:break;default:V===void 0&&(V=new m),V.add(Te);break}}function fe(Te,Xe){if(!A(ie)){if(ie.isProviderFor(Te,Xe))return ie;if(!A(ue)){if(ue.isProviderFor(Te,Xe))return ie;if(!A(V))for(var it=Ie(V);;){var Je=nt(it);if(!Je)return;var ot=Ke(Je);if(ot.isProviderFor(Te,Xe))return ze(it),ot}}}if(!A(re)&&re.isProviderFor(Te,Xe))return re}function he(Te,Xe){var it=pe.get(Te),Je;return A(it)||(Je=it.get(Xe)),A(Je)&&(Je=fe(Te,Xe),A(Je)||(A(it)&&(it=new h,pe.set(Te,it)),it.set(Xe,Je))),Je}function me(Te){if(A(Te))throw new TypeError;return ie===Te||ue===Te||!A(V)&&V.has(Te)}function Ce(Te,Xe,it){if(!me(it))throw new Error("Metadata provider not registered.");var Je=he(Te,Xe);if(Je!==it){if(!A(Je))return!1;var ot=pe.get(Te);A(ot)&&(ot=new h,pe.set(Te,ot)),ot.set(Xe,it)}return!0}}function Ve(){var re;return!A(b)&&ne(r.Reflect)&&Object.isExtensible(r.Reflect)&&(re=r.Reflect[b]),A(re)&&(re=Qe()),!A(b)&&ne(r.Reflect)&&Object.isExtensible(r.Reflect)&&Object.defineProperty(r.Reflect,b,{enumerable:!1,configurable:!1,writable:!1,value:re}),re}function ye(re){var ie=new y,ue={isProviderFor:function(me,Ce){var Te=ie.get(me);return A(Te)?!1:Te.has(Ce)},OrdinaryDefineOwnMetadata:De,OrdinaryHasOwnMetadata:pe,OrdinaryGetOwnMetadata:_e,OrdinaryOwnMetadataKeys:fe,OrdinaryDeleteMetadata:he};return S.registerProvider(ue),ue;function V(me,Ce,Te){var Xe=ie.get(me),it=!1;if(A(Xe)){if(!Te)return;Xe=new h,ie.set(me,Xe),it=!0}var Je=Xe.get(Ce);if(A(Je)){if(!Te)return;if(Je=new h,Xe.set(Ce,Je),!re.setProvider(me,Ce,ue))throw Xe.delete(Ce),it&&ie.delete(me),new Error("Wrong provider for target.")}return Je}function pe(me,Ce,Te){var Xe=V(Ce,Te,!1);return A(Xe)?!1:se(Xe.has(me))}function _e(me,Ce,Te){var Xe=V(Ce,Te,!1);if(!A(Xe))return Xe.get(me)}function De(me,Ce,Te,Xe){var it=V(Te,Xe,!0);it.set(me,Ce)}function fe(me,Ce){var Te=[],Xe=V(me,Ce,!1);if(A(Xe))return Te;for(var it=Xe.keys(),Je=Ie(it),ot=0;;){var zr=nt(Je);if(!zr)return Te.length=ot,Te;var ft=Ke(zr);try{Te[ot]=ft}catch(pt){try{ze(Je)}finally{throw pt}}ot++}}function he(me,Ce,Te){var Xe=V(Ce,Te,!1);if(A(Xe)||!Xe.delete(me))return!1;if(Xe.size===0){var it=ie.get(Ce);A(it)||(it.delete(Te),it.size===0&&ie.delete(it))}return!0}}function Ge(re){var ie=re.defineMetadata,ue=re.hasOwnMetadata,V=re.getOwnMetadata,pe=re.getOwnMetadataKeys,_e=re.deleteMetadata,De=new y,fe={isProviderFor:function(he,me){var Ce=De.get(he);return!A(Ce)&&Ce.has(me)?!0:pe(he,me).length?(A(Ce)&&(Ce=new m,De.set(he,Ce)),Ce.add(me),!0):!1},OrdinaryDefineOwnMetadata:ie,OrdinaryHasOwnMetadata:ue,OrdinaryGetOwnMetadata:V,OrdinaryOwnMetadataKeys:pe,OrdinaryDeleteMetadata:_e};return fe}function ct(re,ie,ue){var V=S.getProvider(re,ie);if(!A(V))return V;if(ue){if(S.setProvider(re,ie,_))return _;throw new Error("Illegal state.")}}function Lt(){var re={},ie=[],ue=(function(){function fe(he,me,Ce){this._index=0,this._keys=he,this._values=me,this._selector=Ce}return fe.prototype["@@iterator"]=function(){return this},fe.prototype[s]=function(){return this},fe.prototype.next=function(){var he=this._index;if(he>=0&&he<this._keys.length){var me=this._selector(this._keys[he],this._values[he]);return he+1>=this._keys.length?(this._index=-1,this._keys=ie,this._values=ie):this._index++,{value:me,done:!1}}return{value:void 0,done:!0}},fe.prototype.throw=function(he){throw this._index>=0&&(this._index=-1,this._keys=ie,this._values=ie),he},fe.prototype.return=function(he){return this._index>=0&&(this._index=-1,this._keys=ie,this._values=ie),{value:he,done:!0}},fe})(),V=(function(){function fe(){this._keys=[],this._values=[],this._cacheKey=re,this._cacheIndex=-2}return Object.defineProperty(fe.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),fe.prototype.has=function(he){return this._find(he,!1)>=0},fe.prototype.get=function(he){var me=this._find(he,!1);return me>=0?this._values[me]:void 0},fe.prototype.set=function(he,me){var Ce=this._find(he,!0);return this._values[Ce]=me,this},fe.prototype.delete=function(he){var me=this._find(he,!1);if(me>=0){for(var Ce=this._keys.length,Te=me+1;Te<Ce;Te++)this._keys[Te-1]=this._keys[Te],this._values[Te-1]=this._values[Te];return this._keys.length--,this._values.length--,$e(he,this._cacheKey)&&(this._cacheKey=re,this._cacheIndex=-2),!0}return!1},fe.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=re,this._cacheIndex=-2},fe.prototype.keys=function(){return new ue(this._keys,this._values,pe)},fe.prototype.values=function(){return new ue(this._keys,this._values,_e)},fe.prototype.entries=function(){return new ue(this._keys,this._values,De)},fe.prototype["@@iterator"]=function(){return this.entries()},fe.prototype[s]=function(){return this.entries()},fe.prototype._find=function(he,me){if(!$e(this._cacheKey,he)){this._cacheIndex=-1;for(var Ce=0;Ce<this._keys.length;Ce++)if($e(this._keys[Ce],he)){this._cacheIndex=Ce;break}}return this._cacheIndex<0&&me&&(this._cacheIndex=this._keys.length,this._keys.push(he),this._values.push(void 0)),this._cacheIndex},fe})();return V;function pe(fe,he){return fe}function _e(fe,he){return he}function De(fe,he){return[fe,he]}}function ht(){var re=(function(){function ie(){this._map=new h}return Object.defineProperty(ie.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),ie.prototype.has=function(ue){return this._map.has(ue)},ie.prototype.add=function(ue){return this._map.set(ue,ue),this},ie.prototype.delete=function(ue){return this._map.delete(ue)},ie.prototype.clear=function(){this._map.clear()},ie.prototype.keys=function(){return this._map.keys()},ie.prototype.values=function(){return this._map.keys()},ie.prototype.entries=function(){return this._map.entries()},ie.prototype["@@iterator"]=function(){return this.keys()},ie.prototype[s]=function(){return this.keys()},ie})();return re}function Kt(){var re=16,ie=p.create(),ue=V();return(function(){function he(){this._key=V()}return he.prototype.has=function(me){var Ce=pe(me,!1);return Ce!==void 0?p.has(Ce,this._key):!1},he.prototype.get=function(me){var Ce=pe(me,!1);return Ce!==void 0?p.get(Ce,this._key):void 0},he.prototype.set=function(me,Ce){var Te=pe(me,!0);return Te[this._key]=Ce,this},he.prototype.delete=function(me){var Ce=pe(me,!1);return Ce!==void 0?delete Ce[this._key]:!1},he.prototype.clear=function(){this._key=V()},he})();function V(){var he;do he="@@WeakMap@@"+fe();while(p.has(ie,he));return ie[he]=!0,he}function pe(he,me){if(!n.call(he,ue)){if(!me)return;Object.defineProperty(he,ue,{value:p.create()})}return he[ue]}function _e(he,me){for(var Ce=0;Ce<me;++Ce)he[Ce]=Math.random()*255|0;return he}function De(he){if(typeof Uint8Array=="function"){var me=new Uint8Array(he);return typeof crypto<"u"?crypto.getRandomValues(me):typeof msCrypto<"u"?msCrypto.getRandomValues(me):_e(me,he),me}return _e(new Array(he),he)}function fe(){var he=De(re);he[6]=he[6]&79|64,he[8]=he[8]&191|128;for(var me="",Ce=0;Ce<re;++Ce){var Te=he[Ce];(Ce===4||Ce===6||Ce===8)&&(me+="-"),Te<16&&(me+="0"),me+=Te.toString(16).toLowerCase()}return me}}function Ft(re){return re.__=void 0,delete re.__,re}})})(RE||(RE={}));let iN=class{cla;ins;p1;p2;data;constructor(t,r,n,i,o){this.cla=t,this.ins=r,this.p1=n,this.p2=i,this.data=o??new Uint8Array}getRawApdu(){const t=Uint8Array.from([this.cla,this.ins,this.p1,this.p2,this.data.length]),r=new Uint8Array(t.length+this.data.length);return r.set(t,0),this.data.length>0&&r.set(this.data,t.length),r}};function OE(e){if(e.startsWith("0x")&&(e=e.slice(2)),e.length===0)return new Uint8Array;if(e.length%2!==0&&(e="0"+e),/^[0-9a-fA-F]*$/.test(e)===!1)return null;const t=e.match(/.{1,2}/g)?.map(r=>parseInt(r,16));return!t||t.some(isNaN)?null:new Uint8Array(t)}function Zo(e,t=!0){return`${t?"0x":""}${Array.from(e,r=>r.toString(16).padStart(2,"0")).join("")}`}let dv=class{_tag="ValueOverflow";originalError;message;constructor(t,r=OT){this.message=`Value overflow for ${t}, max is ${r}`}},id=class{_tag="DataOverflow";message;originalError;constructor(t,r=0){this.message=r===0?`this.data is already full (value: ${t})`:`this.data will overflow with "${t}", remaining bytes: ${r}`}},$E=class{_tag="HexaString";message;originalError;constructor(t){this.message=`Invalid encoded hexa string or length is null: ${t}`}};const oN=4294967295;let aN=class{constructor(t=oN){this.maxPayloadSize=t}data=new Uint8Array;errors=[];build=()=>this.data;tryBuild=()=>this.hasErrors()?void 0:this.data;add8BitUIntToData=t=>this.addNumberToData(t,8n,!1,!1);add16BitUIntToData=(t,r=!0)=>this.addNumberToData(t,16n,!1,r);add32BitUIntToData=(t,r=!0)=>this.addNumberToData(t,32n,!1,r);add64BitUIntToData=(t,r=!0)=>this.addNumberToData(t,64n,!1,r);add128BitUIntToData=(t,r=!0)=>this.addNumberToData(t,128n,!1,r);add256BitUIntToData=(t,r=!0)=>this.addNumberToData(t,256n,!1,r);add16BitIntToData=(t,r=!0)=>this.addNumberToData(t,16n,!0,r);add32BitIntToData=(t,r=!0)=>this.addNumberToData(t,32n,!0,r);add64BitIntToData=(t,r=!0)=>this.addNumberToData(t,64n,!0,r);add128BitIntToData=(t,r=!0)=>this.addNumberToData(t,128n,!0,r);add256BitIntToData=(t,r=!0)=>this.addNumberToData(t,256n,!0,r);addBufferToData=t=>this.hasEnoughLengthRemaining(t)?(this.data=Uint8Array.from([...this.data,...t]),this):(this.errors.push(new id(t.toString())),this);addHexaStringToData=t=>{const r=OE(t);return r===null||r.length===0?(this.errors.push(new $E(t)),this):(this.addBufferToData(r),this)};addAsciiStringToData=t=>{const r=new TextEncoder().encode(t);return this.addBufferToData(r),this};encodeInLVFromHexa=t=>{const r=OE(t);return r===null||r.length===0?(this.errors.push(new $E(t)),this):this.hasEnoughLengthRemaining(r,!0)?(this.add8BitUIntToData(r.length),this.addBufferToData(r),this):(this.errors.push(new id(t)),this)};encodeInLVFromBuffer=t=>this.hasEnoughLengthRemaining(t,!0)?(this.add8BitUIntToData(t.length),this.addBufferToData(t),this):(this.errors.push(new id(t.toString())),this);encodeInLVFromAscii=t=>this.hasEnoughLengthRemaining(t,!0)?(this.add8BitUIntToData(t.length),this.addAsciiStringToData(t),this):(this.errors.push(new id(t)),this);encodeInTLVFromAscii=(t,r)=>(this.add8BitUIntToData(t),this.encodeInLVFromAscii(r));encodeInTLVFromHexa=(t,r)=>(this.add8BitUIntToData(t),this.encodeInLVFromHexa(r));encodeInTLVFromBuffer=(t,r)=>(this.add8BitUIntToData(t),this.encodeInLVFromBuffer(r));encodeInTLVFromUInt8=(t,r)=>(this.add8BitUIntToData(t),this.add8BitUIntToData(1),this.add8BitUIntToData(r));encodeInTLVFromUInt16=(t,r,n=!0)=>(this.add8BitUIntToData(t),this.add8BitUIntToData(2),this.add16BitUIntToData(r,n));encodeInTLVFromUInt32=(t,r,n=!0)=>(this.add8BitUIntToData(t),this.add8BitUIntToData(4),this.add32BitUIntToData(r,n));encodeInTLVFromUInt64=(t,r,n=!0)=>(this.add8BitUIntToData(t),this.add8BitUIntToData(8),this.add64BitUIntToData(r,n));getAvailablePayloadLength=()=>this.maxPayloadSize-this.data.length;getErrors=()=>this.errors;hasErrors=()=>this.errors.length!==0;hasEnoughLengthRemaining=(t,r=!1)=>this.data.length+t.length+(r?1:0)<=this.maxPayloadSize;addNumberToData(t,r,n,i){let o=this.checkBoundsAndConvert(t,r,n);if(o===void 0)return this;const s=Number(r)/8,u=new Uint8Array(s);if(i)for(let c=s-1;c>=0;c--)u[c]=Number(o&0xffn),o>>=8n;else for(let c=0;c<s;c++)u[c]=Number(o&0xffn),o>>=8n;return this.addBufferToData(u)}checkBoundsAndConvert(t,r,n){if(typeof t=="number"){if(!Number.isInteger(t)||t>Number.MAX_SAFE_INTEGER){this.errors.push(new dv(t.toString()));return}t=BigInt(t)}if(n){const i=1n<<r-1n;if(t>=i||t<-i){this.errors.push(new dv(t.toString(),i-1n));return}if(t<0n){const o=(1n<<r)-1n;t=-t,t=(~t&o)+1n}}else{const i=1n<<r;if(t<0||t>=i){this.errors.push(new dv(t.toString(),i-1n));return}}return t}};const OT=255;let $T=class{_ins;_cla;_p1;p2;data=new aN(OT);constructor({ins:t,cla:r,p1:n,p2:i}){this._cla=r&255,this._ins=t&255,this._p1=n&255,this.p2=i&255}build=()=>new iN(this._cla,this._ins,this._p1,this.p2,this.data.build());add8BitUIntToData=t=>(this.data.add8BitUIntToData(t),this);add16BitUIntToData=t=>(this.data.add16BitUIntToData(t),this);add32BitUIntToData=t=>(this.data.add32BitUIntToData(t),this);add64BitUIntToData=(t,r=!0)=>(this.data.add64BitUIntToData(t,r),this);addBufferToData=t=>(this.data.addBufferToData(t),this);addHexaStringToData=t=>(this.data.addHexaStringToData(t),this);addAsciiStringToData=t=>(this.data.addAsciiStringToData(t),this);encodeInLVFromHexa=t=>(this.data.encodeInLVFromHexa(t),this);encodeInLVFromBuffer=t=>(this.data.encodeInLVFromBuffer(t),this);encodeInLVFromAscii=t=>(this.data.encodeInLVFromAscii(t),this);getAvailablePayloadLength=()=>this.data.getAvailablePayloadLength();getErrors=()=>this.data.getErrors()},sN=class{constructor(t){this.buffer=t}index=0;testMinimalLength(t){return t<=this.buffer.length-this.index}extract8BitUInt(){if(!this.outOfRange(1))return this.buffer[this.index++]}extract16BitUInt(t=!0){const r=this.extractNumber(16n,!1,t);return r===void 0?void 0:Number(r)}extract16BitInt(t=!0){const r=this.extractNumber(16n,!0,t);return r===void 0?void 0:Number(r)}extract32BitUInt(t=!0){const r=this.extractNumber(32n,!1,t);return r===void 0?void 0:Number(r)}extract32BitInt(t=!0){const r=this.extractNumber(32n,!0,t);return r===void 0?void 0:Number(r)}extract64BitUInt(t=!0){return this.extractNumber(64n,!1,t)}extract64BitInt(t=!0){return this.extractNumber(64n,!0,t)}extract128BitUInt(t=!0){return this.extractNumber(128n,!1,t)}extract128BitInt(t=!0){return this.extractNumber(128n,!0,t)}extract256BitUInt(t=!0){return this.extractNumber(256n,!1,t)}extract256BitInt(t=!0){return this.extractNumber(256n,!0,t)}extractFieldByLength(t){if(this.outOfRange(t))return;if(t===0)return new Uint8Array;const r=this.buffer.slice(this.index,this.index+t);return this.index+=t,r}extractFieldLVEncoded(){const t=this.extract8BitUInt();if(t===void 0)return;if(t===0)return new Uint8Array;const r=this.extractFieldByLength(t);return r===void 0&&this.index--,r}extractFieldTLVEncoded(){if(this.outOfRange(2))return;const t=this.index,r=this.extract8BitUInt(),n=this.extractFieldLVEncoded();if(r===void 0||n===void 0){this.index--;return}const i=this.index;return{tag:r,value:n,tlv:this.buffer.slice(t,i)}}encodeToHexaString(t,r=!1){if(t===void 0||t.length===0)return"";const n=Zo(t);return r?n:n.slice(2)}encodeToString(t){let r="",n=0;if(!t)return r;for(;n<=t.length;){const i=t[n];i&&(r+=String.fromCharCode(i)),n++}return r}getCurrentIndex(){return this.index}resetIndex(){this.index=0}getUnparsedRemainingLength(){return this.buffer.length-this.index}outOfRange(t){return this.index+t>this.buffer.length}extractNumber(t,r,n){const i=Number(t)/8;if(this.outOfRange(i))return;let o=0n;if(n)for(let s=0;s<i;s++)o=o<<8n|BigInt(this.buffer[s+this.index]);else for(let s=i-1;s>=0;s--)o=o<<8n|BigInt(this.buffer[s+this.index]);if(r){const s=1n<<t-1n;o&s&&(o-=s<<1n)}return this.index+=i,o}},y1=class{parser;constructor(t){this.parser=new sN(t.data)}testMinimalLength=t=>this.parser.testMinimalLength(t);extract8BitUInt=()=>this.parser.extract8BitUInt();extract16BitUInt=()=>this.parser.extract16BitUInt();extract32BitUInt=()=>this.parser.extract32BitUInt();extractFieldByLength=t=>this.parser.extractFieldByLength(t);extractFieldLVEncoded=()=>this.parser.extractFieldLVEncoded();extractFieldTLVEncoded=()=>this.parser.extractFieldTLVEncoded();encodeToHexaString(t,r=!1){return r?this.parser.encodeToHexaString(t,!0):this.parser.encodeToHexaString(t,!1)}encodeToString=t=>this.parser.encodeToString(t);getUnparsedRemainingLength=()=>this.parser.getUnparsedRemainingLength()},lN=class{_tag="InvalidStatusWordError";originalError;constructor(t){this.originalError=new Error(t??"Invalid status word.")}},uN=class{_tag="InvalidResponseFormatError";originalError;constructor(t){this.originalError=new Error(t??"Invalid response format.")}};var cN=(e=>(e.Error="ERROR",e.Success="SUCCESS",e))(cN||{});function fN(e){return"error"in e&&e.error!==void 0}function TE(e){return fN(e)?{status:"ERROR",error:e.error}:{status:"SUCCESS",data:e.data}}function dN(e){return e.status==="SUCCESS"}function us({data:e,error:t}){return TE(t!==void 0?{error:t}:{data:e})}function pN(e){return dN(e)}let b1=class ul{static isValidStatusCode(t){return t.length===2}static isSuccessResponse({statusCode:t}){return ul.isValidStatusCode(t)?t[0]===144&&t[1]===0:!1}static isLockedDeviceResponse({statusCode:t}){return ul.isValidStatusCode(t)?t[0]===85&&t[1]===21||t[0]===105&&t[1]===130||t[0]===83&&t[1]===3:!1}static isRefusedByUser({statusCode:t}){return ul.isValidStatusCode(t)?t[0]===85&&t[1]===1||t[0]===105&&t[1]===133:!1}static isAppAlreadyInstalled({statusCode:t}){return ul.isValidStatusCode(t)?t[0]===106&&t[1]===128||t[0]===106&&t[1]===129||t[0]===106&&t[1]===142||t[0]===106&&t[1]===143:!1}static isOutOfMemory({statusCode:t}){return ul.isValidStatusCode(t)?t[0]===106&&t[1]===132||t[0]===106&&t[1]===133||t[0]===81&&t[1]===2||t[0]===81&&t[1]===3:!1}static isApduThatTriggersDisconnection(t){const r=new Map;return r.set("openApp",new Uint8Array([224,216,0,0])),r.set("closeApp",new Uint8Array([176,167,0,0])),Array.from(r.values()).some(n=>{for(let i=0;i<4;i++)if(n[i]!==t[i])return!1;return!0})}},hN=class{_tag;originalError;errorCode;message;constructor({tag:t,errorCode:r,originalError:n,message:i}){this._tag=t,this.originalError=n,this.errorCode=r,this.message=i??"An error occured during device exchange."}},gN=class{_tag="UnknownDeviceExchangeError";originalError;message;constructor(t){this.originalError=t,this.message="Unexpected device exchange error happened."}};const vN=(e,t)=>Object.keys(t).includes(e);let mN=class extends hN{constructor(t){super({tag:"GlobalCommandError",...t})}};const IE={5515:{message:"Device is locked.",tag:"DeviceLockedError"},5501:{message:"Action refused on device.",tag:"ActionRefusedError"},5502:{message:"Pin is not set",tag:"PinNotSetError"},5223:{message:"Device internal error",tag:"DeviceInternalError"},"6e00":{message:"CLA not supported",tag:"DeviceInternalError"},"6d00":{message:"INS not supported",tag:"DeviceInternalError"}};let TT=class{static handle(t){const r=new y1(t).encodeToHexaString(t.statusCode);return vN(r,IE)?new mN({...IE[r],errorCode:r}):new gN({message:"UnknownError",errorCode:r})}},AE=class{name="getAppAndVersion";args=void 0;getApdu(){const t={cla:176,ins:1,p1:0,p2:0};return new $T(t).build()}parseResponse(t){if(!b1.isSuccessResponse(t))return us({error:TT.handle(t)});const r=new y1(t);if(r.extract8BitUInt()!==1)return us({error:new uN("getAppAndVersion: format not supported")});const n=r.encodeToString(r.extractFieldLVEncoded()),i=r.encodeToString(r.extractFieldLVEncoded());if(r.getUnparsedRemainingLength()===0)return us({data:{name:n,version:i}});const o=r.extractFieldLVEncoded();return us({data:{name:n,version:i,flags:o}})}};var yN=(e=>(e[e.BATTERY_PERCENTAGE=0]="BATTERY_PERCENTAGE",e[e.BATTERY_VOLTAGE=1]="BATTERY_VOLTAGE",e[e.BATTERY_TEMPERATURE=2]="BATTERY_TEMPERATURE",e[e.BATTERY_CURRENT=3]="BATTERY_CURRENT",e[e.BATTERY_FLAGS=4]="BATTERY_FLAGS",e))(yN||{}),bN=(e=>(e[e.NONE=0]="NONE",e[e.USB=1]="USB",e[e.QI=2]="QI",e))(bN||{}),od={exports:{}},pv,kE;function kp(){if(kE)return pv;kE=1;const e="2.0.0",t=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,i=t-6;return pv={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},pv}var hv,PE;function Pp(){if(PE)return hv;PE=1;var e={};return hv=typeof process=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{},hv}var ME;function Rc(){return ME||(ME=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=kp(),o=Pp();t=e.exports={};const s=t.re=[],u=t.safeRe=[],c=t.src=[],f=t.safeSrc=[],p=t.t={};let g=0;const h="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",i],[h,n]],y=S=>{for(const[_,C]of m)S=S.split(`${_}*`).join(`${_}{0,${C}}`).split(`${_}+`).join(`${_}{1,${C}}`);return S},b=(S,_,C)=>{const O=y(_),R=g++;o(S,R,_),p[S]=R,c[R]=_,f[R]=O,s[R]=new RegExp(_,C?"g":void 0),u[R]=new RegExp(O,C?"g":void 0)};b("NUMERICIDENTIFIER","0|[1-9]\\d*"),b("NUMERICIDENTIFIERLOOSE","\\d+"),b("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),b("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})`),b("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})`),b("PRERELEASEIDENTIFIER",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIER]})`),b("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIERLOOSE]})`),b("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`),b("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`),b("BUILDIDENTIFIER",`${h}+`),b("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`),b("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`),b("FULL",`^${c[p.FULLPLAIN]}$`),b("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`),b("LOOSE",`^${c[p.LOOSEPLAIN]}$`),b("GTLT","((?:<|>)?=?)"),b("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),b("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`),b("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?)?)?`),b("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?)?)?`),b("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`),b("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`),b("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),b("COERCE",`${c[p.COERCEPLAIN]}(?:$|[^\\d])`),b("COERCEFULL",c[p.COERCEPLAIN]+`(?:${c[p.PRERELEASE]})?(?:${c[p.BUILD]})?(?:$|[^\\d])`),b("COERCERTL",c[p.COERCE],!0),b("COERCERTLFULL",c[p.COERCEFULL],!0),b("LONETILDE","(?:~>?)"),b("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",b("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`),b("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`),b("LONECARET","(?:\\^)"),b("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",b("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`),b("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`),b("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`),b("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`),b("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",b("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})\\s+-\\s+(${c[p.XRANGEPLAIN]})\\s*$`),b("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[p.XRANGEPLAINLOOSE]})\\s*$`),b("STAR","(<|>)?=?\\s*\\*"),b("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),b("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(od,od.exports)),od.exports}var gv,DE;function S1(){if(DE)return gv;DE=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return gv=n=>n?typeof n!="object"?e:n:t,gv}var vv,LE;function IT(){if(LE)return vv;LE=1;const e=/^[0-9]+$/,t=(n,i)=>{const o=e.test(n),s=e.test(i);return o&&s&&(n=+n,i=+i),n===i?0:o&&!s?-1:s&&!o?1:n<i?-1:1};return vv={compareIdentifiers:t,rcompareIdentifiers:(n,i)=>t(i,n)},vv}var mv,FE;function dn(){if(FE)return mv;FE=1;const e=Pp(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=kp(),{safeRe:n,t:i}=Rc(),o=S1(),{compareIdentifiers:s}=IT();class u{constructor(f,p){if(p=o(p),f instanceof u){if(f.loose===!!p.loose&&f.includePrerelease===!!p.includePrerelease)return f;f=f.version}else if(typeof f!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof f}".`);if(f.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",f,p),this.options=p,this.loose=!!p.loose,this.includePrerelease=!!p.includePrerelease;const g=f.trim().match(p.loose?n[i.LOOSE]:n[i.FULL]);if(!g)throw new TypeError(`Invalid Version: ${f}`);if(this.raw=f,this.major=+g[1],this.minor=+g[2],this.patch=+g[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");g[4]?this.prerelease=g[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){const m=+h;if(m>=0&&m<r)return m}return h}):this.prerelease=[],this.build=g[5]?g[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(f){if(e("SemVer.compare",this.version,this.options,f),!(f instanceof u)){if(typeof f=="string"&&f===this.version)return 0;f=new u(f,this.options)}return f.version===this.version?0:this.compareMain(f)||this.comparePre(f)}compareMain(f){return f instanceof u||(f=new u(f,this.options)),s(this.major,f.major)||s(this.minor,f.minor)||s(this.patch,f.patch)}comparePre(f){if(f instanceof u||(f=new u(f,this.options)),this.prerelease.length&&!f.prerelease.length)return-1;if(!this.prerelease.length&&f.prerelease.length)return 1;if(!this.prerelease.length&&!f.prerelease.length)return 0;let p=0;do{const g=this.prerelease[p],h=f.prerelease[p];if(e("prerelease compare",p,g,h),g===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(g===void 0)return-1;if(g===h)continue;return s(g,h)}while(++p)}compareBuild(f){f instanceof u||(f=new u(f,this.options));let p=0;do{const g=this.build[p],h=f.build[p];if(e("build compare",p,g,h),g===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(g===void 0)return-1;if(g===h)continue;return s(g,h)}while(++p)}inc(f,p,g){if(f.startsWith("pre")){if(!p&&g===!1)throw new Error("invalid increment argument: identifier is empty");if(p){const h=`-${p}`.match(this.options.loose?n[i.PRERELEASELOOSE]:n[i.PRERELEASE]);if(!h||h[1]!==p)throw new Error(`invalid identifier: ${p}`)}}switch(f){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",p,g);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",p,g);break;case"prepatch":this.prerelease.length=0,this.inc("patch",p,g),this.inc("pre",p,g);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",p,g),this.inc("pre",p,g);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const h=Number(g)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let m=this.prerelease.length;for(;--m>=0;)typeof this.prerelease[m]=="number"&&(this.prerelease[m]++,m=-2);if(m===-1){if(p===this.prerelease.join(".")&&g===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(p){let m=[p,h];g===!1&&(m=[p]),s(this.prerelease[0],p)===0?isNaN(this.prerelease[1])&&(this.prerelease=m):this.prerelease=m}break}default:throw new Error(`invalid increment argument: ${f}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return mv=u,mv}var yv,NE;function Hl(){if(NE)return yv;NE=1;const e=dn();return yv=(r,n,i=!1)=>{if(r instanceof e)return r;try{return new e(r,n)}catch(o){if(!i)return null;throw o}},yv}var bv,jE;function SN(){if(jE)return bv;jE=1;const e=Hl();return bv=(r,n)=>{const i=e(r,n);return i?i.version:null},bv}var Sv,zE;function wN(){if(zE)return Sv;zE=1;const e=Hl();return Sv=(r,n)=>{const i=e(r.trim().replace(/^[=v]+/,""),n);return i?i.version:null},Sv}var wv,BE;function xN(){if(BE)return wv;BE=1;const e=dn();return wv=(r,n,i,o,s)=>{typeof i=="string"&&(s=o,o=i,i=void 0);try{return new e(r instanceof e?r.version:r,i).inc(n,o,s).version}catch{return null}},wv}var xv,VE;function EN(){if(VE)return xv;VE=1;const e=Hl();return xv=(r,n)=>{const i=e(r,null,!0),o=e(n,null,!0),s=i.compare(o);if(s===0)return null;const u=s>0,c=u?i:o,f=u?o:i,p=!!c.prerelease.length;if(!!f.prerelease.length&&!p){if(!f.patch&&!f.minor)return"major";if(f.compareMain(c)===0)return f.minor&&!f.patch?"minor":"patch"}const h=p?"pre":"";return i.major!==o.major?h+"major":i.minor!==o.minor?h+"minor":i.patch!==o.patch?h+"patch":"prerelease"},xv}var Ev,HE;function CN(){if(HE)return Ev;HE=1;const e=dn();return Ev=(r,n)=>new e(r,n).major,Ev}var Cv,UE;function _N(){if(UE)return Cv;UE=1;const e=dn();return Cv=(r,n)=>new e(r,n).minor,Cv}var _v,WE;function RN(){if(WE)return _v;WE=1;const e=dn();return _v=(r,n)=>new e(r,n).patch,_v}var Rv,GE;function ON(){if(GE)return Rv;GE=1;const e=Hl();return Rv=(r,n)=>{const i=e(r,n);return i&&i.prerelease.length?i.prerelease:null},Rv}var Ov,qE;function to(){if(qE)return Ov;qE=1;const e=dn();return Ov=(r,n,i)=>new e(r,i).compare(new e(n,i)),Ov}var $v,XE;function $N(){if(XE)return $v;XE=1;const e=to();return $v=(r,n,i)=>e(n,r,i),$v}var Tv,KE;function TN(){if(KE)return Tv;KE=1;const e=to();return Tv=(r,n)=>e(r,n,!0),Tv}var Iv,YE;function w1(){if(YE)return Iv;YE=1;const e=dn();return Iv=(r,n,i)=>{const o=new e(r,i),s=new e(n,i);return o.compare(s)||o.compareBuild(s)},Iv}var Av,QE;function IN(){if(QE)return Av;QE=1;const e=w1();return Av=(r,n)=>r.sort((i,o)=>e(i,o,n)),Av}var kv,JE;function AN(){if(JE)return kv;JE=1;const e=w1();return kv=(r,n)=>r.sort((i,o)=>e(o,i,n)),kv}var Pv,ZE;function Mp(){if(ZE)return Pv;ZE=1;const e=to();return Pv=(r,n,i)=>e(r,n,i)>0,Pv}var Mv,eC;function x1(){if(eC)return Mv;eC=1;const e=to();return Mv=(r,n,i)=>e(r,n,i)<0,Mv}var Dv,tC;function AT(){if(tC)return Dv;tC=1;const e=to();return Dv=(r,n,i)=>e(r,n,i)===0,Dv}var Lv,rC;function kT(){if(rC)return Lv;rC=1;const e=to();return Lv=(r,n,i)=>e(r,n,i)!==0,Lv}var Fv,nC;function E1(){if(nC)return Fv;nC=1;const e=to();return Fv=(r,n,i)=>e(r,n,i)>=0,Fv}var Nv,iC;function C1(){if(iC)return Nv;iC=1;const e=to();return Nv=(r,n,i)=>e(r,n,i)<=0,Nv}var jv,oC;function PT(){if(oC)return jv;oC=1;const e=AT(),t=kT(),r=Mp(),n=E1(),i=x1(),o=C1();return jv=(u,c,f,p)=>{switch(c){case"===":return typeof u=="object"&&(u=u.version),typeof f=="object"&&(f=f.version),u===f;case"!==":return typeof u=="object"&&(u=u.version),typeof f=="object"&&(f=f.version),u!==f;case"":case"=":case"==":return e(u,f,p);case"!=":return t(u,f,p);case">":return r(u,f,p);case">=":return n(u,f,p);case"<":return i(u,f,p);case"<=":return o(u,f,p);default:throw new TypeError(`Invalid operator: ${c}`)}},jv}var zv,aC;function kN(){if(aC)return zv;aC=1;const e=dn(),t=Hl(),{safeRe:r,t:n}=Rc();return zv=(o,s)=>{if(o instanceof e)return o;if(typeof o=="number"&&(o=String(o)),typeof o!="string")return null;s=s||{};let u=null;if(!s.rtl)u=o.match(s.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const m=s.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let y;for(;(y=m.exec(o))&&(!u||u.index+u[0].length!==o.length);)(!u||y.index+y[0].length!==u.index+u[0].length)&&(u=y),m.lastIndex=y.index+y[1].length+y[2].length;m.lastIndex=-1}if(u===null)return null;const c=u[2],f=u[3]||"0",p=u[4]||"0",g=s.includePrerelease&&u[5]?`-${u[5]}`:"",h=s.includePrerelease&&u[6]?`+${u[6]}`:"";return t(`${c}.${f}.${p}${g}${h}`,s)},zv}var Bv,sC;function PN(){if(sC)return Bv;sC=1;class e{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const o=this.map.keys().next().value;this.delete(o)}this.map.set(r,n)}return this}}return Bv=e,Bv}var Vv,lC;function ro(){if(lC)return Vv;lC=1;const e=/\s+/g;class t{constructor(F,q){if(q=i(q),F instanceof t)return F.loose===!!q.loose&&F.includePrerelease===!!q.includePrerelease?F:new t(F.raw,q);if(F instanceof o)return this.raw=F.value,this.set=[[F]],this.formatted=void 0,this;if(this.options=q,this.loose=!!q.loose,this.includePrerelease=!!q.includePrerelease,this.raw=F.trim().replace(e," "),this.set=this.raw.split("||").map(U=>this.parseRange(U.trim())).filter(U=>U.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const U=this.set[0];if(this.set=this.set.filter(M=>!b(M[0])),this.set.length===0)this.set=[U];else if(this.set.length>1){for(const M of this.set)if(M.length===1&&S(M[0])){this.set=[M];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let F=0;F<this.set.length;F++){F>0&&(this.formatted+="||");const q=this.set[F];for(let U=0;U<q.length;U++)U>0&&(this.formatted+=" "),this.formatted+=q[U].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(F){const U=((this.options.includePrerelease&&m)|(this.options.loose&&y))+":"+F,M=n.get(U);if(M)return M;const G=this.options.loose,K=G?c[f.HYPHENRANGELOOSE]:c[f.HYPHENRANGE];F=F.replace(K,Y(this.options.includePrerelease)),s("hyphen replace",F),F=F.replace(c[f.COMPARATORTRIM],p),s("comparator trim",F),F=F.replace(c[f.TILDETRIM],g),s("tilde trim",F),F=F.replace(c[f.CARETTRIM],h),s("caret trim",F);let D=F.split(" ").map(ne=>C(ne,this.options)).join(" ").split(/\s+/).map(ne=>X(ne,this.options));G&&(D=D.filter(ne=>(s("loose invalid filter",ne,this.options),!!ne.match(c[f.COMPARATORLOOSE])))),s("range list",D);const A=new Map,J=D.map(ne=>new o(ne,this.options));for(const ne of J){if(b(ne))return[ne];A.set(ne.value,ne)}A.size>1&&A.has("")&&A.delete("");const Z=[...A.values()];return n.set(U,Z),Z}intersects(F,q){if(!(F instanceof t))throw new TypeError("a Range is required");return this.set.some(U=>_(U,q)&&F.set.some(M=>_(M,q)&&U.every(G=>M.every(K=>G.intersects(K,q)))))}test(F){if(!F)return!1;if(typeof F=="string")try{F=new u(F,this.options)}catch{return!1}for(let q=0;q<this.set.length;q++)if(N(this.set[q],F,this.options))return!0;return!1}}Vv=t;const r=PN(),n=new r,i=S1(),o=Dp(),s=Pp(),u=dn(),{safeRe:c,t:f,comparatorTrimReplace:p,tildeTrimReplace:g,caretTrimReplace:h}=Rc(),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:y}=kp(),b=j=>j.value==="<0.0.0-0",S=j=>j.value==="",_=(j,F)=>{let q=!0;const U=j.slice();let M=U.pop();for(;q&&U.length;)q=U.every(G=>M.intersects(G,F)),M=U.pop();return q},C=(j,F)=>(s("comp",j,F),j=T(j,F),s("caret",j),j=R(j,F),s("tildes",j),j=L(j,F),s("xrange",j),j=B(j,F),s("stars",j),j),O=j=>!j||j.toLowerCase()==="x"||j==="*",R=(j,F)=>j.trim().split(/\s+/).map(q=>$(q,F)).join(" "),$=(j,F)=>{const q=F.loose?c[f.TILDELOOSE]:c[f.TILDE];return j.replace(q,(U,M,G,K,D)=>{s("tilde",j,U,M,G,K,D);let A;return O(M)?A="":O(G)?A=`>=${M}.0.0 <${+M+1}.0.0-0`:O(K)?A=`>=${M}.${G}.0 <${M}.${+G+1}.0-0`:D?(s("replaceTilde pr",D),A=`>=${M}.${G}.${K}-${D} <${M}.${+G+1}.0-0`):A=`>=${M}.${G}.${K} <${M}.${+G+1}.0-0`,s("tilde return",A),A})},T=(j,F)=>j.trim().split(/\s+/).map(q=>P(q,F)).join(" "),P=(j,F)=>{s("caret",j,F);const q=F.loose?c[f.CARETLOOSE]:c[f.CARET],U=F.includePrerelease?"-0":"";return j.replace(q,(M,G,K,D,A)=>{s("caret",j,M,G,K,D,A);let J;return O(G)?J="":O(K)?J=`>=${G}.0.0${U} <${+G+1}.0.0-0`:O(D)?G==="0"?J=`>=${G}.${K}.0${U} <${G}.${+K+1}.0-0`:J=`>=${G}.${K}.0${U} <${+G+1}.0.0-0`:A?(s("replaceCaret pr",A),G==="0"?K==="0"?J=`>=${G}.${K}.${D}-${A} <${G}.${K}.${+D+1}-0`:J=`>=${G}.${K}.${D}-${A} <${G}.${+K+1}.0-0`:J=`>=${G}.${K}.${D}-${A} <${+G+1}.0.0-0`):(s("no pr"),G==="0"?K==="0"?J=`>=${G}.${K}.${D}${U} <${G}.${K}.${+D+1}-0`:J=`>=${G}.${K}.${D}${U} <${G}.${+K+1}.0-0`:J=`>=${G}.${K}.${D} <${+G+1}.0.0-0`),s("caret return",J),J})},L=(j,F)=>(s("replaceXRanges",j,F),j.split(/\s+/).map(q=>z(q,F)).join(" ")),z=(j,F)=>{j=j.trim();const q=F.loose?c[f.XRANGELOOSE]:c[f.XRANGE];return j.replace(q,(U,M,G,K,D,A)=>{s("xRange",j,U,M,G,K,D,A);const J=O(G),Z=J||O(K),ne=Z||O(D),W=ne;return M==="="&&W&&(M=""),A=F.includePrerelease?"-0":"",J?M===">"||M==="<"?U="<0.0.0-0":U="*":M&&W?(Z&&(K=0),D=0,M===">"?(M=">=",Z?(G=+G+1,K=0,D=0):(K=+K+1,D=0)):M==="<="&&(M="<",Z?G=+G+1:K=+K+1),M==="<"&&(A="-0"),U=`${M+G}.${K}.${D}${A}`):Z?U=`>=${G}.0.0${A} <${+G+1}.0.0-0`:ne&&(U=`>=${G}.${K}.0${A} <${G}.${+K+1}.0-0`),s("xRange return",U),U})},B=(j,F)=>(s("replaceStars",j,F),j.trim().replace(c[f.STAR],"")),X=(j,F)=>(s("replaceGTE0",j,F),j.trim().replace(c[F.includePrerelease?f.GTE0PRE:f.GTE0],"")),Y=j=>(F,q,U,M,G,K,D,A,J,Z,ne,W)=>(O(U)?q="":O(M)?q=`>=${U}.0.0${j?"-0":""}`:O(G)?q=`>=${U}.${M}.0${j?"-0":""}`:K?q=`>=${q}`:q=`>=${q}${j?"-0":""}`,O(J)?A="":O(Z)?A=`<${+J+1}.0.0-0`:O(ne)?A=`<${J}.${+Z+1}.0-0`:W?A=`<=${J}.${Z}.${ne}-${W}`:j?A=`<${J}.${Z}.${+ne+1}-0`:A=`<=${A}`,`${q} ${A}`.trim()),N=(j,F,q)=>{for(let U=0;U<j.length;U++)if(!j[U].test(F))return!1;if(F.prerelease.length&&!q.includePrerelease){for(let U=0;U<j.length;U++)if(s(j[U].semver),j[U].semver!==o.ANY&&j[U].semver.prerelease.length>0){const M=j[U].semver;if(M.major===F.major&&M.minor===F.minor&&M.patch===F.patch)return!0}return!1}return!0};return Vv}var Hv,uC;function Dp(){if(uC)return Hv;uC=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(p,g){if(g=r(g),p instanceof t){if(p.loose===!!g.loose)return p;p=p.value}p=p.trim().split(/\s+/).join(" "),s("comparator",p,g),this.options=g,this.loose=!!g.loose,this.parse(p),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(p){const g=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],h=p.match(g);if(!h)throw new TypeError(`Invalid comparator: ${p}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=""),h[2]?this.semver=new u(h[2],this.options.loose):this.semver=e}toString(){return this.value}test(p){if(s("Comparator.test",p,this.options.loose),this.semver===e||p===e)return!0;if(typeof p=="string")try{p=new u(p,this.options)}catch{return!1}return o(p,this.operator,this.semver,this.options)}intersects(p,g){if(!(p instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(p.value,g).test(this.value):p.operator===""?p.value===""?!0:new c(this.value,g).test(p.semver):(g=r(g),g.includePrerelease&&(this.value==="<0.0.0-0"||p.value==="<0.0.0-0")||!g.includePrerelease&&(this.value.startsWith("<0.0.0")||p.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&p.operator.startsWith(">")||this.operator.startsWith("<")&&p.operator.startsWith("<")||this.semver.version===p.semver.version&&this.operator.includes("=")&&p.operator.includes("=")||o(this.semver,"<",p.semver,g)&&this.operator.startsWith(">")&&p.operator.startsWith("<")||o(this.semver,">",p.semver,g)&&this.operator.startsWith("<")&&p.operator.startsWith(">")))}}Hv=t;const r=S1(),{safeRe:n,t:i}=Rc(),o=PT(),s=Pp(),u=dn(),c=ro();return Hv}var Uv,cC;function Lp(){if(cC)return Uv;cC=1;const e=ro();return Uv=(r,n,i)=>{try{n=new e(n,i)}catch{return!1}return n.test(r)},Uv}var Wv,fC;function MN(){if(fC)return Wv;fC=1;const e=ro();return Wv=(r,n)=>new e(r,n).set.map(i=>i.map(o=>o.value).join(" ").trim().split(" ")),Wv}var Gv,dC;function DN(){if(dC)return Gv;dC=1;const e=dn(),t=ro();return Gv=(n,i,o)=>{let s=null,u=null,c=null;try{c=new t(i,o)}catch{return null}return n.forEach(f=>{c.test(f)&&(!s||u.compare(f)===-1)&&(s=f,u=new e(s,o))}),s},Gv}var qv,pC;function LN(){if(pC)return qv;pC=1;const e=dn(),t=ro();return qv=(n,i,o)=>{let s=null,u=null,c=null;try{c=new t(i,o)}catch{return null}return n.forEach(f=>{c.test(f)&&(!s||u.compare(f)===1)&&(s=f,u=new e(s,o))}),s},qv}var Xv,hC;function FN(){if(hC)return Xv;hC=1;const e=dn(),t=ro(),r=Mp();return Xv=(i,o)=>{i=new t(i,o);let s=new e("0.0.0");if(i.test(s)||(s=new e("0.0.0-0"),i.test(s)))return s;s=null;for(let u=0;u<i.set.length;++u){const c=i.set[u];let f=null;c.forEach(p=>{const g=new e(p.semver.version);switch(p.operator){case">":g.prerelease.length===0?g.patch++:g.prerelease.push(0),g.raw=g.format();case"":case">=":(!f||r(g,f))&&(f=g);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),f&&(!s||r(s,f))&&(s=f)}return s&&i.test(s)?s:null},Xv}var Kv,gC;function NN(){if(gC)return Kv;gC=1;const e=ro();return Kv=(r,n)=>{try{return new e(r,n).range||"*"}catch{return null}},Kv}var Yv,vC;function _1(){if(vC)return Yv;vC=1;const e=dn(),t=Dp(),{ANY:r}=t,n=ro(),i=Lp(),o=Mp(),s=x1(),u=C1(),c=E1();return Yv=(p,g,h,m)=>{p=new e(p,m),g=new n(g,m);let y,b,S,_,C;switch(h){case">":y=o,b=u,S=s,_=">",C=">=";break;case"<":y=s,b=c,S=o,_="<",C="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(p,g,m))return!1;for(let O=0;O<g.set.length;++O){const R=g.set[O];let $=null,T=null;if(R.forEach(P=>{P.semver===r&&(P=new t(">=0.0.0")),$=$||P,T=T||P,y(P.semver,$.semver,m)?$=P:S(P.semver,T.semver,m)&&(T=P)}),$.operator===_||$.operator===C||(!T.operator||T.operator===_)&&b(p,T.semver))return!1;if(T.operator===C&&S(p,T.semver))return!1}return!0},Yv}var Qv,mC;function jN(){if(mC)return Qv;mC=1;const e=_1();return Qv=(r,n,i)=>e(r,n,">",i),Qv}var Jv,yC;function zN(){if(yC)return Jv;yC=1;const e=_1();return Jv=(r,n,i)=>e(r,n,"<",i),Jv}var Zv,bC;function BN(){if(bC)return Zv;bC=1;const e=ro();return Zv=(r,n,i)=>(r=new e(r,i),n=new e(n,i),r.intersects(n,i)),Zv}var em,SC;function VN(){if(SC)return em;SC=1;const e=Lp(),t=to();return em=(r,n,i)=>{const o=[];let s=null,u=null;const c=r.sort((h,m)=>t(h,m,i));for(const h of c)e(h,n,i)?(u=h,s||(s=h)):(u&&o.push([s,u]),u=null,s=null);s&&o.push([s,null]);const f=[];for(const[h,m]of o)h===m?f.push(h):!m&&h===c[0]?f.push("*"):m?h===c[0]?f.push(`<=${m}`):f.push(`${h} - ${m}`):f.push(`>=${h}`);const p=f.join(" || "),g=typeof n.raw=="string"?n.raw:String(n);return p.length<g.length?p:n},em}var tm,wC;function HN(){if(wC)return tm;wC=1;const e=ro(),t=Dp(),{ANY:r}=t,n=Lp(),i=to(),o=(g,h,m={})=>{if(g===h)return!0;g=new e(g,m),h=new e(h,m);let y=!1;e:for(const b of g.set){for(const S of h.set){const _=c(b,S,m);if(y=y||_!==null,_)continue e}if(y)return!1}return!0},s=[new t(">=0.0.0-0")],u=[new t(">=0.0.0")],c=(g,h,m)=>{if(g===h)return!0;if(g.length===1&&g[0].semver===r){if(h.length===1&&h[0].semver===r)return!0;m.includePrerelease?g=s:g=u}if(h.length===1&&h[0].semver===r){if(m.includePrerelease)return!0;h=u}const y=new Set;let b,S;for(const L of g)L.operator===">"||L.operator===">="?b=f(b,L,m):L.operator==="<"||L.operator==="<="?S=p(S,L,m):y.add(L.semver);if(y.size>1)return null;let _;if(b&&S){if(_=i(b.semver,S.semver,m),_>0)return null;if(_===0&&(b.operator!==">="||S.operator!=="<="))return null}for(const L of y){if(b&&!n(L,String(b),m)||S&&!n(L,String(S),m))return null;for(const z of h)if(!n(L,String(z),m))return!1;return!0}let C,O,R,$,T=S&&!m.includePrerelease&&S.semver.prerelease.length?S.semver:!1,P=b&&!m.includePrerelease&&b.semver.prerelease.length?b.semver:!1;T&&T.prerelease.length===1&&S.operator==="<"&&T.prerelease[0]===0&&(T=!1);for(const L of h){if($=$||L.operator===">"||L.operator===">=",R=R||L.operator==="<"||L.operator==="<=",b){if(P&&L.semver.prerelease&&L.semver.prerelease.length&&L.semver.major===P.major&&L.semver.minor===P.minor&&L.semver.patch===P.patch&&(P=!1),L.operator===">"||L.operator===">="){if(C=f(b,L,m),C===L&&C!==b)return!1}else if(b.operator===">="&&!n(b.semver,String(L),m))return!1}if(S){if(T&&L.semver.prerelease&&L.semver.prerelease.length&&L.semver.major===T.major&&L.semver.minor===T.minor&&L.semver.patch===T.patch&&(T=!1),L.operator==="<"||L.operator==="<="){if(O=p(S,L,m),O===L&&O!==S)return!1}else if(S.operator==="<="&&!n(S.semver,String(L),m))return!1}if(!L.operator&&(S||b)&&_!==0)return!1}return!(b&&R&&!S&&_!==0||S&&$&&!b&&_!==0||P||T)},f=(g,h,m)=>{if(!g)return h;const y=i(g.semver,h.semver,m);return y>0?g:y<0||h.operator===">"&&g.operator===">="?h:g},p=(g,h,m)=>{if(!g)return h;const y=i(g.semver,h.semver,m);return y<0?g:y>0||h.operator==="<"&&g.operator==="<="?h:g};return tm=o,tm}var rm,xC;function UN(){if(xC)return rm;xC=1;const e=Rc(),t=kp(),r=dn(),n=IT(),i=Hl(),o=SN(),s=wN(),u=xN(),c=EN(),f=CN(),p=_N(),g=RN(),h=ON(),m=to(),y=$N(),b=TN(),S=w1(),_=IN(),C=AN(),O=Mp(),R=x1(),$=AT(),T=kT(),P=E1(),L=C1(),z=PT(),B=kN(),X=Dp(),Y=ro(),N=Lp(),j=MN(),F=DN(),q=LN(),U=FN(),M=NN(),G=_1(),K=jN(),D=zN(),A=BN(),J=VN(),Z=HN();return rm={parse:i,valid:o,clean:s,inc:u,diff:c,major:f,minor:p,patch:g,prerelease:h,compare:m,rcompare:y,compareLoose:b,compareBuild:S,sort:_,rsort:C,gt:O,lt:R,eq:$,neq:T,gte:P,lte:L,cmp:z,coerce:B,Comparator:X,Range:Y,satisfies:N,toComparators:j,maxSatisfying:F,minSatisfying:q,minVersion:U,validRange:M,outside:G,gtr:K,ltr:D,intersects:A,simplifyRange:J,subset:Z,SemVer:r,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},rm}var Hn=UN();const EC=Nr(Hn);var Xt=(e=>(e.NANO_S="nanoS",e.NANO_SP="nanoSP",e.NANO_X="nanoX",e.STAX="stax",e.FLEX="flex",e.APEX="apexp",e))(Xt||{});let MT=class{id;model;name;constructor({id:t,model:r,name:n}){this.id=t,this.model=r,this.name=n}};const nm={Twelve:12,Eighteen:18,TwentyFour:24};var $r=(e=>(e.Unknown="unknown",e.WelcomeScreen1="welcome-screen-1",e.WelcomeScreen2="welcome-screen-2",e.WelcomeScreen3="welcome-screen-3",e.WelcomeScreen4="welcome-screen-4",e.WelcomeScreenReminder="welcome-screen-reminder",e.SetupChoice="setup-choice",e.NewDevice="new-device",e.ConfirmNewDevice="confirm-new-device",e.RestoreRecoveryPhrase="restore-recovery-phrase",e.SafetyWarning="safety-warning",e.DeviceIsReady="device-is-ready",e.ChooseName="choose-name",e.RestoreRecoverBackup="restore-recover-backup",e.SetupRestoreChoice="setup-restore-choice",e.OnboardingStatusCheck="onboarding-status-check",e.RestoreWithRk="restore-with-rk",e))($r||{});const WN={1:$r.WelcomeScreen1,2:$r.WelcomeScreen2,3:$r.WelcomeScreen3,4:$r.WelcomeScreen4,5:$r.WelcomeScreenReminder,6:$r.SetupChoice,7:$r.NewDevice,8:$r.ConfirmNewDevice,9:$r.RestoreRecoveryPhrase,10:$r.SafetyWarning,11:$r.DeviceIsReady,12:$r.ChooseName,13:$r.RestoreRecoverBackup,14:$r.SetupRestoreChoice,15:$r.OnboardingStatusCheck,16:$r.RestoreWithRk};let GN=class{seFlags;constructor(t){this.seFlags=new Uint8Array(4),this.seFlags.set(t.subarray(0,this.seFlags.length))}generalDeviceState(){const t=this.seFlags[0]??0;return{isPinValidated:this._checkNthBitInByte(t,1),hasMcuSerialNumber:this._checkNthBitInByte(t,2),hasValidCertificate:this._checkNthBitInByte(t,3),isCustomAuthorityConnectionAllowed:this._checkNthBitInByte(t,4),isSecureConnectionAllowed:this._checkNthBitInByte(t,5),isOnboarded:this._checkNthBitInByte(t,6),isMcuCodeSigned:this._checkNthBitInByte(t,7),isInRecoveryMode:this._checkNthBitInByte(t,8)}}endorsementInformation(){const t=this.seFlags[1]??0;return{hasEndorsementCertificateInSlot1:(t&1)!==0,hasEndorsementCertificateInSlot2:(t&2)!==0}}wordsInformation(){const t=this.seFlags[2]??0,r=t>>5&3;return{numberOfWords:[nm.TwentyFour,nm.Eighteen,nm.Twelve,void 0][r],currentWordIndex:t&31}}onboardingStatus(){const t=this.seFlags[3]??0;return{onboardingState:WN[t]??$r.Unknown}}_checkNthBitInByte(t,r){return(t>>8-r&1)===1}},qN=class{name="getOsVersion";args=void 0;getApdu(){const t={cla:224,ins:1,p1:0,p2:0};return new $T(t).build()}parseResponse(t,r){if(!b1.isSuccessResponse(t))return us({error:TT.handle(t)});const n=new y1(t),i=n.extract32BitUInt();if(i===void 0)return us({error:new lN("Missing target ID in OS version")});let o=n.encodeToString(n.extractFieldLVEncoded()),s=n.extractFieldLVEncoded()??new Uint8Array(0);const u=new GN(s),c={...u.generalDeviceState(),...u.endorsementInformation(),...u.wordsInformation(),...u.onboardingStatus()};o||(o="0.0.0",s=new Uint8Array);const f=(i&4026531840)!==805306368,p=o.includes("-osu");let g="",h="",m="",y="",b,S,_,C;if(f){m=o,b=i;const O=n.extractFieldLVEncoded();O&&(O.length>=5?(g=n.encodeToString(O),S=parseInt(n.encodeToHexaString(n.extractFieldLVEncoded()),16)):S=parseInt(n.encodeToHexaString(O),16))}else{if(g=o,S=i,h=n.encodeToString(n.extractFieldLVEncoded()),this.isBootloaderVersionSupported(g,r)&&(m=n.encodeToString(n.extractFieldLVEncoded())),this.isHardwareVersionSupported(g,r)?y=n.encodeToHexaString(n.extractFieldLVEncoded()):y="00",this.isLocalizationSupported(g,r)){const O=n.extractFieldLVEncoded();O!==void 0&&(_=parseInt(n.encodeToHexaString(O),16))}if(this.isRecoverSupported(g,r)){const O=n.extractFieldLVEncoded();O!==void 0&&(C=parseInt(n.encodeToHexaString(O),16))}}return us({data:{isBootloader:f,isOsu:p,targetId:i,seTargetId:S,mcuTargetId:b,seVersion:g,seFlags:s,mcuSephVersion:h,mcuBootloaderVersion:m,hwVersion:y,langId:_,recoverState:C,secureElementFlags:c}})}isBootloaderVersionSupported(t,r){const n=Hn.coerce(t)??"";switch(r){case Xt.NANO_S:case Xt.NANO_X:return Hn.gte(n,"2.0.0");default:return!0}}isHardwareVersionSupported(t,r){const n=Hn.coerce(t)??"";return r===Xt.NANO_X?Hn.gte(n,"2.0.0"):!1}isLocalizationSupported(t,r){const n=Hn.coerce(t)??"";switch(r){case Xt.NANO_S:return!1;case Xt.NANO_SP:return Hn.gte(n,"1.1.0");case Xt.NANO_X:return Hn.gte(n,"2.1.0");default:return!0}}isRecoverSupported(t,r){const n=Hn.coerce(t)??"";switch(r){case Xt.NANO_S:return!1;case Xt.NANO_SP:return Hn.gte(n,"1.1.2");case Xt.NANO_X:return Hn.gte(n,"2.2.3");case Xt.STAX:return Hn.gte(n,"1.4.0");case Xt.FLEX:return Hn.gte(n,"1.0.1");default:return!0}}};var ho=(e=>(e.LOCKED="LOCKED",e.BUSY="BUSY",e.CONNECTED="CONNECTED",e.NOT_CONNECTED="NOT CONNECTED",e))(ho||{}),XN=(e=>(e.NotStarted="not-started",e.Pending="pending",e.Stopped="stopped",e.Completed="completed",e.Error="error",e))(XN||{}),KN=(e=>(e.None="none",e.UnlockDevice="unlock-device",e.AllowSecureConnection="allow-secure-connection",e.ConfirmOpenApp="confirm-open-app",e.SignTransaction="sign-transaction",e.SignTypedData="sign-typed-data",e.AllowListApps="allow-list-apps",e.VerifyAddress="verify-address",e.SignPersonalMessage="sign-personal-message",e.SignDelegationAuthorization="sign-delegation-authorization",e.Web3ChecksOptIn="web3-checks-opt-in",e.VerifySafeAddress="verify-safe-address",e.RegisterWallet="register-wallet",e.ConfirmLoadImage="confirm-load-image",e.ConfirmCommitImage="confirm-commit-image",e.ConfirmRemoveImage="confirm-remove-image",e.GrantConsent="grant-consent",e.AllowInstallFirmware="allow-install-firmware",e))(KN||{});const _n={of(e){return Lr(e)},empty(){return Dt},zero(){return Dt},fromNullable(e){return e==null?Dt:Lr(e)},fromFalsy(e){return e?Lr(e):Dt},fromPredicate(e,t){return arguments.length===1?r=>_n.fromPredicate(e,r):e(t)?Lr(t):Dt},mapMaybe(e,t){return arguments.length===1?r=>_n.mapMaybe(e,r):_n.catMaybes(t.map(e))},catMaybes(e){let t=[];for(const r of e)r.isJust()&&t.push(r.extract());return t},encase(e){try{return Lr(e())}catch{return Dt}},isMaybe(e){return e instanceof R1||e instanceof O1},sequence(e){let t=[];for(const r of e)if(r.isJust())t.push(r.extract());else return Dt;return Lr(t)},"fantasy-land/of"(e){return this.of(e)},"fantasy-land/empty"(){return this.empty()},"fantasy-land/zero"(){return this.zero()}};class R1{constructor(t){this.__value=t,this["fantasy-land/equals"]=this.equals,this["fantasy-land/map"]=this.map,this["fantasy-land/ap"]=this.ap,this["fantasy-land/alt"]=this.alt,this["fantasy-land/chain"]=this.chain,this["fantasy-land/reduce"]=this.reduce,this["fantasy-land/extend"]=this.extend,this["fantasy-land/filter"]=this.filter}isJust(){return!0}isNothing(){return!1}inspect(){return`Just(${this.__value})`}toString(){return this.inspect()}toJSON(){const t=this.__value;return t instanceof Date?t.toJSON():t}equals(t){return this.extract()===t.extract()}map(t){return Lr(t(this.__value))}ap(t){return t.isJust()?this.map(t.extract()):Dt}alt(t){return this}altLazy(t){return this}chain(t){return t(this.__value)}chainNullable(t){return _n.fromNullable(t(this.__value))}join(){return this.__value}reduce(t,r){return t(r,this.__value)}extend(t){return Lr(t(this))}unsafeCoerce(){return this.__value}caseOf(t){return"_"in t?t._():t.Just(this.__value)}orDefault(t){return this.__value}orDefaultLazy(t){return this.__value}toList(){return[this.__value]}mapOrDefault(t,r){return t(this.__value)}extract(){return this.__value}extractNullable(){return this.__value}toEither(t){return nr(this.__value)}ifJust(t){return t(this.__value),this}ifNothing(t){return this}filter(t){return t(this.__value)?Lr(this.__value):Dt}}R1.prototype.constructor=_n;class O1{constructor(){this["fantasy-land/equals"]=this.equals,this["fantasy-land/map"]=this.map,this["fantasy-land/ap"]=this.ap,this["fantasy-land/alt"]=this.alt,this["fantasy-land/chain"]=this.chain,this["fantasy-land/reduce"]=this.reduce,this["fantasy-land/extend"]=this.extend,this["fantasy-land/filter"]=this.filter}isJust(){return!1}isNothing(){return!0}inspect(){return"Nothing"}toString(){return this.inspect()}toJSON(){return this.__value}equals(t){return this.extract()===t.extract()}map(t){return Dt}ap(t){return Dt}alt(t){return t}altLazy(t){return t()}chain(t){return Dt}chainNullable(t){return Dt}join(){return Dt}reduce(t,r){return r}extend(t){return Dt}unsafeCoerce(){throw new Error("Maybe#unsafeCoerce was ran on a Nothing")}caseOf(t){return"_"in t?t._():t.Nothing()}orDefault(t){return t}orDefaultLazy(t){return t()}toList(){return[]}mapOrDefault(t,r){return r}extract(){}extractNullable(){return null}toEither(t){return Wt(t)}ifJust(t){return this}ifNothing(t){return t(),this}filter(t){return Dt}}O1.prototype.constructor=_n;const Lr=e=>new R1(e),Dt=new O1,Rn={of(e){return nr(e)},lefts(e){let t=[];for(const r of e)r.isLeft()&&t.push(r.extract());return t},rights(e){let t=[];for(const r of e)r.isRight()&&t.push(r.extract());return t},encase(e){try{return nr(e())}catch(t){return Wt(t)}},sequence(e){let t=[];for(const r of e){if(r.isLeft())return r;t.push(r.extract())}return nr(t)},isEither(e){return e instanceof T1||e instanceof $1},"fantasy-land/of"(e){return Rn.of(e)}};class $1{constructor(t){this.__value=t,this._="R",this["fantasy-land/bimap"]=this.bimap,this["fantasy-land/map"]=this.map,this["fantasy-land/ap"]=this.ap,this["fantasy-land/equals"]=this.equals,this["fantasy-land/chain"]=this.chain,this["fantasy-land/alt"]=this.alt,this["fantasy-land/reduce"]=this.reduce,this["fantasy-land/extend"]=this.extend}isLeft(){return!1}isRight(){return!0}toJSON(){return this.__value}inspect(){return`Right(${this.__value})`}toString(){return this.inspect()}bimap(t,r){return nr(r(this.__value))}map(t){return nr(t(this.__value))}mapLeft(t){return this}ap(t){return t.isRight()?this.map(t.extract()):t}equals(t){return t.isRight()?this.__value===t.extract():!1}chain(t){return t(this.__value)}chainLeft(t){return this}join(){return this.__value}alt(t){return this}altLazy(t){return this}reduce(t,r){return t(r,this.__value)}extend(t){return nr(t(this))}unsafeCoerce(){return this.__value}caseOf(t){return"_"in t?t._():t.Right(this.__value)}leftOrDefault(t){return t}orDefault(t){return this.__value}orDefaultLazy(t){return this.__value}leftOrDefaultLazy(t){return t()}ifLeft(t){return this}ifRight(t){return t(this.__value),this}toMaybe(){return Lr(this.__value)}leftToMaybe(){return Dt}extract(){return this.__value}swap(){return Wt(this.__value)}}$1.prototype.constructor=Rn;class T1{constructor(t){this.__value=t,this._="L",this["fantasy-land/bimap"]=this.bimap,this["fantasy-land/map"]=this.map,this["fantasy-land/ap"]=this.ap,this["fantasy-land/equals"]=this.equals,this["fantasy-land/chain"]=this.chain,this["fantasy-land/alt"]=this.alt,this["fantasy-land/reduce"]=this.reduce,this["fantasy-land/extend"]=this.extend}isLeft(){return!0}isRight(){return!1}toJSON(){return this.__value}inspect(){return`Left(${JSON.stringify(this.__value)})`}toString(){return this.inspect()}bimap(t,r){return Wt(t(this.__value))}map(t){return this}mapLeft(t){return Wt(t(this.__value))}ap(t){return t.isLeft()?t:this}equals(t){return t.isLeft()?t.extract()===this.__value:!1}chain(t){return this}chainLeft(t){return t(this.__value)}join(){return this}alt(t){return t}altLazy(t){return t()}reduce(t,r){return r}extend(t){return this}unsafeCoerce(){throw this.__value instanceof Error?this.__value:new Error("Either#unsafeCoerce was ran on a Left")}caseOf(t){return"_"in t?t._():t.Left(this.__value)}leftOrDefault(t){return this.__value}orDefault(t){return t}orDefaultLazy(t){return t()}leftOrDefaultLazy(t){return this.__value}ifLeft(t){return t(this.__value),this}ifRight(t){return this}toMaybe(){return Dt}leftToMaybe(){return Lr(this.__value)}extract(){return this.__value}swap(){return nr(this.__value)}}T1.prototype.constructor=Rn;const Wt=e=>new T1(e),nr=e=>new $1(e),Oc=e=>e,YN=e=>e,im=Object.assign(YN,{fromArray:e=>im.isNonEmpty(e)?Lr(e):Dt,unsafeCoerce:e=>{if(im.isNonEmpty(e))return e;throw new Error("NonEmptyList#unsafeCoerce was ran on an empty array")},fromTuple:e=>im(e.toArray()),head:e=>e[0],last:e=>e[e.length-1],isNonEmpty:e=>e.length>0,tail:e=>e.slice(1)}),zd=(e,t)=>typeof t=="bigint"?t.toString():t,QN=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Es=(e,t)=>{let r="";switch(typeof t){case"undefined":r="undefined";break;case"object":r=t===null?"null":Array.isArray(t)?"an array with value "+JSON.stringify(t,zd):"an object with value "+JSON.stringify(t,zd);break;case"boolean":r="a boolean";break;case"symbol":r="a symbol";break;case"function":r="a function";break;case"bigint":r=`a bigint with value ${t.toString()}`}return r=r||`a ${typeof t} with value ${JSON.stringify(t,zd)}`,`Expected ${e}, but received ${r}`},JN=e=>(Object.keys(e).length===1&&e.oneOf?.length===1&&typeof e.oneOf[0]=="object"&&(Object.assign(e,e.oneOf[0]),delete e.oneOf),e),ZN=e=>{if(Array.isArray(e.oneOf))for(let t=0;t<e.oneOf.length;t++){const r=e.oneOf[t];if(typeof r=="object"&&r.oneOf)return e.oneOf.splice(t,1),e.oneOf.push(...r.oneOf),DT(e)}return e},DT=e=>(ZN(e),JN(e),e),wr={interface(e){const t=Object.keys(e),r=i=>{if(!QN(i))return Wt(Es("an object",i));const o={};for(const s of t){if(!i.hasOwnProperty(s)&&!e[s]._isOptional)return Wt(`Problem with property "${s}": it does not exist in received object ${JSON.stringify(i,zd)}`);const u=e[s].decode(i[s]);if(u.isLeft())return Wt(`Problem with the value of property "${s}": ${u.extract()}`);const c=u.extract();c!==void 0&&(o[s]=c)}return nr(o)};return{decode:r,encode:i=>{const o={};for(const s of t)o[s]=e[s].encode(i[s]);return o},unsafeDecode:i=>r(i).mapLeft(Error).unsafeCoerce(),schema:()=>t.reduce((i,o)=>(e[o]._isOptional||i.required.push(o),i.properties[o]=DT(e[o].schema()),i),{type:"object",properties:{},required:[]})}},custom({decode:e,encode:t,schema:r}){return{decode:e,encode:t,unsafeDecode:n=>e(n).mapLeft(Error).unsafeCoerce(),schema:r??(()=>({}))}}},kt=wr.custom({decode:e=>typeof e=="string"?nr(e):Wt(Es("a string",e)),encode:Oc,schema:()=>({type:"string"})}),_l=wr.custom({decode:e=>typeof e=="number"?nr(e):Wt(Es("a number",e)),encode:Oc,schema:()=>({type:"number"})}),e3=wr.custom({decode:e=>e===void 0?nr(e):Wt(Es("an undefined",e)),encode:Oc}),br=e=>({...t3([e,e3]),schema:e.schema,_isOptional:!0}),sp=wr.custom({decode:e=>typeof e=="boolean"?nr(e):Wt(Es("a boolean",e)),encode:Oc,schema:()=>({type:"boolean"})}),t3=e=>wr.custom({decode:t=>{let r=[];for(const n of e){const i=n.decode(t);if(i.isRight())return i;r.push(i.extract())}return Wt(`One of the following problems occured: ${r.map((n,i)=>`(${i}) ${n}`).join(", ")}`)},encode:t=>{for(const r of e)if(Rn.encase(()=>r.encode(t)).mapLeft(i=>"").chain(r.decode).isRight())return r.encode(t);return t},schema:()=>({oneOf:e.map(t=>t.schema())})}),Si=e=>wr.custom({decode:t=>{if(Array.isArray(t)){const r=[];for(let n=0;n<t.length;n++){const i=e.decode(t[n]);if(i.isRight())r.push(i.extract());else return Wt(`Problem with the value at index ${n}: ${i.extract()}`)}return nr(r)}else return Wt(Es("an array",t))},encode:t=>t.map(e.encode),schema:()=>({type:"array",items:e.schema()})});wr.custom({decode:e=>kt.decode(e).chain(t=>isFinite(+t)?nr(t):Wt(Es("a number",e))),encode:Oc,schema:_l.schema});var LT;const FT={liftEither(e){if(e.isRight())return Promise.resolve(e.extract());throw e.extract()},fromPromise(e){return e.then(FT.liftEither)},throwE(e){throw e}};class NT{constructor(t){this.runPromise=t,this[LT]="EitherAsync",this["fantasy-land/chain"]=this.chain,this["fantasy-land/alt"]=this.alt,this.then=(r,n)=>this.run().then(r,n)}leftOrDefault(t){return this.run().then(r=>r.leftOrDefault(t))}orDefault(t){return this.run().then(r=>r.orDefault(t))}join(){return dt(async t=>{const r=await this;if(r.isRight()){const n=await r.extract();return t.liftEither(n)}return t.liftEither(r)})}ap(t){return dt(async r=>{const n=await t;if(n.isRight()){const i=await this.run();return i.isRight()?n.extract()(i.extract()):r.liftEither(i)}return r.liftEither(n)})}alt(t){return dt(async r=>{const n=await this.run();if(n.isRight())return n.extract();{const i=await t;return r.liftEither(i)}})}extend(t){return dt(async r=>{const n=await this.run();if(n.isRight()){const i=dt.liftEither(n);return r.liftEither(nr(t(i)))}return r.liftEither(n)})}async run(){try{return nr(await this.runPromise(FT))}catch(t){return Wt(t)}}bimap(t,r){return dt(async n=>{const i=await this.run();try{return await n.liftEither(i.bimap(t,r))}catch(o){throw await o}})}map(t){return dt(r=>this.runPromise(r).then(t))}mapLeft(t){return dt(async r=>{try{return await this.runPromise(r)}catch(n){throw await t(n)}})}chain(t){return dt(async r=>{const n=await this.runPromise(r);return r.fromPromise(t(n))})}chainLeft(t){return dt(async r=>{try{return await this.runPromise(r)}catch(n){return r.fromPromise(t(n))}})}toMaybeAsync(){return sn(async({liftMaybe:t})=>{const r=await this.run();return t(r.toMaybe())})}swap(){return dt(async t=>{const r=await this.run();return r.isRight()&&t.throwE(r.extract()),t.liftEither(nr(r.extract()))})}ifLeft(t){return dt(async r=>{const n=await this.run();return n.ifLeft(t),r.liftEither(n)})}ifRight(t){return dt(async r=>{const n=await this.run();return n.ifRight(t),r.liftEither(n)})}void(){return this.map(t=>{})}caseOf(t){return this.run().then(r=>r.caseOf(t))}finally(t){return dt(({fromPromise:r})=>r(this.run().finally(t)))}}LT=Symbol.toStringTag;const dt=Object.assign(e=>new NT(e),{fromPromise:e=>dt(({fromPromise:t})=>t(e())),liftEither:e=>dt(({liftEither:t})=>t(e)),lefts:e=>Promise.all(e.map(t=>t.run())).then(Rn.lefts),rights:e=>Promise.all(e.map(t=>t.run())).then(Rn.rights),sequence:e=>dt(async t=>{let r=[];for await(const n of e){if(n.isLeft())return t.liftEither(n);r.push(n.extract())}return t.liftEither(nr(r))}),all:e=>dt.fromPromise(async()=>Promise.all(e).then(Rn.sequence))});NT.prototype.constructor=dt;var jT;const zT={liftMaybe(e){if(e.isJust())return Promise.resolve(e.extract());throw Dt},fromPromise(e){return e.then(zT.liftMaybe)}};class BT{constructor(t){this.runPromise=t,this[jT]="MaybeAsync",this["fantasy-land/chain"]=this.chain,this["fantasy-land/filter"]=this.filter,this["fantasy-land/alt"]=this.alt}orDefault(t){return this.run().then(r=>r.orDefault(t))}join(){return sn(async t=>{const r=await this.run();if(r.isJust()){const n=await r.extract();return t.liftMaybe(n)}return t.liftMaybe(Dt)})}ap(t){return sn(async r=>{const n=await t;if(n.isJust()){const i=await this.run();return i.isJust()?n.extract()(i.extract()):r.liftMaybe(Dt)}return r.liftMaybe(Dt)})}alt(t){return sn(async r=>{const n=await this.run();if(n.isJust())return n.extract();{const i=await t;return r.liftMaybe(i)}})}extend(t){return sn(async r=>{const n=await this.run();if(n.isJust()){const i=sn.liftMaybe(n);return r.liftMaybe(Lr(t(i)))}return r.liftMaybe(Dt)})}filter(t){return sn(async r=>{const n=await this.run();return r.liftMaybe(n.filter(t))})}async run(){try{return Lr(await this.runPromise(zT))}catch{return Dt}}map(t){return sn(r=>this.runPromise(r).then(t))}chain(t){return sn(async r=>{const n=await this.runPromise(r);return r.fromPromise(t(n))})}toEitherAsync(t){return dt(async({liftEither:r})=>{const n=await this.run();return r(n.toEither(t))})}ifJust(t){return sn(async r=>{const n=await this.run();return n.ifJust(t),r.liftMaybe(n)})}ifNothing(t){return sn(async r=>{const n=await this.run();return n.ifNothing(t),r.liftMaybe(n)})}void(){return this.map(t=>{})}caseOf(t){return this.run().then(r=>r.caseOf(t))}finally(t){return sn(({fromPromise:r})=>r(this.run().finally(t)))}then(t,r){return this.run().then(t,r)}}jT=Symbol.toStringTag;const sn=Object.assign(e=>new BT(e),{catMaybes:e=>Promise.all(e).then(_n.catMaybes),fromPromise:e=>sn(({fromPromise:t})=>t(e())),liftMaybe:e=>sn(({liftMaybe:t})=>t(e))});BT.prototype.constructor=sn;var H0=function(e,t){return H0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},H0(e,t)};function Eo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");H0(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function r3(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function u(p){try{f(n.next(p))}catch(g){s(g)}}function c(p){try{f(n.throw(p))}catch(g){s(g)}}function f(p){p.done?o(p.value):i(p.value).then(u,c)}f((n=n.apply(e,t||[])).next())})}function VT(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(f){return function(p){return c([f,p])}}function c(f){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,f[0]&&(r=0)),r;)try{if(n=1,i&&(o=f[0]&2?i.return:f[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,f[1])).done)return o;switch(i=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,i=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){r.label=f[1];break}if(f[0]===6&&r.label<o[1]){r.label=o[1],o=f;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(f);break}o[2]&&r.ops.pop(),r.trys.pop();continue}f=t.call(e,r)}catch(p){f=[6,p],i=0}finally{n=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function Rl(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ol(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function $l(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function Sl(e){return this instanceof Sl?(this.v=e,this):new Sl(e)}function n3(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(m){return function(y){return Promise.resolve(y).then(m,g)}}function u(m,y){n[m]&&(i[m]=function(b){return new Promise(function(S,_){o.push([m,b,S,_])>1||c(m,b)})},y&&(i[m]=y(i[m])))}function c(m,y){try{f(n[m](y))}catch(b){h(o[0][3],b)}}function f(m){m.value instanceof Sl?Promise.resolve(m.value.v).then(p,g):h(o[0][2],m)}function p(m){c("next",m)}function g(m){c("throw",m)}function h(m,y){m(y),o.shift(),o.length&&c(o[0][0],o[0][1])}}function i3(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Rl=="function"?Rl(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(s){return new Promise(function(u,c){s=e[o](s),i(u,c,s.done,s.value)})}}function i(o,s,u,c){Promise.resolve(c).then(function(f){o({value:f,done:u})},s)}}function cr(e){return typeof e=="function"}function Fp(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var om=Fp(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
453
+ `,CE=({direction:e,first:t,second:r,defaultFirstSize:n="50%",minFirstSize:i="20%",minSecondSize:o="20%"})=>k.jsx(rN,{children:k.jsxs(_T,{orientation:e==="horizontal"?"vertical":"horizontal",style:{flex:1},children:[k.jsx(V0,{defaultSize:n,minSize:i,children:k.jsx(EE,{children:t})}),k.jsx(tN,{$direction:e}),k.jsx(V0,{minSize:o,children:k.jsx(EE,{children:r})})]})}),Cu={CONNECTED_DEVICES_UPDATE:"connectedDevicesUpdate",DEVICE_SESSION_STATE_UPDATE:"deviceSessionStateUpdate",PROVIDER_VALUE:"providerValue",APDU_RESPONSE:"apduResponse",DISCOVERED_DEVICES_UPDATE:"discoveredDevicesUpdate"},Jo={DISCONNECT:"disconnect",SEND_APDU:"sendApdu",GET_PROVIDER:"getProvider",SET_PROVIDER:"setProvider",START_LISTENING_DEVICES:"startListeningDevices",STOP_LISTENING_DEVICES:"stopListeningDevices",START_DISCOVERING:"startDiscovering",STOP_DISCOVERING:"stopDiscovering",CONNECT_DEVICE:"connectDevice"},_E={LOGGER:"logger",DMK_INSPECTOR:"dmk-inspector"},nN="moduleConnected";var RE;(function(e){(function(t){var r=typeof globalThis=="object"?globalThis:typeof self=="object"||typeof self=="object"?self:typeof this=="object"?this:u(),n=i(e);typeof r.Reflect<"u"&&(n=i(r.Reflect,n)),t(n,r),typeof r.Reflect>"u"&&(r.Reflect=e);function i(c,f){return function(p,g){Object.defineProperty(c,p,{configurable:!0,writable:!0,value:g}),f&&f(p,g)}}function o(){try{return Function("return this;")()}catch{}}function s(){try{return(0,eval)("(function() { return this; })()")}catch{}}function u(){return o()||s()}})(function(t,r){var n=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",o=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",s=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",u=typeof Object.create=="function",c={__proto__:[]}instanceof Array,f=!u&&!c,p={create:u?function(){return Ft(Object.create(null))}:c?function(){return Ft({__proto__:null})}:function(){return Ft({})},has:f?function(re,ie){return n.call(re,ie)}:function(re,ie){return ie in re},get:f?function(re,ie){return n.call(re,ie)?re[ie]:void 0}:function(re,ie){return re[ie]}},g=Object.getPrototypeOf(Function),h=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Lt(),m=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:ht(),y=typeof WeakMap=="function"?WeakMap:Kt(),b=i?Symbol.for("@reflect-metadata:registry"):void 0,S=Ve(),_=ye(S);function C(re,ie,ue,V){if(A(ue)){if(!Me(re))throw new TypeError;if(!je(ie))throw new TypeError;return Y(re,ie)}else{if(!Me(re))throw new TypeError;if(!ne(ie))throw new TypeError;if(!ne(V)&&!A(V)&&!J(V))throw new TypeError;return J(V)&&(V=void 0),ue=we(ue),N(re,ie,ue,V)}}t("decorate",C);function O(re,ie){function ue(V,pe){if(!ne(V))throw new TypeError;if(!A(pe)&&!Ae(pe))throw new TypeError;M(re,ie,V,pe)}return ue}t("metadata",O);function R(re,ie,ue,V){if(!ne(ue))throw new TypeError;return A(V)||(V=we(V)),M(re,ie,ue,V)}t("defineMetadata",R);function $(re,ie,ue){if(!ne(ie))throw new TypeError;return A(ue)||(ue=we(ue)),j(re,ie,ue)}t("hasMetadata",$);function T(re,ie,ue){if(!ne(ie))throw new TypeError;return A(ue)||(ue=we(ue)),F(re,ie,ue)}t("hasOwnMetadata",T);function P(re,ie,ue){if(!ne(ie))throw new TypeError;return A(ue)||(ue=we(ue)),q(re,ie,ue)}t("getMetadata",P);function L(re,ie,ue){if(!ne(ie))throw new TypeError;return A(ue)||(ue=we(ue)),U(re,ie,ue)}t("getOwnMetadata",L);function z(re,ie){if(!ne(re))throw new TypeError;return A(ie)||(ie=we(ie)),G(re,ie)}t("getMetadataKeys",z);function B(re,ie){if(!ne(re))throw new TypeError;return A(ie)||(ie=we(ie)),K(re,ie)}t("getOwnMetadataKeys",B);function X(re,ie,ue){if(!ne(ie))throw new TypeError;if(A(ue)||(ue=we(ue)),!ne(ie))throw new TypeError;A(ue)||(ue=we(ue));var V=ct(ie,ue,!1);return A(V)?!1:V.OrdinaryDeleteMetadata(re,ie,ue)}t("deleteMetadata",X);function Y(re,ie){for(var ue=re.length-1;ue>=0;--ue){var V=re[ue],pe=V(ie);if(!A(pe)&&!J(pe)){if(!je(pe))throw new TypeError;ie=pe}}return ie}function N(re,ie,ue,V){for(var pe=re.length-1;pe>=0;--pe){var _e=re[pe],De=_e(ie,ue,V);if(!A(De)&&!J(De)){if(!ne(De))throw new TypeError;V=De}}return V}function j(re,ie,ue){var V=F(re,ie,ue);if(V)return!0;var pe=Ue(ie);return J(pe)?!1:j(re,pe,ue)}function F(re,ie,ue){var V=ct(ie,ue,!1);return A(V)?!1:se(V.OrdinaryHasOwnMetadata(re,ie,ue))}function q(re,ie,ue){var V=F(re,ie,ue);if(V)return U(re,ie,ue);var pe=Ue(ie);if(!J(pe))return q(re,pe,ue)}function U(re,ie,ue){var V=ct(ie,ue,!1);if(!A(V))return V.OrdinaryGetOwnMetadata(re,ie,ue)}function M(re,ie,ue,V){var pe=ct(ue,V,!0);pe.OrdinaryDefineOwnMetadata(re,ie,ue,V)}function G(re,ie){var ue=K(re,ie),V=Ue(re);if(V===null)return ue;var pe=G(V,ie);if(pe.length<=0)return ue;if(ue.length<=0)return pe;for(var _e=new m,De=[],fe=0,he=ue;fe<he.length;fe++){var me=he[fe],Ce=_e.has(me);Ce||(_e.add(me),De.push(me))}for(var Te=0,Xe=pe;Te<Xe.length;Te++){var me=Xe[Te],Ce=_e.has(me);Ce||(_e.add(me),De.push(me))}return De}function K(re,ie){var ue=ct(re,ie,!1);return ue?ue.OrdinaryOwnMetadataKeys(re,ie):[]}function D(re){if(re===null)return 1;switch(typeof re){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return re===null?1:6;default:return 6}}function A(re){return re===void 0}function J(re){return re===null}function Z(re){return typeof re=="symbol"}function ne(re){return typeof re=="object"?re!==null:typeof re=="function"}function W(re,ie){switch(D(re)){case 0:return re;case 1:return re;case 2:return re;case 3:return re;case 4:return re;case 5:return re}var ue="string",V=Ne(re,o);if(V!==void 0){var pe=V.call(re,ue);if(ne(pe))throw new TypeError;return pe}return ve(re)}function ve(re,ie){var ue,V,pe;{var _e=re.toString;if(Oe(_e)){var V=_e.call(re);if(!ne(V))return V}var ue=re.valueOf;if(Oe(ue)){var V=ue.call(re);if(!ne(V))return V}}throw new TypeError}function se(re){return!!re}function Ee(re){return""+re}function we(re){var ie=W(re);return Z(ie)?ie:Ee(ie)}function Me(re){return Array.isArray?Array.isArray(re):re instanceof Object?re instanceof Array:Object.prototype.toString.call(re)==="[object Array]"}function Oe(re){return typeof re=="function"}function je(re){return typeof re=="function"}function Ae(re){switch(D(re)){case 3:return!0;case 4:return!0;default:return!1}}function $e(re,ie){return re===ie||re!==re&&ie!==ie}function Ne(re,ie){var ue=re[ie];if(ue!=null){if(!Oe(ue))throw new TypeError;return ue}}function Ie(re){var ie=Ne(re,s);if(!Oe(ie))throw new TypeError;var ue=ie.call(re);if(!ne(ue))throw new TypeError;return ue}function Ke(re){return re.value}function nt(re){var ie=re.next();return ie.done?!1:ie}function ze(re){var ie=re.return;ie&&ie.call(re)}function Ue(re){var ie=Object.getPrototypeOf(re);if(typeof re!="function"||re===g||ie!==g)return ie;var ue=re.prototype,V=ue&&Object.getPrototypeOf(ue);if(V==null||V===Object.prototype)return ie;var pe=V.constructor;return typeof pe!="function"||pe===re?ie:pe}function Qe(){var re;!A(b)&&typeof r.Reflect<"u"&&!(b in r.Reflect)&&typeof r.Reflect.defineMetadata=="function"&&(re=Ge(r.Reflect));var ie,ue,V,pe=new y,_e={registerProvider:De,getProvider:he,setProvider:Ce};return _e;function De(Te){if(!Object.isExtensible(_e))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case re===Te:break;case A(ie):ie=Te;break;case ie===Te:break;case A(ue):ue=Te;break;case ue===Te:break;default:V===void 0&&(V=new m),V.add(Te);break}}function fe(Te,Xe){if(!A(ie)){if(ie.isProviderFor(Te,Xe))return ie;if(!A(ue)){if(ue.isProviderFor(Te,Xe))return ie;if(!A(V))for(var it=Ie(V);;){var Je=nt(it);if(!Je)return;var ot=Ke(Je);if(ot.isProviderFor(Te,Xe))return ze(it),ot}}}if(!A(re)&&re.isProviderFor(Te,Xe))return re}function he(Te,Xe){var it=pe.get(Te),Je;return A(it)||(Je=it.get(Xe)),A(Je)&&(Je=fe(Te,Xe),A(Je)||(A(it)&&(it=new h,pe.set(Te,it)),it.set(Xe,Je))),Je}function me(Te){if(A(Te))throw new TypeError;return ie===Te||ue===Te||!A(V)&&V.has(Te)}function Ce(Te,Xe,it){if(!me(it))throw new Error("Metadata provider not registered.");var Je=he(Te,Xe);if(Je!==it){if(!A(Je))return!1;var ot=pe.get(Te);A(ot)&&(ot=new h,pe.set(Te,ot)),ot.set(Xe,it)}return!0}}function Ve(){var re;return!A(b)&&ne(r.Reflect)&&Object.isExtensible(r.Reflect)&&(re=r.Reflect[b]),A(re)&&(re=Qe()),!A(b)&&ne(r.Reflect)&&Object.isExtensible(r.Reflect)&&Object.defineProperty(r.Reflect,b,{enumerable:!1,configurable:!1,writable:!1,value:re}),re}function ye(re){var ie=new y,ue={isProviderFor:function(me,Ce){var Te=ie.get(me);return A(Te)?!1:Te.has(Ce)},OrdinaryDefineOwnMetadata:De,OrdinaryHasOwnMetadata:pe,OrdinaryGetOwnMetadata:_e,OrdinaryOwnMetadataKeys:fe,OrdinaryDeleteMetadata:he};return S.registerProvider(ue),ue;function V(me,Ce,Te){var Xe=ie.get(me),it=!1;if(A(Xe)){if(!Te)return;Xe=new h,ie.set(me,Xe),it=!0}var Je=Xe.get(Ce);if(A(Je)){if(!Te)return;if(Je=new h,Xe.set(Ce,Je),!re.setProvider(me,Ce,ue))throw Xe.delete(Ce),it&&ie.delete(me),new Error("Wrong provider for target.")}return Je}function pe(me,Ce,Te){var Xe=V(Ce,Te,!1);return A(Xe)?!1:se(Xe.has(me))}function _e(me,Ce,Te){var Xe=V(Ce,Te,!1);if(!A(Xe))return Xe.get(me)}function De(me,Ce,Te,Xe){var it=V(Te,Xe,!0);it.set(me,Ce)}function fe(me,Ce){var Te=[],Xe=V(me,Ce,!1);if(A(Xe))return Te;for(var it=Xe.keys(),Je=Ie(it),ot=0;;){var zr=nt(Je);if(!zr)return Te.length=ot,Te;var ft=Ke(zr);try{Te[ot]=ft}catch(pt){try{ze(Je)}finally{throw pt}}ot++}}function he(me,Ce,Te){var Xe=V(Ce,Te,!1);if(A(Xe)||!Xe.delete(me))return!1;if(Xe.size===0){var it=ie.get(Ce);A(it)||(it.delete(Te),it.size===0&&ie.delete(it))}return!0}}function Ge(re){var ie=re.defineMetadata,ue=re.hasOwnMetadata,V=re.getOwnMetadata,pe=re.getOwnMetadataKeys,_e=re.deleteMetadata,De=new y,fe={isProviderFor:function(he,me){var Ce=De.get(he);return!A(Ce)&&Ce.has(me)?!0:pe(he,me).length?(A(Ce)&&(Ce=new m,De.set(he,Ce)),Ce.add(me),!0):!1},OrdinaryDefineOwnMetadata:ie,OrdinaryHasOwnMetadata:ue,OrdinaryGetOwnMetadata:V,OrdinaryOwnMetadataKeys:pe,OrdinaryDeleteMetadata:_e};return fe}function ct(re,ie,ue){var V=S.getProvider(re,ie);if(!A(V))return V;if(ue){if(S.setProvider(re,ie,_))return _;throw new Error("Illegal state.")}}function Lt(){var re={},ie=[],ue=(function(){function fe(he,me,Ce){this._index=0,this._keys=he,this._values=me,this._selector=Ce}return fe.prototype["@@iterator"]=function(){return this},fe.prototype[s]=function(){return this},fe.prototype.next=function(){var he=this._index;if(he>=0&&he<this._keys.length){var me=this._selector(this._keys[he],this._values[he]);return he+1>=this._keys.length?(this._index=-1,this._keys=ie,this._values=ie):this._index++,{value:me,done:!1}}return{value:void 0,done:!0}},fe.prototype.throw=function(he){throw this._index>=0&&(this._index=-1,this._keys=ie,this._values=ie),he},fe.prototype.return=function(he){return this._index>=0&&(this._index=-1,this._keys=ie,this._values=ie),{value:he,done:!0}},fe})(),V=(function(){function fe(){this._keys=[],this._values=[],this._cacheKey=re,this._cacheIndex=-2}return Object.defineProperty(fe.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),fe.prototype.has=function(he){return this._find(he,!1)>=0},fe.prototype.get=function(he){var me=this._find(he,!1);return me>=0?this._values[me]:void 0},fe.prototype.set=function(he,me){var Ce=this._find(he,!0);return this._values[Ce]=me,this},fe.prototype.delete=function(he){var me=this._find(he,!1);if(me>=0){for(var Ce=this._keys.length,Te=me+1;Te<Ce;Te++)this._keys[Te-1]=this._keys[Te],this._values[Te-1]=this._values[Te];return this._keys.length--,this._values.length--,$e(he,this._cacheKey)&&(this._cacheKey=re,this._cacheIndex=-2),!0}return!1},fe.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=re,this._cacheIndex=-2},fe.prototype.keys=function(){return new ue(this._keys,this._values,pe)},fe.prototype.values=function(){return new ue(this._keys,this._values,_e)},fe.prototype.entries=function(){return new ue(this._keys,this._values,De)},fe.prototype["@@iterator"]=function(){return this.entries()},fe.prototype[s]=function(){return this.entries()},fe.prototype._find=function(he,me){if(!$e(this._cacheKey,he)){this._cacheIndex=-1;for(var Ce=0;Ce<this._keys.length;Ce++)if($e(this._keys[Ce],he)){this._cacheIndex=Ce;break}}return this._cacheIndex<0&&me&&(this._cacheIndex=this._keys.length,this._keys.push(he),this._values.push(void 0)),this._cacheIndex},fe})();return V;function pe(fe,he){return fe}function _e(fe,he){return he}function De(fe,he){return[fe,he]}}function ht(){var re=(function(){function ie(){this._map=new h}return Object.defineProperty(ie.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),ie.prototype.has=function(ue){return this._map.has(ue)},ie.prototype.add=function(ue){return this._map.set(ue,ue),this},ie.prototype.delete=function(ue){return this._map.delete(ue)},ie.prototype.clear=function(){this._map.clear()},ie.prototype.keys=function(){return this._map.keys()},ie.prototype.values=function(){return this._map.keys()},ie.prototype.entries=function(){return this._map.entries()},ie.prototype["@@iterator"]=function(){return this.keys()},ie.prototype[s]=function(){return this.keys()},ie})();return re}function Kt(){var re=16,ie=p.create(),ue=V();return(function(){function he(){this._key=V()}return he.prototype.has=function(me){var Ce=pe(me,!1);return Ce!==void 0?p.has(Ce,this._key):!1},he.prototype.get=function(me){var Ce=pe(me,!1);return Ce!==void 0?p.get(Ce,this._key):void 0},he.prototype.set=function(me,Ce){var Te=pe(me,!0);return Te[this._key]=Ce,this},he.prototype.delete=function(me){var Ce=pe(me,!1);return Ce!==void 0?delete Ce[this._key]:!1},he.prototype.clear=function(){this._key=V()},he})();function V(){var he;do he="@@WeakMap@@"+fe();while(p.has(ie,he));return ie[he]=!0,he}function pe(he,me){if(!n.call(he,ue)){if(!me)return;Object.defineProperty(he,ue,{value:p.create()})}return he[ue]}function _e(he,me){for(var Ce=0;Ce<me;++Ce)he[Ce]=Math.random()*255|0;return he}function De(he){if(typeof Uint8Array=="function"){var me=new Uint8Array(he);return typeof crypto<"u"?crypto.getRandomValues(me):typeof msCrypto<"u"?msCrypto.getRandomValues(me):_e(me,he),me}return _e(new Array(he),he)}function fe(){var he=De(re);he[6]=he[6]&79|64,he[8]=he[8]&191|128;for(var me="",Ce=0;Ce<re;++Ce){var Te=he[Ce];(Ce===4||Ce===6||Ce===8)&&(me+="-"),Te<16&&(me+="0"),me+=Te.toString(16).toLowerCase()}return me}}function Ft(re){return re.__=void 0,delete re.__,re}})})(RE||(RE={}));let iN=class{cla;ins;p1;p2;data;constructor(t,r,n,i,o){this.cla=t,this.ins=r,this.p1=n,this.p2=i,this.data=o??new Uint8Array}getRawApdu(){const t=Uint8Array.from([this.cla,this.ins,this.p1,this.p2,this.data.length]),r=new Uint8Array(t.length+this.data.length);return r.set(t,0),this.data.length>0&&r.set(this.data,t.length),r}};function OE(e){if(e.startsWith("0x")&&(e=e.slice(2)),e.length===0)return new Uint8Array;if(e.length%2!==0&&(e="0"+e),/^[0-9a-fA-F]*$/.test(e)===!1)return null;const t=e.match(/.{1,2}/g)?.map(r=>parseInt(r,16));return!t||t.some(isNaN)?null:new Uint8Array(t)}function Zo(e,t=!0){return`${t?"0x":""}${Array.from(e,r=>r.toString(16).padStart(2,"0")).join("")}`}let dv=class{_tag="ValueOverflow";originalError;message;constructor(t,r=OT){this.message=`Value overflow for ${t}, max is ${r}`}},id=class{_tag="DataOverflow";message;originalError;constructor(t,r=0){this.message=r===0?`this.data is already full (value: ${t})`:`this.data will overflow with "${t}", remaining bytes: ${r}`}},$E=class{_tag="HexaString";message;originalError;constructor(t){this.message=`Invalid encoded hexa string or length is null: ${t}`}};const oN=4294967295;let aN=class{constructor(t=oN){this.maxPayloadSize=t}data=new Uint8Array;errors=[];build=()=>this.data;tryBuild=()=>this.hasErrors()?void 0:this.data;add8BitUIntToData=t=>this.addNumberToData(t,8n,!1,!1);add16BitUIntToData=(t,r=!0)=>this.addNumberToData(t,16n,!1,r);add32BitUIntToData=(t,r=!0)=>this.addNumberToData(t,32n,!1,r);add64BitUIntToData=(t,r=!0)=>this.addNumberToData(t,64n,!1,r);add128BitUIntToData=(t,r=!0)=>this.addNumberToData(t,128n,!1,r);add256BitUIntToData=(t,r=!0)=>this.addNumberToData(t,256n,!1,r);add16BitIntToData=(t,r=!0)=>this.addNumberToData(t,16n,!0,r);add32BitIntToData=(t,r=!0)=>this.addNumberToData(t,32n,!0,r);add64BitIntToData=(t,r=!0)=>this.addNumberToData(t,64n,!0,r);add128BitIntToData=(t,r=!0)=>this.addNumberToData(t,128n,!0,r);add256BitIntToData=(t,r=!0)=>this.addNumberToData(t,256n,!0,r);addBufferToData=t=>this.hasEnoughLengthRemaining(t)?(this.data=Uint8Array.from([...this.data,...t]),this):(this.errors.push(new id(t.toString())),this);addHexaStringToData=t=>{const r=OE(t);return r===null||r.length===0?(this.errors.push(new $E(t)),this):(this.addBufferToData(r),this)};addAsciiStringToData=t=>{const r=new TextEncoder().encode(t);return this.addBufferToData(r),this};encodeInLVFromHexa=t=>{const r=OE(t);return r===null||r.length===0?(this.errors.push(new $E(t)),this):this.hasEnoughLengthRemaining(r,!0)?(this.add8BitUIntToData(r.length),this.addBufferToData(r),this):(this.errors.push(new id(t)),this)};encodeInLVFromBuffer=t=>this.hasEnoughLengthRemaining(t,!0)?(this.add8BitUIntToData(t.length),this.addBufferToData(t),this):(this.errors.push(new id(t.toString())),this);encodeInLVFromAscii=t=>this.hasEnoughLengthRemaining(t,!0)?(this.add8BitUIntToData(t.length),this.addAsciiStringToData(t),this):(this.errors.push(new id(t)),this);encodeInTLVFromAscii=(t,r)=>(this.add8BitUIntToData(t),this.encodeInLVFromAscii(r));encodeInTLVFromHexa=(t,r)=>(this.add8BitUIntToData(t),this.encodeInLVFromHexa(r));encodeInTLVFromBuffer=(t,r)=>(this.add8BitUIntToData(t),this.encodeInLVFromBuffer(r));encodeInTLVFromUInt8=(t,r)=>(this.add8BitUIntToData(t),this.add8BitUIntToData(1),this.add8BitUIntToData(r));encodeInTLVFromUInt16=(t,r,n=!0)=>(this.add8BitUIntToData(t),this.add8BitUIntToData(2),this.add16BitUIntToData(r,n));encodeInTLVFromUInt32=(t,r,n=!0)=>(this.add8BitUIntToData(t),this.add8BitUIntToData(4),this.add32BitUIntToData(r,n));encodeInTLVFromUInt64=(t,r,n=!0)=>(this.add8BitUIntToData(t),this.add8BitUIntToData(8),this.add64BitUIntToData(r,n));getAvailablePayloadLength=()=>this.maxPayloadSize-this.data.length;getErrors=()=>this.errors;hasErrors=()=>this.errors.length!==0;hasEnoughLengthRemaining=(t,r=!1)=>this.data.length+t.length+(r?1:0)<=this.maxPayloadSize;addNumberToData(t,r,n,i){let o=this.checkBoundsAndConvert(t,r,n);if(o===void 0)return this;const s=Number(r)/8,u=new Uint8Array(s);if(i)for(let c=s-1;c>=0;c--)u[c]=Number(o&0xffn),o>>=8n;else for(let c=0;c<s;c++)u[c]=Number(o&0xffn),o>>=8n;return this.addBufferToData(u)}checkBoundsAndConvert(t,r,n){if(typeof t=="number"){if(!Number.isInteger(t)||t>Number.MAX_SAFE_INTEGER){this.errors.push(new dv(t.toString()));return}t=BigInt(t)}if(n){const i=1n<<r-1n;if(t>=i||t<-i){this.errors.push(new dv(t.toString(),i-1n));return}if(t<0n){const o=(1n<<r)-1n;t=-t,t=(~t&o)+1n}}else{const i=1n<<r;if(t<0||t>=i){this.errors.push(new dv(t.toString(),i-1n));return}}return t}};const OT=255;let $T=class{_ins;_cla;_p1;p2;data=new aN(OT);constructor({ins:t,cla:r,p1:n,p2:i}){this._cla=r&255,this._ins=t&255,this._p1=n&255,this.p2=i&255}build=()=>new iN(this._cla,this._ins,this._p1,this.p2,this.data.build());add8BitUIntToData=t=>(this.data.add8BitUIntToData(t),this);add16BitUIntToData=t=>(this.data.add16BitUIntToData(t),this);add32BitUIntToData=t=>(this.data.add32BitUIntToData(t),this);add64BitUIntToData=(t,r=!0)=>(this.data.add64BitUIntToData(t,r),this);addBufferToData=t=>(this.data.addBufferToData(t),this);addHexaStringToData=t=>(this.data.addHexaStringToData(t),this);addAsciiStringToData=t=>(this.data.addAsciiStringToData(t),this);encodeInLVFromHexa=t=>(this.data.encodeInLVFromHexa(t),this);encodeInLVFromBuffer=t=>(this.data.encodeInLVFromBuffer(t),this);encodeInLVFromAscii=t=>(this.data.encodeInLVFromAscii(t),this);getAvailablePayloadLength=()=>this.data.getAvailablePayloadLength();getErrors=()=>this.data.getErrors()},sN=class{constructor(t){this.buffer=t}index=0;testMinimalLength(t){return t<=this.buffer.length-this.index}extract8BitUInt(){if(!this.outOfRange(1))return this.buffer[this.index++]}extract16BitUInt(t=!0){const r=this.extractNumber(16n,!1,t);return r===void 0?void 0:Number(r)}extract16BitInt(t=!0){const r=this.extractNumber(16n,!0,t);return r===void 0?void 0:Number(r)}extract32BitUInt(t=!0){const r=this.extractNumber(32n,!1,t);return r===void 0?void 0:Number(r)}extract32BitInt(t=!0){const r=this.extractNumber(32n,!0,t);return r===void 0?void 0:Number(r)}extract64BitUInt(t=!0){return this.extractNumber(64n,!1,t)}extract64BitInt(t=!0){return this.extractNumber(64n,!0,t)}extract128BitUInt(t=!0){return this.extractNumber(128n,!1,t)}extract128BitInt(t=!0){return this.extractNumber(128n,!0,t)}extract256BitUInt(t=!0){return this.extractNumber(256n,!1,t)}extract256BitInt(t=!0){return this.extractNumber(256n,!0,t)}extractFieldByLength(t){if(this.outOfRange(t))return;if(t===0)return new Uint8Array;const r=this.buffer.slice(this.index,this.index+t);return this.index+=t,r}extractFieldLVEncoded(){const t=this.extract8BitUInt();if(t===void 0)return;if(t===0)return new Uint8Array;const r=this.extractFieldByLength(t);return r===void 0&&this.index--,r}extractFieldTLVEncoded(){if(this.outOfRange(2))return;const t=this.index,r=this.extract8BitUInt(),n=this.extractFieldLVEncoded();if(r===void 0||n===void 0){this.index--;return}const i=this.index;return{tag:r,value:n,tlv:this.buffer.slice(t,i)}}encodeToHexaString(t,r=!1){if(t===void 0||t.length===0)return"";const n=Zo(t);return r?n:n.slice(2)}encodeToString(t){let r="",n=0;if(!t)return r;for(;n<=t.length;){const i=t[n];i&&(r+=String.fromCharCode(i)),n++}return r}getCurrentIndex(){return this.index}resetIndex(){this.index=0}getUnparsedRemainingLength(){return this.buffer.length-this.index}outOfRange(t){return this.index+t>this.buffer.length}extractNumber(t,r,n){const i=Number(t)/8;if(this.outOfRange(i))return;let o=0n;if(n)for(let s=0;s<i;s++)o=o<<8n|BigInt(this.buffer[s+this.index]);else for(let s=i-1;s>=0;s--)o=o<<8n|BigInt(this.buffer[s+this.index]);if(r){const s=1n<<t-1n;o&s&&(o-=s<<1n)}return this.index+=i,o}},y1=class{parser;constructor(t){this.parser=new sN(t.data)}testMinimalLength=t=>this.parser.testMinimalLength(t);extract8BitUInt=()=>this.parser.extract8BitUInt();extract16BitUInt=()=>this.parser.extract16BitUInt();extract32BitUInt=()=>this.parser.extract32BitUInt();extractFieldByLength=t=>this.parser.extractFieldByLength(t);extractFieldLVEncoded=()=>this.parser.extractFieldLVEncoded();extractFieldTLVEncoded=()=>this.parser.extractFieldTLVEncoded();encodeToHexaString(t,r=!1){return r?this.parser.encodeToHexaString(t,!0):this.parser.encodeToHexaString(t,!1)}encodeToString=t=>this.parser.encodeToString(t);getUnparsedRemainingLength=()=>this.parser.getUnparsedRemainingLength()},lN=class{_tag="InvalidStatusWordError";originalError;constructor(t){this.originalError=new Error(t??"Invalid status word.")}},uN=class{_tag="InvalidResponseFormatError";originalError;constructor(t){this.originalError=new Error(t??"Invalid response format.")}};var cN=(e=>(e.Error="ERROR",e.Success="SUCCESS",e))(cN||{});function fN(e){return"error"in e&&e.error!==void 0}function TE(e){return fN(e)?{status:"ERROR",error:e.error}:{status:"SUCCESS",data:e.data}}function dN(e){return e.status==="SUCCESS"}function us({data:e,error:t}){return TE(t!==void 0?{error:t}:{data:e})}function pN(e){return dN(e)}let b1=class ul{static isValidStatusCode(t){return t.length===2}static isSuccessResponse({statusCode:t}){return ul.isValidStatusCode(t)?t[0]===144&&t[1]===0:!1}static isLockedDeviceResponse({statusCode:t}){return ul.isValidStatusCode(t)?t[0]===85&&t[1]===21||t[0]===105&&t[1]===130||t[0]===83&&t[1]===3:!1}static isRefusedByUser({statusCode:t}){return ul.isValidStatusCode(t)?t[0]===85&&t[1]===1||t[0]===105&&t[1]===133:!1}static isAppAlreadyInstalled({statusCode:t}){return ul.isValidStatusCode(t)?t[0]===106&&t[1]===128||t[0]===106&&t[1]===129||t[0]===106&&t[1]===142||t[0]===106&&t[1]===143:!1}static isOutOfMemory({statusCode:t}){return ul.isValidStatusCode(t)?t[0]===106&&t[1]===132||t[0]===106&&t[1]===133||t[0]===81&&t[1]===2||t[0]===81&&t[1]===3:!1}static isApduThatTriggersDisconnection(t){const r=new Map;return r.set("openApp",new Uint8Array([224,216,0,0])),r.set("closeApp",new Uint8Array([176,167,0,0])),Array.from(r.values()).some(n=>{for(let i=0;i<4;i++)if(n[i]!==t[i])return!1;return!0})}},hN=class{_tag;originalError;errorCode;message;constructor({tag:t,errorCode:r,originalError:n,message:i}){this._tag=t,this.originalError=n,this.errorCode=r,this.message=i??"An error occured during device exchange."}},gN=class{_tag="UnknownDeviceExchangeError";originalError;message;constructor(t){this.originalError=t,this.message="Unexpected device exchange error happened."}};const vN=(e,t)=>Object.keys(t).includes(e);let mN=class extends hN{constructor(t){super({tag:"GlobalCommandError",...t})}};const IE={5515:{message:"Device is locked.",tag:"DeviceLockedError"},5501:{message:"Action refused on device.",tag:"ActionRefusedError"},5502:{message:"Pin is not set",tag:"PinNotSetError"},5223:{message:"Device internal error",tag:"DeviceInternalError"},"6e00":{message:"CLA not supported",tag:"DeviceInternalError"},"6d00":{message:"INS not supported",tag:"DeviceInternalError"}};let TT=class{static handle(t){const r=new y1(t).encodeToHexaString(t.statusCode);return vN(r,IE)?new mN({...IE[r],errorCode:r}):new gN({message:"UnknownError",errorCode:r})}},AE=class{name="getAppAndVersion";args=void 0;getApdu(){const t={cla:176,ins:1,p1:0,p2:0};return new $T(t).build()}parseResponse(t){if(!b1.isSuccessResponse(t))return us({error:TT.handle(t)});const r=new y1(t);if(r.extract8BitUInt()!==1)return us({error:new uN("getAppAndVersion: format not supported")});const n=r.encodeToString(r.extractFieldLVEncoded()),i=r.encodeToString(r.extractFieldLVEncoded());if(r.getUnparsedRemainingLength()===0)return us({data:{name:n,version:i}});const o=r.extractFieldLVEncoded();return us({data:{name:n,version:i,flags:o}})}};var yN=(e=>(e[e.BATTERY_PERCENTAGE=0]="BATTERY_PERCENTAGE",e[e.BATTERY_VOLTAGE=1]="BATTERY_VOLTAGE",e[e.BATTERY_TEMPERATURE=2]="BATTERY_TEMPERATURE",e[e.BATTERY_CURRENT=3]="BATTERY_CURRENT",e[e.BATTERY_FLAGS=4]="BATTERY_FLAGS",e))(yN||{}),bN=(e=>(e[e.NONE=0]="NONE",e[e.USB=1]="USB",e[e.QI=2]="QI",e))(bN||{}),od={exports:{}},pv,kE;function kp(){if(kE)return pv;kE=1;const e="2.0.0",t=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,i=t-6;return pv={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},pv}var hv,PE;function Pp(){if(PE)return hv;PE=1;var e={};return hv=typeof process=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{},hv}var ME;function Rc(){return ME||(ME=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=kp(),o=Pp();t=e.exports={};const s=t.re=[],u=t.safeRe=[],c=t.src=[],f=t.safeSrc=[],p=t.t={};let g=0;const h="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",i],[h,n]],y=S=>{for(const[_,C]of m)S=S.split(`${_}*`).join(`${_}{0,${C}}`).split(`${_}+`).join(`${_}{1,${C}}`);return S},b=(S,_,C)=>{const O=y(_),R=g++;o(S,R,_),p[S]=R,c[R]=_,f[R]=O,s[R]=new RegExp(_,C?"g":void 0),u[R]=new RegExp(O,C?"g":void 0)};b("NUMERICIDENTIFIER","0|[1-9]\\d*"),b("NUMERICIDENTIFIERLOOSE","\\d+"),b("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),b("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})`),b("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})`),b("PRERELEASEIDENTIFIER",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIER]})`),b("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIERLOOSE]})`),b("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`),b("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`),b("BUILDIDENTIFIER",`${h}+`),b("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`),b("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`),b("FULL",`^${c[p.FULLPLAIN]}$`),b("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`),b("LOOSE",`^${c[p.LOOSEPLAIN]}$`),b("GTLT","((?:<|>)?=?)"),b("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),b("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`),b("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?)?)?`),b("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?)?)?`),b("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`),b("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`),b("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),b("COERCE",`${c[p.COERCEPLAIN]}(?:$|[^\\d])`),b("COERCEFULL",c[p.COERCEPLAIN]+`(?:${c[p.PRERELEASE]})?(?:${c[p.BUILD]})?(?:$|[^\\d])`),b("COERCERTL",c[p.COERCE],!0),b("COERCERTLFULL",c[p.COERCEFULL],!0),b("LONETILDE","(?:~>?)"),b("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",b("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`),b("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`),b("LONECARET","(?:\\^)"),b("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",b("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`),b("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`),b("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`),b("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`),b("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",b("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})\\s+-\\s+(${c[p.XRANGEPLAIN]})\\s*$`),b("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[p.XRANGEPLAINLOOSE]})\\s*$`),b("STAR","(<|>)?=?\\s*\\*"),b("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),b("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(od,od.exports)),od.exports}var gv,DE;function S1(){if(DE)return gv;DE=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return gv=n=>n?typeof n!="object"?e:n:t,gv}var vv,LE;function IT(){if(LE)return vv;LE=1;const e=/^[0-9]+$/,t=(n,i)=>{const o=e.test(n),s=e.test(i);return o&&s&&(n=+n,i=+i),n===i?0:o&&!s?-1:s&&!o?1:n<i?-1:1};return vv={compareIdentifiers:t,rcompareIdentifiers:(n,i)=>t(i,n)},vv}var mv,FE;function dn(){if(FE)return mv;FE=1;const e=Pp(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=kp(),{safeRe:n,t:i}=Rc(),o=S1(),{compareIdentifiers:s}=IT();class u{constructor(f,p){if(p=o(p),f instanceof u){if(f.loose===!!p.loose&&f.includePrerelease===!!p.includePrerelease)return f;f=f.version}else if(typeof f!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof f}".`);if(f.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",f,p),this.options=p,this.loose=!!p.loose,this.includePrerelease=!!p.includePrerelease;const g=f.trim().match(p.loose?n[i.LOOSE]:n[i.FULL]);if(!g)throw new TypeError(`Invalid Version: ${f}`);if(this.raw=f,this.major=+g[1],this.minor=+g[2],this.patch=+g[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");g[4]?this.prerelease=g[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){const m=+h;if(m>=0&&m<r)return m}return h}):this.prerelease=[],this.build=g[5]?g[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(f){if(e("SemVer.compare",this.version,this.options,f),!(f instanceof u)){if(typeof f=="string"&&f===this.version)return 0;f=new u(f,this.options)}return f.version===this.version?0:this.compareMain(f)||this.comparePre(f)}compareMain(f){return f instanceof u||(f=new u(f,this.options)),s(this.major,f.major)||s(this.minor,f.minor)||s(this.patch,f.patch)}comparePre(f){if(f instanceof u||(f=new u(f,this.options)),this.prerelease.length&&!f.prerelease.length)return-1;if(!this.prerelease.length&&f.prerelease.length)return 1;if(!this.prerelease.length&&!f.prerelease.length)return 0;let p=0;do{const g=this.prerelease[p],h=f.prerelease[p];if(e("prerelease compare",p,g,h),g===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(g===void 0)return-1;if(g===h)continue;return s(g,h)}while(++p)}compareBuild(f){f instanceof u||(f=new u(f,this.options));let p=0;do{const g=this.build[p],h=f.build[p];if(e("build compare",p,g,h),g===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(g===void 0)return-1;if(g===h)continue;return s(g,h)}while(++p)}inc(f,p,g){if(f.startsWith("pre")){if(!p&&g===!1)throw new Error("invalid increment argument: identifier is empty");if(p){const h=`-${p}`.match(this.options.loose?n[i.PRERELEASELOOSE]:n[i.PRERELEASE]);if(!h||h[1]!==p)throw new Error(`invalid identifier: ${p}`)}}switch(f){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",p,g);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",p,g);break;case"prepatch":this.prerelease.length=0,this.inc("patch",p,g),this.inc("pre",p,g);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",p,g),this.inc("pre",p,g);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const h=Number(g)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let m=this.prerelease.length;for(;--m>=0;)typeof this.prerelease[m]=="number"&&(this.prerelease[m]++,m=-2);if(m===-1){if(p===this.prerelease.join(".")&&g===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(p){let m=[p,h];g===!1&&(m=[p]),s(this.prerelease[0],p)===0?isNaN(this.prerelease[1])&&(this.prerelease=m):this.prerelease=m}break}default:throw new Error(`invalid increment argument: ${f}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return mv=u,mv}var yv,NE;function Hl(){if(NE)return yv;NE=1;const e=dn();return yv=(r,n,i=!1)=>{if(r instanceof e)return r;try{return new e(r,n)}catch(o){if(!i)return null;throw o}},yv}var bv,jE;function SN(){if(jE)return bv;jE=1;const e=Hl();return bv=(r,n)=>{const i=e(r,n);return i?i.version:null},bv}var Sv,zE;function wN(){if(zE)return Sv;zE=1;const e=Hl();return Sv=(r,n)=>{const i=e(r.trim().replace(/^[=v]+/,""),n);return i?i.version:null},Sv}var wv,BE;function xN(){if(BE)return wv;BE=1;const e=dn();return wv=(r,n,i,o,s)=>{typeof i=="string"&&(s=o,o=i,i=void 0);try{return new e(r instanceof e?r.version:r,i).inc(n,o,s).version}catch{return null}},wv}var xv,VE;function EN(){if(VE)return xv;VE=1;const e=Hl();return xv=(r,n)=>{const i=e(r,null,!0),o=e(n,null,!0),s=i.compare(o);if(s===0)return null;const u=s>0,c=u?i:o,f=u?o:i,p=!!c.prerelease.length;if(!!f.prerelease.length&&!p){if(!f.patch&&!f.minor)return"major";if(f.compareMain(c)===0)return f.minor&&!f.patch?"minor":"patch"}const h=p?"pre":"";return i.major!==o.major?h+"major":i.minor!==o.minor?h+"minor":i.patch!==o.patch?h+"patch":"prerelease"},xv}var Ev,HE;function CN(){if(HE)return Ev;HE=1;const e=dn();return Ev=(r,n)=>new e(r,n).major,Ev}var Cv,UE;function _N(){if(UE)return Cv;UE=1;const e=dn();return Cv=(r,n)=>new e(r,n).minor,Cv}var _v,WE;function RN(){if(WE)return _v;WE=1;const e=dn();return _v=(r,n)=>new e(r,n).patch,_v}var Rv,GE;function ON(){if(GE)return Rv;GE=1;const e=Hl();return Rv=(r,n)=>{const i=e(r,n);return i&&i.prerelease.length?i.prerelease:null},Rv}var Ov,qE;function to(){if(qE)return Ov;qE=1;const e=dn();return Ov=(r,n,i)=>new e(r,i).compare(new e(n,i)),Ov}var $v,XE;function $N(){if(XE)return $v;XE=1;const e=to();return $v=(r,n,i)=>e(n,r,i),$v}var Tv,KE;function TN(){if(KE)return Tv;KE=1;const e=to();return Tv=(r,n)=>e(r,n,!0),Tv}var Iv,YE;function w1(){if(YE)return Iv;YE=1;const e=dn();return Iv=(r,n,i)=>{const o=new e(r,i),s=new e(n,i);return o.compare(s)||o.compareBuild(s)},Iv}var Av,QE;function IN(){if(QE)return Av;QE=1;const e=w1();return Av=(r,n)=>r.sort((i,o)=>e(i,o,n)),Av}var kv,JE;function AN(){if(JE)return kv;JE=1;const e=w1();return kv=(r,n)=>r.sort((i,o)=>e(o,i,n)),kv}var Pv,ZE;function Mp(){if(ZE)return Pv;ZE=1;const e=to();return Pv=(r,n,i)=>e(r,n,i)>0,Pv}var Mv,eC;function x1(){if(eC)return Mv;eC=1;const e=to();return Mv=(r,n,i)=>e(r,n,i)<0,Mv}var Dv,tC;function AT(){if(tC)return Dv;tC=1;const e=to();return Dv=(r,n,i)=>e(r,n,i)===0,Dv}var Lv,rC;function kT(){if(rC)return Lv;rC=1;const e=to();return Lv=(r,n,i)=>e(r,n,i)!==0,Lv}var Fv,nC;function E1(){if(nC)return Fv;nC=1;const e=to();return Fv=(r,n,i)=>e(r,n,i)>=0,Fv}var Nv,iC;function C1(){if(iC)return Nv;iC=1;const e=to();return Nv=(r,n,i)=>e(r,n,i)<=0,Nv}var jv,oC;function PT(){if(oC)return jv;oC=1;const e=AT(),t=kT(),r=Mp(),n=E1(),i=x1(),o=C1();return jv=(u,c,f,p)=>{switch(c){case"===":return typeof u=="object"&&(u=u.version),typeof f=="object"&&(f=f.version),u===f;case"!==":return typeof u=="object"&&(u=u.version),typeof f=="object"&&(f=f.version),u!==f;case"":case"=":case"==":return e(u,f,p);case"!=":return t(u,f,p);case">":return r(u,f,p);case">=":return n(u,f,p);case"<":return i(u,f,p);case"<=":return o(u,f,p);default:throw new TypeError(`Invalid operator: ${c}`)}},jv}var zv,aC;function kN(){if(aC)return zv;aC=1;const e=dn(),t=Hl(),{safeRe:r,t:n}=Rc();return zv=(o,s)=>{if(o instanceof e)return o;if(typeof o=="number"&&(o=String(o)),typeof o!="string")return null;s=s||{};let u=null;if(!s.rtl)u=o.match(s.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const m=s.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let y;for(;(y=m.exec(o))&&(!u||u.index+u[0].length!==o.length);)(!u||y.index+y[0].length!==u.index+u[0].length)&&(u=y),m.lastIndex=y.index+y[1].length+y[2].length;m.lastIndex=-1}if(u===null)return null;const c=u[2],f=u[3]||"0",p=u[4]||"0",g=s.includePrerelease&&u[5]?`-${u[5]}`:"",h=s.includePrerelease&&u[6]?`+${u[6]}`:"";return t(`${c}.${f}.${p}${g}${h}`,s)},zv}var Bv,sC;function PN(){if(sC)return Bv;sC=1;class e{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const o=this.map.keys().next().value;this.delete(o)}this.map.set(r,n)}return this}}return Bv=e,Bv}var Vv,lC;function ro(){if(lC)return Vv;lC=1;const e=/\s+/g;class t{constructor(F,q){if(q=i(q),F instanceof t)return F.loose===!!q.loose&&F.includePrerelease===!!q.includePrerelease?F:new t(F.raw,q);if(F instanceof o)return this.raw=F.value,this.set=[[F]],this.formatted=void 0,this;if(this.options=q,this.loose=!!q.loose,this.includePrerelease=!!q.includePrerelease,this.raw=F.trim().replace(e," "),this.set=this.raw.split("||").map(U=>this.parseRange(U.trim())).filter(U=>U.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const U=this.set[0];if(this.set=this.set.filter(M=>!b(M[0])),this.set.length===0)this.set=[U];else if(this.set.length>1){for(const M of this.set)if(M.length===1&&S(M[0])){this.set=[M];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let F=0;F<this.set.length;F++){F>0&&(this.formatted+="||");const q=this.set[F];for(let U=0;U<q.length;U++)U>0&&(this.formatted+=" "),this.formatted+=q[U].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(F){const U=((this.options.includePrerelease&&m)|(this.options.loose&&y))+":"+F,M=n.get(U);if(M)return M;const G=this.options.loose,K=G?c[f.HYPHENRANGELOOSE]:c[f.HYPHENRANGE];F=F.replace(K,Y(this.options.includePrerelease)),s("hyphen replace",F),F=F.replace(c[f.COMPARATORTRIM],p),s("comparator trim",F),F=F.replace(c[f.TILDETRIM],g),s("tilde trim",F),F=F.replace(c[f.CARETTRIM],h),s("caret trim",F);let D=F.split(" ").map(ne=>C(ne,this.options)).join(" ").split(/\s+/).map(ne=>X(ne,this.options));G&&(D=D.filter(ne=>(s("loose invalid filter",ne,this.options),!!ne.match(c[f.COMPARATORLOOSE])))),s("range list",D);const A=new Map,J=D.map(ne=>new o(ne,this.options));for(const ne of J){if(b(ne))return[ne];A.set(ne.value,ne)}A.size>1&&A.has("")&&A.delete("");const Z=[...A.values()];return n.set(U,Z),Z}intersects(F,q){if(!(F instanceof t))throw new TypeError("a Range is required");return this.set.some(U=>_(U,q)&&F.set.some(M=>_(M,q)&&U.every(G=>M.every(K=>G.intersects(K,q)))))}test(F){if(!F)return!1;if(typeof F=="string")try{F=new u(F,this.options)}catch{return!1}for(let q=0;q<this.set.length;q++)if(N(this.set[q],F,this.options))return!0;return!1}}Vv=t;const r=PN(),n=new r,i=S1(),o=Dp(),s=Pp(),u=dn(),{safeRe:c,t:f,comparatorTrimReplace:p,tildeTrimReplace:g,caretTrimReplace:h}=Rc(),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:y}=kp(),b=j=>j.value==="<0.0.0-0",S=j=>j.value==="",_=(j,F)=>{let q=!0;const U=j.slice();let M=U.pop();for(;q&&U.length;)q=U.every(G=>M.intersects(G,F)),M=U.pop();return q},C=(j,F)=>(s("comp",j,F),j=T(j,F),s("caret",j),j=R(j,F),s("tildes",j),j=L(j,F),s("xrange",j),j=B(j,F),s("stars",j),j),O=j=>!j||j.toLowerCase()==="x"||j==="*",R=(j,F)=>j.trim().split(/\s+/).map(q=>$(q,F)).join(" "),$=(j,F)=>{const q=F.loose?c[f.TILDELOOSE]:c[f.TILDE];return j.replace(q,(U,M,G,K,D)=>{s("tilde",j,U,M,G,K,D);let A;return O(M)?A="":O(G)?A=`>=${M}.0.0 <${+M+1}.0.0-0`:O(K)?A=`>=${M}.${G}.0 <${M}.${+G+1}.0-0`:D?(s("replaceTilde pr",D),A=`>=${M}.${G}.${K}-${D} <${M}.${+G+1}.0-0`):A=`>=${M}.${G}.${K} <${M}.${+G+1}.0-0`,s("tilde return",A),A})},T=(j,F)=>j.trim().split(/\s+/).map(q=>P(q,F)).join(" "),P=(j,F)=>{s("caret",j,F);const q=F.loose?c[f.CARETLOOSE]:c[f.CARET],U=F.includePrerelease?"-0":"";return j.replace(q,(M,G,K,D,A)=>{s("caret",j,M,G,K,D,A);let J;return O(G)?J="":O(K)?J=`>=${G}.0.0${U} <${+G+1}.0.0-0`:O(D)?G==="0"?J=`>=${G}.${K}.0${U} <${G}.${+K+1}.0-0`:J=`>=${G}.${K}.0${U} <${+G+1}.0.0-0`:A?(s("replaceCaret pr",A),G==="0"?K==="0"?J=`>=${G}.${K}.${D}-${A} <${G}.${K}.${+D+1}-0`:J=`>=${G}.${K}.${D}-${A} <${G}.${+K+1}.0-0`:J=`>=${G}.${K}.${D}-${A} <${+G+1}.0.0-0`):(s("no pr"),G==="0"?K==="0"?J=`>=${G}.${K}.${D}${U} <${G}.${K}.${+D+1}-0`:J=`>=${G}.${K}.${D}${U} <${G}.${+K+1}.0-0`:J=`>=${G}.${K}.${D} <${+G+1}.0.0-0`),s("caret return",J),J})},L=(j,F)=>(s("replaceXRanges",j,F),j.split(/\s+/).map(q=>z(q,F)).join(" ")),z=(j,F)=>{j=j.trim();const q=F.loose?c[f.XRANGELOOSE]:c[f.XRANGE];return j.replace(q,(U,M,G,K,D,A)=>{s("xRange",j,U,M,G,K,D,A);const J=O(G),Z=J||O(K),ne=Z||O(D),W=ne;return M==="="&&W&&(M=""),A=F.includePrerelease?"-0":"",J?M===">"||M==="<"?U="<0.0.0-0":U="*":M&&W?(Z&&(K=0),D=0,M===">"?(M=">=",Z?(G=+G+1,K=0,D=0):(K=+K+1,D=0)):M==="<="&&(M="<",Z?G=+G+1:K=+K+1),M==="<"&&(A="-0"),U=`${M+G}.${K}.${D}${A}`):Z?U=`>=${G}.0.0${A} <${+G+1}.0.0-0`:ne&&(U=`>=${G}.${K}.0${A} <${G}.${+K+1}.0-0`),s("xRange return",U),U})},B=(j,F)=>(s("replaceStars",j,F),j.trim().replace(c[f.STAR],"")),X=(j,F)=>(s("replaceGTE0",j,F),j.trim().replace(c[F.includePrerelease?f.GTE0PRE:f.GTE0],"")),Y=j=>(F,q,U,M,G,K,D,A,J,Z,ne,W)=>(O(U)?q="":O(M)?q=`>=${U}.0.0${j?"-0":""}`:O(G)?q=`>=${U}.${M}.0${j?"-0":""}`:K?q=`>=${q}`:q=`>=${q}${j?"-0":""}`,O(J)?A="":O(Z)?A=`<${+J+1}.0.0-0`:O(ne)?A=`<${J}.${+Z+1}.0-0`:W?A=`<=${J}.${Z}.${ne}-${W}`:j?A=`<${J}.${Z}.${+ne+1}-0`:A=`<=${A}`,`${q} ${A}`.trim()),N=(j,F,q)=>{for(let U=0;U<j.length;U++)if(!j[U].test(F))return!1;if(F.prerelease.length&&!q.includePrerelease){for(let U=0;U<j.length;U++)if(s(j[U].semver),j[U].semver!==o.ANY&&j[U].semver.prerelease.length>0){const M=j[U].semver;if(M.major===F.major&&M.minor===F.minor&&M.patch===F.patch)return!0}return!1}return!0};return Vv}var Hv,uC;function Dp(){if(uC)return Hv;uC=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(p,g){if(g=r(g),p instanceof t){if(p.loose===!!g.loose)return p;p=p.value}p=p.trim().split(/\s+/).join(" "),s("comparator",p,g),this.options=g,this.loose=!!g.loose,this.parse(p),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(p){const g=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],h=p.match(g);if(!h)throw new TypeError(`Invalid comparator: ${p}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=""),h[2]?this.semver=new u(h[2],this.options.loose):this.semver=e}toString(){return this.value}test(p){if(s("Comparator.test",p,this.options.loose),this.semver===e||p===e)return!0;if(typeof p=="string")try{p=new u(p,this.options)}catch{return!1}return o(p,this.operator,this.semver,this.options)}intersects(p,g){if(!(p instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(p.value,g).test(this.value):p.operator===""?p.value===""?!0:new c(this.value,g).test(p.semver):(g=r(g),g.includePrerelease&&(this.value==="<0.0.0-0"||p.value==="<0.0.0-0")||!g.includePrerelease&&(this.value.startsWith("<0.0.0")||p.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&p.operator.startsWith(">")||this.operator.startsWith("<")&&p.operator.startsWith("<")||this.semver.version===p.semver.version&&this.operator.includes("=")&&p.operator.includes("=")||o(this.semver,"<",p.semver,g)&&this.operator.startsWith(">")&&p.operator.startsWith("<")||o(this.semver,">",p.semver,g)&&this.operator.startsWith("<")&&p.operator.startsWith(">")))}}Hv=t;const r=S1(),{safeRe:n,t:i}=Rc(),o=PT(),s=Pp(),u=dn(),c=ro();return Hv}var Uv,cC;function Lp(){if(cC)return Uv;cC=1;const e=ro();return Uv=(r,n,i)=>{try{n=new e(n,i)}catch{return!1}return n.test(r)},Uv}var Wv,fC;function MN(){if(fC)return Wv;fC=1;const e=ro();return Wv=(r,n)=>new e(r,n).set.map(i=>i.map(o=>o.value).join(" ").trim().split(" ")),Wv}var Gv,dC;function DN(){if(dC)return Gv;dC=1;const e=dn(),t=ro();return Gv=(n,i,o)=>{let s=null,u=null,c=null;try{c=new t(i,o)}catch{return null}return n.forEach(f=>{c.test(f)&&(!s||u.compare(f)===-1)&&(s=f,u=new e(s,o))}),s},Gv}var qv,pC;function LN(){if(pC)return qv;pC=1;const e=dn(),t=ro();return qv=(n,i,o)=>{let s=null,u=null,c=null;try{c=new t(i,o)}catch{return null}return n.forEach(f=>{c.test(f)&&(!s||u.compare(f)===1)&&(s=f,u=new e(s,o))}),s},qv}var Xv,hC;function FN(){if(hC)return Xv;hC=1;const e=dn(),t=ro(),r=Mp();return Xv=(i,o)=>{i=new t(i,o);let s=new e("0.0.0");if(i.test(s)||(s=new e("0.0.0-0"),i.test(s)))return s;s=null;for(let u=0;u<i.set.length;++u){const c=i.set[u];let f=null;c.forEach(p=>{const g=new e(p.semver.version);switch(p.operator){case">":g.prerelease.length===0?g.patch++:g.prerelease.push(0),g.raw=g.format();case"":case">=":(!f||r(g,f))&&(f=g);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),f&&(!s||r(s,f))&&(s=f)}return s&&i.test(s)?s:null},Xv}var Kv,gC;function NN(){if(gC)return Kv;gC=1;const e=ro();return Kv=(r,n)=>{try{return new e(r,n).range||"*"}catch{return null}},Kv}var Yv,vC;function _1(){if(vC)return Yv;vC=1;const e=dn(),t=Dp(),{ANY:r}=t,n=ro(),i=Lp(),o=Mp(),s=x1(),u=C1(),c=E1();return Yv=(p,g,h,m)=>{p=new e(p,m),g=new n(g,m);let y,b,S,_,C;switch(h){case">":y=o,b=u,S=s,_=">",C=">=";break;case"<":y=s,b=c,S=o,_="<",C="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(p,g,m))return!1;for(let O=0;O<g.set.length;++O){const R=g.set[O];let $=null,T=null;if(R.forEach(P=>{P.semver===r&&(P=new t(">=0.0.0")),$=$||P,T=T||P,y(P.semver,$.semver,m)?$=P:S(P.semver,T.semver,m)&&(T=P)}),$.operator===_||$.operator===C||(!T.operator||T.operator===_)&&b(p,T.semver))return!1;if(T.operator===C&&S(p,T.semver))return!1}return!0},Yv}var Qv,mC;function jN(){if(mC)return Qv;mC=1;const e=_1();return Qv=(r,n,i)=>e(r,n,">",i),Qv}var Jv,yC;function zN(){if(yC)return Jv;yC=1;const e=_1();return Jv=(r,n,i)=>e(r,n,"<",i),Jv}var Zv,bC;function BN(){if(bC)return Zv;bC=1;const e=ro();return Zv=(r,n,i)=>(r=new e(r,i),n=new e(n,i),r.intersects(n,i)),Zv}var em,SC;function VN(){if(SC)return em;SC=1;const e=Lp(),t=to();return em=(r,n,i)=>{const o=[];let s=null,u=null;const c=r.sort((h,m)=>t(h,m,i));for(const h of c)e(h,n,i)?(u=h,s||(s=h)):(u&&o.push([s,u]),u=null,s=null);s&&o.push([s,null]);const f=[];for(const[h,m]of o)h===m?f.push(h):!m&&h===c[0]?f.push("*"):m?h===c[0]?f.push(`<=${m}`):f.push(`${h} - ${m}`):f.push(`>=${h}`);const p=f.join(" || "),g=typeof n.raw=="string"?n.raw:String(n);return p.length<g.length?p:n},em}var tm,wC;function HN(){if(wC)return tm;wC=1;const e=ro(),t=Dp(),{ANY:r}=t,n=Lp(),i=to(),o=(g,h,m={})=>{if(g===h)return!0;g=new e(g,m),h=new e(h,m);let y=!1;e:for(const b of g.set){for(const S of h.set){const _=c(b,S,m);if(y=y||_!==null,_)continue e}if(y)return!1}return!0},s=[new t(">=0.0.0-0")],u=[new t(">=0.0.0")],c=(g,h,m)=>{if(g===h)return!0;if(g.length===1&&g[0].semver===r){if(h.length===1&&h[0].semver===r)return!0;m.includePrerelease?g=s:g=u}if(h.length===1&&h[0].semver===r){if(m.includePrerelease)return!0;h=u}const y=new Set;let b,S;for(const L of g)L.operator===">"||L.operator===">="?b=f(b,L,m):L.operator==="<"||L.operator==="<="?S=p(S,L,m):y.add(L.semver);if(y.size>1)return null;let _;if(b&&S){if(_=i(b.semver,S.semver,m),_>0)return null;if(_===0&&(b.operator!==">="||S.operator!=="<="))return null}for(const L of y){if(b&&!n(L,String(b),m)||S&&!n(L,String(S),m))return null;for(const z of h)if(!n(L,String(z),m))return!1;return!0}let C,O,R,$,T=S&&!m.includePrerelease&&S.semver.prerelease.length?S.semver:!1,P=b&&!m.includePrerelease&&b.semver.prerelease.length?b.semver:!1;T&&T.prerelease.length===1&&S.operator==="<"&&T.prerelease[0]===0&&(T=!1);for(const L of h){if($=$||L.operator===">"||L.operator===">=",R=R||L.operator==="<"||L.operator==="<=",b){if(P&&L.semver.prerelease&&L.semver.prerelease.length&&L.semver.major===P.major&&L.semver.minor===P.minor&&L.semver.patch===P.patch&&(P=!1),L.operator===">"||L.operator===">="){if(C=f(b,L,m),C===L&&C!==b)return!1}else if(b.operator===">="&&!n(b.semver,String(L),m))return!1}if(S){if(T&&L.semver.prerelease&&L.semver.prerelease.length&&L.semver.major===T.major&&L.semver.minor===T.minor&&L.semver.patch===T.patch&&(T=!1),L.operator==="<"||L.operator==="<="){if(O=p(S,L,m),O===L&&O!==S)return!1}else if(S.operator==="<="&&!n(S.semver,String(L),m))return!1}if(!L.operator&&(S||b)&&_!==0)return!1}return!(b&&R&&!S&&_!==0||S&&$&&!b&&_!==0||P||T)},f=(g,h,m)=>{if(!g)return h;const y=i(g.semver,h.semver,m);return y>0?g:y<0||h.operator===">"&&g.operator===">="?h:g},p=(g,h,m)=>{if(!g)return h;const y=i(g.semver,h.semver,m);return y<0?g:y>0||h.operator==="<"&&g.operator==="<="?h:g};return tm=o,tm}var rm,xC;function UN(){if(xC)return rm;xC=1;const e=Rc(),t=kp(),r=dn(),n=IT(),i=Hl(),o=SN(),s=wN(),u=xN(),c=EN(),f=CN(),p=_N(),g=RN(),h=ON(),m=to(),y=$N(),b=TN(),S=w1(),_=IN(),C=AN(),O=Mp(),R=x1(),$=AT(),T=kT(),P=E1(),L=C1(),z=PT(),B=kN(),X=Dp(),Y=ro(),N=Lp(),j=MN(),F=DN(),q=LN(),U=FN(),M=NN(),G=_1(),K=jN(),D=zN(),A=BN(),J=VN(),Z=HN();return rm={parse:i,valid:o,clean:s,inc:u,diff:c,major:f,minor:p,patch:g,prerelease:h,compare:m,rcompare:y,compareLoose:b,compareBuild:S,sort:_,rsort:C,gt:O,lt:R,eq:$,neq:T,gte:P,lte:L,cmp:z,coerce:B,Comparator:X,Range:Y,satisfies:N,toComparators:j,maxSatisfying:F,minSatisfying:q,minVersion:U,validRange:M,outside:G,gtr:K,ltr:D,intersects:A,simplifyRange:J,subset:Z,SemVer:r,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},rm}var Hn=UN();const EC=Nr(Hn);var Xt=(e=>(e.NANO_S="nanoS",e.NANO_SP="nanoSP",e.NANO_X="nanoX",e.STAX="stax",e.FLEX="flex",e.APEX="apexp",e))(Xt||{});let MT=class{id;model;name;constructor({id:t,model:r,name:n}){this.id=t,this.model=r,this.name=n}};const nm={Twelve:12,Eighteen:18,TwentyFour:24};var br=(e=>(e.Unknown="unknown",e.WelcomeScreen1="welcome-screen-1",e.WelcomeScreen2="welcome-screen-2",e.WelcomeScreen3="welcome-screen-3",e.WelcomeScreen4="welcome-screen-4",e.WelcomeScreenReminder="welcome-screen-reminder",e.SetupChoice="setup-choice",e.Pin="pin",e.NewDevice="new-device",e.ConfirmNewDevice="confirm-new-device",e.RestoreRecoveryPhrase="restore-recovery-phrase",e.SafetyWarning="safety-warning",e.DeviceIsReady="device-is-ready",e.ChooseName="choose-name",e.RestoreRecoverBackup="restore-recover-backup",e.SetupRestoreChoice="setup-restore-choice",e.OnboardingStatusCheck="onboarding-status-check",e.RestoreWithRk="restore-with-rk",e))(br||{});const WN={0:br.WelcomeScreen1,1:br.WelcomeScreen2,2:br.WelcomeScreen3,3:br.WelcomeScreen4,4:br.WelcomeScreenReminder,5:br.SetupChoice,6:br.Pin,7:br.NewDevice,8:br.ConfirmNewDevice,9:br.RestoreRecoveryPhrase,10:br.SafetyWarning,11:br.DeviceIsReady,12:br.ChooseName,13:br.RestoreRecoverBackup,14:br.SetupRestoreChoice,15:br.OnboardingStatusCheck,16:br.RestoreWithRk};let GN=class{seFlags;constructor(t){this.seFlags=new Uint8Array(4),this.seFlags.set(t.subarray(0,this.seFlags.length))}generalDeviceState(){const t=this.seFlags[0]??0;return{isPinValidated:this._checkNthBitInByte(t,1),hasMcuSerialNumber:this._checkNthBitInByte(t,2),hasValidCertificate:this._checkNthBitInByte(t,3),isCustomAuthorityConnectionAllowed:this._checkNthBitInByte(t,4),isSecureConnectionAllowed:this._checkNthBitInByte(t,5),isOnboarded:this._checkNthBitInByte(t,6),isMcuCodeSigned:this._checkNthBitInByte(t,7),isInRecoveryMode:this._checkNthBitInByte(t,8)}}endorsementInformation(){const t=this.seFlags[1]??0;return{hasEndorsementCertificateInSlot1:(t&1)!==0,hasEndorsementCertificateInSlot2:(t&2)!==0}}wordsInformation(){const t=this.seFlags[2]??0,r=t>>5&3;return{numberOfWords:[nm.TwentyFour,nm.Eighteen,nm.Twelve,void 0][r],currentWordIndex:t&31}}onboardingStatus(){const t=this.seFlags[3]??0;return{onboardingState:WN[t]??br.Unknown}}_checkNthBitInByte(t,r){return(t>>8-r&1)===1}},qN=class{name="getOsVersion";args=void 0;getApdu(){const t={cla:224,ins:1,p1:0,p2:0};return new $T(t).build()}parseResponse(t,r){if(!b1.isSuccessResponse(t))return us({error:TT.handle(t)});const n=new y1(t),i=n.extract32BitUInt();if(i===void 0)return us({error:new lN("Missing target ID in OS version")});let o=n.encodeToString(n.extractFieldLVEncoded()),s=n.extractFieldLVEncoded()??new Uint8Array(0);const u=new GN(s),c={...u.generalDeviceState(),...u.endorsementInformation(),...u.wordsInformation(),...u.onboardingStatus()};o||(o="0.0.0",s=new Uint8Array);const f=(i&4026531840)!==805306368,p=o.includes("-osu");let g="",h="",m="",y="",b,S,_,C;if(f){m=o,b=i;const O=n.extractFieldLVEncoded();O&&(O.length>=5?(g=n.encodeToString(O),S=parseInt(n.encodeToHexaString(n.extractFieldLVEncoded()),16)):S=parseInt(n.encodeToHexaString(O),16))}else{if(g=o,S=i,h=n.encodeToString(n.extractFieldLVEncoded()),this.isBootloaderVersionSupported(g,r)&&(m=n.encodeToString(n.extractFieldLVEncoded())),this.isHardwareVersionSupported(g,r)?y=n.encodeToHexaString(n.extractFieldLVEncoded()):y="00",this.isLocalizationSupported(g,r)){const O=n.extractFieldLVEncoded();O!==void 0&&(_=parseInt(n.encodeToHexaString(O),16))}if(this.isRecoverSupported(g,r)){const O=n.extractFieldLVEncoded();O!==void 0&&(C=parseInt(n.encodeToHexaString(O),16))}}return us({data:{isBootloader:f,isOsu:p,targetId:i,seTargetId:S,mcuTargetId:b,seVersion:g,seFlags:s,mcuSephVersion:h,mcuBootloaderVersion:m,hwVersion:y,langId:_,recoverState:C,secureElementFlags:c}})}isBootloaderVersionSupported(t,r){const n=Hn.coerce(t)??"";switch(r){case Xt.NANO_S:case Xt.NANO_X:return Hn.gte(n,"2.0.0");default:return!0}}isHardwareVersionSupported(t,r){const n=Hn.coerce(t)??"";return r===Xt.NANO_X?Hn.gte(n,"2.0.0"):!1}isLocalizationSupported(t,r){const n=Hn.coerce(t)??"";switch(r){case Xt.NANO_S:return!1;case Xt.NANO_SP:return Hn.gte(n,"1.1.0");case Xt.NANO_X:return Hn.gte(n,"2.1.0");default:return!0}}isRecoverSupported(t,r){const n=Hn.coerce(t)??"";switch(r){case Xt.NANO_S:return!1;case Xt.NANO_SP:return Hn.gte(n,"1.1.2");case Xt.NANO_X:return Hn.gte(n,"2.2.3");case Xt.STAX:return Hn.gte(n,"1.4.0");case Xt.FLEX:return Hn.gte(n,"1.0.1");default:return!0}}};var ho=(e=>(e.LOCKED="LOCKED",e.BUSY="BUSY",e.CONNECTED="CONNECTED",e.NOT_CONNECTED="NOT CONNECTED",e))(ho||{}),XN=(e=>(e.NotStarted="not-started",e.Pending="pending",e.Stopped="stopped",e.Completed="completed",e.Error="error",e))(XN||{}),KN=(e=>(e.None="none",e.UnlockDevice="unlock-device",e.AllowSecureConnection="allow-secure-connection",e.ConfirmOpenApp="confirm-open-app",e.SignTransaction="sign-transaction",e.SignTypedData="sign-typed-data",e.AllowListApps="allow-list-apps",e.VerifyAddress="verify-address",e.SignPersonalMessage="sign-personal-message",e.SignDelegationAuthorization="sign-delegation-authorization",e.Web3ChecksOptIn="web3-checks-opt-in",e.VerifySafeAddress="verify-safe-address",e.RegisterWallet="register-wallet",e.ConfirmLoadImage="confirm-load-image",e.ConfirmCommitImage="confirm-commit-image",e.ConfirmRemoveImage="confirm-remove-image",e.GrantConsent="grant-consent",e.AllowInstallFirmware="allow-install-firmware",e))(KN||{});const _n={of(e){return Lr(e)},empty(){return Dt},zero(){return Dt},fromNullable(e){return e==null?Dt:Lr(e)},fromFalsy(e){return e?Lr(e):Dt},fromPredicate(e,t){return arguments.length===1?r=>_n.fromPredicate(e,r):e(t)?Lr(t):Dt},mapMaybe(e,t){return arguments.length===1?r=>_n.mapMaybe(e,r):_n.catMaybes(t.map(e))},catMaybes(e){let t=[];for(const r of e)r.isJust()&&t.push(r.extract());return t},encase(e){try{return Lr(e())}catch{return Dt}},isMaybe(e){return e instanceof R1||e instanceof O1},sequence(e){let t=[];for(const r of e)if(r.isJust())t.push(r.extract());else return Dt;return Lr(t)},"fantasy-land/of"(e){return this.of(e)},"fantasy-land/empty"(){return this.empty()},"fantasy-land/zero"(){return this.zero()}};class R1{constructor(t){this.__value=t,this["fantasy-land/equals"]=this.equals,this["fantasy-land/map"]=this.map,this["fantasy-land/ap"]=this.ap,this["fantasy-land/alt"]=this.alt,this["fantasy-land/chain"]=this.chain,this["fantasy-land/reduce"]=this.reduce,this["fantasy-land/extend"]=this.extend,this["fantasy-land/filter"]=this.filter}isJust(){return!0}isNothing(){return!1}inspect(){return`Just(${this.__value})`}toString(){return this.inspect()}toJSON(){const t=this.__value;return t instanceof Date?t.toJSON():t}equals(t){return this.extract()===t.extract()}map(t){return Lr(t(this.__value))}ap(t){return t.isJust()?this.map(t.extract()):Dt}alt(t){return this}altLazy(t){return this}chain(t){return t(this.__value)}chainNullable(t){return _n.fromNullable(t(this.__value))}join(){return this.__value}reduce(t,r){return t(r,this.__value)}extend(t){return Lr(t(this))}unsafeCoerce(){return this.__value}caseOf(t){return"_"in t?t._():t.Just(this.__value)}orDefault(t){return this.__value}orDefaultLazy(t){return this.__value}toList(){return[this.__value]}mapOrDefault(t,r){return t(this.__value)}extract(){return this.__value}extractNullable(){return this.__value}toEither(t){return nr(this.__value)}ifJust(t){return t(this.__value),this}ifNothing(t){return this}filter(t){return t(this.__value)?Lr(this.__value):Dt}}R1.prototype.constructor=_n;class O1{constructor(){this["fantasy-land/equals"]=this.equals,this["fantasy-land/map"]=this.map,this["fantasy-land/ap"]=this.ap,this["fantasy-land/alt"]=this.alt,this["fantasy-land/chain"]=this.chain,this["fantasy-land/reduce"]=this.reduce,this["fantasy-land/extend"]=this.extend,this["fantasy-land/filter"]=this.filter}isJust(){return!1}isNothing(){return!0}inspect(){return"Nothing"}toString(){return this.inspect()}toJSON(){return this.__value}equals(t){return this.extract()===t.extract()}map(t){return Dt}ap(t){return Dt}alt(t){return t}altLazy(t){return t()}chain(t){return Dt}chainNullable(t){return Dt}join(){return Dt}reduce(t,r){return r}extend(t){return Dt}unsafeCoerce(){throw new Error("Maybe#unsafeCoerce was ran on a Nothing")}caseOf(t){return"_"in t?t._():t.Nothing()}orDefault(t){return t}orDefaultLazy(t){return t()}toList(){return[]}mapOrDefault(t,r){return r}extract(){}extractNullable(){return null}toEither(t){return Wt(t)}ifJust(t){return this}ifNothing(t){return t(),this}filter(t){return Dt}}O1.prototype.constructor=_n;const Lr=e=>new R1(e),Dt=new O1,Rn={of(e){return nr(e)},lefts(e){let t=[];for(const r of e)r.isLeft()&&t.push(r.extract());return t},rights(e){let t=[];for(const r of e)r.isRight()&&t.push(r.extract());return t},encase(e){try{return nr(e())}catch(t){return Wt(t)}},sequence(e){let t=[];for(const r of e){if(r.isLeft())return r;t.push(r.extract())}return nr(t)},isEither(e){return e instanceof T1||e instanceof $1},"fantasy-land/of"(e){return Rn.of(e)}};class $1{constructor(t){this.__value=t,this._="R",this["fantasy-land/bimap"]=this.bimap,this["fantasy-land/map"]=this.map,this["fantasy-land/ap"]=this.ap,this["fantasy-land/equals"]=this.equals,this["fantasy-land/chain"]=this.chain,this["fantasy-land/alt"]=this.alt,this["fantasy-land/reduce"]=this.reduce,this["fantasy-land/extend"]=this.extend}isLeft(){return!1}isRight(){return!0}toJSON(){return this.__value}inspect(){return`Right(${this.__value})`}toString(){return this.inspect()}bimap(t,r){return nr(r(this.__value))}map(t){return nr(t(this.__value))}mapLeft(t){return this}ap(t){return t.isRight()?this.map(t.extract()):t}equals(t){return t.isRight()?this.__value===t.extract():!1}chain(t){return t(this.__value)}chainLeft(t){return this}join(){return this.__value}alt(t){return this}altLazy(t){return this}reduce(t,r){return t(r,this.__value)}extend(t){return nr(t(this))}unsafeCoerce(){return this.__value}caseOf(t){return"_"in t?t._():t.Right(this.__value)}leftOrDefault(t){return t}orDefault(t){return this.__value}orDefaultLazy(t){return this.__value}leftOrDefaultLazy(t){return t()}ifLeft(t){return this}ifRight(t){return t(this.__value),this}toMaybe(){return Lr(this.__value)}leftToMaybe(){return Dt}extract(){return this.__value}swap(){return Wt(this.__value)}}$1.prototype.constructor=Rn;class T1{constructor(t){this.__value=t,this._="L",this["fantasy-land/bimap"]=this.bimap,this["fantasy-land/map"]=this.map,this["fantasy-land/ap"]=this.ap,this["fantasy-land/equals"]=this.equals,this["fantasy-land/chain"]=this.chain,this["fantasy-land/alt"]=this.alt,this["fantasy-land/reduce"]=this.reduce,this["fantasy-land/extend"]=this.extend}isLeft(){return!0}isRight(){return!1}toJSON(){return this.__value}inspect(){return`Left(${JSON.stringify(this.__value)})`}toString(){return this.inspect()}bimap(t,r){return Wt(t(this.__value))}map(t){return this}mapLeft(t){return Wt(t(this.__value))}ap(t){return t.isLeft()?t:this}equals(t){return t.isLeft()?t.extract()===this.__value:!1}chain(t){return this}chainLeft(t){return t(this.__value)}join(){return this}alt(t){return t}altLazy(t){return t()}reduce(t,r){return r}extend(t){return this}unsafeCoerce(){throw this.__value instanceof Error?this.__value:new Error("Either#unsafeCoerce was ran on a Left")}caseOf(t){return"_"in t?t._():t.Left(this.__value)}leftOrDefault(t){return this.__value}orDefault(t){return t}orDefaultLazy(t){return t()}leftOrDefaultLazy(t){return this.__value}ifLeft(t){return t(this.__value),this}ifRight(t){return this}toMaybe(){return Dt}leftToMaybe(){return Lr(this.__value)}extract(){return this.__value}swap(){return nr(this.__value)}}T1.prototype.constructor=Rn;const Wt=e=>new T1(e),nr=e=>new $1(e),Oc=e=>e,YN=e=>e,im=Object.assign(YN,{fromArray:e=>im.isNonEmpty(e)?Lr(e):Dt,unsafeCoerce:e=>{if(im.isNonEmpty(e))return e;throw new Error("NonEmptyList#unsafeCoerce was ran on an empty array")},fromTuple:e=>im(e.toArray()),head:e=>e[0],last:e=>e[e.length-1],isNonEmpty:e=>e.length>0,tail:e=>e.slice(1)}),zd=(e,t)=>typeof t=="bigint"?t.toString():t,QN=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Es=(e,t)=>{let r="";switch(typeof t){case"undefined":r="undefined";break;case"object":r=t===null?"null":Array.isArray(t)?"an array with value "+JSON.stringify(t,zd):"an object with value "+JSON.stringify(t,zd);break;case"boolean":r="a boolean";break;case"symbol":r="a symbol";break;case"function":r="a function";break;case"bigint":r=`a bigint with value ${t.toString()}`}return r=r||`a ${typeof t} with value ${JSON.stringify(t,zd)}`,`Expected ${e}, but received ${r}`},JN=e=>(Object.keys(e).length===1&&e.oneOf?.length===1&&typeof e.oneOf[0]=="object"&&(Object.assign(e,e.oneOf[0]),delete e.oneOf),e),ZN=e=>{if(Array.isArray(e.oneOf))for(let t=0;t<e.oneOf.length;t++){const r=e.oneOf[t];if(typeof r=="object"&&r.oneOf)return e.oneOf.splice(t,1),e.oneOf.push(...r.oneOf),DT(e)}return e},DT=e=>(ZN(e),JN(e),e),xr={interface(e){const t=Object.keys(e),r=i=>{if(!QN(i))return Wt(Es("an object",i));const o={};for(const s of t){if(!i.hasOwnProperty(s)&&!e[s]._isOptional)return Wt(`Problem with property "${s}": it does not exist in received object ${JSON.stringify(i,zd)}`);const u=e[s].decode(i[s]);if(u.isLeft())return Wt(`Problem with the value of property "${s}": ${u.extract()}`);const c=u.extract();c!==void 0&&(o[s]=c)}return nr(o)};return{decode:r,encode:i=>{const o={};for(const s of t)o[s]=e[s].encode(i[s]);return o},unsafeDecode:i=>r(i).mapLeft(Error).unsafeCoerce(),schema:()=>t.reduce((i,o)=>(e[o]._isOptional||i.required.push(o),i.properties[o]=DT(e[o].schema()),i),{type:"object",properties:{},required:[]})}},custom({decode:e,encode:t,schema:r}){return{decode:e,encode:t,unsafeDecode:n=>e(n).mapLeft(Error).unsafeCoerce(),schema:r??(()=>({}))}}},kt=xr.custom({decode:e=>typeof e=="string"?nr(e):Wt(Es("a string",e)),encode:Oc,schema:()=>({type:"string"})}),_l=xr.custom({decode:e=>typeof e=="number"?nr(e):Wt(Es("a number",e)),encode:Oc,schema:()=>({type:"number"})}),e3=xr.custom({decode:e=>e===void 0?nr(e):Wt(Es("an undefined",e)),encode:Oc}),Sr=e=>({...t3([e,e3]),schema:e.schema,_isOptional:!0}),sp=xr.custom({decode:e=>typeof e=="boolean"?nr(e):Wt(Es("a boolean",e)),encode:Oc,schema:()=>({type:"boolean"})}),t3=e=>xr.custom({decode:t=>{let r=[];for(const n of e){const i=n.decode(t);if(i.isRight())return i;r.push(i.extract())}return Wt(`One of the following problems occured: ${r.map((n,i)=>`(${i}) ${n}`).join(", ")}`)},encode:t=>{for(const r of e)if(Rn.encase(()=>r.encode(t)).mapLeft(i=>"").chain(r.decode).isRight())return r.encode(t);return t},schema:()=>({oneOf:e.map(t=>t.schema())})}),Si=e=>xr.custom({decode:t=>{if(Array.isArray(t)){const r=[];for(let n=0;n<t.length;n++){const i=e.decode(t[n]);if(i.isRight())r.push(i.extract());else return Wt(`Problem with the value at index ${n}: ${i.extract()}`)}return nr(r)}else return Wt(Es("an array",t))},encode:t=>t.map(e.encode),schema:()=>({type:"array",items:e.schema()})});xr.custom({decode:e=>kt.decode(e).chain(t=>isFinite(+t)?nr(t):Wt(Es("a number",e))),encode:Oc,schema:_l.schema});var LT;const FT={liftEither(e){if(e.isRight())return Promise.resolve(e.extract());throw e.extract()},fromPromise(e){return e.then(FT.liftEither)},throwE(e){throw e}};class NT{constructor(t){this.runPromise=t,this[LT]="EitherAsync",this["fantasy-land/chain"]=this.chain,this["fantasy-land/alt"]=this.alt,this.then=(r,n)=>this.run().then(r,n)}leftOrDefault(t){return this.run().then(r=>r.leftOrDefault(t))}orDefault(t){return this.run().then(r=>r.orDefault(t))}join(){return dt(async t=>{const r=await this;if(r.isRight()){const n=await r.extract();return t.liftEither(n)}return t.liftEither(r)})}ap(t){return dt(async r=>{const n=await t;if(n.isRight()){const i=await this.run();return i.isRight()?n.extract()(i.extract()):r.liftEither(i)}return r.liftEither(n)})}alt(t){return dt(async r=>{const n=await this.run();if(n.isRight())return n.extract();{const i=await t;return r.liftEither(i)}})}extend(t){return dt(async r=>{const n=await this.run();if(n.isRight()){const i=dt.liftEither(n);return r.liftEither(nr(t(i)))}return r.liftEither(n)})}async run(){try{return nr(await this.runPromise(FT))}catch(t){return Wt(t)}}bimap(t,r){return dt(async n=>{const i=await this.run();try{return await n.liftEither(i.bimap(t,r))}catch(o){throw await o}})}map(t){return dt(r=>this.runPromise(r).then(t))}mapLeft(t){return dt(async r=>{try{return await this.runPromise(r)}catch(n){throw await t(n)}})}chain(t){return dt(async r=>{const n=await this.runPromise(r);return r.fromPromise(t(n))})}chainLeft(t){return dt(async r=>{try{return await this.runPromise(r)}catch(n){return r.fromPromise(t(n))}})}toMaybeAsync(){return sn(async({liftMaybe:t})=>{const r=await this.run();return t(r.toMaybe())})}swap(){return dt(async t=>{const r=await this.run();return r.isRight()&&t.throwE(r.extract()),t.liftEither(nr(r.extract()))})}ifLeft(t){return dt(async r=>{const n=await this.run();return n.ifLeft(t),r.liftEither(n)})}ifRight(t){return dt(async r=>{const n=await this.run();return n.ifRight(t),r.liftEither(n)})}void(){return this.map(t=>{})}caseOf(t){return this.run().then(r=>r.caseOf(t))}finally(t){return dt(({fromPromise:r})=>r(this.run().finally(t)))}}LT=Symbol.toStringTag;const dt=Object.assign(e=>new NT(e),{fromPromise:e=>dt(({fromPromise:t})=>t(e())),liftEither:e=>dt(({liftEither:t})=>t(e)),lefts:e=>Promise.all(e.map(t=>t.run())).then(Rn.lefts),rights:e=>Promise.all(e.map(t=>t.run())).then(Rn.rights),sequence:e=>dt(async t=>{let r=[];for await(const n of e){if(n.isLeft())return t.liftEither(n);r.push(n.extract())}return t.liftEither(nr(r))}),all:e=>dt.fromPromise(async()=>Promise.all(e).then(Rn.sequence))});NT.prototype.constructor=dt;var jT;const zT={liftMaybe(e){if(e.isJust())return Promise.resolve(e.extract());throw Dt},fromPromise(e){return e.then(zT.liftMaybe)}};class BT{constructor(t){this.runPromise=t,this[jT]="MaybeAsync",this["fantasy-land/chain"]=this.chain,this["fantasy-land/filter"]=this.filter,this["fantasy-land/alt"]=this.alt}orDefault(t){return this.run().then(r=>r.orDefault(t))}join(){return sn(async t=>{const r=await this.run();if(r.isJust()){const n=await r.extract();return t.liftMaybe(n)}return t.liftMaybe(Dt)})}ap(t){return sn(async r=>{const n=await t;if(n.isJust()){const i=await this.run();return i.isJust()?n.extract()(i.extract()):r.liftMaybe(Dt)}return r.liftMaybe(Dt)})}alt(t){return sn(async r=>{const n=await this.run();if(n.isJust())return n.extract();{const i=await t;return r.liftMaybe(i)}})}extend(t){return sn(async r=>{const n=await this.run();if(n.isJust()){const i=sn.liftMaybe(n);return r.liftMaybe(Lr(t(i)))}return r.liftMaybe(Dt)})}filter(t){return sn(async r=>{const n=await this.run();return r.liftMaybe(n.filter(t))})}async run(){try{return Lr(await this.runPromise(zT))}catch{return Dt}}map(t){return sn(r=>this.runPromise(r).then(t))}chain(t){return sn(async r=>{const n=await this.runPromise(r);return r.fromPromise(t(n))})}toEitherAsync(t){return dt(async({liftEither:r})=>{const n=await this.run();return r(n.toEither(t))})}ifJust(t){return sn(async r=>{const n=await this.run();return n.ifJust(t),r.liftMaybe(n)})}ifNothing(t){return sn(async r=>{const n=await this.run();return n.ifNothing(t),r.liftMaybe(n)})}void(){return this.map(t=>{})}caseOf(t){return this.run().then(r=>r.caseOf(t))}finally(t){return sn(({fromPromise:r})=>r(this.run().finally(t)))}then(t,r){return this.run().then(t,r)}}jT=Symbol.toStringTag;const sn=Object.assign(e=>new BT(e),{catMaybes:e=>Promise.all(e).then(_n.catMaybes),fromPromise:e=>sn(({fromPromise:t})=>t(e())),liftMaybe:e=>sn(({liftMaybe:t})=>t(e))});BT.prototype.constructor=sn;var H0=function(e,t){return H0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},H0(e,t)};function Eo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");H0(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function r3(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function u(p){try{f(n.next(p))}catch(g){s(g)}}function c(p){try{f(n.throw(p))}catch(g){s(g)}}function f(p){p.done?o(p.value):i(p.value).then(u,c)}f((n=n.apply(e,t||[])).next())})}function VT(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(f){return function(p){return c([f,p])}}function c(f){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,f[0]&&(r=0)),r;)try{if(n=1,i&&(o=f[0]&2?i.return:f[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,f[1])).done)return o;switch(i=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,i=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){r.label=f[1];break}if(f[0]===6&&r.label<o[1]){r.label=o[1],o=f;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(f);break}o[2]&&r.ops.pop(),r.trys.pop();continue}f=t.call(e,r)}catch(p){f=[6,p],i=0}finally{n=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function Rl(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ol(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function $l(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function Sl(e){return this instanceof Sl?(this.v=e,this):new Sl(e)}function n3(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(m){return function(y){return Promise.resolve(y).then(m,g)}}function u(m,y){n[m]&&(i[m]=function(b){return new Promise(function(S,_){o.push([m,b,S,_])>1||c(m,b)})},y&&(i[m]=y(i[m])))}function c(m,y){try{f(n[m](y))}catch(b){h(o[0][3],b)}}function f(m){m.value instanceof Sl?Promise.resolve(m.value.v).then(p,g):h(o[0][2],m)}function p(m){c("next",m)}function g(m){c("throw",m)}function h(m,y){m(y),o.shift(),o.length&&c(o[0][0],o[0][1])}}function i3(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Rl=="function"?Rl(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(s){return new Promise(function(u,c){s=e[o](s),i(u,c,s.done,s.value)})}}function i(o,s,u,c){Promise.resolve(c).then(function(f){o({value:f,done:u})},s)}}function cr(e){return typeof e=="function"}function Fp(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var om=Fp(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
454
454
  `+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
455
455
  `):"",this.name="UnsubscriptionError",this.errors=r}});function lp(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var $c=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var u=Rl(s),c=u.next();!c.done;c=u.next()){var f=c.value;f.remove(this)}}catch(b){t={error:b}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else s.remove(this);var p=this.initialTeardown;if(cr(p))try{p()}catch(b){o=b instanceof om?b.errors:[b]}var g=this._finalizers;if(g){this._finalizers=null;try{for(var h=Rl(g),m=h.next();!m.done;m=h.next()){var y=m.value;try{CC(y)}catch(b){o=o??[],b instanceof om?o=$l($l([],Ol(o)),Ol(b.errors)):o.push(b)}}}catch(b){n={error:b}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}}if(o)throw new om(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)CC(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&lp(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&lp(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),HT=$c.EMPTY;function UT(e){return e instanceof $c||e&&"closed"in e&&cr(e.remove)&&cr(e.add)&&cr(e.unsubscribe)}function CC(e){cr(e)?e():e.unsubscribe()}var o3={Promise:void 0},a3={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,$l([e,t],Ol(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function WT(e){a3.setTimeout(function(){throw e})}function U0(){}function Bd(e){e()}var I1=(function(e){Eo(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,UT(r)&&r.add(n)):n.destination=u3,n}return t.create=function(r,n,i){return new W0(r,n,i)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})($c),s3=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){ad(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){ad(n)}else ad(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){ad(r)}},e})(),W0=(function(e){Eo(t,e);function t(r,n,i){var o=e.call(this)||this,s;return cr(r)||!r?s={next:r??void 0,error:n??void 0,complete:i??void 0}:s=r,o.destination=new s3(s),o}return t})(I1);function ad(e){WT(e)}function l3(e){throw e}var u3={closed:!0,next:U0,error:l3,complete:U0},A1=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Tc(e){return e}function c3(e){return e.length===0?Tc:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}var Yn=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var i=this,o=d3(t)?t:new W0(t,r,n);return Bd(function(){var s=i,u=s.operator,c=s.source;o.add(u?u.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=_C(r),new r(function(i,o){var s=new W0({next:function(u){try{t(u)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});n.subscribe(s)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[A1]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return c3(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=_C(t),new t(function(n,i){var o;r.subscribe(function(s){return o=s},function(s){return i(s)},function(){return n(o)})})},e.create=function(t){return new e(t)},e})();function _C(e){var t;return(t=e??o3.Promise)!==null&&t!==void 0?t:Promise}function f3(e){return e&&cr(e.next)&&cr(e.error)&&cr(e.complete)}function d3(e){return e&&e instanceof I1||f3(e)&&UT(e)}function p3(e){return cr(e?.lift)}function Ti(e){return function(t){if(p3(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function eo(e,t,r,n,i){return new h3(e,t,r,n,i)}var h3=(function(e){Eo(t,e);function t(r,n,i,o,s,u){var c=e.call(this,r)||this;return c.onFinalize=s,c.shouldUnsubscribe=u,c._next=n?function(f){try{n(f)}catch(p){r.error(p)}}:e.prototype._next,c._error=o?function(f){try{o(f)}catch(p){r.error(p)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(f){r.error(f)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(I1),g3=Fp(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ul=(function(e){Eo(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new RC(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new g3},t.prototype.next=function(r){var n=this;Bd(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var s=Rl(n.currentObservers),u=s.next();!u.done;u=s.next()){var c=u.value;c.next(r)}}catch(f){i={error:f}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;Bd(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;Bd(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,i=this,o=i.hasError,s=i.isStopped,u=i.observers;return o||s?HT:(this.currentObservers=null,u.push(r),new $c(function(){n.currentObservers=null,lp(u,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,s=n.isStopped;i?r.error(o):s&&r.complete()},t.prototype.asObservable=function(){var r=new Yn;return r.source=this,r},t.create=function(r,n){return new RC(r,n)},t})(Yn),RC=(function(e){Eo(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:HT},t})(Ul),v3=(function(e){Eo(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,o=r._value;if(n)throw i;return this._throwIfClosed(),o},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t})(Ul),k1={now:function(){return(k1.delegate||Date).now()},delegate:void 0},GT=(function(e){Eo(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=k1);var o=e.call(this)||this;return o._bufferSize=r,o._windowTime=n,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,r),o._windowTime=Math.max(1,n),o}return t.prototype.next=function(r){var n=this,i=n.isStopped,o=n._buffer,s=n._infiniteTimeWindow,u=n._timestampProvider,c=n._windowTime;i||(o.push(r),!s&&o.push(u.now()+c)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,o=i._infiniteTimeWindow,s=i._buffer,u=s.slice(),c=0;c<u.length&&!r.closed;c+=o?1:2)r.next(u[c]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,o=r._buffer,s=r._infiniteTimeWindow,u=(s?1:2)*n;if(n<1/0&&u<o.length&&o.splice(0,o.length-u),!s){for(var c=i.now(),f=0,p=1;p<o.length&&o[p]<=c;p+=2)f=p;f&&o.splice(0,f+1)}},t})(Ul),m3=(function(e){Eo(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){return this},t})($c),OC={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setInterval.apply(void 0,$l([e,t],Ol(r)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},y3=(function(e){Eo(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return t.prototype.schedule=function(r,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var o=this.id,s=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(s,o,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(s,this.id,n),this},t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),OC.setInterval(r.flush.bind(r,this),i)},t.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&OC.clearInterval(n)},t.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,n){var i=!1,o;try{this.work(r)}catch(s){i=!0,o=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,lp(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(m3),$C=(function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=k1.now,e})(),b3=(function(e){Eo(t,e);function t(r,n){n===void 0&&(n=$C.now);var i=e.call(this,r,n)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,i){for(;r=n.shift();)r.unsubscribe();throw i}},t})($C),qT=new b3(y3),S3=qT,w3=new Yn(function(e){return e.complete()});function XT(e){return e&&cr(e.schedule)}function P1(e){return e[e.length-1]}function x3(e){return cr(P1(e))?e.pop():void 0}function Np(e){return XT(P1(e))?e.pop():void 0}function E3(e,t){return typeof P1(e)=="number"?e.pop():t}var KT=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function YT(e){return cr(e?.then)}function QT(e){return cr(e[A1])}function JT(e){return Symbol.asyncIterator&&cr(e?.[Symbol.asyncIterator])}function ZT(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function C3(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var e2=C3();function t2(e){return cr(e?.[e2])}function r2(e){return n3(this,arguments,function(){var r,n,i,o;return VT(this,function(s){switch(s.label){case 0:r=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,Sl(r.read())];case 3:return n=s.sent(),i=n.value,o=n.done,o?[4,Sl(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Sl(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function n2(e){return cr(e?.getReader)}function Ba(e){if(e instanceof Yn)return e;if(e!=null){if(QT(e))return _3(e);if(KT(e))return R3(e);if(YT(e))return O3(e);if(JT(e))return i2(e);if(t2(e))return $3(e);if(n2(e))return T3(e)}throw ZT(e)}function _3(e){return new Yn(function(t){var r=e[A1]();if(cr(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function R3(e){return new Yn(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function O3(e){return new Yn(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,WT)})}function $3(e){return new Yn(function(t){var r,n;try{for(var i=Rl(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(t.next(s),t.closed)return}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()})}function i2(e){return new Yn(function(t){I3(e,t).catch(function(r){return t.error(r)})})}function T3(e){return i2(r2(e))}function I3(e,t){var r,n,i,o;return r3(this,void 0,void 0,function(){var s,u;return VT(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=i3(e),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(s=n.value,t.next(s),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=c.sent(),i={error:u},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Da(e,t,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var o=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(o),!i)return o}function o2(e,t){return t===void 0&&(t=0),Ti(function(r,n){r.subscribe(eo(n,function(i){return Da(n,e,function(){return n.next(i)},t)},function(){return Da(n,e,function(){return n.complete()},t)},function(i){return Da(n,e,function(){return n.error(i)},t)}))})}function a2(e,t){return t===void 0&&(t=0),Ti(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function A3(e,t){return Ba(e).pipe(a2(t),o2(t))}function k3(e,t){return Ba(e).pipe(a2(t),o2(t))}function P3(e,t){return new Yn(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}function M3(e,t){return new Yn(function(r){var n;return Da(r,t,function(){n=e[e2](),Da(r,t,function(){var i,o,s;try{i=n.next(),o=i.value,s=i.done}catch(u){r.error(u);return}s?r.complete():r.next(o)},0,!0)}),function(){return cr(n?.return)&&n.return()}})}function s2(e,t){if(!e)throw new Error("Iterable cannot be null");return new Yn(function(r){Da(r,t,function(){var n=e[Symbol.asyncIterator]();Da(r,t,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}function D3(e,t){return s2(r2(e),t)}function L3(e,t){if(e!=null){if(QT(e))return A3(e,t);if(KT(e))return P3(e,t);if(YT(e))return k3(e,t);if(JT(e))return s2(e,t);if(t2(e))return M3(e,t);if(n2(e))return D3(e,t)}throw ZT(e)}function Tl(e,t){return t?L3(e,t):Ba(e)}function l2(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Np(e);return Tl(e,r)}var F3=Fp(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function TC(e,t){return new Promise(function(r,n){var i=!1,o;e.subscribe({next:function(s){o=s,i=!0},error:n,complete:function(){i?r(o):n(new F3)}})})}function u2(e){return e instanceof Date&&!isNaN(e)}var N3=Fp(function(e){return function(r){r===void 0&&(r=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r}});function IC(e,t){var r=u2(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,i=r.each,o=r.with,s=o===void 0?j3:o,u=r.scheduler,c=u===void 0?qT:u,f=r.meta,p=f===void 0?null:f;if(n==null&&i==null)throw new TypeError("No timeout provided.");return Ti(function(g,h){var m,y,b=null,S=0,_=function(C){y=Da(h,c,function(){try{m.unsubscribe(),Ba(s({meta:p,lastValue:b,seen:S})).subscribe(h)}catch(O){h.error(O)}},C)};m=g.subscribe(eo(h,function(C){y?.unsubscribe(),S++,h.next(b=C),i>0&&_(i)},void 0,void 0,function(){y?.closed||y?.unsubscribe(),b=null})),!S&&_(n!=null?typeof n=="number"?n:+n-c.now():i)})}function j3(e){throw new N3(e)}function La(e,t){return Ti(function(r,n){var i=0;r.subscribe(eo(n,function(o){n.next(e.call(t,o,i++))}))})}function z3(e,t,r,n,i,o,s,u){var c=[],f=0,p=0,g=!1,h=function(){g&&!c.length&&!f&&t.complete()},m=function(b){return f<n?y(b):c.push(b)},y=function(b){f++;var S=!1;Ba(r(b,p++)).subscribe(eo(t,function(_){t.next(_)},function(){S=!0},void 0,function(){if(S)try{f--;for(var _=function(){var C=c.shift();s||y(C)};c.length&&f<n;)_();h()}catch(C){t.error(C)}}))};return e.subscribe(eo(t,m,function(){g=!0,h()})),function(){}}function M1(e,t,r){return r===void 0&&(r=1/0),cr(t)?M1(function(n,i){return La(function(o,s){return t(n,o,i,s)})(Ba(e(n,i)))},r):(typeof t=="number"&&(r=t),Ti(function(n,i){return z3(n,i,e,r)}))}function c2(e){return e===void 0&&(e=1/0),M1(Tc,e)}function B3(){return c2(1)}function AC(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return B3()(Tl(e,Np(e)))}function V3(e,t,r){r===void 0&&(r=S3);var n=-1;return t!=null&&(XT(t)?r=t:n=t),new Yn(function(i){var o=u2(e)?+e-r.now():e;o<0&&(o=0);var s=0;return r.schedule(function(){i.closed||(i.next(s++),0<=n?this.schedule(void 0,n):i.complete())},o)})}function H3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Np(e),n=E3(e,1/0),i=e;return i.length?i.length===1?Ba(i[0]):c2(n)(Tl(i,r)):w3}function kC(e,t){return Ti(function(r,n){var i=0;r.subscribe(eo(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}function U3(e,t,r,n,i){return function(o,s){var u=r,c=t,f=0;o.subscribe(eo(s,function(p){var g=f++;c=u?e(c,p,g):(u=!0,p),s.next(c)},i))}}function W3(e,t){return t===void 0&&(t=Tc),e=e??G3,Ti(function(r,n){var i,o=!0;r.subscribe(eo(n,function(s){var u=t(s);(o||!e(i,u))&&(o=!1,i=u,n.next(s))}))})}function G3(e,t){return e===t}function q3(e){return Ti(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}function X3(e,t){return Ti(U3(e,t,arguments.length>=2,!0))}function K3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Np(e);return Ti(function(n,i){(r?AC(e,n,r):AC(e,n)).subscribe(i)})}function PC(e,t,r){var n=cr(e)||t||r?{next:e,error:t,complete:r}:e;return n?Ti(function(i,o){var s;(s=n.subscribe)===null||s===void 0||s.call(n);var u=!0;i.subscribe(eo(o,function(c){var f;(f=n.next)===null||f===void 0||f.call(n,c),o.next(c)},function(){var c;u=!1,(c=n.complete)===null||c===void 0||c.call(n),o.complete()},function(c){var f;u=!1,(f=n.error)===null||f===void 0||f.call(n,c),o.error(c)},function(){var c,f;u&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(f=n.finalize)===null||f===void 0||f.call(n)}))}):Tc}function Y3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=x3(e);return Ti(function(n,i){for(var o=e.length,s=new Array(o),u=e.map(function(){return!1}),c=!1,f=function(g){Ba(e[g]).subscribe(eo(i,function(h){s[g]=h,!c&&!u[g]&&(u[g]=!0,(c=u.every(Tc))&&(u=null))},U0))},p=0;p<o;p++)f(p);n.subscribe(eo(i,function(g){if(c){var h=$l([g],Ol(s));i.next(r?r.apply(void 0,$l([],Ol(h))):h)}}))})}var Il=(e=>(e[e.Connected=0]="Connected",e[e.ReadyWithoutSecureChannel=1]="ReadyWithoutSecureChannel",e[e.ReadyWithSecureChannel=2]="ReadyWithSecureChannel",e))(Il||{});let Ic=class{_tag="GeneralDmkError";originalError;constructor(t){t instanceof Error?this.originalError=t:t!==void 0&&(this.originalError=new Error(String(t)))}},D1=class extends Ic{constructor(t){super(t),this.err=t}_tag="TransportNotSupportedError"},Q3=class extends Ic{constructor(t){super(t),this.err=t}_tag="SendApduTimeoutError"},J3=class extends Ic{constructor(t){super(t),this.err=t}_tag="SendCommandTimeoutError"},Z3=class extends Ic{constructor(t){super(t),this.err=t}_tag="TransportAlreadyExistsError"},e4=class extends Ic{constructor(t){super(t),this.err=t}_tag="NoTransportProvidedError"};var cl=null;typeof WebSocket<"u"?cl=WebSocket:typeof MozWebSocket<"u"?cl=MozWebSocket:typeof self<"u"?cl=self.WebSocket||self.MozWebSocket:typeof window<"u"?cl=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(cl=self.WebSocket||self.MozWebSocket);const t4=cl;var r4=(e=>(e.GenuineCheck="GenuineCheck",e.ListInstalledApps="ListInstalledApps",e.UpdateMcu="UpdateMcu",e.UpdateFirmware="UpdateFirmware",e.InstallApp="InstallApp",e.UninstallApp="UninstallApp",e))(r4||{}),n4=(e=>(e.EXCHANGE="exchange",e.BULK="bulk",e.ERROR="error",e.WARNING="warning",e.SUCCESS="success",e))(n4||{}),i4=(e=>(e.SUCCESS="success",e.ERROR="error",e))(i4||{}),o4=(e=>(e.Opened="opened",e.Closed="closed",e.PermissionRequested="permission-requested",e.PermissionGranted="permission-granted",e.PreExchange="pre-exchange",e.Exchange="exchange",e.DeviceId="device-id",e.Progress="progress",e.Warning="warning",e.Error="error",e.Result="result",e))(o4||{}),a4=(e=>(e[e.AppAlreadyInstalled=0]="AppAlreadyInstalled",e[e.DeviceLocked=1]="DeviceLocked",e[e.OutOfMemory=2]="OutOfMemory",e[e.RefusedByUser=3]="RefusedByUser",e[e.Unknown=4]="Unknown",e))(a4||{});let s4=class{constructor(t){this.error=t,this.originalError=t}_tag="WebSocketConnectionError";originalError};function L1(e,t){return Reflect.getOwnMetadata(t,e)}function l4(e,t,r){Reflect.defineMetadata(t,r,e)}function Uu(e,t,r,n){const i=n(L1(e,t)??r());Reflect.defineMetadata(t,i,e)}var MC,DC,LC;(function(e){e.moduleId="moduleId",e.serviceId="serviceId"})(MC||(MC={}));(function(e){e.id="id",e.moduleId="moduleId",e.serviceId="serviceId"})(DC||(DC={}));(function(e){e.moduleId="moduleId",e.serviceId="serviceId"})(LC||(LC={}));const Vd="@inversifyjs/core/classMetadataReflectKey";function Hd(){return{constructorArguments:[],lifecycle:{postConstructMethodName:void 0,preDestroyMethodName:void 0},properties:new Map,scope:void 0}}const u4="@inversifyjs/core/pendingClassMetadataCountReflectKey",am=Symbol.for("@inversifyjs/core/InversifyCoreError");let Fa=class f2 extends Error{[am];kind;constructor(t,r,n){super(r,n),this[am]=!0,this.kind=t}static is(t){return typeof t=="object"&&t!==null&&t[am]===!0}static isErrorOfKind(t,r){return f2.is(t)&&t.kind===r}};var So,up,ac;function c4(){return 0}function f4(e){return t=>{t!==void 0&&t.kind===up.unknown&&Uu(e,u4,c4,(r=>r-1))}}function d4(e,t){return(...r)=>n=>{if(n===void 0)return e(...r);if(n.kind===ac.unmanaged)throw new Fa(So.injectionDecoratorConflict,"Unexpected injection found. Multiple @inject, @multiInject or @unmanaged decorators found");return t(n,...r)}}function p4(e){if(e.kind!==up.unknown&&e.isFromTypescriptParamType!==!0)throw new Fa(So.injectionDecoratorConflict,"Unexpected injection found. Multiple @inject, @multiInject or @unmanaged decorators found")}(function(e){e[e.injectionDecoratorConflict=0]="injectionDecoratorConflict",e[e.missingInjectionDecorator=1]="missingInjectionDecorator",e[e.planning=2]="planning",e[e.resolution=3]="resolution",e[e.unknown=4]="unknown"})(So||(So={})),(function(e){e[e.unknown=32]="unknown"})(up||(up={})),(function(e){e[e.multipleInjection=0]="multipleInjection",e[e.singleInjection=1]="singleInjection",e[e.unmanaged=2]="unmanaged"})(ac||(ac={}));const h4=d4((function(e,t){return{kind:e,name:void 0,optional:!1,tags:new Map,value:t}}),(function(e,t,r){return p4(e),{...e,kind:t,value:r}}));function FC(e,t){return r=>{const n=r.properties.get(t);return r.properties.set(t,e(n)),r}}var Oa;function g4(e,t,r,n){if(Fa.isErrorOfKind(n,So.injectionDecoratorConflict)){const i=(function(o,s,u){if(u===void 0){if(s===void 0)throw new Fa(So.unknown,"Unexpected undefined property and index values");return{kind:Oa.property,property:s,targetClass:o.constructor}}return typeof u=="number"?{index:u,kind:Oa.parameter,targetClass:o}:{kind:Oa.method,method:s,targetClass:o}})(e,t,r);throw new Fa(So.injectionDecoratorConflict,`Unexpected injection error.
456
456
 
@@ -462,7 +462,7 @@ Details
462
462
 
463
463
  ${(function(o){switch(o.kind){case Oa.method:return`[class: "${o.targetClass.name}", method: "${o.method.toString()}"]`;case Oa.parameter:return`[class: "${o.targetClass.name}", index: "${o.index.toString()}"]`;case Oa.property:return`[class: "${o.targetClass.name}", property: "${o.property.toString()}"]`}})(i)}`,{cause:n})}throw n}function v4(e,t){return(r,n,i)=>{try{i===void 0?(function(o,s){const u=sm(o,s);return(c,f)=>{Uu(c.constructor,Vd,Hd,FC(u(c),f))}})(e,t)(r,n):typeof i=="number"?(function(o,s){const u=sm(o,s);return(c,f,p)=>{if(!(function(g,h){return typeof g=="function"&&h===void 0})(c,f))throw new Fa(So.injectionDecoratorConflict,`Found an @inject decorator in a non constructor parameter.
464
464
  Found @inject decorator at method "${f?.toString()??""}" at class "${c.constructor.name}"`);Uu(c,Vd,Hd,(function(g,h){return m=>{const y=m.constructorArguments[h];return m.constructorArguments[h]=g(y),m}})(u(c),p))}})(e,t)(r,n,i):(function(o,s){const u=sm(o,s);return(c,f,p)=>{if(!(function(g){return g.set!==void 0})(p))throw new Fa(So.injectionDecoratorConflict,`Found an @inject decorator in a non setter property method.
465
- Found @inject decorator at method "${f.toString()}" at class "${c.constructor.name}"`);Uu(c.constructor,Vd,Hd,FC(u(c),f))}})(e,t)(r,n,i)}catch(o){g4(r,n,i,o)}}}function sm(e,t){return r=>{const n=t(r);return i=>(n(i),e(i))}}function Ye(e){return v4(h4(ac.singleInjection,e),f4)}(function(e){e[e.method=0]="method",e[e.parameter=1]="parameter",e[e.property=2]="property"})(Oa||(Oa={}));const NC="@inversifyjs/core/classIsInjectableFlagReflectKey",m4=[Array,BigInt,Boolean,Function,Number,Object,String];function y4(e){const t=L1(e,"design:paramtypes");t!==void 0&&Uu(e,Vd,Hd,(function(r){return n=>(r.forEach(((i,o)=>{var s;n.constructorArguments[o]!==void 0||(s=i,m4.includes(s))||(n.constructorArguments[o]=(function(u){return{isFromTypescriptParamType:!0,kind:ac.singleInjection,name:void 0,optional:!1,tags:new Map,value:u}})(i))})),n)})(t))}function Et(e){return t=>{(function(r){if(L1(r,NC)!==void 0)throw new Fa(So.injectionDecoratorConflict,`Cannot apply @injectable decorator multiple times at class "${r.name}"`);l4(r,NC,!0)})(t),y4(t)}}var jC;(function(e){e[e.multipleInjection=0]="multipleInjection",e[e.singleInjection=1]="singleInjection"})(jC||(jC={}));var zC;(function(e){e[e.singleMandatory=0]="singleMandatory",e[e.singleOptional=1]="singleOptional",e[e.multipleMandatory=2]="multipleMandatory",e[e.multipleOptional=3]="multipleOptional",e[e.length=4]="length"})(zC||(zC={}));let b4=class{constructor(t,r,n,i,o){this.deviceModel=t,this.serviceUuid=r,this.writeUuid=n,this.writeCmdUuid=i,this.notifyUuid=o}},Js=class{id;productName;usbProductId;bootloaderUsbProductId;usbOnly;memorySize;getBlockSize;masks;bluetoothSpec;constructor(t){this.id=t.id,this.productName=t.productName,this.usbProductId=t.usbProductId,this.bootloaderUsbProductId=t.bootloaderUsbProductId,this.usbOnly=t.usbOnly,this.memorySize=t.memorySize,this.getBlockSize=t.getBlockSize,this.masks=t.masks,this.bluetoothSpec=t.bluetoothSpec}};var S4=Object.defineProperty,w4=(e,t,r)=>t in e?S4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},E4=(e,t,r)=>w4(e,t+"",r);let $a=class{getAllDeviceModels(){return Object.values($a.deviceModelByIds)}getDeviceModel(t){return $a.deviceModelByIds[t.id]}filterDeviceModels(t){return this.getAllDeviceModels().filter(r=>Object.entries(t).every(([n,i])=>r[n]===i))}getBluetoothServicesInfos(){return Object.values($a.deviceModelByIds).reduce((t,r)=>{const{bluetoothSpec:n}=r;return n?{...t,...n.reduce((i,o)=>({...i,[o.serviceUuid]:new b4(r,o.serviceUuid,o.writeUuid,o.writeCmdUuid,o.notifyUuid)}),{})}:t},{})}getBluetoothServices(){return Object.values($a.deviceModelByIds).map(t=>(t.bluetoothSpec||[]).map(r=>r.serviceUuid)).flat().filter(t=>!!t)}};E4($a,"deviceModelByIds",{[Xt.NANO_S]:new Js({id:Xt.NANO_S,productName:"Ledger Nano S",usbProductId:16,bootloaderUsbProductId:1,usbOnly:!0,memorySize:320*1024,getBlockSize:e=>EC.lt(EC.coerce(e.firmwareVersion)??"","2.0.0")?4*1024:2*1024,masks:[823132160]}),[Xt.NANO_SP]:new Js({id:Xt.NANO_SP,productName:"Ledger Nano S Plus",usbProductId:80,bootloaderUsbProductId:5,usbOnly:!0,memorySize:1533*1024,getBlockSize:()=>512,masks:[856686592]}),[Xt.NANO_X]:new Js({id:Xt.NANO_X,productName:"Ledger Nano X",usbProductId:64,bootloaderUsbProductId:4,usbOnly:!1,memorySize:2*1024*1024,getBlockSize:()=>4*1024,masks:[855638016],bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}]}),[Xt.STAX]:new Js({id:Xt.STAX,productName:"Ledger Stax",usbProductId:96,bootloaderUsbProductId:6,usbOnly:!1,memorySize:1533*1024,getBlockSize:()=>512,masks:[857735168],bluetoothSpec:[{serviceUuid:"13d63400-2c97-6004-0000-4c6564676572",notifyUuid:"13d63400-2c97-6004-0001-4c6564676572",writeUuid:"13d63400-2c97-6004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-6004-0003-4c6564676572"}]}),[Xt.FLEX]:new Js({id:Xt.FLEX,productName:"Ledger Flex",usbProductId:112,bootloaderUsbProductId:7,usbOnly:!1,memorySize:1533*1024,getBlockSize:()=>512,masks:[858783744],bluetoothSpec:[{serviceUuid:"13d63400-2c97-3004-0000-4c6564676572",notifyUuid:"13d63400-2c97-3004-0001-4c6564676572",writeUuid:"13d63400-2c97-3004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-3004-0003-4c6564676572"}]}),[Xt.APEX]:new Js({id:Xt.APEX,productName:"Ledger Nano Gen5",usbProductId:128,bootloaderUsbProductId:8,usbOnly:!1,memorySize:1533*1024,getBlockSize:()=>512,masks:[859832320],bluetoothSpec:[{serviceUuid:"13d63400-2c97-8004-0000-4c6564676572",notifyUuid:"13d63400-2c97-8004-0001-4c6564676572",writeUuid:"13d63400-2c97-8004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-8004-0003-4c6564676572"},{serviceUuid:"13d63400-2c97-9004-0000-4c6564676572",notifyUuid:"13d63400-2c97-9004-0001-4c6564676572",writeUuid:"13d63400-2c97-9004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-9004-0003-4c6564676572"}]})}),$a=x4([Et()],$a);let C4=class{statusCode;data;constructor({statusCode:t,data:r}){this.statusCode=t,this.data=r}};const _4=5,os=1,G0=2,hl=2,q0=2,Dr=[];for(let e=0;e<256;++e)Dr.push((e+256).toString(16).slice(1));function R4(e,t=0){return(Dr[e[t+0]]+Dr[e[t+1]]+Dr[e[t+2]]+Dr[e[t+3]]+"-"+Dr[e[t+4]]+Dr[e[t+5]]+"-"+Dr[e[t+6]]+Dr[e[t+7]]+"-"+Dr[e[t+8]]+Dr[e[t+9]]+"-"+Dr[e[t+10]]+Dr[e[t+11]]+Dr[e[t+12]]+Dr[e[t+13]]+Dr[e[t+14]]+Dr[e[t+15]]).toLowerCase()}let lm;const O4=new Uint8Array(16);function $4(){if(!lm){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");lm=crypto.getRandomValues.bind(crypto)}return lm(O4)}const T4=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),BC={randomUUID:T4};function jp(e,t,r){if(BC.randomUUID&&!e)return BC.randomUUID();e=e||{};const n=e.random||(e.rng||$4)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,R4(n)}const ps={getLastBytesFrom(e,t){return e.slice(-t)},getFirstBytesFrom(e,t){return e.slice(0,t)},bytesToNumber(e){return e.reduce((t,r,n)=>t+r*Math.pow(256,e.length-1-n),0)},numberToByteArray(e,t){return new Uint8Array(t).map((r,n)=>e>>8*(t-1-n)&255)}},VC=2,um=800;let HC=class{_tag="FramerOverflowError";originalError;constructor(){this.originalError=new Error("Frame header length is greater than frame size")}},I4=class{_tag="FramerApduError";originalError;constructor(){this.originalError=new Error("Frame offset is greater than apdu length")}},UC=class{_tag="ReceiverApduError";originalError;constructor(t){this.originalError=new Error(t??"Unable to parse apdu")}},WC=class{_tag="DeviceSessionNotFound";originalError;constructor(t){this.originalError=t??new Error("Device session not found")}},d2=class{_header;_data;constructor({header:t,data:r}){this._header=t,this._data=r}toString(){return JSON.stringify({header:this._header.toString(),data:Zo(this._data)},null,2)}getRawData(){const t=this._header.getRawData(),r=new Uint8Array(t.length+this._data.length);return r.set(t,0),r.set(this._data,t.length),r}getHeader(){return this._header}getData(){return this._data}},p2=class{_uuid;_channel;_headTag;_index;_length;_dataLength;constructor({uuid:t,dataSize:r,index:n,headTag:i,length:o,channel:s}){this._uuid=t,this._dataLength=r,this._index=n,this._headTag=i,this._length=o,this._channel=s}getDataLength(){return this._dataLength.map(t=>ps.bytesToNumber(t))}setDataSize(t){return this._dataLength=t,this}getLength(){return this._length}toString(){return JSON.stringify({uuid:this._uuid.toString(),dataSize:this._dataLength.extract()?.toString(),index:this._index.toString(),headTag:this._headTag.toString(),length:this._length.toString(),channel:this._channel.extract()?.toString()})}getRawData(){return new Uint8Array([...this._channel.caseOf({Just:t=>[...t],Nothing:()=>[]}),...this._headTag,...this._index,...this._dataLength.caseOf({Just:t=>[...t],Nothing:()=>[]})])}};const xr={LoggerPublisherServiceFactory:Symbol.for("LoggerPublisherServiceFactory")};var A4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},k4=(e,t)=>(r,n)=>t(r,n,e);let GC=class{_channel;_logger;_pendingFrames;constructor({channel:t=_n.zero()},r){this._channel=t,this._logger=r("ApduReceiverService"),this._pendingFrames=[]}handleFrame(t){return this.getFrameFromBytes(t).map(r=>{if(this._pendingFrames.push(r),!this._pendingFrames[0])return Dt;const n=this._pendingFrames[0].getHeader().getDataLength();return this.getCompleteFrame(n)})}getCompleteFrame(t){return t.chain(r=>{if(!this.isComplete(r))return this._logger.debug("frame is not complete, waiting for more"),Dt;const n=ps.getFirstBytesFrom(this.concatFrames(this._pendingFrames),r),i=ps.getFirstBytesFrom(n,n.length-VC),o=ps.getLastBytesFrom(n,VC);return this._pendingFrames=[],Lr(new C4({data:i,statusCode:o}))})}getFrameFromBytes(t){const r=this._channel.caseOf({Just:()=>G0,Nothing:()=>0}),n=t.slice(r,r+os),i=t.slice(r+os,r+os+hl),o=i.reduce((h,m)=>h+m,0)===0;if(!o&&this._pendingFrames.length===0)return Wt(new UC);const s=r+os+hl,u=o?q0:0;if(t.length<r+os+hl+u)return Wt(new UC("Unable to parse header from apdu"));const c=o?Lr(t.slice(s,s+u)):Dt,f=s+u,p=t.slice(f),g=new d2({header:new p2({uuid:jp(),channel:this._channel,dataSize:c,headTag:n,index:i,length:r+os+hl+u}),data:p});return nr(g)}isComplete(t){return this._pendingFrames.reduce((r,n)=>r+n.getData().length,0)>=t}concatFrames(t){return t.reduce((r,n)=>Uint8Array.from([...r,...n.getData()]),new Uint8Array(0))}};GC=A4([Et(),k4(1,Ye(xr.LoggerPublisherServiceFactory))],GC);var P4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},M4=(e,t)=>(r,n)=>t(r,n,e);let qC=class{_frameSize;_channel;_padding;_logger;constructor({frameSize:t,channel:r=_n.zero(),padding:n=!1},i){this._frameSize=t,this._channel=r,this._padding=n,this._logger=i("DefaultApduSenderService")}getFrames(t){const r=[];let n=0,i=this.getFrameAtIndex(t,n);for(;i.isRight();)r.push(i.extract()),n+=1,i=this.getFrameAtIndex(t,n).mapLeft(o=>(o instanceof HC||this._logger.error("Error while parsing frame",{data:{error:o}}),o));return r}getFrameAtIndex(t,r){const n=this.getFrameHeaderFrom(r,t.length),i=r===0?0:r*this._frameSize-this.getHeaderSizeSumFrom(r);if(i>=t.length)return Wt(new HC);if(n.getLength()>this._frameSize)return Wt(new I4);const o=this._frameSize-n.getLength(),s=t.slice(i,i+this._frameSize-n.getLength()),u=this._padding?new Uint8Array(o).fill(0):new Uint8Array(s.length<o?s.length:o);u.set(s,0);const c=new d2({header:n,data:u});return nr(c)}getFrameHeaderFrom(t,r){const n=new p2({uuid:jp(),channel:this._channel.map(i=>ps.getLastBytesFrom(i,G0)),headTag:new Uint8Array([_4]),index:ps.numberToByteArray(t,hl),length:this.getFrameHeaderSizeFromIndex(t),dataSize:_n.zero()});return t===0&&n.setDataSize(_n.of(ps.numberToByteArray(r,q0))),n}getHeaderSizeSumFrom(t){let r=this.getFrameHeaderSizeFromIndex(0),n=1;for(;n<t;)r+=this.getFrameHeaderSizeFromIndex(n),n+=1;return r}getFrameHeaderSizeFromIndex(t){return this._channel.caseOf({Just:()=>G0,Nothing:()=>0})+hl+os+(t===0?q0:0)}};qC=P4([Et(),M4(1,Ye(xr.LoggerPublisherServiceFactory))],qC);const X0={LocalConfigDataSource:Symbol.for("LocalConfigDataSource"),RemoteConfigDataSource:Symbol.for("RemoteConfigDataSource"),ConfigService:Symbol.for("ConfigService")},fn={ApduSenderServiceFactory:Symbol.for("ApduSenderServiceFactory"),ApduReceiverServiceFactory:Symbol.for("ApduReceiverServiceFactory"),DeviceSessionService:Symbol.for("DeviceSessionService")},XC={ConnectUseCase:Symbol.for("ConnectUseCase"),DisconnectUseCase:Symbol.for("DisconnectUseCase")},zp={ManagerApiService:Symbol.for("ManagerApiService"),ManagerApiDataSource:Symbol.for("ManagerApiDataSource"),DmkConfig:Symbol.for("ManagerApiDmkConfig")},Na={DmkConfig:Symbol.for("TransportDmkConfig"),TransportService:Symbol.for("TransportService"),TransportsInput:Symbol.for("TransportsInput")};var D4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},KC=(e,t)=>(r,n)=>t(r,n,e);let YC=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("SendCommandUseCase")}async execute({sessionId:t,command:r,abortTimeout:n}){return this._sessionService.getDeviceSessionById(t).caseOf({Right:async i=>await i.sendCommand(r,n),Left:i=>{throw this._logger.error("Error getting session",{data:{error:i}}),i}})}};YC=D4([Et(),KC(0,Ye(fn.DeviceSessionService)),KC(1,Ye(xr.LoggerPublisherServiceFactory))],YC);var L4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i};let QC=class{execute=vi.fn(()=>"stub")};QC=L4([Et()],QC);var F4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},JC=(e,t)=>(r,n)=>t(r,n,e);let ZC=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("ExecuteDeviceActionUseCase")}execute({sessionId:t,deviceAction:r}){return this._sessionService.getDeviceSessionById(t).caseOf({Right:n=>n.executeDeviceAction(r),Left:n=>{throw this._logger.error("Error getting session",{data:{error:n}}),n}})}};ZC=F4([Et(),JC(0,Ye(fn.DeviceSessionService)),JC(1,Ye(xr.LoggerPublisherServiceFactory))],ZC);function N4(e){return typeof e=="object"&&e!==null&&"version"in e&&"name"in e&&typeof e.version=="string"&&typeof e.name=="string"}let e_=class{constructor(t){this.err=t,this.originalError=t}_tag="ApiCallError";originalError},j4=class{constructor(t){this.err=t,this.originalError=t}_tag="ParseResponseError";originalError},h2=class{constructor(t){this.err=t,this.originalError=t}_tag="JSONParseError";originalError},z4=class{constructor(t){this.err=t,this.originalError=t}_tag="ReadFileError";originalError};const B4="@ledgerhq/device-management-kit",V4="0.0.0-develop-20260909001452",t_={name:B4,version:V4};var H4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i};const U4={name:t_.name,version:t_.version},W4=()=>JSON.stringify(U4);let r_=class{getConfig(){return Rn.encase(()=>W4()).mapLeft(t=>new z4(t)).chain(t=>Rn.encase(()=>{const r=JSON.parse(t);if(N4(r))return r;throw new Error("Invalid config file")}).mapLeft(r=>new h2(r)))}};r_=H4([Et()],r_);var G4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i};let n_=class{getConfig(){return Rn.of({name:"DeviceSDK",version:"0.0.0-stub.1"})}};n_=G4([Et()],n_);var q4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i};let i_=class{async getConfig(){const t=await this._callApi();if(t.isLeft())return Wt(new e_(t.extract()));if(!t.extract().ok)return Wt(new e_(new Error("response not ok")));const r=await t.extract().json();return r.isLeft()?Wt(new h2):r.chain(n=>this._parseResponse(n)).map(n=>n)}_parseResponse(t){const{name:r,version:n}=t;return!r||!n?Wt(new j4):Rn.of({name:r,version:n})}_callApi(){return new Promise(t=>{t(Rn.of({ok:!0,json:async()=>new Promise(r=>{r(Rn.of({name:"DeviceSDK",version:"0.0.0-fake.1",yolo:"yolo"}))})}))})}};i_=q4([Et()],i_);var X4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i};let o_=class{async getConfig(){return new Promise(t=>t(Rn.of({name:"DeviceSDK",version:"0.0.0-fake.2"})))}};o_=X4([Et()],o_);var K4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},cm=(e,t)=>(r,n)=>t(r,n,e);let a_=class{_local;_remote;_logger;constructor(t,r,n){this._local=t,this._remote=r,this._logger=n("config")}async getDmkConfig(){const t=this._local.getConfig().ifLeft(r=>{this._logger.error("Local config not available",{data:{error:r}})});if(t.isRight()){const r=t.extract();return this._logger.info("Local config available",{data:{config:r}}),r}return this._remote.getConfig().then(r=>r.mapLeft(n=>(this._logger.error("Local config available",{data:{error:n}}),{name:"DeadDmk",version:"0.0.0-dead.1"})).extract())}};a_=K4([Et(),cm(0,Ye(X0.LocalConfigDataSource)),cm(1,Ye(X0.RemoteConfigDataSource)),cm(2,Ye(xr.LoggerPublisherServiceFactory))],a_);var Y4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},Q4=(e,t)=>(r,n)=>t(r,n,e);let s_=class{_configService;constructor(t){this._configService=t}async getDmkVersion(){return(await this._configService.getDmkConfig()).version}};s_=Y4([Et(),Q4(0,Ye(X0.ConfigService))],s_);const J4={DeviceModelDataSource:Symbol.for("DeviceModelDataSource")};var Z4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},l_=(e,t)=>(r,n)=>t(r,n,e);let u_=class{constructor(t,r){this._sessionService=t,this._logger=r("DisableDeviceSessionRefresherUseCase")}_logger;execute({sessionId:t,blockerId:r}){return this._sessionService.getDeviceSessionById(t).caseOf({Left:n=>{throw this._logger.error("Error getting device session",{data:{error:n}}),n},Right:n=>n.disableRefresher(r)})}};u_=Z4([Et(),l_(0,Ye(fn.DeviceSessionService)),l_(1,Ye(xr.LoggerPublisherServiceFactory))],u_);var ej=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},tj=(e,t)=>(r,n)=>t(r,n,e);let c_=class{_sessions;_sessionsSubject;_logger;constructor(t){this._sessions=[],this._sessionsSubject=new GT,this._logger=t("DeviceSessionService")}get sessionsObs(){return this._sessionsSubject.asObservable()}addDeviceSession(t){return this._sessions.find(r=>r.id===t.id)?(this._logger.warn("DeviceSession already exists",{data:{deviceSession:t}}),this):(this._sessions.push(t),this._sessionsSubject.next(t),this._logger.info("DeviceSession added",{data:{sessionId:t.id}}),this)}removeDeviceSession(t){const r=this._sessions.find(n=>n.id===t);return r?(r.close(),this._sessions=this._sessions.filter(n=>n.id!==t),this._logger.info("DeviceSession removed",{data:{sessionId:t}}),this):(this._logger.warn("DeviceSession not found",{data:{sessionId:t}}),this)}getDeviceSessionById(t){return _n.fromNullable(this._sessions.find(r=>r.id===t)).toEither(new WC)}getDeviceSessionsByDeviceId(t){return _n.fromPredicate(({length:r})=>r>0,this._sessions.filter(r=>r.connectedDevice.id===t)).toEither(new WC)}getDeviceSessions(){return this._sessions}};c_=ej([Et(),tj(0,Ye(xr.LoggerPublisherServiceFactory))],c_);var rj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},f_=(e,t)=>(r,n)=>t(r,n,e);let d_=class{_sessionService;_transportService;constructor(t,r){this._sessionService=t,this._transportService=r}execute(){const t=this._sessionService.getDeviceSessions();for(const r of t)this._transportService.closeConnection(r.connectedDevice),this._sessionService.removeDeviceSession(r.id)}};d_=rj([Et(),f_(0,Ye(fn.DeviceSessionService)),f_(1,Ye(Na.TransportService))],d_);var nj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},p_=(e,t)=>(r,n)=>t(r,n,e);let h_=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("GetDeviceSessionStateUseCase")}execute({sessionId:t}){return this._sessionService.getDeviceSessionById(t).caseOf({Left:r=>{throw this._logger.error("Error getting session device",{data:{error:r}}),r},Right:r=>r.state})}};h_=nj([Et(),p_(0,Ye(fn.DeviceSessionService)),p_(1,Ye(xr.LoggerPublisherServiceFactory))],h_);var ij=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},g_=(e,t)=>(r,n)=>t(r,n,e);let v_=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("UnsafeBypassIntentQueueUseCase")}execute({sessionId:t,bypass:r}){this._sessionService.getDeviceSessionById(t).caseOf({Left:n=>{throw this._logger.error("Error getting session",{data:{error:n}}),n},Right:n=>{this._logger.warn(`UNSAFE: ${r?"Enabling":"Disabling"} intent queue bypass for session ${t}`),n._unsafeBypassIntentQueue(r)}})}};v_=ij([Et(),g_(0,Ye(fn.DeviceSessionService)),g_(1,Ye(xr.LoggerPublisherServiceFactory))],v_);function oj(e){return`[will send APDU] ~...> ${Zo(e,!1)}`}function aj(e){return`[exchange] <= ${Zo(e.data,!1)}${Zo(e.statusCode,!1)}`}const sj="apdu-exchange";function lj(e,t,r){const n=Zo(t,!1),i=`${Zo(r.data,!1)}${Zo(r.statusCode,!1)}`;return{message:aj(r),data:{type:sj,sessionId:e,apdu:n,response:i}}}const K0=1e3,fm=1e3,uj={isRefresherDisabled:!1,pollingInterval:1e3};var ur=(e=>(e.NEW_STATE="NEW_STATE",e.REFRESH_NEEDED="REFRESH_NEEDED",e.COMMAND_SUCCEEDED="COMMAND_SUCCEEDED",e.DEVICE_STATE_UPDATE_BUSY="DEVICE_STATE_UPDATE_BUSY",e.DEVICE_STATE_UPDATE_LOCKED="DEVICE_STATE_UPDATE_LOCKED",e.DEVICE_STATE_UPDATE_CONNECTED="DEVICE_STATE_UPDATE_CONNECTED",e.DEVICE_STATE_UPDATE_UNKNOWN="DEVICE_STATE_UPDATE_UNKNOWN",e))(ur||{});let cj=class{_eventEmitter=new Ul;listen(){return this._eventEmitter.asObservable()}dispatch(t){this._eventEmitter.next(t)}},fj=class{constructor(t,r){this.loggerModuleFactory=t,this.sessionEventDispatcher=r,this._logger=this.loggerModuleFactory("IntentQueueService")}_logger;_queue=[];_isProcessing=!1;_currentSubscription=null;enqueue(t){this._logger.debug("Enqueueing intent",{data:{type:t.type}});const r=new Ul,n={intent:t,subject:r,isCancelled:!1};this._queue.push(n);const i=()=>{this._logger.debug("Cancelling intent",{data:{type:t.type}}),n.isCancelled=!0,this._queue[0]===n&&this._currentSubscription?(this._currentSubscription.unsubscribe(),this._currentSubscription=null,r.complete(),this._queue.shift(),this._isProcessing=!1,this._processQueue()):(!this._isProcessing||this._queue[0]!==n)&&r.complete()};return this._isProcessing||this._processQueue(),{observable:r.asObservable().pipe(q3(()=>{this._logger.debug("Intent observable finalized",{data:{type:t.type}})})),cancel:i}}_processQueue(){if(this._isProcessing)return;if(this._queue.length===0){this.sessionEventDispatcher.dispatch({eventName:ur.NEW_STATE});return}this.sessionEventDispatcher.dispatch({eventName:ur.DEVICE_STATE_UPDATE_BUSY}),this._isProcessing=!0;const t=this._queue[0];if(t.isCancelled){this._logger.debug("Skipping cancelled intent",{data:{type:t.intent.type}}),t.subject.complete(),this._queue.shift(),this._isProcessing=!1,this._processQueue();return}this._logger.debug("Processing intent",{data:{type:t.intent.type}}),this._currentSubscription=t.intent.execute().subscribe({next:r=>{t.isCancelled||t.subject.next(r)},error:r=>{t.isCancelled||t.subject.error(r),this._onIntentComplete()},complete:()=>{t.isCancelled||t.subject.complete(),this._onIntentComplete()}})}_onIntentComplete(){this._logger.debug("Intent completed"),this._currentSubscription=null,this._queue.shift(),this._isProcessing=!1,this._processQueue()}},dj=class{constructor(t,r){this._refresher=r,this._logger=t("refresher-service")}_refresherBlockers=new Set;_logger;disableRefresher(t){const r=`${t}-${jp()}`;this.addRefresherBlocker(r),this._logger.debug("Refresher disabled",{data:{blockerId:r,blockers:Array.from(this._refresherBlockers)}});let n=!1;return()=>{n||(n=!0,this.removeRefresherBlocker(r),this._logger.debug("Refresher re-enabled",{data:{blockerId:r,blockers:Array.from(this._refresherBlockers)}}))}}addRefresherBlocker(t){const r=this._refresherBlockers.size;this._refresherBlockers.add(t),r===0&&this._refresher.stop()}removeRefresherBlocker(t){const r=this._refresherBlockers.size;this._refresherBlockers.delete(t),r>0&&this._refresherBlockers.size===0&&this._refresher.start()}},pj=class{constructor(t,r,n,i){this.connectedDevice=r,this._sessionEventDispatcher=n,this._sendCommandFunction=i,this._logger=t("device-pinger"),this._subscription=this._sessionEventDispatcher.listen().subscribe(async o=>await this.mapEventAction(o))}_sendCommandFunction;_subscription;_logger;async ping(){try{return await this.mapDevicePingAction(this.connectedDevice.deviceModel.id)}catch(t){return this._logger.error("Error while pinging device",{data:{error:t}}),null}}mapEventAction=async t=>t.eventName===ur.REFRESH_NEEDED?await this.ping():null;async mapDevicePingAction(t){if(t===Xt.NANO_S){const r=async()=>{const o=await this._sendCommandFunction(new AE,um);return this._sendCommandFunction(new qN,um),o},n=new Promise(o=>{setTimeout(()=>o(null),K0*2+100)}),i=await Promise.race([r(),n]);return i?this._sessionEventDispatcher.dispatch({eventName:ur.COMMAND_SUCCEEDED,eventData:i}):this._sessionEventDispatcher.dispatch({eventName:ur.DEVICE_STATE_UPDATE_LOCKED}),i}else{const r=await this._sendCommandFunction(new AE,um);return this._sessionEventDispatcher.dispatch({eventName:ur.COMMAND_SUCCEEDED,eventData:r}),r}}unsubscribe(){this._subscription.unsubscribe()}},hj=class{constructor(t,r,n,i){this._sessionEventDispatcher=n,this._refresherOptions=r,this._logger=t("device-session-refresher"),this._connectedDeviceID=i.deviceModel.id}_refresherSubscription;_refresherOptions;_logger;_connectedDeviceID;startRefresher(){if(this._refresherOptions.isRefresherDisabled||this._refresherSubscription)return;const t=this.getValidPollingInterval(this._refresherOptions,this._logger),r=this._sessionEventDispatcher.listen().pipe(kC(n=>n.eventName===ur.DEVICE_STATE_UPDATE_BUSY||n.eventName===ur.NEW_STATE),La(n=>n.eventName===ur.DEVICE_STATE_UPDATE_BUSY),K3(!1),W3());this._refresherSubscription=V3(0,t).pipe(Y3(r),PC(([n,i])=>{i&&this._logger.debug("Refresh skipped: device is busy")}),kC(([n,i])=>!i),PC(()=>this._sessionEventDispatcher.dispatch({eventName:ur.REFRESH_NEEDED}))).subscribe(),this._logger.info("Refresher started.")}stopRefresher(){this._refresherSubscription&&(this._refresherSubscription.unsubscribe(),this._refresherSubscription=void 0,this._logger.info("Refresher stopped."))}restartRefresher(){this.stopRefresher(),this.startRefresher(),this._logger.info("Refresher restarted.")}getValidPollingInterval=(t,r)=>{const{pollingInterval:n}=t;if(this._connectedDeviceID===Xt.NANO_S){const i=K0*2;return n!==void 0&&n<i?(r.warn(`Polling interval of ${n} is too low, setting to minimum as ${i}`),i):n??i}else return n!==void 0&&n<fm?(r.warn(`Polling interval of ${n} is too low, setting to minimum as ${fm}`),fm):n??K0}},gj=class{constructor(t,r,n,i,o){this._sessionEventDispatcher=r,this._connectedDevice=n,this._deviceState=i,this.setDeviceSessionState=o,this._subscription=this._sessionEventDispatcher.listen().subscribe(s=>this.mapEventAction(s)),this._logger=t("device-session-state-handler")}_subscription;_logger;_pendingDeviceStatus=ho.BUSY;_updateDeviceState(t){const r=this._parseDeviceStatus(t);if(r){const{sessionStateType:n,deviceStatus:i,currentApp:o}=r,s=this._deviceState.getValue();s.sessionStateType===Il.Connected?this.setDeviceSessionState({sessionStateType:n,deviceStatus:i,deviceModelId:this._connectedDevice.deviceModel.id,currentApp:o,installedApps:[],isSecureConnectionAllowed:!1}):this.setDeviceSessionState({...s,sessionStateType:n,deviceStatus:i,deviceModelId:this._connectedDevice.deviceModel.id,currentApp:o})}}mapEventAction=t=>{const{eventName:r}=t;switch(r){case ur.COMMAND_SUCCEEDED:return this._updateDeviceState(t.eventData);case ur.DEVICE_STATE_UPDATE_BUSY:return this.setDeviceSessionState({...this._deviceState.getValue(),deviceStatus:ho.BUSY});case ur.DEVICE_STATE_UPDATE_LOCKED:this._pendingDeviceStatus=ho.LOCKED;return;case ur.DEVICE_STATE_UPDATE_CONNECTED:this._pendingDeviceStatus=ho.CONNECTED;return;case ur.NEW_STATE:{const n=this._pendingDeviceStatus;return this._pendingDeviceStatus=ho.BUSY,this.setDeviceSessionState({...this._deviceState.getValue(),deviceStatus:n})}case ur.DEVICE_STATE_UPDATE_UNKNOWN:return this.setDeviceSessionState({...this._deviceState.getValue(),deviceStatus:ho.BUSY});case ur.REFRESH_NEEDED:return;default:{const n=r;throw new Error(`Unhandled context type ${n}`)}}};_parseDeviceStatus(t){return pN(t)?{sessionStateType:Il.ReadyWithoutSecureChannel,deviceStatus:ho.CONNECTED,currentApp:{name:t.data.name,version:t.data.version}}:(this._logger.debug("Error while parsing APDU response",{data:{parsedResponse:t}}),null)}unsubscribe(){this._subscription.unsubscribe()}},vj=class{_id;_connectedDevice;_deviceState;_managerApiService;_secureChannelService;_logger;_loggerModuleFactory;_refresherOptions;_pinger;_deviceSessionRefresher;_refresherService;_intentQueueService;_sessionEventDispatcher=new cj;_bypassIntentQueue=!1;constructor({connectedDevice:t,id:r=jp()},n,i,o,s,u=c=>new fj(n,c)){this._id=r,this._connectedDevice=t,this._loggerModuleFactory=n,this._logger=n("device-session"),this._managerApiService=i,this._intentQueueService=u(this._sessionEventDispatcher),this._secureChannelService=o,this._refresherOptions={...uj,...s},this._deviceState=new v3({sessionStateType:Il.Connected,deviceStatus:ho.CONNECTED,deviceModelId:this._connectedDevice.deviceModel.id}),this._pinger=new pj(n,t,this._sessionEventDispatcher,(c,f)=>this.sendCommand(c,f)),this._deviceSessionRefresher=new hj(n,this._refresherOptions,this._sessionEventDispatcher,this._connectedDevice),new gj(n,this._sessionEventDispatcher,this._connectedDevice,this._deviceState,c=>this.setDeviceSessionState(c)),this._refresherService=new dj(n,{start:()=>this._deviceSessionRefresher.restartRefresher(),stop:()=>this._deviceSessionRefresher.stopRefresher()})}async initialiseSession(){try{this._refresherOptions.isRefresherDisabled?await this._pinger.ping():this._deviceSessionRefresher.startRefresher()}catch(t){throw this._logger.error("Error while initialising session",{data:{error:t}}),t}}get id(){return this._id}get connectedDevice(){return this._connectedDevice}get state(){return this._deviceState.asObservable()}getDeviceSessionState(){return this._deviceState.getValue()}setDeviceSessionState(t){this._deviceState.next(t)}sendApdu(t,r={isPolling:!1,triggersDisconnection:!1,abortTimeout:void 0}){return this._bypassIntentQueue?this._unsafeInternalSendApdu(t,r):this._internalSendApdu(t,r)}_internalSendApdu(t,r){const n=r.abortTimeout,i=Date.now(),{observable:o,cancel:s}=this._intentQueueService.enqueue({type:"send-apdu",execute:()=>Tl((async()=>{const c=Date.now()-i;return await this._unsafeInternalSendApdu(t,{isPolling:r.isPolling,triggersDisconnection:r.triggersDisconnection,abortTimeout:n?n-c:void 0})})())}),u=n?o.pipe(IC({each:n,with:()=>{throw s(),new Q3}})):o;return TC(u)}async _unsafeInternalSendApdu(t,r={isPolling:!1,triggersDisconnection:!1,abortTimeout:void 0}){return this._logger.debug(oj(t)),(await this._connectedDevice.sendApdu(t,r.triggersDisconnection,r.abortTimeout)).ifRight(n=>{const{message:i,data:o}=lj(this._id,t,n);this._logger.debug(i,{data:o}),b1.isLockedDeviceResponse(n)?this._sessionEventDispatcher.dispatch({eventName:ur.DEVICE_STATE_UPDATE_LOCKED}):this._sessionEventDispatcher.dispatch({eventName:ur.DEVICE_STATE_UPDATE_CONNECTED})}).ifLeft(()=>{this._sessionEventDispatcher.dispatch({eventName:ur.DEVICE_STATE_UPDATE_UNKNOWN})})}sendCommand(t,r){return this._logger.debug(`[sendCommand] ${t.name}`),this._bypassIntentQueue?this._unsafeInternalSendCommand(t,r):this._internalSendCommand(t,r)}_internalSendCommand(t,r){const n=Date.now(),{observable:i,cancel:o}=this._intentQueueService.enqueue({type:"send-command",execute:()=>Tl((async()=>{const u=Date.now()-n;return await this._unsafeInternalSendCommand(t,r?r-u:void 0)})())}),s=r?i.pipe(IC({each:r,with:()=>{throw o(),new J3}})):i;return TC(s)}async _unsafeInternalSendCommand(t,r){const n=t.getApdu();return(await this._unsafeInternalSendApdu(n.getRawApdu(),{isPolling:!1,triggersDisconnection:t.triggersDisconnection??!1,abortTimeout:r})).caseOf({Left:i=>{throw this._logger.error("[sendCommand] error",{data:{err:i}}),i},Right:i=>{const o=t.parseResponse(i,this._connectedDevice.deviceModel.id);return this._logger.debug("[sendCommand] result",{data:{result:o}}),o}})}executeDeviceAction(t){return this._bypassIntentQueue?this._unsafeInternalExecuteDeviceAction(t):this._internalExecuteDeviceAction(t)}_internalExecuteDeviceAction(t){let r;const{observable:n,cancel:i}=this._intentQueueService.enqueue({type:"device-action",execute:()=>{const{observable:o,cancel:s}=this._unsafeInternalExecuteDeviceAction(t);return r=s,o}});return{observable:n,cancel:()=>{r?.(),i()}}}_unsafeInternalExecuteDeviceAction(t){const{observable:r,cancel:n}=t._execute({sendApdu:async i=>this._unsafeInternalSendApdu(i),sendCommand:async i=>this._unsafeInternalSendCommand(i),getDeviceModel:()=>this._connectedDevice.deviceModel,getDeviceSessionState:()=>this._deviceState.getValue(),getDeviceSessionStateObservable:()=>this.state,setDeviceSessionState:i=>(this.setDeviceSessionState(i),this._deviceState.getValue()),getManagerApiService:()=>this._managerApiService,getSecureChannelService:()=>this._secureChannelService,loggerFactory:this._loggerModuleFactory});return{observable:r,cancel:n}}close(){this._updateDeviceStatus(ho.NOT_CONNECTED),this._deviceState.complete(),this._deviceSessionRefresher.stopRefresher(),this._pinger.unsubscribe()}disableRefresher(t){return this._refresherService.disableRefresher(t)}_unsafeBypassIntentQueue(t){this._bypassIntentQueue=t}_updateDeviceStatus(t){const r=this._deviceState.getValue();this._deviceState.next({...r,deviceStatus:t})}};const F1={SecureChannelService:Symbol.for("SecureChannelService"),SecureChannelDataSource:Symbol.for("SecureChannelDataSource"),DmkConfig:Symbol.for("SecureChannelDmkConfig")};var mj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},_u=(e,t)=>(r,n)=>t(r,n,e);let m_=class{_transportService;_sessionService;_loggerFactory;_managerApi;_secureChannel;_logger;constructor(t,r,n,i,o){this._sessionService=r,this._transportService=t,this._loggerFactory=n,this._logger=n("ConnectUseCase"),this._managerApi=i,this._secureChannel=o}handleDeviceDisconnect(t){this._sessionService.getDeviceSessionsByDeviceId(t).ifRight(r=>{r.forEach(n=>{this._sessionService.removeDeviceSession(n.id),this._logger.info("Session removed",{data:{deviceId:t,sessionId:n.id}})})})}async execute({device:t,sessionRefresherOptions:r}){const n=this._transportService.getTransport(t.transport),i="sessionId"in t?t.sessionId:void 0;return dt.liftEither(n.toEither(new D1(new Error("Unknown transport")))).chain(async o=>o.connect({deviceId:t.id,onDisconnect:s=>this.handleDeviceDisconnect(s)})).ifLeft(o=>{this._logger.error("Error connecting to device")}).map(async o=>{const s=new vj({connectedDevice:o,id:i},this._loggerFactory,this._managerApi,this._secureChannel,r);return this._sessionService.addDeviceSession(s),await s.initialiseSession(),s.id}).caseOf({Left:o=>{throw o},Right:o=>o})}};m_=mj([Et(),_u(0,Ye(Na.TransportService)),_u(1,Ye(fn.DeviceSessionService)),_u(2,Ye(xr.LoggerPublisherServiceFactory)),_u(3,Ye(zp.ManagerApiService)),_u(4,Ye(F1.SecureChannelService))],m_);var yj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},dm=(e,t)=>(r,n)=>t(r,n,e);let y_=class{_transportService;_sessionService;_logger;constructor(t,r,n){this._sessionService=r,this._transportService=t,this._logger=n("DisconnectUseCase")}async execute({sessionId:t}){return this._logger.debug("Disconnecting from device",{data:{test:this._sessionService.getDeviceSessions().map(r=>r.id)}}),dt(async({liftEither:r})=>{const n=await r(this._sessionService.getDeviceSessionById(t).ifLeft(s=>{this._logger.error("Device session not found",{data:{sessionId:t,error:s}})})),i=n.connectedDevice.transport,o=await r(this._transportService.getTransport(i).toEither(new D1(new Error("Unknown transport"))));n.close(),this._sessionService.removeDeviceSession(t),await o.disconnect({connectedDevice:n.connectedDevice})}).caseOf({Left:r=>{throw this._logger.error("Error disconnecting from device",{data:{error:r}}),r},Right:()=>{}})}};y_=yj([Et(),dm(0,Ye(Na.TransportService)),dm(1,Ye(fn.DeviceSessionService)),dm(2,Ye(xr.LoggerPublisherServiceFactory))],y_);let N1=class{id;sessionId;modelId;name;type;transport;constructor({transportConnectedDevice:{id:t,deviceModel:{id:r,productName:n},type:i,transport:o,name:s},sessionId:u}){this.id=t,this.sessionId=u,this.modelId=r,this.name=s??n,this.type=i,this.transport=o}};var bj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},b_=(e,t)=>(r,n)=>t(r,n,e);let S_=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("GetConnectedDeviceUseCase")}execute({sessionId:t}){return this._sessionService.getDeviceSessionById(t).caseOf({Right:r=>new N1({sessionId:r.id,transportConnectedDevice:r.connectedDevice}),Left:r=>{throw this._logger.error("Error getting session",{data:{error:r}}),r}})}};S_=bj([Et(),b_(0,Ye(fn.DeviceSessionService)),b_(1,Ye(xr.LoggerPublisherServiceFactory))],S_);var Sj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},w_=(e,t)=>(r,n)=>t(r,n,e);let x_=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("ListConnectedDeviceUseCase")}execute(){return this._logger.info("Listing connected devices"),this._sessionService.getDeviceSessions().map(t=>new N1({transportConnectedDevice:t.connectedDevice,sessionId:t.id}))}};x_=Sj([Et(),w_(0,Ye(fn.DeviceSessionService)),w_(1,Ye(xr.LoggerPublisherServiceFactory))],x_);var wj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},E_=(e,t)=>(r,n)=>t(r,n,e);let C_=class{_transports;_transportService;_logger;constructor(t,r){this._transports=t.getAllTransports(),this._transportService=t,this._logger=r("ListenToAvailableDevicesUseCase")}mapTransportDiscoveredDeviceToDiscoveredDevice(t){const r=new MT({id:t.id,model:t.deviceModel.id,name:t.deviceModel.productName});return{id:t.id,deviceModel:r,transport:t.transport,name:t.name||r.name,rssi:t.rssi}}execute({transport:t}={}){if(this._logger.info("Listening to available devices"),this._transports.length===0)return this._logger.warn("No transports available"),Tl([[]]);if(!t){this._logger.info("Discovering all available transports");const r=this._transports.map((n,i)=>n.listenToAvailableDevices().pipe(La(o=>({index:i,arr:o}))));return H3(...r).pipe(X3((n,{index:i,arr:o})=>(n[i]=o,n),{}),La(n=>Object.values(n).flat().map(this.mapTransportDiscoveredDeviceToDiscoveredDevice)))}return this._logger.info(`Discovering devices on transport ${t}`),this._transportService.getTransport(t).caseOf({Nothing:()=>(this._logger.error(`Transport ${t} not found`),l2([])),Just:r=>r.listenToAvailableDevices().pipe(La(n=>n.map(this.mapTransportDiscoveredDeviceToDiscoveredDevice)))})}};C_=wj([Et(),E_(0,Ye(Na.TransportService)),E_(1,Ye(xr.LoggerPublisherServiceFactory))],C_);var xj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},__=(e,t)=>(r,n)=>t(r,n,e);let R_=class{constructor(t,r){this._sessionService=t,this._logger=r("ListenToConnectedDeviceUseCase")}_logger;execute(){return this._logger.info("Observe connected devices"),this._sessionService.sessionsObs.pipe(La(t=>new N1({transportConnectedDevice:t.connectedDevice,sessionId:t.id})))}};R_=xj([Et(),__(0,Ye(fn.DeviceSessionService)),__(1,Ye(xr.LoggerPublisherServiceFactory))],R_);var Ej=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},pm=(e,t)=>(r,n)=>t(r,n,e);let O_=class{constructor(t,r,n){this.connectUseCase=t,this.disconnectUseCase=r,this._logger=n("ReconnectUseCase")}_logger;async execute({device:t,sessionRefresherOptions:r}){return this._logger.debug("Reconnecting device session",{data:{deviceId:t.id,transport:t.transport}}),await this.disconnectUseCase.execute({sessionId:t.sessionId}),this.connectUseCase.execute({device:t,sessionRefresherOptions:r})}};O_=Ej([Et(),pm(0,Ye(XC.ConnectUseCase)),pm(1,Ye(XC.DisconnectUseCase)),pm(2,Ye(xr.LoggerPublisherServiceFactory))],O_);var Cj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},_j=(e,t)=>(r,n)=>t(r,n,e);let $_=class{constructor(t){this._transportService=t}mapDiscoveredDevice(t){const r=new MT({id:t.id,model:t.deviceModel.id,name:t.deviceModel.productName});return{id:t.id,deviceModel:r,transport:t.transport,name:t.name||r.name,rssi:t.rssi}}execute({transport:t}={}){if(!t){const r=this._transportService.getAllTransports();return l2(...r).pipe(M1(n=>n.startDiscovering().pipe(La(i=>this.mapDiscoveredDevice(i)))))}return this._transportService.getTransport(t).caseOf({Just:r=>r.startDiscovering().pipe(La(n=>this.mapDiscoveredDevice(n))),Nothing:()=>{throw new D1(new Error("Unknown transport"))}})}};$_=Cj([Et(),_j(0,Ye(Na.TransportService))],$_);var Rj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},T_=(e,t)=>(r,n)=>t(r,n,e);let I_=class{constructor(t,r){this.transportService=t,this._logger=r("StopDiscoveringUseCase")}_logger;async execute(){this._logger.debug("Stopping discovering devices");for(const t of this.transportService.getAllTransports())await t.stopDiscovering()}};I_=Rj([Et(),T_(0,Ye(Na.TransportService)),T_(1,Ye(xr.LoggerPublisherServiceFactory))],I_);var Du=(e=>(e[e.Fatal=0]="Fatal",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info",e[e.Debug=4]="Debug",e))(Du||{});let Oj=class{format(t){return Array.isArray(t)?t.map(r=>`[${r}]`).join(" "):`[${t}]`}};function Y0(e,t){if(typeof e=="bigint")return e.toString();if(Array.isArray(e))return t.has(e)?"[Circular]":(t.add(e),e.map(r=>Y0(r,t)));if(e!==null&&typeof e=="object"){if(t.has(e))return"[Circular]";t.add(e);const r={};for(const[n,i]of Object.entries(e))r[n]=Y0(i,t);return r}return e}function $j(e){const t=new WeakSet;t.add(e);const r={};for(const[n,i]of Object.entries(e))r[n]=Y0(i,t);return r}var Tj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i};let A_=class{subscribers;tag;tagFormatter;constructor(t,r,n=new Oj){this.subscribers=t,this.tag=r,this.tagFormatter=n}_log(t,r,n){const i=n?.data?$j(n.data):void 0,o=n?.tag??this.tag,s=this.tagFormatter.format(o);this.subscribers.forEach(u=>{const c={timestamp:n?.timestamp??Date.now(),tag:s,data:i};u.log(t,r,c)})}info(t,r){this._log(Du.Info,t,r)}warn(t,r){this._log(Du.Warning,t,r)}debug(t,r){this._log(Du.Debug,t,r)}error(t,r){this._log(Du.Error,t,r)}};A_=Tj([Et()],A_);let sc=class extends Error{status;statusText;responseBody;isTimeout;cause;constructor(t){super(t.message),this.name="DmkNetworkClientError",this.status=t.status,this.statusText=t.statusText,this.responseBody=t.responseBody,this.isTimeout=t.isTimeout??!1,this.cause=t.cause}};const Ij="application/json";function Aj(e,t){if(!t)return e;const r=e.endsWith("/")?e.slice(0,-1):e,n=t.startsWith("/")?t:`/${t}`;return`${r}${n}`}function kj(e){const t=[];for(const[r,n]of Object.entries(e))n!=null&&t.push(`${encodeURIComponent(r)}=${encodeURIComponent(String(n))}`);return t.join("&")}function as(e){const{url:t,params:r,baseUrl:n}=e,i=/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:n?Aj(n,t):t,o=r?kj(r):"";if(o.length===0)return i;const s=i.includes("?")?"&":"?";return`${i}${s}${o}`}function Pj(e,t){const r=t.toLowerCase();return Object.keys(e).some(n=>n.toLowerCase()===r)}function Mj(e){return!!(typeof e=="string"||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof Blob<"u"&&e instanceof Blob||typeof FormData<"u"&&e instanceof FormData||typeof URLSearchParams<"u"&&e instanceof URLSearchParams||typeof ReadableStream<"u"&&e instanceof ReadableStream)}function Dj(e){const{method:t,body:r,defaultHeaders:n,perRequestHeaders:i}=e,o={...n,...i};return r===void 0||t==="GET"||t==="HEAD"?{body:void 0,headers:o}:Mj(r)?{body:r,headers:o}:(Pj(o,"content-type")||(o["Content-Type"]=Ij),{body:JSON.stringify(r),headers:o})}function Lj(e){const{timeoutMs:t}=e;if(!t||t<=0)return{signal:void 0,cleanup:()=>{}};const r=new AbortController,n=setTimeout(()=>{r.abort()},t);return{signal:r.signal,cleanup:()=>clearTimeout(n)}}async function Fj(e,t){switch(t){case"void":return;case"text":return await e.text();case"blob":return await e.blob();case"arrayBuffer":return await e.arrayBuffer();default:{const r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch(n){throw new sc({message:"Failed to parse JSON response body",status:e.status,statusText:e.statusText,responseBody:r,cause:n})}}}}async function Nj(e){try{return await e.text()}catch{return}}function jj(e){const{cause:t,timeoutMs:r}=e,n=!!(r&&r>0);if(t instanceof Error&&(t.name==="AbortError"||t.name==="TimeoutError")){const i=t.name==="TimeoutError"||n;return new sc({message:i?"Request timed out":"Request aborted",isTimeout:i,cause:t})}return new sc({message:t instanceof Error?t.message:"Network request failed",cause:t})}let g2=class{baseUrl;defaultHeaders;fetchImpl;constructor(t={}){this.baseUrl=t.baseUrl,this.defaultHeaders=t.headers??{},this.fetchImpl=t.fetch}getFetch(){return this.fetchImpl??globalThis.fetch.bind(globalThis)}get(t,r){return this.request({...r,method:"GET",url:t}).then(n=>n.data)}post(t,r,n){return this.request({...n,method:"POST",url:t,body:r}).then(i=>i.data)}put(t,r,n){return this.request({...n,method:"PUT",url:t,body:r}).then(i=>i.data)}patch(t,r,n){return this.request({...n,method:"PATCH",url:t,body:r}).then(i=>i.data)}delete(t,r){return this.request({...r,method:"DELETE",url:t}).then(n=>n.data)}head(t,r){return this.request({...r,method:"HEAD",url:t,responseType:"void"}).then(()=>{})}async request(t){const r=as({url:t.url,params:t.params,baseUrl:this.baseUrl}),{body:n,headers:i}=Dj({method:t.method,body:t.body,defaultHeaders:this.defaultHeaders,perRequestHeaders:t.headers}),{signal:o,cleanup:s}=Lj({timeoutMs:t.timeoutMs}),u=t.throwOnHttpError??!0,c=t.responseType??"json";try{let f;try{f=await this.getFetch()(r,{method:t.method,headers:i,body:n,signal:o})}catch(p){throw jj({cause:p,timeoutMs:t.timeoutMs})}if(!f.ok&&u){const p=await Nj(f);throw new sc({message:`HTTP error ${f.status} ${f.statusText}`.trim(),status:f.status,statusText:f.statusText,responseBody:p})}return{data:await Fj(f,c),status:f.status,statusText:f.statusText,headers:f.headers,ok:f.ok}}finally{s()}}};var Lu=(e=>(e.currency="currency",e.plugin="plugin",e.tool="tool",e.swap="swap",e))(Lu||{});const zj=1,Bj="0";let cp=class{constructor(t){this.error=t,this.originalError=t}_tag="FetchError";originalError};var Fu=(e=>(e.currency="currency",e.plugin="plugin",e.tool="tool",e.swap="swap",e))(Fu||{}),Vj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},Hj=(e,t)=>(r,n)=>t(r,n,e);const qo=e=>e instanceof sc&&e.cause!==void 0?new cp(e.cause):new cp(e);let k_=class{http;_provider=zj;_firmwareDistributionSalt=Bj;constructor({managerApiUrl:t,provider:r,firmwareDistributionSalt:n}){this.http=new g2({baseUrl:t}),this._provider=r,this._firmwareDistributionSalt=n}setProvider(t){this._provider===t||t<1||(this._provider=t)}getProvider(){return this._provider}getAppList(t){const{targetId:r,firmwareVersionName:n}=t;return dt(()=>this.http.get("/v2/apps/by-target",{params:{target_id:r,provider:this._provider,firmware_version_name:n}})).chain(i=>this.mapApplicationDtoToApplication(i)).mapLeft(qo)}getMcuList(){return dt(()=>this.http.get("/mcu_versions")).chain(t=>this.mapMcuDtoToMcu(t)).mapLeft(qo)}getDeviceVersion(t){const{targetId:r}=t;return dt(()=>this.http.get("/get_device_version",{params:{target_id:r,provider:this._provider}})).chain(n=>this.mapDeviceVersionDto(n)).mapLeft(qo)}getFirmwareVersion(t){const{deviceId:r,version:n}=t;return dt(()=>this.http.get("/get_firmware_version",{params:{device_version:r,version_name:n,provider:this._provider}})).chain(i=>this.mapFinalFirmwareDto(i)).mapLeft(qo)}getFirmwareVersionById(t){return dt(()=>this.http.get(`/firmware_final_versions/${t}`)).chain(r=>this.mapFinalFirmwareDto(r)).mapLeft(qo)}getOsuFirmwareVersion(t){const{deviceId:r,version:n}=t;return dt(()=>this.http.get("/get_osu_version",{params:{device_version:r,version_name:n,provider:this._provider}})).chain(i=>this.mapOsuFirmwareDto(i)).mapLeft(qo)}getLatestFirmwareVersion(t){const r="34.27.0",{currentFinalFirmwareId:n,deviceId:i}=t;return dt(()=>this.http.get("/get_latest_firmware",{params:{current_se_firmware_final_version:n,device_version:i,provider:this._provider,salt:this._firmwareDistributionSalt,livecommonversion:r}})).chain(o=>this.mapLatestFirmwareDto(o)).mapLeft(qo)}getAppsByHash(t){const{hashes:r}=t;return dt(()=>this.http.post("/v2/apps/hash",r)).chain(n=>this.mapNullableApplicationDtoToApplication(n)).mapLeft(qo)}getLanguagePackages(t){const{deviceId:r,currentFinalFirmwareId:n}=t;return dt(()=>this.http.get("/language-packages",{params:{device_version:r,current_se_firmware_final_version:n}})).chain(i=>this.mapLanguagesDtoToLanguages(i)).mapLeft(qo)}mapAppTypeDtoToAppType(t){if(t===null)return null;switch(t){case Fu.currency:return Lu.currency;case Fu.plugin:return Lu.plugin;case Fu.tool:return Lu.tool;case Fu.swap:return Lu.swap}}mapApplicationDtoToApplication(t){return dt(()=>Promise.resolve(t.map(r=>this.mapApplicationDto(r))))}mapNullableApplicationDtoToApplication(t){return dt(()=>Promise.resolve(t.map(r=>r===null?null:this.mapApplicationDto(r))))}mapApplicationDto(t){if(typeof t!="object"||typeof t.versionId!="number"||typeof t.versionName!="string"||t.versionDisplayName!==null&&typeof t.versionDisplayName!="string"||typeof t.version!="string"||t.currencyId!==null&&typeof t.currencyId!="string"||t.description!==null&&typeof t.description!="string"||t.applicationType!==null&&typeof t.applicationType!="string"||typeof t.dateModified!="string"||t.icon!==null&&typeof t.icon!="string"||t.authorName!==null&&typeof t.authorName!="string"||t.supportURL!==null&&typeof t.supportURL!="string"||t.contactURL!==null&&typeof t.contactURL!="string"||t.sourceURL!==null&&typeof t.sourceURL!="string"||t.compatibleWallets!==null&&typeof t.compatibleWallets!="string"||typeof t.hash!="string"||typeof t.perso!="string"||typeof t.firmware!="string"||typeof t.firmwareKey!="string"||typeof t.delete!="string"||typeof t.deleteKey!="string"||t.bytes!==null&&typeof t.bytes!="number"||t.warning!==null&&typeof t.warning!="string"||typeof t.isDevTools!="boolean"||t.category!==null&&typeof t.category!="number"||t.parent!==null&&typeof t.parent!="number"||t.parentName!==null&&typeof t.parentName!="string")throw new Error(`Incomplete application: ${JSON.stringify(t)}`);const{applicationType:r,hash:n,perso:i,firmware:o,firmwareKey:s,delete:u,deleteKey:c,...f}=t;return{...f,hash:n,perso:i,firmware:o,firmwareKey:s,delete:u,deleteKey:c,applicationType:this.mapAppTypeDtoToAppType(r)}}mapMcuDtoToMcu(t){return dt(()=>Promise.resolve(t.map(r=>{if(typeof r!="object"||typeof r.id!="number"||typeof r.name!="string"||typeof r.from_bootloader_version!="string")throw new Error(`Incomplete MCU version: ${JSON.stringify(r)}`);return{id:r.id,name:r.name,fromBootloaderVersion:r.from_bootloader_version,providers:r.providers}})))}mapDeviceVersionDto(t){return dt(()=>{if(typeof t!="object"||typeof t.id!="number")throw new Error(`Incomplete device version: ${JSON.stringify(t)}`);const r={id:t.id};return Promise.resolve(r)})}mapFinalFirmwareDto(t){return dt(()=>{if(typeof t!="object"||typeof t.id!="number"||typeof t.version!="string"||typeof t.perso!="string"||t.firmware!==null&&typeof t.firmware!="string"||t.firmware_key!==null&&typeof t.firmware_key!="string"||t.hash!==null&&typeof t.hash!="string"||t.bytes!==null&&typeof t.bytes!="number"||!Array.isArray(t.mcu_versions))throw new Error(`Incomplete final firmware: ${JSON.stringify(t)}`);const r={id:t.id,version:t.version,perso:t.perso,firmware:t.firmware,firmwareKey:t.firmware_key,hash:t.hash,bytes:t.bytes,mcuVersions:t.mcu_versions};return Promise.resolve(r)})}mapLatestFirmwareDto(t){return dt(()=>{if(t.result==="null")return Promise.resolve(null);if(t.result!=="success"||!t.se_firmware_osu_version)throw new Error(`Latest firmware could not be retrieved: ${t.result}`);const r=t.se_firmware_osu_version;return Promise.resolve(r)}).chain(r=>r===null?dt(()=>Promise.resolve(Dt)):this.mapOsuFirmwareDto(r).map(n=>Lr(n)))}mapOsuFirmwareDto(t){return dt(()=>{if(typeof t!="object"||typeof t.id!="number"||t.notes!==null&&typeof t.notes!="string"||typeof t.perso!="string"||typeof t.firmware!="string"||typeof t.firmware_key!="string"||t.hash!==null&&typeof t.hash!="string"||typeof t.next_se_firmware_final_version!="number")throw new Error(`Incomplete latest firmware: ${JSON.stringify(t)}`);const r={id:t.id,notes:t.notes,perso:t.perso,firmware:t.firmware,firmwareKey:t.firmware_key,hash:t.hash,nextFinalFirmware:t.next_se_firmware_final_version};return Promise.resolve(r)})}mapLanguagesDtoToLanguages(t){return dt(()=>Promise.resolve(t.map(r=>this.mapLanguageDto(r))))}mapLanguageDto(t){if(typeof t!="object"||typeof t.language!="string"||typeof t.languagePackageVersionId!="number"||typeof t.version!="string"||typeof t.language_package_id!="number"||typeof t.apdu_install_url!="string"||typeof t.apdu_uninstall_url!="string"||typeof t.bytes!="number"||typeof t.date_creation!="string"||typeof t.date_last_modified!="string")throw new Error(`Incomplete language version: ${JSON.stringify(t)}`);return{language:t.language,languagePackageVersionId:t.languagePackageVersionId,version:t.version,languagePackageId:t.language_package_id,apduInstallUrl:t.apdu_install_url,apduUninstallUrl:t.apdu_uninstall_url,bytes:t.bytes,dateCreation:t.date_creation,dateLastModified:t.date_last_modified}}};k_=Vj([Et(),Hj(0,Ye(zp.DmkConfig))],k_);var Uj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},Wj=(e,t)=>(r,n)=>t(r,n,e);let P_=class{constructor(t){this.dataSource=t}getAppList(t){const r={targetId:t.targetId.toString(),firmwareVersionName:t.seVersion};return this.dataSource.getAppList(r)}getDeviceVersion(t){const r={targetId:t.targetId.toString()};return this.dataSource.getDeviceVersion(r)}getFirmwareVersion(t,r){const n={version:t.seVersion,deviceId:r.id};return this.dataSource.getFirmwareVersion(n)}getOsuFirmwareVersion(t,r){const n={version:t.seVersion,deviceId:r.id};return this.dataSource.getOsuFirmwareVersion(n)}getLatestFirmwareVersion(t,r){const n={currentFinalFirmwareId:t.id,deviceId:r.id};return this.dataSource.getLatestFirmwareVersion(n)}getNextFirmwareVersion(t){return this.dataSource.getFirmwareVersionById(t.nextFinalFirmware)}getLanguagePackages(t,r){const n={deviceId:t.id,currentFinalFirmwareId:r.id};return this.dataSource.getLanguagePackages(n)}getMcuList(){return this.dataSource.getMcuList()}getAppsByHash(t){const r={hashes:t};return dt(async({fromPromise:n,throwE:i})=>{if(r.hashes.length===0)return[];try{return await n(this.dataSource.getAppsByHash(r))}catch(o){return o instanceof cp?i(o):i(new cp(o))}})}getProvider(){return this.dataSource.getProvider()}};P_=Uj([Et(),Wj(0,Ye(zp.ManagerApiDataSource))],P_);var Gj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},M_=(e,t)=>(r,n)=>t(r,n,e);let D_=class{constructor(t,r){this.sessionService=t,this.managerApiDataSource=r}execute(t){for(const r of this.sessionService.getDeviceSessions()){const n=r.getDeviceSessionState();n.sessionStateType!==Il.Connected&&r.setDeviceSessionState({...n,firmwareUpdateContext:void 0,installedApps:[],appsUpdates:void 0,catalog:void 0})}this.managerApiDataSource.setProvider(t)}};D_=Gj([Et(),M_(0,Ye(fn.DeviceSessionService)),M_(1,Ye(zp.ManagerApiDataSource))],D_);var qj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},Xj=(e,t)=>(r,n)=>t(r,n,e);let L_=class{webSocketBaseUrl;constructor({webSocketUrl:t}){this.webSocketBaseUrl=t}genuineCheck(t){const r=as({baseUrl:this.webSocketBaseUrl,url:"/genuine",params:t});return this._connectWebSocket(r)}installApp(t){const r=as({baseUrl:this.webSocketBaseUrl,url:"/install",params:t});return this._connectWebSocket(r)}listInstalledApps(t){const r=as({baseUrl:this.webSocketBaseUrl,url:"/apps/list",params:t});return this._connectWebSocket(r)}uninstallApp(t){const r=as({baseUrl:this.webSocketBaseUrl,url:"/install",params:t});return this._connectWebSocket(r)}updateFirmware(t){const r=as({baseUrl:this.webSocketBaseUrl,url:"/install",params:t});return this._connectWebSocket(r)}updateMcu(t){const r=as({baseUrl:this.webSocketBaseUrl,url:"/mcu",params:t});return this._connectWebSocket(r)}_connectWebSocket(t){try{return nr(new t4(t))}catch(r){return Wt(new s4(r))}}};L_=qj([Et(),Xj(0,Ye(F1.DmkConfig))],L_);var Kj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},Yj=(e,t)=>(r,n)=>t(r,n,e);let F_=class{constructor(t){this.dataSource=t}genuineCheck(t,r){const n={targetId:t.targetId.toString(),perso:r.perso};return this.dataSource.genuineCheck(n)}installApp(t,r){const{perso:n,firmware:i,firmwareKey:o,hash:s}=r,u={targetId:t.targetId.toString(),perso:n,firmware:i,firmwareKey:o,hash:s};return this.dataSource.installApp(u)}listInstalledApps(t,r){const n={targetId:t.targetId.toString(),perso:r.perso};return this.dataSource.listInstalledApps(n)}uninstallApp(t,r){const{perso:n,delete:i,deleteKey:o,hash:s}=r,u={targetId:t.targetId.toString(),perso:n,firmware:i,firmwareKey:o,hash:s};return this.dataSource.uninstallApp(u)}updateFirmware(t,r){const n={targetId:t.targetId.toString(),perso:r.perso,firmware:r.firmware,firmwareKey:r.firmwareKey};return this.dataSource.updateFirmware(n)}updateMcu(t,r){const n={targetId:t.targetId.toString(),version:r.version};return this.dataSource.updateMcu(n)}};F_=Kj([Et(),Yj(0,Ye(F1.SecureChannelDataSource))],F_);var Qj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},N_=(e,t)=>(r,n)=>t(r,n,e);let j_=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("SendApduUseCase")}async execute({sessionId:t,apdu:r,abortTimeout:n,triggersDisconnection:i}){return this._sessionService.getDeviceSessionById(t).caseOf({Right:async o=>(await o.sendApdu(r,{abortTimeout:n,triggersDisconnection:i})).caseOf({Right:s=>s,Left:s=>{throw this._logger.error("Error sending APDU",{data:{sessionId:t,apdu:r,error:s}}),s}}),Left:o=>{throw this._logger.error("Error getting deviceSession",{data:{error:o}}),o}})}};j_=Qj([Et(),N_(0,Ye(fn.DeviceSessionService)),N_(1,Ye(xr.LoggerPublisherServiceFactory))],j_);var Jj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},Zs=(e,t)=>(r,n)=>t(r,n,e);let z_=class{constructor(t,r,n,i,o,s){if(this._config=r,this._loggerModuleFactory=n,this._deviceModelDataSource=i,this._apduSenderServiceFactory=o,this._apduReceiverServiceFactory=s,this._logger=n("TransportService"),t.length===0)throw this._logger.warn("No transports provided, please check your configuration"),new e4("No transports provided, please check your configuration");for(const u of t){const c=this.addTransport(u);if(c.isLeft())throw c.extract()}}_transports=new Map;_logger;addTransport(t){const r=t({deviceModelDataSource:this._deviceModelDataSource,loggerServiceFactory:this._loggerModuleFactory,config:this._config,apduSenderServiceFactory:this._apduSenderServiceFactory,apduReceiverServiceFactory:this._apduReceiverServiceFactory});return this.addTransportInternal(r)}addTransportInternal(t){return this.getTransport(t.getIdentifier()).isJust()?(this._logger.warn(`Transport ${t.getIdentifier()} already exists, please check your configuration`),Wt(new Z3(`Transport ${t.getIdentifier()} already exists, please check your configuration`))):(this._transports.set(t.getIdentifier(),t),nr(void 0))}getTransport(t){return _n.fromNullable(this._transports.get(t))}getAllTransports(){return Array.from(this._transports.values())}closeConnection(t){this.getTransport(t.transport).map(r=>r.disconnect({connectedDevice:t}))}};z_=Jj([Et(),Zs(0,Ye(Na.TransportsInput)),Zs(1,Ye(Na.DmkConfig)),Zs(2,Ye(xr.LoggerPublisherServiceFactory)),Zs(3,Ye(J4.DeviceModelDataSource)),Zs(4,Ye(fn.ApduSenderServiceFactory)),Zs(5,Ye(fn.ApduReceiverServiceFactory))],z_);const Zj={ADD_LOG:"addLog"};function ez(e){return{startListeningCommand:()=>e.sendMessage(Jo.START_LISTENING_DEVICES,"{}"),stopListeningCommand:()=>e.sendMessage(Jo.STOP_LISTENING_DEVICES,"{}"),startDiscoveringCommand:()=>e.sendMessage(Jo.START_DISCOVERING,"{}"),stopDiscoveringCommand:()=>e.sendMessage(Jo.STOP_DISCOVERING,"{}"),connectDeviceCommand:(t,r)=>e.sendMessage(Jo.CONNECT_DEVICE,JSON.stringify({deviceId:t,sessionRefresherOptions:r}))}}function tz(e){return{getProviderCommand:()=>e.sendMessage(Jo.GET_PROVIDER,"{}"),setProviderCommand:t=>e.sendMessage(Jo.SET_PROVIDER,JSON.stringify({provider:t}))}}let rz=0;function nz(e){return{sendApduCommand:(t,r)=>{const n=`apdu-${++rz}`,i=r.match(/.{1,2}/g)?.map(o=>parseInt(o,16))||[];return e.sendMessage(Jo.SEND_APDU,JSON.stringify({sessionId:t,apdu:i,requestId:n})),n}}}function iz(e){const{timestamp:t,tag:r,verbosity:n,message:i,payloadJSON:o}=JSON.parse(e);return{timestamp:t,tag:r,verbosity:n,message:i,payloadJSON:o,payload:JSON.parse(o)}}const oz="apdu-exchange";function az(e){const t=e.payload;return typeof t!="object"||t===null||Array.isArray(t)||t.type!==oz||typeof t.apdu!="string"||typeof t.response!="string"?null:{sessionId:typeof t.sessionId=="string"?t.sessionId:void 0,apdu:t.apdu,response:t.response,timestamp:e.timestamp}}function sz(e,t){try{const{module:r}=JSON.parse(e);t(n=>new Set([...n,r]))}catch(r){console.error("Failed to parse moduleConnected payload",r)}}function lz(e,t,r,n){const i=iz(e);if(i!==null){if(t(o=>[...o,i]),n){const o=az(i);o!==null&&r(s=>[...s,o])}return!0}return!1}function uz(e,t){try{const r=JSON.parse(e);t(r)}catch(r){console.error("Failed to parse connectedDevicesUpdate payload",r)}}function cz(e,t){try{const{sessionId:r,state:n}=JSON.parse(e);t(i=>new Map(i).set(r,n))}catch(r){console.error("Failed to parse deviceSessionStateUpdate payload",r)}}function fz(e,t){try{const r=JSON.parse(e);t(r)}catch(r){console.error("Failed to parse discoveredDevicesUpdate payload",r)}}function dz(e,t){try{const{provider:r}=JSON.parse(e);t(r)}catch(r){console.error("Failed to parse providerValue payload",r)}}function pz(e,t){try{const r=JSON.parse(e);t(n=>new Map(n).set(r.requestId,r))}catch(r){console.error("Failed to parse apduResponse payload",r)}}function hz(e){const[t,r]=x.useState([]),[n,i]=x.useState([]),[o,s]=x.useState([]),[u,c]=x.useState(new Set),[f,p]=x.useState([]),[g,h]=x.useState(new Map),[m,y]=x.useState([]),[b,S]=x.useState(!1),[_,C]=x.useState(!1),[O,R]=x.useState(null),[$,T]=x.useState(new Map),[P,L]=x.useState([]),[z,B]=x.useState(!1),X=x.useRef(!1),Y=x.useMemo(()=>({...e,sendMessage:(W,ve)=>{e.sendMessage(W,ve),i(se=>[...se,{type:W,payload:ve}])}}),[e]);x.useEffect(()=>{const{unsubscribe:W}=e.listenToMessages((ve,se)=>{switch(r(Ee=>[...Ee,{type:ve,payload:se}]),ve){case nN:sz(se,c);break;case Cu.CONNECTED_DEVICES_UPDATE:uz(se,p);break;case Cu.DEVICE_SESSION_STATE_UPDATE:cz(se,h);break;case Cu.DISCOVERED_DEVICES_UPDATE:fz(se,y);break;case Cu.PROVIDER_VALUE:dz(se,R);break;case Cu.APDU_RESPONSE:pz(se,T);break;case Zj.ADD_LOG:lz(se,s,L,X.current);break}});return W},[e]);const N=x.useMemo(()=>ez(Y),[Y]),j=x.useMemo(()=>tz(Y),[Y]),F=x.useMemo(()=>nz(Y),[Y]),q=x.useCallback(()=>{S(!0),y([]),N.startListeningCommand()},[N]),U=x.useCallback(()=>{S(!1),y([]),N.stopListeningCommand()},[N]),M=x.useCallback(()=>{C(!0),y([]),N.startDiscoveringCommand()},[N]),G=x.useCallback(()=>{C(!1),y([]),N.stopDiscoveringCommand()},[N]),K=x.useCallback(()=>{s([])},[]),D=x.useCallback(()=>{X.current=!0,B(!0)},[]),A=x.useCallback(()=>{X.current=!1,B(!1)},[]),J=x.useCallback(()=>{L([])},[]),Z=u.has(_E.LOGGER),ne=u.has(_E.DMK_INSPECTOR);return{receivedMessages:t,sentMessages:n,logs:o,connectedModules:u,connectedDevices:f,sessionStates:g,discoveredDevices:m,isListening:b,isActivelyDiscovering:_,isLoggerConnected:Z,isInspectorConnected:ne,providerValue:O,apduResponses:$,apduExchanges:P,isRecordingExchanges:z,sendMessage:Y.sendMessage,clearLogs:K,startRecordingExchanges:D,stopRecordingExchanges:A,clearRecordedExchanges:J,startListening:q,stopListening:U,startDiscovering:M,stopDiscovering:G,connectDevice:N.connectDeviceCommand,getProvider:j.getProviderCommand,setProvider:j.setProviderCommand,sendApdu:F.sendApduCommand}}const gz=ge.div`
465
+ Found @inject decorator at method "${f.toString()}" at class "${c.constructor.name}"`);Uu(c.constructor,Vd,Hd,FC(u(c),f))}})(e,t)(r,n,i)}catch(o){g4(r,n,i,o)}}}function sm(e,t){return r=>{const n=t(r);return i=>(n(i),e(i))}}function Ye(e){return v4(h4(ac.singleInjection,e),f4)}(function(e){e[e.method=0]="method",e[e.parameter=1]="parameter",e[e.property=2]="property"})(Oa||(Oa={}));const NC="@inversifyjs/core/classIsInjectableFlagReflectKey",m4=[Array,BigInt,Boolean,Function,Number,Object,String];function y4(e){const t=L1(e,"design:paramtypes");t!==void 0&&Uu(e,Vd,Hd,(function(r){return n=>(r.forEach(((i,o)=>{var s;n.constructorArguments[o]!==void 0||(s=i,m4.includes(s))||(n.constructorArguments[o]=(function(u){return{isFromTypescriptParamType:!0,kind:ac.singleInjection,name:void 0,optional:!1,tags:new Map,value:u}})(i))})),n)})(t))}function Et(e){return t=>{(function(r){if(L1(r,NC)!==void 0)throw new Fa(So.injectionDecoratorConflict,`Cannot apply @injectable decorator multiple times at class "${r.name}"`);l4(r,NC,!0)})(t),y4(t)}}var jC;(function(e){e[e.multipleInjection=0]="multipleInjection",e[e.singleInjection=1]="singleInjection"})(jC||(jC={}));var zC;(function(e){e[e.singleMandatory=0]="singleMandatory",e[e.singleOptional=1]="singleOptional",e[e.multipleMandatory=2]="multipleMandatory",e[e.multipleOptional=3]="multipleOptional",e[e.length=4]="length"})(zC||(zC={}));let b4=class{constructor(t,r,n,i,o){this.deviceModel=t,this.serviceUuid=r,this.writeUuid=n,this.writeCmdUuid=i,this.notifyUuid=o}},Js=class{id;productName;usbProductId;bootloaderUsbProductId;usbOnly;memorySize;getBlockSize;masks;bluetoothSpec;constructor(t){this.id=t.id,this.productName=t.productName,this.usbProductId=t.usbProductId,this.bootloaderUsbProductId=t.bootloaderUsbProductId,this.usbOnly=t.usbOnly,this.memorySize=t.memorySize,this.getBlockSize=t.getBlockSize,this.masks=t.masks,this.bluetoothSpec=t.bluetoothSpec}};var S4=Object.defineProperty,w4=(e,t,r)=>t in e?S4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},E4=(e,t,r)=>w4(e,t+"",r);let $a=class{getAllDeviceModels(){return Object.values($a.deviceModelByIds)}getDeviceModel(t){return $a.deviceModelByIds[t.id]}filterDeviceModels(t){return this.getAllDeviceModels().filter(r=>Object.entries(t).every(([n,i])=>r[n]===i))}getBluetoothServicesInfos(){return Object.values($a.deviceModelByIds).reduce((t,r)=>{const{bluetoothSpec:n}=r;return n?{...t,...n.reduce((i,o)=>({...i,[o.serviceUuid]:new b4(r,o.serviceUuid,o.writeUuid,o.writeCmdUuid,o.notifyUuid)}),{})}:t},{})}getBluetoothServices(){return Object.values($a.deviceModelByIds).map(t=>(t.bluetoothSpec||[]).map(r=>r.serviceUuid)).flat().filter(t=>!!t)}};E4($a,"deviceModelByIds",{[Xt.NANO_S]:new Js({id:Xt.NANO_S,productName:"Ledger Nano S",usbProductId:16,bootloaderUsbProductId:1,usbOnly:!0,memorySize:320*1024,getBlockSize:e=>EC.lt(EC.coerce(e.firmwareVersion)??"","2.0.0")?4*1024:2*1024,masks:[823132160]}),[Xt.NANO_SP]:new Js({id:Xt.NANO_SP,productName:"Ledger Nano S Plus",usbProductId:80,bootloaderUsbProductId:5,usbOnly:!0,memorySize:1533*1024,getBlockSize:()=>512,masks:[856686592]}),[Xt.NANO_X]:new Js({id:Xt.NANO_X,productName:"Ledger Nano X",usbProductId:64,bootloaderUsbProductId:4,usbOnly:!1,memorySize:2*1024*1024,getBlockSize:()=>4*1024,masks:[855638016],bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}]}),[Xt.STAX]:new Js({id:Xt.STAX,productName:"Ledger Stax",usbProductId:96,bootloaderUsbProductId:6,usbOnly:!1,memorySize:1533*1024,getBlockSize:()=>512,masks:[857735168],bluetoothSpec:[{serviceUuid:"13d63400-2c97-6004-0000-4c6564676572",notifyUuid:"13d63400-2c97-6004-0001-4c6564676572",writeUuid:"13d63400-2c97-6004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-6004-0003-4c6564676572"}]}),[Xt.FLEX]:new Js({id:Xt.FLEX,productName:"Ledger Flex",usbProductId:112,bootloaderUsbProductId:7,usbOnly:!1,memorySize:1533*1024,getBlockSize:()=>512,masks:[858783744],bluetoothSpec:[{serviceUuid:"13d63400-2c97-3004-0000-4c6564676572",notifyUuid:"13d63400-2c97-3004-0001-4c6564676572",writeUuid:"13d63400-2c97-3004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-3004-0003-4c6564676572"}]}),[Xt.APEX]:new Js({id:Xt.APEX,productName:"Ledger Nano Gen5",usbProductId:128,bootloaderUsbProductId:8,usbOnly:!1,memorySize:1533*1024,getBlockSize:()=>512,masks:[859832320],bluetoothSpec:[{serviceUuid:"13d63400-2c97-8004-0000-4c6564676572",notifyUuid:"13d63400-2c97-8004-0001-4c6564676572",writeUuid:"13d63400-2c97-8004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-8004-0003-4c6564676572"},{serviceUuid:"13d63400-2c97-9004-0000-4c6564676572",notifyUuid:"13d63400-2c97-9004-0001-4c6564676572",writeUuid:"13d63400-2c97-9004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-9004-0003-4c6564676572"}]})}),$a=x4([Et()],$a);let C4=class{statusCode;data;constructor({statusCode:t,data:r}){this.statusCode=t,this.data=r}};const _4=5,os=1,G0=2,hl=2,q0=2,Dr=[];for(let e=0;e<256;++e)Dr.push((e+256).toString(16).slice(1));function R4(e,t=0){return(Dr[e[t+0]]+Dr[e[t+1]]+Dr[e[t+2]]+Dr[e[t+3]]+"-"+Dr[e[t+4]]+Dr[e[t+5]]+"-"+Dr[e[t+6]]+Dr[e[t+7]]+"-"+Dr[e[t+8]]+Dr[e[t+9]]+"-"+Dr[e[t+10]]+Dr[e[t+11]]+Dr[e[t+12]]+Dr[e[t+13]]+Dr[e[t+14]]+Dr[e[t+15]]).toLowerCase()}let lm;const O4=new Uint8Array(16);function $4(){if(!lm){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");lm=crypto.getRandomValues.bind(crypto)}return lm(O4)}const T4=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),BC={randomUUID:T4};function jp(e,t,r){if(BC.randomUUID&&!e)return BC.randomUUID();e=e||{};const n=e.random||(e.rng||$4)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,R4(n)}const ps={getLastBytesFrom(e,t){return e.slice(-t)},getFirstBytesFrom(e,t){return e.slice(0,t)},bytesToNumber(e){return e.reduce((t,r,n)=>t+r*Math.pow(256,e.length-1-n),0)},numberToByteArray(e,t){return new Uint8Array(t).map((r,n)=>e>>8*(t-1-n)&255)}},VC=2,um=800;let HC=class{_tag="FramerOverflowError";originalError;constructor(){this.originalError=new Error("Frame header length is greater than frame size")}},I4=class{_tag="FramerApduError";originalError;constructor(){this.originalError=new Error("Frame offset is greater than apdu length")}},UC=class{_tag="ReceiverApduError";originalError;constructor(t){this.originalError=new Error(t??"Unable to parse apdu")}},WC=class{_tag="DeviceSessionNotFound";originalError;constructor(t){this.originalError=t??new Error("Device session not found")}},d2=class{_header;_data;constructor({header:t,data:r}){this._header=t,this._data=r}toString(){return JSON.stringify({header:this._header.toString(),data:Zo(this._data)},null,2)}getRawData(){const t=this._header.getRawData(),r=new Uint8Array(t.length+this._data.length);return r.set(t,0),r.set(this._data,t.length),r}getHeader(){return this._header}getData(){return this._data}},p2=class{_uuid;_channel;_headTag;_index;_length;_dataLength;constructor({uuid:t,dataSize:r,index:n,headTag:i,length:o,channel:s}){this._uuid=t,this._dataLength=r,this._index=n,this._headTag=i,this._length=o,this._channel=s}getDataLength(){return this._dataLength.map(t=>ps.bytesToNumber(t))}setDataSize(t){return this._dataLength=t,this}getLength(){return this._length}toString(){return JSON.stringify({uuid:this._uuid.toString(),dataSize:this._dataLength.extract()?.toString(),index:this._index.toString(),headTag:this._headTag.toString(),length:this._length.toString(),channel:this._channel.extract()?.toString()})}getRawData(){return new Uint8Array([...this._channel.caseOf({Just:t=>[...t],Nothing:()=>[]}),...this._headTag,...this._index,...this._dataLength.caseOf({Just:t=>[...t],Nothing:()=>[]})])}};const Er={LoggerPublisherServiceFactory:Symbol.for("LoggerPublisherServiceFactory")};var A4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},k4=(e,t)=>(r,n)=>t(r,n,e);let GC=class{_channel;_logger;_pendingFrames;constructor({channel:t=_n.zero()},r){this._channel=t,this._logger=r("ApduReceiverService"),this._pendingFrames=[]}handleFrame(t){return this.getFrameFromBytes(t).map(r=>{if(this._pendingFrames.push(r),!this._pendingFrames[0])return Dt;const n=this._pendingFrames[0].getHeader().getDataLength();return this.getCompleteFrame(n)})}getCompleteFrame(t){return t.chain(r=>{if(!this.isComplete(r))return this._logger.debug("frame is not complete, waiting for more"),Dt;const n=ps.getFirstBytesFrom(this.concatFrames(this._pendingFrames),r),i=ps.getFirstBytesFrom(n,n.length-VC),o=ps.getLastBytesFrom(n,VC);return this._pendingFrames=[],Lr(new C4({data:i,statusCode:o}))})}getFrameFromBytes(t){const r=this._channel.caseOf({Just:()=>G0,Nothing:()=>0}),n=t.slice(r,r+os),i=t.slice(r+os,r+os+hl),o=i.reduce((h,m)=>h+m,0)===0;if(!o&&this._pendingFrames.length===0)return Wt(new UC);const s=r+os+hl,u=o?q0:0;if(t.length<r+os+hl+u)return Wt(new UC("Unable to parse header from apdu"));const c=o?Lr(t.slice(s,s+u)):Dt,f=s+u,p=t.slice(f),g=new d2({header:new p2({uuid:jp(),channel:this._channel,dataSize:c,headTag:n,index:i,length:r+os+hl+u}),data:p});return nr(g)}isComplete(t){return this._pendingFrames.reduce((r,n)=>r+n.getData().length,0)>=t}concatFrames(t){return t.reduce((r,n)=>Uint8Array.from([...r,...n.getData()]),new Uint8Array(0))}};GC=A4([Et(),k4(1,Ye(Er.LoggerPublisherServiceFactory))],GC);var P4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},M4=(e,t)=>(r,n)=>t(r,n,e);let qC=class{_frameSize;_channel;_padding;_logger;constructor({frameSize:t,channel:r=_n.zero(),padding:n=!1},i){this._frameSize=t,this._channel=r,this._padding=n,this._logger=i("DefaultApduSenderService")}getFrames(t){const r=[];let n=0,i=this.getFrameAtIndex(t,n);for(;i.isRight();)r.push(i.extract()),n+=1,i=this.getFrameAtIndex(t,n).mapLeft(o=>(o instanceof HC||this._logger.error("Error while parsing frame",{data:{error:o}}),o));return r}getFrameAtIndex(t,r){const n=this.getFrameHeaderFrom(r,t.length),i=r===0?0:r*this._frameSize-this.getHeaderSizeSumFrom(r);if(i>=t.length)return Wt(new HC);if(n.getLength()>this._frameSize)return Wt(new I4);const o=this._frameSize-n.getLength(),s=t.slice(i,i+this._frameSize-n.getLength()),u=this._padding?new Uint8Array(o).fill(0):new Uint8Array(s.length<o?s.length:o);u.set(s,0);const c=new d2({header:n,data:u});return nr(c)}getFrameHeaderFrom(t,r){const n=new p2({uuid:jp(),channel:this._channel.map(i=>ps.getLastBytesFrom(i,G0)),headTag:new Uint8Array([_4]),index:ps.numberToByteArray(t,hl),length:this.getFrameHeaderSizeFromIndex(t),dataSize:_n.zero()});return t===0&&n.setDataSize(_n.of(ps.numberToByteArray(r,q0))),n}getHeaderSizeSumFrom(t){let r=this.getFrameHeaderSizeFromIndex(0),n=1;for(;n<t;)r+=this.getFrameHeaderSizeFromIndex(n),n+=1;return r}getFrameHeaderSizeFromIndex(t){return this._channel.caseOf({Just:()=>G0,Nothing:()=>0})+hl+os+(t===0?q0:0)}};qC=P4([Et(),M4(1,Ye(Er.LoggerPublisherServiceFactory))],qC);const X0={LocalConfigDataSource:Symbol.for("LocalConfigDataSource"),RemoteConfigDataSource:Symbol.for("RemoteConfigDataSource"),ConfigService:Symbol.for("ConfigService")},fn={ApduSenderServiceFactory:Symbol.for("ApduSenderServiceFactory"),ApduReceiverServiceFactory:Symbol.for("ApduReceiverServiceFactory"),DeviceSessionService:Symbol.for("DeviceSessionService")},XC={ConnectUseCase:Symbol.for("ConnectUseCase"),DisconnectUseCase:Symbol.for("DisconnectUseCase")},zp={ManagerApiService:Symbol.for("ManagerApiService"),ManagerApiDataSource:Symbol.for("ManagerApiDataSource"),DmkConfig:Symbol.for("ManagerApiDmkConfig")},Na={DmkConfig:Symbol.for("TransportDmkConfig"),TransportService:Symbol.for("TransportService"),TransportsInput:Symbol.for("TransportsInput")};var D4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},KC=(e,t)=>(r,n)=>t(r,n,e);let YC=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("SendCommandUseCase")}async execute({sessionId:t,command:r,abortTimeout:n}){return this._sessionService.getDeviceSessionById(t).caseOf({Right:async i=>await i.sendCommand(r,n),Left:i=>{throw this._logger.error("Error getting session",{data:{error:i}}),i}})}};YC=D4([Et(),KC(0,Ye(fn.DeviceSessionService)),KC(1,Ye(Er.LoggerPublisherServiceFactory))],YC);var L4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i};let QC=class{execute=vi.fn(()=>"stub")};QC=L4([Et()],QC);var F4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},JC=(e,t)=>(r,n)=>t(r,n,e);let ZC=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("ExecuteDeviceActionUseCase")}execute({sessionId:t,deviceAction:r}){return this._sessionService.getDeviceSessionById(t).caseOf({Right:n=>n.executeDeviceAction(r),Left:n=>{throw this._logger.error("Error getting session",{data:{error:n}}),n}})}};ZC=F4([Et(),JC(0,Ye(fn.DeviceSessionService)),JC(1,Ye(Er.LoggerPublisherServiceFactory))],ZC);function N4(e){return typeof e=="object"&&e!==null&&"version"in e&&"name"in e&&typeof e.version=="string"&&typeof e.name=="string"}let e_=class{constructor(t){this.err=t,this.originalError=t}_tag="ApiCallError";originalError},j4=class{constructor(t){this.err=t,this.originalError=t}_tag="ParseResponseError";originalError},h2=class{constructor(t){this.err=t,this.originalError=t}_tag="JSONParseError";originalError},z4=class{constructor(t){this.err=t,this.originalError=t}_tag="ReadFileError";originalError};const B4="@ledgerhq/device-management-kit",V4="0.0.0-develop-20260912001326",t_={name:B4,version:V4};var H4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i};const U4={name:t_.name,version:t_.version},W4=()=>JSON.stringify(U4);let r_=class{getConfig(){return Rn.encase(()=>W4()).mapLeft(t=>new z4(t)).chain(t=>Rn.encase(()=>{const r=JSON.parse(t);if(N4(r))return r;throw new Error("Invalid config file")}).mapLeft(r=>new h2(r)))}};r_=H4([Et()],r_);var G4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i};let n_=class{getConfig(){return Rn.of({name:"DeviceSDK",version:"0.0.0-stub.1"})}};n_=G4([Et()],n_);var q4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i};let i_=class{async getConfig(){const t=await this._callApi();if(t.isLeft())return Wt(new e_(t.extract()));if(!t.extract().ok)return Wt(new e_(new Error("response not ok")));const r=await t.extract().json();return r.isLeft()?Wt(new h2):r.chain(n=>this._parseResponse(n)).map(n=>n)}_parseResponse(t){const{name:r,version:n}=t;return!r||!n?Wt(new j4):Rn.of({name:r,version:n})}_callApi(){return new Promise(t=>{t(Rn.of({ok:!0,json:async()=>new Promise(r=>{r(Rn.of({name:"DeviceSDK",version:"0.0.0-fake.1",yolo:"yolo"}))})}))})}};i_=q4([Et()],i_);var X4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i};let o_=class{async getConfig(){return new Promise(t=>t(Rn.of({name:"DeviceSDK",version:"0.0.0-fake.2"})))}};o_=X4([Et()],o_);var K4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},cm=(e,t)=>(r,n)=>t(r,n,e);let a_=class{_local;_remote;_logger;constructor(t,r,n){this._local=t,this._remote=r,this._logger=n("config")}async getDmkConfig(){const t=this._local.getConfig().ifLeft(r=>{this._logger.error("Local config not available",{data:{error:r}})});if(t.isRight()){const r=t.extract();return this._logger.info("Local config available",{data:{config:r}}),r}return this._remote.getConfig().then(r=>r.mapLeft(n=>(this._logger.error("Local config available",{data:{error:n}}),{name:"DeadDmk",version:"0.0.0-dead.1"})).extract())}};a_=K4([Et(),cm(0,Ye(X0.LocalConfigDataSource)),cm(1,Ye(X0.RemoteConfigDataSource)),cm(2,Ye(Er.LoggerPublisherServiceFactory))],a_);var Y4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},Q4=(e,t)=>(r,n)=>t(r,n,e);let s_=class{_configService;constructor(t){this._configService=t}async getDmkVersion(){return(await this._configService.getDmkConfig()).version}};s_=Y4([Et(),Q4(0,Ye(X0.ConfigService))],s_);const J4={DeviceModelDataSource:Symbol.for("DeviceModelDataSource")};var Z4=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},l_=(e,t)=>(r,n)=>t(r,n,e);let u_=class{constructor(t,r){this._sessionService=t,this._logger=r("DisableDeviceSessionRefresherUseCase")}_logger;execute({sessionId:t,blockerId:r}){return this._sessionService.getDeviceSessionById(t).caseOf({Left:n=>{throw this._logger.error("Error getting device session",{data:{error:n}}),n},Right:n=>n.disableRefresher(r)})}};u_=Z4([Et(),l_(0,Ye(fn.DeviceSessionService)),l_(1,Ye(Er.LoggerPublisherServiceFactory))],u_);var ej=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},tj=(e,t)=>(r,n)=>t(r,n,e);let c_=class{_sessions;_sessionsSubject;_logger;constructor(t){this._sessions=[],this._sessionsSubject=new GT,this._logger=t("DeviceSessionService")}get sessionsObs(){return this._sessionsSubject.asObservable()}addDeviceSession(t){return this._sessions.find(r=>r.id===t.id)?(this._logger.warn("DeviceSession already exists",{data:{deviceSession:t}}),this):(this._sessions.push(t),this._sessionsSubject.next(t),this._logger.info("DeviceSession added",{data:{sessionId:t.id}}),this)}removeDeviceSession(t){const r=this._sessions.find(n=>n.id===t);return r?(r.close(),this._sessions=this._sessions.filter(n=>n.id!==t),this._logger.info("DeviceSession removed",{data:{sessionId:t}}),this):(this._logger.warn("DeviceSession not found",{data:{sessionId:t}}),this)}getDeviceSessionById(t){return _n.fromNullable(this._sessions.find(r=>r.id===t)).toEither(new WC)}getDeviceSessionsByDeviceId(t){return _n.fromPredicate(({length:r})=>r>0,this._sessions.filter(r=>r.connectedDevice.id===t)).toEither(new WC)}getDeviceSessions(){return this._sessions}};c_=ej([Et(),tj(0,Ye(Er.LoggerPublisherServiceFactory))],c_);var rj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},f_=(e,t)=>(r,n)=>t(r,n,e);let d_=class{_sessionService;_transportService;constructor(t,r){this._sessionService=t,this._transportService=r}execute(){const t=this._sessionService.getDeviceSessions();for(const r of t)this._transportService.closeConnection(r.connectedDevice),this._sessionService.removeDeviceSession(r.id)}};d_=rj([Et(),f_(0,Ye(fn.DeviceSessionService)),f_(1,Ye(Na.TransportService))],d_);var nj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},p_=(e,t)=>(r,n)=>t(r,n,e);let h_=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("GetDeviceSessionStateUseCase")}execute({sessionId:t}){return this._sessionService.getDeviceSessionById(t).caseOf({Left:r=>{throw this._logger.error("Error getting session device",{data:{error:r}}),r},Right:r=>r.state})}};h_=nj([Et(),p_(0,Ye(fn.DeviceSessionService)),p_(1,Ye(Er.LoggerPublisherServiceFactory))],h_);var ij=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},g_=(e,t)=>(r,n)=>t(r,n,e);let v_=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("UnsafeBypassIntentQueueUseCase")}execute({sessionId:t,bypass:r}){this._sessionService.getDeviceSessionById(t).caseOf({Left:n=>{throw this._logger.error("Error getting session",{data:{error:n}}),n},Right:n=>{this._logger.warn(`UNSAFE: ${r?"Enabling":"Disabling"} intent queue bypass for session ${t}`),n._unsafeBypassIntentQueue(r)}})}};v_=ij([Et(),g_(0,Ye(fn.DeviceSessionService)),g_(1,Ye(Er.LoggerPublisherServiceFactory))],v_);function oj(e){return`[will send APDU] ~...> ${Zo(e,!1)}`}function aj(e){return`[exchange] <= ${Zo(e.data,!1)}${Zo(e.statusCode,!1)}`}const sj="apdu-exchange";function lj(e,t,r){const n=Zo(t,!1),i=`${Zo(r.data,!1)}${Zo(r.statusCode,!1)}`;return{message:aj(r),data:{type:sj,sessionId:e,apdu:n,response:i}}}const K0=1e3,fm=1e3,uj={isRefresherDisabled:!1,pollingInterval:1e3};var ur=(e=>(e.NEW_STATE="NEW_STATE",e.REFRESH_NEEDED="REFRESH_NEEDED",e.COMMAND_SUCCEEDED="COMMAND_SUCCEEDED",e.DEVICE_STATE_UPDATE_BUSY="DEVICE_STATE_UPDATE_BUSY",e.DEVICE_STATE_UPDATE_LOCKED="DEVICE_STATE_UPDATE_LOCKED",e.DEVICE_STATE_UPDATE_CONNECTED="DEVICE_STATE_UPDATE_CONNECTED",e.DEVICE_STATE_UPDATE_UNKNOWN="DEVICE_STATE_UPDATE_UNKNOWN",e))(ur||{});let cj=class{_eventEmitter=new Ul;listen(){return this._eventEmitter.asObservable()}dispatch(t){this._eventEmitter.next(t)}},fj=class{constructor(t,r){this.loggerModuleFactory=t,this.sessionEventDispatcher=r,this._logger=this.loggerModuleFactory("IntentQueueService")}_logger;_queue=[];_isProcessing=!1;_currentSubscription=null;enqueue(t){this._logger.debug("Enqueueing intent",{data:{type:t.type}});const r=new Ul,n={intent:t,subject:r,isCancelled:!1};this._queue.push(n);const i=()=>{this._logger.debug("Cancelling intent",{data:{type:t.type}}),n.isCancelled=!0,this._queue[0]===n&&this._currentSubscription?(this._currentSubscription.unsubscribe(),this._currentSubscription=null,r.complete(),this._queue.shift(),this._isProcessing=!1,this._processQueue()):(!this._isProcessing||this._queue[0]!==n)&&r.complete()};return this._isProcessing||this._processQueue(),{observable:r.asObservable().pipe(q3(()=>{this._logger.debug("Intent observable finalized",{data:{type:t.type}})})),cancel:i}}_processQueue(){if(this._isProcessing)return;if(this._queue.length===0){this.sessionEventDispatcher.dispatch({eventName:ur.NEW_STATE});return}this.sessionEventDispatcher.dispatch({eventName:ur.DEVICE_STATE_UPDATE_BUSY}),this._isProcessing=!0;const t=this._queue[0];if(t.isCancelled){this._logger.debug("Skipping cancelled intent",{data:{type:t.intent.type}}),t.subject.complete(),this._queue.shift(),this._isProcessing=!1,this._processQueue();return}this._logger.debug("Processing intent",{data:{type:t.intent.type}}),this._currentSubscription=t.intent.execute().subscribe({next:r=>{t.isCancelled||t.subject.next(r)},error:r=>{t.isCancelled||t.subject.error(r),this._onIntentComplete()},complete:()=>{t.isCancelled||t.subject.complete(),this._onIntentComplete()}})}_onIntentComplete(){this._logger.debug("Intent completed"),this._currentSubscription=null,this._queue.shift(),this._isProcessing=!1,this._processQueue()}},dj=class{constructor(t,r){this._refresher=r,this._logger=t("refresher-service")}_refresherBlockers=new Set;_logger;disableRefresher(t){const r=`${t}-${jp()}`;this.addRefresherBlocker(r),this._logger.debug("Refresher disabled",{data:{blockerId:r,blockers:Array.from(this._refresherBlockers)}});let n=!1;return()=>{n||(n=!0,this.removeRefresherBlocker(r),this._logger.debug("Refresher re-enabled",{data:{blockerId:r,blockers:Array.from(this._refresherBlockers)}}))}}addRefresherBlocker(t){const r=this._refresherBlockers.size;this._refresherBlockers.add(t),r===0&&this._refresher.stop()}removeRefresherBlocker(t){const r=this._refresherBlockers.size;this._refresherBlockers.delete(t),r>0&&this._refresherBlockers.size===0&&this._refresher.start()}},pj=class{constructor(t,r,n,i){this.connectedDevice=r,this._sessionEventDispatcher=n,this._sendCommandFunction=i,this._logger=t("device-pinger"),this._subscription=this._sessionEventDispatcher.listen().subscribe(async o=>await this.mapEventAction(o))}_sendCommandFunction;_subscription;_logger;async ping(){try{return await this.mapDevicePingAction(this.connectedDevice.deviceModel.id)}catch(t){return this._logger.error("Error while pinging device",{data:{error:t}}),null}}mapEventAction=async t=>t.eventName===ur.REFRESH_NEEDED?await this.ping():null;async mapDevicePingAction(t){if(t===Xt.NANO_S){const r=async()=>{const o=await this._sendCommandFunction(new AE,um);return this._sendCommandFunction(new qN,um),o},n=new Promise(o=>{setTimeout(()=>o(null),K0*2+100)}),i=await Promise.race([r(),n]);return i?this._sessionEventDispatcher.dispatch({eventName:ur.COMMAND_SUCCEEDED,eventData:i}):this._sessionEventDispatcher.dispatch({eventName:ur.DEVICE_STATE_UPDATE_LOCKED}),i}else{const r=await this._sendCommandFunction(new AE,um);return this._sessionEventDispatcher.dispatch({eventName:ur.COMMAND_SUCCEEDED,eventData:r}),r}}unsubscribe(){this._subscription.unsubscribe()}},hj=class{constructor(t,r,n,i){this._sessionEventDispatcher=n,this._refresherOptions=r,this._logger=t("device-session-refresher"),this._connectedDeviceID=i.deviceModel.id}_refresherSubscription;_refresherOptions;_logger;_connectedDeviceID;startRefresher(){if(this._refresherOptions.isRefresherDisabled||this._refresherSubscription)return;const t=this.getValidPollingInterval(this._refresherOptions,this._logger),r=this._sessionEventDispatcher.listen().pipe(kC(n=>n.eventName===ur.DEVICE_STATE_UPDATE_BUSY||n.eventName===ur.NEW_STATE),La(n=>n.eventName===ur.DEVICE_STATE_UPDATE_BUSY),K3(!1),W3());this._refresherSubscription=V3(0,t).pipe(Y3(r),PC(([n,i])=>{i&&this._logger.debug("Refresh skipped: device is busy")}),kC(([n,i])=>!i),PC(()=>this._sessionEventDispatcher.dispatch({eventName:ur.REFRESH_NEEDED}))).subscribe(),this._logger.info("Refresher started.")}stopRefresher(){this._refresherSubscription&&(this._refresherSubscription.unsubscribe(),this._refresherSubscription=void 0,this._logger.info("Refresher stopped."))}restartRefresher(){this.stopRefresher(),this.startRefresher(),this._logger.info("Refresher restarted.")}getValidPollingInterval=(t,r)=>{const{pollingInterval:n}=t;if(this._connectedDeviceID===Xt.NANO_S){const i=K0*2;return n!==void 0&&n<i?(r.warn(`Polling interval of ${n} is too low, setting to minimum as ${i}`),i):n??i}else return n!==void 0&&n<fm?(r.warn(`Polling interval of ${n} is too low, setting to minimum as ${fm}`),fm):n??K0}},gj=class{constructor(t,r,n,i,o){this._sessionEventDispatcher=r,this._connectedDevice=n,this._deviceState=i,this.setDeviceSessionState=o,this._subscription=this._sessionEventDispatcher.listen().subscribe(s=>this.mapEventAction(s)),this._logger=t("device-session-state-handler")}_subscription;_logger;_pendingDeviceStatus=ho.BUSY;_updateDeviceState(t){const r=this._parseDeviceStatus(t);if(r){const{sessionStateType:n,deviceStatus:i,currentApp:o}=r,s=this._deviceState.getValue();s.sessionStateType===Il.Connected?this.setDeviceSessionState({sessionStateType:n,deviceStatus:i,deviceModelId:this._connectedDevice.deviceModel.id,currentApp:o,installedApps:[],isSecureConnectionAllowed:!1}):this.setDeviceSessionState({...s,sessionStateType:n,deviceStatus:i,deviceModelId:this._connectedDevice.deviceModel.id,currentApp:o})}}mapEventAction=t=>{const{eventName:r}=t;switch(r){case ur.COMMAND_SUCCEEDED:return this._updateDeviceState(t.eventData);case ur.DEVICE_STATE_UPDATE_BUSY:return this.setDeviceSessionState({...this._deviceState.getValue(),deviceStatus:ho.BUSY});case ur.DEVICE_STATE_UPDATE_LOCKED:this._pendingDeviceStatus=ho.LOCKED;return;case ur.DEVICE_STATE_UPDATE_CONNECTED:this._pendingDeviceStatus=ho.CONNECTED;return;case ur.NEW_STATE:{const n=this._pendingDeviceStatus;return this._pendingDeviceStatus=ho.BUSY,this.setDeviceSessionState({...this._deviceState.getValue(),deviceStatus:n})}case ur.DEVICE_STATE_UPDATE_UNKNOWN:return this.setDeviceSessionState({...this._deviceState.getValue(),deviceStatus:ho.BUSY});case ur.REFRESH_NEEDED:return;default:{const n=r;throw new Error(`Unhandled context type ${n}`)}}};_parseDeviceStatus(t){return pN(t)?{sessionStateType:Il.ReadyWithoutSecureChannel,deviceStatus:ho.CONNECTED,currentApp:{name:t.data.name,version:t.data.version}}:(this._logger.debug("Error while parsing APDU response",{data:{parsedResponse:t}}),null)}unsubscribe(){this._subscription.unsubscribe()}},vj=class{_id;_connectedDevice;_deviceState;_managerApiService;_secureChannelService;_logger;_loggerModuleFactory;_refresherOptions;_pinger;_deviceSessionRefresher;_refresherService;_intentQueueService;_sessionEventDispatcher=new cj;_bypassIntentQueue=!1;constructor({connectedDevice:t,id:r=jp()},n,i,o,s,u=c=>new fj(n,c)){this._id=r,this._connectedDevice=t,this._loggerModuleFactory=n,this._logger=n("device-session"),this._managerApiService=i,this._intentQueueService=u(this._sessionEventDispatcher),this._secureChannelService=o,this._refresherOptions={...uj,...s},this._deviceState=new v3({sessionStateType:Il.Connected,deviceStatus:ho.CONNECTED,deviceModelId:this._connectedDevice.deviceModel.id}),this._pinger=new pj(n,t,this._sessionEventDispatcher,(c,f)=>this.sendCommand(c,f)),this._deviceSessionRefresher=new hj(n,this._refresherOptions,this._sessionEventDispatcher,this._connectedDevice),new gj(n,this._sessionEventDispatcher,this._connectedDevice,this._deviceState,c=>this.setDeviceSessionState(c)),this._refresherService=new dj(n,{start:()=>this._deviceSessionRefresher.restartRefresher(),stop:()=>this._deviceSessionRefresher.stopRefresher()})}async initialiseSession(){try{this._refresherOptions.isRefresherDisabled?await this._pinger.ping():this._deviceSessionRefresher.startRefresher()}catch(t){throw this._logger.error("Error while initialising session",{data:{error:t}}),t}}get id(){return this._id}get connectedDevice(){return this._connectedDevice}get state(){return this._deviceState.asObservable()}getDeviceSessionState(){return this._deviceState.getValue()}setDeviceSessionState(t){this._deviceState.next(t)}sendApdu(t,r={isPolling:!1,triggersDisconnection:!1,abortTimeout:void 0}){return this._bypassIntentQueue?this._unsafeInternalSendApdu(t,r):this._internalSendApdu(t,r)}_internalSendApdu(t,r){const n=r.abortTimeout,i=Date.now(),{observable:o,cancel:s}=this._intentQueueService.enqueue({type:"send-apdu",execute:()=>Tl((async()=>{const c=Date.now()-i;return await this._unsafeInternalSendApdu(t,{isPolling:r.isPolling,triggersDisconnection:r.triggersDisconnection,abortTimeout:n?n-c:void 0})})())}),u=n?o.pipe(IC({each:n,with:()=>{throw s(),new Q3}})):o;return TC(u)}async _unsafeInternalSendApdu(t,r={isPolling:!1,triggersDisconnection:!1,abortTimeout:void 0}){return this._logger.debug(oj(t)),(await this._connectedDevice.sendApdu(t,r.triggersDisconnection,r.abortTimeout)).ifRight(n=>{const{message:i,data:o}=lj(this._id,t,n);this._logger.debug(i,{data:o}),b1.isLockedDeviceResponse(n)?this._sessionEventDispatcher.dispatch({eventName:ur.DEVICE_STATE_UPDATE_LOCKED}):this._sessionEventDispatcher.dispatch({eventName:ur.DEVICE_STATE_UPDATE_CONNECTED})}).ifLeft(()=>{this._sessionEventDispatcher.dispatch({eventName:ur.DEVICE_STATE_UPDATE_UNKNOWN})})}sendCommand(t,r){return this._logger.debug(`[sendCommand] ${t.name}`),this._bypassIntentQueue?this._unsafeInternalSendCommand(t,r):this._internalSendCommand(t,r)}_internalSendCommand(t,r){const n=Date.now(),{observable:i,cancel:o}=this._intentQueueService.enqueue({type:"send-command",execute:()=>Tl((async()=>{const u=Date.now()-n;return await this._unsafeInternalSendCommand(t,r?r-u:void 0)})())}),s=r?i.pipe(IC({each:r,with:()=>{throw o(),new J3}})):i;return TC(s)}async _unsafeInternalSendCommand(t,r){const n=t.getApdu();return(await this._unsafeInternalSendApdu(n.getRawApdu(),{isPolling:!1,triggersDisconnection:t.triggersDisconnection??!1,abortTimeout:r})).caseOf({Left:i=>{throw this._logger.error("[sendCommand] error",{data:{err:i}}),i},Right:i=>{const o=t.parseResponse(i,this._connectedDevice.deviceModel.id);return this._logger.debug("[sendCommand] result",{data:{result:o}}),o}})}executeDeviceAction(t){return this._bypassIntentQueue?this._unsafeInternalExecuteDeviceAction(t):this._internalExecuteDeviceAction(t)}_internalExecuteDeviceAction(t){let r;const{observable:n,cancel:i}=this._intentQueueService.enqueue({type:"device-action",execute:()=>{const{observable:o,cancel:s}=this._unsafeInternalExecuteDeviceAction(t);return r=s,o}});return{observable:n,cancel:()=>{r?.(),i()}}}_unsafeInternalExecuteDeviceAction(t){const{observable:r,cancel:n}=t._execute({sendApdu:async i=>this._unsafeInternalSendApdu(i),sendCommand:async i=>this._unsafeInternalSendCommand(i),getDeviceModel:()=>this._connectedDevice.deviceModel,getDeviceSessionState:()=>this._deviceState.getValue(),getDeviceSessionStateObservable:()=>this.state,setDeviceSessionState:i=>(this.setDeviceSessionState(i),this._deviceState.getValue()),getManagerApiService:()=>this._managerApiService,getSecureChannelService:()=>this._secureChannelService,loggerFactory:this._loggerModuleFactory});return{observable:r,cancel:n}}close(){this._updateDeviceStatus(ho.NOT_CONNECTED),this._deviceState.complete(),this._deviceSessionRefresher.stopRefresher(),this._pinger.unsubscribe()}disableRefresher(t){return this._refresherService.disableRefresher(t)}_unsafeBypassIntentQueue(t){this._bypassIntentQueue=t}_updateDeviceStatus(t){const r=this._deviceState.getValue();this._deviceState.next({...r,deviceStatus:t})}};const F1={SecureChannelService:Symbol.for("SecureChannelService"),SecureChannelDataSource:Symbol.for("SecureChannelDataSource"),DmkConfig:Symbol.for("SecureChannelDmkConfig")};var mj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},_u=(e,t)=>(r,n)=>t(r,n,e);let m_=class{_transportService;_sessionService;_loggerFactory;_managerApi;_secureChannel;_logger;constructor(t,r,n,i,o){this._sessionService=r,this._transportService=t,this._loggerFactory=n,this._logger=n("ConnectUseCase"),this._managerApi=i,this._secureChannel=o}handleDeviceDisconnect(t){this._sessionService.getDeviceSessionsByDeviceId(t).ifRight(r=>{r.forEach(n=>{this._sessionService.removeDeviceSession(n.id),this._logger.info("Session removed",{data:{deviceId:t,sessionId:n.id}})})})}async execute({device:t,sessionRefresherOptions:r}){const n=this._transportService.getTransport(t.transport),i="sessionId"in t?t.sessionId:void 0;return dt.liftEither(n.toEither(new D1(new Error("Unknown transport")))).chain(async o=>o.connect({deviceId:t.id,onDisconnect:s=>this.handleDeviceDisconnect(s)})).ifLeft(o=>{this._logger.error("Error connecting to device")}).map(async o=>{const s=new vj({connectedDevice:o,id:i},this._loggerFactory,this._managerApi,this._secureChannel,r);return this._sessionService.addDeviceSession(s),await s.initialiseSession(),s.id}).caseOf({Left:o=>{throw o},Right:o=>o})}};m_=mj([Et(),_u(0,Ye(Na.TransportService)),_u(1,Ye(fn.DeviceSessionService)),_u(2,Ye(Er.LoggerPublisherServiceFactory)),_u(3,Ye(zp.ManagerApiService)),_u(4,Ye(F1.SecureChannelService))],m_);var yj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},dm=(e,t)=>(r,n)=>t(r,n,e);let y_=class{_transportService;_sessionService;_logger;constructor(t,r,n){this._sessionService=r,this._transportService=t,this._logger=n("DisconnectUseCase")}async execute({sessionId:t}){return this._logger.debug("Disconnecting from device",{data:{test:this._sessionService.getDeviceSessions().map(r=>r.id)}}),dt(async({liftEither:r})=>{const n=await r(this._sessionService.getDeviceSessionById(t).ifLeft(s=>{this._logger.error("Device session not found",{data:{sessionId:t,error:s}})})),i=n.connectedDevice.transport,o=await r(this._transportService.getTransport(i).toEither(new D1(new Error("Unknown transport"))));n.close(),this._sessionService.removeDeviceSession(t),await o.disconnect({connectedDevice:n.connectedDevice})}).caseOf({Left:r=>{throw this._logger.error("Error disconnecting from device",{data:{error:r}}),r},Right:()=>{}})}};y_=yj([Et(),dm(0,Ye(Na.TransportService)),dm(1,Ye(fn.DeviceSessionService)),dm(2,Ye(Er.LoggerPublisherServiceFactory))],y_);let N1=class{id;sessionId;modelId;name;type;transport;constructor({transportConnectedDevice:{id:t,deviceModel:{id:r,productName:n},type:i,transport:o,name:s},sessionId:u}){this.id=t,this.sessionId=u,this.modelId=r,this.name=s??n,this.type=i,this.transport=o}};var bj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},b_=(e,t)=>(r,n)=>t(r,n,e);let S_=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("GetConnectedDeviceUseCase")}execute({sessionId:t}){return this._sessionService.getDeviceSessionById(t).caseOf({Right:r=>new N1({sessionId:r.id,transportConnectedDevice:r.connectedDevice}),Left:r=>{throw this._logger.error("Error getting session",{data:{error:r}}),r}})}};S_=bj([Et(),b_(0,Ye(fn.DeviceSessionService)),b_(1,Ye(Er.LoggerPublisherServiceFactory))],S_);var Sj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},w_=(e,t)=>(r,n)=>t(r,n,e);let x_=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("ListConnectedDeviceUseCase")}execute(){return this._logger.info("Listing connected devices"),this._sessionService.getDeviceSessions().map(t=>new N1({transportConnectedDevice:t.connectedDevice,sessionId:t.id}))}};x_=Sj([Et(),w_(0,Ye(fn.DeviceSessionService)),w_(1,Ye(Er.LoggerPublisherServiceFactory))],x_);var wj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},E_=(e,t)=>(r,n)=>t(r,n,e);let C_=class{_transports;_transportService;_logger;constructor(t,r){this._transports=t.getAllTransports(),this._transportService=t,this._logger=r("ListenToAvailableDevicesUseCase")}mapTransportDiscoveredDeviceToDiscoveredDevice(t){const r=new MT({id:t.id,model:t.deviceModel.id,name:t.deviceModel.productName});return{id:t.id,deviceModel:r,transport:t.transport,name:t.name||r.name,rssi:t.rssi}}execute({transport:t}={}){if(this._logger.info("Listening to available devices"),this._transports.length===0)return this._logger.warn("No transports available"),Tl([[]]);if(!t){this._logger.info("Discovering all available transports");const r=this._transports.map((n,i)=>n.listenToAvailableDevices().pipe(La(o=>({index:i,arr:o}))));return H3(...r).pipe(X3((n,{index:i,arr:o})=>(n[i]=o,n),{}),La(n=>Object.values(n).flat().map(this.mapTransportDiscoveredDeviceToDiscoveredDevice)))}return this._logger.info(`Discovering devices on transport ${t}`),this._transportService.getTransport(t).caseOf({Nothing:()=>(this._logger.error(`Transport ${t} not found`),l2([])),Just:r=>r.listenToAvailableDevices().pipe(La(n=>n.map(this.mapTransportDiscoveredDeviceToDiscoveredDevice)))})}};C_=wj([Et(),E_(0,Ye(Na.TransportService)),E_(1,Ye(Er.LoggerPublisherServiceFactory))],C_);var xj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},__=(e,t)=>(r,n)=>t(r,n,e);let R_=class{constructor(t,r){this._sessionService=t,this._logger=r("ListenToConnectedDeviceUseCase")}_logger;execute(){return this._logger.info("Observe connected devices"),this._sessionService.sessionsObs.pipe(La(t=>new N1({transportConnectedDevice:t.connectedDevice,sessionId:t.id})))}};R_=xj([Et(),__(0,Ye(fn.DeviceSessionService)),__(1,Ye(Er.LoggerPublisherServiceFactory))],R_);var Ej=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},pm=(e,t)=>(r,n)=>t(r,n,e);let O_=class{constructor(t,r,n){this.connectUseCase=t,this.disconnectUseCase=r,this._logger=n("ReconnectUseCase")}_logger;async execute({device:t,sessionRefresherOptions:r}){return this._logger.debug("Reconnecting device session",{data:{deviceId:t.id,transport:t.transport}}),await this.disconnectUseCase.execute({sessionId:t.sessionId}),this.connectUseCase.execute({device:t,sessionRefresherOptions:r})}};O_=Ej([Et(),pm(0,Ye(XC.ConnectUseCase)),pm(1,Ye(XC.DisconnectUseCase)),pm(2,Ye(Er.LoggerPublisherServiceFactory))],O_);var Cj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},_j=(e,t)=>(r,n)=>t(r,n,e);let $_=class{constructor(t){this._transportService=t}mapDiscoveredDevice(t){const r=new MT({id:t.id,model:t.deviceModel.id,name:t.deviceModel.productName});return{id:t.id,deviceModel:r,transport:t.transport,name:t.name||r.name,rssi:t.rssi}}execute({transport:t}={}){if(!t){const r=this._transportService.getAllTransports();return l2(...r).pipe(M1(n=>n.startDiscovering().pipe(La(i=>this.mapDiscoveredDevice(i)))))}return this._transportService.getTransport(t).caseOf({Just:r=>r.startDiscovering().pipe(La(n=>this.mapDiscoveredDevice(n))),Nothing:()=>{throw new D1(new Error("Unknown transport"))}})}};$_=Cj([Et(),_j(0,Ye(Na.TransportService))],$_);var Rj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},T_=(e,t)=>(r,n)=>t(r,n,e);let I_=class{constructor(t,r){this.transportService=t,this._logger=r("StopDiscoveringUseCase")}_logger;async execute(){this._logger.debug("Stopping discovering devices");for(const t of this.transportService.getAllTransports())await t.stopDiscovering()}};I_=Rj([Et(),T_(0,Ye(Na.TransportService)),T_(1,Ye(Er.LoggerPublisherServiceFactory))],I_);var Du=(e=>(e[e.Fatal=0]="Fatal",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info",e[e.Debug=4]="Debug",e))(Du||{});let Oj=class{format(t){return Array.isArray(t)?t.map(r=>`[${r}]`).join(" "):`[${t}]`}};function Y0(e,t){if(typeof e=="bigint")return e.toString();if(Array.isArray(e))return t.has(e)?"[Circular]":(t.add(e),e.map(r=>Y0(r,t)));if(e!==null&&typeof e=="object"){if(t.has(e))return"[Circular]";t.add(e);const r={};for(const[n,i]of Object.entries(e))r[n]=Y0(i,t);return r}return e}function $j(e){const t=new WeakSet;t.add(e);const r={};for(const[n,i]of Object.entries(e))r[n]=Y0(i,t);return r}var Tj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i};let A_=class{subscribers;tag;tagFormatter;constructor(t,r,n=new Oj){this.subscribers=t,this.tag=r,this.tagFormatter=n}_log(t,r,n){const i=n?.data?$j(n.data):void 0,o=n?.tag??this.tag,s=this.tagFormatter.format(o);this.subscribers.forEach(u=>{const c={timestamp:n?.timestamp??Date.now(),tag:s,data:i};u.log(t,r,c)})}info(t,r){this._log(Du.Info,t,r)}warn(t,r){this._log(Du.Warning,t,r)}debug(t,r){this._log(Du.Debug,t,r)}error(t,r){this._log(Du.Error,t,r)}};A_=Tj([Et()],A_);let sc=class extends Error{status;statusText;responseBody;isTimeout;cause;constructor(t){super(t.message),this.name="DmkNetworkClientError",this.status=t.status,this.statusText=t.statusText,this.responseBody=t.responseBody,this.isTimeout=t.isTimeout??!1,this.cause=t.cause}};const Ij="application/json";function Aj(e,t){if(!t)return e;const r=e.endsWith("/")?e.slice(0,-1):e,n=t.startsWith("/")?t:`/${t}`;return`${r}${n}`}function kj(e){const t=[];for(const[r,n]of Object.entries(e))n!=null&&t.push(`${encodeURIComponent(r)}=${encodeURIComponent(String(n))}`);return t.join("&")}function as(e){const{url:t,params:r,baseUrl:n}=e,i=/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:n?Aj(n,t):t,o=r?kj(r):"";if(o.length===0)return i;const s=i.includes("?")?"&":"?";return`${i}${s}${o}`}function Pj(e,t){const r=t.toLowerCase();return Object.keys(e).some(n=>n.toLowerCase()===r)}function Mj(e){return!!(typeof e=="string"||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof Blob<"u"&&e instanceof Blob||typeof FormData<"u"&&e instanceof FormData||typeof URLSearchParams<"u"&&e instanceof URLSearchParams||typeof ReadableStream<"u"&&e instanceof ReadableStream)}function Dj(e){const{method:t,body:r,defaultHeaders:n,perRequestHeaders:i}=e,o={...n,...i};return r===void 0||t==="GET"||t==="HEAD"?{body:void 0,headers:o}:Mj(r)?{body:r,headers:o}:(Pj(o,"content-type")||(o["Content-Type"]=Ij),{body:JSON.stringify(r),headers:o})}function Lj(e){const{timeoutMs:t}=e;if(!t||t<=0)return{signal:void 0,cleanup:()=>{}};const r=new AbortController,n=setTimeout(()=>{r.abort()},t);return{signal:r.signal,cleanup:()=>clearTimeout(n)}}async function Fj(e,t){switch(t){case"void":return;case"text":return await e.text();case"blob":return await e.blob();case"arrayBuffer":return await e.arrayBuffer();default:{const r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch(n){throw new sc({message:"Failed to parse JSON response body",status:e.status,statusText:e.statusText,responseBody:r,cause:n})}}}}async function Nj(e){try{return await e.text()}catch{return}}function jj(e){const{cause:t,timeoutMs:r}=e,n=!!(r&&r>0);if(t instanceof Error&&(t.name==="AbortError"||t.name==="TimeoutError")){const i=t.name==="TimeoutError"||n;return new sc({message:i?"Request timed out":"Request aborted",isTimeout:i,cause:t})}return new sc({message:t instanceof Error?t.message:"Network request failed",cause:t})}let g2=class{baseUrl;defaultHeaders;fetchImpl;constructor(t={}){this.baseUrl=t.baseUrl,this.defaultHeaders=t.headers??{},this.fetchImpl=t.fetch}getFetch(){return this.fetchImpl??globalThis.fetch.bind(globalThis)}get(t,r){return this.request({...r,method:"GET",url:t}).then(n=>n.data)}post(t,r,n){return this.request({...n,method:"POST",url:t,body:r}).then(i=>i.data)}put(t,r,n){return this.request({...n,method:"PUT",url:t,body:r}).then(i=>i.data)}patch(t,r,n){return this.request({...n,method:"PATCH",url:t,body:r}).then(i=>i.data)}delete(t,r){return this.request({...r,method:"DELETE",url:t}).then(n=>n.data)}head(t,r){return this.request({...r,method:"HEAD",url:t,responseType:"void"}).then(()=>{})}async request(t){const r=as({url:t.url,params:t.params,baseUrl:this.baseUrl}),{body:n,headers:i}=Dj({method:t.method,body:t.body,defaultHeaders:this.defaultHeaders,perRequestHeaders:t.headers}),{signal:o,cleanup:s}=Lj({timeoutMs:t.timeoutMs}),u=t.throwOnHttpError??!0,c=t.responseType??"json";try{let f;try{f=await this.getFetch()(r,{method:t.method,headers:i,body:n,signal:o})}catch(p){throw jj({cause:p,timeoutMs:t.timeoutMs})}if(!f.ok&&u){const p=await Nj(f);throw new sc({message:`HTTP error ${f.status} ${f.statusText}`.trim(),status:f.status,statusText:f.statusText,responseBody:p})}return{data:await Fj(f,c),status:f.status,statusText:f.statusText,headers:f.headers,ok:f.ok}}finally{s()}}};var Lu=(e=>(e.currency="currency",e.plugin="plugin",e.tool="tool",e.swap="swap",e))(Lu||{});const zj=1,Bj="0";let cp=class{constructor(t){this.error=t,this.originalError=t}_tag="FetchError";originalError};var Fu=(e=>(e.currency="currency",e.plugin="plugin",e.tool="tool",e.swap="swap",e))(Fu||{}),Vj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},Hj=(e,t)=>(r,n)=>t(r,n,e);const qo=e=>e instanceof sc&&e.cause!==void 0?new cp(e.cause):new cp(e);let k_=class{http;_provider=zj;_firmwareDistributionSalt=Bj;constructor({managerApiUrl:t,provider:r,firmwareDistributionSalt:n}){this.http=new g2({baseUrl:t}),this._provider=r,this._firmwareDistributionSalt=n}setProvider(t){this._provider===t||t<1||(this._provider=t)}getProvider(){return this._provider}getAppList(t){const{targetId:r,firmwareVersionName:n}=t;return dt(()=>this.http.get("/v2/apps/by-target",{params:{target_id:r,provider:this._provider,firmware_version_name:n}})).chain(i=>this.mapApplicationDtoToApplication(i)).mapLeft(qo)}getMcuList(){return dt(()=>this.http.get("/mcu_versions")).chain(t=>this.mapMcuDtoToMcu(t)).mapLeft(qo)}getDeviceVersion(t){const{targetId:r}=t;return dt(()=>this.http.get("/get_device_version",{params:{target_id:r,provider:this._provider}})).chain(n=>this.mapDeviceVersionDto(n)).mapLeft(qo)}getFirmwareVersion(t){const{deviceId:r,version:n}=t;return dt(()=>this.http.get("/get_firmware_version",{params:{device_version:r,version_name:n,provider:this._provider}})).chain(i=>this.mapFinalFirmwareDto(i)).mapLeft(qo)}getFirmwareVersionById(t){return dt(()=>this.http.get(`/firmware_final_versions/${t}`)).chain(r=>this.mapFinalFirmwareDto(r)).mapLeft(qo)}getOsuFirmwareVersion(t){const{deviceId:r,version:n}=t;return dt(()=>this.http.get("/get_osu_version",{params:{device_version:r,version_name:n,provider:this._provider}})).chain(i=>this.mapOsuFirmwareDto(i)).mapLeft(qo)}getLatestFirmwareVersion(t){const r="34.27.0",{currentFinalFirmwareId:n,deviceId:i}=t;return dt(()=>this.http.get("/get_latest_firmware",{params:{current_se_firmware_final_version:n,device_version:i,provider:this._provider,salt:this._firmwareDistributionSalt,livecommonversion:r}})).chain(o=>this.mapLatestFirmwareDto(o)).mapLeft(qo)}getAppsByHash(t){const{hashes:r}=t;return dt(()=>this.http.post("/v2/apps/hash",r)).chain(n=>this.mapNullableApplicationDtoToApplication(n)).mapLeft(qo)}getLanguagePackages(t){const{deviceId:r,currentFinalFirmwareId:n}=t;return dt(()=>this.http.get("/language-packages",{params:{device_version:r,current_se_firmware_final_version:n}})).chain(i=>this.mapLanguagesDtoToLanguages(i)).mapLeft(qo)}mapAppTypeDtoToAppType(t){if(t===null)return null;switch(t){case Fu.currency:return Lu.currency;case Fu.plugin:return Lu.plugin;case Fu.tool:return Lu.tool;case Fu.swap:return Lu.swap}}mapApplicationDtoToApplication(t){return dt(()=>Promise.resolve(t.map(r=>this.mapApplicationDto(r))))}mapNullableApplicationDtoToApplication(t){return dt(()=>Promise.resolve(t.map(r=>r===null?null:this.mapApplicationDto(r))))}mapApplicationDto(t){if(typeof t!="object"||typeof t.versionId!="number"||typeof t.versionName!="string"||t.versionDisplayName!==null&&typeof t.versionDisplayName!="string"||typeof t.version!="string"||t.currencyId!==null&&typeof t.currencyId!="string"||t.description!==null&&typeof t.description!="string"||t.applicationType!==null&&typeof t.applicationType!="string"||typeof t.dateModified!="string"||t.icon!==null&&typeof t.icon!="string"||t.authorName!==null&&typeof t.authorName!="string"||t.supportURL!==null&&typeof t.supportURL!="string"||t.contactURL!==null&&typeof t.contactURL!="string"||t.sourceURL!==null&&typeof t.sourceURL!="string"||t.compatibleWallets!==null&&typeof t.compatibleWallets!="string"||typeof t.hash!="string"||typeof t.perso!="string"||typeof t.firmware!="string"||typeof t.firmwareKey!="string"||typeof t.delete!="string"||typeof t.deleteKey!="string"||t.bytes!==null&&typeof t.bytes!="number"||t.warning!==null&&typeof t.warning!="string"||typeof t.isDevTools!="boolean"||t.category!==null&&typeof t.category!="number"||t.parent!==null&&typeof t.parent!="number"||t.parentName!==null&&typeof t.parentName!="string")throw new Error(`Incomplete application: ${JSON.stringify(t)}`);const{applicationType:r,hash:n,perso:i,firmware:o,firmwareKey:s,delete:u,deleteKey:c,...f}=t;return{...f,hash:n,perso:i,firmware:o,firmwareKey:s,delete:u,deleteKey:c,applicationType:this.mapAppTypeDtoToAppType(r)}}mapMcuDtoToMcu(t){return dt(()=>Promise.resolve(t.map(r=>{if(typeof r!="object"||typeof r.id!="number"||typeof r.name!="string"||typeof r.from_bootloader_version!="string")throw new Error(`Incomplete MCU version: ${JSON.stringify(r)}`);return{id:r.id,name:r.name,fromBootloaderVersion:r.from_bootloader_version,providers:r.providers}})))}mapDeviceVersionDto(t){return dt(()=>{if(typeof t!="object"||typeof t.id!="number")throw new Error(`Incomplete device version: ${JSON.stringify(t)}`);const r={id:t.id};return Promise.resolve(r)})}mapFinalFirmwareDto(t){return dt(()=>{if(typeof t!="object"||typeof t.id!="number"||typeof t.version!="string"||typeof t.perso!="string"||t.firmware!==null&&typeof t.firmware!="string"||t.firmware_key!==null&&typeof t.firmware_key!="string"||t.hash!==null&&typeof t.hash!="string"||t.bytes!==null&&typeof t.bytes!="number"||!Array.isArray(t.mcu_versions))throw new Error(`Incomplete final firmware: ${JSON.stringify(t)}`);const r={id:t.id,version:t.version,perso:t.perso,firmware:t.firmware,firmwareKey:t.firmware_key,hash:t.hash,bytes:t.bytes,mcuVersions:t.mcu_versions};return Promise.resolve(r)})}mapLatestFirmwareDto(t){return dt(()=>{if(t.result==="null")return Promise.resolve(null);if(t.result!=="success"||!t.se_firmware_osu_version)throw new Error(`Latest firmware could not be retrieved: ${t.result}`);const r=t.se_firmware_osu_version;return Promise.resolve(r)}).chain(r=>r===null?dt(()=>Promise.resolve(Dt)):this.mapOsuFirmwareDto(r).map(n=>Lr(n)))}mapOsuFirmwareDto(t){return dt(()=>{if(typeof t!="object"||typeof t.id!="number"||t.notes!==null&&typeof t.notes!="string"||typeof t.perso!="string"||typeof t.firmware!="string"||typeof t.firmware_key!="string"||t.hash!==null&&typeof t.hash!="string"||typeof t.next_se_firmware_final_version!="number")throw new Error(`Incomplete latest firmware: ${JSON.stringify(t)}`);const r={id:t.id,notes:t.notes,perso:t.perso,firmware:t.firmware,firmwareKey:t.firmware_key,hash:t.hash,nextFinalFirmware:t.next_se_firmware_final_version};return Promise.resolve(r)})}mapLanguagesDtoToLanguages(t){return dt(()=>Promise.resolve(t.map(r=>this.mapLanguageDto(r))))}mapLanguageDto(t){if(typeof t!="object"||typeof t.language!="string"||typeof t.languagePackageVersionId!="number"||typeof t.version!="string"||typeof t.language_package_id!="number"||typeof t.apdu_install_url!="string"||typeof t.apdu_uninstall_url!="string"||typeof t.bytes!="number"||typeof t.date_creation!="string"||typeof t.date_last_modified!="string")throw new Error(`Incomplete language version: ${JSON.stringify(t)}`);return{language:t.language,languagePackageVersionId:t.languagePackageVersionId,version:t.version,languagePackageId:t.language_package_id,apduInstallUrl:t.apdu_install_url,apduUninstallUrl:t.apdu_uninstall_url,bytes:t.bytes,dateCreation:t.date_creation,dateLastModified:t.date_last_modified}}};k_=Vj([Et(),Hj(0,Ye(zp.DmkConfig))],k_);var Uj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},Wj=(e,t)=>(r,n)=>t(r,n,e);let P_=class{constructor(t){this.dataSource=t}getAppList(t){const r={targetId:t.targetId.toString(),firmwareVersionName:t.seVersion};return this.dataSource.getAppList(r)}getDeviceVersion(t){const r={targetId:t.targetId.toString()};return this.dataSource.getDeviceVersion(r)}getFirmwareVersion(t,r){const n={version:t.seVersion,deviceId:r.id};return this.dataSource.getFirmwareVersion(n)}getOsuFirmwareVersion(t,r){const n={version:t.seVersion,deviceId:r.id};return this.dataSource.getOsuFirmwareVersion(n)}getLatestFirmwareVersion(t,r){const n={currentFinalFirmwareId:t.id,deviceId:r.id};return this.dataSource.getLatestFirmwareVersion(n)}getNextFirmwareVersion(t){return this.dataSource.getFirmwareVersionById(t.nextFinalFirmware)}getLanguagePackages(t,r){const n={deviceId:t.id,currentFinalFirmwareId:r.id};return this.dataSource.getLanguagePackages(n)}getMcuList(){return this.dataSource.getMcuList()}getAppsByHash(t){const r={hashes:t};return dt(async({fromPromise:n,throwE:i})=>{if(r.hashes.length===0)return[];try{return await n(this.dataSource.getAppsByHash(r))}catch(o){return o instanceof cp?i(o):i(new cp(o))}})}getProvider(){return this.dataSource.getProvider()}};P_=Uj([Et(),Wj(0,Ye(zp.ManagerApiDataSource))],P_);var Gj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},M_=(e,t)=>(r,n)=>t(r,n,e);let D_=class{constructor(t,r){this.sessionService=t,this.managerApiDataSource=r}execute(t){for(const r of this.sessionService.getDeviceSessions()){const n=r.getDeviceSessionState();n.sessionStateType!==Il.Connected&&r.setDeviceSessionState({...n,firmwareUpdateContext:void 0,installedApps:[],appsUpdates:void 0,catalog:void 0})}this.managerApiDataSource.setProvider(t)}};D_=Gj([Et(),M_(0,Ye(fn.DeviceSessionService)),M_(1,Ye(zp.ManagerApiDataSource))],D_);var qj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},Xj=(e,t)=>(r,n)=>t(r,n,e);let L_=class{webSocketBaseUrl;constructor({webSocketUrl:t}){this.webSocketBaseUrl=t}genuineCheck(t){const r=as({baseUrl:this.webSocketBaseUrl,url:"/genuine",params:t});return this._connectWebSocket(r)}installApp(t){const r=as({baseUrl:this.webSocketBaseUrl,url:"/install",params:t});return this._connectWebSocket(r)}listInstalledApps(t){const r=as({baseUrl:this.webSocketBaseUrl,url:"/apps/list",params:t});return this._connectWebSocket(r)}uninstallApp(t){const r=as({baseUrl:this.webSocketBaseUrl,url:"/install",params:t});return this._connectWebSocket(r)}updateFirmware(t){const r=as({baseUrl:this.webSocketBaseUrl,url:"/install",params:t});return this._connectWebSocket(r)}updateMcu(t){const r=as({baseUrl:this.webSocketBaseUrl,url:"/mcu",params:t});return this._connectWebSocket(r)}_connectWebSocket(t){try{return nr(new t4(t))}catch(r){return Wt(new s4(r))}}};L_=qj([Et(),Xj(0,Ye(F1.DmkConfig))],L_);var Kj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},Yj=(e,t)=>(r,n)=>t(r,n,e);let F_=class{constructor(t){this.dataSource=t}genuineCheck(t,r){const n={targetId:t.targetId.toString(),perso:r.perso};return this.dataSource.genuineCheck(n)}installApp(t,r){const{perso:n,firmware:i,firmwareKey:o,hash:s}=r,u={targetId:t.targetId.toString(),perso:n,firmware:i,firmwareKey:o,hash:s};return this.dataSource.installApp(u)}listInstalledApps(t,r){const n={targetId:t.targetId.toString(),perso:r.perso};return this.dataSource.listInstalledApps(n)}uninstallApp(t,r){const{perso:n,delete:i,deleteKey:o,hash:s}=r,u={targetId:t.targetId.toString(),perso:n,firmware:i,firmwareKey:o,hash:s};return this.dataSource.uninstallApp(u)}updateFirmware(t,r){const n={targetId:t.targetId.toString(),perso:r.perso,firmware:r.firmware,firmwareKey:r.firmwareKey};return this.dataSource.updateFirmware(n)}updateMcu(t,r){const n={targetId:t.targetId.toString(),version:r.version};return this.dataSource.updateMcu(n)}};F_=Kj([Et(),Yj(0,Ye(F1.SecureChannelDataSource))],F_);var Qj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},N_=(e,t)=>(r,n)=>t(r,n,e);let j_=class{_sessionService;_logger;constructor(t,r){this._sessionService=t,this._logger=r("SendApduUseCase")}async execute({sessionId:t,apdu:r,abortTimeout:n,triggersDisconnection:i}){return this._sessionService.getDeviceSessionById(t).caseOf({Right:async o=>(await o.sendApdu(r,{abortTimeout:n,triggersDisconnection:i})).caseOf({Right:s=>s,Left:s=>{throw this._logger.error("Error sending APDU",{data:{sessionId:t,apdu:r,error:s}}),s}}),Left:o=>{throw this._logger.error("Error getting deviceSession",{data:{error:o}}),o}})}};j_=Qj([Et(),N_(0,Ye(fn.DeviceSessionService)),N_(1,Ye(Er.LoggerPublisherServiceFactory))],j_);var Jj=(e,t,r,n)=>{for(var i=t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=s(i)||i);return i},Zs=(e,t)=>(r,n)=>t(r,n,e);let z_=class{constructor(t,r,n,i,o,s){if(this._config=r,this._loggerModuleFactory=n,this._deviceModelDataSource=i,this._apduSenderServiceFactory=o,this._apduReceiverServiceFactory=s,this._logger=n("TransportService"),t.length===0)throw this._logger.warn("No transports provided, please check your configuration"),new e4("No transports provided, please check your configuration");for(const u of t){const c=this.addTransport(u);if(c.isLeft())throw c.extract()}}_transports=new Map;_logger;addTransport(t){const r=t({deviceModelDataSource:this._deviceModelDataSource,loggerServiceFactory:this._loggerModuleFactory,config:this._config,apduSenderServiceFactory:this._apduSenderServiceFactory,apduReceiverServiceFactory:this._apduReceiverServiceFactory});return this.addTransportInternal(r)}addTransportInternal(t){return this.getTransport(t.getIdentifier()).isJust()?(this._logger.warn(`Transport ${t.getIdentifier()} already exists, please check your configuration`),Wt(new Z3(`Transport ${t.getIdentifier()} already exists, please check your configuration`))):(this._transports.set(t.getIdentifier(),t),nr(void 0))}getTransport(t){return _n.fromNullable(this._transports.get(t))}getAllTransports(){return Array.from(this._transports.values())}closeConnection(t){this.getTransport(t.transport).map(r=>r.disconnect({connectedDevice:t}))}};z_=Jj([Et(),Zs(0,Ye(Na.TransportsInput)),Zs(1,Ye(Na.DmkConfig)),Zs(2,Ye(Er.LoggerPublisherServiceFactory)),Zs(3,Ye(J4.DeviceModelDataSource)),Zs(4,Ye(fn.ApduSenderServiceFactory)),Zs(5,Ye(fn.ApduReceiverServiceFactory))],z_);const Zj={ADD_LOG:"addLog"};function ez(e){return{startListeningCommand:()=>e.sendMessage(Jo.START_LISTENING_DEVICES,"{}"),stopListeningCommand:()=>e.sendMessage(Jo.STOP_LISTENING_DEVICES,"{}"),startDiscoveringCommand:()=>e.sendMessage(Jo.START_DISCOVERING,"{}"),stopDiscoveringCommand:()=>e.sendMessage(Jo.STOP_DISCOVERING,"{}"),connectDeviceCommand:(t,r)=>e.sendMessage(Jo.CONNECT_DEVICE,JSON.stringify({deviceId:t,sessionRefresherOptions:r}))}}function tz(e){return{getProviderCommand:()=>e.sendMessage(Jo.GET_PROVIDER,"{}"),setProviderCommand:t=>e.sendMessage(Jo.SET_PROVIDER,JSON.stringify({provider:t}))}}let rz=0;function nz(e){return{sendApduCommand:(t,r)=>{const n=`apdu-${++rz}`,i=r.match(/.{1,2}/g)?.map(o=>parseInt(o,16))||[];return e.sendMessage(Jo.SEND_APDU,JSON.stringify({sessionId:t,apdu:i,requestId:n})),n}}}function iz(e){const{timestamp:t,tag:r,verbosity:n,message:i,payloadJSON:o}=JSON.parse(e);return{timestamp:t,tag:r,verbosity:n,message:i,payloadJSON:o,payload:JSON.parse(o)}}const oz="apdu-exchange";function az(e){const t=e.payload;return typeof t!="object"||t===null||Array.isArray(t)||t.type!==oz||typeof t.apdu!="string"||typeof t.response!="string"?null:{sessionId:typeof t.sessionId=="string"?t.sessionId:void 0,apdu:t.apdu,response:t.response,timestamp:e.timestamp}}function sz(e,t){try{const{module:r}=JSON.parse(e);t(n=>new Set([...n,r]))}catch(r){console.error("Failed to parse moduleConnected payload",r)}}function lz(e,t,r,n){const i=iz(e);if(i!==null){if(t(o=>[...o,i]),n){const o=az(i);o!==null&&r(s=>[...s,o])}return!0}return!1}function uz(e,t){try{const r=JSON.parse(e);t(r)}catch(r){console.error("Failed to parse connectedDevicesUpdate payload",r)}}function cz(e,t){try{const{sessionId:r,state:n}=JSON.parse(e);t(i=>new Map(i).set(r,n))}catch(r){console.error("Failed to parse deviceSessionStateUpdate payload",r)}}function fz(e,t){try{const r=JSON.parse(e);t(r)}catch(r){console.error("Failed to parse discoveredDevicesUpdate payload",r)}}function dz(e,t){try{const{provider:r}=JSON.parse(e);t(r)}catch(r){console.error("Failed to parse providerValue payload",r)}}function pz(e,t){try{const r=JSON.parse(e);t(n=>new Map(n).set(r.requestId,r))}catch(r){console.error("Failed to parse apduResponse payload",r)}}function hz(e){const[t,r]=x.useState([]),[n,i]=x.useState([]),[o,s]=x.useState([]),[u,c]=x.useState(new Set),[f,p]=x.useState([]),[g,h]=x.useState(new Map),[m,y]=x.useState([]),[b,S]=x.useState(!1),[_,C]=x.useState(!1),[O,R]=x.useState(null),[$,T]=x.useState(new Map),[P,L]=x.useState([]),[z,B]=x.useState(!1),X=x.useRef(!1),Y=x.useMemo(()=>({...e,sendMessage:(W,ve)=>{e.sendMessage(W,ve),i(se=>[...se,{type:W,payload:ve}])}}),[e]);x.useEffect(()=>{const{unsubscribe:W}=e.listenToMessages((ve,se)=>{switch(r(Ee=>[...Ee,{type:ve,payload:se}]),ve){case nN:sz(se,c);break;case Cu.CONNECTED_DEVICES_UPDATE:uz(se,p);break;case Cu.DEVICE_SESSION_STATE_UPDATE:cz(se,h);break;case Cu.DISCOVERED_DEVICES_UPDATE:fz(se,y);break;case Cu.PROVIDER_VALUE:dz(se,R);break;case Cu.APDU_RESPONSE:pz(se,T);break;case Zj.ADD_LOG:lz(se,s,L,X.current);break}});return W},[e]);const N=x.useMemo(()=>ez(Y),[Y]),j=x.useMemo(()=>tz(Y),[Y]),F=x.useMemo(()=>nz(Y),[Y]),q=x.useCallback(()=>{S(!0),y([]),N.startListeningCommand()},[N]),U=x.useCallback(()=>{S(!1),y([]),N.stopListeningCommand()},[N]),M=x.useCallback(()=>{C(!0),y([]),N.startDiscoveringCommand()},[N]),G=x.useCallback(()=>{C(!1),y([]),N.stopDiscoveringCommand()},[N]),K=x.useCallback(()=>{s([])},[]),D=x.useCallback(()=>{X.current=!0,B(!0)},[]),A=x.useCallback(()=>{X.current=!1,B(!1)},[]),J=x.useCallback(()=>{L([])},[]),Z=u.has(_E.LOGGER),ne=u.has(_E.DMK_INSPECTOR);return{receivedMessages:t,sentMessages:n,logs:o,connectedModules:u,connectedDevices:f,sessionStates:g,discoveredDevices:m,isListening:b,isActivelyDiscovering:_,isLoggerConnected:Z,isInspectorConnected:ne,providerValue:O,apduResponses:$,apduExchanges:P,isRecordingExchanges:z,sendMessage:Y.sendMessage,clearLogs:K,startRecordingExchanges:D,stopRecordingExchanges:A,clearRecordedExchanges:J,startListening:q,stopListening:U,startDiscovering:M,stopDiscovering:G,connectDevice:N.connectDeviceCommand,getProvider:j.getProviderCommand,setProvider:j.setProviderCommand,sendApdu:F.sendApduCommand}}const gz=ge.div`
466
466
  display: flex;
467
467
  flex-direction: column;
468
468
  align-items: center;
@@ -966,7 +966,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
966
966
  }
967
967
  `,i9=({value:e,onChange:t})=>{const[r,n]=x.useState(!1),[i,o]=x.useState(!1),[s,u]=x.useState(-1),{recentFilters:c,removeFilter:f}=KV(e),p=x.useRef(null),g=x.useRef(null);x.useEffect(()=>{const O=R=>{p.current&&!p.current.contains(R.target)&&n(!1)};return document.addEventListener("mousedown",O),()=>{document.removeEventListener("mousedown",O)}},[]);const h=x.useCallback(()=>{o(!0)},[]),m=x.useCallback(()=>{n(O=>(O||u(-1),!O))},[]),y=x.useCallback(()=>{o(!1)},[]),b=x.useCallback(O=>{t(O),n(!1),u(-1),g.current?.focus()},[t]),S=x.useCallback(O=>{O.key==="Escape"?r?(n(!1),u(-1)):g.current?.blur():O.key==="ArrowDown"?(O.preventDefault(),r&&c.length>0&&u(R=>R<c.length-1?R+1:R)):O.key==="ArrowUp"?(O.preventDefault(),r&&u(R=>R>-1?R-1:-1)):O.key==="Enter"&&r&&s>=0&&c[s]&&(O.preventDefault(),b(c[s]))},[r,c,s,b]),_=x.useCallback((O,R)=>{O.stopPropagation(),f(R)},[f]),C=x.useCallback(()=>{t(""),g.current?.focus()},[t]);return k.jsxs(q2,{ref:p,children:[k.jsxs(X2,{$focused:i,children:[k.jsx(K2,{ref:g,type:"text",placeholder:"Filter (e.g. error, -debug, /regex/)",value:e,onChange:O=>t(O.target.value),onFocus:h,onBlur:y,onKeyDown:S}),e&&k.jsx(n9,{onClick:C,title:"Clear filter",children:k.jsx(Z0,{size:"XS"})}),k.jsx(r9,{type:"button",onClick:m,$active:r,title:"Recent filters",children:k.jsx(Ud,{size:"XS"})})]}),r&&k.jsxs(YV,{children:[k.jsx(QV,{children:"Recent filters"}),c.length===0?k.jsx(t9,{children:"No recent filters"}):c.map((O,R)=>k.jsxs(JV,{$highlighted:R===s,onClick:()=>b(O),children:[k.jsx(ZV,{children:O}),k.jsx(e9,{onClick:$=>_($,O),title:"Remove from recent",children:k.jsx(Z0,{size:"XS"})})]},O))]})]})};var Rm={exports:{}};var RR;function o9(){return RR||(RR=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(o=i(o,n(u)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var u in o)t.call(o,u)&&o[u]&&(s=i(s,u));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Rm)),Rm.exports}var a9=o9();const St=Nr(a9);var s9=Symbol.for("react.element"),l9=Symbol.for("react.transitional.element"),u9=Symbol.for("react.fragment");function Q2(e){return e&&ut(e)==="object"&&(e.$$typeof===s9||e.$$typeof===l9)&&e.type===u9}function Dl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[];return te.Children.forEach(e,function(n){n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(Dl(n)):Q2(n)&&n.props?r=r.concat(Dl(n.props.children,t)):r.push(n))}),r}var oy={},c9=function(t){};function f9(e,t){}function d9(e,t){}function p9(){oy={}}function J2(e,t,r){!t&&!oy[r]&&(e(!1,r),oy[r]=!0)}function Kn(e,t){J2(f9,e,t)}function h9(e,t){J2(d9,e,t)}Kn.preMessage=c9;Kn.resetWarned=p9;Kn.noteOnce=h9;function pc(e){return e instanceof HTMLElement||e instanceof SVGElement}function g9(e){return e&&ut(e)==="object"&&pc(e.nativeElement)?e.nativeElement:pc(e)?e:null}function Gd(e){var t=g9(e);if(t)return t;if(e instanceof te.Component){var r;return(r=Fx.findDOMNode)===null||r===void 0?void 0:r.call(Fx,e)}return null}function J1(e,t,r){var n=x.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}var v9=Number(x.version.split(".")[0]),Z1=function(t,r){typeof t=="function"?t(r):ut(t)==="object"&&t&&"current"in t&&(t.current=r)},Up=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);return i.length<=1?i[0]:function(o){r.forEach(function(s){Z1(s,o)})}},eb=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return J1(function(){return Up.apply(void 0,r)},r,function(i,o){return i.length!==o.length||i.every(function(s,u){return s!==o[u]})})},Wp=function(t){var r,n;if(!t)return!1;if(Z2(t)&&v9>=19)return!0;var i=Bu.isMemo(t)?t.type.type:t.type;return!(typeof i=="function"&&!((r=i.prototype)!==null&&r!==void 0&&r.render)&&i.$$typeof!==Bu.ForwardRef||typeof t=="function"&&!((n=t.prototype)!==null&&n!==void 0&&n.render)&&t.$$typeof!==Bu.ForwardRef)};function Z2(e){return x.isValidElement(e)&&!Q2(e)}var tb=function(t){if(t&&Z2(t)){var r=t;return r.props.propertyIsEnumerable("ref")?r.props.ref:r.ref}return null},ay=x.createContext(null);function m9(e){var t=e.children,r=e.onBatchResize,n=x.useRef(0),i=x.useRef([]),o=x.useContext(ay),s=x.useCallback(function(u,c,f){n.current+=1;var p=n.current;i.current.push({size:u,element:c,data:f}),Promise.resolve().then(function(){p===n.current&&(r?.(i.current),i.current=[])}),o?.(u,c,f)},[r,o]);return x.createElement(ay.Provider,{value:s},t)}var eI=(function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(i,o){return i[0]===r?(n=o,!0):!1}),n}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(r,n){var i=e(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,i=e(n,r);~i&&n.splice(i,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,o=this.__entries__;i<o.length;i++){var s=o[i];r.call(n,s[1],s[0])}},t})()})(),sy=typeof window<"u"&&typeof document<"u"&&window.document===document,hp=(function(){return typeof self<"u"&&self.Math===Math||typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),y9=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(hp):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),b9=2;function S9(e,t){var r=!1,n=!1,i=0;function o(){r&&(r=!1,e()),n&&u()}function s(){y9(o)}function u(){var c=Date.now();if(r){if(c-i<b9)return;n=!0}else r=!0,n=!1,setTimeout(s,t);i=c}return u}var w9=20,x9=["top","right","bottom","left","width","height","size","weight"],E9=typeof MutationObserver<"u",C9=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=S9(this.refresh.bind(this),w9)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var r=this.observers_,n=r.indexOf(t);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return t.forEach(function(r){return r.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!sy||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),E9?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!sy||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,i=x9.some(function(o){return!!~n.indexOf(o)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),tI=(function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),Ll=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||hp}),rI=Gp(0,0,0,0);function gp(e){return parseFloat(e)||0}function OR(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(n,i){var o=e["border-"+i+"-width"];return n+gp(o)},0)}function _9(e){for(var t=["top","right","bottom","left"],r={},n=0,i=t;n<i.length;n++){var o=i[n],s=e["padding-"+o];r[o]=gp(s)}return r}function R9(e){var t=e.getBBox();return Gp(0,0,t.width,t.height)}function O9(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return rI;var n=Ll(e).getComputedStyle(e),i=_9(n),o=i.left+i.right,s=i.top+i.bottom,u=gp(n.width),c=gp(n.height);if(n.boxSizing==="border-box"&&(Math.round(u+o)!==t&&(u-=OR(n,"left","right")+o),Math.round(c+s)!==r&&(c-=OR(n,"top","bottom")+s)),!T9(e)){var f=Math.round(u+o)-t,p=Math.round(c+s)-r;Math.abs(f)!==1&&(u-=f),Math.abs(p)!==1&&(c-=p)}return Gp(i.left,i.top,u,c)}var $9=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Ll(e).SVGGraphicsElement}:function(e){return e instanceof Ll(e).SVGElement&&typeof e.getBBox=="function"}})();function T9(e){return e===Ll(e).document.documentElement}function I9(e){return sy?$9(e)?R9(e):O9(e):rI}function A9(e){var t=e.x,r=e.y,n=e.width,i=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,s=Object.create(o.prototype);return tI(s,{x:t,y:r,width:n,height:i,top:r,right:t+n,bottom:i+r,left:t}),s}function Gp(e,t,r,n){return{x:e,y:t,width:r,height:n}}var k9=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Gp(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=I9(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),P9=(function(){function e(t,r){var n=A9(r);tI(this,{target:t,contentRect:n})}return e})(),M9=(function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new eI,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=r,this.callbackCtx_=n}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Ll(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new k9(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Ll(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new P9(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),nI=typeof WeakMap<"u"?new WeakMap:new eI,iI=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=C9.getInstance(),n=new M9(t,r,this);nI.set(this,n)}return e})();["observe","unobserve","disconnect"].forEach(function(e){iI.prototype[e]=function(){var t;return(t=nI.get(this))[e].apply(t,arguments)}});var D9=(function(){return typeof hp.ResizeObserver<"u"?hp.ResizeObserver:iI})(),Ta=new Map;function L9(e){e.forEach(function(t){var r,n=t.target;(r=Ta.get(n))===null||r===void 0||r.forEach(function(i){return i(n)})})}var oI=new D9(L9);function F9(e,t){Ta.has(e)||(Ta.set(e,new Set),oI.observe(e)),Ta.get(e).add(t)}function N9(e,t){Ta.has(e)&&(Ta.get(e).delete(t),Ta.get(e).size||(oI.unobserve(e),Ta.delete(e)))}var j9=(function(e){Rs(r,e);var t=Os(r);function r(){return en(this,r),t.apply(this,arguments)}return tn(r,[{key:"render",value:function(){return this.props.children}}]),r})(x.Component);function z9(e,t){var r=e.children,n=e.disabled,i=x.useRef(null),o=x.useRef(null),s=x.useContext(ay),u=typeof r=="function",c=u?r(i):r,f=x.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),p=!u&&x.isValidElement(c)&&Wp(c),g=p?tb(c):null,h=eb(g,i),m=function(){var _;return Gd(i.current)||(i.current&&ut(i.current)==="object"?Gd((_=i.current)===null||_===void 0?void 0:_.nativeElement):null)||Gd(o.current)};x.useImperativeHandle(t,function(){return m()});var y=x.useRef(e);y.current=e;var b=x.useCallback(function(S){var _=y.current,C=_.onResize,O=_.data,R=S.getBoundingClientRect(),$=R.width,T=R.height,P=S.offsetWidth,L=S.offsetHeight,z=Math.floor($),B=Math.floor(T);if(f.current.width!==z||f.current.height!==B||f.current.offsetWidth!==P||f.current.offsetHeight!==L){var X={width:z,height:B,offsetWidth:P,offsetHeight:L};f.current=X;var Y=P===Math.round($)?$:P,N=L===Math.round(T)?T:L,j=de(de({},X),{},{offsetWidth:Y,offsetHeight:N});s?.(j,S,O),C&&Promise.resolve().then(function(){C(j,S)})}},[]);return x.useEffect(function(){var S=m();return S&&!n&&F9(S,b),function(){return N9(S,b)}},[i.current,n]),x.createElement(j9,{ref:o},p?x.cloneElement(c,{ref:h}):c)}var B9=x.forwardRef(z9),V9="rc-observer-key";function H9(e,t){var r=e.children,n=typeof r=="function"?[r]:Dl(r);return n.map(function(i,o){var s=i?.key||"".concat(V9,"-").concat(o);return x.createElement(B9,fr({},e,{key:s,ref:o===0?t:void 0}),i)})}var Mc=x.forwardRef(H9);Mc.Collection=m9;function aI(e,t){var r=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(n){delete r[n]}),r}var sI=function(t){return+setTimeout(t,16)},lI=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(sI=function(t){return window.requestAnimationFrame(t)},lI=function(t){return window.cancelAnimationFrame(t)});var $R=0,rb=new Map;function uI(e){rb.delete(e)}var hc=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;$R+=1;var n=$R;function i(o){if(o===0)uI(n),t();else{var s=sI(function(){i(o-1)});rb.set(n,s)}}return i(r),n};hc.cancel=function(e){var t=rb.get(e);return uI(e),lI(t)};function gc(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Tn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function U9(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var TR="data-rc-order",IR="data-rc-priority",W9="rc-util-key",ly=new Map;function cI(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):W9}function qp(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function G9(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function nb(e){return Array.from((ly.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function fI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Tn())return null;var r=t.csp,n=t.prepend,i=t.priority,o=i===void 0?0:i,s=G9(n),u=s==="prependQueue",c=document.createElement("style");c.setAttribute(TR,s),u&&o&&c.setAttribute(IR,"".concat(o)),r!=null&&r.nonce&&(c.nonce=r?.nonce),c.innerHTML=e;var f=qp(t),p=f.firstChild;if(n){if(u){var g=(t.styles||nb(f)).filter(function(h){if(!["prepend","prependQueue"].includes(h.getAttribute(TR)))return!1;var m=Number(h.getAttribute(IR)||0);return o>=m});if(g.length)return f.insertBefore(c,g[g.length-1].nextSibling),c}f.insertBefore(c,p)}else f.appendChild(c);return c}function dI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=qp(t);return(t.styles||nb(r)).find(function(n){return n.getAttribute(cI(t))===e})}function vc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=dI(e,t);if(r){var n=qp(t);n.removeChild(r)}}function q9(e,t){var r=ly.get(e);if(!r||!U9(document,r)){var n=fI("",t),i=n.parentNode;ly.set(e,i),e.removeChild(n)}}function ea(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=qp(r),i=nb(n),o=de(de({},r),{},{styles:i});q9(n,o);var s=dI(t,o);if(s){var u,c;if((u=o.csp)!==null&&u!==void 0&&u.nonce&&s.nonce!==((c=o.csp)===null||c===void 0?void 0:c.nonce)){var f;s.nonce=(f=o.csp)===null||f===void 0?void 0:f.nonce}return s.innerHTML!==e&&(s.innerHTML=e),s}var p=fI(e,o);return p.setAttribute(cI(o),t),p}function uy(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=new Set;function i(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,c=n.has(o);if(Kn(!c,"Warning: There may be circular references"),c)return!1;if(o===s)return!0;if(r&&u>1)return!1;n.add(o);var f=u+1;if(Array.isArray(o)){if(!Array.isArray(s)||o.length!==s.length)return!1;for(var p=0;p<o.length;p++)if(!i(o[p],s[p],f))return!1;return!0}if(o&&s&&ut(o)==="object"&&ut(s)==="object"){var g=Object.keys(o);return g.length!==Object.keys(s).length?!1:g.every(function(h){return i(o[h],s[h],f)})}return!1}return i(e,t)}var X9="%";function cy(e){return e.join(X9)}var K9=(function(){function e(t){en(this,e),oe(this,"instanceId",void 0),oe(this,"cache",new Map),oe(this,"extracted",new Set),this.instanceId=t}return tn(e,[{key:"get",value:function(r){return this.opGet(cy(r))}},{key:"opGet",value:function(r){return this.cache.get(r)||null}},{key:"update",value:function(r,n){return this.opUpdate(cy(r),n)}},{key:"opUpdate",value:function(r,n){var i=this.cache.get(r),o=n(i);o===null?this.cache.delete(r):this.cache.set(r,o)}}]),e})(),Fl="data-token-hash",Qi="data-css-hash",Ia="__cssinjs_instance__";function Y9(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(Qi,"]"))||[],r=document.head.firstChild;Array.from(t).forEach(function(i){i[Ia]=i[Ia]||e,i[Ia]===e&&document.head.insertBefore(i,r)});var n={};Array.from(document.querySelectorAll("style[".concat(Qi,"]"))).forEach(function(i){var o=i.getAttribute(Qi);if(n[o]){if(i[Ia]===e){var s;(s=i.parentNode)===null||s===void 0||s.removeChild(i)}}else n[o]=!0})}return new K9(e)}var Xp=x.createContext({hashPriority:"low",cache:Y9(),defaultCache:!0});function Q9(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var ib=(function(){function e(){en(this,e),oe(this,"cache",void 0),oe(this,"keys",void 0),oe(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return tn(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(r){var n,i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s={map:this.cache};return r.forEach(function(u){if(!s)s=void 0;else{var c;s=(c=s)===null||c===void 0||(c=c.map)===null||c===void 0?void 0:c.get(u)}}),(n=s)!==null&&n!==void 0&&n.value&&o&&(s.value[1]=this.cacheCallTimes++),(i=s)===null||i===void 0?void 0:i.value}},{key:"get",value:function(r){var n;return(n=this.internalGet(r,!0))===null||n===void 0?void 0:n[0]}},{key:"has",value:function(r){return!!this.internalGet(r)}},{key:"set",value:function(r,n){var i=this;if(!this.has(r)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(f,p){var g=ke(f,2),h=g[1];return i.internalGet(p)[1]<h?[p,i.internalGet(p)[1]]:f},[this.keys[0],this.cacheCallTimes]),s=ke(o,1),u=s[0];this.delete(u)}this.keys.push(r)}var c=this.cache;r.forEach(function(f,p){if(p===r.length-1)c.set(f,{value:[n,i.cacheCallTimes++]});else{var g=c.get(f);g?g.map||(g.map=new Map):c.set(f,{map:new Map}),c=c.get(f).map}})}},{key:"deleteByPath",value:function(r,n){var i=r.get(n[0]);if(n.length===1){var o;return i.map?r.set(n[0],{map:i.map}):r.delete(n[0]),(o=i.value)===null||o===void 0?void 0:o[0]}var s=this.deleteByPath(i.map,n.slice(1));return(!i.map||i.map.size===0)&&!i.value&&r.delete(n[0]),s}},{key:"delete",value:function(r){if(this.has(r))return this.keys=this.keys.filter(function(n){return!Q9(n,r)}),this.deleteByPath(this.cache,r)}}]),e})();oe(ib,"MAX_CACHE_SIZE",20);oe(ib,"MAX_CACHE_OFFSET",5);var AR=0,pI=(function(){function e(t){en(this,e),oe(this,"derivatives",void 0),oe(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=AR,t.length===0&&(t.length>0,void 0),AR+=1}return tn(e,[{key:"getDerivativeToken",value:function(r){return this.derivatives.reduce(function(n,i){return i(r,n)},void 0)}}]),e})(),Om=new ib;function fy(e){var t=Array.isArray(e)?e:[e];return Om.has(t)||Om.set(t,new pI(t)),Om.get(t)}var J9=new WeakMap,$m={};function Z9(e,t){for(var r=J9,n=0;n<t.length;n+=1){var i=t[n];r.has(i)||r.set(i,new WeakMap),r=r.get(i)}return r.has($m)||r.set($m,e()),r.get($m)}var kR=new WeakMap;function Xu(e){var t=kR.get(e)||"";return t||(Object.keys(e).forEach(function(r){var n=e[r];t+=r,n instanceof pI?t+=n.id:n&&ut(n)==="object"?t+=Xu(n):t+=n}),t=gc(t),kR.set(e,t)),t}function PR(e,t){return gc("".concat(t,"_").concat(Xu(e)))}var dy=Tn();function Mt(e){return typeof e=="number"?"".concat(e,"px"):e}function vp(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return e;var o=de(de({},n),{},oe(oe({},Fl,t),Qi,r)),s=Object.keys(o).map(function(u){var c=o[u];return c?"".concat(u,'="').concat(c,'"'):null}).filter(function(u){return u}).join(" ");return"<style ".concat(s,">").concat(e,"</style>")}var qd=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(r?"".concat(r,"-"):"").concat(t).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},e7=function(t,r,n){return Object.keys(t).length?".".concat(r).concat(n!=null&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(t).map(function(i){var o=ke(i,2),s=o[0],u=o[1];return"".concat(s,":").concat(u,";")}).join(""),"}"):""},hI=function(t,r,n){var i={},o={};return Object.entries(t).forEach(function(s){var u,c,f=ke(s,2),p=f[0],g=f[1];if(n!=null&&(u=n.preserve)!==null&&u!==void 0&&u[p])o[p]=g;else if((typeof g=="string"||typeof g=="number")&&!(n!=null&&(c=n.ignore)!==null&&c!==void 0&&c[p])){var h,m=qd(p,n?.prefix);i[m]=typeof g=="number"&&!(n!=null&&(h=n.unitless)!==null&&h!==void 0&&h[p])?"".concat(g,"px"):String(g),o[p]="var(".concat(m,")")}}),[o,e7(i,r,{scope:n?.scope})]},MR=Tn()?x.useLayoutEffect:x.useEffect,ar=function(t,r){var n=x.useRef(!0);MR(function(){return t(n.current)},r),MR(function(){return n.current=!1,function(){n.current=!0}},[])},DR=function(t,r){ar(function(n){if(!n)return t()},r)},t7=de({},Tp),LR=t7.useInsertionEffect,r7=function(t,r,n){x.useMemo(t,n),ar(function(){return r(!0)},n)},n7=LR?function(e,t,r){return LR(function(){return e(),t()},r)}:r7,i7=de({},Tp),o7=i7.useInsertionEffect,a7=function(t){var r=[],n=!1;function i(o){n||r.push(o)}return x.useEffect(function(){return n=!1,function(){n=!0,r.length&&r.forEach(function(o){return o()})}},t),i},s7=function(){return function(t){t()}},l7=typeof o7<"u"?a7:s7;function ob(e,t,r,n,i){var o=x.useContext(Xp),s=o.cache,u=[e].concat(rt(t)),c=cy(u),f=l7([c]),p=function(y){s.opUpdate(c,function(b){var S=b||[void 0,void 0],_=ke(S,2),C=_[0],O=C===void 0?0:C,R=_[1],$=R,T=$||r(),P=[O,T];return y?y(P):P})};x.useMemo(function(){p()},[c]);var g=s.opGet(c),h=g[1];return n7(function(){i?.(h)},function(m){return p(function(y){var b=ke(y,2),S=b[0],_=b[1];return m&&S===0&&i?.(h),[S+1,_]}),function(){s.opUpdate(c,function(y){var b=y||[],S=ke(b,2),_=S[0],C=_===void 0?0:_,O=S[1],R=C-1;return R===0?(f(function(){(m||!s.opGet(c))&&n?.(O,!1)}),null):[C-1,O]})}},[c]),h}var u7={},c7="css",ls=new Map;function f7(e){ls.set(e,(ls.get(e)||0)+1)}function d7(e,t){if(typeof document<"u"){var r=document.querySelectorAll("style[".concat(Fl,'="').concat(e,'"]'));r.forEach(function(n){if(n[Ia]===t){var i;(i=n.parentNode)===null||i===void 0||i.removeChild(n)}})}}var p7=0;function h7(e,t){ls.set(e,(ls.get(e)||0)-1);var r=new Set;ls.forEach(function(n,i){n<=0&&r.add(i)}),ls.size-r.size>p7&&r.forEach(function(n){d7(n,t),ls.delete(n)})}var g7=function(t,r,n,i){var o=n.getDerivativeToken(t),s=de(de({},o),r);return i&&(s=i(s)),s},gI="token";function v7(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=x.useContext(Xp),i=n.cache.instanceId,o=n.container,s=r.salt,u=s===void 0?"":s,c=r.override,f=c===void 0?u7:c,p=r.formatToken,g=r.getComputedToken,h=r.cssVar,m=Z9(function(){return Object.assign.apply(Object,[{}].concat(rt(t)))},t),y=Xu(m),b=Xu(f),S=h?Xu(h):"",_=ob(gI,[u,e.id,y,b,S],function(){var C,O=g?g(m,f,e):g7(m,f,e,p),R=de({},O),$="";if(h){var T=hI(O,h.key,{prefix:h.prefix,ignore:h.ignore,unitless:h.unitless,preserve:h.preserve}),P=ke(T,2);O=P[0],$=P[1]}var L=PR(O,u);O._tokenKey=L,R._tokenKey=PR(R,u);var z=(C=h?.key)!==null&&C!==void 0?C:L;O._themeKey=z,f7(z);var B="".concat(c7,"-").concat(gc(L));return O._hashId=B,[O,B,R,$,h?.key||""]},function(C){h7(C[0]._themeKey,i)},function(C){var O=ke(C,4),R=O[0],$=O[3];if(h&&$){var T=ea($,gc("css-variables-".concat(R._themeKey)),{mark:Qi,prepend:"queue",attachTo:o,priority:-999});T[Ia]=i,T.setAttribute(Fl,R._themeKey)}});return _}var m7=function(t,r,n){var i=ke(t,5),o=i[2],s=i[3],u=i[4],c=n||{},f=c.plain;if(!s)return null;var p=o._tokenKey,g=-999,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(g)},m=vp(s,u,p,h,f);return[g,p,m]},vI="comm",mI="rule",yI="decl",y7="@import",b7="@keyframes",S7="@layer",bI=Math.abs,ab=String.fromCharCode;function SI(e){return e.trim()}function Xd(e,t,r){return e.replace(t,r)}function w7(e,t,r){return e.indexOf(t,r)}function mc(e,t){return e.charCodeAt(t)|0}function Nl(e,t,r){return e.slice(t,r)}function vo(e){return e.length}function x7(e){return e.length}function fd(e,t){return t.push(e),e}var Kp=1,jl=1,wI=0,Ri=0,hr=0,Gl="";function sb(e,t,r,n,i,o,s,u){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:Kp,column:jl,length:s,return:"",siblings:u}}function E7(){return hr}function C7(){return hr=Ri>0?mc(Gl,--Ri):0,jl--,hr===10&&(jl=1,Kp--),hr}function Ji(){return hr=Ri<wI?mc(Gl,Ri++):0,jl++,hr===10&&(jl=1,Kp++),hr}function Aa(){return mc(Gl,Ri)}function Kd(){return Ri}function Yp(e,t){return Nl(Gl,e,t)}function yc(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _7(e){return Kp=jl=1,wI=vo(Gl=e),Ri=0,[]}function R7(e){return Gl="",e}function Tm(e){return SI(Yp(Ri-1,py(e===91?e+2:e===40?e+1:e)))}function O7(e){for(;(hr=Aa())&&hr<33;)Ji();return yc(e)>2||yc(hr)>3?"":" "}function $7(e,t){for(;--t&&Ji()&&!(hr<48||hr>102||hr>57&&hr<65||hr>70&&hr<97););return Yp(e,Kd()+(t<6&&Aa()==32&&Ji()==32))}function py(e){for(;Ji();)switch(hr){case e:return Ri;case 34:case 39:e!==34&&e!==39&&py(hr);break;case 40:e===41&&py(e);break;case 92:Ji();break}return Ri}function T7(e,t){for(;Ji()&&e+hr!==57;)if(e+hr===84&&Aa()===47)break;return"/*"+Yp(t,Ri-1)+"*"+ab(e===47?e:Ji())}function I7(e){for(;!yc(Aa());)Ji();return Yp(e,Ri)}function A7(e){return R7(Yd("",null,null,null,[""],e=_7(e),0,[0],e))}function Yd(e,t,r,n,i,o,s,u,c){for(var f=0,p=0,g=s,h=0,m=0,y=0,b=1,S=1,_=1,C=0,O="",R=i,$=o,T=n,P=O;S;)switch(y=C,C=Ji()){case 40:if(y!=108&&mc(P,g-1)==58){w7(P+=Xd(Tm(C),"&","&\f"),"&\f",bI(f?u[f-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:P+=Tm(C);break;case 9:case 10:case 13:case 32:P+=O7(y);break;case 92:P+=$7(Kd()-1,7);continue;case 47:switch(Aa()){case 42:case 47:fd(k7(T7(Ji(),Kd()),t,r,c),c),(yc(y||1)==5||yc(Aa()||1)==5)&&vo(P)&&Nl(P,-1,void 0)!==" "&&(P+=" ");break;default:P+="/"}break;case 123*b:u[f++]=vo(P)*_;case 125*b:case 59:case 0:switch(C){case 0:case 125:S=0;case 59+p:_==-1&&(P=Xd(P,/\f/g,"")),m>0&&(vo(P)-g||b===0&&y===47)&&fd(m>32?NR(P+";",n,r,g-1,c):NR(Xd(P," ","")+";",n,r,g-2,c),c);break;case 59:P+=";";default:if(fd(T=FR(P,t,r,f,p,i,u,O,R=[],$=[],g,o),o),C===123)if(p===0)Yd(P,t,T,T,R,o,g,u,$);else switch(h===99&&mc(P,3)===110?100:h){case 100:case 108:case 109:case 115:Yd(e,T,T,n&&fd(FR(e,T,T,0,0,i,u,O,i,R=[],g,$),$),i,$,g,u,n?R:$);break;default:Yd(P,T,T,T,[""],$,0,u,$)}}f=p=m=0,b=_=1,O=P="",g=s;break;case 58:g=1+vo(P),m=y;default:if(b<1){if(C==123)--b;else if(C==125&&b++==0&&C7()==125)continue}switch(P+=ab(C),C*b){case 38:_=p>0?1:(P+="\f",-1);break;case 44:u[f++]=(vo(P)-1)*_,_=1;break;case 64:Aa()===45&&(P+=Tm(Ji())),h=Aa(),p=g=vo(O=P+=I7(Kd())),C++;break;case 45:y===45&&vo(P)==2&&(b=0)}}return o}function FR(e,t,r,n,i,o,s,u,c,f,p,g){for(var h=i-1,m=i===0?o:[""],y=x7(m),b=0,S=0,_=0;b<n;++b)for(var C=0,O=Nl(e,h+1,h=bI(S=s[b])),R=e;C<y;++C)(R=SI(S>0?m[C]+" "+O:Xd(O,/&\f/g,m[C])))&&(c[_++]=R);return sb(e,t,r,i===0?mI:u,c,f,p,g)}function k7(e,t,r,n){return sb(e,t,r,vI,ab(E7()),Nl(e,2,-2),0,n)}function NR(e,t,r,n,i){return sb(e,t,r,yI,Nl(e,0,n),Nl(e,n+1,-1),n,i)}function hy(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function P7(e,t,r,n){switch(e.type){case S7:if(e.children.length)break;case y7:case yI:return e.return=e.return||e.value;case vI:return"";case b7:return e.return=e.value+"{"+hy(e.children,n)+"}";case mI:if(!vo(e.value=e.props.join(",")))return""}return vo(r=hy(e.children,n))?e.return=e.value+"{"+r+"}":""}var jR="data-ant-cssinjs-cache-path",xI="_FILE_STYLE__",gs,EI=!0;function M7(){if(!gs&&(gs={},Tn())){var e=document.createElement("div");e.className=jR,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(i){var o=i.split(":"),s=ke(o,2),u=s[0],c=s[1];gs[u]=c});var r=document.querySelector("style[".concat(jR,"]"));if(r){var n;EI=!1,(n=r.parentNode)===null||n===void 0||n.removeChild(r)}document.body.removeChild(e)}}function D7(e){return M7(),!!gs[e]}function L7(e){var t=gs[e],r=null;if(t&&Tn())if(EI)r=xI;else{var n=document.querySelector("style[".concat(Qi,'="').concat(gs[e],'"]'));n?r=n.innerHTML:delete gs[e]}return[r,t]}var F7="_skip_check_",CI="_multi_value_";function Qd(e){var t=hy(A7(e),P7);return t.replace(/\{%%%\:[^;];}/g,";")}function N7(e){return ut(e)==="object"&&e&&(F7 in e||CI in e)}function zR(e,t,r){if(!t)return e;var n=".".concat(t),i=r==="low"?":where(".concat(n,")"):n,o=e.split(",").map(function(s){var u,c=s.trim().split(/\s+/),f=c[0]||"",p=((u=f.match(/^\w+/))===null||u===void 0?void 0:u[0])||"";return f="".concat(p).concat(i).concat(f.slice(p.length)),[f].concat(rt(c.slice(1))).join(" ")});return o.join(",")}var j7=function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=n.root,o=n.injectHash,s=n.parentSelectors,u=r.hashId,c=r.layer;r.path;var f=r.hashPriority,p=r.transformers,g=p===void 0?[]:p;r.linters;var h="",m={};function y(_){var C=_.getName(u);if(!m[C]){var O=e(_.style,r,{root:!1,parentSelectors:s}),R=ke(O,1),$=R[0];m[C]="@keyframes ".concat(_.getName(u)).concat($)}}function b(_){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return _.forEach(function(O){Array.isArray(O)?b(O,C):O&&C.push(O)}),C}var S=b(Array.isArray(t)?t:[t]);return S.forEach(function(_){var C=typeof _=="string"&&!i?{}:_;if(typeof C=="string")h+="".concat(C,`
968
968
  `);else if(C._keyframe)y(C);else{var O=g.reduce(function(R,$){var T;return($==null||(T=$.visit)===null||T===void 0?void 0:T.call($,R))||R},C);Object.keys(O).forEach(function(R){var $=O[R];if(ut($)==="object"&&$&&(R!=="animationName"||!$._keyframe)&&!N7($)){var T=!1,P=R.trim(),L=!1;(i||o)&&u?P.startsWith("@")?T=!0:P==="&"?P=zR("",u,f):P=zR(R,u,f):i&&!u&&(P==="&"||P==="")&&(P="",L=!0);var z=e($,r,{root:L,injectHash:T,parentSelectors:[].concat(rt(s),[P])}),B=ke(z,2),X=B[0],Y=B[1];m=de(de({},m),Y),h+="".concat(P).concat(X)}else{let F=function(q,U){var M=q.replace(/[A-Z]/g,function(K){return"-".concat(K.toLowerCase())}),G=U;!Q$[q]&&typeof G=="number"&&G!==0&&(G="".concat(G,"px")),q==="animationName"&&U!==null&&U!==void 0&&U._keyframe&&(y(U),G=U.getName(u)),h+="".concat(M,":").concat(G,";")};var N,j=(N=$?.value)!==null&&N!==void 0?N:$;ut($)==="object"&&$!==null&&$!==void 0&&$[CI]&&Array.isArray(j)?j.forEach(function(q){F(R,q)}):F(R,j)}})}}),i?c&&(h&&(h="@layer ".concat(c.name," {").concat(h,"}")),c.dependencies&&(m["@layer ".concat(c.name)]=c.dependencies.map(function(_){return"@layer ".concat(_,", ").concat(c.name,";")}).join(`
969
- `))):h="{".concat(h,"}"),[h,m]};function _I(e,t){return gc("".concat(e.join("%")).concat(t))}function z7(){return null}var RI="style";function gy(e,t){var r=e.token,n=e.path,i=e.hashId,o=e.layer,s=e.nonce,u=e.clientOnly,c=e.order,f=c===void 0?0:c,p=x.useContext(Xp),g=p.autoClear;p.mock;var h=p.defaultCache,m=p.hashPriority,y=p.container,b=p.ssrInline,S=p.transformers,_=p.linters,C=p.cache,O=p.layer,R=r._tokenKey,$=[R];O&&$.push("layer"),$.push.apply($,rt(n));var T=dy,P=ob(RI,$,function(){var Y=$.join("|");if(D7(Y)){var N=L7(Y),j=ke(N,2),F=j[0],q=j[1];if(F)return[F,R,q,{},u,f]}var U=t(),M=j7(U,{hashId:i,hashPriority:m,layer:O?o:void 0,path:n.join("-"),transformers:S,linters:_}),G=ke(M,2),K=G[0],D=G[1],A=Qd(K),J=_I($,A);return[A,R,J,D,u,f]},function(Y,N){var j=ke(Y,3),F=j[2];(N||g)&&dy&&vc(F,{mark:Qi,attachTo:y})},function(Y){var N=ke(Y,4),j=N[0];N[1];var F=N[2],q=N[3];if(T&&j!==xI){var U={mark:Qi,prepend:O?!1:"queue",attachTo:y,priority:f},M=typeof s=="function"?s():s;M&&(U.csp={nonce:M});var G=[],K=[];Object.keys(q).forEach(function(A){A.startsWith("@layer")?G.push(A):K.push(A)}),G.forEach(function(A){ea(Qd(q[A]),"_layer-".concat(A),de(de({},U),{},{prepend:!0}))});var D=ea(j,F,U);D[Ia]=C.instanceId,D.setAttribute(Fl,R),K.forEach(function(A){ea(Qd(q[A]),"_effect-".concat(A),U)})}}),L=ke(P,3),z=L[0],B=L[1],X=L[2];return function(Y){var N;return!b||T||!h?N=x.createElement(z7,null):N=x.createElement("style",fr({},oe(oe({},Fl,B),Qi,X),{dangerouslySetInnerHTML:{__html:z}})),x.createElement(x.Fragment,null,N,Y)}}var B7=function(t,r,n){var i=ke(t,6),o=i[0],s=i[1],u=i[2],c=i[3],f=i[4],p=i[5],g=n||{},h=g.plain;if(f)return null;var m=o,y={"data-rc-order":"prependQueue","data-rc-priority":"".concat(p)};return m=vp(o,s,u,y,h),c&&Object.keys(c).forEach(function(b){if(!r[b]){r[b]=!0;var S=Qd(c[b]),_=vp(S,s,"_effect-".concat(b),y,h);b.startsWith("@layer")?m=_+m:m+=_}}),[p,u,m]},OI="cssVar",V7=function(t,r){var n=t.key,i=t.prefix,o=t.unitless,s=t.ignore,u=t.token,c=t.scope,f=c===void 0?"":c,p=x.useContext(Xp),g=p.cache.instanceId,h=p.container,m=u._tokenKey,y=[].concat(rt(t.path),[n,f,m]),b=ob(OI,y,function(){var S=r(),_=hI(S,n,{prefix:i,unitless:o,ignore:s,scope:f}),C=ke(_,2),O=C[0],R=C[1],$=_I(y,R);return[O,R,$,n]},function(S){var _=ke(S,3),C=_[2];dy&&vc(C,{mark:Qi,attachTo:h})},function(S){var _=ke(S,3),C=_[1],O=_[2];if(C){var R=ea(C,O,{mark:Qi,prepend:"queue",attachTo:h,priority:-999});R[Ia]=g,R.setAttribute(Fl,n)}});return b},H7=function(t,r,n){var i=ke(t,4),o=i[1],s=i[2],u=i[3],c=n||{},f=c.plain;if(!o)return null;var p=-999,g={"data-rc-order":"prependQueue","data-rc-priority":"".concat(p)},h=vp(o,u,s,g,f);return[p,s,h]};oe(oe(oe({},RI,B7),gI,m7),OI,H7);var Ai=(function(){function e(t,r){en(this,e),oe(this,"name",void 0),oe(this,"style",void 0),oe(this,"_keyframe",!0),this.name=t,this.style=r}return tn(e,[{key:"getName",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return r?"".concat(r,"-").concat(this.name):this.name}}]),e})();function el(e){return e.notSplit=!0,e}el(["borderTop","borderBottom"]),el(["borderTop"]),el(["borderBottom"]),el(["borderLeft","borderRight"]),el(["borderLeft"]),el(["borderRight"]);var lb=x.createContext({});function U7(e){return E2(e)||_2(e)||u1(e)||C2()}function bo(e,t){for(var r=e,n=0;n<t.length;n+=1){if(r==null)return;r=r[t[n]]}return r}function $I(e,t,r,n){if(!t.length)return r;var i=U7(t),o=i[0],s=i.slice(1),u;return!e&&typeof o=="number"?u=[]:Array.isArray(e)?u=rt(e):u=de({},e),n&&r===void 0&&s.length===1?delete u[o][s[0]]:u[o]=$I(u[o],s,r,n),u}function Wi(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&n&&r===void 0&&!bo(e,t.slice(0,-1))?e:$I(e,t,r,n)}function W7(e){return ut(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function BR(e){return Array.isArray(e)?[]:{}}var G7=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function gl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=BR(t[0]);return t.forEach(function(i){function o(s,u){var c=new Set(u),f=bo(i,s),p=Array.isArray(f);if(p||W7(f)){if(!c.has(f)){c.add(f);var g=bo(n,s);p?n=Wi(n,s,[]):(!g||ut(g)!=="object")&&(n=Wi(n,s,BR(f))),G7(f).forEach(function(h){o([].concat(rt(s),[h]),c)})}}else n=Wi(n,s,f)}o([])}),n}function q7(){}const X7=x.createContext({}),TI=()=>{const e=()=>{};return e.deprecated=q7,e},K7=x.createContext(void 0);var Y7={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},Q7={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},J7=de(de({},Q7),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const II={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},VR={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},J7),timePickerLocale:Object.assign({},II)},zn="${label} is not a valid ${type}",zl={locale:"en",Pagination:Y7,DatePicker:VR,TimePicker:II,Calendar:VR,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:zn,method:zn,array:zn,object:zn,number:zn,date:zn,boolean:zn,integer:zn,float:zn,regexp:zn,email:zn,url:zn,hex:zn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};Object.assign({},zl.Modal);let Jd=[];const HR=()=>Jd.reduce((e,t)=>Object.assign(Object.assign({},e),t),zl.Modal);function Z7(e){if(e){const t=Object.assign({},e);return Jd.push(t),HR(),()=>{Jd=Jd.filter(r=>r!==t),HR()}}Object.assign({},zl.Modal)}const ub=x.createContext(void 0),eH=(e,t)=>{const r=x.useContext(ub),n=x.useMemo(()=>{var o;const s=zl[e],u=(o=r?.[e])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof s=="function"?s():s),u||{})},[e,t,r]),i=x.useMemo(()=>{const o=r?.locale;return r?.exist&&!o?zl.locale:o},[r]);return[n,i]},tH="internalMark",rH=e=>{const{locale:t={},children:r,_ANT_MARK__:n}=e;x.useEffect(()=>Z7(t?.Modal),[t]);const i=x.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return x.createElement(ub.Provider,{value:i},r)},Or=Math.round;function Im(e,t){const r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=t(n[i]||0,r[i]||"",i);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const UR=(e,t,r)=>r===0?e:e/100;function Ou(e,t){const r=t||255;return e>r?r:e<0?0:e}class vl{constructor(t){oe(this,"isValid",!0),oe(this,"r",0),oe(this,"g",0),oe(this,"b",0),oe(this,"a",1),oe(this,"_h",void 0),oe(this,"_s",void 0),oe(this,"_l",void 0),oe(this,"_v",void 0),oe(this,"_max",void 0),oe(this,"_min",void 0),oe(this,"_brightness",void 0);function r(i){return i[0]in t&&i[1]in t&&i[2]in t}if(t)if(typeof t=="string"){let o=function(s){return i.startsWith(s)};var n=o;const i=t.trim();/^#?[A-F\d]{3,8}$/i.test(i)?this.fromHexString(i):o("rgb")?this.fromRgbString(i):o("hsl")?this.fromHslString(i):(o("hsv")||o("hsb"))&&this.fromHsvString(i)}else if(t instanceof vl)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Ou(t.r),this.g=Ou(t.g),this.b=Ou(t.b),this.a=typeof t.a=="number"?Ou(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(o){const s=o/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}const r=t(this.r),n=t(this.g),i=t(this.b);return .2126*r+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Or(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:r,s:n,l:i,a:this.a})}lighten(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:r,s:n,l:i,a:this.a})}mix(t,r=50){const n=this._c(t),i=r/100,o=u=>(n[u]-this[u])*i+this[u],s={r:Or(o("r")),g:Or(o("g")),b:Or(o("b")),a:Or(o("a")*100)/100};return this._c(s)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const r=this._c(t),n=this.a+r.a*(1-this.a),i=o=>Or((this[o]*this.a+r[o]*r.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=Or(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=Or(this.getSaturation()*100),n=Or(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){const i=this.clone();return i[t]=Ou(r,n),i}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const r=t.replace("#","");function n(i,o){return parseInt(r[i]+r[o||i],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a:i}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof i=="number"?i:1,r<=0){const h=Or(n*255);this.r=h,this.g=h,this.b=h}let o=0,s=0,u=0;const c=t/60,f=(1-Math.abs(2*n-1))*r,p=f*(1-Math.abs(c%2-1));c>=0&&c<1?(o=f,s=p):c>=1&&c<2?(o=p,s=f):c>=2&&c<3?(s=f,u=p):c>=3&&c<4?(s=p,u=f):c>=4&&c<5?(o=p,u=f):c>=5&&c<6&&(o=f,u=p);const g=n-f/2;this.r=Or((o+g)*255),this.g=Or((s+g)*255),this.b=Or((u+g)*255)}fromHsv({h:t,s:r,v:n,a:i}){this._h=t%360,this._s=r,this._v=n,this.a=typeof i=="number"?i:1;const o=Or(n*255);if(this.r=o,this.g=o,this.b=o,r<=0)return;const s=t/60,u=Math.floor(s),c=s-u,f=Or(n*(1-r)*255),p=Or(n*(1-r*c)*255),g=Or(n*(1-r*(1-c))*255);switch(u){case 0:this.g=g,this.b=f;break;case 1:this.r=p,this.b=f;break;case 2:this.r=f,this.b=g;break;case 3:this.r=f,this.g=p;break;case 4:this.r=g,this.g=f;break;default:this.g=f,this.b=p;break}}fromHsvString(t){const r=Im(t,UR);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=Im(t,UR);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=Im(t,(n,i)=>i.includes("%")?Or(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}var dd=2,WR=.16,nH=.05,iH=.05,oH=.15,AI=5,kI=4,aH=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function GR(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-dd*t:Math.round(e.h)+dd*t:n=r?Math.round(e.h)+dd*t:Math.round(e.h)-dd*t,n<0?n+=360:n>=360&&(n-=360),n}function qR(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-WR*t:t===kI?n=e.s+WR:n=e.s+nH*t,n>1&&(n=1),r&&t===AI&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function XR(e,t,r){var n;return r?n=e.v+iH*t:n=e.v-oH*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function bc(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new vl(e),i=n.toHsv(),o=AI;o>0;o-=1){var s=new vl({h:GR(i,o,!0),s:qR(i,o,!0),v:XR(i,o,!0)});r.push(s)}r.push(n);for(var u=1;u<=kI;u+=1){var c=new vl({h:GR(i,u),s:qR(i,u),v:XR(i,u)});r.push(c)}return t.theme==="dark"?aH.map(function(f){var p=f.index,g=f.amount;return new vl(t.backgroundColor||"#141414").mix(r[p],g).toHexString()}):r.map(function(f){return f.toHexString()})}var Am={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},vy=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];vy.primary=vy[5];var my=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];my.primary=my[5];var yy=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];yy.primary=yy[5];var mp=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];mp.primary=mp[5];var by=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];by.primary=by[5];var Sy=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Sy.primary=Sy[5];var wy=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];wy.primary=wy[5];var xy=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];xy.primary=xy[5];var yp=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];yp.primary=yp[5];var Ey=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Ey.primary=Ey[5];var Cy=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Cy.primary=Cy[5];var _y=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];_y.primary=_y[5];var Ry=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Ry.primary=Ry[5];var km={red:vy,volcano:my,orange:yy,gold:mp,yellow:by,lime:Sy,green:wy,cyan:xy,blue:yp,geekblue:Ey,purple:Cy,magenta:_y,grey:Ry};const PI={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Sc=Object.assign(Object.assign({},PI),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
969
+ `))):h="{".concat(h,"}"),[h,m]};function _I(e,t){return gc("".concat(e.join("%")).concat(t))}function z7(){return null}var RI="style";function gy(e,t){var r=e.token,n=e.path,i=e.hashId,o=e.layer,s=e.nonce,u=e.clientOnly,c=e.order,f=c===void 0?0:c,p=x.useContext(Xp),g=p.autoClear;p.mock;var h=p.defaultCache,m=p.hashPriority,y=p.container,b=p.ssrInline,S=p.transformers,_=p.linters,C=p.cache,O=p.layer,R=r._tokenKey,$=[R];O&&$.push("layer"),$.push.apply($,rt(n));var T=dy,P=ob(RI,$,function(){var Y=$.join("|");if(D7(Y)){var N=L7(Y),j=ke(N,2),F=j[0],q=j[1];if(F)return[F,R,q,{},u,f]}var U=t(),M=j7(U,{hashId:i,hashPriority:m,layer:O?o:void 0,path:n.join("-"),transformers:S,linters:_}),G=ke(M,2),K=G[0],D=G[1],A=Qd(K),J=_I($,A);return[A,R,J,D,u,f]},function(Y,N){var j=ke(Y,3),F=j[2];(N||g)&&dy&&vc(F,{mark:Qi,attachTo:y})},function(Y){var N=ke(Y,4),j=N[0];N[1];var F=N[2],q=N[3];if(T&&j!==xI){var U={mark:Qi,prepend:O?!1:"queue",attachTo:y,priority:f},M=typeof s=="function"?s():s;M&&(U.csp={nonce:M});var G=[],K=[];Object.keys(q).forEach(function(A){A.startsWith("@layer")?G.push(A):K.push(A)}),G.forEach(function(A){ea(Qd(q[A]),"_layer-".concat(A),de(de({},U),{},{prepend:!0}))});var D=ea(j,F,U);D[Ia]=C.instanceId,D.setAttribute(Fl,R),K.forEach(function(A){ea(Qd(q[A]),"_effect-".concat(A),U)})}}),L=ke(P,3),z=L[0],B=L[1],X=L[2];return function(Y){var N;return!b||T||!h?N=x.createElement(z7,null):N=x.createElement("style",fr({},oe(oe({},Fl,B),Qi,X),{dangerouslySetInnerHTML:{__html:z}})),x.createElement(x.Fragment,null,N,Y)}}var B7=function(t,r,n){var i=ke(t,6),o=i[0],s=i[1],u=i[2],c=i[3],f=i[4],p=i[5],g=n||{},h=g.plain;if(f)return null;var m=o,y={"data-rc-order":"prependQueue","data-rc-priority":"".concat(p)};return m=vp(o,s,u,y,h),c&&Object.keys(c).forEach(function(b){if(!r[b]){r[b]=!0;var S=Qd(c[b]),_=vp(S,s,"_effect-".concat(b),y,h);b.startsWith("@layer")?m=_+m:m+=_}}),[p,u,m]},OI="cssVar",V7=function(t,r){var n=t.key,i=t.prefix,o=t.unitless,s=t.ignore,u=t.token,c=t.scope,f=c===void 0?"":c,p=x.useContext(Xp),g=p.cache.instanceId,h=p.container,m=u._tokenKey,y=[].concat(rt(t.path),[n,f,m]),b=ob(OI,y,function(){var S=r(),_=hI(S,n,{prefix:i,unitless:o,ignore:s,scope:f}),C=ke(_,2),O=C[0],R=C[1],$=_I(y,R);return[O,R,$,n]},function(S){var _=ke(S,3),C=_[2];dy&&vc(C,{mark:Qi,attachTo:h})},function(S){var _=ke(S,3),C=_[1],O=_[2];if(C){var R=ea(C,O,{mark:Qi,prepend:"queue",attachTo:h,priority:-999});R[Ia]=g,R.setAttribute(Fl,n)}});return b},H7=function(t,r,n){var i=ke(t,4),o=i[1],s=i[2],u=i[3],c=n||{},f=c.plain;if(!o)return null;var p=-999,g={"data-rc-order":"prependQueue","data-rc-priority":"".concat(p)},h=vp(o,u,s,g,f);return[p,s,h]};oe(oe(oe({},RI,B7),gI,m7),OI,H7);var Ai=(function(){function e(t,r){en(this,e),oe(this,"name",void 0),oe(this,"style",void 0),oe(this,"_keyframe",!0),this.name=t,this.style=r}return tn(e,[{key:"getName",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return r?"".concat(r,"-").concat(this.name):this.name}}]),e})();function el(e){return e.notSplit=!0,e}el(["borderTop","borderBottom"]),el(["borderTop"]),el(["borderBottom"]),el(["borderLeft","borderRight"]),el(["borderLeft"]),el(["borderRight"]);var lb=x.createContext({});function U7(e){return E2(e)||_2(e)||u1(e)||C2()}function bo(e,t){for(var r=e,n=0;n<t.length;n+=1){if(r==null)return;r=r[t[n]]}return r}function $I(e,t,r,n){if(!t.length)return r;var i=U7(t),o=i[0],s=i.slice(1),u;return!e&&typeof o=="number"?u=[]:Array.isArray(e)?u=rt(e):u=de({},e),n&&r===void 0&&s.length===1?delete u[o][s[0]]:u[o]=$I(u[o],s,r,n),u}function Wi(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&n&&r===void 0&&!bo(e,t.slice(0,-1))?e:$I(e,t,r,n)}function W7(e){return ut(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function BR(e){return Array.isArray(e)?[]:{}}var G7=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function gl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=BR(t[0]);return t.forEach(function(i){function o(s,u){var c=new Set(u),f=bo(i,s),p=Array.isArray(f);if(p||W7(f)){if(!c.has(f)){c.add(f);var g=bo(n,s);p?n=Wi(n,s,[]):(!g||ut(g)!=="object")&&(n=Wi(n,s,BR(f))),G7(f).forEach(function(h){o([].concat(rt(s),[h]),c)})}}else n=Wi(n,s,f)}o([])}),n}function q7(){}const X7=x.createContext({}),TI=()=>{const e=()=>{};return e.deprecated=q7,e},K7=x.createContext(void 0);var Y7={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},Q7={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},J7=de(de({},Q7),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const II={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},VR={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},J7),timePickerLocale:Object.assign({},II)},zn="${label} is not a valid ${type}",zl={locale:"en",Pagination:Y7,DatePicker:VR,TimePicker:II,Calendar:VR,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:zn,method:zn,array:zn,object:zn,number:zn,date:zn,boolean:zn,integer:zn,float:zn,regexp:zn,email:zn,url:zn,hex:zn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};Object.assign({},zl.Modal);let Jd=[];const HR=()=>Jd.reduce((e,t)=>Object.assign(Object.assign({},e),t),zl.Modal);function Z7(e){if(e){const t=Object.assign({},e);return Jd.push(t),HR(),()=>{Jd=Jd.filter(r=>r!==t),HR()}}Object.assign({},zl.Modal)}const ub=x.createContext(void 0),eH=(e,t)=>{const r=x.useContext(ub),n=x.useMemo(()=>{var o;const s=zl[e],u=(o=r?.[e])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof s=="function"?s():s),u||{})},[e,t,r]),i=x.useMemo(()=>{const o=r?.locale;return r?.exist&&!o?zl.locale:o},[r]);return[n,i]},tH="internalMark",rH=e=>{const{locale:t={},children:r,_ANT_MARK__:n}=e;x.useEffect(()=>Z7(t?.Modal),[t]);const i=x.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return x.createElement(ub.Provider,{value:i},r)},$r=Math.round;function Im(e,t){const r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=t(n[i]||0,r[i]||"",i);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const UR=(e,t,r)=>r===0?e:e/100;function Ou(e,t){const r=t||255;return e>r?r:e<0?0:e}class vl{constructor(t){oe(this,"isValid",!0),oe(this,"r",0),oe(this,"g",0),oe(this,"b",0),oe(this,"a",1),oe(this,"_h",void 0),oe(this,"_s",void 0),oe(this,"_l",void 0),oe(this,"_v",void 0),oe(this,"_max",void 0),oe(this,"_min",void 0),oe(this,"_brightness",void 0);function r(i){return i[0]in t&&i[1]in t&&i[2]in t}if(t)if(typeof t=="string"){let o=function(s){return i.startsWith(s)};var n=o;const i=t.trim();/^#?[A-F\d]{3,8}$/i.test(i)?this.fromHexString(i):o("rgb")?this.fromRgbString(i):o("hsl")?this.fromHslString(i):(o("hsv")||o("hsb"))&&this.fromHsvString(i)}else if(t instanceof vl)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Ou(t.r),this.g=Ou(t.g),this.b=Ou(t.b),this.a=typeof t.a=="number"?Ou(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(o){const s=o/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}const r=t(this.r),n=t(this.g),i=t(this.b);return .2126*r+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=$r(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:r,s:n,l:i,a:this.a})}lighten(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:r,s:n,l:i,a:this.a})}mix(t,r=50){const n=this._c(t),i=r/100,o=u=>(n[u]-this[u])*i+this[u],s={r:$r(o("r")),g:$r(o("g")),b:$r(o("b")),a:$r(o("a")*100)/100};return this._c(s)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const r=this._c(t),n=this.a+r.a*(1-this.a),i=o=>$r((this[o]*this.a+r[o]*r.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=$r(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=$r(this.getSaturation()*100),n=$r(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){const i=this.clone();return i[t]=Ou(r,n),i}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const r=t.replace("#","");function n(i,o){return parseInt(r[i]+r[o||i],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a:i}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof i=="number"?i:1,r<=0){const h=$r(n*255);this.r=h,this.g=h,this.b=h}let o=0,s=0,u=0;const c=t/60,f=(1-Math.abs(2*n-1))*r,p=f*(1-Math.abs(c%2-1));c>=0&&c<1?(o=f,s=p):c>=1&&c<2?(o=p,s=f):c>=2&&c<3?(s=f,u=p):c>=3&&c<4?(s=p,u=f):c>=4&&c<5?(o=p,u=f):c>=5&&c<6&&(o=f,u=p);const g=n-f/2;this.r=$r((o+g)*255),this.g=$r((s+g)*255),this.b=$r((u+g)*255)}fromHsv({h:t,s:r,v:n,a:i}){this._h=t%360,this._s=r,this._v=n,this.a=typeof i=="number"?i:1;const o=$r(n*255);if(this.r=o,this.g=o,this.b=o,r<=0)return;const s=t/60,u=Math.floor(s),c=s-u,f=$r(n*(1-r)*255),p=$r(n*(1-r*c)*255),g=$r(n*(1-r*(1-c))*255);switch(u){case 0:this.g=g,this.b=f;break;case 1:this.r=p,this.b=f;break;case 2:this.r=f,this.b=g;break;case 3:this.r=f,this.g=p;break;case 4:this.r=g,this.g=f;break;default:this.g=f,this.b=p;break}}fromHsvString(t){const r=Im(t,UR);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=Im(t,UR);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=Im(t,(n,i)=>i.includes("%")?$r(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}var dd=2,WR=.16,nH=.05,iH=.05,oH=.15,AI=5,kI=4,aH=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function GR(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-dd*t:Math.round(e.h)+dd*t:n=r?Math.round(e.h)+dd*t:Math.round(e.h)-dd*t,n<0?n+=360:n>=360&&(n-=360),n}function qR(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-WR*t:t===kI?n=e.s+WR:n=e.s+nH*t,n>1&&(n=1),r&&t===AI&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function XR(e,t,r){var n;return r?n=e.v+iH*t:n=e.v-oH*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function bc(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new vl(e),i=n.toHsv(),o=AI;o>0;o-=1){var s=new vl({h:GR(i,o,!0),s:qR(i,o,!0),v:XR(i,o,!0)});r.push(s)}r.push(n);for(var u=1;u<=kI;u+=1){var c=new vl({h:GR(i,u),s:qR(i,u),v:XR(i,u)});r.push(c)}return t.theme==="dark"?aH.map(function(f){var p=f.index,g=f.amount;return new vl(t.backgroundColor||"#141414").mix(r[p],g).toHexString()}):r.map(function(f){return f.toHexString()})}var Am={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},vy=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];vy.primary=vy[5];var my=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];my.primary=my[5];var yy=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];yy.primary=yy[5];var mp=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];mp.primary=mp[5];var by=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];by.primary=by[5];var Sy=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Sy.primary=Sy[5];var wy=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];wy.primary=wy[5];var xy=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];xy.primary=xy[5];var yp=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];yp.primary=yp[5];var Ey=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Ey.primary=Ey[5];var Cy=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Cy.primary=Cy[5];var _y=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];_y.primary=_y[5];var Ry=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Ry.primary=Ry[5];var km={red:vy,volcano:my,orange:yy,gold:mp,yellow:by,lime:Sy,green:wy,cyan:xy,blue:yp,geekblue:Ey,purple:Cy,magenta:_y,grey:Ry};const PI={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Sc=Object.assign(Object.assign({},PI),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
970
970
  'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
971
971
  'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0});function Fr(e,t){sH(e)&&(e="100%");var r=lH(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function pd(e){return Math.min(1,Math.max(0,e))}function sH(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function lH(e){return typeof e=="string"&&e.indexOf("%")!==-1}function MI(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function hd(e){return e<=1?"".concat(Number(e)*100,"%"):e}function cs(e){return e.length===1?"0"+e:String(e)}function uH(e,t,r){return{r:Fr(e,255)*255,g:Fr(t,255)*255,b:Fr(r,255)*255}}function KR(e,t,r){e=Fr(e,255),t=Fr(t,255),r=Fr(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,s=0,u=(n+i)/2;if(n===i)s=0,o=0;else{var c=n-i;switch(s=u>.5?c/(2-n-i):c/(n+i),n){case e:o=(t-r)/c+(t<r?6:0);break;case t:o=(r-e)/c+2;break;case r:o=(e-t)/c+4;break}o/=6}return{h:o,s,l:u}}function Pm(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function cH(e,t,r){var n,i,o;if(e=Fr(e,360),t=Fr(t,100),r=Fr(r,100),t===0)i=r,o=r,n=r;else{var s=r<.5?r*(1+t):r+t-r*t,u=2*r-s;n=Pm(u,s,e+1/3),i=Pm(u,s,e),o=Pm(u,s,e-1/3)}return{r:n*255,g:i*255,b:o*255}}function YR(e,t,r){e=Fr(e,255),t=Fr(t,255),r=Fr(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,s=n,u=n-i,c=n===0?0:u/n;if(n===i)o=0;else{switch(n){case e:o=(t-r)/u+(t<r?6:0);break;case t:o=(r-e)/u+2;break;case r:o=(e-t)/u+4;break}o/=6}return{h:o,s:c,v:s}}function fH(e,t,r){e=Fr(e,360)*6,t=Fr(t,100),r=Fr(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),s=r*(1-i*t),u=r*(1-(1-i)*t),c=n%6,f=[r,s,o,o,u,r][c],p=[u,r,r,s,o,o][c],g=[o,o,u,r,r,s][c];return{r:f*255,g:p*255,b:g*255}}function QR(e,t,r,n){var i=[cs(Math.round(e).toString(16)),cs(Math.round(t).toString(16)),cs(Math.round(r).toString(16))];return n&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function dH(e,t,r,n,i){var o=[cs(Math.round(e).toString(16)),cs(Math.round(t).toString(16)),cs(Math.round(r).toString(16)),cs(pH(n))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function pH(e){return Math.round(parseFloat(e)*255).toString(16)}function JR(e){return Un(e)/255}function Un(e){return parseInt(e,16)}function hH(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Oy={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function gH(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,s=!1,u=!1;return typeof e=="string"&&(e=yH(e)),typeof e=="object"&&(Xo(e.r)&&Xo(e.g)&&Xo(e.b)?(t=uH(e.r,e.g,e.b),s=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Xo(e.h)&&Xo(e.s)&&Xo(e.v)?(n=hd(e.s),i=hd(e.v),t=fH(e.h,n,i),s=!0,u="hsv"):Xo(e.h)&&Xo(e.s)&&Xo(e.l)&&(n=hd(e.s),o=hd(e.l),t=cH(e.h,n,o),s=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=MI(r),{ok:s,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var vH="[-\\+]?\\d+%?",mH="[-\\+]?\\d*\\.\\d+%?",ka="(?:".concat(mH,")|(?:").concat(vH,")"),Mm="[\\s|\\(]+(".concat(ka,")[,|\\s]+(").concat(ka,")[,|\\s]+(").concat(ka,")\\s*\\)?"),Dm="[\\s|\\(]+(".concat(ka,")[,|\\s]+(").concat(ka,")[,|\\s]+(").concat(ka,")[,|\\s]+(").concat(ka,")\\s*\\)?"),Ui={CSS_UNIT:new RegExp(ka),rgb:new RegExp("rgb"+Mm),rgba:new RegExp("rgba"+Dm),hsl:new RegExp("hsl"+Mm),hsla:new RegExp("hsla"+Dm),hsv:new RegExp("hsv"+Mm),hsva:new RegExp("hsva"+Dm),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function yH(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Oy[e])e=Oy[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=Ui.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=Ui.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Ui.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=Ui.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Ui.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=Ui.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Ui.hex8.exec(e),r?{r:Un(r[1]),g:Un(r[2]),b:Un(r[3]),a:JR(r[4]),format:t?"name":"hex8"}:(r=Ui.hex6.exec(e),r?{r:Un(r[1]),g:Un(r[2]),b:Un(r[3]),format:t?"name":"hex"}:(r=Ui.hex4.exec(e),r?{r:Un(r[1]+r[1]),g:Un(r[2]+r[2]),b:Un(r[3]+r[3]),a:JR(r[4]+r[4]),format:t?"name":"hex8"}:(r=Ui.hex3.exec(e),r?{r:Un(r[1]+r[1]),g:Un(r[2]+r[2]),b:Un(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function Xo(e){return!!Ui.CSS_UNIT.exec(String(e))}var qn=(function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=hH(t)),this.originalInput=t;var i=gH(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,i,o=t.r/255,s=t.g/255,u=t.b/255;return o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),u<=.03928?i=u/12.92:i=Math.pow((u+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=MI(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=YR(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=YR(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=KR(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=KR(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),QR(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),dH(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(Fr(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(Fr(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+QR(this.r,this.g,this.b,!1),r=0,n=Object.entries(Oy);r<n.length;r++){var i=n[r],o=i[0],s=i[1];if(t===s)return o}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,i=this.a<1&&this.a>=0,o=!r&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=pd(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=pd(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=pd(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=pd(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),o=r/100,s={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return new e(s)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,o=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(new e(n));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,o=r.v,s=[],u=1/t;t--;)s.push(new e({h:n,s:i,v:o})),o=(o+u)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],o=360/t,s=1;s<t;s++)i.push(new e({h:(n+s*o)%360,s:r.s,l:r.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e})();function bH(e,t){let{generateColorPalettes:r,generateNeutralColorPalettes:n}=t;const{colorSuccess:i,colorWarning:o,colorError:s,colorInfo:u,colorPrimary:c,colorBgBase:f,colorTextBase:p}=e,g=r(c),h=r(i),m=r(o),y=r(s),b=r(u),S=n(f,p),_=e.colorLink||e.colorInfo,C=r(_);return Object.assign(Object.assign({},S),{colorPrimaryBg:g[1],colorPrimaryBgHover:g[2],colorPrimaryBorder:g[3],colorPrimaryBorderHover:g[4],colorPrimaryHover:g[5],colorPrimary:g[6],colorPrimaryActive:g[7],colorPrimaryTextHover:g[8],colorPrimaryText:g[9],colorPrimaryTextActive:g[10],colorSuccessBg:h[1],colorSuccessBgHover:h[2],colorSuccessBorder:h[3],colorSuccessBorderHover:h[4],colorSuccessHover:h[4],colorSuccess:h[6],colorSuccessActive:h[7],colorSuccessTextHover:h[8],colorSuccessText:h[9],colorSuccessTextActive:h[10],colorErrorBg:y[1],colorErrorBgHover:y[2],colorErrorBgActive:y[3],colorErrorBorder:y[3],colorErrorBorderHover:y[4],colorErrorHover:y[5],colorError:y[6],colorErrorActive:y[7],colorErrorTextHover:y[8],colorErrorText:y[9],colorErrorTextActive:y[10],colorWarningBg:m[1],colorWarningBgHover:m[2],colorWarningBorder:m[3],colorWarningBorderHover:m[4],colorWarningHover:m[4],colorWarning:m[6],colorWarningActive:m[7],colorWarningTextHover:m[8],colorWarningText:m[9],colorWarningTextActive:m[10],colorInfoBg:b[1],colorInfoBgHover:b[2],colorInfoBorder:b[3],colorInfoBorderHover:b[4],colorInfoHover:b[4],colorInfo:b[6],colorInfoActive:b[7],colorInfoTextHover:b[8],colorInfoText:b[9],colorInfoTextActive:b[10],colorLinkHover:C[4],colorLink:C[6],colorLinkActive:C[7],colorBgMask:new qn("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const SH=e=>{let t=e,r=e,n=e,i=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?r=4:e<8&&e>=7?r=5:e<14&&e>=8?r=6:e<16&&e>=14?r=7:e>=16&&(r=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?i=4:e>=8&&(i=6),{borderRadius:e,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:i}};function wH(e){const{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:i}=e;return Object.assign({motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:i+1},SH(n))}const xH=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function EH(e){return(e+8)/e}function CH(e){const t=new Array(10).fill(null).map((r,n)=>{const i=n-1,o=e*Math.pow(Math.E,i/5),s=n>1?Math.floor(o):Math.ceil(o);return Math.floor(s/2)*2});return t[1]=e,t.map(r=>({size:r,lineHeight:EH(r)}))}const _H=e=>{const t=CH(e),r=t.map(p=>p.size),n=t.map(p=>p.lineHeight),i=r[1],o=r[0],s=r[2],u=n[1],c=n[0],f=n[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:s,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:u,lineHeightLG:f,lineHeightSM:c,fontHeight:Math.round(u*i),fontHeightLG:Math.round(f*s),fontHeightSM:Math.round(c*o),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function RH(e){const{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}const Ko=(e,t)=>new qn(e).setAlpha(t).toRgbString(),$u=(e,t)=>new qn(e).darken(t).toHexString(),OH=e=>{const t=bc(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},$H=(e,t)=>{const r=e||"#fff",n=t||"#000";return{colorBgBase:r,colorTextBase:n,colorText:Ko(n,.88),colorTextSecondary:Ko(n,.65),colorTextTertiary:Ko(n,.45),colorTextQuaternary:Ko(n,.25),colorFill:Ko(n,.15),colorFillSecondary:Ko(n,.06),colorFillTertiary:Ko(n,.04),colorFillQuaternary:Ko(n,.02),colorBgLayout:$u(r,4),colorBgContainer:$u(r,0),colorBgElevated:$u(r,0),colorBgSpotlight:Ko(n,.85),colorBgBlur:"transparent",colorBorder:$u(r,15),colorBorderSecondary:$u(r,6)}};function TH(e){Am.pink=Am.magenta,km.pink=km.magenta;const t=Object.keys(PI).map(r=>{const n=e[r]===Am[r]?km[r]:bc(e[r]);return new Array(10).fill(1).reduce((i,o,s)=>(i[`${r}-${s+1}`]=n[s],i[`${r}${s+1}`]=n[s],i),{})}).reduce((r,n)=>(r=Object.assign(Object.assign({},r),n),r),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),bH(e,{generateColorPalettes:OH,generateNeutralColorPalettes:$H})),_H(e.fontSize)),RH(e)),xH(e)),wH(e))}const DI=fy(TH),$y={token:Sc,override:{override:Sc},hashed:!0},LI=te.createContext($y),Ty="ant",FI="anticon",IH=["outlined","borderless","filled"],AH=(e,t)=>t||(e?`${Ty}-${e}`:Ty),Oi=x.createContext({getPrefixCls:AH,iconPrefixCls:FI}),{Consumer:YZ}=Oi,kH=`-ant-${Date.now()}-${Math.random()}`;function PH(e,t){const r={},n=(s,u)=>{let c=s.clone();return c=u?.(c)||c,c.toRgbString()},i=(s,u)=>{const c=new qn(s),f=bc(c.toRgbString());r[`${u}-color`]=n(c),r[`${u}-color-disabled`]=f[1],r[`${u}-color-hover`]=f[4],r[`${u}-color-active`]=f[6],r[`${u}-color-outline`]=c.clone().setAlpha(.2).toRgbString(),r[`${u}-color-deprecated-bg`]=f[0],r[`${u}-color-deprecated-border`]=f[2]};if(t.primaryColor){i(t.primaryColor,"primary");const s=new qn(t.primaryColor),u=bc(s.toRgbString());u.forEach((f,p)=>{r[`primary-${p+1}`]=f}),r["primary-color-deprecated-l-35"]=n(s,f=>f.lighten(35)),r["primary-color-deprecated-l-20"]=n(s,f=>f.lighten(20)),r["primary-color-deprecated-t-20"]=n(s,f=>f.tint(20)),r["primary-color-deprecated-t-50"]=n(s,f=>f.tint(50)),r["primary-color-deprecated-f-12"]=n(s,f=>f.setAlpha(f.getAlpha()*.12));const c=new qn(u[0]);r["primary-color-active-deprecated-f-30"]=n(c,f=>f.setAlpha(f.getAlpha()*.3)),r["primary-color-active-deprecated-d-02"]=n(c,f=>f.darken(2))}return t.successColor&&i(t.successColor,"success"),t.warningColor&&i(t.warningColor,"warning"),t.errorColor&&i(t.errorColor,"error"),t.infoColor&&i(t.infoColor,"info"),`
972
972
  :root {
@@ -1070,7 +1070,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1070
1070
  html body {
1071
1071
  overflow-y: hidden;
1072
1072
  `.concat(s?"width: calc(100% - ".concat(o,"px);"):"",`
1073
- }`),i)}else vc(i);return function(){vc(i)}},[t,i])}var xW=!1;function EW(e){return xW}var mO=function(t){return t===!1?!1:!Tn()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},pA=x.forwardRef(function(e,t){var r=e.open,n=e.autoLock,i=e.getContainer;e.debug;var o=e.autoDestroy,s=o===void 0?!0:o,u=e.children,c=x.useState(r),f=ke(c,2),p=f[0],g=f[1],h=p||r;x.useEffect(function(){(s||r)&&g(r)},[r,s]);var m=x.useState(function(){return mO(i)}),y=ke(m,2),b=y[0],S=y[1];x.useEffect(function(){var X=mO(i);S(X??null)});var _=vW(h&&!b),C=ke(_,2),O=C[0],R=C[1],$=b??O;wW(n&&r&&Tn()&&($===O||$===document.body));var T=null;if(u&&Wp(u)&&t){var P=u;T=P.ref}var L=eb(T,t);if(!h||!Tn()||b===void 0)return null;var z=$===!1||EW(),B=u;return t&&(B=x.cloneElement(u,{ref:L})),x.createElement(dA.Provider,{value:R},z?B:Ip.createPortal(B,$))});function CW(){var e=de({},Tp);return e.useId}var yO=0,bO=CW();const _W=bO?(function(t){var r=bO();return t||r}):(function(t){var r=x.useState("ssr-id"),n=ke(r,2),i=n[0],o=n[1];return x.useEffect(function(){var s=yO;yO+=1,o("rc_unique_".concat(s))},[]),t||i});var fs="RC_FORM_INTERNAL_HOOKS",zt=function(){Kn(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Vl=x.createContext({getFieldValue:zt,getFieldsValue:zt,getFieldError:zt,getFieldWarning:zt,getFieldsError:zt,isFieldsTouched:zt,isFieldTouched:zt,isFieldValidating:zt,isFieldsValidating:zt,resetFields:zt,setFields:zt,setFieldValue:zt,setFieldsValue:zt,validateFields:zt,submit:zt,getInternalHooks:function(){return zt(),{dispatch:zt,initEntityValue:zt,registerField:zt,useSubscribe:zt,setInitialValues:zt,destroyForm:zt,setCallbacks:zt,registerWatch:zt,getFields:zt,setValidateMessages:zt,setPreserve:zt,getInitialValue:zt}}}),Cp=x.createContext(null);function Ly(e){return e==null?[]:Array.isArray(e)?e:[e]}function RW(e){return e&&!!e._init}function Fy(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Ny=Fy();function OW(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function $W(e,t,r){if(H1())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&uc(i,r.prototype),i}function jy(e){var t=typeof Map=="function"?new Map:void 0;return jy=function(n){if(n===null||!OW(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return $W(n,arguments,cc(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),uc(i,n)},jy(e)}var TW=/%[sdj%]/g,IW=function(){};function zy(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function Xn(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=0,o=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var s=e.replace(TW,function(u){if(u==="%%")return"%";if(i>=o)return u;switch(u){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch{return"[Circular]"}break;default:return u}});return s}return e}function AW(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function Sr(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||AW(t)&&typeof e=="string"&&!e)}function kW(e,t,r){var n=[],i=0,o=e.length;function s(u){n.push.apply(n,rt(u||[])),i++,i===o&&r(n)}e.forEach(function(u){t(u,s)})}function SO(e,t,r){var n=0,i=e.length;function o(s){if(s&&s.length){r(s);return}var u=n;n=n+1,u<i?t(e[u],o):r([])}o([])}function PW(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,rt(e[r]||[]))}),t}var wO=(function(e){Rs(r,e);var t=Os(r);function r(n,i){var o;return en(this,r),o=t.call(this,"Async Validation Error"),oe(gt(o),"errors",void 0),oe(gt(o),"fields",void 0),o.errors=n,o.fields=i,o}return tn(r)})(jy(Error));function MW(e,t,r,n,i){if(t.first){var o=new Promise(function(h,m){var y=function(_){return n(_),_.length?m(new wO(_,zy(_))):h(i)},b=PW(e);SO(b,r,y)});return o.catch(function(h){return h}),o}var s=t.firstFields===!0?Object.keys(e):t.firstFields||[],u=Object.keys(e),c=u.length,f=0,p=[],g=new Promise(function(h,m){var y=function(S){if(p.push.apply(p,S),f++,f===c)return n(p),p.length?m(new wO(p,zy(p))):h(i)};u.length||(n(p),h(i)),u.forEach(function(b){var S=e[b];s.indexOf(b)!==-1?SO(S,r,y):kW(S,r,y)})});return g.catch(function(h){return h}),g}function DW(e){return!!(e&&e.message!==void 0)}function LW(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function xO(e,t){return function(r){var n;return e.fullFields?n=LW(t,e.fullFields):n=t[r.field||e.fullField],DW(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function EO(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];ut(n)==="object"&&ut(e[r])==="object"?e[r]=de(de({},e[r]),n):e[r]=n}}return e}var rl="enum",FW=function(t,r,n,i,o){t[rl]=Array.isArray(t[rl])?t[rl]:[],t[rl].indexOf(r)===-1&&i.push(Xn(o.messages[rl],t.fullField,t[rl].join(", ")))},NW=function(t,r,n,i,o){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||i.push(Xn(o.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var s=new RegExp(t.pattern);s.test(r)||i.push(Xn(o.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},jW=function(t,r,n,i,o){var s=typeof t.len=="number",u=typeof t.min=="number",c=typeof t.max=="number",f=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=r,g=null,h=typeof r=="number",m=typeof r=="string",y=Array.isArray(r);if(h?g="number":m?g="string":y&&(g="array"),!g)return!1;y&&(p=r.length),m&&(p=r.replace(f,"_").length),s?p!==t.len&&i.push(Xn(o.messages[g].len,t.fullField,t.len)):u&&!c&&p<t.min?i.push(Xn(o.messages[g].min,t.fullField,t.min)):c&&!u&&p>t.max?i.push(Xn(o.messages[g].max,t.fullField,t.max)):u&&c&&(p<t.min||p>t.max)&&i.push(Xn(o.messages[g].range,t.fullField,t.min,t.max))},hA=function(t,r,n,i,o,s){t.required&&(!n.hasOwnProperty(t.field)||Sr(r,s||t.type))&&i.push(Xn(o.messages.required,t.fullField))},Sd;const zW=(function(){if(Sd)return Sd;var e="[a-fA-F\\d:]",t=function(T){return T&&T.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",i=["(?:".concat(n,":){7}(?:").concat(n,"|:)"),"(?:".concat(n,":){6}(?:").concat(r,"|:").concat(n,"|:)"),"(?:".concat(n,":){5}(?::").concat(r,"|(?::").concat(n,"){1,2}|:)"),"(?:".concat(n,":){4}(?:(?::").concat(n,"){0,1}:").concat(r,"|(?::").concat(n,"){1,3}|:)"),"(?:".concat(n,":){3}(?:(?::").concat(n,"){0,2}:").concat(r,"|(?::").concat(n,"){1,4}|:)"),"(?:".concat(n,":){2}(?:(?::").concat(n,"){0,3}:").concat(r,"|(?::").concat(n,"){1,5}|:)"),"(?:".concat(n,":){1}(?:(?::").concat(n,"){0,4}:").concat(r,"|(?::").concat(n,"){1,6}|:)"),"(?::(?:(?::".concat(n,"){0,5}:").concat(r,"|(?::").concat(n,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",s="(?:".concat(i.join("|"),")").concat(o),u=new RegExp("(?:^".concat(r,"$)|(?:^").concat(s,"$)")),c=new RegExp("^".concat(r,"$")),f=new RegExp("^".concat(s,"$")),p=function(T){return T&&T.exact?u:new RegExp("(?:".concat(t(T)).concat(r).concat(t(T),")|(?:").concat(t(T)).concat(s).concat(t(T),")"),"g")};p.v4=function($){return $&&$.exact?c:new RegExp("".concat(t($)).concat(r).concat(t($)),"g")},p.v6=function($){return $&&$.exact?f:new RegExp("".concat(t($)).concat(s).concat(t($)),"g")};var g="(?:(?:[a-z]+:)?//)",h="(?:\\S+(?::\\S*)?@)?",m=p.v4().source,y=p.v6().source,b="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",S="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",_="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",C="(?::\\d{2,5})?",O='(?:[/?#][^\\s"]*)?',R="(?:".concat(g,"|www\\.)").concat(h,"(?:localhost|").concat(m,"|").concat(y,"|").concat(b).concat(S).concat(_,")").concat(C).concat(O);return Sd=new RegExp("(?:^".concat(R,"$)"),"i"),Sd});var zm={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Nu={integer:function(t){return Nu.number(t)&&parseInt(t,10)===t},float:function(t){return Nu.number(t)&&!Nu.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return ut(t)==="object"&&!Nu.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(zm.email)},tel:function(t){return typeof t=="string"&&t.length<=32&&!!t.match(zm.tel)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(zW())},hex:function(t){return typeof t=="string"&&!!t.match(zm.hex)}},BW=function(t,r,n,i,o){if(t.required&&r===void 0){hA(t,r,n,i,o);return}var s=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],u=t.type;s.indexOf(u)>-1?Nu[u](r)||i.push(Xn(o.messages.types[u],t.fullField,t.type)):u&&ut(r)!==t.type&&i.push(Xn(o.messages.types[u],t.fullField,t.type))},VW=function(t,r,n,i,o){(/^\s+$/.test(r)||r==="")&&i.push(Xn(o.messages.whitespace,t.fullField))};const bt={required:hA,whitespace:VW,type:BW,range:jW,enum:FW,pattern:NW};var HW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Sr(r)&&!t.required)return n();bt.required(t,r,i,s,o)}n(s)},UW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(r==null&&!t.required)return n();bt.required(t,r,i,s,o,"array"),r!=null&&(bt.type(t,r,i,s,o),bt.range(t,r,i,s,o))}n(s)},WW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Sr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&bt.type(t,r,i,s,o)}n(s)},GW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Sr(r,"date")&&!t.required)return n();if(bt.required(t,r,i,s,o),!Sr(r,"date")){var c;r instanceof Date?c=r:c=new Date(r),bt.type(t,c,i,s,o),c&&bt.range(t,c.getTime(),i,s,o)}}n(s)},qW="enum",XW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Sr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&bt[qW](t,r,i,s,o)}n(s)},KW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Sr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&(bt.type(t,r,i,s,o),bt.range(t,r,i,s,o))}n(s)},YW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Sr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&(bt.type(t,r,i,s,o),bt.range(t,r,i,s,o))}n(s)},QW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Sr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&bt.type(t,r,i,s,o)}n(s)},JW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(r===""&&(r=void 0),Sr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&(bt.type(t,r,i,s,o),bt.range(t,r,i,s,o))}n(s)},ZW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Sr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&bt.type(t,r,i,s,o)}n(s)},eG=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Sr(r,"string")&&!t.required)return n();bt.required(t,r,i,s,o),Sr(r,"string")||bt.pattern(t,r,i,s,o)}n(s)},tG=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Sr(r)&&!t.required)return n();bt.required(t,r,i,s,o),Sr(r)||bt.type(t,r,i,s,o)}n(s)},rG=function(t,r,n,i,o){var s=[],u=Array.isArray(r)?"array":ut(r);bt.required(t,r,i,s,o,u),n(s)},nG=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Sr(r,"string")&&!t.required)return n();bt.required(t,r,i,s,o,"string"),Sr(r,"string")||(bt.type(t,r,i,s,o),bt.range(t,r,i,s,o),bt.pattern(t,r,i,s,o),t.whitespace===!0&&bt.whitespace(t,r,i,s,o))}n(s)},wd=function(t,r,n,i,o){var s=t.type,u=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Sr(r,s)&&!t.required)return n();bt.required(t,r,i,u,o,s),Sr(r,s)||bt.type(t,r,i,u,o)}n(u)};const Yu={string:nG,method:QW,number:JW,boolean:WW,regexp:tG,integer:YW,float:KW,array:UW,object:ZW,enum:XW,pattern:eG,date:GW,url:wd,hex:wd,email:wd,tel:wd,required:rG,any:HW};var Fc=(function(){function e(t){en(this,e),oe(this,"rules",null),oe(this,"_messages",Ny),this.define(t)}return tn(e,[{key:"define",value:function(r){var n=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(ut(r)!=="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(i){var o=r[i];n.rules[i]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(r){return r&&(this._messages=EO(Fy(),r)),this._messages}},{key:"validate",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},s=r,u=i,c=o;if(typeof u=="function"&&(c=u,u={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,s),Promise.resolve(s);function f(y){var b=[],S={};function _(O){if(Array.isArray(O)){var R;b=(R=b).concat.apply(R,rt(O))}else b.push(O)}for(var C=0;C<y.length;C++)_(y[C]);b.length?(S=zy(b),c(b,S)):c(null,s)}if(u.messages){var p=this.messages();p===Ny&&(p=Fy()),EO(p,u.messages),u.messages=p}else u.messages=this.messages();var g={},h=u.keys||Object.keys(this.rules);h.forEach(function(y){var b=n.rules[y],S=s[y];b.forEach(function(_){var C=_;typeof C.transform=="function"&&(s===r&&(s=de({},s)),S=s[y]=C.transform(S),S!=null&&(C.type=C.type||(Array.isArray(S)?"array":ut(S)))),typeof C=="function"?C={validator:C}:C=de({},C),C.validator=n.getValidationMethod(C),C.validator&&(C.field=y,C.fullField=C.fullField||y,C.type=n.getType(C),g[y]=g[y]||[],g[y].push({rule:C,value:S,source:s,field:y}))})});var m={};return MW(g,u,function(y,b){var S=y.rule,_=(S.type==="object"||S.type==="array")&&(ut(S.fields)==="object"||ut(S.defaultField)==="object");_=_&&(S.required||!S.required&&y.value),S.field=y.field;function C(P,L){return de(de({},L),{},{fullField:"".concat(S.fullField,".").concat(P),fullFields:S.fullFields?[].concat(rt(S.fullFields),[P]):[P]})}function O(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=Array.isArray(P)?P:[P];!u.suppressWarning&&L.length&&e.warning("async-validator:",L),L.length&&S.message!==void 0&&S.message!==null&&(L=[].concat(S.message));var z=L.map(xO(S,s));if(u.first&&z.length)return m[S.field]=1,b(z);if(!_)b(z);else{if(S.required&&!y.value)return S.message!==void 0?z=[].concat(S.message).map(xO(S,s)):u.error&&(z=[u.error(S,Xn(u.messages.required,S.field))]),b(z);var B={};S.defaultField&&Object.keys(y.value).map(function(N){B[N]=S.defaultField}),B=de(de({},B),y.rule.fields);var X={};Object.keys(B).forEach(function(N){var j=B[N],F=Array.isArray(j)?j:[j];X[N]=F.map(C.bind(null,N))});var Y=new e(X);Y.messages(u.messages),y.rule.options&&(y.rule.options.messages=u.messages,y.rule.options.error=u.error),Y.validate(y.value,y.rule.options||u,function(N){var j=[];z&&z.length&&j.push.apply(j,rt(z)),N&&N.length&&j.push.apply(j,rt(N)),b(j.length?j:null)})}}var R;if(S.asyncValidator)R=S.asyncValidator(S,y.value,O,y.source,u);else if(S.validator){try{R=S.validator(S,y.value,O,y.source,u)}catch(P){var $,T;($=(T=console).error)===null||$===void 0||$.call(T,P),u.suppressValidatorError||setTimeout(function(){throw P},0),O(P.message)}R===!0?O():R===!1?O(typeof S.message=="function"?S.message(S.fullField||S.field):S.message||"".concat(S.fullField||S.field," fails")):R instanceof Array?O(R):R instanceof Error&&O(R.message)}R&&R.then&&R.then(function(){return O()},function(P){return O(P)})},function(y){f(y)},s)}},{key:"getType",value:function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!Yu.hasOwnProperty(r.type))throw new Error(Xn("Unknown rule type %s",r.type));return r.type||"string"}},{key:"getValidationMethod",value:function(r){if(typeof r.validator=="function")return r.validator;var n=Object.keys(r),i=n.indexOf("message");return i!==-1&&n.splice(i,1),n.length===1&&n[0]==="required"?Yu.required:Yu[this.getType(r)]||void 0}}]),e})();oe(Fc,"register",function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");Yu[t]=r});oe(Fc,"warning",IW);oe(Fc,"messages",Ny);oe(Fc,"validators",Yu);var Bn="'${name}' is not a valid ${type}",gA={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Bn,method:Bn,array:Bn,object:Bn,number:Bn,date:Bn,boolean:Bn,integer:Bn,float:Bn,regexp:Bn,email:Bn,url:Bn,hex:Bn},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},CO=Fc;function iG(e,t){return e.replace(/\$\{\w+\}/g,function(r){var n=r.slice(2,-1);return t[n]})}var _O="CODE_LOGIC_ERROR";function By(e,t,r,n,i){return Vy.apply(this,arguments)}function Vy(){return Vy=Lc($i().mark(function e(t,r,n,i,o){var s,u,c,f,p,g,h,m,y;return $i().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return s=de({},n),delete s.ruleIndex,CO.warning=function(){},s.validator&&(u=s.validator,s.validator=function(){try{return u.apply(void 0,arguments)}catch(_){return console.error(_),Promise.reject(_O)}}),c=null,s&&s.type==="array"&&s.defaultField&&(c=s.defaultField,delete s.defaultField),f=new CO(oe({},t,[s])),p=gl(gA,i.validateMessages),f.messages(p),g=[],S.prev=10,S.next=13,Promise.resolve(f.validate(oe({},t,r),de({},i)));case 13:S.next=18;break;case 15:S.prev=15,S.t0=S.catch(10),S.t0.errors&&(g=S.t0.errors.map(function(_,C){var O=_.message,R=O===_O?p.default:O;return x.isValidElement(R)?x.cloneElement(R,{key:"error_".concat(C)}):R}));case 18:if(!(!g.length&&c)){S.next=23;break}return S.next=21,Promise.all(r.map(function(_,C){return By("".concat(t,".").concat(C),_,c,i,o)}));case 21:return h=S.sent,S.abrupt("return",h.reduce(function(_,C){return[].concat(rt(_),rt(C))},[]));case 23:return m=de(de({},n),{},{name:t,enum:(n.enum||[]).join(", ")},o),y=g.map(function(_){return typeof _=="string"?iG(_,m):_}),S.abrupt("return",y);case 26:case"end":return S.stop()}},e,null,[[10,15]])})),Vy.apply(this,arguments)}function oG(e,t,r,n,i,o){var s=e.join("."),u=r.map(function(p,g){var h=p.validator,m=de(de({},p),{},{ruleIndex:g});return h&&(m.validator=function(y,b,S){var _=!1,C=function(){for(var $=arguments.length,T=new Array($),P=0;P<$;P++)T[P]=arguments[P];Promise.resolve().then(function(){Kn(!_,"Your validator function has already return a promise. `callback` will be ignored."),_||S.apply(void 0,T)})},O=h(y,b,C);_=O&&typeof O.then=="function"&&typeof O.catch=="function",Kn(_,"`callback` is deprecated. Please return a promise instead."),_&&O.then(function(){S()}).catch(function(R){S(R||" ")})}),m}).sort(function(p,g){var h=p.warningOnly,m=p.ruleIndex,y=g.warningOnly,b=g.ruleIndex;return!!h==!!y?m-b:h?1:-1}),c;if(i===!0)c=new Promise((function(){var p=Lc($i().mark(function g(h,m){var y,b,S;return $i().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:y=0;case 1:if(!(y<u.length)){C.next=12;break}return b=u[y],C.next=5,By(s,t,b,n,o);case 5:if(S=C.sent,!S.length){C.next=9;break}return m([{errors:S,rule:b}]),C.abrupt("return");case 9:y+=1,C.next=1;break;case 12:h([]);case 13:case"end":return C.stop()}},g)}));return function(g,h){return p.apply(this,arguments)}})());else{var f=u.map(function(p){return By(s,t,p,n,o).then(function(g){return{errors:g,rule:p}})});c=(i?sG(f):aG(f)).then(function(p){return Promise.reject(p)})}return c.catch(function(p){return p}),c}function aG(e){return Hy.apply(this,arguments)}function Hy(){return Hy=Lc($i().mark(function e(t){return $i().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.all(t).then(function(i){var o,s=(o=[]).concat.apply(o,rt(i));return s}));case 1:case"end":return n.stop()}},e)})),Hy.apply(this,arguments)}function sG(e){return Uy.apply(this,arguments)}function Uy(){return Uy=Lc($i().mark(function e(t){var r;return $i().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=0,i.abrupt("return",new Promise(function(o){t.forEach(function(s){s.then(function(u){u.errors.length&&o([u]),r+=1,r===t.length&&o([])})})}));case 2:case"end":return i.stop()}},e)})),Uy.apply(this,arguments)}function lr(e){return Ly(e)}function RO(e,t){var r={};return t.forEach(function(n){var i=bo(e,n);r=Wi(r,n,i)}),r}function wl(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(n){return vA(t,n,r)})}function vA(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!r&&e.length!==t.length?!1:t.every(function(n,i){return e[i]===n})}function lG(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||ut(e)!=="object"||ut(t)!=="object")return!1;var r=Object.keys(e),n=Object.keys(t),i=new Set([].concat(r,n));return rt(i).every(function(o){var s=e[o],u=t[o];return typeof s=="function"&&typeof u=="function"?!0:s===u})}function uG(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&ut(t.target)==="object"&&e in t.target?t.target[e]:t}function OO(e,t,r){var n=e.length;if(t<0||t>=n||r<0||r>=n)return e;var i=e[t],o=t-r;return o>0?[].concat(rt(e.slice(0,r)),[i],rt(e.slice(r,t)),rt(e.slice(t+1,n))):o<0?[].concat(rt(e.slice(0,t)),rt(e.slice(t+1,r+1)),[i],rt(e.slice(r+1,n))):e}var cG=["name"],gi=[];function $O(e,t,r,n,i,o){return typeof e=="function"?e(t,r,"source"in o?{source:o.source}:{}):n!==i}var gb=(function(e){Rs(r,e);var t=Os(r);function r(n){var i;if(en(this,r),i=t.call(this,n),oe(gt(i),"state",{resetCount:0}),oe(gt(i),"cancelRegisterFunc",null),oe(gt(i),"mounted",!1),oe(gt(i),"touched",!1),oe(gt(i),"dirty",!1),oe(gt(i),"validatePromise",void 0),oe(gt(i),"prevValidating",void 0),oe(gt(i),"errors",gi),oe(gt(i),"warnings",gi),oe(gt(i),"cancelRegister",function(){var c=i.props,f=c.preserve,p=c.isListField,g=c.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(p,f,lr(g)),i.cancelRegisterFunc=null}),oe(gt(i),"getNamePath",function(){var c=i.props,f=c.name,p=c.fieldContext,g=p.prefixName,h=g===void 0?[]:g;return f!==void 0?[].concat(rt(h),rt(f)):[]}),oe(gt(i),"getRules",function(){var c=i.props,f=c.rules,p=f===void 0?[]:f,g=c.fieldContext;return p.map(function(h){return typeof h=="function"?h(g):h})}),oe(gt(i),"refresh",function(){i.mounted&&i.setState(function(c){var f=c.resetCount;return{resetCount:f+1}})}),oe(gt(i),"metaCache",null),oe(gt(i),"triggerMetaEvent",function(c){var f=i.props.onMetaChange;if(f){var p=de(de({},i.getMeta()),{},{destroy:c});uy(i.metaCache,p)||f(p),i.metaCache=p}else i.metaCache=null}),oe(gt(i),"onStoreChange",function(c,f,p){var g=i.props,h=g.shouldUpdate,m=g.dependencies,y=m===void 0?[]:m,b=g.onReset,S=p.store,_=i.getNamePath(),C=i.getValue(c),O=i.getValue(S),R=f&&wl(f,_);switch(p.type==="valueUpdate"&&p.source==="external"&&!uy(C,O)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=gi,i.warnings=gi,i.triggerMetaEvent()),p.type){case"reset":if(!f||R){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=gi,i.warnings=gi,i.triggerMetaEvent(),b?.(),i.refresh();return}break;case"remove":{if(h){i.reRender();return}break}case"setField":{var $=p.data;if(R){"touched"in $&&(i.touched=$.touched),"validating"in $&&!("originRCField"in $)&&(i.validatePromise=$.validating?Promise.resolve([]):null),"errors"in $&&(i.errors=$.errors||gi),"warnings"in $&&(i.warnings=$.warnings||gi),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in $&&wl(f,_,!0)){i.reRender();return}if(h&&!_.length&&$O(h,c,S,C,O,p)){i.reRender();return}break}case"dependenciesUpdate":{var T=y.map(lr);if(T.some(function(P){return wl(p.relatedFields,P)})){i.reRender();return}break}default:if(R||(!y.length||_.length||h)&&$O(h,c,S,C,O,p)){i.reRender();return}break}h===!0&&i.reRender()}),oe(gt(i),"validateRules",function(c){var f=i.getNamePath(),p=i.getValue(),g=c||{},h=g.triggerName,m=g.validateOnly,y=m===void 0?!1:m,b=Promise.resolve().then(Lc($i().mark(function S(){var _,C,O,R,$,T,P;return $i().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(i.mounted){z.next=2;break}return z.abrupt("return",[]);case 2:if(_=i.props,C=_.validateFirst,O=C===void 0?!1:C,R=_.messageVariables,$=_.validateDebounce,T=i.getRules(),h&&(T=T.filter(function(B){return B}).filter(function(B){var X=B.validateTrigger;if(!X)return!0;var Y=Ly(X);return Y.includes(h)})),!($&&h)){z.next=10;break}return z.next=8,new Promise(function(B){setTimeout(B,$)});case 8:if(i.validatePromise===b){z.next=10;break}return z.abrupt("return",[]);case 10:return P=oG(f,p,T,c,O,R),P.catch(function(B){return B}).then(function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gi;if(i.validatePromise===b){var X;i.validatePromise=null;var Y=[],N=[];(X=B.forEach)===null||X===void 0||X.call(B,function(j){var F=j.rule.warningOnly,q=j.errors,U=q===void 0?gi:q;F?N.push.apply(N,rt(U)):Y.push.apply(Y,rt(U))}),i.errors=Y,i.warnings=N,i.triggerMetaEvent(),i.reRender()}}),z.abrupt("return",P);case 13:case"end":return z.stop()}},S)})));return y||(i.validatePromise=b,i.dirty=!0,i.errors=gi,i.warnings=gi,i.triggerMetaEvent(),i.reRender()),b}),oe(gt(i),"isFieldValidating",function(){return!!i.validatePromise}),oe(gt(i),"isFieldTouched",function(){return i.touched}),oe(gt(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var c=i.props.fieldContext,f=c.getInternalHooks(fs),p=f.getInitialValue;return p(i.getNamePath())!==void 0}),oe(gt(i),"getErrors",function(){return i.errors}),oe(gt(i),"getWarnings",function(){return i.warnings}),oe(gt(i),"isListField",function(){return i.props.isListField}),oe(gt(i),"isList",function(){return i.props.isList}),oe(gt(i),"isPreserve",function(){return i.props.preserve}),oe(gt(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var c={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return c}),oe(gt(i),"getOnlyChild",function(c){if(typeof c=="function"){var f=i.getMeta();return de(de({},i.getOnlyChild(c(i.getControlled(),f,i.props.fieldContext))),{},{isFunction:!0})}var p=Dl(c);return p.length!==1||!x.isValidElement(p[0])?{child:p,isFunction:!1}:{child:p[0],isFunction:!1}}),oe(gt(i),"getValue",function(c){var f=i.props.fieldContext.getFieldsValue,p=i.getNamePath();return bo(c||f(!0),p)}),oe(gt(i),"getControlled",function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=i.props,p=f.name,g=f.trigger,h=f.validateTrigger,m=f.getValueFromEvent,y=f.normalize,b=f.valuePropName,S=f.getValueProps,_=f.fieldContext,C=h!==void 0?h:_.validateTrigger,O=i.getNamePath(),R=_.getInternalHooks,$=_.getFieldsValue,T=R(fs),P=T.dispatch,L=i.getValue(),z=S||function(j){return oe({},b,j)},B=c[g],X=p!==void 0?z(L):{},Y=de(de({},c),X);Y[g]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var j,F=arguments.length,q=new Array(F),U=0;U<F;U++)q[U]=arguments[U];m?j=m.apply(void 0,q):j=uG.apply(void 0,[b].concat(q)),y&&(j=y(j,L,$(!0))),P({type:"updateValue",namePath:O,value:j}),B&&B.apply(void 0,q)};var N=Ly(C||[]);return N.forEach(function(j){var F=Y[j];Y[j]=function(){F&&F.apply(void 0,arguments);var q=i.props.rules;q&&q.length&&P({type:"validateField",namePath:O,triggerName:j})}}),Y}),n.fieldContext){var o=n.fieldContext.getInternalHooks,s=o(fs),u=s.initEntityValue;u(gt(i))}return i}return tn(r,[{key:"componentDidMount",value:function(){var i=this.props,o=i.shouldUpdate,s=i.fieldContext;if(this.mounted=!0,s){var u=s.getInternalHooks,c=u(fs),f=c.registerField;this.cancelRegisterFunc=f(this)}o===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var i=this.state.resetCount,o=this.props.children,s=this.getOnlyChild(o),u=s.child,c=s.isFunction,f;return c?f=u:x.isValidElement(u)?f=x.cloneElement(u,this.getControlled(u.props)):(Kn(!u,"`children` of Field is not validate ReactElement."),f=u),x.createElement(x.Fragment,{key:i},f)}}]),r})(x.Component);oe(gb,"contextType",Vl);oe(gb,"defaultProps",{trigger:"onChange",valuePropName:"value"});function mA(e){var t=e.name,r=Qn(e,cG),n=x.useContext(Vl),i=x.useContext(Cp),o=t!==void 0?lr(t):void 0,s="keep";return r.isListField||(s="_".concat((o||[]).join("_"))),x.createElement(gb,fr({key:s,name:o,isListField:!!i},r,{fieldContext:n}))}function fG(e){var t=e.name,r=e.initialValue,n=e.children,i=e.rules,o=e.validateTrigger,s=e.isListField,u=x.useContext(Vl),c=x.useContext(Cp),f=x.useRef({keys:[],id:0}),p=f.current,g=x.useMemo(function(){var b=lr(u.prefixName)||[];return[].concat(rt(b),rt(lr(t)))},[u.prefixName,t]),h=x.useMemo(function(){return de(de({},u),{},{prefixName:g})},[u,g]),m=x.useMemo(function(){return{getKey:function(S){var _=g.length,C=S[_];return[p.keys[C],S.slice(_+1)]}}},[g]);if(typeof n!="function")return Kn(!1,"Form.List only accepts function as children."),null;var y=function(S,_,C){var O=C.source;return O==="internal"?!1:S!==_};return x.createElement(Cp.Provider,{value:m},x.createElement(Vl.Provider,{value:h},x.createElement(mA,{name:[],shouldUpdate:y,rules:i,validateTrigger:o,initialValue:r,isList:!0,isListField:s??!!c},function(b,S){var _=b.value,C=_===void 0?[]:_,O=b.onChange,R=u.getFieldValue,$=function(){var z=R(g||[]);return z||[]},T={add:function(z,B){var X=$();B>=0&&B<=X.length?(p.keys=[].concat(rt(p.keys.slice(0,B)),[p.id],rt(p.keys.slice(B))),O([].concat(rt(X.slice(0,B)),[z],rt(X.slice(B))))):(p.keys=[].concat(rt(p.keys),[p.id]),O([].concat(rt(X),[z]))),p.id+=1},remove:function(z){var B=$(),X=new Set(Array.isArray(z)?z:[z]);X.size<=0||(p.keys=p.keys.filter(function(Y,N){return!X.has(N)}),O(B.filter(function(Y,N){return!X.has(N)})))},move:function(z,B){if(z!==B){var X=$();z<0||z>=X.length||B<0||B>=X.length||(p.keys=OO(p.keys,z,B),O(OO(X,z,B)))}}},P=C||[];return Array.isArray(P)||(P=[]),n(P.map(function(L,z){var B=p.keys[z];return B===void 0&&(p.keys[z]=p.id,B=p.keys[z],p.id+=1),{name:z,key:B,isListField:!0}}),T,S)})))}function dG(e){var t=!1,r=e.length,n=[];return e.length?new Promise(function(i,o){e.forEach(function(s,u){s.catch(function(c){return t=!0,c}).then(function(c){r-=1,n[u]=c,!(r>0)&&(t&&o(n),i(n))})})}):Promise.resolve([])}var yA="__@field_split__";function Bm(e){return e.map(function(t){return"".concat(ut(t),":").concat(t)}).join(yA)}var nl=(function(){function e(){en(this,e),oe(this,"kvs",new Map)}return tn(e,[{key:"set",value:function(r,n){this.kvs.set(Bm(r),n)}},{key:"get",value:function(r){return this.kvs.get(Bm(r))}},{key:"update",value:function(r,n){var i=this.get(r),o=n(i);o?this.set(r,o):this.delete(r)}},{key:"delete",value:function(r){this.kvs.delete(Bm(r))}},{key:"map",value:function(r){return rt(this.kvs.entries()).map(function(n){var i=ke(n,2),o=i[0],s=i[1],u=o.split(yA);return r({key:u.map(function(c){var f=c.match(/^([^:]*):(.*)$/),p=ke(f,3),g=p[1],h=p[2];return g==="number"?Number(h):h}),value:s})})}},{key:"toJSON",value:function(){var r={};return this.map(function(n){var i=n.key,o=n.value;return r[i.join(".")]=o,null}),r}}]),e})(),pG=["name"],hG=tn(function e(t){var r=this;en(this,e),oe(this,"formHooked",!1),oe(this,"forceRootUpdate",void 0),oe(this,"subscribable",!0),oe(this,"store",{}),oe(this,"fieldEntities",[]),oe(this,"initialValues",{}),oe(this,"callbacks",{}),oe(this,"validateMessages",null),oe(this,"preserve",null),oe(this,"lastValidatePromise",null),oe(this,"getForm",function(){return{getFieldValue:r.getFieldValue,getFieldsValue:r.getFieldsValue,getFieldError:r.getFieldError,getFieldWarning:r.getFieldWarning,getFieldsError:r.getFieldsError,isFieldsTouched:r.isFieldsTouched,isFieldTouched:r.isFieldTouched,isFieldValidating:r.isFieldValidating,isFieldsValidating:r.isFieldsValidating,resetFields:r.resetFields,setFields:r.setFields,setFieldValue:r.setFieldValue,setFieldsValue:r.setFieldsValue,validateFields:r.validateFields,submit:r.submit,_init:!0,getInternalHooks:r.getInternalHooks}}),oe(this,"getInternalHooks",function(n){return n===fs?(r.formHooked=!0,{dispatch:r.dispatch,initEntityValue:r.initEntityValue,registerField:r.registerField,useSubscribe:r.useSubscribe,setInitialValues:r.setInitialValues,destroyForm:r.destroyForm,setCallbacks:r.setCallbacks,setValidateMessages:r.setValidateMessages,getFields:r.getFields,setPreserve:r.setPreserve,getInitialValue:r.getInitialValue,registerWatch:r.registerWatch}):(Kn(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),oe(this,"useSubscribe",function(n){r.subscribable=n}),oe(this,"prevWithoutPreserves",null),oe(this,"setInitialValues",function(n,i){if(r.initialValues=n||{},i){var o,s=gl(n,r.store);(o=r.prevWithoutPreserves)===null||o===void 0||o.map(function(u){var c=u.key;s=Wi(s,c,bo(n,c))}),r.prevWithoutPreserves=null,r.updateStore(s)}}),oe(this,"destroyForm",function(n){if(n)r.updateStore({});else{var i=new nl;r.getFieldEntities(!0).forEach(function(o){r.isMergedPreserve(o.isPreserve())||i.set(o.getNamePath(),!0)}),r.prevWithoutPreserves=i}}),oe(this,"getInitialValue",function(n){var i=bo(r.initialValues,n);return n.length?gl(i):i}),oe(this,"setCallbacks",function(n){r.callbacks=n}),oe(this,"setValidateMessages",function(n){r.validateMessages=n}),oe(this,"setPreserve",function(n){r.preserve=n}),oe(this,"watchList",[]),oe(this,"registerWatch",function(n){return r.watchList.push(n),function(){r.watchList=r.watchList.filter(function(i){return i!==n})}}),oe(this,"notifyWatch",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(r.watchList.length){var i=r.getFieldsValue(),o=r.getFieldsValue(!0);r.watchList.forEach(function(s){s(i,o,n)})}}),oe(this,"timeoutId",null),oe(this,"warningUnhooked",function(){}),oe(this,"updateStore",function(n){r.store=n}),oe(this,"getFieldEntities",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return n?r.fieldEntities.filter(function(i){return i.getNamePath().length}):r.fieldEntities}),oe(this,"getFieldsMap",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new nl;return r.getFieldEntities(n).forEach(function(o){var s=o.getNamePath();i.set(s,o)}),i}),oe(this,"getFieldEntitiesForNamePathList",function(n){if(!n)return r.getFieldEntities(!0);var i=r.getFieldsMap(!0);return n.map(function(o){var s=lr(o);return i.get(s)||{INVALIDATE_NAME_PATH:lr(o)}})}),oe(this,"getFieldsValue",function(n,i){r.warningUnhooked();var o,s,u;if(n===!0||Array.isArray(n)?(o=n,s=i):n&&ut(n)==="object"&&(u=n.strict,s=n.filter),o===!0&&!s)return r.store;var c=r.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),f=[];return c.forEach(function(p){var g,h,m="INVALIDATE_NAME_PATH"in p?p.INVALIDATE_NAME_PATH:p.getNamePath();if(u){var y,b;if((y=(b=p).isList)!==null&&y!==void 0&&y.call(b))return}else if(!o&&(g=(h=p).isListField)!==null&&g!==void 0&&g.call(h))return;if(!s)f.push(m);else{var S="getMeta"in p?p.getMeta():null;s(S)&&f.push(m)}}),RO(r.store,f.map(lr))}),oe(this,"getFieldValue",function(n){r.warningUnhooked();var i=lr(n);return bo(r.store,i)}),oe(this,"getFieldsError",function(n){r.warningUnhooked();var i=r.getFieldEntitiesForNamePathList(n);return i.map(function(o,s){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:lr(n[s]),errors:[],warnings:[]}})}),oe(this,"getFieldError",function(n){r.warningUnhooked();var i=lr(n),o=r.getFieldsError([i])[0];return o.errors}),oe(this,"getFieldWarning",function(n){r.warningUnhooked();var i=lr(n),o=r.getFieldsError([i])[0];return o.warnings}),oe(this,"isFieldsTouched",function(){r.warningUnhooked();for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var s=i[0],u=i[1],c,f=!1;i.length===0?c=null:i.length===1?Array.isArray(s)?(c=s.map(lr),f=!1):(c=null,f=s):(c=s.map(lr),f=u);var p=r.getFieldEntities(!0),g=function(S){return S.isFieldTouched()};if(!c)return f?p.every(function(b){return g(b)||b.isList()}):p.some(g);var h=new nl;c.forEach(function(b){h.set(b,[])}),p.forEach(function(b){var S=b.getNamePath();c.forEach(function(_){_.every(function(C,O){return S[O]===C})&&h.update(_,function(C){return[].concat(rt(C),[b])})})});var m=function(S){return S.some(g)},y=h.map(function(b){var S=b.value;return S});return f?y.every(m):y.some(m)}),oe(this,"isFieldTouched",function(n){return r.warningUnhooked(),r.isFieldsTouched([n])}),oe(this,"isFieldsValidating",function(n){r.warningUnhooked();var i=r.getFieldEntities();if(!n)return i.some(function(s){return s.isFieldValidating()});var o=n.map(lr);return i.some(function(s){var u=s.getNamePath();return wl(o,u)&&s.isFieldValidating()})}),oe(this,"isFieldValidating",function(n){return r.warningUnhooked(),r.isFieldsValidating([n])}),oe(this,"resetWithFieldInitialValue",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new nl,o=r.getFieldEntities(!0);o.forEach(function(c){var f=c.props.initialValue,p=c.getNamePath();if(f!==void 0){var g=i.get(p)||new Set;g.add({entity:c,value:f}),i.set(p,g)}});var s=function(f){f.forEach(function(p){var g=p.props.initialValue;if(g!==void 0){var h=p.getNamePath(),m=r.getInitialValue(h);if(m!==void 0)Kn(!1,"Form already set 'initialValues' with path '".concat(h.join("."),"'. Field can not overwrite it."));else{var y=i.get(h);if(y&&y.size>1)Kn(!1,"Multiple Field with path '".concat(h.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(y){var b=r.getFieldValue(h),S=p.isListField();!S&&(!n.skipExist||b===void 0)&&r.updateStore(Wi(r.store,h,rt(y)[0].value))}}}})},u;n.entities?u=n.entities:n.namePathList?(u=[],n.namePathList.forEach(function(c){var f=i.get(c);if(f){var p;(p=u).push.apply(p,rt(rt(f).map(function(g){return g.entity})))}})):u=o,s(u)}),oe(this,"resetFields",function(n){r.warningUnhooked();var i=r.store;if(!n){r.updateStore(gl(r.initialValues)),r.resetWithFieldInitialValue(),r.notifyObservers(i,null,{type:"reset"}),r.notifyWatch();return}var o=n.map(lr);o.forEach(function(s){var u=r.getInitialValue(s);r.updateStore(Wi(r.store,s,u))}),r.resetWithFieldInitialValue({namePathList:o}),r.notifyObservers(i,o,{type:"reset"}),r.notifyWatch(o)}),oe(this,"setFields",function(n){r.warningUnhooked();var i=r.store,o=[];n.forEach(function(s){var u=s.name,c=Qn(s,pG),f=lr(u);o.push(f),"value"in c&&r.updateStore(Wi(r.store,f,c.value)),r.notifyObservers(i,[f],{type:"setField",data:s})}),r.notifyWatch(o)}),oe(this,"getFields",function(){var n=r.getFieldEntities(!0),i=n.map(function(o){var s=o.getNamePath(),u=o.getMeta(),c=de(de({},u),{},{name:s,value:r.getFieldValue(s)});return Object.defineProperty(c,"originRCField",{value:!0}),c});return i}),oe(this,"initEntityValue",function(n){var i=n.props.initialValue;if(i!==void 0){var o=n.getNamePath(),s=bo(r.store,o);s===void 0&&r.updateStore(Wi(r.store,o,i))}}),oe(this,"isMergedPreserve",function(n){var i=n!==void 0?n:r.preserve;return i??!0}),oe(this,"registerField",function(n){r.fieldEntities.push(n);var i=n.getNamePath();if(r.notifyWatch([i]),n.props.initialValue!==void 0){var o=r.store;r.resetWithFieldInitialValue({entities:[n],skipExist:!0}),r.notifyObservers(o,[n.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(s,u){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.fieldEntities=r.fieldEntities.filter(function(g){return g!==n}),!r.isMergedPreserve(u)&&(!s||c.length>1)){var f=s?void 0:r.getInitialValue(i);if(i.length&&r.getFieldValue(i)!==f&&r.fieldEntities.every(function(g){return!vA(g.getNamePath(),i)})){var p=r.store;r.updateStore(Wi(p,i,f,!0)),r.notifyObservers(p,[i],{type:"remove"}),r.triggerDependenciesUpdate(p,i)}}r.notifyWatch([i])}}),oe(this,"dispatch",function(n){switch(n.type){case"updateValue":{var i=n.namePath,o=n.value;r.updateValue(i,o);break}case"validateField":{var s=n.namePath,u=n.triggerName;r.validateFields([s],{triggerName:u});break}}}),oe(this,"notifyObservers",function(n,i,o){if(r.subscribable){var s=de(de({},o),{},{store:r.getFieldsValue(!0)});r.getFieldEntities().forEach(function(u){var c=u.onStoreChange;c(n,i,s)})}else r.forceRootUpdate()}),oe(this,"triggerDependenciesUpdate",function(n,i){var o=r.getDependencyChildrenFields(i);return o.length&&r.validateFields(o),r.notifyObservers(n,o,{type:"dependenciesUpdate",relatedFields:[i].concat(rt(o))}),o}),oe(this,"updateValue",function(n,i){var o=lr(n),s=r.store;r.updateStore(Wi(r.store,o,i)),r.notifyObservers(s,[o],{type:"valueUpdate",source:"internal"}),r.notifyWatch([o]);var u=r.triggerDependenciesUpdate(s,o),c=r.callbacks.onValuesChange;if(c){var f=RO(r.store,[o]);c(f,r.getFieldsValue())}r.triggerOnFieldsChange([o].concat(rt(u)))}),oe(this,"setFieldsValue",function(n){r.warningUnhooked();var i=r.store;if(n){var o=gl(r.store,n);r.updateStore(o)}r.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),r.notifyWatch()}),oe(this,"setFieldValue",function(n,i){r.setFields([{name:n,value:i}])}),oe(this,"getDependencyChildrenFields",function(n){var i=new Set,o=[],s=new nl;r.getFieldEntities().forEach(function(c){var f=c.props.dependencies;(f||[]).forEach(function(p){var g=lr(p);s.update(g,function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return h.add(c),h})})});var u=function c(f){var p=s.get(f)||new Set;p.forEach(function(g){if(!i.has(g)){i.add(g);var h=g.getNamePath();g.isFieldDirty()&&h.length&&(o.push(h),c(h))}})};return u(n),o}),oe(this,"triggerOnFieldsChange",function(n,i){var o=r.callbacks.onFieldsChange;if(o){var s=r.getFields();if(i){var u=new nl;i.forEach(function(f){var p=f.name,g=f.errors;u.set(p,g)}),s.forEach(function(f){f.errors=u.get(f.name)||f.errors})}var c=s.filter(function(f){var p=f.name;return wl(n,p)});c.length&&o(c,s)}}),oe(this,"validateFields",function(n,i){r.warningUnhooked();var o,s;Array.isArray(n)||typeof n=="string"||typeof i=="string"?(o=n,s=i):s=n;var u=!!o,c=u?o.map(lr):[],f=[],p=String(Date.now()),g=new Set,h=s||{},m=h.recursive,y=h.dirty;r.getFieldEntities(!0).forEach(function(C){if(u||c.push(C.getNamePath()),!(!C.props.rules||!C.props.rules.length)&&!(y&&!C.isFieldDirty())){var O=C.getNamePath();if(g.add(O.join(p)),!u||wl(c,O,m)){var R=C.validateRules(de({validateMessages:de(de({},gA),r.validateMessages)},s));f.push(R.then(function(){return{name:O,errors:[],warnings:[]}}).catch(function($){var T,P=[],L=[];return(T=$.forEach)===null||T===void 0||T.call($,function(z){var B=z.rule.warningOnly,X=z.errors;B?L.push.apply(L,rt(X)):P.push.apply(P,rt(X))}),P.length?Promise.reject({name:O,errors:P,warnings:L}):{name:O,errors:P,warnings:L}}))}}});var b=dG(f);r.lastValidatePromise=b,b.catch(function(C){return C}).then(function(C){var O=C.map(function(R){var $=R.name;return $});r.notifyObservers(r.store,O,{type:"validateFinish"}),r.triggerOnFieldsChange(O,C)});var S=b.then(function(){return r.lastValidatePromise===b?Promise.resolve(r.getFieldsValue(c)):Promise.reject([])}).catch(function(C){var O=C.filter(function(R){return R&&R.errors.length});return Promise.reject({values:r.getFieldsValue(c),errorFields:O,outOfDate:r.lastValidatePromise!==b})});S.catch(function(C){return C});var _=c.filter(function(C){return g.has(C.join(p))});return r.triggerOnFieldsChange(_),S}),oe(this,"submit",function(){r.warningUnhooked(),r.validateFields().then(function(n){var i=r.callbacks.onFinish;if(i)try{i(n)}catch(o){console.error(o)}}).catch(function(n){var i=r.callbacks.onFinishFailed;i&&i(n)})}),this.forceRootUpdate=t});function bA(e){var t=x.useRef(),r=x.useState({}),n=ke(r,2),i=n[1];if(!t.current)if(e)t.current=e;else{var o=function(){i({})},s=new hG(o);t.current=s.getForm()}return[t.current]}var Wy=x.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),gG=function(t){var r=t.validateMessages,n=t.onFormChange,i=t.onFormFinish,o=t.children,s=x.useContext(Wy),u=x.useRef({});return x.createElement(Wy.Provider,{value:de(de({},s),{},{validateMessages:de(de({},s.validateMessages),r),triggerFormChange:function(f,p){n&&n(f,{changedFields:p,forms:u.current}),s.triggerFormChange(f,p)},triggerFormFinish:function(f,p){i&&i(f,{values:p,forms:u.current}),s.triggerFormFinish(f,p)},registerForm:function(f,p){f&&(u.current=de(de({},u.current),{},oe({},f,p))),s.registerForm(f,p)},unregisterForm:function(f){var p=de({},u.current);delete p[f],u.current=p,s.unregisterForm(f)}})},o)},vG=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],mG=function(t,r){var n=t.name,i=t.initialValues,o=t.fields,s=t.form,u=t.preserve,c=t.children,f=t.component,p=f===void 0?"form":f,g=t.validateMessages,h=t.validateTrigger,m=h===void 0?"onChange":h,y=t.onValuesChange,b=t.onFieldsChange,S=t.onFinish,_=t.onFinishFailed,C=t.clearOnDestroy,O=Qn(t,vG),R=x.useRef(null),$=x.useContext(Wy),T=bA(s),P=ke(T,1),L=P[0],z=L.getInternalHooks(fs),B=z.useSubscribe,X=z.setInitialValues,Y=z.setCallbacks,N=z.setValidateMessages,j=z.setPreserve,F=z.destroyForm;x.useImperativeHandle(r,function(){return de(de({},L),{},{nativeElement:R.current})}),x.useEffect(function(){return $.registerForm(n,L),function(){$.unregisterForm(n)}},[$,L,n]),N(de(de({},$.validateMessages),g)),Y({onValuesChange:y,onFieldsChange:function(Z){if($.triggerFormChange(n,Z),b){for(var ne=arguments.length,W=new Array(ne>1?ne-1:0),ve=1;ve<ne;ve++)W[ve-1]=arguments[ve];b.apply(void 0,[Z].concat(W))}},onFinish:function(Z){$.triggerFormFinish(n,Z),S&&S(Z)},onFinishFailed:_}),j(u);var q=x.useRef(null);X(i,!q.current),q.current||(q.current=!0),x.useEffect(function(){return function(){return F(C)}},[]);var U,M=typeof c=="function";if(M){var G=L.getFieldsValue(!0);U=c(G,L)}else U=c;B(!M);var K=x.useRef();x.useEffect(function(){lG(K.current||[],o||[])||L.setFields(o||[]),K.current=o},[o,L]);var D=x.useMemo(function(){return de(de({},L),{},{validateTrigger:m})},[L,m]),A=x.createElement(Cp.Provider,{value:null},x.createElement(Vl.Provider,{value:D},U));return p===!1?A:x.createElement(p,fr({},O,{ref:R,onSubmit:function(Z){Z.preventDefault(),Z.stopPropagation(),L.submit()},onReset:function(Z){var ne;Z.preventDefault(),L.resetFields(),(ne=O.onReset)===null||ne===void 0||ne.call(O,Z)}}),A)};function TO(e){try{return JSON.stringify(e)}catch{return Math.random()}}function yG(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],i=t[1],o=i===void 0?{}:i,s=RW(o)?{form:o}:o,u=s.form,c=x.useState(),f=ke(c,2),p=f[0],g=f[1],h=x.useMemo(function(){return TO(p)},[p]),m=x.useRef(h);m.current=h;var y=x.useContext(Vl),b=u||y,S=b&&b._init,_=lr(n),C=x.useRef(_);return C.current=_,x.useEffect(function(){if(S){var O=b.getFieldsValue,R=b.getInternalHooks,$=R(fs),T=$.registerWatch,P=function(X,Y){var N=s.preserve?Y:X;return typeof n=="function"?n(N):bo(N,C.current)},L=T(function(B,X){var Y=P(B,X),N=TO(Y);m.current!==N&&(m.current=N,g(Y))}),z=P(O(),O(!0));return p!==z&&g(z),L}},[S]),p}var bG=x.forwardRef(mG),Nc=bG;Nc.FormProvider=gG;Nc.Field=mA;Nc.List=fG;Nc.useForm=bA;Nc.useWatch=yG;const Gy=x.createContext({}),SG=e=>{let{children:t,status:r,override:n}=e;const i=x.useContext(Gy),o=x.useMemo(()=>{const s=Object.assign({},i);return n&&delete s.isFormItemInput,r&&(delete s.status,delete s.hasFeedback,delete s.feedbackIcon),s},[r,n,i]);return x.createElement(Gy.Provider,{value:o},t)},wG=x.createContext(void 0),xG=e=>{const{space:t,form:r,children:n}=e;if(n==null)return null;let i=n;return r&&(i=te.createElement(SG,{override:!0,status:!0},i)),t&&(i=te.createElement(dW,null,i)),i};var EG=function(t){if(Tn()&&window.document.documentElement){var r=Array.isArray(t)?t:[t],n=window.document.documentElement;return r.some(function(i){return i in n.style})}return!1};function IO(e,t){return EG(e)}const CG=e=>({animationDuration:e,animationFillMode:"both"}),_G=e=>({animationDuration:e,animationFillMode:"both"}),RG=function(e,t,r,n){const o=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[`
1073
+ }`),i)}else vc(i);return function(){vc(i)}},[t,i])}var xW=!1;function EW(e){return xW}var mO=function(t){return t===!1?!1:!Tn()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},pA=x.forwardRef(function(e,t){var r=e.open,n=e.autoLock,i=e.getContainer;e.debug;var o=e.autoDestroy,s=o===void 0?!0:o,u=e.children,c=x.useState(r),f=ke(c,2),p=f[0],g=f[1],h=p||r;x.useEffect(function(){(s||r)&&g(r)},[r,s]);var m=x.useState(function(){return mO(i)}),y=ke(m,2),b=y[0],S=y[1];x.useEffect(function(){var X=mO(i);S(X??null)});var _=vW(h&&!b),C=ke(_,2),O=C[0],R=C[1],$=b??O;wW(n&&r&&Tn()&&($===O||$===document.body));var T=null;if(u&&Wp(u)&&t){var P=u;T=P.ref}var L=eb(T,t);if(!h||!Tn()||b===void 0)return null;var z=$===!1||EW(),B=u;return t&&(B=x.cloneElement(u,{ref:L})),x.createElement(dA.Provider,{value:R},z?B:Ip.createPortal(B,$))});function CW(){var e=de({},Tp);return e.useId}var yO=0,bO=CW();const _W=bO?(function(t){var r=bO();return t||r}):(function(t){var r=x.useState("ssr-id"),n=ke(r,2),i=n[0],o=n[1];return x.useEffect(function(){var s=yO;yO+=1,o("rc_unique_".concat(s))},[]),t||i});var fs="RC_FORM_INTERNAL_HOOKS",zt=function(){Kn(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Vl=x.createContext({getFieldValue:zt,getFieldsValue:zt,getFieldError:zt,getFieldWarning:zt,getFieldsError:zt,isFieldsTouched:zt,isFieldTouched:zt,isFieldValidating:zt,isFieldsValidating:zt,resetFields:zt,setFields:zt,setFieldValue:zt,setFieldsValue:zt,validateFields:zt,submit:zt,getInternalHooks:function(){return zt(),{dispatch:zt,initEntityValue:zt,registerField:zt,useSubscribe:zt,setInitialValues:zt,destroyForm:zt,setCallbacks:zt,registerWatch:zt,getFields:zt,setValidateMessages:zt,setPreserve:zt,getInitialValue:zt}}}),Cp=x.createContext(null);function Ly(e){return e==null?[]:Array.isArray(e)?e:[e]}function RW(e){return e&&!!e._init}function Fy(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Ny=Fy();function OW(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function $W(e,t,r){if(H1())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&uc(i,r.prototype),i}function jy(e){var t=typeof Map=="function"?new Map:void 0;return jy=function(n){if(n===null||!OW(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return $W(n,arguments,cc(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),uc(i,n)},jy(e)}var TW=/%[sdj%]/g,IW=function(){};function zy(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function Xn(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=0,o=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var s=e.replace(TW,function(u){if(u==="%%")return"%";if(i>=o)return u;switch(u){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch{return"[Circular]"}break;default:return u}});return s}return e}function AW(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function wr(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||AW(t)&&typeof e=="string"&&!e)}function kW(e,t,r){var n=[],i=0,o=e.length;function s(u){n.push.apply(n,rt(u||[])),i++,i===o&&r(n)}e.forEach(function(u){t(u,s)})}function SO(e,t,r){var n=0,i=e.length;function o(s){if(s&&s.length){r(s);return}var u=n;n=n+1,u<i?t(e[u],o):r([])}o([])}function PW(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,rt(e[r]||[]))}),t}var wO=(function(e){Rs(r,e);var t=Os(r);function r(n,i){var o;return en(this,r),o=t.call(this,"Async Validation Error"),oe(gt(o),"errors",void 0),oe(gt(o),"fields",void 0),o.errors=n,o.fields=i,o}return tn(r)})(jy(Error));function MW(e,t,r,n,i){if(t.first){var o=new Promise(function(h,m){var y=function(_){return n(_),_.length?m(new wO(_,zy(_))):h(i)},b=PW(e);SO(b,r,y)});return o.catch(function(h){return h}),o}var s=t.firstFields===!0?Object.keys(e):t.firstFields||[],u=Object.keys(e),c=u.length,f=0,p=[],g=new Promise(function(h,m){var y=function(S){if(p.push.apply(p,S),f++,f===c)return n(p),p.length?m(new wO(p,zy(p))):h(i)};u.length||(n(p),h(i)),u.forEach(function(b){var S=e[b];s.indexOf(b)!==-1?SO(S,r,y):kW(S,r,y)})});return g.catch(function(h){return h}),g}function DW(e){return!!(e&&e.message!==void 0)}function LW(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function xO(e,t){return function(r){var n;return e.fullFields?n=LW(t,e.fullFields):n=t[r.field||e.fullField],DW(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function EO(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];ut(n)==="object"&&ut(e[r])==="object"?e[r]=de(de({},e[r]),n):e[r]=n}}return e}var rl="enum",FW=function(t,r,n,i,o){t[rl]=Array.isArray(t[rl])?t[rl]:[],t[rl].indexOf(r)===-1&&i.push(Xn(o.messages[rl],t.fullField,t[rl].join(", ")))},NW=function(t,r,n,i,o){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||i.push(Xn(o.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var s=new RegExp(t.pattern);s.test(r)||i.push(Xn(o.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},jW=function(t,r,n,i,o){var s=typeof t.len=="number",u=typeof t.min=="number",c=typeof t.max=="number",f=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=r,g=null,h=typeof r=="number",m=typeof r=="string",y=Array.isArray(r);if(h?g="number":m?g="string":y&&(g="array"),!g)return!1;y&&(p=r.length),m&&(p=r.replace(f,"_").length),s?p!==t.len&&i.push(Xn(o.messages[g].len,t.fullField,t.len)):u&&!c&&p<t.min?i.push(Xn(o.messages[g].min,t.fullField,t.min)):c&&!u&&p>t.max?i.push(Xn(o.messages[g].max,t.fullField,t.max)):u&&c&&(p<t.min||p>t.max)&&i.push(Xn(o.messages[g].range,t.fullField,t.min,t.max))},hA=function(t,r,n,i,o,s){t.required&&(!n.hasOwnProperty(t.field)||wr(r,s||t.type))&&i.push(Xn(o.messages.required,t.fullField))},Sd;const zW=(function(){if(Sd)return Sd;var e="[a-fA-F\\d:]",t=function(T){return T&&T.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",i=["(?:".concat(n,":){7}(?:").concat(n,"|:)"),"(?:".concat(n,":){6}(?:").concat(r,"|:").concat(n,"|:)"),"(?:".concat(n,":){5}(?::").concat(r,"|(?::").concat(n,"){1,2}|:)"),"(?:".concat(n,":){4}(?:(?::").concat(n,"){0,1}:").concat(r,"|(?::").concat(n,"){1,3}|:)"),"(?:".concat(n,":){3}(?:(?::").concat(n,"){0,2}:").concat(r,"|(?::").concat(n,"){1,4}|:)"),"(?:".concat(n,":){2}(?:(?::").concat(n,"){0,3}:").concat(r,"|(?::").concat(n,"){1,5}|:)"),"(?:".concat(n,":){1}(?:(?::").concat(n,"){0,4}:").concat(r,"|(?::").concat(n,"){1,6}|:)"),"(?::(?:(?::".concat(n,"){0,5}:").concat(r,"|(?::").concat(n,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",s="(?:".concat(i.join("|"),")").concat(o),u=new RegExp("(?:^".concat(r,"$)|(?:^").concat(s,"$)")),c=new RegExp("^".concat(r,"$")),f=new RegExp("^".concat(s,"$")),p=function(T){return T&&T.exact?u:new RegExp("(?:".concat(t(T)).concat(r).concat(t(T),")|(?:").concat(t(T)).concat(s).concat(t(T),")"),"g")};p.v4=function($){return $&&$.exact?c:new RegExp("".concat(t($)).concat(r).concat(t($)),"g")},p.v6=function($){return $&&$.exact?f:new RegExp("".concat(t($)).concat(s).concat(t($)),"g")};var g="(?:(?:[a-z]+:)?//)",h="(?:\\S+(?::\\S*)?@)?",m=p.v4().source,y=p.v6().source,b="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",S="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",_="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",C="(?::\\d{2,5})?",O='(?:[/?#][^\\s"]*)?',R="(?:".concat(g,"|www\\.)").concat(h,"(?:localhost|").concat(m,"|").concat(y,"|").concat(b).concat(S).concat(_,")").concat(C).concat(O);return Sd=new RegExp("(?:^".concat(R,"$)"),"i"),Sd});var zm={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Nu={integer:function(t){return Nu.number(t)&&parseInt(t,10)===t},float:function(t){return Nu.number(t)&&!Nu.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return ut(t)==="object"&&!Nu.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(zm.email)},tel:function(t){return typeof t=="string"&&t.length<=32&&!!t.match(zm.tel)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(zW())},hex:function(t){return typeof t=="string"&&!!t.match(zm.hex)}},BW=function(t,r,n,i,o){if(t.required&&r===void 0){hA(t,r,n,i,o);return}var s=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],u=t.type;s.indexOf(u)>-1?Nu[u](r)||i.push(Xn(o.messages.types[u],t.fullField,t.type)):u&&ut(r)!==t.type&&i.push(Xn(o.messages.types[u],t.fullField,t.type))},VW=function(t,r,n,i,o){(/^\s+$/.test(r)||r==="")&&i.push(Xn(o.messages.whitespace,t.fullField))};const bt={required:hA,whitespace:VW,type:BW,range:jW,enum:FW,pattern:NW};var HW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(wr(r)&&!t.required)return n();bt.required(t,r,i,s,o)}n(s)},UW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(r==null&&!t.required)return n();bt.required(t,r,i,s,o,"array"),r!=null&&(bt.type(t,r,i,s,o),bt.range(t,r,i,s,o))}n(s)},WW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(wr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&bt.type(t,r,i,s,o)}n(s)},GW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(wr(r,"date")&&!t.required)return n();if(bt.required(t,r,i,s,o),!wr(r,"date")){var c;r instanceof Date?c=r:c=new Date(r),bt.type(t,c,i,s,o),c&&bt.range(t,c.getTime(),i,s,o)}}n(s)},qW="enum",XW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(wr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&bt[qW](t,r,i,s,o)}n(s)},KW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(wr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&(bt.type(t,r,i,s,o),bt.range(t,r,i,s,o))}n(s)},YW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(wr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&(bt.type(t,r,i,s,o),bt.range(t,r,i,s,o))}n(s)},QW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(wr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&bt.type(t,r,i,s,o)}n(s)},JW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(r===""&&(r=void 0),wr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&(bt.type(t,r,i,s,o),bt.range(t,r,i,s,o))}n(s)},ZW=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(wr(r)&&!t.required)return n();bt.required(t,r,i,s,o),r!==void 0&&bt.type(t,r,i,s,o)}n(s)},eG=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(wr(r,"string")&&!t.required)return n();bt.required(t,r,i,s,o),wr(r,"string")||bt.pattern(t,r,i,s,o)}n(s)},tG=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(wr(r)&&!t.required)return n();bt.required(t,r,i,s,o),wr(r)||bt.type(t,r,i,s,o)}n(s)},rG=function(t,r,n,i,o){var s=[],u=Array.isArray(r)?"array":ut(r);bt.required(t,r,i,s,o,u),n(s)},nG=function(t,r,n,i,o){var s=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(wr(r,"string")&&!t.required)return n();bt.required(t,r,i,s,o,"string"),wr(r,"string")||(bt.type(t,r,i,s,o),bt.range(t,r,i,s,o),bt.pattern(t,r,i,s,o),t.whitespace===!0&&bt.whitespace(t,r,i,s,o))}n(s)},wd=function(t,r,n,i,o){var s=t.type,u=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(wr(r,s)&&!t.required)return n();bt.required(t,r,i,u,o,s),wr(r,s)||bt.type(t,r,i,u,o)}n(u)};const Yu={string:nG,method:QW,number:JW,boolean:WW,regexp:tG,integer:YW,float:KW,array:UW,object:ZW,enum:XW,pattern:eG,date:GW,url:wd,hex:wd,email:wd,tel:wd,required:rG,any:HW};var Fc=(function(){function e(t){en(this,e),oe(this,"rules",null),oe(this,"_messages",Ny),this.define(t)}return tn(e,[{key:"define",value:function(r){var n=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(ut(r)!=="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(i){var o=r[i];n.rules[i]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(r){return r&&(this._messages=EO(Fy(),r)),this._messages}},{key:"validate",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},s=r,u=i,c=o;if(typeof u=="function"&&(c=u,u={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,s),Promise.resolve(s);function f(y){var b=[],S={};function _(O){if(Array.isArray(O)){var R;b=(R=b).concat.apply(R,rt(O))}else b.push(O)}for(var C=0;C<y.length;C++)_(y[C]);b.length?(S=zy(b),c(b,S)):c(null,s)}if(u.messages){var p=this.messages();p===Ny&&(p=Fy()),EO(p,u.messages),u.messages=p}else u.messages=this.messages();var g={},h=u.keys||Object.keys(this.rules);h.forEach(function(y){var b=n.rules[y],S=s[y];b.forEach(function(_){var C=_;typeof C.transform=="function"&&(s===r&&(s=de({},s)),S=s[y]=C.transform(S),S!=null&&(C.type=C.type||(Array.isArray(S)?"array":ut(S)))),typeof C=="function"?C={validator:C}:C=de({},C),C.validator=n.getValidationMethod(C),C.validator&&(C.field=y,C.fullField=C.fullField||y,C.type=n.getType(C),g[y]=g[y]||[],g[y].push({rule:C,value:S,source:s,field:y}))})});var m={};return MW(g,u,function(y,b){var S=y.rule,_=(S.type==="object"||S.type==="array")&&(ut(S.fields)==="object"||ut(S.defaultField)==="object");_=_&&(S.required||!S.required&&y.value),S.field=y.field;function C(P,L){return de(de({},L),{},{fullField:"".concat(S.fullField,".").concat(P),fullFields:S.fullFields?[].concat(rt(S.fullFields),[P]):[P]})}function O(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=Array.isArray(P)?P:[P];!u.suppressWarning&&L.length&&e.warning("async-validator:",L),L.length&&S.message!==void 0&&S.message!==null&&(L=[].concat(S.message));var z=L.map(xO(S,s));if(u.first&&z.length)return m[S.field]=1,b(z);if(!_)b(z);else{if(S.required&&!y.value)return S.message!==void 0?z=[].concat(S.message).map(xO(S,s)):u.error&&(z=[u.error(S,Xn(u.messages.required,S.field))]),b(z);var B={};S.defaultField&&Object.keys(y.value).map(function(N){B[N]=S.defaultField}),B=de(de({},B),y.rule.fields);var X={};Object.keys(B).forEach(function(N){var j=B[N],F=Array.isArray(j)?j:[j];X[N]=F.map(C.bind(null,N))});var Y=new e(X);Y.messages(u.messages),y.rule.options&&(y.rule.options.messages=u.messages,y.rule.options.error=u.error),Y.validate(y.value,y.rule.options||u,function(N){var j=[];z&&z.length&&j.push.apply(j,rt(z)),N&&N.length&&j.push.apply(j,rt(N)),b(j.length?j:null)})}}var R;if(S.asyncValidator)R=S.asyncValidator(S,y.value,O,y.source,u);else if(S.validator){try{R=S.validator(S,y.value,O,y.source,u)}catch(P){var $,T;($=(T=console).error)===null||$===void 0||$.call(T,P),u.suppressValidatorError||setTimeout(function(){throw P},0),O(P.message)}R===!0?O():R===!1?O(typeof S.message=="function"?S.message(S.fullField||S.field):S.message||"".concat(S.fullField||S.field," fails")):R instanceof Array?O(R):R instanceof Error&&O(R.message)}R&&R.then&&R.then(function(){return O()},function(P){return O(P)})},function(y){f(y)},s)}},{key:"getType",value:function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!Yu.hasOwnProperty(r.type))throw new Error(Xn("Unknown rule type %s",r.type));return r.type||"string"}},{key:"getValidationMethod",value:function(r){if(typeof r.validator=="function")return r.validator;var n=Object.keys(r),i=n.indexOf("message");return i!==-1&&n.splice(i,1),n.length===1&&n[0]==="required"?Yu.required:Yu[this.getType(r)]||void 0}}]),e})();oe(Fc,"register",function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");Yu[t]=r});oe(Fc,"warning",IW);oe(Fc,"messages",Ny);oe(Fc,"validators",Yu);var Bn="'${name}' is not a valid ${type}",gA={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Bn,method:Bn,array:Bn,object:Bn,number:Bn,date:Bn,boolean:Bn,integer:Bn,float:Bn,regexp:Bn,email:Bn,url:Bn,hex:Bn},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},CO=Fc;function iG(e,t){return e.replace(/\$\{\w+\}/g,function(r){var n=r.slice(2,-1);return t[n]})}var _O="CODE_LOGIC_ERROR";function By(e,t,r,n,i){return Vy.apply(this,arguments)}function Vy(){return Vy=Lc($i().mark(function e(t,r,n,i,o){var s,u,c,f,p,g,h,m,y;return $i().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return s=de({},n),delete s.ruleIndex,CO.warning=function(){},s.validator&&(u=s.validator,s.validator=function(){try{return u.apply(void 0,arguments)}catch(_){return console.error(_),Promise.reject(_O)}}),c=null,s&&s.type==="array"&&s.defaultField&&(c=s.defaultField,delete s.defaultField),f=new CO(oe({},t,[s])),p=gl(gA,i.validateMessages),f.messages(p),g=[],S.prev=10,S.next=13,Promise.resolve(f.validate(oe({},t,r),de({},i)));case 13:S.next=18;break;case 15:S.prev=15,S.t0=S.catch(10),S.t0.errors&&(g=S.t0.errors.map(function(_,C){var O=_.message,R=O===_O?p.default:O;return x.isValidElement(R)?x.cloneElement(R,{key:"error_".concat(C)}):R}));case 18:if(!(!g.length&&c)){S.next=23;break}return S.next=21,Promise.all(r.map(function(_,C){return By("".concat(t,".").concat(C),_,c,i,o)}));case 21:return h=S.sent,S.abrupt("return",h.reduce(function(_,C){return[].concat(rt(_),rt(C))},[]));case 23:return m=de(de({},n),{},{name:t,enum:(n.enum||[]).join(", ")},o),y=g.map(function(_){return typeof _=="string"?iG(_,m):_}),S.abrupt("return",y);case 26:case"end":return S.stop()}},e,null,[[10,15]])})),Vy.apply(this,arguments)}function oG(e,t,r,n,i,o){var s=e.join("."),u=r.map(function(p,g){var h=p.validator,m=de(de({},p),{},{ruleIndex:g});return h&&(m.validator=function(y,b,S){var _=!1,C=function(){for(var $=arguments.length,T=new Array($),P=0;P<$;P++)T[P]=arguments[P];Promise.resolve().then(function(){Kn(!_,"Your validator function has already return a promise. `callback` will be ignored."),_||S.apply(void 0,T)})},O=h(y,b,C);_=O&&typeof O.then=="function"&&typeof O.catch=="function",Kn(_,"`callback` is deprecated. Please return a promise instead."),_&&O.then(function(){S()}).catch(function(R){S(R||" ")})}),m}).sort(function(p,g){var h=p.warningOnly,m=p.ruleIndex,y=g.warningOnly,b=g.ruleIndex;return!!h==!!y?m-b:h?1:-1}),c;if(i===!0)c=new Promise((function(){var p=Lc($i().mark(function g(h,m){var y,b,S;return $i().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:y=0;case 1:if(!(y<u.length)){C.next=12;break}return b=u[y],C.next=5,By(s,t,b,n,o);case 5:if(S=C.sent,!S.length){C.next=9;break}return m([{errors:S,rule:b}]),C.abrupt("return");case 9:y+=1,C.next=1;break;case 12:h([]);case 13:case"end":return C.stop()}},g)}));return function(g,h){return p.apply(this,arguments)}})());else{var f=u.map(function(p){return By(s,t,p,n,o).then(function(g){return{errors:g,rule:p}})});c=(i?sG(f):aG(f)).then(function(p){return Promise.reject(p)})}return c.catch(function(p){return p}),c}function aG(e){return Hy.apply(this,arguments)}function Hy(){return Hy=Lc($i().mark(function e(t){return $i().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.all(t).then(function(i){var o,s=(o=[]).concat.apply(o,rt(i));return s}));case 1:case"end":return n.stop()}},e)})),Hy.apply(this,arguments)}function sG(e){return Uy.apply(this,arguments)}function Uy(){return Uy=Lc($i().mark(function e(t){var r;return $i().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=0,i.abrupt("return",new Promise(function(o){t.forEach(function(s){s.then(function(u){u.errors.length&&o([u]),r+=1,r===t.length&&o([])})})}));case 2:case"end":return i.stop()}},e)})),Uy.apply(this,arguments)}function lr(e){return Ly(e)}function RO(e,t){var r={};return t.forEach(function(n){var i=bo(e,n);r=Wi(r,n,i)}),r}function wl(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(n){return vA(t,n,r)})}function vA(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!r&&e.length!==t.length?!1:t.every(function(n,i){return e[i]===n})}function lG(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||ut(e)!=="object"||ut(t)!=="object")return!1;var r=Object.keys(e),n=Object.keys(t),i=new Set([].concat(r,n));return rt(i).every(function(o){var s=e[o],u=t[o];return typeof s=="function"&&typeof u=="function"?!0:s===u})}function uG(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&ut(t.target)==="object"&&e in t.target?t.target[e]:t}function OO(e,t,r){var n=e.length;if(t<0||t>=n||r<0||r>=n)return e;var i=e[t],o=t-r;return o>0?[].concat(rt(e.slice(0,r)),[i],rt(e.slice(r,t)),rt(e.slice(t+1,n))):o<0?[].concat(rt(e.slice(0,t)),rt(e.slice(t+1,r+1)),[i],rt(e.slice(r+1,n))):e}var cG=["name"],gi=[];function $O(e,t,r,n,i,o){return typeof e=="function"?e(t,r,"source"in o?{source:o.source}:{}):n!==i}var gb=(function(e){Rs(r,e);var t=Os(r);function r(n){var i;if(en(this,r),i=t.call(this,n),oe(gt(i),"state",{resetCount:0}),oe(gt(i),"cancelRegisterFunc",null),oe(gt(i),"mounted",!1),oe(gt(i),"touched",!1),oe(gt(i),"dirty",!1),oe(gt(i),"validatePromise",void 0),oe(gt(i),"prevValidating",void 0),oe(gt(i),"errors",gi),oe(gt(i),"warnings",gi),oe(gt(i),"cancelRegister",function(){var c=i.props,f=c.preserve,p=c.isListField,g=c.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(p,f,lr(g)),i.cancelRegisterFunc=null}),oe(gt(i),"getNamePath",function(){var c=i.props,f=c.name,p=c.fieldContext,g=p.prefixName,h=g===void 0?[]:g;return f!==void 0?[].concat(rt(h),rt(f)):[]}),oe(gt(i),"getRules",function(){var c=i.props,f=c.rules,p=f===void 0?[]:f,g=c.fieldContext;return p.map(function(h){return typeof h=="function"?h(g):h})}),oe(gt(i),"refresh",function(){i.mounted&&i.setState(function(c){var f=c.resetCount;return{resetCount:f+1}})}),oe(gt(i),"metaCache",null),oe(gt(i),"triggerMetaEvent",function(c){var f=i.props.onMetaChange;if(f){var p=de(de({},i.getMeta()),{},{destroy:c});uy(i.metaCache,p)||f(p),i.metaCache=p}else i.metaCache=null}),oe(gt(i),"onStoreChange",function(c,f,p){var g=i.props,h=g.shouldUpdate,m=g.dependencies,y=m===void 0?[]:m,b=g.onReset,S=p.store,_=i.getNamePath(),C=i.getValue(c),O=i.getValue(S),R=f&&wl(f,_);switch(p.type==="valueUpdate"&&p.source==="external"&&!uy(C,O)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=gi,i.warnings=gi,i.triggerMetaEvent()),p.type){case"reset":if(!f||R){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=gi,i.warnings=gi,i.triggerMetaEvent(),b?.(),i.refresh();return}break;case"remove":{if(h){i.reRender();return}break}case"setField":{var $=p.data;if(R){"touched"in $&&(i.touched=$.touched),"validating"in $&&!("originRCField"in $)&&(i.validatePromise=$.validating?Promise.resolve([]):null),"errors"in $&&(i.errors=$.errors||gi),"warnings"in $&&(i.warnings=$.warnings||gi),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in $&&wl(f,_,!0)){i.reRender();return}if(h&&!_.length&&$O(h,c,S,C,O,p)){i.reRender();return}break}case"dependenciesUpdate":{var T=y.map(lr);if(T.some(function(P){return wl(p.relatedFields,P)})){i.reRender();return}break}default:if(R||(!y.length||_.length||h)&&$O(h,c,S,C,O,p)){i.reRender();return}break}h===!0&&i.reRender()}),oe(gt(i),"validateRules",function(c){var f=i.getNamePath(),p=i.getValue(),g=c||{},h=g.triggerName,m=g.validateOnly,y=m===void 0?!1:m,b=Promise.resolve().then(Lc($i().mark(function S(){var _,C,O,R,$,T,P;return $i().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(i.mounted){z.next=2;break}return z.abrupt("return",[]);case 2:if(_=i.props,C=_.validateFirst,O=C===void 0?!1:C,R=_.messageVariables,$=_.validateDebounce,T=i.getRules(),h&&(T=T.filter(function(B){return B}).filter(function(B){var X=B.validateTrigger;if(!X)return!0;var Y=Ly(X);return Y.includes(h)})),!($&&h)){z.next=10;break}return z.next=8,new Promise(function(B){setTimeout(B,$)});case 8:if(i.validatePromise===b){z.next=10;break}return z.abrupt("return",[]);case 10:return P=oG(f,p,T,c,O,R),P.catch(function(B){return B}).then(function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gi;if(i.validatePromise===b){var X;i.validatePromise=null;var Y=[],N=[];(X=B.forEach)===null||X===void 0||X.call(B,function(j){var F=j.rule.warningOnly,q=j.errors,U=q===void 0?gi:q;F?N.push.apply(N,rt(U)):Y.push.apply(Y,rt(U))}),i.errors=Y,i.warnings=N,i.triggerMetaEvent(),i.reRender()}}),z.abrupt("return",P);case 13:case"end":return z.stop()}},S)})));return y||(i.validatePromise=b,i.dirty=!0,i.errors=gi,i.warnings=gi,i.triggerMetaEvent(),i.reRender()),b}),oe(gt(i),"isFieldValidating",function(){return!!i.validatePromise}),oe(gt(i),"isFieldTouched",function(){return i.touched}),oe(gt(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var c=i.props.fieldContext,f=c.getInternalHooks(fs),p=f.getInitialValue;return p(i.getNamePath())!==void 0}),oe(gt(i),"getErrors",function(){return i.errors}),oe(gt(i),"getWarnings",function(){return i.warnings}),oe(gt(i),"isListField",function(){return i.props.isListField}),oe(gt(i),"isList",function(){return i.props.isList}),oe(gt(i),"isPreserve",function(){return i.props.preserve}),oe(gt(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var c={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return c}),oe(gt(i),"getOnlyChild",function(c){if(typeof c=="function"){var f=i.getMeta();return de(de({},i.getOnlyChild(c(i.getControlled(),f,i.props.fieldContext))),{},{isFunction:!0})}var p=Dl(c);return p.length!==1||!x.isValidElement(p[0])?{child:p,isFunction:!1}:{child:p[0],isFunction:!1}}),oe(gt(i),"getValue",function(c){var f=i.props.fieldContext.getFieldsValue,p=i.getNamePath();return bo(c||f(!0),p)}),oe(gt(i),"getControlled",function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=i.props,p=f.name,g=f.trigger,h=f.validateTrigger,m=f.getValueFromEvent,y=f.normalize,b=f.valuePropName,S=f.getValueProps,_=f.fieldContext,C=h!==void 0?h:_.validateTrigger,O=i.getNamePath(),R=_.getInternalHooks,$=_.getFieldsValue,T=R(fs),P=T.dispatch,L=i.getValue(),z=S||function(j){return oe({},b,j)},B=c[g],X=p!==void 0?z(L):{},Y=de(de({},c),X);Y[g]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var j,F=arguments.length,q=new Array(F),U=0;U<F;U++)q[U]=arguments[U];m?j=m.apply(void 0,q):j=uG.apply(void 0,[b].concat(q)),y&&(j=y(j,L,$(!0))),P({type:"updateValue",namePath:O,value:j}),B&&B.apply(void 0,q)};var N=Ly(C||[]);return N.forEach(function(j){var F=Y[j];Y[j]=function(){F&&F.apply(void 0,arguments);var q=i.props.rules;q&&q.length&&P({type:"validateField",namePath:O,triggerName:j})}}),Y}),n.fieldContext){var o=n.fieldContext.getInternalHooks,s=o(fs),u=s.initEntityValue;u(gt(i))}return i}return tn(r,[{key:"componentDidMount",value:function(){var i=this.props,o=i.shouldUpdate,s=i.fieldContext;if(this.mounted=!0,s){var u=s.getInternalHooks,c=u(fs),f=c.registerField;this.cancelRegisterFunc=f(this)}o===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var i=this.state.resetCount,o=this.props.children,s=this.getOnlyChild(o),u=s.child,c=s.isFunction,f;return c?f=u:x.isValidElement(u)?f=x.cloneElement(u,this.getControlled(u.props)):(Kn(!u,"`children` of Field is not validate ReactElement."),f=u),x.createElement(x.Fragment,{key:i},f)}}]),r})(x.Component);oe(gb,"contextType",Vl);oe(gb,"defaultProps",{trigger:"onChange",valuePropName:"value"});function mA(e){var t=e.name,r=Qn(e,cG),n=x.useContext(Vl),i=x.useContext(Cp),o=t!==void 0?lr(t):void 0,s="keep";return r.isListField||(s="_".concat((o||[]).join("_"))),x.createElement(gb,fr({key:s,name:o,isListField:!!i},r,{fieldContext:n}))}function fG(e){var t=e.name,r=e.initialValue,n=e.children,i=e.rules,o=e.validateTrigger,s=e.isListField,u=x.useContext(Vl),c=x.useContext(Cp),f=x.useRef({keys:[],id:0}),p=f.current,g=x.useMemo(function(){var b=lr(u.prefixName)||[];return[].concat(rt(b),rt(lr(t)))},[u.prefixName,t]),h=x.useMemo(function(){return de(de({},u),{},{prefixName:g})},[u,g]),m=x.useMemo(function(){return{getKey:function(S){var _=g.length,C=S[_];return[p.keys[C],S.slice(_+1)]}}},[g]);if(typeof n!="function")return Kn(!1,"Form.List only accepts function as children."),null;var y=function(S,_,C){var O=C.source;return O==="internal"?!1:S!==_};return x.createElement(Cp.Provider,{value:m},x.createElement(Vl.Provider,{value:h},x.createElement(mA,{name:[],shouldUpdate:y,rules:i,validateTrigger:o,initialValue:r,isList:!0,isListField:s??!!c},function(b,S){var _=b.value,C=_===void 0?[]:_,O=b.onChange,R=u.getFieldValue,$=function(){var z=R(g||[]);return z||[]},T={add:function(z,B){var X=$();B>=0&&B<=X.length?(p.keys=[].concat(rt(p.keys.slice(0,B)),[p.id],rt(p.keys.slice(B))),O([].concat(rt(X.slice(0,B)),[z],rt(X.slice(B))))):(p.keys=[].concat(rt(p.keys),[p.id]),O([].concat(rt(X),[z]))),p.id+=1},remove:function(z){var B=$(),X=new Set(Array.isArray(z)?z:[z]);X.size<=0||(p.keys=p.keys.filter(function(Y,N){return!X.has(N)}),O(B.filter(function(Y,N){return!X.has(N)})))},move:function(z,B){if(z!==B){var X=$();z<0||z>=X.length||B<0||B>=X.length||(p.keys=OO(p.keys,z,B),O(OO(X,z,B)))}}},P=C||[];return Array.isArray(P)||(P=[]),n(P.map(function(L,z){var B=p.keys[z];return B===void 0&&(p.keys[z]=p.id,B=p.keys[z],p.id+=1),{name:z,key:B,isListField:!0}}),T,S)})))}function dG(e){var t=!1,r=e.length,n=[];return e.length?new Promise(function(i,o){e.forEach(function(s,u){s.catch(function(c){return t=!0,c}).then(function(c){r-=1,n[u]=c,!(r>0)&&(t&&o(n),i(n))})})}):Promise.resolve([])}var yA="__@field_split__";function Bm(e){return e.map(function(t){return"".concat(ut(t),":").concat(t)}).join(yA)}var nl=(function(){function e(){en(this,e),oe(this,"kvs",new Map)}return tn(e,[{key:"set",value:function(r,n){this.kvs.set(Bm(r),n)}},{key:"get",value:function(r){return this.kvs.get(Bm(r))}},{key:"update",value:function(r,n){var i=this.get(r),o=n(i);o?this.set(r,o):this.delete(r)}},{key:"delete",value:function(r){this.kvs.delete(Bm(r))}},{key:"map",value:function(r){return rt(this.kvs.entries()).map(function(n){var i=ke(n,2),o=i[0],s=i[1],u=o.split(yA);return r({key:u.map(function(c){var f=c.match(/^([^:]*):(.*)$/),p=ke(f,3),g=p[1],h=p[2];return g==="number"?Number(h):h}),value:s})})}},{key:"toJSON",value:function(){var r={};return this.map(function(n){var i=n.key,o=n.value;return r[i.join(".")]=o,null}),r}}]),e})(),pG=["name"],hG=tn(function e(t){var r=this;en(this,e),oe(this,"formHooked",!1),oe(this,"forceRootUpdate",void 0),oe(this,"subscribable",!0),oe(this,"store",{}),oe(this,"fieldEntities",[]),oe(this,"initialValues",{}),oe(this,"callbacks",{}),oe(this,"validateMessages",null),oe(this,"preserve",null),oe(this,"lastValidatePromise",null),oe(this,"getForm",function(){return{getFieldValue:r.getFieldValue,getFieldsValue:r.getFieldsValue,getFieldError:r.getFieldError,getFieldWarning:r.getFieldWarning,getFieldsError:r.getFieldsError,isFieldsTouched:r.isFieldsTouched,isFieldTouched:r.isFieldTouched,isFieldValidating:r.isFieldValidating,isFieldsValidating:r.isFieldsValidating,resetFields:r.resetFields,setFields:r.setFields,setFieldValue:r.setFieldValue,setFieldsValue:r.setFieldsValue,validateFields:r.validateFields,submit:r.submit,_init:!0,getInternalHooks:r.getInternalHooks}}),oe(this,"getInternalHooks",function(n){return n===fs?(r.formHooked=!0,{dispatch:r.dispatch,initEntityValue:r.initEntityValue,registerField:r.registerField,useSubscribe:r.useSubscribe,setInitialValues:r.setInitialValues,destroyForm:r.destroyForm,setCallbacks:r.setCallbacks,setValidateMessages:r.setValidateMessages,getFields:r.getFields,setPreserve:r.setPreserve,getInitialValue:r.getInitialValue,registerWatch:r.registerWatch}):(Kn(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),oe(this,"useSubscribe",function(n){r.subscribable=n}),oe(this,"prevWithoutPreserves",null),oe(this,"setInitialValues",function(n,i){if(r.initialValues=n||{},i){var o,s=gl(n,r.store);(o=r.prevWithoutPreserves)===null||o===void 0||o.map(function(u){var c=u.key;s=Wi(s,c,bo(n,c))}),r.prevWithoutPreserves=null,r.updateStore(s)}}),oe(this,"destroyForm",function(n){if(n)r.updateStore({});else{var i=new nl;r.getFieldEntities(!0).forEach(function(o){r.isMergedPreserve(o.isPreserve())||i.set(o.getNamePath(),!0)}),r.prevWithoutPreserves=i}}),oe(this,"getInitialValue",function(n){var i=bo(r.initialValues,n);return n.length?gl(i):i}),oe(this,"setCallbacks",function(n){r.callbacks=n}),oe(this,"setValidateMessages",function(n){r.validateMessages=n}),oe(this,"setPreserve",function(n){r.preserve=n}),oe(this,"watchList",[]),oe(this,"registerWatch",function(n){return r.watchList.push(n),function(){r.watchList=r.watchList.filter(function(i){return i!==n})}}),oe(this,"notifyWatch",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(r.watchList.length){var i=r.getFieldsValue(),o=r.getFieldsValue(!0);r.watchList.forEach(function(s){s(i,o,n)})}}),oe(this,"timeoutId",null),oe(this,"warningUnhooked",function(){}),oe(this,"updateStore",function(n){r.store=n}),oe(this,"getFieldEntities",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return n?r.fieldEntities.filter(function(i){return i.getNamePath().length}):r.fieldEntities}),oe(this,"getFieldsMap",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new nl;return r.getFieldEntities(n).forEach(function(o){var s=o.getNamePath();i.set(s,o)}),i}),oe(this,"getFieldEntitiesForNamePathList",function(n){if(!n)return r.getFieldEntities(!0);var i=r.getFieldsMap(!0);return n.map(function(o){var s=lr(o);return i.get(s)||{INVALIDATE_NAME_PATH:lr(o)}})}),oe(this,"getFieldsValue",function(n,i){r.warningUnhooked();var o,s,u;if(n===!0||Array.isArray(n)?(o=n,s=i):n&&ut(n)==="object"&&(u=n.strict,s=n.filter),o===!0&&!s)return r.store;var c=r.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),f=[];return c.forEach(function(p){var g,h,m="INVALIDATE_NAME_PATH"in p?p.INVALIDATE_NAME_PATH:p.getNamePath();if(u){var y,b;if((y=(b=p).isList)!==null&&y!==void 0&&y.call(b))return}else if(!o&&(g=(h=p).isListField)!==null&&g!==void 0&&g.call(h))return;if(!s)f.push(m);else{var S="getMeta"in p?p.getMeta():null;s(S)&&f.push(m)}}),RO(r.store,f.map(lr))}),oe(this,"getFieldValue",function(n){r.warningUnhooked();var i=lr(n);return bo(r.store,i)}),oe(this,"getFieldsError",function(n){r.warningUnhooked();var i=r.getFieldEntitiesForNamePathList(n);return i.map(function(o,s){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:lr(n[s]),errors:[],warnings:[]}})}),oe(this,"getFieldError",function(n){r.warningUnhooked();var i=lr(n),o=r.getFieldsError([i])[0];return o.errors}),oe(this,"getFieldWarning",function(n){r.warningUnhooked();var i=lr(n),o=r.getFieldsError([i])[0];return o.warnings}),oe(this,"isFieldsTouched",function(){r.warningUnhooked();for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var s=i[0],u=i[1],c,f=!1;i.length===0?c=null:i.length===1?Array.isArray(s)?(c=s.map(lr),f=!1):(c=null,f=s):(c=s.map(lr),f=u);var p=r.getFieldEntities(!0),g=function(S){return S.isFieldTouched()};if(!c)return f?p.every(function(b){return g(b)||b.isList()}):p.some(g);var h=new nl;c.forEach(function(b){h.set(b,[])}),p.forEach(function(b){var S=b.getNamePath();c.forEach(function(_){_.every(function(C,O){return S[O]===C})&&h.update(_,function(C){return[].concat(rt(C),[b])})})});var m=function(S){return S.some(g)},y=h.map(function(b){var S=b.value;return S});return f?y.every(m):y.some(m)}),oe(this,"isFieldTouched",function(n){return r.warningUnhooked(),r.isFieldsTouched([n])}),oe(this,"isFieldsValidating",function(n){r.warningUnhooked();var i=r.getFieldEntities();if(!n)return i.some(function(s){return s.isFieldValidating()});var o=n.map(lr);return i.some(function(s){var u=s.getNamePath();return wl(o,u)&&s.isFieldValidating()})}),oe(this,"isFieldValidating",function(n){return r.warningUnhooked(),r.isFieldsValidating([n])}),oe(this,"resetWithFieldInitialValue",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new nl,o=r.getFieldEntities(!0);o.forEach(function(c){var f=c.props.initialValue,p=c.getNamePath();if(f!==void 0){var g=i.get(p)||new Set;g.add({entity:c,value:f}),i.set(p,g)}});var s=function(f){f.forEach(function(p){var g=p.props.initialValue;if(g!==void 0){var h=p.getNamePath(),m=r.getInitialValue(h);if(m!==void 0)Kn(!1,"Form already set 'initialValues' with path '".concat(h.join("."),"'. Field can not overwrite it."));else{var y=i.get(h);if(y&&y.size>1)Kn(!1,"Multiple Field with path '".concat(h.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(y){var b=r.getFieldValue(h),S=p.isListField();!S&&(!n.skipExist||b===void 0)&&r.updateStore(Wi(r.store,h,rt(y)[0].value))}}}})},u;n.entities?u=n.entities:n.namePathList?(u=[],n.namePathList.forEach(function(c){var f=i.get(c);if(f){var p;(p=u).push.apply(p,rt(rt(f).map(function(g){return g.entity})))}})):u=o,s(u)}),oe(this,"resetFields",function(n){r.warningUnhooked();var i=r.store;if(!n){r.updateStore(gl(r.initialValues)),r.resetWithFieldInitialValue(),r.notifyObservers(i,null,{type:"reset"}),r.notifyWatch();return}var o=n.map(lr);o.forEach(function(s){var u=r.getInitialValue(s);r.updateStore(Wi(r.store,s,u))}),r.resetWithFieldInitialValue({namePathList:o}),r.notifyObservers(i,o,{type:"reset"}),r.notifyWatch(o)}),oe(this,"setFields",function(n){r.warningUnhooked();var i=r.store,o=[];n.forEach(function(s){var u=s.name,c=Qn(s,pG),f=lr(u);o.push(f),"value"in c&&r.updateStore(Wi(r.store,f,c.value)),r.notifyObservers(i,[f],{type:"setField",data:s})}),r.notifyWatch(o)}),oe(this,"getFields",function(){var n=r.getFieldEntities(!0),i=n.map(function(o){var s=o.getNamePath(),u=o.getMeta(),c=de(de({},u),{},{name:s,value:r.getFieldValue(s)});return Object.defineProperty(c,"originRCField",{value:!0}),c});return i}),oe(this,"initEntityValue",function(n){var i=n.props.initialValue;if(i!==void 0){var o=n.getNamePath(),s=bo(r.store,o);s===void 0&&r.updateStore(Wi(r.store,o,i))}}),oe(this,"isMergedPreserve",function(n){var i=n!==void 0?n:r.preserve;return i??!0}),oe(this,"registerField",function(n){r.fieldEntities.push(n);var i=n.getNamePath();if(r.notifyWatch([i]),n.props.initialValue!==void 0){var o=r.store;r.resetWithFieldInitialValue({entities:[n],skipExist:!0}),r.notifyObservers(o,[n.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(s,u){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.fieldEntities=r.fieldEntities.filter(function(g){return g!==n}),!r.isMergedPreserve(u)&&(!s||c.length>1)){var f=s?void 0:r.getInitialValue(i);if(i.length&&r.getFieldValue(i)!==f&&r.fieldEntities.every(function(g){return!vA(g.getNamePath(),i)})){var p=r.store;r.updateStore(Wi(p,i,f,!0)),r.notifyObservers(p,[i],{type:"remove"}),r.triggerDependenciesUpdate(p,i)}}r.notifyWatch([i])}}),oe(this,"dispatch",function(n){switch(n.type){case"updateValue":{var i=n.namePath,o=n.value;r.updateValue(i,o);break}case"validateField":{var s=n.namePath,u=n.triggerName;r.validateFields([s],{triggerName:u});break}}}),oe(this,"notifyObservers",function(n,i,o){if(r.subscribable){var s=de(de({},o),{},{store:r.getFieldsValue(!0)});r.getFieldEntities().forEach(function(u){var c=u.onStoreChange;c(n,i,s)})}else r.forceRootUpdate()}),oe(this,"triggerDependenciesUpdate",function(n,i){var o=r.getDependencyChildrenFields(i);return o.length&&r.validateFields(o),r.notifyObservers(n,o,{type:"dependenciesUpdate",relatedFields:[i].concat(rt(o))}),o}),oe(this,"updateValue",function(n,i){var o=lr(n),s=r.store;r.updateStore(Wi(r.store,o,i)),r.notifyObservers(s,[o],{type:"valueUpdate",source:"internal"}),r.notifyWatch([o]);var u=r.triggerDependenciesUpdate(s,o),c=r.callbacks.onValuesChange;if(c){var f=RO(r.store,[o]);c(f,r.getFieldsValue())}r.triggerOnFieldsChange([o].concat(rt(u)))}),oe(this,"setFieldsValue",function(n){r.warningUnhooked();var i=r.store;if(n){var o=gl(r.store,n);r.updateStore(o)}r.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),r.notifyWatch()}),oe(this,"setFieldValue",function(n,i){r.setFields([{name:n,value:i}])}),oe(this,"getDependencyChildrenFields",function(n){var i=new Set,o=[],s=new nl;r.getFieldEntities().forEach(function(c){var f=c.props.dependencies;(f||[]).forEach(function(p){var g=lr(p);s.update(g,function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return h.add(c),h})})});var u=function c(f){var p=s.get(f)||new Set;p.forEach(function(g){if(!i.has(g)){i.add(g);var h=g.getNamePath();g.isFieldDirty()&&h.length&&(o.push(h),c(h))}})};return u(n),o}),oe(this,"triggerOnFieldsChange",function(n,i){var o=r.callbacks.onFieldsChange;if(o){var s=r.getFields();if(i){var u=new nl;i.forEach(function(f){var p=f.name,g=f.errors;u.set(p,g)}),s.forEach(function(f){f.errors=u.get(f.name)||f.errors})}var c=s.filter(function(f){var p=f.name;return wl(n,p)});c.length&&o(c,s)}}),oe(this,"validateFields",function(n,i){r.warningUnhooked();var o,s;Array.isArray(n)||typeof n=="string"||typeof i=="string"?(o=n,s=i):s=n;var u=!!o,c=u?o.map(lr):[],f=[],p=String(Date.now()),g=new Set,h=s||{},m=h.recursive,y=h.dirty;r.getFieldEntities(!0).forEach(function(C){if(u||c.push(C.getNamePath()),!(!C.props.rules||!C.props.rules.length)&&!(y&&!C.isFieldDirty())){var O=C.getNamePath();if(g.add(O.join(p)),!u||wl(c,O,m)){var R=C.validateRules(de({validateMessages:de(de({},gA),r.validateMessages)},s));f.push(R.then(function(){return{name:O,errors:[],warnings:[]}}).catch(function($){var T,P=[],L=[];return(T=$.forEach)===null||T===void 0||T.call($,function(z){var B=z.rule.warningOnly,X=z.errors;B?L.push.apply(L,rt(X)):P.push.apply(P,rt(X))}),P.length?Promise.reject({name:O,errors:P,warnings:L}):{name:O,errors:P,warnings:L}}))}}});var b=dG(f);r.lastValidatePromise=b,b.catch(function(C){return C}).then(function(C){var O=C.map(function(R){var $=R.name;return $});r.notifyObservers(r.store,O,{type:"validateFinish"}),r.triggerOnFieldsChange(O,C)});var S=b.then(function(){return r.lastValidatePromise===b?Promise.resolve(r.getFieldsValue(c)):Promise.reject([])}).catch(function(C){var O=C.filter(function(R){return R&&R.errors.length});return Promise.reject({values:r.getFieldsValue(c),errorFields:O,outOfDate:r.lastValidatePromise!==b})});S.catch(function(C){return C});var _=c.filter(function(C){return g.has(C.join(p))});return r.triggerOnFieldsChange(_),S}),oe(this,"submit",function(){r.warningUnhooked(),r.validateFields().then(function(n){var i=r.callbacks.onFinish;if(i)try{i(n)}catch(o){console.error(o)}}).catch(function(n){var i=r.callbacks.onFinishFailed;i&&i(n)})}),this.forceRootUpdate=t});function bA(e){var t=x.useRef(),r=x.useState({}),n=ke(r,2),i=n[1];if(!t.current)if(e)t.current=e;else{var o=function(){i({})},s=new hG(o);t.current=s.getForm()}return[t.current]}var Wy=x.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),gG=function(t){var r=t.validateMessages,n=t.onFormChange,i=t.onFormFinish,o=t.children,s=x.useContext(Wy),u=x.useRef({});return x.createElement(Wy.Provider,{value:de(de({},s),{},{validateMessages:de(de({},s.validateMessages),r),triggerFormChange:function(f,p){n&&n(f,{changedFields:p,forms:u.current}),s.triggerFormChange(f,p)},triggerFormFinish:function(f,p){i&&i(f,{values:p,forms:u.current}),s.triggerFormFinish(f,p)},registerForm:function(f,p){f&&(u.current=de(de({},u.current),{},oe({},f,p))),s.registerForm(f,p)},unregisterForm:function(f){var p=de({},u.current);delete p[f],u.current=p,s.unregisterForm(f)}})},o)},vG=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],mG=function(t,r){var n=t.name,i=t.initialValues,o=t.fields,s=t.form,u=t.preserve,c=t.children,f=t.component,p=f===void 0?"form":f,g=t.validateMessages,h=t.validateTrigger,m=h===void 0?"onChange":h,y=t.onValuesChange,b=t.onFieldsChange,S=t.onFinish,_=t.onFinishFailed,C=t.clearOnDestroy,O=Qn(t,vG),R=x.useRef(null),$=x.useContext(Wy),T=bA(s),P=ke(T,1),L=P[0],z=L.getInternalHooks(fs),B=z.useSubscribe,X=z.setInitialValues,Y=z.setCallbacks,N=z.setValidateMessages,j=z.setPreserve,F=z.destroyForm;x.useImperativeHandle(r,function(){return de(de({},L),{},{nativeElement:R.current})}),x.useEffect(function(){return $.registerForm(n,L),function(){$.unregisterForm(n)}},[$,L,n]),N(de(de({},$.validateMessages),g)),Y({onValuesChange:y,onFieldsChange:function(Z){if($.triggerFormChange(n,Z),b){for(var ne=arguments.length,W=new Array(ne>1?ne-1:0),ve=1;ve<ne;ve++)W[ve-1]=arguments[ve];b.apply(void 0,[Z].concat(W))}},onFinish:function(Z){$.triggerFormFinish(n,Z),S&&S(Z)},onFinishFailed:_}),j(u);var q=x.useRef(null);X(i,!q.current),q.current||(q.current=!0),x.useEffect(function(){return function(){return F(C)}},[]);var U,M=typeof c=="function";if(M){var G=L.getFieldsValue(!0);U=c(G,L)}else U=c;B(!M);var K=x.useRef();x.useEffect(function(){lG(K.current||[],o||[])||L.setFields(o||[]),K.current=o},[o,L]);var D=x.useMemo(function(){return de(de({},L),{},{validateTrigger:m})},[L,m]),A=x.createElement(Cp.Provider,{value:null},x.createElement(Vl.Provider,{value:D},U));return p===!1?A:x.createElement(p,fr({},O,{ref:R,onSubmit:function(Z){Z.preventDefault(),Z.stopPropagation(),L.submit()},onReset:function(Z){var ne;Z.preventDefault(),L.resetFields(),(ne=O.onReset)===null||ne===void 0||ne.call(O,Z)}}),A)};function TO(e){try{return JSON.stringify(e)}catch{return Math.random()}}function yG(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],i=t[1],o=i===void 0?{}:i,s=RW(o)?{form:o}:o,u=s.form,c=x.useState(),f=ke(c,2),p=f[0],g=f[1],h=x.useMemo(function(){return TO(p)},[p]),m=x.useRef(h);m.current=h;var y=x.useContext(Vl),b=u||y,S=b&&b._init,_=lr(n),C=x.useRef(_);return C.current=_,x.useEffect(function(){if(S){var O=b.getFieldsValue,R=b.getInternalHooks,$=R(fs),T=$.registerWatch,P=function(X,Y){var N=s.preserve?Y:X;return typeof n=="function"?n(N):bo(N,C.current)},L=T(function(B,X){var Y=P(B,X),N=TO(Y);m.current!==N&&(m.current=N,g(Y))}),z=P(O(),O(!0));return p!==z&&g(z),L}},[S]),p}var bG=x.forwardRef(mG),Nc=bG;Nc.FormProvider=gG;Nc.Field=mA;Nc.List=fG;Nc.useForm=bA;Nc.useWatch=yG;const Gy=x.createContext({}),SG=e=>{let{children:t,status:r,override:n}=e;const i=x.useContext(Gy),o=x.useMemo(()=>{const s=Object.assign({},i);return n&&delete s.isFormItemInput,r&&(delete s.status,delete s.hasFeedback,delete s.feedbackIcon),s},[r,n,i]);return x.createElement(Gy.Provider,{value:o},t)},wG=x.createContext(void 0),xG=e=>{const{space:t,form:r,children:n}=e;if(n==null)return null;let i=n;return r&&(i=te.createElement(SG,{override:!0,status:!0},i)),t&&(i=te.createElement(dW,null,i)),i};var EG=function(t){if(Tn()&&window.document.documentElement){var r=Array.isArray(t)?t:[t],n=window.document.documentElement;return r.some(function(i){return i in n.style})}return!1};function IO(e,t){return EG(e)}const CG=e=>({animationDuration:e,animationFillMode:"both"}),_G=e=>({animationDuration:e,animationFillMode:"both"}),RG=function(e,t,r,n){const o=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[`
1074
1074
  ${o}${e}-enter,
1075
1075
  ${o}${e}-appear
1076
1076
  `]:Object.assign(Object.assign({},CG(n)),{animationPlayState:"paused"}),[`${o}${e}-leave`]:Object.assign(Object.assign({},_G(n)),{animationPlayState:"paused"}),[`
@@ -1079,7 +1079,7 @@ html body {
1079
1079
  `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}},OG=new Ai("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),$G=new Ai("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),AO=new Ai("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),kO=new Ai("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),TG=new Ai("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),IG=new Ai("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),AG=new Ai("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),kG=new Ai("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),PG=new Ai("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),MG=new Ai("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),DG=new Ai("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),LG=new Ai("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),FG={zoom:{inKeyframes:OG,outKeyframes:$G},"zoom-big":{inKeyframes:AO,outKeyframes:kO},"zoom-big-fast":{inKeyframes:AO,outKeyframes:kO},"zoom-left":{inKeyframes:AG,outKeyframes:kG},"zoom-right":{inKeyframes:PG,outKeyframes:MG},"zoom-up":{inKeyframes:TG,outKeyframes:IG},"zoom-down":{inKeyframes:DG,outKeyframes:LG}},NG=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:i,outKeyframes:o}=FG[t];return[RG(n,i,o,e.motionDurationFast),{[`
1080
1080
  ${n}-enter,
1081
1081
  ${n}-appear
1082
- `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},jG=(function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e?.substr(0,4))});function zG(e){var t=e.prefixCls,r=e.align,n=e.arrow,i=e.arrowPos,o=n||{},s=o.className,u=o.content,c=i.x,f=c===void 0?0:c,p=i.y,g=p===void 0?0:p,h=x.useRef();if(!r||!r.points)return null;var m={position:"absolute"};if(r.autoArrow!==!1){var y=r.points[0],b=r.points[1],S=y[0],_=y[1],C=b[0],O=b[1];S===C||!["t","b"].includes(S)?m.top=g:S==="t"?m.top=0:m.bottom=0,_===O||!["l","r"].includes(_)?m.left=f:_==="l"?m.left=0:m.right=0}return x.createElement("div",{ref:h,className:St("".concat(t,"-arrow"),s),style:m},u)}function BG(e){var t=e.prefixCls,r=e.open,n=e.zIndex,i=e.mask,o=e.motion;return i?x.createElement(pb,fr({},o,{motionAppear:!0,visible:r,removeOnLeave:!0}),function(s){var u=s.className;return x.createElement("div",{style:{zIndex:n},className:St("".concat(t,"-mask"),u)})}):null}var VG=x.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),HG=x.forwardRef(function(e,t){var r=e.popup,n=e.className,i=e.prefixCls,o=e.style,s=e.target,u=e.onVisibleChanged,c=e.open,f=e.keepDom,p=e.fresh,g=e.onClick,h=e.mask,m=e.arrow,y=e.arrowPos,b=e.align,S=e.motion,_=e.maskMotion,C=e.forceRender,O=e.getPopupContainer,R=e.autoDestroy,$=e.portal,T=e.zIndex,P=e.onMouseEnter,L=e.onMouseLeave,z=e.onPointerEnter,B=e.onPointerDownCapture,X=e.ready,Y=e.offsetX,N=e.offsetY,j=e.offsetR,F=e.offsetB,q=e.onAlign,U=e.onPrepare,M=e.stretch,G=e.targetWidth,K=e.targetHeight,D=typeof r=="function"?r():r,A=c||f,J=O?.length>0,Z=x.useState(!O||!J),ne=ke(Z,2),W=ne[0],ve=ne[1];if(ar(function(){!W&&J&&s&&ve(!0)},[W,J,s]),!W)return null;var se="auto",Ee={left:"-1000vw",top:"-1000vh",right:se,bottom:se};if(X||!c){var we,Me=b.points,Oe=b.dynamicInset||((we=b._experimental)===null||we===void 0?void 0:we.dynamicInset),je=Oe&&Me[0][1]==="r",Ae=Oe&&Me[0][0]==="b";je?(Ee.right=j,Ee.left=se):(Ee.left=Y,Ee.right=se),Ae?(Ee.bottom=F,Ee.top=se):(Ee.top=N,Ee.bottom=se)}var $e={};return M&&(M.includes("height")&&K?$e.height=K:M.includes("minHeight")&&K&&($e.minHeight=K),M.includes("width")&&G?$e.width=G:M.includes("minWidth")&&G&&($e.minWidth=G)),c||($e.pointerEvents="none"),x.createElement($,{open:C||A,getContainer:O&&function(){return O(s)},autoDestroy:R},x.createElement(BG,{prefixCls:i,open:c,zIndex:T,mask:h,motion:_}),x.createElement(Mc,{onResize:q,disabled:!c},function(Ne){return x.createElement(pb,fr({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:C,leavedClassName:"".concat(i,"-hidden")},S,{onAppearPrepare:U,onEnterPrepare:U,visible:c,onVisibleChanged:function(Ke){var nt;S==null||(nt=S.onVisibleChanged)===null||nt===void 0||nt.call(S,Ke),u(Ke)}}),function(Ie,Ke){var nt=Ie.className,ze=Ie.style,Ue=St(i,nt,n);return x.createElement("div",{ref:Up(Ne,t,Ke),className:Ue,style:de(de(de(de({"--arrow-x":"".concat(y.x||0,"px"),"--arrow-y":"".concat(y.y||0,"px")},Ee),$e),ze),{},{boxSizing:"border-box",zIndex:T},o),onMouseEnter:P,onMouseLeave:L,onPointerEnter:z,onClick:g,onPointerDownCapture:B},m&&x.createElement(zG,{prefixCls:i,arrow:m,arrowPos:y,align:b}),x.createElement(VG,{cache:!c&&!p},D))})}))}),UG=x.forwardRef(function(e,t){var r=e.children,n=e.getTriggerDOMNode,i=Wp(r),o=x.useCallback(function(u){Z1(t,n?n(u):u)},[n]),s=eb(o,tb(r));return i?x.cloneElement(r,{ref:s}):r}),PO=x.createContext(null);function MO(e){return e?Array.isArray(e)?e:[e]:[]}function WG(e,t,r,n){return x.useMemo(function(){var i=MO(r??t),o=MO(n??t),s=new Set(i),u=new Set(o);return e&&(s.has("hover")&&(s.delete("hover"),s.add("click")),u.has("hover")&&(u.delete("hover"),u.add("click"))),[s,u]},[e,t,r,n])}function GG(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return r?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function qG(e,t,r,n){for(var i=r.points,o=Object.keys(e),s=0;s<o.length;s+=1){var u,c=o[s];if(GG((u=e[c])===null||u===void 0?void 0:u.points,i,n))return"".concat(t,"-placement-").concat(c)}return""}function DO(e,t,r,n){return t||(r?{motionName:"".concat(e,"-").concat(r)}:n?{motionName:n}:null)}function jc(e){return e.ownerDocument.defaultView}function qy(e){for(var t=[],r=e?.parentElement,n=["hidden","scroll","clip","auto"];r;){var i=jc(r).getComputedStyle(r),o=i.overflowX,s=i.overflowY,u=i.overflow;[o,s,u].some(function(c){return n.includes(c)})&&t.push(r),r=r.parentElement}return t}function Ec(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function Tu(e){return Ec(parseFloat(e),0)}function LO(e,t){var r=de({},e);return(t||[]).forEach(function(n){if(!(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)){var i=jc(n).getComputedStyle(n),o=i.overflow,s=i.overflowClipMargin,u=i.borderTopWidth,c=i.borderBottomWidth,f=i.borderLeftWidth,p=i.borderRightWidth,g=n.getBoundingClientRect(),h=n.offsetHeight,m=n.clientHeight,y=n.offsetWidth,b=n.clientWidth,S=Tu(u),_=Tu(c),C=Tu(f),O=Tu(p),R=Ec(Math.round(g.width/y*1e3)/1e3),$=Ec(Math.round(g.height/h*1e3)/1e3),T=(y-b-C-O)*R,P=(h-m-S-_)*$,L=S*$,z=_*$,B=C*R,X=O*R,Y=0,N=0;if(o==="clip"){var j=Tu(s);Y=j*R,N=j*$}var F=g.x+B-Y,q=g.y+L-N,U=F+g.width+2*Y-B-X-T,M=q+g.height+2*N-L-z-P;r.left=Math.max(r.left,F),r.top=Math.max(r.top,q),r.right=Math.min(r.right,U),r.bottom=Math.min(r.bottom,M)}}),r}function FO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r="".concat(t),n=r.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(r)}function NO(e,t){var r=t||[],n=ke(r,2),i=n[0],o=n[1];return[FO(e.width,i),FO(e.height,o)]}function jO(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function il(e,t){var r=t[0],n=t[1],i,o;return r==="t"?o=e.y:r==="b"?o=e.y+e.height:o=e.y+e.height/2,n==="l"?i=e.x:n==="r"?i=e.x+e.width:i=e.x+e.width/2,{x:i,y:o}}function Ca(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map(function(n,i){return i===t?r[n]||"c":n}).join("")}function XG(e,t,r,n,i,o,s){var u=x.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[n]||{}}),c=ke(u,2),f=c[0],p=c[1],g=x.useRef(0),h=x.useMemo(function(){return t?qy(t):[]},[t]),m=x.useRef({}),y=function(){m.current={}};e||y();var b=Gn(function(){if(t&&r&&e){let Gt=function(Er,kr){var nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ge,qr=A.x+Er,Do=A.y+kr,ao=qr+Ae,Le=Do+je,Ze=Math.max(qr,nn.left),$t=Math.max(Do,nn.top),Pt=Math.min(ao,nn.right),Tt=Math.min(Le,nn.bottom);return Math.max(0,(Pt-Ze)*(Tt-$t))},vr=function(){er=A.y+wt,Vr=er+je,kn=A.x+pt,Pe=kn+Ae};var Mo=Gt,li=vr,C,O,R,$,T=t,P=T.ownerDocument,L=jc(T),z=L.getComputedStyle(T),B=z.position,X=T.style.left,Y=T.style.top,N=T.style.right,j=T.style.bottom,F=T.style.overflow,q=de(de({},i[n]),o),U=P.createElement("div");(C=T.parentElement)===null||C===void 0||C.appendChild(U),U.style.left="".concat(T.offsetLeft,"px"),U.style.top="".concat(T.offsetTop,"px"),U.style.position=B,U.style.height="".concat(T.offsetHeight,"px"),U.style.width="".concat(T.offsetWidth,"px"),T.style.left="0",T.style.top="0",T.style.right="auto",T.style.bottom="auto",T.style.overflow="hidden";var M;if(Array.isArray(r))M={x:r[0],y:r[1],width:0,height:0};else{var G,K,D=r.getBoundingClientRect();D.x=(G=D.x)!==null&&G!==void 0?G:D.left,D.y=(K=D.y)!==null&&K!==void 0?K:D.top,M={x:D.x,y:D.y,width:D.width,height:D.height}}var A=T.getBoundingClientRect(),J=L.getComputedStyle(T),Z=J.height,ne=J.width;A.x=(O=A.x)!==null&&O!==void 0?O:A.left,A.y=(R=A.y)!==null&&R!==void 0?R:A.top;var W=P.documentElement,ve=W.clientWidth,se=W.clientHeight,Ee=W.scrollWidth,we=W.scrollHeight,Me=W.scrollTop,Oe=W.scrollLeft,je=A.height,Ae=A.width,$e=M.height,Ne=M.width,Ie={left:0,top:0,right:ve,bottom:se},Ke={left:-Oe,top:-Me,right:Ee-Oe,bottom:we-Me},nt=q.htmlRegion,ze="visible",Ue="visibleFirst";nt!=="scroll"&&nt!==Ue&&(nt=ze);var Qe=nt===Ue,Ve=LO(Ke,h),ye=LO(Ie,h),Ge=nt===ze?ye:Ve,ct=Qe?ye:Ge;T.style.left="auto",T.style.top="auto",T.style.right="0",T.style.bottom="0";var Lt=T.getBoundingClientRect();T.style.left=X,T.style.top=Y,T.style.right=N,T.style.bottom=j,T.style.overflow=F,($=T.parentElement)===null||$===void 0||$.removeChild(U);var ht=Ec(Math.round(Ae/parseFloat(ne)*1e3)/1e3),Kt=Ec(Math.round(je/parseFloat(Z)*1e3)/1e3);if(ht===0||Kt===0||pc(r)&&!uW(r))return;var Ft=q.offset,re=q.targetOffset,ie=NO(A,Ft),ue=ke(ie,2),V=ue[0],pe=ue[1],_e=NO(M,re),De=ke(_e,2),fe=De[0],he=De[1];M.x-=fe,M.y-=he;var me=q.points||[],Ce=ke(me,2),Te=Ce[0],Xe=Ce[1],it=jO(Xe),Je=jO(Te),ot=il(M,it),zr=il(A,Je),ft=de({},q),pt=ot.x-zr.x+V,wt=ot.y-zr.y+pe,mt=Gt(pt,wt),xt=Gt(pt,wt,ye),Bt=il(M,["t","l"]),Jt=il(A,["t","l"]),Tr=il(M,["b","r"]),Ir=il(A,["b","r"]),Br=q.overflow||{},hn=Br.adjustX,gn=Br.adjustY,An=Br.shiftX,Ar=Br.shiftY,ri=function(kr){return typeof kr=="boolean"?kr:kr>=0},er,Vr,kn,Pe;vr();var Co=ri(gn),Vt=Je[0]===it[0];if(Co&&Je[0]==="t"&&(Vr>ct.bottom||m.current.bt)){var ni=wt;Vt?ni-=je-$e:ni=Bt.y-Ir.y-pe;var _o=Gt(pt,ni),Nt=Gt(pt,ni,ye);_o>mt||_o===mt&&(!Qe||Nt>=xt)?(m.current.bt=!0,wt=ni,pe=-pe,ft.points=[Ca(Je,0),Ca(it,0)]):m.current.bt=!1}if(Co&&Je[0]==="b"&&(er<ct.top||m.current.tb)){var ii=wt;Vt?ii+=je-$e:ii=Tr.y-Jt.y-pe;var ki=Gt(pt,ii),Ro=Gt(pt,ii,ye);ki>mt||ki===mt&&(!Qe||Ro>=xt)?(m.current.tb=!0,wt=ii,pe=-pe,ft.points=[Ca(Je,0),Ca(it,0)]):m.current.tb=!1}var oi=ri(hn),Oo=Je[1]===it[1];if(oi&&Je[1]==="l"&&(Pe>ct.right||m.current.rl)){var Pn=pt;Oo?Pn-=Ae-Ne:Pn=Bt.x-Ir.x-V;var rn=Gt(Pn,wt),gr=Gt(Pn,wt,ye);rn>mt||rn===mt&&(!Qe||gr>=xt)?(m.current.rl=!0,pt=Pn,V=-V,ft.points=[Ca(Je,1),Ca(it,1)]):m.current.rl=!1}if(oi&&Je[1]==="r"&&(kn<ct.left||m.current.lr)){var ai=pt;Oo?ai+=Ae-Ne:ai=Tr.x-Jt.x-V;var dr=Gt(ai,wt),Pi=Gt(ai,wt,ye);dr>mt||dr===mt&&(!Qe||Pi>=xt)?(m.current.lr=!0,pt=ai,V=-V,ft.points=[Ca(Je,1),Ca(it,1)]):m.current.lr=!1}vr();var Hr=An===!0?0:An;typeof Hr=="number"&&(kn<ye.left&&(pt-=kn-ye.left-V,M.x+Ne<ye.left+Hr&&(pt+=M.x-ye.left+Ne-Hr)),Pe>ye.right&&(pt-=Pe-ye.right-V,M.x>ye.right-Hr&&(pt+=M.x-ye.right+Hr)));var Mn=Ar===!0?0:Ar;typeof Mn=="number"&&(er<ye.top&&(wt-=er-ye.top-pe,M.y+$e<ye.top+Mn&&(wt+=M.y-ye.top+$e-Mn)),Vr>ye.bottom&&(wt-=Vr-ye.bottom-pe,M.y>ye.bottom-Mn&&(wt+=M.y-ye.bottom+Mn)));var Ur=A.x+pt,Wr=Ur+Ae,vn=A.y+wt,Mi=vn+je,$o=M.x,To=$o+Ne,si=M.y,Io=si+$e,no=Math.max(Ur,$o),Dn=Math.min(Wr,To),sa=(no+Dn)/2,io=sa-Ur,yt=Math.max(vn,si),Ao=Math.min(Mi,Io),ko=(yt+Ao)/2,oo=ko-vn;s?.(t,ft);var Gr=Lt.right-A.x-(pt+A.width),Di=Lt.bottom-A.y-(wt+A.height);ht===1&&(pt=Math.round(pt),Gr=Math.round(Gr)),Kt===1&&(wt=Math.round(wt),Di=Math.round(Di));var Po={ready:!0,offsetX:pt/ht,offsetY:wt/Kt,offsetR:Gr/ht,offsetB:Di/Kt,arrowX:io/ht,arrowY:oo/Kt,scaleX:ht,scaleY:Kt,align:ft};p(Po)}}),S=function(){g.current+=1;var O=g.current;Promise.resolve().then(function(){g.current===O&&b()})},_=function(){p(function(O){return de(de({},O),{},{ready:!1})})};return ar(_,[n]),ar(function(){e||_()},[e]),[f.ready,f.offsetX,f.offsetY,f.offsetR,f.offsetB,f.arrowX,f.arrowY,f.scaleX,f.scaleY,f.align,S]}function KG(e,t,r,n,i){ar(function(){if(e&&t&&r){let h=function(){n(),i()};var g=h,o=t,s=r,u=qy(o),c=qy(s),f=jc(s),p=new Set([f].concat(rt(u),rt(c)));return p.forEach(function(m){m.addEventListener("scroll",h,{passive:!0})}),f.addEventListener("resize",h,{passive:!0}),n(),function(){p.forEach(function(m){m.removeEventListener("scroll",h),f.removeEventListener("resize",h)})}}},[e,t,r])}function YG(e,t,r,n,i,o,s,u){var c=x.useRef(e);c.current=e;var f=x.useRef(!1);x.useEffect(function(){if(t&&n&&(!i||o)){var g=function(){f.current=!1},h=function(S){var _;c.current&&!s(((_=S.composedPath)===null||_===void 0||(_=_.call(S))===null||_===void 0?void 0:_[0])||S.target)&&!f.current&&u(!1)},m=jc(n);m.addEventListener("pointerdown",g,!0),m.addEventListener("mousedown",h,!0),m.addEventListener("contextmenu",h,!0);var y=wp(r);return y&&(y.addEventListener("mousedown",h,!0),y.addEventListener("contextmenu",h,!0)),function(){m.removeEventListener("pointerdown",g,!0),m.removeEventListener("mousedown",h,!0),m.removeEventListener("contextmenu",h,!0),y&&(y.removeEventListener("mousedown",h,!0),y.removeEventListener("contextmenu",h,!0))}}},[t,r,n,i,o]);function p(){f.current=!0}return p}var QG=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function JG(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pA,t=x.forwardRef(function(r,n){var i=r.prefixCls,o=i===void 0?"rc-trigger-popup":i,s=r.children,u=r.action,c=u===void 0?"hover":u,f=r.showAction,p=r.hideAction,g=r.popupVisible,h=r.defaultPopupVisible,m=r.onPopupVisibleChange,y=r.afterPopupVisibleChange,b=r.mouseEnterDelay,S=r.mouseLeaveDelay,_=S===void 0?.1:S,C=r.focusDelay,O=r.blurDelay,R=r.mask,$=r.maskClosable,T=$===void 0?!0:$,P=r.getPopupContainer,L=r.forceRender,z=r.autoDestroy,B=r.destroyPopupOnHide,X=r.popup,Y=r.popupClassName,N=r.popupStyle,j=r.popupPlacement,F=r.builtinPlacements,q=F===void 0?{}:F,U=r.popupAlign,M=r.zIndex,G=r.stretch,K=r.getPopupClassNameFromAlign,D=r.fresh,A=r.alignPoint,J=r.onPopupClick,Z=r.onPopupAlign,ne=r.arrow,W=r.popupMotion,ve=r.maskMotion,se=r.popupTransitionName,Ee=r.popupAnimation,we=r.maskTransitionName,Me=r.maskAnimation,Oe=r.className,je=r.getTriggerDOMNode,Ae=Qn(r,QG),$e=z||B||!1,Ne=x.useState(!1),Ie=ke(Ne,2),Ke=Ie[0],nt=Ie[1];ar(function(){nt(jG())},[]);var ze=x.useRef({}),Ue=x.useContext(PO),Qe=x.useMemo(function(){return{registerSubPopup:function(Ze,$t){ze.current[Ze]=$t,Ue?.registerSubPopup(Ze,$t)}}},[Ue]),Ve=_W(),ye=x.useState(null),Ge=ke(ye,2),ct=Ge[0],Lt=Ge[1],ht=x.useRef(null),Kt=Gn(function(Le){ht.current=Le,pc(Le)&&ct!==Le&&Lt(Le),Ue?.registerSubPopup(Ve,Le)}),Ft=x.useState(null),re=ke(Ft,2),ie=re[0],ue=re[1],V=x.useRef(null),pe=Gn(function(Le){pc(Le)&&ie!==Le&&(ue(Le),V.current=Le)}),_e=x.Children.only(s),De=_e?.props||{},fe={},he=Gn(function(Le){var Ze,$t,Pt=ie;return Pt?.contains(Le)||((Ze=wp(Pt))===null||Ze===void 0?void 0:Ze.host)===Le||Le===Pt||ct?.contains(Le)||(($t=wp(ct))===null||$t===void 0?void 0:$t.host)===Le||Le===ct||Object.values(ze.current).some(function(Tt){return Tt?.contains(Le)||Le===Tt})}),me=DO(o,W,Ee,se),Ce=DO(o,ve,Me,we),Te=x.useState(h||!1),Xe=ke(Te,2),it=Xe[0],Je=Xe[1],ot=g??it,zr=Gn(function(Le){g===void 0&&Je(Le)});ar(function(){Je(g||!1)},[g]);var ft=x.useRef(ot);ft.current=ot;var pt=x.useRef([]);pt.current=[];var wt=Gn(function(Le){var Ze;zr(Le),((Ze=pt.current[pt.current.length-1])!==null&&Ze!==void 0?Ze:ot)!==Le&&(pt.current.push(Le),m?.(Le))}),mt=x.useRef(),xt=function(){clearTimeout(mt.current)},Bt=function(Ze){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;xt(),$t===0?wt(Ze):mt.current=setTimeout(function(){wt(Ze)},$t*1e3)};x.useEffect(function(){return xt},[]);var Jt=x.useState(!1),Tr=ke(Jt,2),Ir=Tr[0],Br=Tr[1];ar(function(Le){(!Le||ot)&&Br(!0)},[ot]);var hn=x.useState(null),gn=ke(hn,2),An=gn[0],Ar=gn[1],ri=x.useState(null),er=ke(ri,2),Vr=er[0],kn=er[1],Pe=function(Ze){kn([Ze.clientX,Ze.clientY])},Co=XG(ot,ct,A&&Vr!==null?Vr:ie,j,q,U,Z),Vt=ke(Co,11),ni=Vt[0],_o=Vt[1],Nt=Vt[2],ii=Vt[3],ki=Vt[4],Ro=Vt[5],oi=Vt[6],Oo=Vt[7],Pn=Vt[8],rn=Vt[9],gr=Vt[10],ai=WG(Ke,c,f,p),dr=ke(ai,2),Pi=dr[0],Hr=dr[1],Mn=Pi.has("click"),Ur=Hr.has("click")||Hr.has("contextMenu"),Wr=Gn(function(){Ir||gr()}),vn=function(){ft.current&&A&&Ur&&Bt(!1)};KG(ot,ie,ct,Wr,vn),ar(function(){Wr()},[Vr,j]),ar(function(){ot&&!(q!=null&&q[j])&&Wr()},[JSON.stringify(U)]);var Mi=x.useMemo(function(){var Le=qG(q,o,rn,A);return St(Le,K?.(rn))},[rn,K,q,o,A]);x.useImperativeHandle(n,function(){return{nativeElement:V.current,popupElement:ht.current,forceAlign:Wr}});var $o=x.useState(0),To=ke($o,2),si=To[0],Io=To[1],no=x.useState(0),Dn=ke(no,2),sa=Dn[0],io=Dn[1],yt=function(){if(G&&ie){var Ze=ie.getBoundingClientRect();Io(Ze.width),io(Ze.height)}},Ao=function(){yt(),Wr()},ko=function(Ze){Br(!1),gr(),y?.(Ze)},oo=function(){return new Promise(function(Ze){yt(),Ar(function(){return Ze})})};ar(function(){An&&(gr(),An(),Ar(null))},[An]);function Gr(Le,Ze,$t,Pt){fe[Le]=function(Tt){var Lo;Pt?.(Tt),Bt(Ze,$t);for(var Fo=arguments.length,la=new Array(Fo>1?Fo-1:0),Li=1;Li<Fo;Li++)la[Li-1]=arguments[Li];(Lo=De[Le])===null||Lo===void 0||Lo.call.apply(Lo,[De,Tt].concat(la))}}(Mn||Ur)&&(fe.onClick=function(Le){var Ze;ft.current&&Ur?Bt(!1):!ft.current&&Mn&&(Pe(Le),Bt(!0));for(var $t=arguments.length,Pt=new Array($t>1?$t-1:0),Tt=1;Tt<$t;Tt++)Pt[Tt-1]=arguments[Tt];(Ze=De.onClick)===null||Ze===void 0||Ze.call.apply(Ze,[De,Le].concat(Pt))});var Di=YG(ot,Ur,ie,ct,R,T,he,Bt),Po=Pi.has("hover"),Mo=Hr.has("hover"),li,Gt;Po&&(Gr("onMouseEnter",!0,b,function(Le){Pe(Le)}),Gr("onPointerEnter",!0,b,function(Le){Pe(Le)}),li=function(Ze){(ot||Ir)&&ct!==null&&ct!==void 0&&ct.contains(Ze.target)&&Bt(!0,b)},A&&(fe.onMouseMove=function(Le){var Ze;(Ze=De.onMouseMove)===null||Ze===void 0||Ze.call(De,Le)})),Mo&&(Gr("onMouseLeave",!1,_),Gr("onPointerLeave",!1,_),Gt=function(){Bt(!1,_)}),Pi.has("focus")&&Gr("onFocus",!0,C),Hr.has("focus")&&Gr("onBlur",!1,O),Pi.has("contextMenu")&&(fe.onContextMenu=function(Le){var Ze;ft.current&&Hr.has("contextMenu")?Bt(!1):(Pe(Le),Bt(!0)),Le.preventDefault();for(var $t=arguments.length,Pt=new Array($t>1?$t-1:0),Tt=1;Tt<$t;Tt++)Pt[Tt-1]=arguments[Tt];(Ze=De.onContextMenu)===null||Ze===void 0||Ze.call.apply(Ze,[De,Le].concat(Pt))}),Oe&&(fe.className=St(De.className,Oe));var vr=x.useRef(!1);vr.current||(vr.current=L||ot||Ir);var Er=de(de({},De),fe),kr={},nn=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];nn.forEach(function(Le){Ae[Le]&&(kr[Le]=function(){for(var Ze,$t=arguments.length,Pt=new Array($t),Tt=0;Tt<$t;Tt++)Pt[Tt]=arguments[Tt];(Ze=Er[Le])===null||Ze===void 0||Ze.call.apply(Ze,[Er].concat(Pt)),Ae[Le].apply(Ae,Pt)})});var qr=x.cloneElement(_e,de(de({},Er),kr)),Do={x:Ro,y:oi},ao=ne?de({},ne!==!0?ne:{}):null;return x.createElement(x.Fragment,null,x.createElement(Mc,{disabled:!ot,ref:pe,onResize:Ao},x.createElement(UG,{getTriggerDOMNode:je},qr)),vr.current&&x.createElement(PO.Provider,{value:Qe},x.createElement(HG,{portal:e,ref:Kt,prefixCls:o,popup:X,className:St(Y,Mi),style:N,target:ie,onMouseEnter:li,onMouseLeave:Gt,onPointerEnter:li,zIndex:M,open:ot,keepDom:Ir,fresh:D,onClick:J,onPointerDownCapture:Di,mask:R,motion:me,maskMotion:Ce,onVisibleChanged:ko,onPrepare:oo,forceRender:L,autoDestroy:$e,getPopupContainer:P,align:rn,arrow:ao,arrowPos:Do,ready:ni,offsetX:_o,offsetY:Nt,offsetR:ii,offsetB:ki,onAlign:Wr,stretch:G,targetWidth:si/Oo,targetHeight:sa/Pn})))});return t}const ZG=JG(pA);function eq(e,t,r){return St({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:r})}const tq=(e,t)=>t||e,rq=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var n,i;const{variant:o,[e]:s}=x.useContext(Oi),u=x.useContext(wG),c=s?.variant;let f;typeof t<"u"?f=t:r===!1?f="borderless":f=(i=(n=u??c)!==null&&n!==void 0?n:o)!==null&&i!==void 0?i:"outlined";const p=IH.includes(f);return[f,p]};var nq={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},iq=function(t,r){return x.createElement(aa,fr({},t,{ref:r,icon:nq}))},oq=x.forwardRef(iq);function SA(e){var t=e.children,r=e.prefixCls,n=e.id,i=e.overlayInnerStyle,o=e.className,s=e.style;return x.createElement("div",{className:St("".concat(r,"-content"),o),style:s},x.createElement("div",{className:"".concat(r,"-inner"),id:n,role:"tooltip",style:i},typeof t=="function"?t():t))}var ol={shiftX:64,adjustY:1},al={adjustX:1,shiftY:!0},mi=[0,0],aq={left:{points:["cr","cl"],overflow:al,offset:[-4,0],targetOffset:mi},right:{points:["cl","cr"],overflow:al,offset:[4,0],targetOffset:mi},top:{points:["bc","tc"],overflow:ol,offset:[0,-4],targetOffset:mi},bottom:{points:["tc","bc"],overflow:ol,offset:[0,4],targetOffset:mi},topLeft:{points:["bl","tl"],overflow:ol,offset:[0,-4],targetOffset:mi},leftTop:{points:["tr","tl"],overflow:al,offset:[-4,0],targetOffset:mi},topRight:{points:["br","tr"],overflow:ol,offset:[0,-4],targetOffset:mi},rightTop:{points:["tl","tr"],overflow:al,offset:[4,0],targetOffset:mi},bottomRight:{points:["tr","br"],overflow:ol,offset:[0,4],targetOffset:mi},rightBottom:{points:["bl","br"],overflow:al,offset:[4,0],targetOffset:mi},bottomLeft:{points:["tl","bl"],overflow:ol,offset:[0,4],targetOffset:mi},leftBottom:{points:["br","bl"],overflow:al,offset:[-4,0],targetOffset:mi}},sq=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],lq=function(t,r){var n=t.overlayClassName,i=t.trigger,o=i===void 0?["hover"]:i,s=t.mouseEnterDelay,u=s===void 0?0:s,c=t.mouseLeaveDelay,f=c===void 0?.1:c,p=t.overlayStyle,g=t.prefixCls,h=g===void 0?"rc-tooltip":g,m=t.children,y=t.onVisibleChange,b=t.afterVisibleChange,S=t.transitionName,_=t.animation,C=t.motion,O=t.placement,R=O===void 0?"right":O,$=t.align,T=$===void 0?{}:$,P=t.destroyTooltipOnHide,L=P===void 0?!1:P,z=t.defaultVisible,B=t.getTooltipContainer,X=t.overlayInnerStyle;t.arrowContent;var Y=t.overlay,N=t.id,j=t.showArrow,F=j===void 0?!0:j,q=Qn(t,sq),U=x.useRef(null);x.useImperativeHandle(r,function(){return U.current});var M=de({},q);"visible"in t&&(M.popupVisible=t.visible);var G=function(){return x.createElement(SA,{key:"content",prefixCls:h,id:N,overlayInnerStyle:X},Y)};return x.createElement(ZG,fr({popupClassName:n,prefixCls:h,popup:G,action:o,builtinPlacements:aq,popupPlacement:R,ref:U,popupAlign:T,getPopupContainer:B,onPopupVisibleChange:y,afterPopupVisibleChange:b,popupTransitionName:S,popupAnimation:_,popupMotion:C,defaultPopupVisible:z,autoDestroy:L,mouseLeaveDelay:f,popupStyle:p,mouseEnterDelay:u,arrow:F},M),m)};const uq=x.forwardRef(lq);function cq(e){const{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,i=t/2,o=0,s=i,u=n*1/Math.sqrt(2),c=i-n*(1-1/Math.sqrt(2)),f=i-r*(1/Math.sqrt(2)),p=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),g=2*i-f,h=p,m=2*i-u,y=c,b=2*i-o,S=s,_=i*Math.sqrt(2)+n*(Math.sqrt(2)-2),C=n*(Math.sqrt(2)-1),O=`polygon(${C}px 100%, 50% ${C}px, ${2*i-C}px 100%, ${C}px 100%)`,R=`path('M ${o} ${s} A ${n} ${n} 0 0 0 ${u} ${c} L ${f} ${p} A ${r} ${r} 0 0 1 ${g} ${h} L ${m} ${y} A ${n} ${n} 0 0 0 ${b} ${S} Z')`;return{arrowShadowWidth:_,arrowPath:R,arrowPolygon:O}}const fq=(e,t,r)=>{const{sizePopupArrow:n,arrowPolygon:i,arrowPath:o,arrowShadowWidth:s,borderRadiusXS:u,calc:c}=e;return{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:c(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${Mt(u)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"}}},wA=8;function xA(e){const{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?wA:n}}function xd(e,t){return e?t:{}}function dq(e,t,r){const{componentCls:n,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:s}=e,{arrowDistance:u=0,arrowPlacement:c={left:!0,right:!0,top:!0,bottom:!0}}={};return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({[`${n}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},fq(e,t,i)),{"&:before":{background:t}})]},xd(!!c.top,{[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:u,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":s,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${Mt(s)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),xd(!!c.bottom,{[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:u,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":s,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${Mt(s)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),xd(!!c.left,{[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:u},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${n}-arrow`]:{top:o},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:o}})),xd(!!c.right,{[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:u},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${n}-arrow`]:{top:o},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:o}}))}}function pq(e,t,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};const i=n&&typeof n=="object"?n:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.arrowOffsetHorizontal*2+r,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=t.arrowOffsetVertical*2+r,o.shiftX=!0,o.adjustX=!0;break}const s=Object.assign(Object.assign({},o),i);return s.shiftX||(s.adjustX=!0),s.shiftY||(s.adjustY=!0),s}const zO={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},hq={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},gq=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function vq(e){const{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:i,borderRadius:o}=e,s=t/2,u={};return Object.keys(zO).forEach(c=>{const f=n&&hq[c]||zO[c],p=Object.assign(Object.assign({},f),{offset:[0,0],dynamicInset:!0});switch(u[c]=p,gq.has(c)&&(p.autoArrow=!1),c){case"top":case"topLeft":case"topRight":p.offset[1]=-s-i;break;case"bottom":case"bottomLeft":case"bottomRight":p.offset[1]=s+i;break;case"left":case"leftTop":case"leftBottom":p.offset[0]=-s-i;break;case"right":case"rightTop":case"rightBottom":p.offset[0]=s+i;break}const g=xA({contentRadius:o,limitVerticalRadius:!0});if(n)switch(c){case"topLeft":case"bottomLeft":p.offset[0]=-g.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":p.offset[0]=g.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":p.offset[1]=-g.arrowOffsetHorizontal-s;break;case"leftBottom":case"rightBottom":p.offset[1]=g.arrowOffsetHorizontal+s;break}p.overflow=pq(c,g,t,r),p.htmlRegion="visibleFirst"}),u}const mq=e=>{const{componentCls:t,tooltipMaxWidth:r,tooltipColor:n,tooltipBg:i,tooltipBorderRadius:o,zIndexPopup:s,controlHeight:u,boxShadowSecondary:c,paddingSM:f,paddingXS:p}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},cb(e)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${t}-inner`]:{minWidth:"1em",minHeight:u,padding:`${Mt(e.calc(f).div(2).equal())} ${Mt(p)}`,color:n,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:o,boxShadow:c,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:e.min(o,wA)}},[`${t}-content`]:{position:"relative"}}),iU(e,(g,h)=>{let{darkColor:m}=h;return{[`&${t}-${g}`]:{[`${t}-inner`]:{backgroundColor:m},[`${t}-arrow`]:{"--antd-arrow-background-color":m}}}})),{"&-rtl":{direction:"rtl"}})},dq(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},yq=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},xA({contentRadius:e.borderRadius,limitVerticalRadius:!0})),cq($s(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),EA=(function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return fb("Tooltip",n=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:s}=n,u=$s(n,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:s});return[mq(u),NG(n,"zoom-big-fast")]},yq,{resetStyle:!1,injectStyle:t})(e)}),bq=Sp.map(e=>`${e}-inverse`);function Sq(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat(rt(bq),rt(Sp)).includes(e):Sp.includes(e)}function CA(e,t){const r=Sq(t),n=St({[`${e}-${t}`]:t&&r}),i={},o={};return t&&!r&&(i.background=t,o["--antd-arrow-background-color"]=t),{className:n,overlayStyle:i,arrowStyle:o}}const wq=e=>{const{prefixCls:t,className:r,placement:n="top",title:i,color:o,overlayInnerStyle:s}=e,{getPrefixCls:u}=x.useContext(Oi),c=u("tooltip",t),[f,p,g]=EA(c),h=CA(c,o),m=h.arrowStyle,y=Object.assign(Object.assign({},s),h.overlayStyle),b=St(p,g,c,`${c}-pure`,`${c}-placement-${n}`,r,h.className);return f(x.createElement("div",{className:b,style:m},x.createElement("div",{className:`${c}-arrow`}),x.createElement(SA,Object.assign({},e,{className:p,prefixCls:c,overlayInnerStyle:y}),i)))};var xq=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const Eq=x.forwardRef((e,t)=>{var r,n;const{prefixCls:i,openClassName:o,getTooltipContainer:s,overlayClassName:u,color:c,overlayInnerStyle:f,children:p,afterOpenChange:g,afterVisibleChange:h,destroyTooltipOnHide:m,arrow:y=!0,title:b,overlay:S,builtinPlacements:_,arrowPointAtCenter:C=!1,autoAdjustOverflow:O=!0}=e,R=!!y,[,$]=ql(),{getPopupContainer:T,getPrefixCls:P,direction:L}=x.useContext(Oi),z=TI(),B=x.useRef(null),X=()=>{var Ve;(Ve=B.current)===null||Ve===void 0||Ve.forceAlign()};x.useImperativeHandle(t,()=>{var Ve;return{forceAlign:X,forcePopupAlign:()=>{z.deprecated(!1,"forcePopupAlign","forceAlign"),X()},nativeElement:(Ve=B.current)===null||Ve===void 0?void 0:Ve.nativeElement}});const[Y,N]=xc(!1,{value:(r=e.open)!==null&&r!==void 0?r:e.visible,defaultValue:(n=e.defaultOpen)!==null&&n!==void 0?n:e.defaultVisible}),j=!b&&!S&&b!==0,F=Ve=>{var ye,Ge;N(j?!1:Ve),j||((ye=e.onOpenChange)===null||ye===void 0||ye.call(e,Ve),(Ge=e.onVisibleChange)===null||Ge===void 0||Ge.call(e,Ve))},q=x.useMemo(()=>{var Ve,ye;let Ge=C;return typeof y=="object"&&(Ge=(ye=(Ve=y.pointAtCenter)!==null&&Ve!==void 0?Ve:y.arrowPointAtCenter)!==null&&ye!==void 0?ye:C),_||vq({arrowPointAtCenter:Ge,autoAdjustOverflow:O,arrowWidth:R?$.sizePopupArrow:0,borderRadius:$.borderRadius,offset:$.marginXXS})},[C,y,_,$]),U=x.useMemo(()=>b===0?b:S||b||"",[S,b]),M=x.createElement(xG,{space:!0},typeof U=="function"?U():U),{getPopupContainer:G,placement:K="top",mouseEnterDelay:D=.1,mouseLeaveDelay:A=.1,overlayStyle:J,rootClassName:Z}=e,ne=xq(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),W=P("tooltip",i),ve=P(),se=e["data-popover-inject"];let Ee=Y;!("open"in e)&&!("visible"in e)&&j&&(Ee=!1);const we=x.isValidElement(p)&&!QU(p)?p:x.createElement("span",null,p),Me=we.props,Oe=!Me.className||typeof Me.className=="string"?St(Me.className,o||`${W}-open`):Me.className,[je,Ae,$e]=EA(W,!se),Ne=CA(W,c),Ie=Ne.arrowStyle,Ke=Object.assign(Object.assign({},f),Ne.overlayStyle),nt=St(u,{[`${W}-rtl`]:L==="rtl"},Ne.className,Z,Ae,$e),[ze,Ue]=oW("Tooltip",ne.zIndex),Qe=x.createElement(uq,Object.assign({},ne,{zIndex:ze,showArrow:R,placement:K,mouseEnterDelay:D,mouseLeaveDelay:A,prefixCls:W,overlayClassName:nt,overlayStyle:Object.assign(Object.assign({},Ie),J),getTooltipContainer:G||s||T,ref:B,builtinPlacements:q,overlay:M,visible:Ee,onVisibleChange:F,afterVisibleChange:g??h,overlayInnerStyle:Ke,arrowContent:x.createElement("span",{className:`${W}-arrow-content`}),motion:{motionName:lW(ve,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!m}),Ee?sA(we,{className:Oe}):we);return je(x.createElement(lA.Provider,{value:Ue},Qe))}),Qp=Eq;Qp._InternalPanelDoNotUseOrYouWillBeFired=wq;function Cq(e){return $s(e,{inputAffixPadding:e.paddingXXS})}const _q=e=>{const{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:i,controlHeightSM:o,controlHeightLG:s,fontSizeLG:u,lineHeightLG:c,paddingSM:f,controlPaddingHorizontalSM:p,controlPaddingHorizontal:g,colorFillAlter:h,colorPrimaryHover:m,colorPrimary:y,controlOutlineWidth:b,controlOutline:S,colorErrorOutline:_,colorWarningOutline:C,colorBgContainer:O}=e;return{paddingBlock:Math.max(Math.round((t-r*n)/2*10)/10-i,0),paddingBlockSM:Math.max(Math.round((o-r*n)/2*10)/10-i,0),paddingBlockLG:Math.ceil((s-u*c)/2*10)/10-i,paddingInline:f-i,paddingInlineSM:p-i,paddingInlineLG:g-i,addonBg:h,activeBorderColor:y,hoverBorderColor:m,activeShadow:`0 0 0 ${b}px ${S}`,errorActiveShadow:`0 0 0 ${b}px ${_}`,warningActiveShadow:`0 0 0 ${b}px ${C}`,hoverBg:O,activeBg:O,inputFontSize:r,inputFontSizeLG:u,inputFontSizeSM:r}},Rq=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),vb=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},Rq($s(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),_A=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),BO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},_A(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),Oq=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},_A(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},vb(e))}),BO(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),BO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),VO=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),$q=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},VO(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),VO(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},vb(e))}})}),Tq=(e,t)=>{const{componentCls:r}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled},[`&${r}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${r}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},RA=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:t?.inputColor},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),HO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},RA(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),Iq=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},RA(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},vb(e))}),HO(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),HO(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),UO=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),Aq=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary},[`${e.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}}}},UO(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),UO(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),kq=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),OA=e=>{const{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:i}=e;return{padding:`${Mt(t)} ${Mt(i)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},$A=e=>({padding:`${Mt(e.paddingBlockSM)} ${Mt(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),TA=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${Mt(e.paddingBlock)} ${Mt(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},kq(e.colorTextPlaceholder)),{"textarea&":{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},OA(e)),"&-sm":Object.assign({},$A(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),Pq=e=>{const{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},OA(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},$A(e)),[`&-lg ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${Mt(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${Mt(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${Mt(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{[`${r}-select-selector`]:{backgroundColor:"inherit",border:`${Mt(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${r}-select-selector`]:{color:e.colorPrimary}}},[`${r}-cascader-picker`]:{margin:`-9px ${Mt(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[`${t}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},tU()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
1082
+ `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},jG=(function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e?.substr(0,4))});function zG(e){var t=e.prefixCls,r=e.align,n=e.arrow,i=e.arrowPos,o=n||{},s=o.className,u=o.content,c=i.x,f=c===void 0?0:c,p=i.y,g=p===void 0?0:p,h=x.useRef();if(!r||!r.points)return null;var m={position:"absolute"};if(r.autoArrow!==!1){var y=r.points[0],b=r.points[1],S=y[0],_=y[1],C=b[0],O=b[1];S===C||!["t","b"].includes(S)?m.top=g:S==="t"?m.top=0:m.bottom=0,_===O||!["l","r"].includes(_)?m.left=f:_==="l"?m.left=0:m.right=0}return x.createElement("div",{ref:h,className:St("".concat(t,"-arrow"),s),style:m},u)}function BG(e){var t=e.prefixCls,r=e.open,n=e.zIndex,i=e.mask,o=e.motion;return i?x.createElement(pb,fr({},o,{motionAppear:!0,visible:r,removeOnLeave:!0}),function(s){var u=s.className;return x.createElement("div",{style:{zIndex:n},className:St("".concat(t,"-mask"),u)})}):null}var VG=x.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),HG=x.forwardRef(function(e,t){var r=e.popup,n=e.className,i=e.prefixCls,o=e.style,s=e.target,u=e.onVisibleChanged,c=e.open,f=e.keepDom,p=e.fresh,g=e.onClick,h=e.mask,m=e.arrow,y=e.arrowPos,b=e.align,S=e.motion,_=e.maskMotion,C=e.forceRender,O=e.getPopupContainer,R=e.autoDestroy,$=e.portal,T=e.zIndex,P=e.onMouseEnter,L=e.onMouseLeave,z=e.onPointerEnter,B=e.onPointerDownCapture,X=e.ready,Y=e.offsetX,N=e.offsetY,j=e.offsetR,F=e.offsetB,q=e.onAlign,U=e.onPrepare,M=e.stretch,G=e.targetWidth,K=e.targetHeight,D=typeof r=="function"?r():r,A=c||f,J=O?.length>0,Z=x.useState(!O||!J),ne=ke(Z,2),W=ne[0],ve=ne[1];if(ar(function(){!W&&J&&s&&ve(!0)},[W,J,s]),!W)return null;var se="auto",Ee={left:"-1000vw",top:"-1000vh",right:se,bottom:se};if(X||!c){var we,Me=b.points,Oe=b.dynamicInset||((we=b._experimental)===null||we===void 0?void 0:we.dynamicInset),je=Oe&&Me[0][1]==="r",Ae=Oe&&Me[0][0]==="b";je?(Ee.right=j,Ee.left=se):(Ee.left=Y,Ee.right=se),Ae?(Ee.bottom=F,Ee.top=se):(Ee.top=N,Ee.bottom=se)}var $e={};return M&&(M.includes("height")&&K?$e.height=K:M.includes("minHeight")&&K&&($e.minHeight=K),M.includes("width")&&G?$e.width=G:M.includes("minWidth")&&G&&($e.minWidth=G)),c||($e.pointerEvents="none"),x.createElement($,{open:C||A,getContainer:O&&function(){return O(s)},autoDestroy:R},x.createElement(BG,{prefixCls:i,open:c,zIndex:T,mask:h,motion:_}),x.createElement(Mc,{onResize:q,disabled:!c},function(Ne){return x.createElement(pb,fr({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:C,leavedClassName:"".concat(i,"-hidden")},S,{onAppearPrepare:U,onEnterPrepare:U,visible:c,onVisibleChanged:function(Ke){var nt;S==null||(nt=S.onVisibleChanged)===null||nt===void 0||nt.call(S,Ke),u(Ke)}}),function(Ie,Ke){var nt=Ie.className,ze=Ie.style,Ue=St(i,nt,n);return x.createElement("div",{ref:Up(Ne,t,Ke),className:Ue,style:de(de(de(de({"--arrow-x":"".concat(y.x||0,"px"),"--arrow-y":"".concat(y.y||0,"px")},Ee),$e),ze),{},{boxSizing:"border-box",zIndex:T},o),onMouseEnter:P,onMouseLeave:L,onPointerEnter:z,onClick:g,onPointerDownCapture:B},m&&x.createElement(zG,{prefixCls:i,arrow:m,arrowPos:y,align:b}),x.createElement(VG,{cache:!c&&!p},D))})}))}),UG=x.forwardRef(function(e,t){var r=e.children,n=e.getTriggerDOMNode,i=Wp(r),o=x.useCallback(function(u){Z1(t,n?n(u):u)},[n]),s=eb(o,tb(r));return i?x.cloneElement(r,{ref:s}):r}),PO=x.createContext(null);function MO(e){return e?Array.isArray(e)?e:[e]:[]}function WG(e,t,r,n){return x.useMemo(function(){var i=MO(r??t),o=MO(n??t),s=new Set(i),u=new Set(o);return e&&(s.has("hover")&&(s.delete("hover"),s.add("click")),u.has("hover")&&(u.delete("hover"),u.add("click"))),[s,u]},[e,t,r,n])}function GG(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return r?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function qG(e,t,r,n){for(var i=r.points,o=Object.keys(e),s=0;s<o.length;s+=1){var u,c=o[s];if(GG((u=e[c])===null||u===void 0?void 0:u.points,i,n))return"".concat(t,"-placement-").concat(c)}return""}function DO(e,t,r,n){return t||(r?{motionName:"".concat(e,"-").concat(r)}:n?{motionName:n}:null)}function jc(e){return e.ownerDocument.defaultView}function qy(e){for(var t=[],r=e?.parentElement,n=["hidden","scroll","clip","auto"];r;){var i=jc(r).getComputedStyle(r),o=i.overflowX,s=i.overflowY,u=i.overflow;[o,s,u].some(function(c){return n.includes(c)})&&t.push(r),r=r.parentElement}return t}function Ec(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function Tu(e){return Ec(parseFloat(e),0)}function LO(e,t){var r=de({},e);return(t||[]).forEach(function(n){if(!(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)){var i=jc(n).getComputedStyle(n),o=i.overflow,s=i.overflowClipMargin,u=i.borderTopWidth,c=i.borderBottomWidth,f=i.borderLeftWidth,p=i.borderRightWidth,g=n.getBoundingClientRect(),h=n.offsetHeight,m=n.clientHeight,y=n.offsetWidth,b=n.clientWidth,S=Tu(u),_=Tu(c),C=Tu(f),O=Tu(p),R=Ec(Math.round(g.width/y*1e3)/1e3),$=Ec(Math.round(g.height/h*1e3)/1e3),T=(y-b-C-O)*R,P=(h-m-S-_)*$,L=S*$,z=_*$,B=C*R,X=O*R,Y=0,N=0;if(o==="clip"){var j=Tu(s);Y=j*R,N=j*$}var F=g.x+B-Y,q=g.y+L-N,U=F+g.width+2*Y-B-X-T,M=q+g.height+2*N-L-z-P;r.left=Math.max(r.left,F),r.top=Math.max(r.top,q),r.right=Math.min(r.right,U),r.bottom=Math.min(r.bottom,M)}}),r}function FO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r="".concat(t),n=r.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(r)}function NO(e,t){var r=t||[],n=ke(r,2),i=n[0],o=n[1];return[FO(e.width,i),FO(e.height,o)]}function jO(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function il(e,t){var r=t[0],n=t[1],i,o;return r==="t"?o=e.y:r==="b"?o=e.y+e.height:o=e.y+e.height/2,n==="l"?i=e.x:n==="r"?i=e.x+e.width:i=e.x+e.width/2,{x:i,y:o}}function Ca(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map(function(n,i){return i===t?r[n]||"c":n}).join("")}function XG(e,t,r,n,i,o,s){var u=x.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[n]||{}}),c=ke(u,2),f=c[0],p=c[1],g=x.useRef(0),h=x.useMemo(function(){return t?qy(t):[]},[t]),m=x.useRef({}),y=function(){m.current={}};e||y();var b=Gn(function(){if(t&&r&&e){let Gt=function(Cr,kr){var nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ge,qr=A.x+Cr,Do=A.y+kr,ao=qr+Ae,Le=Do+je,Ze=Math.max(qr,nn.left),$t=Math.max(Do,nn.top),Pt=Math.min(ao,nn.right),Tt=Math.min(Le,nn.bottom);return Math.max(0,(Pt-Ze)*(Tt-$t))},vr=function(){er=A.y+wt,Vr=er+je,kn=A.x+pt,Pe=kn+Ae};var Mo=Gt,li=vr,C,O,R,$,T=t,P=T.ownerDocument,L=jc(T),z=L.getComputedStyle(T),B=z.position,X=T.style.left,Y=T.style.top,N=T.style.right,j=T.style.bottom,F=T.style.overflow,q=de(de({},i[n]),o),U=P.createElement("div");(C=T.parentElement)===null||C===void 0||C.appendChild(U),U.style.left="".concat(T.offsetLeft,"px"),U.style.top="".concat(T.offsetTop,"px"),U.style.position=B,U.style.height="".concat(T.offsetHeight,"px"),U.style.width="".concat(T.offsetWidth,"px"),T.style.left="0",T.style.top="0",T.style.right="auto",T.style.bottom="auto",T.style.overflow="hidden";var M;if(Array.isArray(r))M={x:r[0],y:r[1],width:0,height:0};else{var G,K,D=r.getBoundingClientRect();D.x=(G=D.x)!==null&&G!==void 0?G:D.left,D.y=(K=D.y)!==null&&K!==void 0?K:D.top,M={x:D.x,y:D.y,width:D.width,height:D.height}}var A=T.getBoundingClientRect(),J=L.getComputedStyle(T),Z=J.height,ne=J.width;A.x=(O=A.x)!==null&&O!==void 0?O:A.left,A.y=(R=A.y)!==null&&R!==void 0?R:A.top;var W=P.documentElement,ve=W.clientWidth,se=W.clientHeight,Ee=W.scrollWidth,we=W.scrollHeight,Me=W.scrollTop,Oe=W.scrollLeft,je=A.height,Ae=A.width,$e=M.height,Ne=M.width,Ie={left:0,top:0,right:ve,bottom:se},Ke={left:-Oe,top:-Me,right:Ee-Oe,bottom:we-Me},nt=q.htmlRegion,ze="visible",Ue="visibleFirst";nt!=="scroll"&&nt!==Ue&&(nt=ze);var Qe=nt===Ue,Ve=LO(Ke,h),ye=LO(Ie,h),Ge=nt===ze?ye:Ve,ct=Qe?ye:Ge;T.style.left="auto",T.style.top="auto",T.style.right="0",T.style.bottom="0";var Lt=T.getBoundingClientRect();T.style.left=X,T.style.top=Y,T.style.right=N,T.style.bottom=j,T.style.overflow=F,($=T.parentElement)===null||$===void 0||$.removeChild(U);var ht=Ec(Math.round(Ae/parseFloat(ne)*1e3)/1e3),Kt=Ec(Math.round(je/parseFloat(Z)*1e3)/1e3);if(ht===0||Kt===0||pc(r)&&!uW(r))return;var Ft=q.offset,re=q.targetOffset,ie=NO(A,Ft),ue=ke(ie,2),V=ue[0],pe=ue[1],_e=NO(M,re),De=ke(_e,2),fe=De[0],he=De[1];M.x-=fe,M.y-=he;var me=q.points||[],Ce=ke(me,2),Te=Ce[0],Xe=Ce[1],it=jO(Xe),Je=jO(Te),ot=il(M,it),zr=il(A,Je),ft=de({},q),pt=ot.x-zr.x+V,wt=ot.y-zr.y+pe,mt=Gt(pt,wt),xt=Gt(pt,wt,ye),Bt=il(M,["t","l"]),Jt=il(A,["t","l"]),Tr=il(M,["b","r"]),Ir=il(A,["b","r"]),Br=q.overflow||{},hn=Br.adjustX,gn=Br.adjustY,An=Br.shiftX,Ar=Br.shiftY,ri=function(kr){return typeof kr=="boolean"?kr:kr>=0},er,Vr,kn,Pe;vr();var Co=ri(gn),Vt=Je[0]===it[0];if(Co&&Je[0]==="t"&&(Vr>ct.bottom||m.current.bt)){var ni=wt;Vt?ni-=je-$e:ni=Bt.y-Ir.y-pe;var _o=Gt(pt,ni),Nt=Gt(pt,ni,ye);_o>mt||_o===mt&&(!Qe||Nt>=xt)?(m.current.bt=!0,wt=ni,pe=-pe,ft.points=[Ca(Je,0),Ca(it,0)]):m.current.bt=!1}if(Co&&Je[0]==="b"&&(er<ct.top||m.current.tb)){var ii=wt;Vt?ii+=je-$e:ii=Tr.y-Jt.y-pe;var ki=Gt(pt,ii),Ro=Gt(pt,ii,ye);ki>mt||ki===mt&&(!Qe||Ro>=xt)?(m.current.tb=!0,wt=ii,pe=-pe,ft.points=[Ca(Je,0),Ca(it,0)]):m.current.tb=!1}var oi=ri(hn),Oo=Je[1]===it[1];if(oi&&Je[1]==="l"&&(Pe>ct.right||m.current.rl)){var Pn=pt;Oo?Pn-=Ae-Ne:Pn=Bt.x-Ir.x-V;var rn=Gt(Pn,wt),gr=Gt(Pn,wt,ye);rn>mt||rn===mt&&(!Qe||gr>=xt)?(m.current.rl=!0,pt=Pn,V=-V,ft.points=[Ca(Je,1),Ca(it,1)]):m.current.rl=!1}if(oi&&Je[1]==="r"&&(kn<ct.left||m.current.lr)){var ai=pt;Oo?ai+=Ae-Ne:ai=Tr.x-Jt.x-V;var dr=Gt(ai,wt),Pi=Gt(ai,wt,ye);dr>mt||dr===mt&&(!Qe||Pi>=xt)?(m.current.lr=!0,pt=ai,V=-V,ft.points=[Ca(Je,1),Ca(it,1)]):m.current.lr=!1}vr();var Hr=An===!0?0:An;typeof Hr=="number"&&(kn<ye.left&&(pt-=kn-ye.left-V,M.x+Ne<ye.left+Hr&&(pt+=M.x-ye.left+Ne-Hr)),Pe>ye.right&&(pt-=Pe-ye.right-V,M.x>ye.right-Hr&&(pt+=M.x-ye.right+Hr)));var Mn=Ar===!0?0:Ar;typeof Mn=="number"&&(er<ye.top&&(wt-=er-ye.top-pe,M.y+$e<ye.top+Mn&&(wt+=M.y-ye.top+$e-Mn)),Vr>ye.bottom&&(wt-=Vr-ye.bottom-pe,M.y>ye.bottom-Mn&&(wt+=M.y-ye.bottom+Mn)));var Ur=A.x+pt,Wr=Ur+Ae,vn=A.y+wt,Mi=vn+je,$o=M.x,To=$o+Ne,si=M.y,Io=si+$e,no=Math.max(Ur,$o),Dn=Math.min(Wr,To),sa=(no+Dn)/2,io=sa-Ur,yt=Math.max(vn,si),Ao=Math.min(Mi,Io),ko=(yt+Ao)/2,oo=ko-vn;s?.(t,ft);var Gr=Lt.right-A.x-(pt+A.width),Di=Lt.bottom-A.y-(wt+A.height);ht===1&&(pt=Math.round(pt),Gr=Math.round(Gr)),Kt===1&&(wt=Math.round(wt),Di=Math.round(Di));var Po={ready:!0,offsetX:pt/ht,offsetY:wt/Kt,offsetR:Gr/ht,offsetB:Di/Kt,arrowX:io/ht,arrowY:oo/Kt,scaleX:ht,scaleY:Kt,align:ft};p(Po)}}),S=function(){g.current+=1;var O=g.current;Promise.resolve().then(function(){g.current===O&&b()})},_=function(){p(function(O){return de(de({},O),{},{ready:!1})})};return ar(_,[n]),ar(function(){e||_()},[e]),[f.ready,f.offsetX,f.offsetY,f.offsetR,f.offsetB,f.arrowX,f.arrowY,f.scaleX,f.scaleY,f.align,S]}function KG(e,t,r,n,i){ar(function(){if(e&&t&&r){let h=function(){n(),i()};var g=h,o=t,s=r,u=qy(o),c=qy(s),f=jc(s),p=new Set([f].concat(rt(u),rt(c)));return p.forEach(function(m){m.addEventListener("scroll",h,{passive:!0})}),f.addEventListener("resize",h,{passive:!0}),n(),function(){p.forEach(function(m){m.removeEventListener("scroll",h),f.removeEventListener("resize",h)})}}},[e,t,r])}function YG(e,t,r,n,i,o,s,u){var c=x.useRef(e);c.current=e;var f=x.useRef(!1);x.useEffect(function(){if(t&&n&&(!i||o)){var g=function(){f.current=!1},h=function(S){var _;c.current&&!s(((_=S.composedPath)===null||_===void 0||(_=_.call(S))===null||_===void 0?void 0:_[0])||S.target)&&!f.current&&u(!1)},m=jc(n);m.addEventListener("pointerdown",g,!0),m.addEventListener("mousedown",h,!0),m.addEventListener("contextmenu",h,!0);var y=wp(r);return y&&(y.addEventListener("mousedown",h,!0),y.addEventListener("contextmenu",h,!0)),function(){m.removeEventListener("pointerdown",g,!0),m.removeEventListener("mousedown",h,!0),m.removeEventListener("contextmenu",h,!0),y&&(y.removeEventListener("mousedown",h,!0),y.removeEventListener("contextmenu",h,!0))}}},[t,r,n,i,o]);function p(){f.current=!0}return p}var QG=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function JG(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pA,t=x.forwardRef(function(r,n){var i=r.prefixCls,o=i===void 0?"rc-trigger-popup":i,s=r.children,u=r.action,c=u===void 0?"hover":u,f=r.showAction,p=r.hideAction,g=r.popupVisible,h=r.defaultPopupVisible,m=r.onPopupVisibleChange,y=r.afterPopupVisibleChange,b=r.mouseEnterDelay,S=r.mouseLeaveDelay,_=S===void 0?.1:S,C=r.focusDelay,O=r.blurDelay,R=r.mask,$=r.maskClosable,T=$===void 0?!0:$,P=r.getPopupContainer,L=r.forceRender,z=r.autoDestroy,B=r.destroyPopupOnHide,X=r.popup,Y=r.popupClassName,N=r.popupStyle,j=r.popupPlacement,F=r.builtinPlacements,q=F===void 0?{}:F,U=r.popupAlign,M=r.zIndex,G=r.stretch,K=r.getPopupClassNameFromAlign,D=r.fresh,A=r.alignPoint,J=r.onPopupClick,Z=r.onPopupAlign,ne=r.arrow,W=r.popupMotion,ve=r.maskMotion,se=r.popupTransitionName,Ee=r.popupAnimation,we=r.maskTransitionName,Me=r.maskAnimation,Oe=r.className,je=r.getTriggerDOMNode,Ae=Qn(r,QG),$e=z||B||!1,Ne=x.useState(!1),Ie=ke(Ne,2),Ke=Ie[0],nt=Ie[1];ar(function(){nt(jG())},[]);var ze=x.useRef({}),Ue=x.useContext(PO),Qe=x.useMemo(function(){return{registerSubPopup:function(Ze,$t){ze.current[Ze]=$t,Ue?.registerSubPopup(Ze,$t)}}},[Ue]),Ve=_W(),ye=x.useState(null),Ge=ke(ye,2),ct=Ge[0],Lt=Ge[1],ht=x.useRef(null),Kt=Gn(function(Le){ht.current=Le,pc(Le)&&ct!==Le&&Lt(Le),Ue?.registerSubPopup(Ve,Le)}),Ft=x.useState(null),re=ke(Ft,2),ie=re[0],ue=re[1],V=x.useRef(null),pe=Gn(function(Le){pc(Le)&&ie!==Le&&(ue(Le),V.current=Le)}),_e=x.Children.only(s),De=_e?.props||{},fe={},he=Gn(function(Le){var Ze,$t,Pt=ie;return Pt?.contains(Le)||((Ze=wp(Pt))===null||Ze===void 0?void 0:Ze.host)===Le||Le===Pt||ct?.contains(Le)||(($t=wp(ct))===null||$t===void 0?void 0:$t.host)===Le||Le===ct||Object.values(ze.current).some(function(Tt){return Tt?.contains(Le)||Le===Tt})}),me=DO(o,W,Ee,se),Ce=DO(o,ve,Me,we),Te=x.useState(h||!1),Xe=ke(Te,2),it=Xe[0],Je=Xe[1],ot=g??it,zr=Gn(function(Le){g===void 0&&Je(Le)});ar(function(){Je(g||!1)},[g]);var ft=x.useRef(ot);ft.current=ot;var pt=x.useRef([]);pt.current=[];var wt=Gn(function(Le){var Ze;zr(Le),((Ze=pt.current[pt.current.length-1])!==null&&Ze!==void 0?Ze:ot)!==Le&&(pt.current.push(Le),m?.(Le))}),mt=x.useRef(),xt=function(){clearTimeout(mt.current)},Bt=function(Ze){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;xt(),$t===0?wt(Ze):mt.current=setTimeout(function(){wt(Ze)},$t*1e3)};x.useEffect(function(){return xt},[]);var Jt=x.useState(!1),Tr=ke(Jt,2),Ir=Tr[0],Br=Tr[1];ar(function(Le){(!Le||ot)&&Br(!0)},[ot]);var hn=x.useState(null),gn=ke(hn,2),An=gn[0],Ar=gn[1],ri=x.useState(null),er=ke(ri,2),Vr=er[0],kn=er[1],Pe=function(Ze){kn([Ze.clientX,Ze.clientY])},Co=XG(ot,ct,A&&Vr!==null?Vr:ie,j,q,U,Z),Vt=ke(Co,11),ni=Vt[0],_o=Vt[1],Nt=Vt[2],ii=Vt[3],ki=Vt[4],Ro=Vt[5],oi=Vt[6],Oo=Vt[7],Pn=Vt[8],rn=Vt[9],gr=Vt[10],ai=WG(Ke,c,f,p),dr=ke(ai,2),Pi=dr[0],Hr=dr[1],Mn=Pi.has("click"),Ur=Hr.has("click")||Hr.has("contextMenu"),Wr=Gn(function(){Ir||gr()}),vn=function(){ft.current&&A&&Ur&&Bt(!1)};KG(ot,ie,ct,Wr,vn),ar(function(){Wr()},[Vr,j]),ar(function(){ot&&!(q!=null&&q[j])&&Wr()},[JSON.stringify(U)]);var Mi=x.useMemo(function(){var Le=qG(q,o,rn,A);return St(Le,K?.(rn))},[rn,K,q,o,A]);x.useImperativeHandle(n,function(){return{nativeElement:V.current,popupElement:ht.current,forceAlign:Wr}});var $o=x.useState(0),To=ke($o,2),si=To[0],Io=To[1],no=x.useState(0),Dn=ke(no,2),sa=Dn[0],io=Dn[1],yt=function(){if(G&&ie){var Ze=ie.getBoundingClientRect();Io(Ze.width),io(Ze.height)}},Ao=function(){yt(),Wr()},ko=function(Ze){Br(!1),gr(),y?.(Ze)},oo=function(){return new Promise(function(Ze){yt(),Ar(function(){return Ze})})};ar(function(){An&&(gr(),An(),Ar(null))},[An]);function Gr(Le,Ze,$t,Pt){fe[Le]=function(Tt){var Lo;Pt?.(Tt),Bt(Ze,$t);for(var Fo=arguments.length,la=new Array(Fo>1?Fo-1:0),Li=1;Li<Fo;Li++)la[Li-1]=arguments[Li];(Lo=De[Le])===null||Lo===void 0||Lo.call.apply(Lo,[De,Tt].concat(la))}}(Mn||Ur)&&(fe.onClick=function(Le){var Ze;ft.current&&Ur?Bt(!1):!ft.current&&Mn&&(Pe(Le),Bt(!0));for(var $t=arguments.length,Pt=new Array($t>1?$t-1:0),Tt=1;Tt<$t;Tt++)Pt[Tt-1]=arguments[Tt];(Ze=De.onClick)===null||Ze===void 0||Ze.call.apply(Ze,[De,Le].concat(Pt))});var Di=YG(ot,Ur,ie,ct,R,T,he,Bt),Po=Pi.has("hover"),Mo=Hr.has("hover"),li,Gt;Po&&(Gr("onMouseEnter",!0,b,function(Le){Pe(Le)}),Gr("onPointerEnter",!0,b,function(Le){Pe(Le)}),li=function(Ze){(ot||Ir)&&ct!==null&&ct!==void 0&&ct.contains(Ze.target)&&Bt(!0,b)},A&&(fe.onMouseMove=function(Le){var Ze;(Ze=De.onMouseMove)===null||Ze===void 0||Ze.call(De,Le)})),Mo&&(Gr("onMouseLeave",!1,_),Gr("onPointerLeave",!1,_),Gt=function(){Bt(!1,_)}),Pi.has("focus")&&Gr("onFocus",!0,C),Hr.has("focus")&&Gr("onBlur",!1,O),Pi.has("contextMenu")&&(fe.onContextMenu=function(Le){var Ze;ft.current&&Hr.has("contextMenu")?Bt(!1):(Pe(Le),Bt(!0)),Le.preventDefault();for(var $t=arguments.length,Pt=new Array($t>1?$t-1:0),Tt=1;Tt<$t;Tt++)Pt[Tt-1]=arguments[Tt];(Ze=De.onContextMenu)===null||Ze===void 0||Ze.call.apply(Ze,[De,Le].concat(Pt))}),Oe&&(fe.className=St(De.className,Oe));var vr=x.useRef(!1);vr.current||(vr.current=L||ot||Ir);var Cr=de(de({},De),fe),kr={},nn=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];nn.forEach(function(Le){Ae[Le]&&(kr[Le]=function(){for(var Ze,$t=arguments.length,Pt=new Array($t),Tt=0;Tt<$t;Tt++)Pt[Tt]=arguments[Tt];(Ze=Cr[Le])===null||Ze===void 0||Ze.call.apply(Ze,[Cr].concat(Pt)),Ae[Le].apply(Ae,Pt)})});var qr=x.cloneElement(_e,de(de({},Cr),kr)),Do={x:Ro,y:oi},ao=ne?de({},ne!==!0?ne:{}):null;return x.createElement(x.Fragment,null,x.createElement(Mc,{disabled:!ot,ref:pe,onResize:Ao},x.createElement(UG,{getTriggerDOMNode:je},qr)),vr.current&&x.createElement(PO.Provider,{value:Qe},x.createElement(HG,{portal:e,ref:Kt,prefixCls:o,popup:X,className:St(Y,Mi),style:N,target:ie,onMouseEnter:li,onMouseLeave:Gt,onPointerEnter:li,zIndex:M,open:ot,keepDom:Ir,fresh:D,onClick:J,onPointerDownCapture:Di,mask:R,motion:me,maskMotion:Ce,onVisibleChanged:ko,onPrepare:oo,forceRender:L,autoDestroy:$e,getPopupContainer:P,align:rn,arrow:ao,arrowPos:Do,ready:ni,offsetX:_o,offsetY:Nt,offsetR:ii,offsetB:ki,onAlign:Wr,stretch:G,targetWidth:si/Oo,targetHeight:sa/Pn})))});return t}const ZG=JG(pA);function eq(e,t,r){return St({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:r})}const tq=(e,t)=>t||e,rq=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var n,i;const{variant:o,[e]:s}=x.useContext(Oi),u=x.useContext(wG),c=s?.variant;let f;typeof t<"u"?f=t:r===!1?f="borderless":f=(i=(n=u??c)!==null&&n!==void 0?n:o)!==null&&i!==void 0?i:"outlined";const p=IH.includes(f);return[f,p]};var nq={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},iq=function(t,r){return x.createElement(aa,fr({},t,{ref:r,icon:nq}))},oq=x.forwardRef(iq);function SA(e){var t=e.children,r=e.prefixCls,n=e.id,i=e.overlayInnerStyle,o=e.className,s=e.style;return x.createElement("div",{className:St("".concat(r,"-content"),o),style:s},x.createElement("div",{className:"".concat(r,"-inner"),id:n,role:"tooltip",style:i},typeof t=="function"?t():t))}var ol={shiftX:64,adjustY:1},al={adjustX:1,shiftY:!0},mi=[0,0],aq={left:{points:["cr","cl"],overflow:al,offset:[-4,0],targetOffset:mi},right:{points:["cl","cr"],overflow:al,offset:[4,0],targetOffset:mi},top:{points:["bc","tc"],overflow:ol,offset:[0,-4],targetOffset:mi},bottom:{points:["tc","bc"],overflow:ol,offset:[0,4],targetOffset:mi},topLeft:{points:["bl","tl"],overflow:ol,offset:[0,-4],targetOffset:mi},leftTop:{points:["tr","tl"],overflow:al,offset:[-4,0],targetOffset:mi},topRight:{points:["br","tr"],overflow:ol,offset:[0,-4],targetOffset:mi},rightTop:{points:["tl","tr"],overflow:al,offset:[4,0],targetOffset:mi},bottomRight:{points:["tr","br"],overflow:ol,offset:[0,4],targetOffset:mi},rightBottom:{points:["bl","br"],overflow:al,offset:[4,0],targetOffset:mi},bottomLeft:{points:["tl","bl"],overflow:ol,offset:[0,4],targetOffset:mi},leftBottom:{points:["br","bl"],overflow:al,offset:[-4,0],targetOffset:mi}},sq=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],lq=function(t,r){var n=t.overlayClassName,i=t.trigger,o=i===void 0?["hover"]:i,s=t.mouseEnterDelay,u=s===void 0?0:s,c=t.mouseLeaveDelay,f=c===void 0?.1:c,p=t.overlayStyle,g=t.prefixCls,h=g===void 0?"rc-tooltip":g,m=t.children,y=t.onVisibleChange,b=t.afterVisibleChange,S=t.transitionName,_=t.animation,C=t.motion,O=t.placement,R=O===void 0?"right":O,$=t.align,T=$===void 0?{}:$,P=t.destroyTooltipOnHide,L=P===void 0?!1:P,z=t.defaultVisible,B=t.getTooltipContainer,X=t.overlayInnerStyle;t.arrowContent;var Y=t.overlay,N=t.id,j=t.showArrow,F=j===void 0?!0:j,q=Qn(t,sq),U=x.useRef(null);x.useImperativeHandle(r,function(){return U.current});var M=de({},q);"visible"in t&&(M.popupVisible=t.visible);var G=function(){return x.createElement(SA,{key:"content",prefixCls:h,id:N,overlayInnerStyle:X},Y)};return x.createElement(ZG,fr({popupClassName:n,prefixCls:h,popup:G,action:o,builtinPlacements:aq,popupPlacement:R,ref:U,popupAlign:T,getPopupContainer:B,onPopupVisibleChange:y,afterPopupVisibleChange:b,popupTransitionName:S,popupAnimation:_,popupMotion:C,defaultPopupVisible:z,autoDestroy:L,mouseLeaveDelay:f,popupStyle:p,mouseEnterDelay:u,arrow:F},M),m)};const uq=x.forwardRef(lq);function cq(e){const{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,i=t/2,o=0,s=i,u=n*1/Math.sqrt(2),c=i-n*(1-1/Math.sqrt(2)),f=i-r*(1/Math.sqrt(2)),p=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),g=2*i-f,h=p,m=2*i-u,y=c,b=2*i-o,S=s,_=i*Math.sqrt(2)+n*(Math.sqrt(2)-2),C=n*(Math.sqrt(2)-1),O=`polygon(${C}px 100%, 50% ${C}px, ${2*i-C}px 100%, ${C}px 100%)`,R=`path('M ${o} ${s} A ${n} ${n} 0 0 0 ${u} ${c} L ${f} ${p} A ${r} ${r} 0 0 1 ${g} ${h} L ${m} ${y} A ${n} ${n} 0 0 0 ${b} ${S} Z')`;return{arrowShadowWidth:_,arrowPath:R,arrowPolygon:O}}const fq=(e,t,r)=>{const{sizePopupArrow:n,arrowPolygon:i,arrowPath:o,arrowShadowWidth:s,borderRadiusXS:u,calc:c}=e;return{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:c(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${Mt(u)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"}}},wA=8;function xA(e){const{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?wA:n}}function xd(e,t){return e?t:{}}function dq(e,t,r){const{componentCls:n,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:s}=e,{arrowDistance:u=0,arrowPlacement:c={left:!0,right:!0,top:!0,bottom:!0}}={};return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({[`${n}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},fq(e,t,i)),{"&:before":{background:t}})]},xd(!!c.top,{[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:u,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":s,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${Mt(s)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),xd(!!c.bottom,{[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:u,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":s,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${Mt(s)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),xd(!!c.left,{[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:u},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${n}-arrow`]:{top:o},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:o}})),xd(!!c.right,{[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:u},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${n}-arrow`]:{top:o},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:o}}))}}function pq(e,t,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};const i=n&&typeof n=="object"?n:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.arrowOffsetHorizontal*2+r,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=t.arrowOffsetVertical*2+r,o.shiftX=!0,o.adjustX=!0;break}const s=Object.assign(Object.assign({},o),i);return s.shiftX||(s.adjustX=!0),s.shiftY||(s.adjustY=!0),s}const zO={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},hq={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},gq=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function vq(e){const{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:i,borderRadius:o}=e,s=t/2,u={};return Object.keys(zO).forEach(c=>{const f=n&&hq[c]||zO[c],p=Object.assign(Object.assign({},f),{offset:[0,0],dynamicInset:!0});switch(u[c]=p,gq.has(c)&&(p.autoArrow=!1),c){case"top":case"topLeft":case"topRight":p.offset[1]=-s-i;break;case"bottom":case"bottomLeft":case"bottomRight":p.offset[1]=s+i;break;case"left":case"leftTop":case"leftBottom":p.offset[0]=-s-i;break;case"right":case"rightTop":case"rightBottom":p.offset[0]=s+i;break}const g=xA({contentRadius:o,limitVerticalRadius:!0});if(n)switch(c){case"topLeft":case"bottomLeft":p.offset[0]=-g.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":p.offset[0]=g.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":p.offset[1]=-g.arrowOffsetHorizontal-s;break;case"leftBottom":case"rightBottom":p.offset[1]=g.arrowOffsetHorizontal+s;break}p.overflow=pq(c,g,t,r),p.htmlRegion="visibleFirst"}),u}const mq=e=>{const{componentCls:t,tooltipMaxWidth:r,tooltipColor:n,tooltipBg:i,tooltipBorderRadius:o,zIndexPopup:s,controlHeight:u,boxShadowSecondary:c,paddingSM:f,paddingXS:p}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},cb(e)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${t}-inner`]:{minWidth:"1em",minHeight:u,padding:`${Mt(e.calc(f).div(2).equal())} ${Mt(p)}`,color:n,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:o,boxShadow:c,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:e.min(o,wA)}},[`${t}-content`]:{position:"relative"}}),iU(e,(g,h)=>{let{darkColor:m}=h;return{[`&${t}-${g}`]:{[`${t}-inner`]:{backgroundColor:m},[`${t}-arrow`]:{"--antd-arrow-background-color":m}}}})),{"&-rtl":{direction:"rtl"}})},dq(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},yq=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},xA({contentRadius:e.borderRadius,limitVerticalRadius:!0})),cq($s(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),EA=(function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return fb("Tooltip",n=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:s}=n,u=$s(n,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:s});return[mq(u),NG(n,"zoom-big-fast")]},yq,{resetStyle:!1,injectStyle:t})(e)}),bq=Sp.map(e=>`${e}-inverse`);function Sq(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat(rt(bq),rt(Sp)).includes(e):Sp.includes(e)}function CA(e,t){const r=Sq(t),n=St({[`${e}-${t}`]:t&&r}),i={},o={};return t&&!r&&(i.background=t,o["--antd-arrow-background-color"]=t),{className:n,overlayStyle:i,arrowStyle:o}}const wq=e=>{const{prefixCls:t,className:r,placement:n="top",title:i,color:o,overlayInnerStyle:s}=e,{getPrefixCls:u}=x.useContext(Oi),c=u("tooltip",t),[f,p,g]=EA(c),h=CA(c,o),m=h.arrowStyle,y=Object.assign(Object.assign({},s),h.overlayStyle),b=St(p,g,c,`${c}-pure`,`${c}-placement-${n}`,r,h.className);return f(x.createElement("div",{className:b,style:m},x.createElement("div",{className:`${c}-arrow`}),x.createElement(SA,Object.assign({},e,{className:p,prefixCls:c,overlayInnerStyle:y}),i)))};var xq=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const Eq=x.forwardRef((e,t)=>{var r,n;const{prefixCls:i,openClassName:o,getTooltipContainer:s,overlayClassName:u,color:c,overlayInnerStyle:f,children:p,afterOpenChange:g,afterVisibleChange:h,destroyTooltipOnHide:m,arrow:y=!0,title:b,overlay:S,builtinPlacements:_,arrowPointAtCenter:C=!1,autoAdjustOverflow:O=!0}=e,R=!!y,[,$]=ql(),{getPopupContainer:T,getPrefixCls:P,direction:L}=x.useContext(Oi),z=TI(),B=x.useRef(null),X=()=>{var Ve;(Ve=B.current)===null||Ve===void 0||Ve.forceAlign()};x.useImperativeHandle(t,()=>{var Ve;return{forceAlign:X,forcePopupAlign:()=>{z.deprecated(!1,"forcePopupAlign","forceAlign"),X()},nativeElement:(Ve=B.current)===null||Ve===void 0?void 0:Ve.nativeElement}});const[Y,N]=xc(!1,{value:(r=e.open)!==null&&r!==void 0?r:e.visible,defaultValue:(n=e.defaultOpen)!==null&&n!==void 0?n:e.defaultVisible}),j=!b&&!S&&b!==0,F=Ve=>{var ye,Ge;N(j?!1:Ve),j||((ye=e.onOpenChange)===null||ye===void 0||ye.call(e,Ve),(Ge=e.onVisibleChange)===null||Ge===void 0||Ge.call(e,Ve))},q=x.useMemo(()=>{var Ve,ye;let Ge=C;return typeof y=="object"&&(Ge=(ye=(Ve=y.pointAtCenter)!==null&&Ve!==void 0?Ve:y.arrowPointAtCenter)!==null&&ye!==void 0?ye:C),_||vq({arrowPointAtCenter:Ge,autoAdjustOverflow:O,arrowWidth:R?$.sizePopupArrow:0,borderRadius:$.borderRadius,offset:$.marginXXS})},[C,y,_,$]),U=x.useMemo(()=>b===0?b:S||b||"",[S,b]),M=x.createElement(xG,{space:!0},typeof U=="function"?U():U),{getPopupContainer:G,placement:K="top",mouseEnterDelay:D=.1,mouseLeaveDelay:A=.1,overlayStyle:J,rootClassName:Z}=e,ne=xq(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),W=P("tooltip",i),ve=P(),se=e["data-popover-inject"];let Ee=Y;!("open"in e)&&!("visible"in e)&&j&&(Ee=!1);const we=x.isValidElement(p)&&!QU(p)?p:x.createElement("span",null,p),Me=we.props,Oe=!Me.className||typeof Me.className=="string"?St(Me.className,o||`${W}-open`):Me.className,[je,Ae,$e]=EA(W,!se),Ne=CA(W,c),Ie=Ne.arrowStyle,Ke=Object.assign(Object.assign({},f),Ne.overlayStyle),nt=St(u,{[`${W}-rtl`]:L==="rtl"},Ne.className,Z,Ae,$e),[ze,Ue]=oW("Tooltip",ne.zIndex),Qe=x.createElement(uq,Object.assign({},ne,{zIndex:ze,showArrow:R,placement:K,mouseEnterDelay:D,mouseLeaveDelay:A,prefixCls:W,overlayClassName:nt,overlayStyle:Object.assign(Object.assign({},Ie),J),getTooltipContainer:G||s||T,ref:B,builtinPlacements:q,overlay:M,visible:Ee,onVisibleChange:F,afterVisibleChange:g??h,overlayInnerStyle:Ke,arrowContent:x.createElement("span",{className:`${W}-arrow-content`}),motion:{motionName:lW(ve,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!m}),Ee?sA(we,{className:Oe}):we);return je(x.createElement(lA.Provider,{value:Ue},Qe))}),Qp=Eq;Qp._InternalPanelDoNotUseOrYouWillBeFired=wq;function Cq(e){return $s(e,{inputAffixPadding:e.paddingXXS})}const _q=e=>{const{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:i,controlHeightSM:o,controlHeightLG:s,fontSizeLG:u,lineHeightLG:c,paddingSM:f,controlPaddingHorizontalSM:p,controlPaddingHorizontal:g,colorFillAlter:h,colorPrimaryHover:m,colorPrimary:y,controlOutlineWidth:b,controlOutline:S,colorErrorOutline:_,colorWarningOutline:C,colorBgContainer:O}=e;return{paddingBlock:Math.max(Math.round((t-r*n)/2*10)/10-i,0),paddingBlockSM:Math.max(Math.round((o-r*n)/2*10)/10-i,0),paddingBlockLG:Math.ceil((s-u*c)/2*10)/10-i,paddingInline:f-i,paddingInlineSM:p-i,paddingInlineLG:g-i,addonBg:h,activeBorderColor:y,hoverBorderColor:m,activeShadow:`0 0 0 ${b}px ${S}`,errorActiveShadow:`0 0 0 ${b}px ${_}`,warningActiveShadow:`0 0 0 ${b}px ${C}`,hoverBg:O,activeBg:O,inputFontSize:r,inputFontSizeLG:u,inputFontSizeSM:r}},Rq=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),vb=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},Rq($s(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),_A=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),BO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},_A(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),Oq=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},_A(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},vb(e))}),BO(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),BO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),VO=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),$q=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},VO(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),VO(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},vb(e))}})}),Tq=(e,t)=>{const{componentCls:r}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled},[`&${r}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${r}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},RA=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:t?.inputColor},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),HO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},RA(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),Iq=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},RA(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},vb(e))}),HO(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),HO(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),UO=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),Aq=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary},[`${e.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}}}},UO(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),UO(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),kq=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),OA=e=>{const{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:i}=e;return{padding:`${Mt(t)} ${Mt(i)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},$A=e=>({padding:`${Mt(e.paddingBlockSM)} ${Mt(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),TA=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${Mt(e.paddingBlock)} ${Mt(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},kq(e.colorTextPlaceholder)),{"textarea&":{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},OA(e)),"&-sm":Object.assign({},$A(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),Pq=e=>{const{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},OA(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},$A(e)),[`&-lg ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${Mt(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${Mt(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${Mt(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{[`${r}-select-selector`]:{backgroundColor:"inherit",border:`${Mt(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${r}-select-selector`]:{color:e.colorPrimary}}},[`${r}-cascader-picker`]:{margin:`-9px ${Mt(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[`${t}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},tU()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
1083
1083
  & > ${t}-affix-wrapper,
1084
1084
  & > ${t}-number-affix-wrapper,
1085
1085
  & > ${r}-picker-range
@@ -1298,7 +1298,7 @@ html body {
1298
1298
 
1299
1299
  const dmk = new DeviceManagementKitBuilder()
1300
1300
  .addLogger(new DevToolsLogger(connector))
1301
- .build();`,TQ=({logs:e,clearLogs:t,isConnected:r=!0})=>{const[n,i]=te.useState(0),{options:o,setOptions:s,displayedLogs:u,uniqueTags:c}=RQ({logs:e}),f=u,p=x.useRef(u.length);x.useEffect(()=>{const z=p.current,B=u.length;p.current=B,(B<z*.5||B<100&&B<z)&&i(X=>X+1)},[u.length]);const{searchQuery:g,setSearchQuery:h,matchIndices:m,currentMatchIndex:y,currentMatchRowIndex:b,goToNext:S,goToPrevious:_,goToFirst:C,goToLast:O}=OQ(u),R=x.useRef(null);x.useEffect(()=>{const z=B=>{(B.metaKey||B.ctrlKey)&&B.key.toLowerCase()==="f"&&(B.preventDefault(),R.current?.focus(),R.current?.select()),(B.metaKey||B.ctrlKey)&&B.key.toLowerCase()==="g"&&(B.preventDefault(),B.shiftKey?_():S())};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[S,_]);const $=n,T=x.useMemo(()=>new Set(m),[m]),P=x.useCallback(()=>{t(),i(z=>z+1)},[t]),L=x.useCallback(()=>{const z=e.map(N=>{const{payload:j,...F}=N;return F}),B=new Blob([JSON.stringify(z,null,2)],{type:"application/json"}),X=URL.createObjectURL(B),Y=document.createElement("a");Y.href=X,Y.download=`logs-sdk-${new Date().toISOString()}.json`,Y.click(),URL.revokeObjectURL(X)},[e]);return r?k.jsxs(ra,{flex:1,flexDirection:"column",minHeight:0,overflow:"hidden",children:[k.jsx(ra,{flexDirection:"column",px:6,py:2,flexShrink:0,children:k.jsx(rK,{clearLogs:P,downloadLogs:L,options:o,setOptions:s,uniqueTags:c,searchQuery:g,onSearchChange:h,matchCount:m.length,currentMatchIndex:y,onSearchNext:S,onSearchPrevious:_,onSearchFirst:C,onSearchLast:O,searchInputRef:R})}),k.jsx(K8,{mb:3,flexShrink:0}),k.jsx(EQ,{data:f,highlightedIndices:T,currentHighlightIndex:b,scrollToIndex:b},$)]}):k.jsx(j1,{title:"Logger not connected",description:k.jsxs(k.Fragment,{children:["To enable logging, add ",k.jsx("code",{children:"DevToolsLogger"})," to your DMK builder:"]}),codeExample:$Q})},u0=wr.interface({id:kt,prefix:kt,responses:Si(kt)}),IQ=wr.interface({prefix:kt,response:br(kt),responses:br(Si(kt))}),ZA=wr.interface({name:kt,version:kt,hash:br(kt)}),AQ=wr.interface({hash:kt,name:kt,version:kt}),bl=wr.interface({id:kt,name:kt,device_type:kt,connectivity_type:kt,firmware_version:br(kt),apps:br(Si(ZA)),masks:br(Si(_l)),connected:br(sp),onboarded:br(sp),language:br(kt)}),kQ=wr.interface({name:br(kt),device_type:br(kt),connectivity_type:br(kt),firmware_version:br(kt),apps:br(Si(ZA)),masks:br(Si(_l)),mocks:br(Si(IQ)),catalog:br(Si(AQ)),onboarded:br(sp),language:br(kt)}),PQ=wr.interface({token:kt,expires_at:_l}),MQ=wr.interface({device:bl,connected:sp}),DQ=wr.interface({response:kt}),LQ=wr.interface({id:kt,created_at:_l,expires_at:_l,devices:Si(bl)}),d$=wr.interface({devices:Si(kQ)}),FQ=wr.interface({run_id:kt,speculos_url:kt,model:kt});let NQ=class{client;token;authPromise;constructor(t,r={}){this.client=r.httpClient??new g2({baseUrl:this.normalizeUrl(t)}),this.token=r.token}async authenticate(){const t=await this.client.post("auth",{}),r=this.decode(PQ,t).token;return this.token=r,r}getToken(){return this.token}async listDevices(){const t=await this.client.get("devices",{headers:await this.authHeaders()});return this.decode(Si(bl),t)}async addDevice(t={}){const r=await this.client.post("devices",t,{headers:await this.authHeaders()});return this.decode(bl,r)}async getDevice(t){const r=await this.client.get(`devices/${t}`,{headers:await this.authHeaders()});return this.decode(bl,r)}async editDevice(t,r){const n=await this.client.patch(`devices/${t}`,r,{headers:await this.authHeaders()});return this.decode(bl,n)}async deleteDevice(t){return await this.client.delete(`devices/${t}`,{headers:await this.authHeaders()}),!0}async connect(t){const r=await this.client.post(`devices/${t}/connect`,{},{headers:await this.authHeaders()});return this.decode(MQ,r)}async disconnect(t){return await this.client.post(`devices/${t}/disconnect`,{},{headers:await this.authHeaders()}),!0}async disconnectAll(){const t=await this.listDevices();return await Promise.all(t.filter(r=>r.connected).map(r=>this.disconnect(r.id))),!0}async sendApdu(t,r){const n=typeof r=="string"?r:Zo(r,!1),i=await this.client.post(`devices/${t}/apdu`,{apdu:n},{headers:await this.authHeaders()});return this.decode(DQ,i)}async listMocks(t){const r=await this.client.get(`devices/${t}/mocks`,{headers:await this.authHeaders()});return this.decode(Si(u0),r)}async addMock(t,r){const n=await this.client.post(`devices/${t}/mocks`,r,{headers:await this.authHeaders()});return this.decode(u0,n)}async editMock(t,r,n){const i=await this.client.patch(`devices/${t}/mocks/${r}`,n,{headers:await this.authHeaders()});return this.decode(u0,i)}async deleteMock(t,r){return await this.client.delete(`devices/${t}/mocks/${r}`,{headers:await this.authHeaders()}),!0}async clearMocks(t){return await this.client.delete(`devices/${t}/mocks`,{headers:await this.authHeaders()}),!0}async getSpeculos(t){const r=await this.client.get(`devices/${t}/speculos`,{headers:await this.authHeaders()});return this.decode(FQ,r)}async getScreenshot(t){return await this.client.get(`devices/${t}/speculos/screenshot`,{headers:await this.authHeaders(),responseType:"blob"})}async pressButton(t,r,n="press-and-release"){await this.client.post(`devices/${t}/speculos/button/${r}`,{action:n},{headers:await this.authHeaders()})}async touchScreen(t,r,n,i="press-and-release"){await this.client.post(`devices/${t}/speculos/finger`,{action:i,x:r,y:n},{headers:await this.authHeaders()})}async getSession(){const t=await this.client.get("sessions/current",{headers:await this.authHeaders()});return this.decode(LQ,t)}async disposeSession(){return await this.client.delete("sessions/current",{headers:await this.authHeaders()}),this.token=void 0,this.authPromise=void 0,!0}async exportSession(){const t=await this.client.get("export",{headers:await this.authHeaders()});return this.decode(d$,t)}async importSession(t){const r=await this.client.post("import",t,{headers:await this.authHeaders()});return this.decode(d$,r)}decode(t,r){return t.decode(r).caseOf({Left:n=>{throw new Error(`MockClient: invalid server response (${n})`)},Right:n=>n})}async authHeaders(){return{Authorization:`Bearer ${await this.ensureToken()}`}}ensureToken(){return this.token?Promise.resolve(this.token):(this.authPromise||(this.authPromise=this.authenticate()),this.authPromise)}normalizeUrl(t){return t.endsWith("/")?t:`${t}/`}};const ek="BOLOS",jQ=new $a;function zQ(e){return"firmwareVersion"in e&&e.firmwareVersion?.os?e.firmwareVersion.os:"currentApp"in e&&e.currentApp?.name===ek?e.currentApp.version:""}function p$(e,t){if(!e)return{};const r=zQ(e),n={name:jQ.getDeviceModel({id:e.deviceModelId}).productName,device_type:e.deviceModelId,...t?{connectivity_type:t}:{},firmware_version:r};return e.sessionStateType===Il.Connected?n:{...n,...e.currentApp&&e.currentApp.name!==ek?{apps:[{name:e.currentApp.name,version:e.currentApp.version}]}:{}}}const BQ=["e0010000","b0010000"];function VQ(e){return BQ.some(t=>e.startsWith(t))}function HQ(e){return e.every(t=>t===e[0])?e.slice(0,1):e}function UQ(e,t){const r=new Map;for(const n of e){const i=n.apdu.toLowerCase();if(!t&&VQ(i))continue;const o=r.get(i)??[];o.push(n.response.toLowerCase()),r.set(i,o)}return[...r.entries()].map(([n,i])=>({prefix:n,responses:HQ(i)}))}function WQ(e,t,r){const n=UQ(t,r),{name:i,...o}=e;return{...i!==void 0?{name:i}:{},...o,mocks:n}}function GQ(e,t={}){const r=t.includeHandshake??!1;return{devices:e.map(({device:n,exchanges:i})=>WQ(n,i,r))}}const qQ="http://127.0.0.1:8080",XQ=`import { DevToolsLogger } from "@ledgerhq/device-management-kit-devtools-core";
1301
+ .build();`,TQ=({logs:e,clearLogs:t,isConnected:r=!0})=>{const[n,i]=te.useState(0),{options:o,setOptions:s,displayedLogs:u,uniqueTags:c}=RQ({logs:e}),f=u,p=x.useRef(u.length);x.useEffect(()=>{const z=p.current,B=u.length;p.current=B,(B<z*.5||B<100&&B<z)&&i(X=>X+1)},[u.length]);const{searchQuery:g,setSearchQuery:h,matchIndices:m,currentMatchIndex:y,currentMatchRowIndex:b,goToNext:S,goToPrevious:_,goToFirst:C,goToLast:O}=OQ(u),R=x.useRef(null);x.useEffect(()=>{const z=B=>{(B.metaKey||B.ctrlKey)&&B.key.toLowerCase()==="f"&&(B.preventDefault(),R.current?.focus(),R.current?.select()),(B.metaKey||B.ctrlKey)&&B.key.toLowerCase()==="g"&&(B.preventDefault(),B.shiftKey?_():S())};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[S,_]);const $=n,T=x.useMemo(()=>new Set(m),[m]),P=x.useCallback(()=>{t(),i(z=>z+1)},[t]),L=x.useCallback(()=>{const z=e.map(N=>{const{payload:j,...F}=N;return F}),B=new Blob([JSON.stringify(z,null,2)],{type:"application/json"}),X=URL.createObjectURL(B),Y=document.createElement("a");Y.href=X,Y.download=`logs-sdk-${new Date().toISOString()}.json`,Y.click(),URL.revokeObjectURL(X)},[e]);return r?k.jsxs(ra,{flex:1,flexDirection:"column",minHeight:0,overflow:"hidden",children:[k.jsx(ra,{flexDirection:"column",px:6,py:2,flexShrink:0,children:k.jsx(rK,{clearLogs:P,downloadLogs:L,options:o,setOptions:s,uniqueTags:c,searchQuery:g,onSearchChange:h,matchCount:m.length,currentMatchIndex:y,onSearchNext:S,onSearchPrevious:_,onSearchFirst:C,onSearchLast:O,searchInputRef:R})}),k.jsx(K8,{mb:3,flexShrink:0}),k.jsx(EQ,{data:f,highlightedIndices:T,currentHighlightIndex:b,scrollToIndex:b},$)]}):k.jsx(j1,{title:"Logger not connected",description:k.jsxs(k.Fragment,{children:["To enable logging, add ",k.jsx("code",{children:"DevToolsLogger"})," to your DMK builder:"]}),codeExample:$Q})},u0=xr.interface({id:kt,prefix:kt,responses:Si(kt)}),IQ=xr.interface({prefix:kt,response:Sr(kt),responses:Sr(Si(kt))}),ZA=xr.interface({name:kt,version:kt,hash:Sr(kt)}),AQ=xr.interface({hash:kt,name:kt,version:kt}),bl=xr.interface({id:kt,name:kt,device_type:kt,connectivity_type:kt,firmware_version:Sr(kt),apps:Sr(Si(ZA)),masks:Sr(Si(_l)),connected:Sr(sp),onboarded:Sr(sp),language:Sr(kt)}),kQ=xr.interface({name:Sr(kt),device_type:Sr(kt),connectivity_type:Sr(kt),firmware_version:Sr(kt),apps:Sr(Si(ZA)),masks:Sr(Si(_l)),mocks:Sr(Si(IQ)),catalog:Sr(Si(AQ)),onboarded:Sr(sp),language:Sr(kt)}),PQ=xr.interface({token:kt,expires_at:_l}),MQ=xr.interface({device:bl,connected:sp}),DQ=xr.interface({response:kt}),LQ=xr.interface({id:kt,created_at:_l,expires_at:_l,devices:Si(bl)}),d$=xr.interface({devices:Si(kQ)}),FQ=xr.interface({run_id:kt,speculos_url:kt,model:kt});let NQ=class{client;token;authPromise;constructor(t,r={}){this.client=r.httpClient??new g2({baseUrl:this.normalizeUrl(t)}),this.token=r.token}async authenticate(){const t=await this.client.post("auth",{}),r=this.decode(PQ,t).token;return this.token=r,r}getToken(){return this.token}async listDevices(){const t=await this.client.get("devices",{headers:await this.authHeaders()});return this.decode(Si(bl),t)}async addDevice(t={}){const r=await this.client.post("devices",t,{headers:await this.authHeaders()});return this.decode(bl,r)}async getDevice(t){const r=await this.client.get(`devices/${t}`,{headers:await this.authHeaders()});return this.decode(bl,r)}async editDevice(t,r){const n=await this.client.patch(`devices/${t}`,r,{headers:await this.authHeaders()});return this.decode(bl,n)}async deleteDevice(t){return await this.client.delete(`devices/${t}`,{headers:await this.authHeaders()}),!0}async connect(t){const r=await this.client.post(`devices/${t}/connect`,{},{headers:await this.authHeaders()});return this.decode(MQ,r)}async disconnect(t){return await this.client.post(`devices/${t}/disconnect`,{},{headers:await this.authHeaders()}),!0}async disconnectAll(){const t=await this.listDevices();return await Promise.all(t.filter(r=>r.connected).map(r=>this.disconnect(r.id))),!0}async sendApdu(t,r){const n=typeof r=="string"?r:Zo(r,!1),i=await this.client.post(`devices/${t}/apdu`,{apdu:n},{headers:await this.authHeaders()});return this.decode(DQ,i)}async listMocks(t){const r=await this.client.get(`devices/${t}/mocks`,{headers:await this.authHeaders()});return this.decode(Si(u0),r)}async addMock(t,r){const n=await this.client.post(`devices/${t}/mocks`,r,{headers:await this.authHeaders()});return this.decode(u0,n)}async editMock(t,r,n){const i=await this.client.patch(`devices/${t}/mocks/${r}`,n,{headers:await this.authHeaders()});return this.decode(u0,i)}async deleteMock(t,r){return await this.client.delete(`devices/${t}/mocks/${r}`,{headers:await this.authHeaders()}),!0}async clearMocks(t){return await this.client.delete(`devices/${t}/mocks`,{headers:await this.authHeaders()}),!0}async getSpeculos(t){const r=await this.client.get(`devices/${t}/speculos`,{headers:await this.authHeaders()});return this.decode(FQ,r)}async getScreenshot(t){return await this.client.get(`devices/${t}/speculos/screenshot`,{headers:await this.authHeaders(),responseType:"blob"})}async pressButton(t,r,n="press-and-release"){await this.client.post(`devices/${t}/speculos/button/${r}`,{action:n},{headers:await this.authHeaders()})}async touchScreen(t,r,n,i="press-and-release"){await this.client.post(`devices/${t}/speculos/finger`,{action:i,x:r,y:n},{headers:await this.authHeaders()})}async getSession(){const t=await this.client.get("sessions/current",{headers:await this.authHeaders()});return this.decode(LQ,t)}async disposeSession(){return await this.client.delete("sessions/current",{headers:await this.authHeaders()}),this.token=void 0,this.authPromise=void 0,!0}async exportSession(){const t=await this.client.get("export",{headers:await this.authHeaders()});return this.decode(d$,t)}async importSession(t){const r=await this.client.post("import",t,{headers:await this.authHeaders()});return this.decode(d$,r)}decode(t,r){return t.decode(r).caseOf({Left:n=>{throw new Error(`MockClient: invalid server response (${n})`)},Right:n=>n})}async authHeaders(){return{Authorization:`Bearer ${await this.ensureToken()}`}}ensureToken(){return this.token?Promise.resolve(this.token):(this.authPromise||(this.authPromise=this.authenticate()),this.authPromise)}normalizeUrl(t){return t.endsWith("/")?t:`${t}/`}};const ek="BOLOS",jQ=new $a;function zQ(e){return"firmwareVersion"in e&&e.firmwareVersion?.os?e.firmwareVersion.os:"currentApp"in e&&e.currentApp?.name===ek?e.currentApp.version:""}function p$(e,t){if(!e)return{};const r=zQ(e),n={name:jQ.getDeviceModel({id:e.deviceModelId}).productName,device_type:e.deviceModelId,...t?{connectivity_type:t}:{},firmware_version:r};return e.sessionStateType===Il.Connected?n:{...n,...e.currentApp&&e.currentApp.name!==ek?{apps:[{name:e.currentApp.name,version:e.currentApp.version}]}:{}}}const BQ=["e0010000","b0010000"];function VQ(e){return BQ.some(t=>e.startsWith(t))}function HQ(e){return e.every(t=>t===e[0])?e.slice(0,1):e}function UQ(e,t){const r=new Map;for(const n of e){const i=n.apdu.toLowerCase();if(!t&&VQ(i))continue;const o=r.get(i)??[];o.push(n.response.toLowerCase()),r.set(i,o)}return[...r.entries()].map(([n,i])=>({prefix:n,responses:HQ(i)}))}function WQ(e,t,r){const n=UQ(t,r),{name:i,...o}=e;return{...i!==void 0?{name:i}:{},...o,mocks:n}}function GQ(e,t={}){const r=t.includeHandshake??!1;return{devices:e.map(({device:n,exchanges:i})=>WQ(n,i,r))}}const qQ="http://127.0.0.1:8080",XQ=`import { DevToolsLogger } from "@ledgerhq/device-management-kit-devtools-core";
1302
1302
 
1303
1303
  const dmk = new DeviceManagementKitBuilder()
1304
1304
  .addLogger(new DevToolsLogger(connector))