diff --git a/assets/index-D2awvsKL.js b/assets/index-Ddh0WRVV.js similarity index 56% rename from assets/index-D2awvsKL.js rename to assets/index-Ddh0WRVV.js index 6ecf9b79..a7301c0b 100644 --- a/assets/index-D2awvsKL.js +++ b/assets/index-Ddh0WRVV.js @@ -6,7 +6,7 @@ function VR(e,t){for(var n=0;n>>1,Ge=H[je];if(0>>1;jei(Ve,se))Pei(ct,Ve)?(H[je]=ct,H[Pe]=se,je=Pe):(H[je]=Ve,H[_e]=se,je=_e);else if(Pei(ct,se))H[je]=ct,H[Pe]=se,je=Pe;else break e}}return V}function i(H,V){var se=H.sortIndex-V.sortIndex;return se!==0?se:H.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,f=3,m=!1,h=!1,g=!1,E=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(H){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=H)r(c),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(c)}}function _(H){if(g=!1,y(H),!h)if(n(l)!==null)h=!0,le(k);else{var V=n(c);V!==null&&ce(_,V.startTime-H)}}function k(H,V){h=!1,g&&(g=!1,b(I),I=-1),m=!0;var se=f;try{for(y(V),d=n(l);d!==null&&(!(d.expirationTime>V)||H&&!N());){var je=d.callback;if(typeof je=="function"){d.callback=null,f=d.priorityLevel;var Ge=je(d.expirationTime<=V);V=e.unstable_now(),typeof Ge=="function"?d.callback=Ge:d===n(l)&&r(l),y(V)}else r(l);d=n(l)}if(d!==null)var Le=!0;else{var _e=n(c);_e!==null&&ce(_,_e.startTime-V),Le=!1}return Le}finally{d=null,f=se,m=!1}}var R=!1,P=null,I=-1,$=5,L=-1;function N(){return!(e.unstable_now()-L<$)}function F(){if(P!==null){var H=e.unstable_now();L=H;var V=!0;try{V=P(!0,H)}finally{V?z():(R=!1,P=null)}}else R=!1}var z;if(typeof w=="function")z=function(){w(F)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,Z=K.port2;K.port1.onmessage=F,z=function(){Z.postMessage(null)}}else z=function(){E(F,0)};function le(H){P=H,R||(R=!0,z())}function ce(H,V){I=E(function(){H(e.unstable_now())},V)}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(H){H.callback=null},e.unstable_continueExecution=function(){h||m||(h=!0,le(k))},e.unstable_forceFrameRate=function(H){0>H||125je?(H.sortIndex=se,t(c,H),n(l)===null&&H===n(c)&&(g?(b(I),I=-1):g=!0,ce(_,se-je))):(H.sortIndex=Ge,t(l,H),h||m||(h=!0,le(k))),H},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(H){var V=f;return function(){var se=f;f=V;try{return H.apply(this,arguments)}finally{f=se}}}})(s2);o2.exports=s2;var XM=o2.exports;/** + */(function(e){function t(H,V){var se=H.length;H.push(V);e:for(;0>>1,Ge=H[je];if(0>>1;jei(Ve,se))Pei(ct,Ve)?(H[je]=ct,H[Pe]=se,je=Pe):(H[je]=Ve,H[_e]=se,je=_e);else if(Pei(ct,se))H[je]=ct,H[Pe]=se,je=Pe;else break e}}return V}function i(H,V){var se=H.sortIndex-V.sortIndex;return se!==0?se:H.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,f=3,m=!1,h=!1,g=!1,R=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(H){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=H)r(c),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(c)}}function _(H){if(g=!1,y(H),!h)if(n(l)!==null)h=!0,le(k);else{var V=n(c);V!==null&&ce(_,V.startTime-H)}}function k(H,V){h=!1,g&&(g=!1,b(I),I=-1),m=!0;var se=f;try{for(y(V),d=n(l);d!==null&&(!(d.expirationTime>V)||H&&!N());){var je=d.callback;if(typeof je=="function"){d.callback=null,f=d.priorityLevel;var Ge=je(d.expirationTime<=V);V=e.unstable_now(),typeof Ge=="function"?d.callback=Ge:d===n(l)&&r(l),y(V)}else r(l);d=n(l)}if(d!==null)var Le=!0;else{var _e=n(c);_e!==null&&ce(_,_e.startTime-V),Le=!1}return Le}finally{d=null,f=se,m=!1}}var E=!1,P=null,I=-1,A=5,L=-1;function N(){return!(e.unstable_now()-LH||125je?(H.sortIndex=se,t(c,H),n(l)===null&&H===n(c)&&(g?(b(I),I=-1):g=!0,ce(_,se-je))):(H.sortIndex=Ge,t(l,H),h||m||(h=!0,le(k))),H},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(H){var V=f;return function(){var se=f;f=V;try{return H.apply(this,arguments)}finally{f=se}}}})(s2);o2.exports=s2;var VM=o2.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function VR(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sb=Object.prototype.hasOwnProperty,ZM=/^[: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]*$/,l_={},c_={};function eN(e){return sb.call(c_,e)?!0:sb.call(l_,e)?!1:ZM.test(e)?c_[e]=!0:(l_[e]=!0,!1)}function tN(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function nN(e,t,n,r){if(t===null||typeof t>"u"||tN(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Kr(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var lr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){lr[e]=new Kr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];lr[t]=new Kr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){lr[e]=new Kr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){lr[e]=new Kr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){lr[e]=new Kr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){lr[e]=new Kr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){lr[e]=new Kr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){lr[e]=new Kr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){lr[e]=new Kr(e,5,!1,e.toLowerCase(),null,!1,!1)});var sw=/[\-:]([a-z])/g;function aw(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(sw,aw);lr[t]=new Kr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(sw,aw);lr[t]=new Kr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(sw,aw);lr[t]=new Kr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){lr[e]=new Kr(e,1,!1,e.toLowerCase(),null,!1,!1)});lr.xlinkHref=new Kr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){lr[e]=new Kr(e,1,!1,e.toLowerCase(),null,!0,!0)});function lw(e,t,n,r){var i=lr.hasOwnProperty(t)?lr[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sb=Object.prototype.hasOwnProperty,qM=/^[: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]*$/,l_={},c_={};function YM(e){return sb.call(c_,e)?!0:sb.call(l_,e)?!1:qM.test(e)?c_[e]=!0:(l_[e]=!0,!1)}function QM(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function XM(e,t,n,r){if(t===null||typeof t>"u"||QM(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Kr(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var lr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){lr[e]=new Kr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];lr[t]=new Kr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){lr[e]=new Kr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){lr[e]=new Kr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){lr[e]=new Kr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){lr[e]=new Kr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){lr[e]=new Kr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){lr[e]=new Kr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){lr[e]=new Kr(e,5,!1,e.toLowerCase(),null,!1,!1)});var sw=/[\-:]([a-z])/g;function aw(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(sw,aw);lr[t]=new Kr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(sw,aw);lr[t]=new Kr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(sw,aw);lr[t]=new Kr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){lr[e]=new Kr(e,1,!1,e.toLowerCase(),null,!1,!1)});lr.xlinkHref=new Kr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){lr[e]=new Kr(e,1,!1,e.toLowerCase(),null,!0,!0)});function lw(e,t,n,r){var i=lr.hasOwnProperty(t)?lr[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` -`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Oy=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Md(e):""}function rN(e){switch(e.tag){case 5:return Md(e.type);case 16:return Md("Lazy");case 13:return Md("Suspense");case 19:return Md("SuspenseList");case 0:case 2:case 15:return e=jy(e.type,!1),e;case 11:return e=jy(e.type.render,!1),e;case 1:return e=jy(e.type,!0),e;default:return""}}function ub(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gc:return"Fragment";case Wc:return"Portal";case ab:return"Profiler";case cw:return"StrictMode";case lb:return"Suspense";case cb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c2:return(e.displayName||"Context")+".Consumer";case l2:return(e._context.displayName||"Context")+".Provider";case uw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dw:return t=e.displayName||null,t!==null?t:ub(e.type)||"Memo";case ha:t=e._payload,e=e._init;try{return ub(e(t))}catch{}}return null}function iN(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ub(t);case 8:return t===cw?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Da(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function d2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function oN(e){var t=d2(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qp(e){e._valueTracker||(e._valueTracker=oN(e))}function f2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=d2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function dm(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function db(e,t){var n=t.checked;return _n({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function d_(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Da(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function p2(e,t){t=t.checked,t!=null&&lw(e,"checked",t,!1)}function fb(e,t){p2(e,t);var n=Da(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pb(e,t.type,n):t.hasOwnProperty("defaultValue")&&pb(e,t.type,Da(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function f_(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pb(e,t,n){(t!=="number"||dm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Nd=Array.isArray;function ru(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Xp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gd={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},sN=["Webkit","ms","Moz","O"];Object.keys(Gd).forEach(function(e){sN.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gd[t]=Gd[e]})});function v2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gd.hasOwnProperty(e)&&Gd[e]?(""+t).trim():t+"px"}function y2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=v2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var aN=_n({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 gb(e,t){if(t){if(aN[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function vb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yb=null;function fw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bb=null,iu=null,ou=null;function m_(e){if(e=ap(e)){if(typeof bb!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=Tg(t),bb(e.stateNode,e.type,t))}}function b2(e){iu?ou?ou.push(e):ou=[e]:iu=e}function w2(){if(iu){var e=iu,t=ou;if(ou=iu=null,m_(e),t)for(e=0;e>>=0,e===0?32:31-(yN(e)/bN|0)|0}var Jp=64,Zp=4194304;function $d(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function mm(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=$d(a):(o&=s,o!==0&&(r=$d(o)))}else s=n&~i,s!==0?r=$d(s):o!==0&&(r=$d(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function op(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-To(t),e[t]=n}function _N(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Vd),C_=" ",k_=!1;function F2(e,t){switch(e){case"keyup":return XN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function z2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hc=!1;function ZN(e,t){switch(e){case"compositionend":return z2(t);case"keypress":return t.which!==32?null:(k_=!0,C_);case"textInput":return e=t.data,e===C_&&k_?null:e;default:return null}}function e$(e,t){if(Hc)return e==="compositionend"||!ww&&F2(e,t)?(e=D2(),Ah=vw=wa=null,Hc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=T_(n)}}function H2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?H2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function V2(){for(var e=window,t=dm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=dm(e.document)}return t}function xw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function c$(e){var t=V2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&H2(n.ownerDocument.documentElement,n)){if(r!==null&&xw(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=O_(n,o);var s=O_(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Vc=null,kb=null,qd=null,Eb=!1;function j_(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Eb||Vc==null||Vc!==dm(r)||(r=Vc,"selectionStart"in r&&xw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),qd&&Cf(qd,r)||(qd=r,r=ym(kb,"onSelect"),0Yc||(e.current=Lb[Yc],Lb[Yc]=null,Yc--)}function pn(e,t){Yc++,Lb[Yc]=e.current,e.current=t}var Ba={},Cr=Va(Ba),ni=Va(!1),Bl=Ba;function vu(e,t){var n=e.type.contextTypes;if(!n)return Ba;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ri(e){return e=e.childContextTypes,e!=null}function wm(){mn(ni),mn(Cr)}function D_(e,t,n){if(Cr.current!==Ba)throw Error(Ne(168));pn(Cr,t),pn(ni,n)}function tP(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ne(108,iN(e)||"Unknown",i));return _n({},n,r)}function xm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ba,Bl=Cr.current,pn(Cr,e),pn(ni,ni.current),!0}function B_(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=tP(e,t,Bl),r.__reactInternalMemoizedMergedChildContext=e,mn(ni),mn(Cr),pn(Cr,e)):mn(ni),pn(ni,n)}var _s=null,Og=!1,Hy=!1;function nP(e){_s===null?_s=[e]:_s.push(e)}function x$(e){Og=!0,nP(e)}function Ka(){if(!Hy&&_s!==null){Hy=!0;var e=0,t=Jt;try{var n=_s;for(Jt=1;e>=s,i-=s,Es=1<<32-To(t)+i|n<I?($=P,P=null):$=P.sibling;var L=f(b,P,y[I],_);if(L===null){P===null&&(P=$);break}e&&P&&L.alternate===null&&t(b,P),w=o(L,w,I),R===null?k=L:R.sibling=L,R=L,P=$}if(I===y.length)return n(b,P),vn&&ml(b,I),k;if(P===null){for(;II?($=P,P=null):$=P.sibling;var N=f(b,P,L.value,_);if(N===null){P===null&&(P=$);break}e&&P&&N.alternate===null&&t(b,P),w=o(N,w,I),R===null?k=N:R.sibling=N,R=N,P=$}if(L.done)return n(b,P),vn&&ml(b,I),k;if(P===null){for(;!L.done;I++,L=y.next())L=d(b,L.value,_),L!==null&&(w=o(L,w,I),R===null?k=L:R.sibling=L,R=L);return vn&&ml(b,I),k}for(P=r(b,P);!L.done;I++,L=y.next())L=m(P,b,I,L.value,_),L!==null&&(e&&L.alternate!==null&&P.delete(L.key===null?I:L.key),w=o(L,w,I),R===null?k=L:R.sibling=L,R=L);return e&&P.forEach(function(F){return t(b,F)}),vn&&ml(b,I),k}function E(b,w,y,_){if(typeof y=="object"&&y!==null&&y.type===Gc&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Yp:e:{for(var k=y.key,R=w;R!==null;){if(R.key===k){if(k=y.type,k===Gc){if(R.tag===7){n(b,R.sibling),w=i(R,y.props.children),w.return=b,b=w;break e}}else if(R.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ha&&U_(k)===R.type){n(b,R.sibling),w=i(R,y.props),w.ref=gd(b,R,y),w.return=b,b=w;break e}n(b,R);break}else t(b,R);R=R.sibling}y.type===Gc?(w=Il(y.props.children,b.mode,_,y.key),w.return=b,b=w):(_=Hh(y.type,y.key,y.props,null,b.mode,_),_.ref=gd(b,w,y),_.return=b,b=_)}return s(b);case Wc:e:{for(R=y.key;w!==null;){if(w.key===R)if(w.tag===4&&w.stateNode.containerInfo===y.containerInfo&&w.stateNode.implementation===y.implementation){n(b,w.sibling),w=i(w,y.children||[]),w.return=b,b=w;break e}else{n(b,w);break}else t(b,w);w=w.sibling}w=Zy(y,b.mode,_),w.return=b,b=w}return s(b);case ha:return R=y._init,E(b,w,R(y._payload),_)}if(Nd(y))return h(b,w,y,_);if(dd(y))return g(b,w,y,_);sh(b,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,w!==null&&w.tag===6?(n(b,w.sibling),w=i(w,y),w.return=b,b=w):(n(b,w),w=Jy(y,b.mode,_),w.return=b,b=w),s(b)):n(b,w)}return E}var bu=sP(!0),aP=sP(!1),Cm=Va(null),km=null,Jc=null,kw=null;function Ew(){kw=Jc=km=null}function Rw(e){var t=Cm.current;mn(Cm),e._currentValue=t}function Nb(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function au(e,t){km=e,kw=Jc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ti=!0),e.firstContext=null)}function Zi(e){var t=e._currentValue;if(kw!==e)if(e={context:e,memoizedValue:t,next:null},Jc===null){if(km===null)throw Error(Ne(308));Jc=e,km.dependencies={lanes:0,firstContext:e}}else Jc=Jc.next=e;return t}var _l=null;function Pw(e){_l===null?_l=[e]:_l.push(e)}function lP(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Pw(t)):(n.next=i.next,i.next=n),t.interleaved=n,Bs(e,r)}function Bs(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ma=!1;function Tw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cP(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function js(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Oa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ut&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Bs(e,n)}return i=r.interleaved,i===null?(t.next=t,Pw(r)):(t.next=i.next,i.next=t),r.interleaved=t,Bs(e,n)}function Bh(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hw(e,n)}}function W_(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Em(e,t,n,r){var i=e.updateQueue;ma=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;s=0,u=c=l=null,a=o;do{var f=a.lane,m=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,g=a;switch(f=t,m=n,g.tag){case 1:if(h=g.payload,typeof h=="function"){d=h.call(m,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h=="function"?h.call(m,d,f):h,f==null)break e;d=_n({},d,f);break e;case 2:ma=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=m,l=d):u=u.next=m,s|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ul|=s,e.lanes=s,e.memoizedState=d}}function G_(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ky.transition;Ky.transition={};try{e(!1),t()}finally{Jt=n,Ky.transition=r}}function EP(){return eo().memoizedState}function k$(e,t,n){var r=La(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},RP(e))PP(t,n);else if(n=lP(e,t,n,r),n!==null){var i=Gr();Oo(n,e,r,i),TP(n,t,r)}}function E$(e,t,n){var r=La(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(RP(e))PP(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Io(a,s)){var l=t.interleaved;l===null?(i.next=i,Pw(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=lP(e,t,i,r),n!==null&&(i=Gr(),Oo(n,e,r,i),TP(n,t,r))}}function RP(e){var t=e.alternate;return e===Sn||t!==null&&t===Sn}function PP(e,t){Yd=Pm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function TP(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hw(e,n)}}var Tm={readContext:Zi,useCallback:yr,useContext:yr,useEffect:yr,useImperativeHandle:yr,useInsertionEffect:yr,useLayoutEffect:yr,useMemo:yr,useReducer:yr,useRef:yr,useState:yr,useDebugValue:yr,useDeferredValue:yr,useTransition:yr,useMutableSource:yr,useSyncExternalStore:yr,useId:yr,unstable_isNewReconciler:!1},R$={readContext:Zi,useCallback:function(e,t){return Vo().memoizedState=[e,t===void 0?null:t],e},useContext:Zi,useEffect:V_,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zh(4194308,4,xP.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zh(4194308,4,e,t)},useInsertionEffect:function(e,t){return zh(4,2,e,t)},useMemo:function(e,t){var n=Vo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vo();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=k$.bind(null,Sn,e),[r.memoizedState,e]},useRef:function(e){var t=Vo();return e={current:e},t.memoizedState=e},useState:H_,useDebugValue:Aw,useDeferredValue:function(e){return Vo().memoizedState=e},useTransition:function(){var e=H_(!1),t=e[0];return e=C$.bind(null,e[1]),Vo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Sn,i=Vo();if(vn){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),Jn===null)throw Error(Ne(349));zl&30||pP(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,V_(mP.bind(null,r,o,e),[e]),r.flags|=2048,Lf(9,hP.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Vo(),t=Jn.identifierPrefix;if(vn){var n=Rs,r=Es;n=(r&~(1<<32-To(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Of++,0")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Oy=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Md(e):""}function JM(e){switch(e.tag){case 5:return Md(e.type);case 16:return Md("Lazy");case 13:return Md("Suspense");case 19:return Md("SuspenseList");case 0:case 2:case 15:return e=jy(e.type,!1),e;case 11:return e=jy(e.type.render,!1),e;case 1:return e=jy(e.type,!0),e;default:return""}}function ub(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gc:return"Fragment";case Wc:return"Portal";case ab:return"Profiler";case cw:return"StrictMode";case lb:return"Suspense";case cb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c2:return(e.displayName||"Context")+".Consumer";case l2:return(e._context.displayName||"Context")+".Provider";case uw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dw:return t=e.displayName||null,t!==null?t:ub(e.type)||"Memo";case ha:t=e._payload,e=e._init;try{return ub(e(t))}catch{}}return null}function ZM(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ub(t);case 8:return t===cw?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Da(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function d2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function eN(e){var t=d2(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qp(e){e._valueTracker||(e._valueTracker=eN(e))}function f2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=d2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function dm(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function db(e,t){var n=t.checked;return _n({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function d_(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Da(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function p2(e,t){t=t.checked,t!=null&&lw(e,"checked",t,!1)}function fb(e,t){p2(e,t);var n=Da(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pb(e,t.type,n):t.hasOwnProperty("defaultValue")&&pb(e,t.type,Da(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function f_(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pb(e,t,n){(t!=="number"||dm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Nd=Array.isArray;function ru(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Xp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gd={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},tN=["Webkit","ms","Moz","O"];Object.keys(Gd).forEach(function(e){tN.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gd[t]=Gd[e]})});function v2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gd.hasOwnProperty(e)&&Gd[e]?(""+t).trim():t+"px"}function y2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=v2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var nN=_n({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 gb(e,t){if(t){if(nN[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function vb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yb=null;function fw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bb=null,iu=null,ou=null;function m_(e){if(e=ap(e)){if(typeof bb!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=Tg(t),bb(e.stateNode,e.type,t))}}function b2(e){iu?ou?ou.push(e):ou=[e]:iu=e}function w2(){if(iu){var e=iu,t=ou;if(ou=iu=null,m_(e),t)for(e=0;e>>=0,e===0?32:31-(pN(e)/hN|0)|0}var Jp=64,Zp=4194304;function $d(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function mm(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=$d(a):(o&=s,o!==0&&(r=$d(o)))}else s=n&~i,s!==0?r=$d(s):o!==0&&(r=$d(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function op(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-To(t),e[t]=n}function yN(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Vd),C_=" ",k_=!1;function F2(e,t){switch(e){case"keyup":return VN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function z2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hc=!1;function qN(e,t){switch(e){case"compositionend":return z2(t);case"keypress":return t.which!==32?null:(k_=!0,C_);case"textInput":return e=t.data,e===C_&&k_?null:e;default:return null}}function YN(e,t){if(Hc)return e==="compositionend"||!ww&&F2(e,t)?(e=D2(),Ah=vw=wa=null,Hc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=T_(n)}}function H2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?H2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function V2(){for(var e=window,t=dm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=dm(e.document)}return t}function xw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function i$(e){var t=V2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&H2(n.ownerDocument.documentElement,n)){if(r!==null&&xw(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=O_(n,o);var s=O_(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Vc=null,kb=null,qd=null,Eb=!1;function j_(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Eb||Vc==null||Vc!==dm(r)||(r=Vc,"selectionStart"in r&&xw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),qd&&Cf(qd,r)||(qd=r,r=ym(kb,"onSelect"),0Yc||(e.current=Lb[Yc],Lb[Yc]=null,Yc--)}function pn(e,t){Yc++,Lb[Yc]=e.current,e.current=t}var Ba={},Cr=Va(Ba),ni=Va(!1),Bl=Ba;function vu(e,t){var n=e.type.contextTypes;if(!n)return Ba;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ri(e){return e=e.childContextTypes,e!=null}function wm(){mn(ni),mn(Cr)}function D_(e,t,n){if(Cr.current!==Ba)throw Error(Ne(168));pn(Cr,t),pn(ni,n)}function tP(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ne(108,ZM(e)||"Unknown",i));return _n({},n,r)}function xm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ba,Bl=Cr.current,pn(Cr,e),pn(ni,ni.current),!0}function B_(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=tP(e,t,Bl),r.__reactInternalMemoizedMergedChildContext=e,mn(ni),mn(Cr),pn(Cr,e)):mn(ni),pn(ni,n)}var _s=null,Og=!1,Hy=!1;function nP(e){_s===null?_s=[e]:_s.push(e)}function g$(e){Og=!0,nP(e)}function Ka(){if(!Hy&&_s!==null){Hy=!0;var e=0,t=Jt;try{var n=_s;for(Jt=1;e>=s,i-=s,Es=1<<32-To(t)+i|n<I?(A=P,P=null):A=P.sibling;var L=f(b,P,y[I],_);if(L===null){P===null&&(P=A);break}e&&P&&L.alternate===null&&t(b,P),w=o(L,w,I),E===null?k=L:E.sibling=L,E=L,P=A}if(I===y.length)return n(b,P),vn&&ml(b,I),k;if(P===null){for(;II?(A=P,P=null):A=P.sibling;var N=f(b,P,L.value,_);if(N===null){P===null&&(P=A);break}e&&P&&N.alternate===null&&t(b,P),w=o(N,w,I),E===null?k=N:E.sibling=N,E=N,P=A}if(L.done)return n(b,P),vn&&ml(b,I),k;if(P===null){for(;!L.done;I++,L=y.next())L=d(b,L.value,_),L!==null&&(w=o(L,w,I),E===null?k=L:E.sibling=L,E=L);return vn&&ml(b,I),k}for(P=r(b,P);!L.done;I++,L=y.next())L=m(P,b,I,L.value,_),L!==null&&(e&&L.alternate!==null&&P.delete(L.key===null?I:L.key),w=o(L,w,I),E===null?k=L:E.sibling=L,E=L);return e&&P.forEach(function(F){return t(b,F)}),vn&&ml(b,I),k}function R(b,w,y,_){if(typeof y=="object"&&y!==null&&y.type===Gc&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Yp:e:{for(var k=y.key,E=w;E!==null;){if(E.key===k){if(k=y.type,k===Gc){if(E.tag===7){n(b,E.sibling),w=i(E,y.props.children),w.return=b,b=w;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ha&&U_(k)===E.type){n(b,E.sibling),w=i(E,y.props),w.ref=gd(b,E,y),w.return=b,b=w;break e}n(b,E);break}else t(b,E);E=E.sibling}y.type===Gc?(w=Il(y.props.children,b.mode,_,y.key),w.return=b,b=w):(_=Hh(y.type,y.key,y.props,null,b.mode,_),_.ref=gd(b,w,y),_.return=b,b=_)}return s(b);case Wc:e:{for(E=y.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===y.containerInfo&&w.stateNode.implementation===y.implementation){n(b,w.sibling),w=i(w,y.children||[]),w.return=b,b=w;break e}else{n(b,w);break}else t(b,w);w=w.sibling}w=Zy(y,b.mode,_),w.return=b,b=w}return s(b);case ha:return E=y._init,R(b,w,E(y._payload),_)}if(Nd(y))return h(b,w,y,_);if(dd(y))return g(b,w,y,_);sh(b,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,w!==null&&w.tag===6?(n(b,w.sibling),w=i(w,y),w.return=b,b=w):(n(b,w),w=Jy(y,b.mode,_),w.return=b,b=w),s(b)):n(b,w)}return R}var bu=sP(!0),aP=sP(!1),Cm=Va(null),km=null,Jc=null,kw=null;function Ew(){kw=Jc=km=null}function Rw(e){var t=Cm.current;mn(Cm),e._currentValue=t}function Nb(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function au(e,t){km=e,kw=Jc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ti=!0),e.firstContext=null)}function Zi(e){var t=e._currentValue;if(kw!==e)if(e={context:e,memoizedValue:t,next:null},Jc===null){if(km===null)throw Error(Ne(308));Jc=e,km.dependencies={lanes:0,firstContext:e}}else Jc=Jc.next=e;return t}var _l=null;function Pw(e){_l===null?_l=[e]:_l.push(e)}function lP(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Pw(t)):(n.next=i.next,i.next=n),t.interleaved=n,Bs(e,r)}function Bs(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ma=!1;function Tw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cP(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function js(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Oa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ut&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Bs(e,n)}return i=r.interleaved,i===null?(t.next=t,Pw(r)):(t.next=i.next,i.next=t),r.interleaved=t,Bs(e,n)}function Bh(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hw(e,n)}}function W_(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Em(e,t,n,r){var i=e.updateQueue;ma=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;s=0,u=c=l=null,a=o;do{var f=a.lane,m=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,g=a;switch(f=t,m=n,g.tag){case 1:if(h=g.payload,typeof h=="function"){d=h.call(m,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h=="function"?h.call(m,d,f):h,f==null)break e;d=_n({},d,f);break e;case 2:ma=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=m,l=d):u=u.next=m,s|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ul|=s,e.lanes=s,e.memoizedState=d}}function G_(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ky.transition;Ky.transition={};try{e(!1),t()}finally{Jt=n,Ky.transition=r}}function EP(){return eo().memoizedState}function w$(e,t,n){var r=La(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},RP(e))PP(t,n);else if(n=lP(e,t,n,r),n!==null){var i=Gr();Oo(n,e,r,i),TP(n,t,r)}}function x$(e,t,n){var r=La(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(RP(e))PP(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Io(a,s)){var l=t.interleaved;l===null?(i.next=i,Pw(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=lP(e,t,i,r),n!==null&&(i=Gr(),Oo(n,e,r,i),TP(n,t,r))}}function RP(e){var t=e.alternate;return e===Sn||t!==null&&t===Sn}function PP(e,t){Yd=Pm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function TP(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hw(e,n)}}var Tm={readContext:Zi,useCallback:yr,useContext:yr,useEffect:yr,useImperativeHandle:yr,useInsertionEffect:yr,useLayoutEffect:yr,useMemo:yr,useReducer:yr,useRef:yr,useState:yr,useDebugValue:yr,useDeferredValue:yr,useTransition:yr,useMutableSource:yr,useSyncExternalStore:yr,useId:yr,unstable_isNewReconciler:!1},S$={readContext:Zi,useCallback:function(e,t){return Vo().memoizedState=[e,t===void 0?null:t],e},useContext:Zi,useEffect:V_,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zh(4194308,4,xP.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zh(4194308,4,e,t)},useInsertionEffect:function(e,t){return zh(4,2,e,t)},useMemo:function(e,t){var n=Vo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vo();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=w$.bind(null,Sn,e),[r.memoizedState,e]},useRef:function(e){var t=Vo();return e={current:e},t.memoizedState=e},useState:H_,useDebugValue:Aw,useDeferredValue:function(e){return Vo().memoizedState=e},useTransition:function(){var e=H_(!1),t=e[0];return e=b$.bind(null,e[1]),Vo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Sn,i=Vo();if(vn){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),Jn===null)throw Error(Ne(349));zl&30||pP(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,V_(mP.bind(null,r,o,e),[e]),r.flags|=2048,Lf(9,hP.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Vo(),t=Jn.identifierPrefix;if(vn){var n=Rs,r=Es;n=(r&~(1<<32-To(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Of++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Xo]=t,e[Rf]=r,BP(e,t,!1,!1),t.stateNode=e;e:{switch(s=vb(n,r),n){case"dialog":hn("cancel",e),hn("close",e),i=r;break;case"iframe":case"object":case"embed":hn("load",e),i=r;break;case"video":case"audio":for(i=0;iSu&&(t.flags|=128,r=!0,vd(o,!1),t.lanes=4194304)}else{if(!r)if(e=Rm(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vd(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!vn)return br(t),null}else 2*jn()-o.renderingStartTime>Su&&n!==1073741824&&(t.flags|=128,r=!0,vd(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=jn(),t.sibling=null,n=xn.current,pn(xn,r?n&1|2:n&1),t):(br(t),null);case 22:case 23:return Ww(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?gi&1073741824&&(br(t),t.subtreeFlags&6&&(t.flags|=8192)):br(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function N$(e,t){switch(_w(t),t.tag){case 1:return ri(t.type)&&wm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wu(),mn(ni),mn(Cr),Lw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return jw(t),null;case 13:if(mn(xn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));yu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return mn(xn),null;case 4:return wu(),null;case 10:return Rw(t.type._context),null;case 22:case 23:return Ww(),null;case 24:return null;default:return null}}var lh=!1,_r=!1,$$=typeof WeakSet=="function"?WeakSet:Set,tt=null;function Zc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Pn(e,t,r)}else n.current=null}function Gb(e,t,n){try{n()}catch(r){Pn(e,t,r)}}var rC=!1;function A$(e,t){if(Rb=gm,e=V2(),xw(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var m;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(m=d.firstChild)!==null;)f=d,d=m;for(;;){if(d===e)break t;if(f===n&&++c===i&&(a=s),f===o&&++u===r&&(l=s),(m=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pb={focusedElem:e,selectionRange:n},gm=!1,tt=t;tt!==null;)if(t=tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,tt=e;else for(;tt!==null;){t=tt;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,E=h.memoizedState,b=t.stateNode,w=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:So(t.type,g),E);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(_){Pn(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,tt=e;break}tt=t.return}return h=rC,rC=!1,h}function Qd(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Gb(t,n,o)}i=i.next}while(i!==r)}}function Ig(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Hb(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function UP(e){var t=e.alternate;t!==null&&(e.alternate=null,UP(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xo],delete t[Rf],delete t[jb],delete t[b$],delete t[w$])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function WP(e){return e.tag===5||e.tag===3||e.tag===4}function iC(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||WP(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bm));else if(r!==4&&(e=e.child,e!==null))for(Vb(e,t,n),e=e.sibling;e!==null;)Vb(e,t,n),e=e.sibling}function Kb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Kb(e,t,n),e=e.sibling;e!==null;)Kb(e,t,n),e=e.sibling}var rr=null,_o=!1;function la(e,t,n){for(n=n.child;n!==null;)GP(e,t,n),n=n.sibling}function GP(e,t,n){if(ns&&typeof ns.onCommitFiberUnmount=="function")try{ns.onCommitFiberUnmount(kg,n)}catch{}switch(n.tag){case 5:_r||Zc(n,t);case 6:var r=rr,i=_o;rr=null,la(e,t,n),rr=r,_o=i,rr!==null&&(_o?(e=rr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):rr.removeChild(n.stateNode));break;case 18:rr!==null&&(_o?(e=rr,n=n.stateNode,e.nodeType===8?Gy(e.parentNode,n):e.nodeType===1&&Gy(e,n),Sf(e)):Gy(rr,n.stateNode));break;case 4:r=rr,i=_o,rr=n.stateNode.containerInfo,_o=!0,la(e,t,n),rr=r,_o=i;break;case 0:case 11:case 14:case 15:if(!_r&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Gb(n,t,s),i=i.next}while(i!==r)}la(e,t,n);break;case 1:if(!_r&&(Zc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Pn(n,t,a)}la(e,t,n);break;case 21:la(e,t,n);break;case 22:n.mode&1?(_r=(r=_r)||n.memoizedState!==null,la(e,t,n),_r=r):la(e,t,n);break;default:la(e,t,n)}}function oC(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new $$),t.forEach(function(r){var i=V$.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=jn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*B$(r/1960))-r,10e?16:e,xa===null)var r=!1;else{if(e=xa,xa=null,Lm=0,Ut&6)throw Error(Ne(331));var i=Ut;for(Ut|=4,tt=e.current;tt!==null;){var o=tt,s=o.child;if(tt.flags&16){var a=o.deletions;if(a!==null){for(var l=0;ljn()-zw?Ll(e,0):Fw|=n),ii(e,t)}function JP(e,t){t===0&&(e.mode&1?(t=Zp,Zp<<=1,!(Zp&130023424)&&(Zp=4194304)):t=1);var n=Gr();e=Bs(e,t),e!==null&&(op(e,t,n),ii(e,n))}function H$(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),JP(e,n)}function V$(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ne(314))}r!==null&&r.delete(t),JP(e,n)}var ZP;ZP=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ni.current)ti=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ti=!1,I$(e,t,n);ti=!!(e.flags&131072)}else ti=!1,vn&&t.flags&1048576&&rP(t,_m,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Uh(e,t),e=t.pendingProps;var i=vu(t,Cr.current);au(t,n),i=Mw(null,t,r,e,i,n);var o=Nw();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ri(r)?(o=!0,xm(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Tw(t),i.updater=Lg,t.stateNode=i,i._reactInternals=t,Ab(t,r,e,n),t=Fb(null,t,r,!0,o,n)):(t.tag=0,vn&&o&&Sw(t),Wr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Uh(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=q$(r),e=So(r,e),i){case 0:t=Bb(null,t,r,e,n);break e;case 1:t=eC(null,t,r,e,n);break e;case 11:t=J_(null,t,r,e,n);break e;case 14:t=Z_(null,t,r,So(r.type,e),n);break e}throw Error(Ne(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:So(r,i),Bb(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:So(r,i),eC(e,t,r,i,n);case 3:e:{if($P(t),e===null)throw Error(Ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,cP(e,t),Em(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=xu(Error(Ne(423)),t),t=tC(e,t,r,n,i);break e}else if(r!==i){i=xu(Error(Ne(424)),t),t=tC(e,t,r,n,i);break e}else for(_i=Ta(t.stateNode.containerInfo.firstChild),Ei=t,vn=!0,Ro=null,n=aP(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yu(),r===i){t=Fs(e,t,n);break e}Wr(e,t,r,n)}t=t.child}return t;case 5:return uP(t),e===null&&Mb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Tb(r,i)?s=null:o!==null&&Tb(r,o)&&(t.flags|=32),NP(e,t),Wr(e,t,s,n),t.child;case 6:return e===null&&Mb(t),null;case 13:return AP(e,t,n);case 4:return Ow(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bu(t,null,r,n):Wr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:So(r,i),J_(e,t,r,i,n);case 7:return Wr(e,t,t.pendingProps,n),t.child;case 8:return Wr(e,t,t.pendingProps.children,n),t.child;case 12:return Wr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,pn(Cm,r._currentValue),r._currentValue=s,o!==null)if(Io(o.value,s)){if(o.children===i.children&&!ni.current){t=Fs(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=js(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Nb(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Ne(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Nb(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Wr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,au(t,n),i=Zi(i),r=r(i),t.flags|=1,Wr(e,t,r,n),t.child;case 14:return r=t.type,i=So(r,t.pendingProps),i=So(r.type,i),Z_(e,t,r,i,n);case 15:return IP(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:So(r,i),Uh(e,t),t.tag=1,ri(r)?(e=!0,xm(t)):e=!1,au(t,n),OP(t,r,i),Ab(t,r,i,n),Fb(null,t,r,!0,e,n);case 19:return DP(e,t,n);case 22:return MP(e,t,n)}throw Error(Ne(156,t.tag))};function eT(e,t){return R2(e,t)}function K$(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qi(e,t,n,r){return new K$(e,t,n,r)}function Hw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function q$(e){if(typeof e=="function")return Hw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===uw)return 11;if(e===dw)return 14}return 2}function Ia(e,t){var n=e.alternate;return n===null?(n=qi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Hh(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Hw(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Gc:return Il(n.children,i,o,t);case cw:s=8,i|=8;break;case ab:return e=qi(12,n,t,i|2),e.elementType=ab,e.lanes=o,e;case lb:return e=qi(13,n,t,i),e.elementType=lb,e.lanes=o,e;case cb:return e=qi(19,n,t,i),e.elementType=cb,e.lanes=o,e;case u2:return Ng(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l2:s=10;break e;case c2:s=9;break e;case uw:s=11;break e;case dw:s=14;break e;case ha:s=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=qi(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Il(e,t,n,r){return e=qi(7,e,r,t),e.lanes=n,e}function Ng(e,t,n,r){return e=qi(22,e,r,t),e.elementType=u2,e.lanes=n,e.stateNode={isHidden:!1},e}function Jy(e,t,n){return e=qi(6,e,null,t),e.lanes=n,e}function Zy(e,t,n){return t=qi(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Y$(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Iy(0),this.expirationTimes=Iy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Iy(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Vw(e,t,n,r,i,o,s,a,l){return e=new Y$(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qi(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tw(o),e}function Q$(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iT)}catch(e){console.error(e)}}iT(),i2.exports=Li;var Fg=i2.exports;const Dd=Ga(Fg),tA=VR({__proto__:null,default:Dd},[Fg]);var pC=Fg;ob.createRoot=pC.createRoot,ob.hydrateRoot=pC.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Qy(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Db(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var k$=typeof WeakMap=="function"?WeakMap:Map;function jP(e,t,n){n=js(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){jm||(jm=!0,qb=r),Db(e,t)},n}function LP(e,t,n){n=js(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Db(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Db(e,t),typeof r!="function"&&(ja===null?ja=new Set([this]):ja.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Y_(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new k$;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=B$.bind(null,e,t,n),t.then(e,e))}function Q_(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function X_(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=js(-1,1),t.tag=2,Oa(n,t,1))),n.lanes|=1),e)}var E$=Ys.ReactCurrentOwner,ti=!1;function Wr(e,t,n,r){t.child=e===null?aP(t,null,n,r):bu(t,e.child,n,r)}function J_(e,t,n,r,i){n=n.render;var o=t.ref;return au(t,i),r=Mw(e,t,n,r,o,i),n=Nw(),e!==null&&!ti?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Fs(e,t,i)):(vn&&n&&Sw(t),t.flags|=1,Wr(e,t,r,i),t.child)}function Z_(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Hw(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,IP(e,t,o,r,i)):(e=Hh(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Cf,n(s,r)&&e.ref===t.ref)return Fs(e,t,i)}return t.flags|=1,e=Ia(o,r),e.ref=t.ref,e.return=t,t.child=e}function IP(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Cf(o,r)&&e.ref===t.ref)if(ti=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(ti=!0);else return t.lanes=e.lanes,Fs(e,t,i)}return Bb(e,t,n,r,i)}function MP(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},pn(eu,gi),gi|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,pn(eu,gi),gi|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,pn(eu,gi),gi|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,pn(eu,gi),gi|=r;return Wr(e,t,i,n),t.child}function NP(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bb(e,t,n,r,i){var o=ri(n)?Bl:Cr.current;return o=vu(t,o),au(t,i),n=Mw(e,t,n,r,o,i),r=Nw(),e!==null&&!ti?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Fs(e,t,i)):(vn&&r&&Sw(t),t.flags|=1,Wr(e,t,n,i),t.child)}function eC(e,t,n,r,i){if(ri(n)){var o=!0;xm(t)}else o=!1;if(au(t,i),t.stateNode===null)Uh(e,t),OP(t,n,r),Ab(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Zi(c):(c=ri(n)?Bl:Cr.current,c=vu(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&q_(t,s,r,c),ma=!1;var f=t.memoizedState;s.state=f,Em(t,r,s,i),l=t.memoizedState,a!==r||f!==l||ni.current||ma?(typeof u=="function"&&($b(t,n,u,r),l=t.memoizedState),(a=ma||K_(t,n,a,r,f,l,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,cP(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:So(t.type,a),s.props=c,d=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Zi(l):(l=ri(n)?Bl:Cr.current,l=vu(t,l));var m=n.getDerivedStateFromProps;(u=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||f!==l)&&q_(t,s,r,l),ma=!1,f=t.memoizedState,s.state=f,Em(t,r,s,i);var h=t.memoizedState;a!==d||f!==h||ni.current||ma?(typeof m=="function"&&($b(t,n,m,r),h=t.memoizedState),(c=ma||K_(t,n,c,r,f,h,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,h,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,h,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),s.props=r,s.state=h,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Fb(e,t,n,r,o,i)}function Fb(e,t,n,r,i,o){NP(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&B_(t,n,!1),Fs(e,t,o);r=t.stateNode,E$.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=bu(t,e.child,null,o),t.child=bu(t,null,a,o)):Wr(e,t,a,o),t.memoizedState=r.state,i&&B_(t,n,!0),t.child}function $P(e){var t=e.stateNode;t.pendingContext?D_(e,t.pendingContext,t.pendingContext!==t.context):t.context&&D_(e,t.context,!1),Ow(e,t.containerInfo)}function tC(e,t,n,r,i){return yu(),Cw(i),t.flags|=256,Wr(e,t,n,r),t.child}var zb={dehydrated:null,treeContext:null,retryLane:0};function Ub(e){return{baseLanes:e,cachePool:null,transitions:null}}function AP(e,t,n){var r=t.pendingProps,i=xn.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),pn(xn,i&1),e===null)return Mb(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Ng(s,r,0,null),e=Il(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ub(n),t.memoizedState=zb,e):Dw(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return R$(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Ia(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=Ia(a,o):(o=Il(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Ub(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=zb,r}return o=e.child,e=o.sibling,r=Ia(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Dw(e,t){return t=Ng({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ah(e,t,n,r){return r!==null&&Cw(r),bu(t,e.child,null,n),e=Dw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function R$(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Qy(Error(Ne(422))),ah(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Ng({mode:"visible",children:r.children},i,0,null),o=Il(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&bu(t,e.child,null,s),t.child.memoizedState=Ub(s),t.memoizedState=zb,o);if(!(t.mode&1))return ah(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(Ne(419)),r=Qy(o,r,void 0),ah(e,t,s,r)}if(a=(s&e.childLanes)!==0,ti||a){if(r=Jn,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Bs(e,i),Oo(r,e,i,-1))}return Gw(),r=Qy(Error(Ne(421))),ah(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=F$.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,_i=Ta(i.nextSibling),Ei=t,vn=!0,Ro=null,e!==null&&(Hi[Vi++]=Es,Hi[Vi++]=Rs,Hi[Vi++]=Fl,Es=e.id,Rs=e.overflow,Fl=t),t=Dw(t,r.children),t.flags|=4096,t)}function nC(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Nb(e.return,t,n)}function Xy(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function DP(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Wr(e,t,r.children,n),r=xn.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nC(e,n,t);else if(e.tag===19)nC(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(pn(xn,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Rm(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Xy(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Rm(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Xy(t,!0,n,null,o);break;case"together":Xy(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Uh(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Fs(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ne(153));if(t.child!==null){for(e=t.child,n=Ia(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ia(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function P$(e,t,n){switch(t.tag){case 3:$P(t),yu();break;case 5:uP(t);break;case 1:ri(t.type)&&xm(t);break;case 4:Ow(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;pn(Cm,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(pn(xn,xn.current&1),t.flags|=128,null):n&t.child.childLanes?AP(e,t,n):(pn(xn,xn.current&1),e=Fs(e,t,n),e!==null?e.sibling:null);pn(xn,xn.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return DP(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),pn(xn,xn.current),r)break;return null;case 22:case 23:return t.lanes=0,MP(e,t,n)}return Fs(e,t,n)}var BP,Wb,FP,zP;BP=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Wb=function(){};FP=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Cl(rs.current);var o=null;switch(n){case"input":i=db(e,i),r=db(e,r),o=[];break;case"select":i=_n({},i,{value:void 0}),r=_n({},r,{value:void 0}),o=[];break;case"textarea":i=hb(e,i),r=hb(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bm)}gb(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(vf.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(vf.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&hn("scroll",e),o||a===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};zP=function(e,t,n,r){n!==r&&(t.flags|=4)};function vd(e,t){if(!vn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function br(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function T$(e,t,n){var r=t.pendingProps;switch(_w(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return br(t),null;case 1:return ri(t.type)&&wm(),br(t),null;case 3:return r=t.stateNode,wu(),mn(ni),mn(Cr),Lw(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(oh(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ro!==null&&(Xb(Ro),Ro=null))),Wb(e,t),br(t),null;case 5:jw(t);var i=Cl(Tf.current);if(n=t.type,e!==null&&t.stateNode!=null)FP(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ne(166));return br(t),null}if(e=Cl(rs.current),oh(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Xo]=t,r[Rf]=o,e=(t.mode&1)!==0,n){case"dialog":hn("cancel",r),hn("close",r);break;case"iframe":case"object":case"embed":hn("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Xo]=t,e[Rf]=r,BP(e,t,!1,!1),t.stateNode=e;e:{switch(s=vb(n,r),n){case"dialog":hn("cancel",e),hn("close",e),i=r;break;case"iframe":case"object":case"embed":hn("load",e),i=r;break;case"video":case"audio":for(i=0;iSu&&(t.flags|=128,r=!0,vd(o,!1),t.lanes=4194304)}else{if(!r)if(e=Rm(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vd(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!vn)return br(t),null}else 2*jn()-o.renderingStartTime>Su&&n!==1073741824&&(t.flags|=128,r=!0,vd(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=jn(),t.sibling=null,n=xn.current,pn(xn,r?n&1|2:n&1),t):(br(t),null);case 22:case 23:return Ww(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?gi&1073741824&&(br(t),t.subtreeFlags&6&&(t.flags|=8192)):br(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function O$(e,t){switch(_w(t),t.tag){case 1:return ri(t.type)&&wm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wu(),mn(ni),mn(Cr),Lw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return jw(t),null;case 13:if(mn(xn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));yu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return mn(xn),null;case 4:return wu(),null;case 10:return Rw(t.type._context),null;case 22:case 23:return Ww(),null;case 24:return null;default:return null}}var lh=!1,_r=!1,j$=typeof WeakSet=="function"?WeakSet:Set,tt=null;function Zc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Pn(e,t,r)}else n.current=null}function Gb(e,t,n){try{n()}catch(r){Pn(e,t,r)}}var rC=!1;function L$(e,t){if(Rb=gm,e=V2(),xw(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var m;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(m=d.firstChild)!==null;)f=d,d=m;for(;;){if(d===e)break t;if(f===n&&++c===i&&(a=s),f===o&&++u===r&&(l=s),(m=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pb={focusedElem:e,selectionRange:n},gm=!1,tt=t;tt!==null;)if(t=tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,tt=e;else for(;tt!==null;){t=tt;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,R=h.memoizedState,b=t.stateNode,w=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:So(t.type,g),R);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(_){Pn(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,tt=e;break}tt=t.return}return h=rC,rC=!1,h}function Qd(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Gb(t,n,o)}i=i.next}while(i!==r)}}function Ig(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Hb(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function UP(e){var t=e.alternate;t!==null&&(e.alternate=null,UP(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xo],delete t[Rf],delete t[jb],delete t[h$],delete t[m$])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function WP(e){return e.tag===5||e.tag===3||e.tag===4}function iC(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||WP(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bm));else if(r!==4&&(e=e.child,e!==null))for(Vb(e,t,n),e=e.sibling;e!==null;)Vb(e,t,n),e=e.sibling}function Kb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Kb(e,t,n),e=e.sibling;e!==null;)Kb(e,t,n),e=e.sibling}var rr=null,_o=!1;function la(e,t,n){for(n=n.child;n!==null;)GP(e,t,n),n=n.sibling}function GP(e,t,n){if(ns&&typeof ns.onCommitFiberUnmount=="function")try{ns.onCommitFiberUnmount(kg,n)}catch{}switch(n.tag){case 5:_r||Zc(n,t);case 6:var r=rr,i=_o;rr=null,la(e,t,n),rr=r,_o=i,rr!==null&&(_o?(e=rr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):rr.removeChild(n.stateNode));break;case 18:rr!==null&&(_o?(e=rr,n=n.stateNode,e.nodeType===8?Gy(e.parentNode,n):e.nodeType===1&&Gy(e,n),Sf(e)):Gy(rr,n.stateNode));break;case 4:r=rr,i=_o,rr=n.stateNode.containerInfo,_o=!0,la(e,t,n),rr=r,_o=i;break;case 0:case 11:case 14:case 15:if(!_r&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Gb(n,t,s),i=i.next}while(i!==r)}la(e,t,n);break;case 1:if(!_r&&(Zc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Pn(n,t,a)}la(e,t,n);break;case 21:la(e,t,n);break;case 22:n.mode&1?(_r=(r=_r)||n.memoizedState!==null,la(e,t,n),_r=r):la(e,t,n);break;default:la(e,t,n)}}function oC(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new j$),t.forEach(function(r){var i=z$.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=jn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*M$(r/1960))-r,10e?16:e,xa===null)var r=!1;else{if(e=xa,xa=null,Lm=0,Ut&6)throw Error(Ne(331));var i=Ut;for(Ut|=4,tt=e.current;tt!==null;){var o=tt,s=o.child;if(tt.flags&16){var a=o.deletions;if(a!==null){for(var l=0;ljn()-zw?Ll(e,0):Fw|=n),ii(e,t)}function JP(e,t){t===0&&(e.mode&1?(t=Zp,Zp<<=1,!(Zp&130023424)&&(Zp=4194304)):t=1);var n=Gr();e=Bs(e,t),e!==null&&(op(e,t,n),ii(e,n))}function F$(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),JP(e,n)}function z$(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ne(314))}r!==null&&r.delete(t),JP(e,n)}var ZP;ZP=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ni.current)ti=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ti=!1,P$(e,t,n);ti=!!(e.flags&131072)}else ti=!1,vn&&t.flags&1048576&&rP(t,_m,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Uh(e,t),e=t.pendingProps;var i=vu(t,Cr.current);au(t,n),i=Mw(null,t,r,e,i,n);var o=Nw();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ri(r)?(o=!0,xm(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Tw(t),i.updater=Lg,t.stateNode=i,i._reactInternals=t,Ab(t,r,e,n),t=Fb(null,t,r,!0,o,n)):(t.tag=0,vn&&o&&Sw(t),Wr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Uh(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=W$(r),e=So(r,e),i){case 0:t=Bb(null,t,r,e,n);break e;case 1:t=eC(null,t,r,e,n);break e;case 11:t=J_(null,t,r,e,n);break e;case 14:t=Z_(null,t,r,So(r.type,e),n);break e}throw Error(Ne(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:So(r,i),Bb(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:So(r,i),eC(e,t,r,i,n);case 3:e:{if($P(t),e===null)throw Error(Ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,cP(e,t),Em(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=xu(Error(Ne(423)),t),t=tC(e,t,r,n,i);break e}else if(r!==i){i=xu(Error(Ne(424)),t),t=tC(e,t,r,n,i);break e}else for(_i=Ta(t.stateNode.containerInfo.firstChild),Ei=t,vn=!0,Ro=null,n=aP(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yu(),r===i){t=Fs(e,t,n);break e}Wr(e,t,r,n)}t=t.child}return t;case 5:return uP(t),e===null&&Mb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Tb(r,i)?s=null:o!==null&&Tb(r,o)&&(t.flags|=32),NP(e,t),Wr(e,t,s,n),t.child;case 6:return e===null&&Mb(t),null;case 13:return AP(e,t,n);case 4:return Ow(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bu(t,null,r,n):Wr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:So(r,i),J_(e,t,r,i,n);case 7:return Wr(e,t,t.pendingProps,n),t.child;case 8:return Wr(e,t,t.pendingProps.children,n),t.child;case 12:return Wr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,pn(Cm,r._currentValue),r._currentValue=s,o!==null)if(Io(o.value,s)){if(o.children===i.children&&!ni.current){t=Fs(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=js(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Nb(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Ne(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Nb(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Wr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,au(t,n),i=Zi(i),r=r(i),t.flags|=1,Wr(e,t,r,n),t.child;case 14:return r=t.type,i=So(r,t.pendingProps),i=So(r.type,i),Z_(e,t,r,i,n);case 15:return IP(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:So(r,i),Uh(e,t),t.tag=1,ri(r)?(e=!0,xm(t)):e=!1,au(t,n),OP(t,r,i),Ab(t,r,i,n),Fb(null,t,r,!0,e,n);case 19:return DP(e,t,n);case 22:return MP(e,t,n)}throw Error(Ne(156,t.tag))};function eT(e,t){return R2(e,t)}function U$(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qi(e,t,n,r){return new U$(e,t,n,r)}function Hw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function W$(e){if(typeof e=="function")return Hw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===uw)return 11;if(e===dw)return 14}return 2}function Ia(e,t){var n=e.alternate;return n===null?(n=qi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Hh(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Hw(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Gc:return Il(n.children,i,o,t);case cw:s=8,i|=8;break;case ab:return e=qi(12,n,t,i|2),e.elementType=ab,e.lanes=o,e;case lb:return e=qi(13,n,t,i),e.elementType=lb,e.lanes=o,e;case cb:return e=qi(19,n,t,i),e.elementType=cb,e.lanes=o,e;case u2:return Ng(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l2:s=10;break e;case c2:s=9;break e;case uw:s=11;break e;case dw:s=14;break e;case ha:s=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=qi(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Il(e,t,n,r){return e=qi(7,e,r,t),e.lanes=n,e}function Ng(e,t,n,r){return e=qi(22,e,r,t),e.elementType=u2,e.lanes=n,e.stateNode={isHidden:!1},e}function Jy(e,t,n){return e=qi(6,e,null,t),e.lanes=n,e}function Zy(e,t,n){return t=qi(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function G$(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Iy(0),this.expirationTimes=Iy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Iy(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Vw(e,t,n,r,i,o,s,a,l){return e=new G$(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qi(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tw(o),e}function H$(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iT)}catch(e){console.error(e)}}iT(),i2.exports=Li;var Fg=i2.exports;const Dd=Ga(Fg),Q$=VR({__proto__:null,default:Dd},[Fg]);var pC=Fg;ob.createRoot=pC.createRoot,ob.hydrateRoot=pC.hydrateRoot;/** * @remix-run/router v1.17.1 * * Copyright (c) Remix Software Inc. @@ -46,8 +46,8 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function wn(){return wn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Gl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rA(){return Math.random().toString(36).substr(2,8)}function mC(e,t){return{usr:e.state,key:e.key,idx:t}}function Mf(e,t,n,r){return n===void 0&&(n=null),wn({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Qs(t):t,{state:n,key:t&&t.key||r||rA()})}function Hl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Qs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function iA(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Fn.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(wn({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){a=Fn.Pop;let E=u(),b=E==null?null:E-c;c=E,l&&l({action:a,location:g.location,delta:b})}function f(E,b){a=Fn.Push;let w=Mf(g.location,E,b);n&&n(w,E),c=u()+1;let y=mC(w,c),_=g.createHref(w);try{s.pushState(y,"",_)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(_)}o&&l&&l({action:a,location:g.location,delta:1})}function m(E,b){a=Fn.Replace;let w=Mf(g.location,E,b);n&&n(w,E),c=u();let y=mC(w,c),_=g.createHref(w);s.replaceState(y,"",_),o&&l&&l({action:a,location:g.location,delta:0})}function h(E){let b=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof E=="string"?E:Hl(E);return w=w.replace(/ $/,"%20"),kt(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let g={get action(){return a},get location(){return e(i,s)},listen(E){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(hC,d),l=E,()=>{i.removeEventListener(hC,d),l=null}},createHref(E){return t(i,E)},createURL:h,encodeLocation(E){let b=h(E);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:m,go(E){return s.go(E)}};return g}var dn;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(dn||(dn={}));const oA=new Set(["lazy","caseSensitive","path","id","index","children"]);function sA(e){return e.index===!0}function Nf(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let s=[...n,String(o)],a=typeof i.id=="string"?i.id:s.join("-");if(kt(i.index!==!0||!i.children,"Cannot specify children on an index route"),kt(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),sA(i)){let l=wn({},i,t(i),{id:a});return r[a]=l,l}else{let l=wn({},i,t(i),{id:a,children:void 0});return r[a]=l,i.children&&(l.children=Nf(i.children,t,s,r)),l}})}function wl(e,t,n){return n===void 0&&(n="/"),Vh(e,t,n,!1)}function Vh(e,t,n,r){let i=typeof t=="string"?Qs(t):t,o=Mo(i.pathname||"/",n);if(o==null)return null;let s=oT(e);lA(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(kt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Ls([r,l.relativePath]),u=n.concat(l);o.children&&o.children.length>0&&(kt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),oT(o.children,t,u,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:mA(c,o.index),routesMeta:u})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of sT(o.path))i(o,s,l)}),t}function sT(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=sT(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function lA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:gA(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const cA=/^:[\w-]+$/,uA=3,dA=2,fA=1,pA=10,hA=-2,gC=e=>e==="*";function mA(e,t){let n=e.split("/"),r=n.length;return n.some(gC)&&(r+=hA),t&&(r+=dA),n.filter(i=>!gC(i)).reduce((i,o)=>i+(cA.test(o)?uA:o===""?fA:pA),r)}function gA(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function vA(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a{let{paramName:f,isOptional:m}=u;if(f==="*"){let g=a[d]||"";s=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const h=a[d];return m&&!h?c[f]=void 0:c[f]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:e}}function yA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Gl(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function bA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Gl(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Mo(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function wA(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Qs(e):e;return{pathname:n?n.startsWith("/")?n:xA(n,t):t,search:_A(r),hash:CA(i)}}function xA(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function e0(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function aT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function zg(e,t){let n=aT(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ug(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Qs(e):(i=wn({},e),kt(!i.pathname||!i.pathname.includes("?"),e0("?","pathname","search",i)),kt(!i.pathname||!i.pathname.includes("#"),e0("#","pathname","hash",i)),kt(!i.search||!i.search.includes("#"),e0("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=wA(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Ls=e=>e.join("/").replace(/\/\/+/g,"/"),SA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_A=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,CA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Qw{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Wg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const lT=["post","put","patch","delete"],kA=new Set(lT),EA=["get",...lT],RA=new Set(EA),PA=new Set([301,302,303,307,308]),TA=new Set([307,308]),t0={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},OA={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$c={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Xw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jA=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),cT="remix-router-transitions";function LA(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;kt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let Q=e.detectErrorBoundary;i=ie=>({hasErrorBoundary:Q(ie)})}else i=jA;let o={},s=Nf(e.routes,i,void 0,o),a,l=e.basename||"/",c=e.unstable_dataStrategy||AA,u=e.unstable_patchRoutesOnMiss,d=wn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),f=null,m=new Set,h=null,g=null,E=null,b=e.hydrationData!=null,w=wl(s,e.history.location,l),y=null;if(w==null&&!u){let Q=Ur(404,{pathname:e.history.location.pathname}),{matches:ie,route:he}=EC(s);w=ie,y={[he.id]:Q}}w&&u&&Rr(w,s,e.history.location.pathname).active&&(w=null);let _;if(!w)_=!1,w=[];else if(w.some(Q=>Q.route.lazy))_=!1;else if(!w.some(Q=>Q.route.loader))_=!0;else if(d.v7_partialHydration){let Q=e.hydrationData?e.hydrationData.loaderData:null,ie=e.hydrationData?e.hydrationData.errors:null,he=Se=>Se.route.loader?typeof Se.route.loader=="function"&&Se.route.loader.hydrate===!0?!1:Q&&Q[Se.route.id]!==void 0||ie&&ie[Se.route.id]!==void 0:!0;if(ie){let Se=w.findIndex($e=>ie[$e.route.id]!==void 0);_=w.slice(0,Se+1).every(he)}else _=w.every(he)}else _=e.hydrationData!=null;let k,R={historyAction:e.history.action,location:e.history.location,matches:w,initialized:_,navigation:t0,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||y,fetchers:new Map,blockers:new Map},P=Fn.Pop,I=!1,$,L=!1,N=new Map,F=null,z=!1,K=!1,Z=[],le=[],ce=new Map,H=0,V=-1,se=new Map,je=new Set,Ge=new Map,Le=new Map,_e=new Set,Ve=new Map,Pe=new Map,ct=new Map,ft=!1;function Te(){if(f=e.history.listen(Q=>{let{action:ie,location:he,delta:Se}=Q;if(ft){ft=!1;return}Gl(Pe.size===0||Se!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let $e=Bi({currentLocation:R.location,nextLocation:he,historyAction:ie});if($e&&Se!=null){ft=!0,e.history.go(Se*-1),We($e,{state:"blocked",location:he,proceed(){We($e,{state:"proceeding",proceed:void 0,reset:void 0,location:he}),e.history.go(Se)},reset(){let nt=new Map(R.blockers);nt.set($e,$c),ze({blockers:nt})}});return}return me(ie,he)}),n){QA(t,N);let Q=()=>XA(t,N);t.addEventListener("pagehide",Q),F=()=>t.removeEventListener("pagehide",Q)}return R.initialized||me(Fn.Pop,R.location,{initialHydration:!0}),k}function Tt(){f&&f(),F&&F(),m.clear(),$&&$.abort(),R.fetchers.forEach((Q,ie)=>Rt(ie)),R.blockers.forEach((Q,ie)=>dr(ie))}function ut(Q){return m.add(Q),()=>m.delete(Q)}function ze(Q,ie){ie===void 0&&(ie={}),R=wn({},R,Q);let he=[],Se=[];d.v7_fetcherPersist&&R.fetchers.forEach(($e,nt)=>{$e.state==="idle"&&(_e.has(nt)?Se.push(nt):he.push(nt))}),[...m].forEach($e=>$e(R,{deletedFetchers:Se,unstable_viewTransitionOpts:ie.viewTransitionOpts,unstable_flushSync:ie.flushSync===!0})),d.v7_fetcherPersist&&(he.forEach($e=>R.fetchers.delete($e)),Se.forEach($e=>Rt($e)))}function Ze(Q,ie,he){var Se,$e;let{flushSync:nt}=he===void 0?{}:he,st=R.actionData!=null&&R.navigation.formMethod!=null&&Co(R.navigation.formMethod)&&R.navigation.state==="loading"&&((Se=Q.state)==null?void 0:Se._isRedirect)!==!0,Ae;ie.actionData?Object.keys(ie.actionData).length>0?Ae=ie.actionData:Ae=null:st?Ae=R.actionData:Ae=null;let vt=ie.loaderData?CC(R.loaderData,ie.loaderData,ie.matches||[],ie.errors):R.loaderData,at=R.blockers;at.size>0&&(at=new Map(at),at.forEach((Nt,Lt)=>at.set(Lt,$c)));let it=I===!0||R.navigation.formMethod!=null&&Co(R.navigation.formMethod)&&(($e=Q.state)==null?void 0:$e._isRedirect)!==!0;a&&(s=a,a=void 0),z||P===Fn.Pop||(P===Fn.Push?e.history.push(Q,Q.state):P===Fn.Replace&&e.history.replace(Q,Q.state));let Ot;if(P===Fn.Pop){let Nt=N.get(R.location.pathname);Nt&&Nt.has(Q.pathname)?Ot={currentLocation:R.location,nextLocation:Q}:N.has(Q.pathname)&&(Ot={currentLocation:Q,nextLocation:R.location})}else if(L){let Nt=N.get(R.location.pathname);Nt?Nt.add(Q.pathname):(Nt=new Set([Q.pathname]),N.set(R.location.pathname,Nt)),Ot={currentLocation:R.location,nextLocation:Q}}ze(wn({},ie,{actionData:Ae,loaderData:vt,historyAction:P,location:Q,initialized:!0,navigation:t0,revalidation:"idle",restoreScrollPosition:di(Q,ie.matches||R.matches),preventScrollReset:it,blockers:at}),{viewTransitionOpts:Ot,flushSync:nt===!0}),P=Fn.Pop,I=!1,L=!1,z=!1,K=!1,Z=[],le=[]}async function yt(Q,ie){if(typeof Q=="number"){e.history.go(Q);return}let he=Jb(R.location,R.matches,l,d.v7_prependBasename,Q,d.v7_relativeSplatPath,ie==null?void 0:ie.fromRouteId,ie==null?void 0:ie.relative),{path:Se,submission:$e,error:nt}=vC(d.v7_normalizeFormMethod,!1,he,ie),st=R.location,Ae=Mf(R.location,Se,ie&&ie.state);Ae=wn({},Ae,e.history.encodeLocation(Ae));let vt=ie&&ie.replace!=null?ie.replace:void 0,at=Fn.Push;vt===!0?at=Fn.Replace:vt===!1||$e!=null&&Co($e.formMethod)&&$e.formAction===R.location.pathname+R.location.search&&(at=Fn.Replace);let it=ie&&"preventScrollReset"in ie?ie.preventScrollReset===!0:void 0,Ot=(ie&&ie.unstable_flushSync)===!0,Nt=Bi({currentLocation:st,nextLocation:Ae,historyAction:at});if(Nt){We(Nt,{state:"blocked",location:Ae,proceed(){We(Nt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ae}),yt(Q,ie)},reset(){let Lt=new Map(R.blockers);Lt.set(Nt,$c),ze({blockers:Lt})}});return}return await me(at,Ae,{submission:$e,pendingError:nt,preventScrollReset:it,replace:ie&&ie.replace,enableViewTransition:ie&&ie.unstable_viewTransition,flushSync:Ot})}function ee(){if(rt(),ze({revalidation:"loading"}),R.navigation.state!=="submitting"){if(R.navigation.state==="idle"){me(R.historyAction,R.location,{startUninterruptedRevalidation:!0});return}me(P||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation})}}async function me(Q,ie,he){$&&$.abort(),$=null,P=Q,z=(he&&he.startUninterruptedRevalidation)===!0,tl(R.location,R.matches),I=(he&&he.preventScrollReset)===!0,L=(he&&he.enableViewTransition)===!0;let Se=a||s,$e=he&&he.overrideNavigation,nt=wl(Se,ie,l),st=(he&&he.flushSync)===!0,Ae=Rr(nt,Se,ie.pathname);if(Ae.active&&Ae.matches&&(nt=Ae.matches),!nt){let{error:Je,notFoundMatches:Dt,route:wt}=Fi(ie.pathname);Ze(ie,{matches:Dt,loaderData:{},errors:{[wt.id]:Je}},{flushSync:st});return}if(R.initialized&&!K&&WA(R.location,ie)&&!(he&&he.submission&&Co(he.submission.formMethod))){Ze(ie,{matches:nt},{flushSync:st});return}$=new AbortController;let vt=xc(e.history,ie,$.signal,he&&he.submission),at;if(he&&he.pendingError)at=[Zd(nt).route.id,{type:dn.error,error:he.pendingError}];else if(he&&he.submission&&Co(he.submission.formMethod)){let Je=await Ce(vt,ie,he.submission,nt,Ae.active,{replace:he.replace,flushSync:st});if(Je.shortCircuited)return;if(Je.pendingActionResult){let[Dt,wt]=Je.pendingActionResult;if(vi(wt)&&Wg(wt.error)&&wt.error.status===404){$=null,Ze(ie,{matches:Je.matches,loaderData:{},errors:{[Dt]:wt.error}});return}}nt=Je.matches||nt,at=Je.pendingActionResult,$e=n0(ie,he.submission),st=!1,Ae.active=!1,vt=xc(e.history,vt.url,vt.signal)}let{shortCircuited:it,matches:Ot,loaderData:Nt,errors:Lt}=await Ue(vt,ie,nt,Ae.active,$e,he&&he.submission,he&&he.fetcherSubmission,he&&he.replace,he&&he.initialHydration===!0,st,at);it||($=null,Ze(ie,wn({matches:Ot||nt},kC(at),{loaderData:Nt,errors:Lt})))}async function Ce(Q,ie,he,Se,$e,nt){nt===void 0&&(nt={}),rt();let st=qA(ie,he);if(ze({navigation:st},{flushSync:nt.flushSync===!0}),$e){let at=await Pr(Se,ie.pathname,Q.signal);if(at.type==="aborted")return{shortCircuited:!0};if(at.type==="error"){let{error:it,notFoundMatches:Ot,route:Nt}=er(ie.pathname,at);return{matches:Ot,pendingActionResult:[Nt.id,{type:dn.error,error:it}]}}else if(at.matches)Se=at.matches;else{let{notFoundMatches:it,error:Ot,route:Nt}=Fi(ie.pathname);return{matches:it,pendingActionResult:[Nt.id,{type:dn.error,error:Ot}]}}}let Ae,vt=Bd(Se,ie);if(!vt.route.action&&!vt.route.lazy)Ae={type:dn.error,error:Ur(405,{method:Q.method,pathname:ie.pathname,routeId:vt.route.id})};else if(Ae=(await pe("action",Q,[vt],Se))[0],Q.signal.aborted)return{shortCircuited:!0};if(El(Ae)){let at;return nt&&nt.replace!=null?at=nt.replace:at=xC(Ae.response.headers.get("Location"),new URL(Q.url),l)===R.location.pathname+R.location.search,await X(Q,Ae,{submission:he,replace:at}),{shortCircuited:!0}}if(kl(Ae))throw Ur(400,{type:"defer-action"});if(vi(Ae)){let at=Zd(Se,vt.route.id);return(nt&&nt.replace)!==!0&&(P=Fn.Push),{matches:Se,pendingActionResult:[at.route.id,Ae]}}return{matches:Se,pendingActionResult:[vt.route.id,Ae]}}async function Ue(Q,ie,he,Se,$e,nt,st,Ae,vt,at,it){let Ot=$e||n0(ie,nt),Nt=nt||st||TC(Ot),Lt=!z&&(!d.v7_partialHydration||!vt);if(Se){if(Lt){let an=W(it);ze(wn({navigation:Ot},an!==void 0?{actionData:an}:{}),{flushSync:at})}let St=await Pr(he,ie.pathname,Q.signal);if(St.type==="aborted")return{shortCircuited:!0};if(St.type==="error"){let{error:an,notFoundMatches:Ct,route:Ht}=er(ie.pathname,St);return{matches:Ct,loaderData:{},errors:{[Ht.id]:an}}}else if(St.matches)he=St.matches;else{let{error:an,notFoundMatches:Ct,route:Ht}=Fi(ie.pathname);return{matches:Ct,loaderData:{},errors:{[Ht.id]:an}}}}let Je=a||s,[Dt,wt]=yC(e.history,R,he,Nt,ie,d.v7_partialHydration&&vt===!0,d.unstable_skipActionErrorRevalidation,K,Z,le,_e,Ge,je,Je,l,it);if(po(St=>!(he&&he.some(an=>an.route.id===St))||Dt&&Dt.some(an=>an.route.id===St)),V=++H,Dt.length===0&&wt.length===0){let St=Me();return Ze(ie,wn({matches:he,loaderData:{},errors:it&&vi(it[1])?{[it[0]]:it[1].error}:null},kC(it),St?{fetchers:new Map(R.fetchers)}:{}),{flushSync:at}),{shortCircuited:!0}}if(Lt){let St={};if(!Se){St.navigation=Ot;let an=W(it);an!==void 0&&(St.actionData=an)}wt.length>0&&(St.fetchers=S(wt)),ze(St,{flushSync:at})}wt.forEach(St=>{ce.has(St.key)&&qe(St.key),St.controller&&ce.set(St.key,St.controller)});let Tr=()=>wt.forEach(St=>qe(St.key));$&&$.signal.addEventListener("abort",Tr);let{loaderResults:Dn,fetcherResults:ho}=await Fe(R.matches,he,Dt,wt,Q);if(Q.signal.aborted)return{shortCircuited:!0};$&&$.signal.removeEventListener("abort",Tr),wt.forEach(St=>ce.delete(St.key));let Or=RC([...Dn,...ho]);if(Or){if(Or.idx>=Dt.length){let St=wt[Or.idx-Dt.length].key;je.add(St)}return await X(Q,Or.result,{replace:Ae}),{shortCircuited:!0}}let{loaderData:fi,errors:pr}=_C(R,he,Dt,Dn,it,wt,ho,Ve);Ve.forEach((St,an)=>{St.subscribe(Ct=>{(Ct||St.done)&&Ve.delete(an)})}),d.v7_partialHydration&&vt&&R.errors&&Object.entries(R.errors).filter(St=>{let[an]=St;return!Dt.some(Ct=>Ct.route.id===an)}).forEach(St=>{let[an,Ct]=St;pr=Object.assign(pr||{},{[an]:Ct})});let mo=Me(),tr=Yt(V),hs=mo||tr||wt.length>0;return wn({matches:he,loaderData:fi,errors:pr},hs?{fetchers:new Map(R.fetchers)}:{})}function W(Q){if(Q&&!vi(Q[1]))return{[Q[0]]:Q[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function S(Q){return Q.forEach(ie=>{let he=R.fetchers.get(ie.key),Se=bd(void 0,he?he.data:void 0);R.fetchers.set(ie.key,Se)}),new Map(R.fetchers)}function O(Q,ie,he,Se){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ce.has(Q)&&qe(Q);let $e=(Se&&Se.unstable_flushSync)===!0,nt=a||s,st=Jb(R.location,R.matches,l,d.v7_prependBasename,he,d.v7_relativeSplatPath,ie,Se==null?void 0:Se.relative),Ae=wl(nt,st,l),vt=Rr(Ae,nt,st);if(vt.active&&vt.matches&&(Ae=vt.matches),!Ae){Oe(Q,ie,Ur(404,{pathname:st}),{flushSync:$e});return}let{path:at,submission:it,error:Ot}=vC(d.v7_normalizeFormMethod,!0,st,Se);if(Ot){Oe(Q,ie,Ot,{flushSync:$e});return}let Nt=Bd(Ae,at);if(I=(Se&&Se.preventScrollReset)===!0,it&&Co(it.formMethod)){D(Q,ie,at,Nt,Ae,vt.active,$e,it);return}Ge.set(Q,{routeId:ie,path:at}),q(Q,ie,at,Nt,Ae,vt.active,$e,it)}async function D(Q,ie,he,Se,$e,nt,st,Ae){rt(),Ge.delete(Q);function vt(Ht){if(!Ht.route.action&&!Ht.route.lazy){let Qr=Ur(405,{method:Ae.formMethod,pathname:he,routeId:ie});return Oe(Q,ie,Qr,{flushSync:st}),!0}return!1}if(!nt&&vt(Se))return;let at=R.fetchers.get(Q);Xe(Q,YA(Ae,at),{flushSync:st});let it=new AbortController,Ot=xc(e.history,he,it.signal,Ae);if(nt){let Ht=await Pr($e,he,Ot.signal);if(Ht.type==="aborted")return;if(Ht.type==="error"){let{error:Qr}=er(he,Ht);Oe(Q,ie,Qr,{flushSync:st});return}else if(Ht.matches){if($e=Ht.matches,Se=Bd($e,he),vt(Se))return}else{Oe(Q,ie,Ur(404,{pathname:he}),{flushSync:st});return}}ce.set(Q,it);let Nt=H,Je=(await pe("action",Ot,[Se],$e))[0];if(Ot.signal.aborted){ce.get(Q)===it&&ce.delete(Q);return}if(d.v7_fetcherPersist&&_e.has(Q)){if(El(Je)||vi(Je)){Xe(Q,pa(void 0));return}}else{if(El(Je))if(ce.delete(Q),V>Nt){Xe(Q,pa(void 0));return}else return je.add(Q),Xe(Q,bd(Ae)),X(Ot,Je,{fetcherSubmission:Ae});if(vi(Je)){Oe(Q,ie,Je.error);return}}if(kl(Je))throw Ur(400,{type:"defer-action"});let Dt=R.navigation.location||R.location,wt=xc(e.history,Dt,it.signal),Tr=a||s,Dn=R.navigation.state!=="idle"?wl(Tr,R.navigation.location,l):R.matches;kt(Dn,"Didn't find any matches after fetcher action");let ho=++H;se.set(Q,ho);let Or=bd(Ae,Je.data);R.fetchers.set(Q,Or);let[fi,pr]=yC(e.history,R,Dn,Ae,Dt,!1,d.unstable_skipActionErrorRevalidation,K,Z,le,_e,Ge,je,Tr,l,[Se.route.id,Je]);pr.filter(Ht=>Ht.key!==Q).forEach(Ht=>{let Qr=Ht.key,nl=R.fetchers.get(Qr),Qt=bd(void 0,nl?nl.data:void 0);R.fetchers.set(Qr,Qt),ce.has(Qr)&&qe(Qr),Ht.controller&&ce.set(Qr,Ht.controller)}),ze({fetchers:new Map(R.fetchers)});let mo=()=>pr.forEach(Ht=>qe(Ht.key));it.signal.addEventListener("abort",mo);let{loaderResults:tr,fetcherResults:hs}=await Fe(R.matches,Dn,fi,pr,wt);if(it.signal.aborted)return;it.signal.removeEventListener("abort",mo),se.delete(Q),ce.delete(Q),pr.forEach(Ht=>ce.delete(Ht.key));let St=RC([...tr,...hs]);if(St){if(St.idx>=fi.length){let Ht=pr[St.idx-fi.length].key;je.add(Ht)}return X(wt,St.result)}let{loaderData:an,errors:Ct}=_C(R,R.matches,fi,tr,void 0,pr,hs,Ve);if(R.fetchers.has(Q)){let Ht=pa(Je.data);R.fetchers.set(Q,Ht)}Yt(ho),R.navigation.state==="loading"&&ho>V?(kt(P,"Expected pending action"),$&&$.abort(),Ze(R.navigation.location,{matches:Dn,loaderData:an,errors:Ct,fetchers:new Map(R.fetchers)})):(ze({errors:Ct,loaderData:CC(R.loaderData,an,Dn,Ct),fetchers:new Map(R.fetchers)}),K=!1)}async function q(Q,ie,he,Se,$e,nt,st,Ae){let vt=R.fetchers.get(Q);Xe(Q,bd(Ae,vt?vt.data:void 0),{flushSync:st});let at=new AbortController,it=xc(e.history,he,at.signal);if(nt){let Je=await Pr($e,he,it.signal);if(Je.type==="aborted")return;if(Je.type==="error"){let{error:Dt}=er(he,Je);Oe(Q,ie,Dt,{flushSync:st});return}else if(Je.matches)$e=Je.matches,Se=Bd($e,he);else{Oe(Q,ie,Ur(404,{pathname:he}),{flushSync:st});return}}ce.set(Q,at);let Ot=H,Lt=(await pe("loader",it,[Se],$e))[0];if(kl(Lt)&&(Lt=await hT(Lt,it.signal,!0)||Lt),ce.get(Q)===at&&ce.delete(Q),!it.signal.aborted){if(_e.has(Q)){Xe(Q,pa(void 0));return}if(El(Lt))if(V>Ot){Xe(Q,pa(void 0));return}else{je.add(Q),await X(it,Lt);return}if(vi(Lt)){Oe(Q,ie,Lt.error);return}kt(!kl(Lt),"Unhandled fetcher deferred data"),Xe(Q,pa(Lt.data))}}async function X(Q,ie,he){let{submission:Se,fetcherSubmission:$e,replace:nt}=he===void 0?{}:he;ie.response.headers.has("X-Remix-Revalidate")&&(K=!0);let st=ie.response.headers.get("Location");kt(st,"Expected a Location header on the redirect Response"),st=xC(st,new URL(Q.url),l);let Ae=Mf(R.location,st,{_isRedirect:!0});if(n){let Lt=!1;if(ie.response.headers.has("X-Remix-Reload-Document"))Lt=!0;else if(Xw.test(st)){const Je=e.history.createURL(st);Lt=Je.origin!==t.location.origin||Mo(Je.pathname,l)==null}if(Lt){nt?t.location.replace(st):t.location.assign(st);return}}$=null;let vt=nt===!0?Fn.Replace:Fn.Push,{formMethod:at,formAction:it,formEncType:Ot}=R.navigation;!Se&&!$e&&at&&it&&Ot&&(Se=TC(R.navigation));let Nt=Se||$e;if(TA.has(ie.response.status)&&Nt&&Co(Nt.formMethod))await me(vt,Ae,{submission:wn({},Nt,{formAction:st}),preventScrollReset:I});else{let Lt=n0(Ae,Se);await me(vt,Ae,{overrideNavigation:Lt,fetcherSubmission:$e,preventScrollReset:I})}}async function pe(Q,ie,he,Se){try{let $e=await DA(c,Q,ie,he,Se,o,i);return await Promise.all($e.map((nt,st)=>{if(HA(nt)){let Ae=nt.result;return{type:dn.redirect,response:zA(Ae,ie,he[st].route.id,Se,l,d.v7_relativeSplatPath)}}return FA(nt)}))}catch($e){return he.map(()=>({type:dn.error,error:$e}))}}async function Fe(Q,ie,he,Se,$e){let[nt,...st]=await Promise.all([he.length?pe("loader",$e,he,ie):[],...Se.map(Ae=>{if(Ae.matches&&Ae.match&&Ae.controller){let vt=xc(e.history,Ae.path,Ae.controller.signal);return pe("loader",vt,[Ae.match],Ae.matches).then(at=>at[0])}else return Promise.resolve({type:dn.error,error:Ur(404,{pathname:Ae.path})})})]);return await Promise.all([PC(Q,he,nt,nt.map(()=>$e.signal),!1,R.loaderData),PC(Q,Se.map(Ae=>Ae.match),st,Se.map(Ae=>Ae.controller?Ae.controller.signal:null),!0)]),{loaderResults:nt,fetcherResults:st}}function rt(){K=!0,Z.push(...po()),Ge.forEach((Q,ie)=>{ce.has(ie)&&(le.push(ie),qe(ie))})}function Xe(Q,ie,he){he===void 0&&(he={}),R.fetchers.set(Q,ie),ze({fetchers:new Map(R.fetchers)},{flushSync:(he&&he.flushSync)===!0})}function Oe(Q,ie,he,Se){Se===void 0&&(Se={});let $e=Zd(R.matches,ie);Rt(Q),ze({errors:{[$e.route.id]:he},fetchers:new Map(R.fetchers)},{flushSync:(Se&&Se.flushSync)===!0})}function et(Q){return d.v7_fetcherPersist&&(Le.set(Q,(Le.get(Q)||0)+1),_e.has(Q)&&_e.delete(Q)),R.fetchers.get(Q)||OA}function Rt(Q){let ie=R.fetchers.get(Q);ce.has(Q)&&!(ie&&ie.state==="loading"&&se.has(Q))&&qe(Q),Ge.delete(Q),se.delete(Q),je.delete(Q),_e.delete(Q),R.fetchers.delete(Q)}function tn(Q){if(d.v7_fetcherPersist){let ie=(Le.get(Q)||0)-1;ie<=0?(Le.delete(Q),_e.add(Q)):Le.set(Q,ie)}else Rt(Q);ze({fetchers:new Map(R.fetchers)})}function qe(Q){let ie=ce.get(Q);kt(ie,"Expected fetch controller: "+Q),ie.abort(),ce.delete(Q)}function bt(Q){for(let ie of Q){let he=et(ie),Se=pa(he.data);R.fetchers.set(ie,Se)}}function Me(){let Q=[],ie=!1;for(let he of je){let Se=R.fetchers.get(he);kt(Se,"Expected fetcher: "+he),Se.state==="loading"&&(je.delete(he),Q.push(he),ie=!0)}return bt(Q),ie}function Yt(Q){let ie=[];for(let[he,Se]of se)if(Se0}function An(Q,ie){let he=R.blockers.get(Q)||$c;return Pe.get(Q)!==ie&&Pe.set(Q,ie),he}function dr(Q){R.blockers.delete(Q),Pe.delete(Q)}function We(Q,ie){let he=R.blockers.get(Q)||$c;kt(he.state==="unblocked"&&ie.state==="blocked"||he.state==="blocked"&&ie.state==="blocked"||he.state==="blocked"&&ie.state==="proceeding"||he.state==="blocked"&&ie.state==="unblocked"||he.state==="proceeding"&&ie.state==="unblocked","Invalid blocker state transition: "+he.state+" -> "+ie.state);let Se=new Map(R.blockers);Se.set(Q,ie),ze({blockers:Se})}function Bi(Q){let{currentLocation:ie,nextLocation:he,historyAction:Se}=Q;if(Pe.size===0)return;Pe.size>1&&Gl(!1,"A router only supports one blocker at a time");let $e=Array.from(Pe.entries()),[nt,st]=$e[$e.length-1],Ae=R.blockers.get(nt);if(!(Ae&&Ae.state==="proceeding")&&st({currentLocation:ie,nextLocation:he,historyAction:Se}))return nt}function Fi(Q){let ie=Ur(404,{pathname:Q}),he=a||s,{matches:Se,route:$e}=EC(he);return po(),{notFoundMatches:Se,route:$e,error:ie}}function er(Q,ie){let he=ie.partialMatches,Se=he[he.length-1].route,$e=Ur(400,{type:"route-discovery",routeId:Se.id,pathname:Q,message:ie.error!=null&&"message"in ie.error?ie.error:String(ie.error)});return{notFoundMatches:he,route:Se,error:$e}}function po(Q){let ie=[];return Ve.forEach((he,Se)=>{(!Q||Q(Se))&&(he.cancel(),ie.push(Se),Ve.delete(Se))}),ie}function zo(Q,ie,he){if(h=Q,E=ie,g=he||null,!b&&R.navigation===t0){b=!0;let Se=di(R.location,R.matches);Se!=null&&ze({restoreScrollPosition:Se})}return()=>{h=null,E=null,g=null}}function ps(Q,ie){return g&&g(Q,ie.map(Se=>aA(Se,R.loaderData)))||Q.key}function tl(Q,ie){if(h&&E){let he=ps(Q,ie);h[he]=E()}}function di(Q,ie){if(h){let he=ps(Q,ie),Se=h[he];if(typeof Se=="number")return Se}return null}function Rr(Q,ie,he){if(u)if(Q){let Se=Q[Q.length-1].route;if(Se.path&&(Se.path==="*"||Se.path.endsWith("/*")))return{active:!0,matches:Vh(ie,he,l,!0)}}else return{active:!0,matches:Vh(ie,he,l,!0)||[]};return{active:!1,matches:null}}async function Pr(Q,ie,he){let Se=Q,$e=Se.length>0?Se[Se.length-1].route:null;for(;;){let nt=a==null,st=a||s;try{await $A(u,ie,Se,st,o,i,ct,he)}catch(it){return{type:"error",error:it,partialMatches:Se}}finally{nt&&(s=[...s])}if(he.aborted)return{type:"aborted"};let Ae=wl(st,ie,l),vt=!1;if(Ae){let it=Ae[Ae.length-1].route;if(it.index)return{type:"success",matches:Ae};if(it.path&&it.path.length>0)if(it.path==="*")vt=!0;else return{type:"success",matches:Ae}}let at=Vh(st,ie,l,!0);if(!at||Se.map(it=>it.route.id).join("-")===at.map(it=>it.route.id).join("-"))return{type:"success",matches:vt?Ae:null};if(Se=at,$e=Se[Se.length-1].route,$e.path==="*")return{type:"success",matches:Se}}}function fr(Q){o={},a=Nf(Q,i,void 0,o)}function zt(Q,ie){let he=a==null;dT(Q,ie,a||s,o,i),he&&(s=[...s],ze({}))}return k={get basename(){return l},get future(){return d},get state(){return R},get routes(){return s},get window(){return t},initialize:Te,subscribe:ut,enableScrollRestoration:zo,navigate:yt,fetch:O,revalidate:ee,createHref:Q=>e.history.createHref(Q),encodeLocation:Q=>e.history.encodeLocation(Q),getFetcher:et,deleteFetcher:tn,dispose:Tt,getBlocker:An,deleteBlocker:dr,patchRoutes:zt,_internalFetchControllers:ce,_internalActiveDeferreds:Ve,_internalSetRoutes:fr},k}function IA(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Jb(e,t,n,r,i,o,s,a){let l,c;if(s){l=[];for(let d of t)if(l.push(d),d.route.id===s){c=d;break}}else l=t,c=t[t.length-1];let u=Ug(i||".",zg(l,o),Mo(e.pathname,n)||e.pathname,a==="path");return i==null&&(u.search=e.search,u.hash=e.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!Jw(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Ls([n,u.pathname])),Hl(u)}function vC(e,t,n,r){if(!r||!IA(r))return{path:n};if(r.formMethod&&!KA(r.formMethod))return{path:n,error:Ur(405,{method:r.formMethod})};let i=()=>({path:n,error:Ur(400,{type:"invalid-body"})}),o=r.formMethod||"get",s=e?o.toUpperCase():o.toLowerCase(),a=fT(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Co(s))return i();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,h)=>{let[g,E]=h;return""+m+g+"="+E+` -`},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!Co(s))return i();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return i()}}}kt(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=Zb(r.formData),c=r.formData;else if(r.body instanceof FormData)l=Zb(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=SC(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=SC(l)}catch{return i()}let u={formMethod:s,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Co(u.formMethod))return{path:n,submission:u};let d=Qs(n);return t&&d.search&&Jw(d.search)&&l.append("index",""),d.search="?"+l,{path:Hl(d),submission:u}}function MA(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function yC(e,t,n,r,i,o,s,a,l,c,u,d,f,m,h,g){let E=g?vi(g[1])?g[1].error:g[1].data:void 0,b=e.createURL(t.location),w=e.createURL(i),y=g&&vi(g[1])?g[0]:void 0,_=y?MA(n,y):n,k=g?g[1].statusCode:void 0,R=s&&k&&k>=400,P=_.filter(($,L)=>{let{route:N}=$;if(N.lazy)return!0;if(N.loader==null)return!1;if(o)return typeof N.loader!="function"||N.loader.hydrate?!0:t.loaderData[N.id]===void 0&&(!t.errors||t.errors[N.id]===void 0);if(NA(t.loaderData,t.matches[L],$)||l.some(K=>K===$.route.id))return!0;let F=t.matches[L],z=$;return bC($,wn({currentUrl:b,currentParams:F.params,nextUrl:w,nextParams:z.params},r,{actionResult:E,unstable_actionStatus:k,defaultShouldRevalidate:R?!1:a||b.pathname+b.search===w.pathname+w.search||b.search!==w.search||uT(F,z)}))}),I=[];return d.forEach(($,L)=>{if(o||!n.some(Z=>Z.route.id===$.routeId)||u.has(L))return;let N=wl(m,$.path,h);if(!N){I.push({key:L,routeId:$.routeId,path:$.path,matches:null,match:null,controller:null});return}let F=t.fetchers.get(L),z=Bd(N,$.path),K=!1;f.has(L)?K=!1:c.includes(L)?K=!0:F&&F.state!=="idle"&&F.data===void 0?K=a:K=bC(z,wn({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:n[n.length-1].params},r,{actionResult:E,unstable_actionStatus:k,defaultShouldRevalidate:R?!1:a})),K&&I.push({key:L,routeId:$.routeId,path:$.path,matches:N,match:z,controller:new AbortController})}),[P,I]}function NA(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function uT(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function bC(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function $A(e,t,n,r,i,o,s,a){let l=[t,...n.map(c=>c.route.id)].join("-");try{let c=s.get(l);c||(c=e({path:t,matches:n,patch:(u,d)=>{a.aborted||dT(u,d,r,i,o)}}),s.set(l,c)),c&&GA(c)&&await c}finally{s.delete(l)}}function dT(e,t,n,r,i){if(e){var o;let s=r[e];kt(s,"No route found to patch children into: routeId = "+e);let a=Nf(t,i,[e,"patch",String(((o=s.children)==null?void 0:o.length)||"0")],r);s.children?s.children.push(...a):s.children=a}else{let s=Nf(t,i,["patch",String(n.length||"0")],r);n.push(...s)}}async function wC(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];kt(i,"No route found in manifest");let o={};for(let s in r){let l=i[s]!==void 0&&s!=="hasErrorBoundary";Gl(!l,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!oA.has(s)&&(o[s]=r[s])}Object.assign(i,o),Object.assign(i,wn({},t(i),{lazy:void 0}))}function AA(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function DA(e,t,n,r,i,o,s,a){let l=r.reduce((d,f)=>d.add(f.route.id),new Set),c=new Set,u=await e({matches:i.map(d=>{let f=l.has(d.route.id);return wn({},d,{shouldLoad:f,resolve:h=>(c.add(d.route.id),f?BA(t,n,d,o,s,h,a):Promise.resolve({type:dn.data,result:void 0}))})}),request:n,params:i[0].params,context:a});return i.forEach(d=>kt(c.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),u.filter((d,f)=>l.has(i[f].route.id))}async function BA(e,t,n,r,i,o,s){let a,l,c=u=>{let d,f=new Promise((g,E)=>d=E);l=()=>d(),t.signal.addEventListener("abort",l);let m=g=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):u({request:t,params:n.params,context:s},...g!==void 0?[g]:[]),h;return o?h=o(g=>m(g)):h=(async()=>{try{return{type:"data",result:await m()}}catch(g){return{type:"error",result:g}}})(),Promise.race([h,f])};try{let u=n.route[e];if(n.route.lazy)if(u){let d,[f]=await Promise.all([c(u).catch(m=>{d=m}),wC(n.route,i,r)]);if(d!==void 0)throw d;a=f}else if(await wC(n.route,i,r),u=n.route[e],u)a=await c(u);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw Ur(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:dn.data,result:void 0};else if(u)a=await c(u);else{let d=new URL(t.url),f=d.pathname+d.search;throw Ur(404,{pathname:f})}kt(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:dn.error,result:u}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function FA(e){let{result:t,type:n,status:r}=e;if(pT(t)){let s;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(a){return{type:dn.error,error:a}}return n===dn.error?{type:dn.error,error:new Qw(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:dn.data,data:s,statusCode:t.status,headers:t.headers}}if(n===dn.error)return{type:dn.error,error:t,statusCode:Wg(t)?t.status:r};if(VA(t)){var i,o;return{type:dn.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:dn.data,data:t,statusCode:r}}function zA(e,t,n,r,i,o){let s=e.headers.get("Location");if(kt(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Xw.test(s)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=Jb(new URL(t.url),a,i,!0,s,o),e.headers.set("Location",s)}return e}function xC(e,t,n){if(Xw.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Mo(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function xc(e,t,n,r){let i=e.createURL(fT(t)).toString(),o={signal:n};if(r&&Co(r.formMethod)){let{formMethod:s,formEncType:a}=r;o.method=s.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=Zb(r.formData):o.body=r.formData}return new Request(i,o)}function Zb(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function SC(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function UA(e,t,n,r,i,o){let s={},a=null,l,c=!1,u={},d=r&&vi(r[1])?r[1].error:void 0;return n.forEach((f,m)=>{let h=t[m].route.id;if(kt(!El(f),"Cannot handle redirect results in processLoaderData"),vi(f)){let g=f.error;d!==void 0&&(g=d,d=void 0),a=a||{};{let E=Zd(e,h);a[E.route.id]==null&&(a[E.route.id]=g)}s[h]=void 0,c||(c=!0,l=Wg(f.error)?f.error.status:500),f.headers&&(u[h]=f.headers)}else kl(f)?(i.set(h,f.deferredData),s[h]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!c&&(l=f.statusCode),f.headers&&(u[h]=f.headers)):(s[h]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(l=f.statusCode),f.headers&&(u[h]=f.headers))}),d!==void 0&&r&&(a={[r[0]]:d},s[r[0]]=void 0),{loaderData:s,errors:a,statusCode:l||200,loaderHeaders:u}}function _C(e,t,n,r,i,o,s,a){let{loaderData:l,errors:c}=UA(t,n,r,i,a);for(let u=0;ur.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function EC(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ur(e,t){let{pathname:n,routeId:r,method:i,type:o,message:s}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?l='Unable to match URL "'+n+'" - the `children()` function for '+("route `"+r+"` threw the following error:\n"+s):i&&n&&r?l="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",l='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",i&&n&&r?l="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new Qw(e||500,a,new Error(l),!0)}function RC(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(El(n))return{result:n,idx:t}}}function fT(e){let t=typeof e=="string"?Qs(e):e;return Hl(wn({},t,{hash:""}))}function WA(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function GA(e){return typeof e=="object"&&e!=null&&"then"in e}function HA(e){return pT(e.result)&&PA.has(e.result.status)}function kl(e){return e.type===dn.deferred}function vi(e){return e.type===dn.error}function El(e){return(e&&e.type)===dn.redirect}function VA(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function pT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function KA(e){return RA.has(e.toLowerCase())}function Co(e){return kA.has(e.toLowerCase())}async function PC(e,t,n,r,i,o){for(let s=0;sd.route.id===l.route.id),u=c!=null&&!uT(c,l)&&(o&&o[l.route.id])!==void 0;if(kl(a)&&(i||u)){let d=r[s];kt(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await hT(a,d,i).then(f=>{f&&(n[s]=f||n[s])})}}}async function hT(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:dn.data,data:e.deferredData.unwrappedData}}catch(i){return{type:dn.error,error:i}}return{type:dn.data,data:e.deferredData.data}}}function Jw(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Bd(e,t){let n=typeof t=="string"?Qs(t).search:t.search;if(e[e.length-1].route.index&&Jw(n||""))return e[e.length-1];let r=aT(e);return r[r.length-1]}function TC(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:s}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function n0(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function qA(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function bd(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function YA(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function pa(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function QA(e,t){try{let n=e.sessionStorage.getItem(cT);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function XA(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(cT,JSON.stringify(n))}catch(r){Gl(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + */function wn(){return wn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Gl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function J$(){return Math.random().toString(36).substr(2,8)}function mC(e,t){return{usr:e.state,key:e.key,idx:t}}function Mf(e,t,n,r){return n===void 0&&(n=null),wn({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Qs(t):t,{state:n,key:t&&t.key||r||J$()})}function Hl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Qs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Z$(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Fn.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(wn({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){a=Fn.Pop;let R=u(),b=R==null?null:R-c;c=R,l&&l({action:a,location:g.location,delta:b})}function f(R,b){a=Fn.Push;let w=Mf(g.location,R,b);n&&n(w,R),c=u()+1;let y=mC(w,c),_=g.createHref(w);try{s.pushState(y,"",_)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(_)}o&&l&&l({action:a,location:g.location,delta:1})}function m(R,b){a=Fn.Replace;let w=Mf(g.location,R,b);n&&n(w,R),c=u();let y=mC(w,c),_=g.createHref(w);s.replaceState(y,"",_),o&&l&&l({action:a,location:g.location,delta:0})}function h(R){let b=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof R=="string"?R:Hl(R);return w=w.replace(/ $/,"%20"),kt(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let g={get action(){return a},get location(){return e(i,s)},listen(R){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(hC,d),l=R,()=>{i.removeEventListener(hC,d),l=null}},createHref(R){return t(i,R)},createURL:h,encodeLocation(R){let b=h(R);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:m,go(R){return s.go(R)}};return g}var dn;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(dn||(dn={}));const eA=new Set(["lazy","caseSensitive","path","id","index","children"]);function tA(e){return e.index===!0}function Nf(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let s=[...n,String(o)],a=typeof i.id=="string"?i.id:s.join("-");if(kt(i.index!==!0||!i.children,"Cannot specify children on an index route"),kt(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),tA(i)){let l=wn({},i,t(i),{id:a});return r[a]=l,l}else{let l=wn({},i,t(i),{id:a,children:void 0});return r[a]=l,i.children&&(l.children=Nf(i.children,t,s,r)),l}})}function wl(e,t,n){return n===void 0&&(n="/"),Vh(e,t,n,!1)}function Vh(e,t,n,r){let i=typeof t=="string"?Qs(t):t,o=Mo(i.pathname||"/",n);if(o==null)return null;let s=oT(e);rA(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(kt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Ls([r,l.relativePath]),u=n.concat(l);o.children&&o.children.length>0&&(kt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),oT(o.children,t,u,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:uA(c,o.index),routesMeta:u})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of sT(o.path))i(o,s,l)}),t}function sT(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=sT(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function rA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:dA(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const iA=/^:[\w-]+$/,oA=3,sA=2,aA=1,lA=10,cA=-2,gC=e=>e==="*";function uA(e,t){let n=e.split("/"),r=n.length;return n.some(gC)&&(r+=cA),t&&(r+=sA),n.filter(i=>!gC(i)).reduce((i,o)=>i+(iA.test(o)?oA:o===""?aA:lA),r)}function dA(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function fA(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a{let{paramName:f,isOptional:m}=u;if(f==="*"){let g=a[d]||"";s=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const h=a[d];return m&&!h?c[f]=void 0:c[f]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:e}}function pA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Gl(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function hA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Gl(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Mo(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function mA(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Qs(e):e;return{pathname:n?n.startsWith("/")?n:gA(n,t):t,search:yA(r),hash:bA(i)}}function gA(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function e0(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function aT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function zg(e,t){let n=aT(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ug(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Qs(e):(i=wn({},e),kt(!i.pathname||!i.pathname.includes("?"),e0("?","pathname","search",i)),kt(!i.pathname||!i.pathname.includes("#"),e0("#","pathname","hash",i)),kt(!i.search||!i.search.includes("#"),e0("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=mA(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Ls=e=>e.join("/").replace(/\/\/+/g,"/"),vA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),yA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Qw{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Wg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const lT=["post","put","patch","delete"],wA=new Set(lT),xA=["get",...lT],SA=new Set(xA),_A=new Set([301,302,303,307,308]),CA=new Set([307,308]),t0={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},kA={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$c={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Xw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,EA=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),cT="remix-router-transitions";function RA(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;kt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let Q=e.detectErrorBoundary;i=ie=>({hasErrorBoundary:Q(ie)})}else i=EA;let o={},s=Nf(e.routes,i,void 0,o),a,l=e.basename||"/",c=e.unstable_dataStrategy||LA,u=e.unstable_patchRoutesOnMiss,d=wn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),f=null,m=new Set,h=null,g=null,R=null,b=e.hydrationData!=null,w=wl(s,e.history.location,l),y=null;if(w==null&&!u){let Q=Ur(404,{pathname:e.history.location.pathname}),{matches:ie,route:he}=EC(s);w=ie,y={[he.id]:Q}}w&&u&&Rr(w,s,e.history.location.pathname).active&&(w=null);let _;if(!w)_=!1,w=[];else if(w.some(Q=>Q.route.lazy))_=!1;else if(!w.some(Q=>Q.route.loader))_=!0;else if(d.v7_partialHydration){let Q=e.hydrationData?e.hydrationData.loaderData:null,ie=e.hydrationData?e.hydrationData.errors:null,he=Se=>Se.route.loader?typeof Se.route.loader=="function"&&Se.route.loader.hydrate===!0?!1:Q&&Q[Se.route.id]!==void 0||ie&&ie[Se.route.id]!==void 0:!0;if(ie){let Se=w.findIndex($e=>ie[$e.route.id]!==void 0);_=w.slice(0,Se+1).every(he)}else _=w.every(he)}else _=e.hydrationData!=null;let k,E={historyAction:e.history.action,location:e.history.location,matches:w,initialized:_,navigation:t0,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||y,fetchers:new Map,blockers:new Map},P=Fn.Pop,I=!1,A,L=!1,N=new Map,F=null,z=!1,K=!1,Z=[],le=[],ce=new Map,H=0,V=-1,se=new Map,je=new Set,Ge=new Map,Le=new Map,_e=new Set,Ve=new Map,Pe=new Map,ct=new Map,ht=!1;function Te(){if(f=e.history.listen(Q=>{let{action:ie,location:he,delta:Se}=Q;if(ht){ht=!1;return}Gl(Pe.size===0||Se!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let $e=Bi({currentLocation:E.location,nextLocation:he,historyAction:ie});if($e&&Se!=null){ht=!0,e.history.go(Se*-1),We($e,{state:"blocked",location:he,proceed(){We($e,{state:"proceeding",proceed:void 0,reset:void 0,location:he}),e.history.go(Se)},reset(){let nt=new Map(E.blockers);nt.set($e,$c),ze({blockers:nt})}});return}return me(ie,he)}),n){HA(t,N);let Q=()=>VA(t,N);t.addEventListener("pagehide",Q),F=()=>t.removeEventListener("pagehide",Q)}return E.initialized||me(Fn.Pop,E.location,{initialHydration:!0}),k}function Tt(){f&&f(),F&&F(),m.clear(),A&&A.abort(),E.fetchers.forEach((Q,ie)=>Rt(ie)),E.blockers.forEach((Q,ie)=>dr(ie))}function ut(Q){return m.add(Q),()=>m.delete(Q)}function ze(Q,ie){ie===void 0&&(ie={}),E=wn({},E,Q);let he=[],Se=[];d.v7_fetcherPersist&&E.fetchers.forEach(($e,nt)=>{$e.state==="idle"&&(_e.has(nt)?Se.push(nt):he.push(nt))}),[...m].forEach($e=>$e(E,{deletedFetchers:Se,unstable_viewTransitionOpts:ie.viewTransitionOpts,unstable_flushSync:ie.flushSync===!0})),d.v7_fetcherPersist&&(he.forEach($e=>E.fetchers.delete($e)),Se.forEach($e=>Rt($e)))}function Ze(Q,ie,he){var Se,$e;let{flushSync:nt}=he===void 0?{}:he,st=E.actionData!=null&&E.navigation.formMethod!=null&&Co(E.navigation.formMethod)&&E.navigation.state==="loading"&&((Se=Q.state)==null?void 0:Se._isRedirect)!==!0,Ae;ie.actionData?Object.keys(ie.actionData).length>0?Ae=ie.actionData:Ae=null:st?Ae=E.actionData:Ae=null;let vt=ie.loaderData?CC(E.loaderData,ie.loaderData,ie.matches||[],ie.errors):E.loaderData,at=E.blockers;at.size>0&&(at=new Map(at),at.forEach((Nt,Lt)=>at.set(Lt,$c)));let it=I===!0||E.navigation.formMethod!=null&&Co(E.navigation.formMethod)&&(($e=Q.state)==null?void 0:$e._isRedirect)!==!0;a&&(s=a,a=void 0),z||P===Fn.Pop||(P===Fn.Push?e.history.push(Q,Q.state):P===Fn.Replace&&e.history.replace(Q,Q.state));let Ot;if(P===Fn.Pop){let Nt=N.get(E.location.pathname);Nt&&Nt.has(Q.pathname)?Ot={currentLocation:E.location,nextLocation:Q}:N.has(Q.pathname)&&(Ot={currentLocation:Q,nextLocation:E.location})}else if(L){let Nt=N.get(E.location.pathname);Nt?Nt.add(Q.pathname):(Nt=new Set([Q.pathname]),N.set(E.location.pathname,Nt)),Ot={currentLocation:E.location,nextLocation:Q}}ze(wn({},ie,{actionData:Ae,loaderData:vt,historyAction:P,location:Q,initialized:!0,navigation:t0,revalidation:"idle",restoreScrollPosition:di(Q,ie.matches||E.matches),preventScrollReset:it,blockers:at}),{viewTransitionOpts:Ot,flushSync:nt===!0}),P=Fn.Pop,I=!1,L=!1,z=!1,K=!1,Z=[],le=[]}async function yt(Q,ie){if(typeof Q=="number"){e.history.go(Q);return}let he=Jb(E.location,E.matches,l,d.v7_prependBasename,Q,d.v7_relativeSplatPath,ie==null?void 0:ie.fromRouteId,ie==null?void 0:ie.relative),{path:Se,submission:$e,error:nt}=vC(d.v7_normalizeFormMethod,!1,he,ie),st=E.location,Ae=Mf(E.location,Se,ie&&ie.state);Ae=wn({},Ae,e.history.encodeLocation(Ae));let vt=ie&&ie.replace!=null?ie.replace:void 0,at=Fn.Push;vt===!0?at=Fn.Replace:vt===!1||$e!=null&&Co($e.formMethod)&&$e.formAction===E.location.pathname+E.location.search&&(at=Fn.Replace);let it=ie&&"preventScrollReset"in ie?ie.preventScrollReset===!0:void 0,Ot=(ie&&ie.unstable_flushSync)===!0,Nt=Bi({currentLocation:st,nextLocation:Ae,historyAction:at});if(Nt){We(Nt,{state:"blocked",location:Ae,proceed(){We(Nt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ae}),yt(Q,ie)},reset(){let Lt=new Map(E.blockers);Lt.set(Nt,$c),ze({blockers:Lt})}});return}return await me(at,Ae,{submission:$e,pendingError:nt,preventScrollReset:it,replace:ie&&ie.replace,enableViewTransition:ie&&ie.unstable_viewTransition,flushSync:Ot})}function ee(){if(rt(),ze({revalidation:"loading"}),E.navigation.state!=="submitting"){if(E.navigation.state==="idle"){me(E.historyAction,E.location,{startUninterruptedRevalidation:!0});return}me(P||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation})}}async function me(Q,ie,he){A&&A.abort(),A=null,P=Q,z=(he&&he.startUninterruptedRevalidation)===!0,tl(E.location,E.matches),I=(he&&he.preventScrollReset)===!0,L=(he&&he.enableViewTransition)===!0;let Se=a||s,$e=he&&he.overrideNavigation,nt=wl(Se,ie,l),st=(he&&he.flushSync)===!0,Ae=Rr(nt,Se,ie.pathname);if(Ae.active&&Ae.matches&&(nt=Ae.matches),!nt){let{error:Je,notFoundMatches:Dt,route:wt}=Fi(ie.pathname);Ze(ie,{matches:Dt,loaderData:{},errors:{[wt.id]:Je}},{flushSync:st});return}if(E.initialized&&!K&&DA(E.location,ie)&&!(he&&he.submission&&Co(he.submission.formMethod))){Ze(ie,{matches:nt},{flushSync:st});return}A=new AbortController;let vt=xc(e.history,ie,A.signal,he&&he.submission),at;if(he&&he.pendingError)at=[Zd(nt).route.id,{type:dn.error,error:he.pendingError}];else if(he&&he.submission&&Co(he.submission.formMethod)){let Je=await Ce(vt,ie,he.submission,nt,Ae.active,{replace:he.replace,flushSync:st});if(Je.shortCircuited)return;if(Je.pendingActionResult){let[Dt,wt]=Je.pendingActionResult;if(vi(wt)&&Wg(wt.error)&&wt.error.status===404){A=null,Ze(ie,{matches:Je.matches,loaderData:{},errors:{[Dt]:wt.error}});return}}nt=Je.matches||nt,at=Je.pendingActionResult,$e=n0(ie,he.submission),st=!1,Ae.active=!1,vt=xc(e.history,vt.url,vt.signal)}let{shortCircuited:it,matches:Ot,loaderData:Nt,errors:Lt}=await Ue(vt,ie,nt,Ae.active,$e,he&&he.submission,he&&he.fetcherSubmission,he&&he.replace,he&&he.initialHydration===!0,st,at);it||(A=null,Ze(ie,wn({matches:Ot||nt},kC(at),{loaderData:Nt,errors:Lt})))}async function Ce(Q,ie,he,Se,$e,nt){nt===void 0&&(nt={}),rt();let st=WA(ie,he);if(ze({navigation:st},{flushSync:nt.flushSync===!0}),$e){let at=await Pr(Se,ie.pathname,Q.signal);if(at.type==="aborted")return{shortCircuited:!0};if(at.type==="error"){let{error:it,notFoundMatches:Ot,route:Nt}=er(ie.pathname,at);return{matches:Ot,pendingActionResult:[Nt.id,{type:dn.error,error:it}]}}else if(at.matches)Se=at.matches;else{let{notFoundMatches:it,error:Ot,route:Nt}=Fi(ie.pathname);return{matches:it,pendingActionResult:[Nt.id,{type:dn.error,error:Ot}]}}}let Ae,vt=Bd(Se,ie);if(!vt.route.action&&!vt.route.lazy)Ae={type:dn.error,error:Ur(405,{method:Q.method,pathname:ie.pathname,routeId:vt.route.id})};else if(Ae=(await pe("action",Q,[vt],Se))[0],Q.signal.aborted)return{shortCircuited:!0};if(El(Ae)){let at;return nt&&nt.replace!=null?at=nt.replace:at=xC(Ae.response.headers.get("Location"),new URL(Q.url),l)===E.location.pathname+E.location.search,await X(Q,Ae,{submission:he,replace:at}),{shortCircuited:!0}}if(kl(Ae))throw Ur(400,{type:"defer-action"});if(vi(Ae)){let at=Zd(Se,vt.route.id);return(nt&&nt.replace)!==!0&&(P=Fn.Push),{matches:Se,pendingActionResult:[at.route.id,Ae]}}return{matches:Se,pendingActionResult:[vt.route.id,Ae]}}async function Ue(Q,ie,he,Se,$e,nt,st,Ae,vt,at,it){let Ot=$e||n0(ie,nt),Nt=nt||st||TC(Ot),Lt=!z&&(!d.v7_partialHydration||!vt);if(Se){if(Lt){let an=W(it);ze(wn({navigation:Ot},an!==void 0?{actionData:an}:{}),{flushSync:at})}let St=await Pr(he,ie.pathname,Q.signal);if(St.type==="aborted")return{shortCircuited:!0};if(St.type==="error"){let{error:an,notFoundMatches:Ct,route:Ht}=er(ie.pathname,St);return{matches:Ct,loaderData:{},errors:{[Ht.id]:an}}}else if(St.matches)he=St.matches;else{let{error:an,notFoundMatches:Ct,route:Ht}=Fi(ie.pathname);return{matches:Ct,loaderData:{},errors:{[Ht.id]:an}}}}let Je=a||s,[Dt,wt]=yC(e.history,E,he,Nt,ie,d.v7_partialHydration&&vt===!0,d.unstable_skipActionErrorRevalidation,K,Z,le,_e,Ge,je,Je,l,it);if(po(St=>!(he&&he.some(an=>an.route.id===St))||Dt&&Dt.some(an=>an.route.id===St)),V=++H,Dt.length===0&&wt.length===0){let St=Me();return Ze(ie,wn({matches:he,loaderData:{},errors:it&&vi(it[1])?{[it[0]]:it[1].error}:null},kC(it),St?{fetchers:new Map(E.fetchers)}:{}),{flushSync:at}),{shortCircuited:!0}}if(Lt){let St={};if(!Se){St.navigation=Ot;let an=W(it);an!==void 0&&(St.actionData=an)}wt.length>0&&(St.fetchers=S(wt)),ze(St,{flushSync:at})}wt.forEach(St=>{ce.has(St.key)&&qe(St.key),St.controller&&ce.set(St.key,St.controller)});let Tr=()=>wt.forEach(St=>qe(St.key));A&&A.signal.addEventListener("abort",Tr);let{loaderResults:Dn,fetcherResults:ho}=await Fe(E.matches,he,Dt,wt,Q);if(Q.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",Tr),wt.forEach(St=>ce.delete(St.key));let Or=RC([...Dn,...ho]);if(Or){if(Or.idx>=Dt.length){let St=wt[Or.idx-Dt.length].key;je.add(St)}return await X(Q,Or.result,{replace:Ae}),{shortCircuited:!0}}let{loaderData:fi,errors:pr}=_C(E,he,Dt,Dn,it,wt,ho,Ve);Ve.forEach((St,an)=>{St.subscribe(Ct=>{(Ct||St.done)&&Ve.delete(an)})}),d.v7_partialHydration&&vt&&E.errors&&Object.entries(E.errors).filter(St=>{let[an]=St;return!Dt.some(Ct=>Ct.route.id===an)}).forEach(St=>{let[an,Ct]=St;pr=Object.assign(pr||{},{[an]:Ct})});let mo=Me(),tr=Yt(V),hs=mo||tr||wt.length>0;return wn({matches:he,loaderData:fi,errors:pr},hs?{fetchers:new Map(E.fetchers)}:{})}function W(Q){if(Q&&!vi(Q[1]))return{[Q[0]]:Q[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function S(Q){return Q.forEach(ie=>{let he=E.fetchers.get(ie.key),Se=bd(void 0,he?he.data:void 0);E.fetchers.set(ie.key,Se)}),new Map(E.fetchers)}function O(Q,ie,he,Se){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ce.has(Q)&&qe(Q);let $e=(Se&&Se.unstable_flushSync)===!0,nt=a||s,st=Jb(E.location,E.matches,l,d.v7_prependBasename,he,d.v7_relativeSplatPath,ie,Se==null?void 0:Se.relative),Ae=wl(nt,st,l),vt=Rr(Ae,nt,st);if(vt.active&&vt.matches&&(Ae=vt.matches),!Ae){Oe(Q,ie,Ur(404,{pathname:st}),{flushSync:$e});return}let{path:at,submission:it,error:Ot}=vC(d.v7_normalizeFormMethod,!0,st,Se);if(Ot){Oe(Q,ie,Ot,{flushSync:$e});return}let Nt=Bd(Ae,at);if(I=(Se&&Se.preventScrollReset)===!0,it&&Co(it.formMethod)){D(Q,ie,at,Nt,Ae,vt.active,$e,it);return}Ge.set(Q,{routeId:ie,path:at}),q(Q,ie,at,Nt,Ae,vt.active,$e,it)}async function D(Q,ie,he,Se,$e,nt,st,Ae){rt(),Ge.delete(Q);function vt(Ht){if(!Ht.route.action&&!Ht.route.lazy){let Qr=Ur(405,{method:Ae.formMethod,pathname:he,routeId:ie});return Oe(Q,ie,Qr,{flushSync:st}),!0}return!1}if(!nt&&vt(Se))return;let at=E.fetchers.get(Q);Xe(Q,GA(Ae,at),{flushSync:st});let it=new AbortController,Ot=xc(e.history,he,it.signal,Ae);if(nt){let Ht=await Pr($e,he,Ot.signal);if(Ht.type==="aborted")return;if(Ht.type==="error"){let{error:Qr}=er(he,Ht);Oe(Q,ie,Qr,{flushSync:st});return}else if(Ht.matches){if($e=Ht.matches,Se=Bd($e,he),vt(Se))return}else{Oe(Q,ie,Ur(404,{pathname:he}),{flushSync:st});return}}ce.set(Q,it);let Nt=H,Je=(await pe("action",Ot,[Se],$e))[0];if(Ot.signal.aborted){ce.get(Q)===it&&ce.delete(Q);return}if(d.v7_fetcherPersist&&_e.has(Q)){if(El(Je)||vi(Je)){Xe(Q,pa(void 0));return}}else{if(El(Je))if(ce.delete(Q),V>Nt){Xe(Q,pa(void 0));return}else return je.add(Q),Xe(Q,bd(Ae)),X(Ot,Je,{fetcherSubmission:Ae});if(vi(Je)){Oe(Q,ie,Je.error);return}}if(kl(Je))throw Ur(400,{type:"defer-action"});let Dt=E.navigation.location||E.location,wt=xc(e.history,Dt,it.signal),Tr=a||s,Dn=E.navigation.state!=="idle"?wl(Tr,E.navigation.location,l):E.matches;kt(Dn,"Didn't find any matches after fetcher action");let ho=++H;se.set(Q,ho);let Or=bd(Ae,Je.data);E.fetchers.set(Q,Or);let[fi,pr]=yC(e.history,E,Dn,Ae,Dt,!1,d.unstable_skipActionErrorRevalidation,K,Z,le,_e,Ge,je,Tr,l,[Se.route.id,Je]);pr.filter(Ht=>Ht.key!==Q).forEach(Ht=>{let Qr=Ht.key,nl=E.fetchers.get(Qr),Qt=bd(void 0,nl?nl.data:void 0);E.fetchers.set(Qr,Qt),ce.has(Qr)&&qe(Qr),Ht.controller&&ce.set(Qr,Ht.controller)}),ze({fetchers:new Map(E.fetchers)});let mo=()=>pr.forEach(Ht=>qe(Ht.key));it.signal.addEventListener("abort",mo);let{loaderResults:tr,fetcherResults:hs}=await Fe(E.matches,Dn,fi,pr,wt);if(it.signal.aborted)return;it.signal.removeEventListener("abort",mo),se.delete(Q),ce.delete(Q),pr.forEach(Ht=>ce.delete(Ht.key));let St=RC([...tr,...hs]);if(St){if(St.idx>=fi.length){let Ht=pr[St.idx-fi.length].key;je.add(Ht)}return X(wt,St.result)}let{loaderData:an,errors:Ct}=_C(E,E.matches,fi,tr,void 0,pr,hs,Ve);if(E.fetchers.has(Q)){let Ht=pa(Je.data);E.fetchers.set(Q,Ht)}Yt(ho),E.navigation.state==="loading"&&ho>V?(kt(P,"Expected pending action"),A&&A.abort(),Ze(E.navigation.location,{matches:Dn,loaderData:an,errors:Ct,fetchers:new Map(E.fetchers)})):(ze({errors:Ct,loaderData:CC(E.loaderData,an,Dn,Ct),fetchers:new Map(E.fetchers)}),K=!1)}async function q(Q,ie,he,Se,$e,nt,st,Ae){let vt=E.fetchers.get(Q);Xe(Q,bd(Ae,vt?vt.data:void 0),{flushSync:st});let at=new AbortController,it=xc(e.history,he,at.signal);if(nt){let Je=await Pr($e,he,it.signal);if(Je.type==="aborted")return;if(Je.type==="error"){let{error:Dt}=er(he,Je);Oe(Q,ie,Dt,{flushSync:st});return}else if(Je.matches)$e=Je.matches,Se=Bd($e,he);else{Oe(Q,ie,Ur(404,{pathname:he}),{flushSync:st});return}}ce.set(Q,at);let Ot=H,Lt=(await pe("loader",it,[Se],$e))[0];if(kl(Lt)&&(Lt=await hT(Lt,it.signal,!0)||Lt),ce.get(Q)===at&&ce.delete(Q),!it.signal.aborted){if(_e.has(Q)){Xe(Q,pa(void 0));return}if(El(Lt))if(V>Ot){Xe(Q,pa(void 0));return}else{je.add(Q),await X(it,Lt);return}if(vi(Lt)){Oe(Q,ie,Lt.error);return}kt(!kl(Lt),"Unhandled fetcher deferred data"),Xe(Q,pa(Lt.data))}}async function X(Q,ie,he){let{submission:Se,fetcherSubmission:$e,replace:nt}=he===void 0?{}:he;ie.response.headers.has("X-Remix-Revalidate")&&(K=!0);let st=ie.response.headers.get("Location");kt(st,"Expected a Location header on the redirect Response"),st=xC(st,new URL(Q.url),l);let Ae=Mf(E.location,st,{_isRedirect:!0});if(n){let Lt=!1;if(ie.response.headers.has("X-Remix-Reload-Document"))Lt=!0;else if(Xw.test(st)){const Je=e.history.createURL(st);Lt=Je.origin!==t.location.origin||Mo(Je.pathname,l)==null}if(Lt){nt?t.location.replace(st):t.location.assign(st);return}}A=null;let vt=nt===!0?Fn.Replace:Fn.Push,{formMethod:at,formAction:it,formEncType:Ot}=E.navigation;!Se&&!$e&&at&&it&&Ot&&(Se=TC(E.navigation));let Nt=Se||$e;if(CA.has(ie.response.status)&&Nt&&Co(Nt.formMethod))await me(vt,Ae,{submission:wn({},Nt,{formAction:st}),preventScrollReset:I});else{let Lt=n0(Ae,Se);await me(vt,Ae,{overrideNavigation:Lt,fetcherSubmission:$e,preventScrollReset:I})}}async function pe(Q,ie,he,Se){try{let $e=await IA(c,Q,ie,he,Se,o,i);return await Promise.all($e.map((nt,st)=>{if(FA(nt)){let Ae=nt.result;return{type:dn.redirect,response:$A(Ae,ie,he[st].route.id,Se,l,d.v7_relativeSplatPath)}}return NA(nt)}))}catch($e){return he.map(()=>({type:dn.error,error:$e}))}}async function Fe(Q,ie,he,Se,$e){let[nt,...st]=await Promise.all([he.length?pe("loader",$e,he,ie):[],...Se.map(Ae=>{if(Ae.matches&&Ae.match&&Ae.controller){let vt=xc(e.history,Ae.path,Ae.controller.signal);return pe("loader",vt,[Ae.match],Ae.matches).then(at=>at[0])}else return Promise.resolve({type:dn.error,error:Ur(404,{pathname:Ae.path})})})]);return await Promise.all([PC(Q,he,nt,nt.map(()=>$e.signal),!1,E.loaderData),PC(Q,Se.map(Ae=>Ae.match),st,Se.map(Ae=>Ae.controller?Ae.controller.signal:null),!0)]),{loaderResults:nt,fetcherResults:st}}function rt(){K=!0,Z.push(...po()),Ge.forEach((Q,ie)=>{ce.has(ie)&&(le.push(ie),qe(ie))})}function Xe(Q,ie,he){he===void 0&&(he={}),E.fetchers.set(Q,ie),ze({fetchers:new Map(E.fetchers)},{flushSync:(he&&he.flushSync)===!0})}function Oe(Q,ie,he,Se){Se===void 0&&(Se={});let $e=Zd(E.matches,ie);Rt(Q),ze({errors:{[$e.route.id]:he},fetchers:new Map(E.fetchers)},{flushSync:(Se&&Se.flushSync)===!0})}function et(Q){return d.v7_fetcherPersist&&(Le.set(Q,(Le.get(Q)||0)+1),_e.has(Q)&&_e.delete(Q)),E.fetchers.get(Q)||kA}function Rt(Q){let ie=E.fetchers.get(Q);ce.has(Q)&&!(ie&&ie.state==="loading"&&se.has(Q))&&qe(Q),Ge.delete(Q),se.delete(Q),je.delete(Q),_e.delete(Q),E.fetchers.delete(Q)}function tn(Q){if(d.v7_fetcherPersist){let ie=(Le.get(Q)||0)-1;ie<=0?(Le.delete(Q),_e.add(Q)):Le.set(Q,ie)}else Rt(Q);ze({fetchers:new Map(E.fetchers)})}function qe(Q){let ie=ce.get(Q);kt(ie,"Expected fetch controller: "+Q),ie.abort(),ce.delete(Q)}function bt(Q){for(let ie of Q){let he=et(ie),Se=pa(he.data);E.fetchers.set(ie,Se)}}function Me(){let Q=[],ie=!1;for(let he of je){let Se=E.fetchers.get(he);kt(Se,"Expected fetcher: "+he),Se.state==="loading"&&(je.delete(he),Q.push(he),ie=!0)}return bt(Q),ie}function Yt(Q){let ie=[];for(let[he,Se]of se)if(Se0}function An(Q,ie){let he=E.blockers.get(Q)||$c;return Pe.get(Q)!==ie&&Pe.set(Q,ie),he}function dr(Q){E.blockers.delete(Q),Pe.delete(Q)}function We(Q,ie){let he=E.blockers.get(Q)||$c;kt(he.state==="unblocked"&&ie.state==="blocked"||he.state==="blocked"&&ie.state==="blocked"||he.state==="blocked"&&ie.state==="proceeding"||he.state==="blocked"&&ie.state==="unblocked"||he.state==="proceeding"&&ie.state==="unblocked","Invalid blocker state transition: "+he.state+" -> "+ie.state);let Se=new Map(E.blockers);Se.set(Q,ie),ze({blockers:Se})}function Bi(Q){let{currentLocation:ie,nextLocation:he,historyAction:Se}=Q;if(Pe.size===0)return;Pe.size>1&&Gl(!1,"A router only supports one blocker at a time");let $e=Array.from(Pe.entries()),[nt,st]=$e[$e.length-1],Ae=E.blockers.get(nt);if(!(Ae&&Ae.state==="proceeding")&&st({currentLocation:ie,nextLocation:he,historyAction:Se}))return nt}function Fi(Q){let ie=Ur(404,{pathname:Q}),he=a||s,{matches:Se,route:$e}=EC(he);return po(),{notFoundMatches:Se,route:$e,error:ie}}function er(Q,ie){let he=ie.partialMatches,Se=he[he.length-1].route,$e=Ur(400,{type:"route-discovery",routeId:Se.id,pathname:Q,message:ie.error!=null&&"message"in ie.error?ie.error:String(ie.error)});return{notFoundMatches:he,route:Se,error:$e}}function po(Q){let ie=[];return Ve.forEach((he,Se)=>{(!Q||Q(Se))&&(he.cancel(),ie.push(Se),Ve.delete(Se))}),ie}function zo(Q,ie,he){if(h=Q,R=ie,g=he||null,!b&&E.navigation===t0){b=!0;let Se=di(E.location,E.matches);Se!=null&&ze({restoreScrollPosition:Se})}return()=>{h=null,R=null,g=null}}function ps(Q,ie){return g&&g(Q,ie.map(Se=>nA(Se,E.loaderData)))||Q.key}function tl(Q,ie){if(h&&R){let he=ps(Q,ie);h[he]=R()}}function di(Q,ie){if(h){let he=ps(Q,ie),Se=h[he];if(typeof Se=="number")return Se}return null}function Rr(Q,ie,he){if(u)if(Q){let Se=Q[Q.length-1].route;if(Se.path&&(Se.path==="*"||Se.path.endsWith("/*")))return{active:!0,matches:Vh(ie,he,l,!0)}}else return{active:!0,matches:Vh(ie,he,l,!0)||[]};return{active:!1,matches:null}}async function Pr(Q,ie,he){let Se=Q,$e=Se.length>0?Se[Se.length-1].route:null;for(;;){let nt=a==null,st=a||s;try{await jA(u,ie,Se,st,o,i,ct,he)}catch(it){return{type:"error",error:it,partialMatches:Se}}finally{nt&&(s=[...s])}if(he.aborted)return{type:"aborted"};let Ae=wl(st,ie,l),vt=!1;if(Ae){let it=Ae[Ae.length-1].route;if(it.index)return{type:"success",matches:Ae};if(it.path&&it.path.length>0)if(it.path==="*")vt=!0;else return{type:"success",matches:Ae}}let at=Vh(st,ie,l,!0);if(!at||Se.map(it=>it.route.id).join("-")===at.map(it=>it.route.id).join("-"))return{type:"success",matches:vt?Ae:null};if(Se=at,$e=Se[Se.length-1].route,$e.path==="*")return{type:"success",matches:Se}}}function fr(Q){o={},a=Nf(Q,i,void 0,o)}function zt(Q,ie){let he=a==null;dT(Q,ie,a||s,o,i),he&&(s=[...s],ze({}))}return k={get basename(){return l},get future(){return d},get state(){return E},get routes(){return s},get window(){return t},initialize:Te,subscribe:ut,enableScrollRestoration:zo,navigate:yt,fetch:O,revalidate:ee,createHref:Q=>e.history.createHref(Q),encodeLocation:Q=>e.history.encodeLocation(Q),getFetcher:et,deleteFetcher:tn,dispose:Tt,getBlocker:An,deleteBlocker:dr,patchRoutes:zt,_internalFetchControllers:ce,_internalActiveDeferreds:Ve,_internalSetRoutes:fr},k}function PA(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Jb(e,t,n,r,i,o,s,a){let l,c;if(s){l=[];for(let d of t)if(l.push(d),d.route.id===s){c=d;break}}else l=t,c=t[t.length-1];let u=Ug(i||".",zg(l,o),Mo(e.pathname,n)||e.pathname,a==="path");return i==null&&(u.search=e.search,u.hash=e.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!Jw(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Ls([n,u.pathname])),Hl(u)}function vC(e,t,n,r){if(!r||!PA(r))return{path:n};if(r.formMethod&&!UA(r.formMethod))return{path:n,error:Ur(405,{method:r.formMethod})};let i=()=>({path:n,error:Ur(400,{type:"invalid-body"})}),o=r.formMethod||"get",s=e?o.toUpperCase():o.toLowerCase(),a=fT(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Co(s))return i();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,h)=>{let[g,R]=h;return""+m+g+"="+R+` +`},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!Co(s))return i();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return i()}}}kt(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=Zb(r.formData),c=r.formData;else if(r.body instanceof FormData)l=Zb(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=SC(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=SC(l)}catch{return i()}let u={formMethod:s,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Co(u.formMethod))return{path:n,submission:u};let d=Qs(n);return t&&d.search&&Jw(d.search)&&l.append("index",""),d.search="?"+l,{path:Hl(d),submission:u}}function TA(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function yC(e,t,n,r,i,o,s,a,l,c,u,d,f,m,h,g){let R=g?vi(g[1])?g[1].error:g[1].data:void 0,b=e.createURL(t.location),w=e.createURL(i),y=g&&vi(g[1])?g[0]:void 0,_=y?TA(n,y):n,k=g?g[1].statusCode:void 0,E=s&&k&&k>=400,P=_.filter((A,L)=>{let{route:N}=A;if(N.lazy)return!0;if(N.loader==null)return!1;if(o)return typeof N.loader!="function"||N.loader.hydrate?!0:t.loaderData[N.id]===void 0&&(!t.errors||t.errors[N.id]===void 0);if(OA(t.loaderData,t.matches[L],A)||l.some(K=>K===A.route.id))return!0;let F=t.matches[L],z=A;return bC(A,wn({currentUrl:b,currentParams:F.params,nextUrl:w,nextParams:z.params},r,{actionResult:R,unstable_actionStatus:k,defaultShouldRevalidate:E?!1:a||b.pathname+b.search===w.pathname+w.search||b.search!==w.search||uT(F,z)}))}),I=[];return d.forEach((A,L)=>{if(o||!n.some(Z=>Z.route.id===A.routeId)||u.has(L))return;let N=wl(m,A.path,h);if(!N){I.push({key:L,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let F=t.fetchers.get(L),z=Bd(N,A.path),K=!1;f.has(L)?K=!1:c.includes(L)?K=!0:F&&F.state!=="idle"&&F.data===void 0?K=a:K=bC(z,wn({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:n[n.length-1].params},r,{actionResult:R,unstable_actionStatus:k,defaultShouldRevalidate:E?!1:a})),K&&I.push({key:L,routeId:A.routeId,path:A.path,matches:N,match:z,controller:new AbortController})}),[P,I]}function OA(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function uT(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function bC(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function jA(e,t,n,r,i,o,s,a){let l=[t,...n.map(c=>c.route.id)].join("-");try{let c=s.get(l);c||(c=e({path:t,matches:n,patch:(u,d)=>{a.aborted||dT(u,d,r,i,o)}}),s.set(l,c)),c&&BA(c)&&await c}finally{s.delete(l)}}function dT(e,t,n,r,i){if(e){var o;let s=r[e];kt(s,"No route found to patch children into: routeId = "+e);let a=Nf(t,i,[e,"patch",String(((o=s.children)==null?void 0:o.length)||"0")],r);s.children?s.children.push(...a):s.children=a}else{let s=Nf(t,i,["patch",String(n.length||"0")],r);n.push(...s)}}async function wC(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];kt(i,"No route found in manifest");let o={};for(let s in r){let l=i[s]!==void 0&&s!=="hasErrorBoundary";Gl(!l,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!eA.has(s)&&(o[s]=r[s])}Object.assign(i,o),Object.assign(i,wn({},t(i),{lazy:void 0}))}function LA(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function IA(e,t,n,r,i,o,s,a){let l=r.reduce((d,f)=>d.add(f.route.id),new Set),c=new Set,u=await e({matches:i.map(d=>{let f=l.has(d.route.id);return wn({},d,{shouldLoad:f,resolve:h=>(c.add(d.route.id),f?MA(t,n,d,o,s,h,a):Promise.resolve({type:dn.data,result:void 0}))})}),request:n,params:i[0].params,context:a});return i.forEach(d=>kt(c.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),u.filter((d,f)=>l.has(i[f].route.id))}async function MA(e,t,n,r,i,o,s){let a,l,c=u=>{let d,f=new Promise((g,R)=>d=R);l=()=>d(),t.signal.addEventListener("abort",l);let m=g=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):u({request:t,params:n.params,context:s},...g!==void 0?[g]:[]),h;return o?h=o(g=>m(g)):h=(async()=>{try{return{type:"data",result:await m()}}catch(g){return{type:"error",result:g}}})(),Promise.race([h,f])};try{let u=n.route[e];if(n.route.lazy)if(u){let d,[f]=await Promise.all([c(u).catch(m=>{d=m}),wC(n.route,i,r)]);if(d!==void 0)throw d;a=f}else if(await wC(n.route,i,r),u=n.route[e],u)a=await c(u);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw Ur(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:dn.data,result:void 0};else if(u)a=await c(u);else{let d=new URL(t.url),f=d.pathname+d.search;throw Ur(404,{pathname:f})}kt(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:dn.error,result:u}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function NA(e){let{result:t,type:n,status:r}=e;if(pT(t)){let s;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(a){return{type:dn.error,error:a}}return n===dn.error?{type:dn.error,error:new Qw(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:dn.data,data:s,statusCode:t.status,headers:t.headers}}if(n===dn.error)return{type:dn.error,error:t,statusCode:Wg(t)?t.status:r};if(zA(t)){var i,o;return{type:dn.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:dn.data,data:t,statusCode:r}}function $A(e,t,n,r,i,o){let s=e.headers.get("Location");if(kt(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Xw.test(s)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=Jb(new URL(t.url),a,i,!0,s,o),e.headers.set("Location",s)}return e}function xC(e,t,n){if(Xw.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Mo(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function xc(e,t,n,r){let i=e.createURL(fT(t)).toString(),o={signal:n};if(r&&Co(r.formMethod)){let{formMethod:s,formEncType:a}=r;o.method=s.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=Zb(r.formData):o.body=r.formData}return new Request(i,o)}function Zb(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function SC(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function AA(e,t,n,r,i,o){let s={},a=null,l,c=!1,u={},d=r&&vi(r[1])?r[1].error:void 0;return n.forEach((f,m)=>{let h=t[m].route.id;if(kt(!El(f),"Cannot handle redirect results in processLoaderData"),vi(f)){let g=f.error;d!==void 0&&(g=d,d=void 0),a=a||{};{let R=Zd(e,h);a[R.route.id]==null&&(a[R.route.id]=g)}s[h]=void 0,c||(c=!0,l=Wg(f.error)?f.error.status:500),f.headers&&(u[h]=f.headers)}else kl(f)?(i.set(h,f.deferredData),s[h]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!c&&(l=f.statusCode),f.headers&&(u[h]=f.headers)):(s[h]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(l=f.statusCode),f.headers&&(u[h]=f.headers))}),d!==void 0&&r&&(a={[r[0]]:d},s[r[0]]=void 0),{loaderData:s,errors:a,statusCode:l||200,loaderHeaders:u}}function _C(e,t,n,r,i,o,s,a){let{loaderData:l,errors:c}=AA(t,n,r,i,a);for(let u=0;ur.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function EC(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ur(e,t){let{pathname:n,routeId:r,method:i,type:o,message:s}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?l='Unable to match URL "'+n+'" - the `children()` function for '+("route `"+r+"` threw the following error:\n"+s):i&&n&&r?l="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",l='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",i&&n&&r?l="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new Qw(e||500,a,new Error(l),!0)}function RC(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(El(n))return{result:n,idx:t}}}function fT(e){let t=typeof e=="string"?Qs(e):e;return Hl(wn({},t,{hash:""}))}function DA(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function BA(e){return typeof e=="object"&&e!=null&&"then"in e}function FA(e){return pT(e.result)&&_A.has(e.result.status)}function kl(e){return e.type===dn.deferred}function vi(e){return e.type===dn.error}function El(e){return(e&&e.type)===dn.redirect}function zA(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function pT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function UA(e){return SA.has(e.toLowerCase())}function Co(e){return wA.has(e.toLowerCase())}async function PC(e,t,n,r,i,o){for(let s=0;sd.route.id===l.route.id),u=c!=null&&!uT(c,l)&&(o&&o[l.route.id])!==void 0;if(kl(a)&&(i||u)){let d=r[s];kt(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await hT(a,d,i).then(f=>{f&&(n[s]=f||n[s])})}}}async function hT(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:dn.data,data:e.deferredData.unwrappedData}}catch(i){return{type:dn.error,error:i}}return{type:dn.data,data:e.deferredData.data}}}function Jw(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Bd(e,t){let n=typeof t=="string"?Qs(t).search:t.search;if(e[e.length-1].route.index&&Jw(n||""))return e[e.length-1];let r=aT(e);return r[r.length-1]}function TC(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:s}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function n0(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function WA(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function bd(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function GA(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function pa(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function HA(e,t){try{let n=e.sessionStorage.getItem(cT);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function VA(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(cT,JSON.stringify(n))}catch(r){Gl(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.24.1 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function _u(){return _u=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),C.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=Ug(c,JSON.parse(s),o,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ls([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,s,o,e])}const vT=C.createContext(null);function up(){return C.useContext(vT)}function eD(e){let t=C.useContext(cs).outlet;return t&&C.createElement(vT.Provider,{value:e},t)}function tD(){let{matches:e}=C.useContext(cs),t=e[e.length-1];return t?t.params:{}}function Gg(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=C.useContext(Xs),{matches:i}=C.useContext(cs),{pathname:o}=Js(),s=JSON.stringify(zg(i,r.v7_relativeSplatPath));return C.useMemo(()=>Ug(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function nD(e,t,n,r){Gu()||kt(!1);let{navigator:i}=C.useContext(Xs),{matches:o}=C.useContext(cs),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=Js(),u;u=c;let d=u.pathname||"/",f=d;if(l!=="/"){let g=l.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(g.length).join("/")}let m=wl(e,{pathname:f});return aD(m&&m.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:Ls([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Ls([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n,r)}function rD(){let e=cD(),t=Wg(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:i},n):null,null)}const iD=C.createElement(rD,null);class oD extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?C.createElement(cs.Provider,{value:this.props.routeContext},C.createElement(mT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function sD(e){let{routeContext:t,match:n,children:r}=e,i=C.useContext(cp);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(cs.Provider,{value:t},r)}function aD(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||kt(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,d,f)=>{let m,h=!1,g=null,E=null;n&&(m=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||iD,l&&(c<0&&f===0?(h=!0,E=null):c===f&&(h=!0,E=d.route.hydrateFallbackElement||null)));let b=t.concat(s.slice(0,f+1)),w=()=>{let y;return m?y=g:h?y=E:d.route.Component?y=C.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=u,C.createElement(sD,{match:d,routeContext:{outlet:u,matches:b,isDataRoute:n!=null},children:y})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?C.createElement(oD,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}var tx=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(tx||{}),$f=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}($f||{});function yT(e){let t=C.useContext(cp);return t||kt(!1),t}function bT(e){let t=C.useContext(Zw);return t||kt(!1),t}function lD(e){let t=C.useContext(cs);return t||kt(!1),t}function wT(e){let t=lD(),n=t.matches[t.matches.length-1];return n.route.id||kt(!1),n.route.id}function cD(){var e;let t=C.useContext(mT),n=bT($f.UseRouteError),r=wT($f.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}let uD=0;function dD(e){let{router:t,basename:n}=yT(tx.UseBlocker),r=bT($f.UseBlocker),[i,o]=C.useState(""),s=C.useCallback(a=>{if(typeof e!="function")return!!e;if(n==="/")return e(a);let{currentLocation:l,nextLocation:c,historyAction:u}=a;return e({currentLocation:_u({},l,{pathname:Mo(l.pathname,n)||l.pathname}),nextLocation:_u({},c,{pathname:Mo(c.pathname,n)||c.pathname}),historyAction:u})},[n,e]);return C.useEffect(()=>{let a=String(++uD);return o(a),()=>t.deleteBlocker(a)},[t]),C.useEffect(()=>{i!==""&&t.getBlocker(i,s)},[t,i,s]),i&&r.blockers.has(i)?r.blockers.get(i):$c}function fD(){let{router:e}=yT(tx.UseNavigateStable),t=wT($f.UseNavigateStable),n=C.useRef(!1);return gT(()=>{n.current=!0}),C.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,_u({fromRouteId:t},o)))},[e,t])}function pD(e){let{to:t,replace:n,state:r,relative:i}=e;Gu()||kt(!1);let{future:o,static:s}=C.useContext(Xs),{matches:a}=C.useContext(cs),{pathname:l}=Js(),c=qa(),u=Ug(t,zg(a,o.v7_relativeSplatPath),l,i==="path"),d=JSON.stringify(u);return C.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:i}),[c,d,i,n,r]),null}function nx(e){return eD(e.context)}function Zr(e){kt(!1)}function hD(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Fn.Pop,navigator:o,static:s=!1,future:a}=e;Gu()&&kt(!1);let l=t.replace(/^\/*/,"/"),c=C.useMemo(()=>({basename:l,navigator:o,static:s,future:_u({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=Qs(r));let{pathname:u="/",search:d="",hash:f="",state:m=null,key:h="default"}=r,g=C.useMemo(()=>{let E=Mo(u,l);return E==null?null:{location:{pathname:E,search:d,hash:f,state:m,key:h},navigationType:i}},[l,u,d,f,m,h,i]);return g==null?null:C.createElement(Xs.Provider,{value:c},C.createElement(ex.Provider,{children:n,value:g}))}new Promise(()=>{});function e1(e,t){t===void 0&&(t=[]);let n=[];return C.Children.forEach(e,(r,i)=>{if(!C.isValidElement(r))return;let o=[...t,i];if(r.type===C.Fragment){n.push.apply(n,e1(r.props.children,o));return}r.type!==Zr&&kt(!1),!r.props.index||!r.props.children||kt(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=e1(r.props.children,o)),n.push(s)}),n}function mD(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function _u(){return _u=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),C.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=Ug(c,JSON.parse(s),o,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ls([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,s,o,e])}const vT=C.createContext(null);function up(){return C.useContext(vT)}function YA(e){let t=C.useContext(cs).outlet;return t&&C.createElement(vT.Provider,{value:e},t)}function QA(){let{matches:e}=C.useContext(cs),t=e[e.length-1];return t?t.params:{}}function Gg(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=C.useContext(Xs),{matches:i}=C.useContext(cs),{pathname:o}=Js(),s=JSON.stringify(zg(i,r.v7_relativeSplatPath));return C.useMemo(()=>Ug(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function XA(e,t,n,r){Gu()||kt(!1);let{navigator:i}=C.useContext(Xs),{matches:o}=C.useContext(cs),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=Js(),u;u=c;let d=u.pathname||"/",f=d;if(l!=="/"){let g=l.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(g.length).join("/")}let m=wl(e,{pathname:f});return nD(m&&m.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:Ls([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Ls([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n,r)}function JA(){let e=iD(),t=Wg(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:i},n):null,null)}const ZA=C.createElement(JA,null);class eD extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?C.createElement(cs.Provider,{value:this.props.routeContext},C.createElement(mT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tD(e){let{routeContext:t,match:n,children:r}=e,i=C.useContext(cp);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(cs.Provider,{value:t},r)}function nD(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||kt(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,d,f)=>{let m,h=!1,g=null,R=null;n&&(m=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||ZA,l&&(c<0&&f===0?(h=!0,R=null):c===f&&(h=!0,R=d.route.hydrateFallbackElement||null)));let b=t.concat(s.slice(0,f+1)),w=()=>{let y;return m?y=g:h?y=R:d.route.Component?y=C.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=u,C.createElement(tD,{match:d,routeContext:{outlet:u,matches:b,isDataRoute:n!=null},children:y})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?C.createElement(eD,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}var tx=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(tx||{}),$f=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}($f||{});function yT(e){let t=C.useContext(cp);return t||kt(!1),t}function bT(e){let t=C.useContext(Zw);return t||kt(!1),t}function rD(e){let t=C.useContext(cs);return t||kt(!1),t}function wT(e){let t=rD(),n=t.matches[t.matches.length-1];return n.route.id||kt(!1),n.route.id}function iD(){var e;let t=C.useContext(mT),n=bT($f.UseRouteError),r=wT($f.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}let oD=0;function sD(e){let{router:t,basename:n}=yT(tx.UseBlocker),r=bT($f.UseBlocker),[i,o]=C.useState(""),s=C.useCallback(a=>{if(typeof e!="function")return!!e;if(n==="/")return e(a);let{currentLocation:l,nextLocation:c,historyAction:u}=a;return e({currentLocation:_u({},l,{pathname:Mo(l.pathname,n)||l.pathname}),nextLocation:_u({},c,{pathname:Mo(c.pathname,n)||c.pathname}),historyAction:u})},[n,e]);return C.useEffect(()=>{let a=String(++oD);return o(a),()=>t.deleteBlocker(a)},[t]),C.useEffect(()=>{i!==""&&t.getBlocker(i,s)},[t,i,s]),i&&r.blockers.has(i)?r.blockers.get(i):$c}function aD(){let{router:e}=yT(tx.UseNavigateStable),t=wT($f.UseNavigateStable),n=C.useRef(!1);return gT(()=>{n.current=!0}),C.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,_u({fromRouteId:t},o)))},[e,t])}function lD(e){let{to:t,replace:n,state:r,relative:i}=e;Gu()||kt(!1);let{future:o,static:s}=C.useContext(Xs),{matches:a}=C.useContext(cs),{pathname:l}=Js(),c=qa(),u=Ug(t,zg(a,o.v7_relativeSplatPath),l,i==="path"),d=JSON.stringify(u);return C.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:i}),[c,d,i,n,r]),null}function nx(e){return YA(e.context)}function Zr(e){kt(!1)}function cD(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Fn.Pop,navigator:o,static:s=!1,future:a}=e;Gu()&&kt(!1);let l=t.replace(/^\/*/,"/"),c=C.useMemo(()=>({basename:l,navigator:o,static:s,future:_u({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=Qs(r));let{pathname:u="/",search:d="",hash:f="",state:m=null,key:h="default"}=r,g=C.useMemo(()=>{let R=Mo(u,l);return R==null?null:{location:{pathname:R,search:d,hash:f,state:m,key:h},navigationType:i}},[l,u,d,f,m,h,i]);return g==null?null:C.createElement(Xs.Provider,{value:c},C.createElement(ex.Provider,{children:n,value:g}))}new Promise(()=>{});function e1(e,t){t===void 0&&(t=[]);let n=[];return C.Children.forEach(e,(r,i)=>{if(!C.isValidElement(r))return;let o=[...t,i];if(r.type===C.Fragment){n.push.apply(n,e1(r.props.children,o));return}r.type!==Zr&&kt(!1),!r.props.index||!r.props.children||kt(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=e1(r.props.children,o)),n.push(s)}),n}function uD(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.24.1 * * Copyright (c) Remix Software Inc. @@ -65,14 +65,14 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Cu(){return Cu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function gD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vD(e,t){return e.button===0&&(!t||t==="_self")&&!gD(e)}function t1(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function yD(e,t){let n=t1(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const bD=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],wD=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],xD="6";try{window.__reactRouterVersion=xD}catch{}function SD(e,t){return LA({basename:void 0,future:Cu({},void 0,{v7_prependBasename:!0}),history:nA({window:void 0}),hydrationData:_D(),routes:e,mapRouteProperties:mD,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function _D(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Cu({},t,{errors:CD(t.errors)})),t}function CD(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new Qw(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let s=new o(i.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const ST=C.createContext({isTransitioning:!1}),kD=C.createContext(new Map),ED="startTransition",OC=um[ED],RD="flushSync",jC=tA[RD];function PD(e){OC?OC(e):e()}function wd(e){jC?jC(e):e()}class TD{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function OD(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=C.useState(n.state),[s,a]=C.useState(),[l,c]=C.useState({isTransitioning:!1}),[u,d]=C.useState(),[f,m]=C.useState(),[h,g]=C.useState(),E=C.useRef(new Map),{v7_startTransition:b}=r||{},w=C.useCallback(P=>{b?PD(P):P()},[b]),y=C.useCallback((P,I)=>{let{deletedFetchers:$,unstable_flushSync:L,unstable_viewTransitionOpts:N}=I;$.forEach(z=>E.current.delete(z)),P.fetchers.forEach((z,K)=>{z.data!==void 0&&E.current.set(K,z.data)});let F=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!N||F){L?wd(()=>o(P)):w(()=>o(P));return}if(L){wd(()=>{f&&(u&&u.resolve(),f.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let z=n.window.document.startViewTransition(()=>{wd(()=>o(P))});z.finished.finally(()=>{wd(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})})}),wd(()=>m(z));return}f?(u&&u.resolve(),f.skipTransition(),g({state:P,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(a(P),c({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,f,u,E,w]);C.useLayoutEffect(()=>n.subscribe(y),[n,y]),C.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new TD)},[l]),C.useEffect(()=>{if(u&&s&&n.window){let P=s,I=u.promise,$=n.window.document.startViewTransition(async()=>{w(()=>o(P)),await I});$.finished.finally(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})}),m($)}},[w,s,u,n.window]),C.useEffect(()=>{u&&s&&i.location.key===s.location.key&&u.resolve()},[u,f,i.location,s]),C.useEffect(()=>{!l.isTransitioning&&h&&(a(h.state),c({isTransitioning:!0,flushSync:!1,currentLocation:h.currentLocation,nextLocation:h.nextLocation}),g(void 0))},[l.isTransitioning,h]),C.useEffect(()=>{},[]);let _=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:P=>n.navigate(P),push:(P,I,$)=>n.navigate(P,{state:I,preventScrollReset:$==null?void 0:$.preventScrollReset}),replace:(P,I,$)=>n.navigate(P,{replace:!0,state:I,preventScrollReset:$==null?void 0:$.preventScrollReset})}),[n]),k=n.basename||"/",R=C.useMemo(()=>({router:n,navigator:_,static:!1,basename:k}),[n,_,k]);return C.createElement(C.Fragment,null,C.createElement(cp.Provider,{value:R},C.createElement(Zw.Provider,{value:i},C.createElement(kD.Provider,{value:E.current},C.createElement(ST.Provider,{value:l},C.createElement(hD,{basename:k,location:i.location,navigationType:i.historyAction,navigator:_,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?C.createElement(jD,{routes:n.routes,future:n.future,state:i}):t))))),null)}function jD(e){let{routes:t,future:n,state:r}=e;return nD(t,void 0,r,n)}const LD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ID=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_T=C.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:u,unstable_viewTransition:d}=t,f=xT(t,bD),{basename:m}=C.useContext(Xs),h,g=!1;if(typeof c=="string"&&ID.test(c)&&(h=c,LD))try{let y=new URL(window.location.href),_=c.startsWith("//")?new URL(y.protocol+c):new URL(c),k=Mo(_.pathname,m);_.origin===y.origin&&k!=null?c=k+_.search+_.hash:g=!0}catch{}let E=JA(c,{relative:i}),b=$D(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:i,unstable_viewTransition:d});function w(y){r&&r(y),y.defaultPrevented||b(y)}return C.createElement("a",Cu({},f,{href:h||E,onClick:g||o?r:w,ref:n,target:l}))}),MD=C.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,unstable_viewTransition:c,children:u}=t,d=xT(t,wD),f=Gg(l,{relative:d.relative}),m=Js(),h=C.useContext(Zw),{navigator:g,basename:E}=C.useContext(Xs),b=h!=null&&DD(f)&&c===!0,w=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,y=m.pathname,_=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;i||(y=y.toLowerCase(),_=_?_.toLowerCase():null,w=w.toLowerCase()),_&&E&&(_=Mo(_,E)||_);const k=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let R=y===w||!s&&y.startsWith(w)&&y.charAt(k)==="/",P=_!=null&&(_===w||!s&&_.startsWith(w)&&_.charAt(w.length)==="/"),I={isActive:R,isPending:P,isTransitioning:b},$=R?r:void 0,L;typeof o=="function"?L=o(I):L=[o,R?"active":null,P?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let N=typeof a=="function"?a(I):a;return C.createElement(_T,Cu({},d,{"aria-current":$,className:L,ref:n,style:N,to:l,unstable_viewTransition:c}),typeof u=="function"?u(I):u)});var n1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(n1||(n1={}));var LC;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(LC||(LC={}));function ND(e){let t=C.useContext(cp);return t||kt(!1),t}function $D(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a}=t===void 0?{}:t,l=qa(),c=Js(),u=Gg(e,{relative:s});return C.useCallback(d=>{if(vD(d,n)){d.preventDefault();let f=r!==void 0?r:Hl(c)===Hl(u);l(e,{replace:f,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a})}},[c,l,u,r,i,n,e,o,s,a])}function AD(e){let t=C.useRef(t1(e)),n=C.useRef(!1),r=Js(),i=C.useMemo(()=>yD(r.search,n.current?null:t.current),[r.search]),o=qa(),s=C.useCallback((a,l)=>{const c=t1(typeof a=="function"?a(i):a);n.current=!0,o("?"+c,l)},[o,i]);return[i,s]}function DD(e,t){t===void 0&&(t={});let n=C.useContext(ST);n==null&&kt(!1);let{basename:r}=ND(n1.useViewTransitionState),i=Gg(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Mo(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Mo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Nm(i.pathname,s)!=null||Nm(i.pathname,o)!=null}function Ie(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r[i]=e[i].reduce((o,s)=>{if(s){const a=t(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}function Vl(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n=0)continue;i[o]=n[o]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(i0)),i0.exports}function RT(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var UD=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,WD=RT(function(e){return UD.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});const PT=globalThis||void 0||self;function GD(e){if(e.sheet)return e.sheet;for(var t=0;t0?or(Hu,--ai):0,ku--,zn===10&&(ku=1,Vg--),zn}function Ri(){return zn=ai2||Df(zn)>3?"":" "}function rB(e,t){for(;--t&&Ri()&&!(zn<48||zn>102||zn>57&&zn<65||zn>70&&zn<97););return fp(e,Kh()+(t<6&&is()==32&&Ri()==32))}function i1(e){for(;Ri();)switch(zn){case e:return ai;case 34:case 39:e!==34&&e!==39&&i1(zn);break;case 40:e===41&&i1(e);break;case 92:Ri();break}return ai}function iB(e,t){for(;Ri()&&e+zn!==57;)if(e+zn===84&&is()===47)break;return"/*"+fp(t,ai-1)+"*"+Hg(e===47?e:Ri())}function oB(e){for(;!Df(is());)Ri();return fp(e,ai)}function sB(e){return MT(Yh("",null,null,null,[""],e=IT(e),0,[0],e))}function Yh(e,t,n,r,i,o,s,a,l){for(var c=0,u=0,d=s,f=0,m=0,h=0,g=1,E=1,b=1,w=0,y="",_=i,k=o,R=r,P=y;E;)switch(h=w,w=Ri()){case 40:if(h!=108&&or(P,d-1)==58){r1(P+=Kt(qh(w),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:P+=qh(w);break;case 9:case 10:case 13:case 32:P+=nB(h);break;case 92:P+=rB(Kh()-1,7);continue;case 47:switch(is()){case 42:case 47:dh(aB(iB(Ri(),Kh()),t,n),l);break;default:P+="/"}break;case 123*g:a[c++]=Yo(P)*b;case 125*g:case 59:case 0:switch(w){case 0:case 125:E=0;case 59+u:b==-1&&(P=Kt(P,/\f/g,"")),m>0&&Yo(P)-d&&dh(m>32?$C(P+";",r,n,d-1):$C(Kt(P," ","")+";",r,n,d-2),l);break;case 59:P+=";";default:if(dh(R=NC(P,t,n,c,u,i,a,y,_=[],k=[],d),o),w===123)if(u===0)Yh(P,t,R,R,_,o,d,a,k);else switch(f===99&&or(P,3)===110?100:f){case 100:case 108:case 109:case 115:Yh(e,R,R,r&&dh(NC(e,R,R,0,0,i,a,y,i,_=[],d),k),i,k,d,a,r?_:k);break;default:Yh(P,R,R,R,[""],k,0,a,k)}}c=u=m=0,g=b=1,y=P="",d=s;break;case 58:d=1+Yo(P),m=h;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&tB()==125)continue}switch(P+=Hg(w),w*g){case 38:b=u>0?1:(P+="\f",-1);break;case 44:a[c++]=(Yo(P)-1)*b,b=1;break;case 64:is()===45&&(P+=qh(Ri())),f=is(),u=d=Yo(y=P+=oB(Kh())),w++;break;case 45:h===45&&Yo(P)==2&&(g=0)}}return o}function NC(e,t,n,r,i,o,s,a,l,c,u){for(var d=i-1,f=i===0?o:[""],m=ox(f),h=0,g=0,E=0;h0?f[b]+" "+w:Kt(w,/&\f/g,f[b])))&&(l[E++]=y);return Kg(e,t,n,i===0?rx:a,l,c,u)}function aB(e,t,n){return Kg(e,t,n,TT,Hg(eB()),Af(e,2,-2),0)}function $C(e,t,n,r){return Kg(e,t,n,ix,Af(e,0,r),Af(e,r+1,-1),r)}function cu(e,t){for(var n="",r=ox(e),i=0;i6)switch(or(e,t+1)){case 109:if(or(e,t+4)!==45)break;case 102:return Kt(e,/(.+:)(.+)-([^]+)/,"$1"+Vt+"$2-$3$1"+$m+(or(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~r1(e,"stretch")?NT(Kt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(or(e,t+1)!==115)break;case 6444:switch(or(e,Yo(e)-3-(~r1(e,"!important")&&10))){case 107:return Kt(e,":",":"+Vt)+e;case 101:return Kt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Vt+(or(e,14)===45?"inline-":"")+"box$3$1"+Vt+"$2$3$1"+xr+"$2box$3")+e}break;case 5936:switch(or(e,t+11)){case 114:return Vt+e+xr+Kt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Vt+e+xr+Kt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Vt+e+xr+Kt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Vt+e+xr+e+e}return e}var gB=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case ix:t.return=NT(t.value,t.length);break;case OT:return cu([xd(t,{value:Kt(t.value,"@","@"+Vt)})],i);case rx:if(t.length)return ZD(t.props,function(o){switch(JD(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return cu([xd(t,{props:[Kt(o,/:(read-\w+)/,":"+$m+"$1")]})],i);case"::placeholder":return cu([xd(t,{props:[Kt(o,/:(plac\w+)/,":"+Vt+"input-$1")]}),xd(t,{props:[Kt(o,/:(plac\w+)/,":"+$m+"$1")]}),xd(t,{props:[Kt(o,/:(plac\w+)/,xr+"input-$1")]})],i)}return""})}},vB=[gB],$T=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var E=g.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||vB,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var E=g.getAttribute("data-emotion").split(" "),b=1;b=0)&&(n[i]=e[i]);return n}function dD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fD(e,t){return e.button===0&&(!t||t==="_self")&&!dD(e)}function t1(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function pD(e,t){let n=t1(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const hD=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],mD=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],gD="6";try{window.__reactRouterVersion=gD}catch{}function vD(e,t){return RA({basename:void 0,future:Cu({},void 0,{v7_prependBasename:!0}),history:X$({window:void 0}),hydrationData:yD(),routes:e,mapRouteProperties:uD,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function yD(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Cu({},t,{errors:bD(t.errors)})),t}function bD(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new Qw(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let s=new o(i.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const ST=C.createContext({isTransitioning:!1}),wD=C.createContext(new Map),xD="startTransition",OC=um[xD],SD="flushSync",jC=Q$[SD];function _D(e){OC?OC(e):e()}function wd(e){jC?jC(e):e()}class CD{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function kD(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=C.useState(n.state),[s,a]=C.useState(),[l,c]=C.useState({isTransitioning:!1}),[u,d]=C.useState(),[f,m]=C.useState(),[h,g]=C.useState(),R=C.useRef(new Map),{v7_startTransition:b}=r||{},w=C.useCallback(P=>{b?_D(P):P()},[b]),y=C.useCallback((P,I)=>{let{deletedFetchers:A,unstable_flushSync:L,unstable_viewTransitionOpts:N}=I;A.forEach(z=>R.current.delete(z)),P.fetchers.forEach((z,K)=>{z.data!==void 0&&R.current.set(K,z.data)});let F=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!N||F){L?wd(()=>o(P)):w(()=>o(P));return}if(L){wd(()=>{f&&(u&&u.resolve(),f.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let z=n.window.document.startViewTransition(()=>{wd(()=>o(P))});z.finished.finally(()=>{wd(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})})}),wd(()=>m(z));return}f?(u&&u.resolve(),f.skipTransition(),g({state:P,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(a(P),c({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,f,u,R,w]);C.useLayoutEffect(()=>n.subscribe(y),[n,y]),C.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new CD)},[l]),C.useEffect(()=>{if(u&&s&&n.window){let P=s,I=u.promise,A=n.window.document.startViewTransition(async()=>{w(()=>o(P)),await I});A.finished.finally(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})}),m(A)}},[w,s,u,n.window]),C.useEffect(()=>{u&&s&&i.location.key===s.location.key&&u.resolve()},[u,f,i.location,s]),C.useEffect(()=>{!l.isTransitioning&&h&&(a(h.state),c({isTransitioning:!0,flushSync:!1,currentLocation:h.currentLocation,nextLocation:h.nextLocation}),g(void 0))},[l.isTransitioning,h]),C.useEffect(()=>{},[]);let _=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:P=>n.navigate(P),push:(P,I,A)=>n.navigate(P,{state:I,preventScrollReset:A==null?void 0:A.preventScrollReset}),replace:(P,I,A)=>n.navigate(P,{replace:!0,state:I,preventScrollReset:A==null?void 0:A.preventScrollReset})}),[n]),k=n.basename||"/",E=C.useMemo(()=>({router:n,navigator:_,static:!1,basename:k}),[n,_,k]);return C.createElement(C.Fragment,null,C.createElement(cp.Provider,{value:E},C.createElement(Zw.Provider,{value:i},C.createElement(wD.Provider,{value:R.current},C.createElement(ST.Provider,{value:l},C.createElement(cD,{basename:k,location:i.location,navigationType:i.historyAction,navigator:_,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?C.createElement(ED,{routes:n.routes,future:n.future,state:i}):t))))),null)}function ED(e){let{routes:t,future:n,state:r}=e;return XA(t,void 0,r,n)}const RD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",PD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_T=C.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:u,unstable_viewTransition:d}=t,f=xT(t,hD),{basename:m}=C.useContext(Xs),h,g=!1;if(typeof c=="string"&&PD.test(c)&&(h=c,RD))try{let y=new URL(window.location.href),_=c.startsWith("//")?new URL(y.protocol+c):new URL(c),k=Mo(_.pathname,m);_.origin===y.origin&&k!=null?c=k+_.search+_.hash:g=!0}catch{}let R=KA(c,{relative:i}),b=jD(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:i,unstable_viewTransition:d});function w(y){r&&r(y),y.defaultPrevented||b(y)}return C.createElement("a",Cu({},f,{href:h||R,onClick:g||o?r:w,ref:n,target:l}))}),TD=C.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,unstable_viewTransition:c,children:u}=t,d=xT(t,mD),f=Gg(l,{relative:d.relative}),m=Js(),h=C.useContext(Zw),{navigator:g,basename:R}=C.useContext(Xs),b=h!=null&&ID(f)&&c===!0,w=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,y=m.pathname,_=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;i||(y=y.toLowerCase(),_=_?_.toLowerCase():null,w=w.toLowerCase()),_&&R&&(_=Mo(_,R)||_);const k=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let E=y===w||!s&&y.startsWith(w)&&y.charAt(k)==="/",P=_!=null&&(_===w||!s&&_.startsWith(w)&&_.charAt(w.length)==="/"),I={isActive:E,isPending:P,isTransitioning:b},A=E?r:void 0,L;typeof o=="function"?L=o(I):L=[o,E?"active":null,P?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let N=typeof a=="function"?a(I):a;return C.createElement(_T,Cu({},d,{"aria-current":A,className:L,ref:n,style:N,to:l,unstable_viewTransition:c}),typeof u=="function"?u(I):u)});var n1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(n1||(n1={}));var LC;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(LC||(LC={}));function OD(e){let t=C.useContext(cp);return t||kt(!1),t}function jD(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a}=t===void 0?{}:t,l=qa(),c=Js(),u=Gg(e,{relative:s});return C.useCallback(d=>{if(fD(d,n)){d.preventDefault();let f=r!==void 0?r:Hl(c)===Hl(u);l(e,{replace:f,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a})}},[c,l,u,r,i,n,e,o,s,a])}function LD(e){let t=C.useRef(t1(e)),n=C.useRef(!1),r=Js(),i=C.useMemo(()=>pD(r.search,n.current?null:t.current),[r.search]),o=qa(),s=C.useCallback((a,l)=>{const c=t1(typeof a=="function"?a(i):a);n.current=!0,o("?"+c,l)},[o,i]);return[i,s]}function ID(e,t){t===void 0&&(t={});let n=C.useContext(ST);n==null&&kt(!1);let{basename:r}=OD(n1.useViewTransitionState),i=Gg(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Mo(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Mo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Nm(i.pathname,s)!=null||Nm(i.pathname,o)!=null}function Ie(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r[i]=e[i].reduce((o,s)=>{if(s){const a=t(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}function Vl(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n=0)continue;i[o]=n[o]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(i0)),i0.exports}function AD(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var DD=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,BD=AD(function(e){return DD.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),FD=!1;function zD(e){if(e.sheet)return e.sheet;for(var t=0;t0?or(Hu,--ai):0,ku--,zn===10&&(ku=1,Vg--),zn}function Ri(){return zn=ai2||Df(zn)>3?"":" "}function eB(e,t){for(;--t&&Ri()&&!(zn<48||zn>102||zn>57&&zn<65||zn>70&&zn<97););return fp(e,Kh()+(t<6&&is()==32&&Ri()==32))}function i1(e){for(;Ri();)switch(zn){case e:return ai;case 34:case 39:e!==34&&e!==39&&i1(zn);break;case 40:e===41&&i1(e);break;case 92:Ri();break}return ai}function tB(e,t){for(;Ri()&&e+zn!==57;)if(e+zn===84&&is()===47)break;return"/*"+fp(t,ai-1)+"*"+Hg(e===47?e:Ri())}function nB(e){for(;!Df(is());)Ri();return fp(e,ai)}function rB(e){return LT(Yh("",null,null,null,[""],e=jT(e),0,[0],e))}function Yh(e,t,n,r,i,o,s,a,l){for(var c=0,u=0,d=s,f=0,m=0,h=0,g=1,R=1,b=1,w=0,y="",_=i,k=o,E=r,P=y;R;)switch(h=w,w=Ri()){case 40:if(h!=108&&or(P,d-1)==58){r1(P+=Kt(qh(w),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:P+=qh(w);break;case 9:case 10:case 13:case 32:P+=ZD(h);break;case 92:P+=eB(Kh()-1,7);continue;case 47:switch(is()){case 42:case 47:dh(iB(tB(Ri(),Kh()),t,n),l);break;default:P+="/"}break;case 123*g:a[c++]=Yo(P)*b;case 125*g:case 59:case 0:switch(w){case 0:case 125:R=0;case 59+u:b==-1&&(P=Kt(P,/\f/g,"")),m>0&&Yo(P)-d&&dh(m>32?$C(P+";",r,n,d-1):$C(Kt(P," ","")+";",r,n,d-2),l);break;case 59:P+=";";default:if(dh(E=NC(P,t,n,c,u,i,a,y,_=[],k=[],d),o),w===123)if(u===0)Yh(P,t,E,E,_,o,d,a,k);else switch(f===99&&or(P,3)===110?100:f){case 100:case 108:case 109:case 115:Yh(e,E,E,r&&dh(NC(e,E,E,0,0,i,a,y,i,_=[],d),k),i,k,d,a,r?_:k);break;default:Yh(P,E,E,E,[""],k,0,a,k)}}c=u=m=0,g=b=1,y=P="",d=s;break;case 58:d=1+Yo(P),m=h;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&JD()==125)continue}switch(P+=Hg(w),w*g){case 38:b=u>0?1:(P+="\f",-1);break;case 44:a[c++]=(Yo(P)-1)*b,b=1;break;case 64:is()===45&&(P+=qh(Ri())),f=is(),u=d=Yo(y=P+=nB(Kh())),w++;break;case 45:h===45&&Yo(P)==2&&(g=0)}}return o}function NC(e,t,n,r,i,o,s,a,l,c,u){for(var d=i-1,f=i===0?o:[""],m=ox(f),h=0,g=0,R=0;h0?f[b]+" "+w:Kt(w,/&\f/g,f[b])))&&(l[R++]=y);return Kg(e,t,n,i===0?rx:a,l,c,u)}function iB(e,t,n){return Kg(e,t,n,RT,Hg(XD()),Af(e,2,-2),0)}function $C(e,t,n,r){return Kg(e,t,n,ix,Af(e,0,r),Af(e,r+1,-1),r)}function cu(e,t){for(var n="",r=ox(e),i=0;i6)switch(or(e,t+1)){case 109:if(or(e,t+4)!==45)break;case 102:return Kt(e,/(.+:)(.+)-([^]+)/,"$1"+Vt+"$2-$3$1"+$m+(or(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~r1(e,"stretch")?IT(Kt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(or(e,t+1)!==115)break;case 6444:switch(or(e,Yo(e)-3-(~r1(e,"!important")&&10))){case 107:return Kt(e,":",":"+Vt)+e;case 101:return Kt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Vt+(or(e,14)===45?"inline-":"")+"box$3$1"+Vt+"$2$3$1"+xr+"$2box$3")+e}break;case 5936:switch(or(e,t+11)){case 114:return Vt+e+xr+Kt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Vt+e+xr+Kt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Vt+e+xr+Kt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Vt+e+xr+e+e}return e}var hB=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case ix:t.return=IT(t.value,t.length);break;case PT:return cu([xd(t,{value:Kt(t.value,"@","@"+Vt)})],i);case rx:if(t.length)return QD(t.props,function(o){switch(YD(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return cu([xd(t,{props:[Kt(o,/:(read-\w+)/,":"+$m+"$1")]})],i);case"::placeholder":return cu([xd(t,{props:[Kt(o,/:(plac\w+)/,":"+Vt+"input-$1")]}),xd(t,{props:[Kt(o,/:(plac\w+)/,":"+$m+"$1")]}),xd(t,{props:[Kt(o,/:(plac\w+)/,xr+"input-$1")]})],i)}return""})}},mB=[hB],MT=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var R=g.getAttribute("data-emotion");R.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||mB,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var R=g.getAttribute("data-emotion").split(" "),b=1;b=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&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)}var TB={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},OB=/[A-Z]|^ms/g,jB=/_EMO_([^_]+?)_([^]*?)_EMO_/g,WT=function(t){return t.charCodeAt(1)===45},DC=function(t){return t!=null&&typeof t!="boolean"},o0=RT(function(e){return WT(e)?e:e.replace(OB,"-$&").toLowerCase()}),BC=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jB,function(r,i,o){return Qo={name:i,styles:o,next:Qo},i})}return TB[t]!==1&&!WT(t)&&typeof n=="number"&&n!==0?n+"px":n};function Bf(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Qo={name:n.name,styles:n.styles,next:Qo},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Qo={name:r.name,styles:r.styles,next:Qo},r=r.next;var i=n.styles+";";return i}return LB(e,t,n)}case"function":{if(e!==void 0){var o=Qo,s=n(e);return Qo=o,Bf(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function LB(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?AB:DB},WC=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},BB=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return zT(n,r,i),MB(function(){return UT(n,r,i)}),null},FB=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var a=WC(t,n,r),l=a||UC(i),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,m=1;mt(WB(i)?n:i):t;return v.jsx($B,{styles:r})}function ux(e,t){return o1(e,t)}const YT=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},GB=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:qT,StyledEngineProvider:UB,ThemeContext:pp,css:KT,default:ux,internal_processStyles:YT,keyframes:iv},Symbol.toStringTag,{value:"Module"})),QT=qs(GB);function Cs(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function XT(e){if(!Cs(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=XT(e[n])}),t}function Hr(e,t,n={clone:!0}){const r=n.clone?A({},e):e;return Cs(e)&&Cs(t)&&Object.keys(t).forEach(i=>{Cs(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Cs(e[i])?r[i]=Hr(e[i],t[i],n):n.clone?r[i]=Cs(t[i])?XT(t[i]):t[i]:r[i]=t[i]}),r}const HB=Object.freeze(Object.defineProperty({__proto__:null,default:Hr,isPlainObject:Cs},Symbol.toStringTag,{value:"Module"})),VB=qs(HB),KB=qs(FD);var JT={exports:{}},en={};/** + */var Zn=typeof Symbol=="function"&&Symbol.for,sx=Zn?Symbol.for("react.element"):60103,ax=Zn?Symbol.for("react.portal"):60106,qg=Zn?Symbol.for("react.fragment"):60107,Yg=Zn?Symbol.for("react.strict_mode"):60108,Qg=Zn?Symbol.for("react.profiler"):60114,Xg=Zn?Symbol.for("react.provider"):60109,Jg=Zn?Symbol.for("react.context"):60110,lx=Zn?Symbol.for("react.async_mode"):60111,Zg=Zn?Symbol.for("react.concurrent_mode"):60111,ev=Zn?Symbol.for("react.forward_ref"):60112,tv=Zn?Symbol.for("react.suspense"):60113,gB=Zn?Symbol.for("react.suspense_list"):60120,nv=Zn?Symbol.for("react.memo"):60115,rv=Zn?Symbol.for("react.lazy"):60116,vB=Zn?Symbol.for("react.block"):60121,yB=Zn?Symbol.for("react.fundamental"):60117,bB=Zn?Symbol.for("react.responder"):60118,wB=Zn?Symbol.for("react.scope"):60119;function Mi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case sx:switch(e=e.type,e){case lx:case Zg:case qg:case Qg:case Yg:case tv:return e;default:switch(e=e&&e.$$typeof,e){case Jg:case ev:case rv:case nv:case Xg:return e;default:return t}}case ax:return t}}}function $T(e){return Mi(e)===Zg}Zt.AsyncMode=lx;Zt.ConcurrentMode=Zg;Zt.ContextConsumer=Jg;Zt.ContextProvider=Xg;Zt.Element=sx;Zt.ForwardRef=ev;Zt.Fragment=qg;Zt.Lazy=rv;Zt.Memo=nv;Zt.Portal=ax;Zt.Profiler=Qg;Zt.StrictMode=Yg;Zt.Suspense=tv;Zt.isAsyncMode=function(e){return $T(e)||Mi(e)===lx};Zt.isConcurrentMode=$T;Zt.isContextConsumer=function(e){return Mi(e)===Jg};Zt.isContextProvider=function(e){return Mi(e)===Xg};Zt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===sx};Zt.isForwardRef=function(e){return Mi(e)===ev};Zt.isFragment=function(e){return Mi(e)===qg};Zt.isLazy=function(e){return Mi(e)===rv};Zt.isMemo=function(e){return Mi(e)===nv};Zt.isPortal=function(e){return Mi(e)===ax};Zt.isProfiler=function(e){return Mi(e)===Qg};Zt.isStrictMode=function(e){return Mi(e)===Yg};Zt.isSuspense=function(e){return Mi(e)===tv};Zt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===qg||e===Zg||e===Qg||e===Yg||e===tv||e===gB||typeof e=="object"&&e!==null&&(e.$$typeof===rv||e.$$typeof===nv||e.$$typeof===Xg||e.$$typeof===Jg||e.$$typeof===ev||e.$$typeof===yB||e.$$typeof===bB||e.$$typeof===wB||e.$$typeof===vB)};Zt.typeOf=Mi;NT.exports=Zt;var xB=NT.exports,AT=xB,SB={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},_B={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},DT={};DT[AT.ForwardRef]=SB;DT[AT.Memo]=_B;var CB=!0;function kB(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var BT=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||CB===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},FT=function(t,n,r){BT(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function EB(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&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)}var RB={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},PB=!1,TB=/[A-Z]|^ms/g,OB=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zT=function(t){return t.charCodeAt(1)===45},DC=function(t){return t!=null&&typeof t!="boolean"},o0=lB(function(e){return zT(e)?e:e.replace(TB,"-$&").toLowerCase()}),BC=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(OB,function(r,i,o){return Qo={name:i,styles:o,next:Qo},i})}return RB[t]!==1&&!zT(t)&&typeof n=="number"&&n!==0?n+"px":n},jB="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Bf(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Qo={name:i.name,styles:i.styles,next:Qo},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Qo={name:s.name,styles:s.styles,next:Qo},s=s.next;var a=o.styles+";";return a}return LB(e,t,n)}case"function":{if(e!==void 0){var l=Qo,c=n(e);return Qo=l,Bf(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function LB(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?AB:DB},WC=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},BB=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return BT(n,r,i),MB(function(){return FT(n,r,i)}),null},FB=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var a=WC(t,n,r),l=a||UC(i),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,m=1;mt(WB(i)?n:i):t;return v.jsx($B,{styles:r})}function ux(e,t){return o1(e,t)}const KT=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},GB=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:VT,StyledEngineProvider:UB,ThemeContext:pp,css:HT,default:ux,internal_processStyles:KT,keyframes:iv},Symbol.toStringTag,{value:"Module"})),qT=qs(GB);function Cs(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function YT(e){if(!Cs(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=YT(e[n])}),t}function Hr(e,t,n={clone:!0}){const r=n.clone?$({},e):e;return Cs(e)&&Cs(t)&&Object.keys(t).forEach(i=>{Cs(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Cs(e[i])?r[i]=Hr(e[i],t[i],n):n.clone?r[i]=Cs(t[i])?YT(t[i]):t[i]:r[i]=t[i]}),r}const HB=Object.freeze(Object.defineProperty({__proto__:null,default:Hr,isPlainObject:Cs},Symbol.toStringTag,{value:"Module"})),VB=qs(HB),KB=qs(ND);var QT={exports:{}},en={};/** * @license React * react-is.production.min.js * @@ -80,7 +80,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var dx=Symbol.for("react.element"),fx=Symbol.for("react.portal"),ov=Symbol.for("react.fragment"),sv=Symbol.for("react.strict_mode"),av=Symbol.for("react.profiler"),lv=Symbol.for("react.provider"),cv=Symbol.for("react.context"),qB=Symbol.for("react.server_context"),uv=Symbol.for("react.forward_ref"),dv=Symbol.for("react.suspense"),fv=Symbol.for("react.suspense_list"),pv=Symbol.for("react.memo"),hv=Symbol.for("react.lazy"),YB=Symbol.for("react.offscreen"),ZT;ZT=Symbol.for("react.module.reference");function ao(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case dx:switch(e=e.type,e){case ov:case av:case sv:case dv:case fv:return e;default:switch(e=e&&e.$$typeof,e){case qB:case cv:case uv:case hv:case pv:case lv:return e;default:return t}}case fx:return t}}}en.ContextConsumer=cv;en.ContextProvider=lv;en.Element=dx;en.ForwardRef=uv;en.Fragment=ov;en.Lazy=hv;en.Memo=pv;en.Portal=fx;en.Profiler=av;en.StrictMode=sv;en.Suspense=dv;en.SuspenseList=fv;en.isAsyncMode=function(){return!1};en.isConcurrentMode=function(){return!1};en.isContextConsumer=function(e){return ao(e)===cv};en.isContextProvider=function(e){return ao(e)===lv};en.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===dx};en.isForwardRef=function(e){return ao(e)===uv};en.isFragment=function(e){return ao(e)===ov};en.isLazy=function(e){return ao(e)===hv};en.isMemo=function(e){return ao(e)===pv};en.isPortal=function(e){return ao(e)===fx};en.isProfiler=function(e){return ao(e)===av};en.isStrictMode=function(e){return ao(e)===sv};en.isSuspense=function(e){return ao(e)===dv};en.isSuspenseList=function(e){return ao(e)===fv};en.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ov||e===av||e===sv||e===dv||e===fv||e===YB||typeof e=="object"&&e!==null&&(e.$$typeof===hv||e.$$typeof===pv||e.$$typeof===lv||e.$$typeof===cv||e.$$typeof===uv||e.$$typeof===ZT||e.getModuleId!==void 0)};en.typeOf=ao;JT.exports=en;var GC=JT.exports;const QB=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function eO(e){const t=`${e}`.match(QB);return t&&t[1]||""}function tO(e,t=""){return e.displayName||e.name||eO(e)||t}function HC(e,t,n){const r=tO(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function XB(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return tO(e,"Component");if(typeof e=="object")switch(e.$$typeof){case GC.ForwardRef:return HC(e,e.render,"ForwardRef");case GC.Memo:return HC(e,e.type,"memo");default:return}}}const JB=Object.freeze(Object.defineProperty({__proto__:null,default:XB,getFunctionName:eO},Symbol.toStringTag,{value:"Module"})),ZB=qs(JB),e4=["values","unit","step"],t4=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>A({},n,{[r.key]:r.val}),{})};function nO(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ie(e,e4),o=t4(t),s=Object.keys(o);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,m){const h=s.indexOf(m);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(h!==-1&&typeof t[s[h]]=="number"?t[s[h]]:m)-r/100}${n})`}function u(f){return s.indexOf(f)+1`@media (min-width:${px[e]}px)`};function No(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||VC;return t.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const o=r.breakpoints||VC;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||px).indexOf(a)!==-1){const l=o.up(a);s[l]=n(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return n(t)}function rO(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function iO(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function r4(e,...t){const n=rO(e),r=[n,...t].reduce((i,o)=>Hr(i,o),{});return iO(Object.keys(n),r)}function i4(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((i,o)=>{o{e[i]!=null&&(n[i]=!0)}),n}function s0({values:e,breakpoints:t,base:n}){const r=n||i4(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,a,l)=>(Array.isArray(e)?(s[a]=e[l]!=null?e[l]:e[o],o=l):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[o],o=a):s[a]=e,s),{})}function Eu(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Am(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Eu(e,n)||r,t&&(i=t(i,r,e)),i}function Mn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,c=Eu(l,r)||{};return No(s,a,d=>{let f=Am(c,i,d);return d===f&&typeof d=="string"&&(f=Am(c,i,`${t}${d==="default"?"":we(d)}`,d)),n===!1?f:{[n]:f}})};return o.propTypes={},o.filterProps=[t],o}function o4(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const s4={m:"margin",p:"padding"},a4={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},KC={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},l4=o4(e=>{if(e.length>2)if(KC[e])e=KC[e];else return[e];const[t,n]=e.split(""),r=s4[t],i=a4[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),hx=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],mx=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...hx,...mx];function hp(e,t,n,r){var i;const o=(i=Eu(e,t,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function gx(e){return hp(e,"spacing",8)}function Kl(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function c4(e,t){return n=>e.reduce((r,i)=>(r[i]=Kl(t,n),r),{})}function u4(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=l4(n),o=c4(i,r),s=e[n];return No(e,s,o)}function oO(e,t){const n=gx(e.theme);return Object.keys(e).map(r=>u4(e,t,r,n)).reduce(ef,{})}function En(e){return oO(e,hx)}En.propTypes={};En.filterProps=hx;function Rn(e){return oO(e,mx)}Rn.propTypes={};Rn.filterProps=mx;function d4(e=8){if(e.mui)return e;const t=gx({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function mv(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?ef(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Ki(e){return typeof e!="number"?e:`${e}px solid`}function lo(e,t){return Mn({prop:e,themeKey:"borders",transform:t})}const f4=lo("border",Ki),p4=lo("borderTop",Ki),h4=lo("borderRight",Ki),m4=lo("borderBottom",Ki),g4=lo("borderLeft",Ki),v4=lo("borderColor"),y4=lo("borderTopColor"),b4=lo("borderRightColor"),w4=lo("borderBottomColor"),x4=lo("borderLeftColor"),S4=lo("outline",Ki),_4=lo("outlineColor"),gv=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=hp(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Kl(t,r)});return No(e,e.borderRadius,n)}return null};gv.propTypes={};gv.filterProps=["borderRadius"];mv(f4,p4,h4,m4,g4,v4,y4,b4,w4,x4,gv,S4,_4);const vv=e=>{if(e.gap!==void 0&&e.gap!==null){const t=hp(e.theme,"spacing",8),n=r=>({gap:Kl(t,r)});return No(e,e.gap,n)}return null};vv.propTypes={};vv.filterProps=["gap"];const yv=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=hp(e.theme,"spacing",8),n=r=>({columnGap:Kl(t,r)});return No(e,e.columnGap,n)}return null};yv.propTypes={};yv.filterProps=["columnGap"];const bv=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=hp(e.theme,"spacing",8),n=r=>({rowGap:Kl(t,r)});return No(e,e.rowGap,n)}return null};bv.propTypes={};bv.filterProps=["rowGap"];const C4=Mn({prop:"gridColumn"}),k4=Mn({prop:"gridRow"}),E4=Mn({prop:"gridAutoFlow"}),R4=Mn({prop:"gridAutoColumns"}),P4=Mn({prop:"gridAutoRows"}),T4=Mn({prop:"gridTemplateColumns"}),O4=Mn({prop:"gridTemplateRows"}),j4=Mn({prop:"gridTemplateAreas"}),L4=Mn({prop:"gridArea"});mv(vv,yv,bv,C4,k4,E4,R4,P4,T4,O4,j4,L4);function uu(e,t){return t==="grey"?t:e}const I4=Mn({prop:"color",themeKey:"palette",transform:uu}),M4=Mn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:uu}),N4=Mn({prop:"backgroundColor",themeKey:"palette",transform:uu});mv(I4,M4,N4);function wi(e){return e<=1&&e!==0?`${e*100}%`:e}const $4=Mn({prop:"width",transform:wi}),vx=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||px[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:wi(n)}};return No(e,e.maxWidth,t)}return null};vx.filterProps=["maxWidth"];const A4=Mn({prop:"minWidth",transform:wi}),D4=Mn({prop:"height",transform:wi}),B4=Mn({prop:"maxHeight",transform:wi}),F4=Mn({prop:"minHeight",transform:wi});Mn({prop:"size",cssProperty:"width",transform:wi});Mn({prop:"size",cssProperty:"height",transform:wi});const z4=Mn({prop:"boxSizing"});mv($4,vx,A4,D4,B4,F4,z4);const mp={border:{themeKey:"borders",transform:Ki},borderTop:{themeKey:"borders",transform:Ki},borderRight:{themeKey:"borders",transform:Ki},borderBottom:{themeKey:"borders",transform:Ki},borderLeft:{themeKey:"borders",transform:Ki},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ki},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:gv},color:{themeKey:"palette",transform:uu},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:uu},backgroundColor:{themeKey:"palette",transform:uu},p:{style:Rn},pt:{style:Rn},pr:{style:Rn},pb:{style:Rn},pl:{style:Rn},px:{style:Rn},py:{style:Rn},padding:{style:Rn},paddingTop:{style:Rn},paddingRight:{style:Rn},paddingBottom:{style:Rn},paddingLeft:{style:Rn},paddingX:{style:Rn},paddingY:{style:Rn},paddingInline:{style:Rn},paddingInlineStart:{style:Rn},paddingInlineEnd:{style:Rn},paddingBlock:{style:Rn},paddingBlockStart:{style:Rn},paddingBlockEnd:{style:Rn},m:{style:En},mt:{style:En},mr:{style:En},mb:{style:En},ml:{style:En},mx:{style:En},my:{style:En},margin:{style:En},marginTop:{style:En},marginRight:{style:En},marginBottom:{style:En},marginLeft:{style:En},marginX:{style:En},marginY:{style:En},marginInline:{style:En},marginInlineStart:{style:En},marginInlineEnd:{style:En},marginBlock:{style:En},marginBlockStart:{style:En},marginBlockEnd:{style:En},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:vv},rowGap:{style:bv},columnGap:{style:yv},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:wi},maxWidth:{style:vx},minWidth:{transform:wi},height:{transform:wi},maxHeight:{transform:wi},minHeight:{transform:wi},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function U4(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function W4(e,t){return typeof e=="function"?e(t):e}function sO(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=Eu(i,c)||{};return d?d(s):No(s,r,h=>{let g=Am(f,u,h);return h===g&&typeof h=="string"&&(g=Am(f,u,`${n}${h==="default"?"":we(h)}`,h)),l===!1?g:{[l]:g}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:mp;function a(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;const u=rO(o.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(m=>{const h=W4(c[m],o);if(h!=null)if(typeof h=="object")if(s[m])f=ef(f,e(m,h,o,s));else{const g=No({theme:o},h,E=>({[m]:E}));U4(g,h)?f[m]=t({sx:h,theme:o}):f=ef(f,g)}else f=ef(f,e(m,h,o,s))}),iO(d,f)}return Array.isArray(i)?i.map(a):a(i)}return t}const Vu=sO();Vu.filterProps=["sx"];function aO(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const G4=["breakpoints","palette","spacing","shape"];function gp(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Ie(e,G4),a=nO(n),l=d4(i);let c=Hr({breakpoints:a,direction:"ltr",components:{},palette:A({mode:"light"},r),spacing:l,shape:A({},n4,o)},s);return c.applyStyles=aO,c=t.reduce((u,d)=>Hr(u,d),c),c.unstable_sxConfig=A({},mp,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Vu({sx:d,theme:this})},c}const H4=Object.freeze(Object.defineProperty({__proto__:null,default:gp,private_createBreakpoints:nO,unstable_applyStyles:aO},Symbol.toStringTag,{value:"Module"})),V4=qs(H4),K4=["sx"],q4=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:mp;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function wv(e){const{sx:t}=e,n=Ie(e,K4),{systemProps:r,otherProps:i}=q4(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const a=t(...s);return Cs(a)?A({},r,a):r}:o=A({},r,t),A({},i,{sx:o})}const Y4=Object.freeze(Object.defineProperty({__proto__:null,default:Vu,extendSxProp:wv,unstable_createStyleFunctionSx:sO,unstable_defaultSxConfig:mp},Symbol.toStringTag,{value:"Module"})),Q4=qs(Y4);var Ku=so;Object.defineProperty(dp,"__esModule",{value:!0});var X4=dp.default=u5;dp.shouldForwardProp=Qh;dp.systemDefaultTheme=void 0;var Wi=Ku(ET()),a1=Ku(zD()),qC=i5(QT),J4=VB;Ku(KB);Ku(ZB);var Z4=Ku(V4),e5=Ku(Q4);const t5=["ownerState"],n5=["variants"],r5=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function lO(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(lO=function(r){return r?n:t})(e)}function i5(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=lO(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function o5(e){return Object.keys(e).length===0}function s5(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Qh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const a5=dp.systemDefaultTheme=(0,Z4.default)(),l5=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function fh({defaultTheme:e,theme:t,themeId:n}){return o5(t)?e:t[n]||t}function c5(e){return e?(t,n)=>n[e]:null}function Xh(e,t){let{ownerState:n}=t,r=(0,a1.default)(t,t5);const i=typeof e=="function"?e((0,Wi.default)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Xh(o,(0,Wi.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=(0,a1.default)(i,n5);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,Wi.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,Wi.default)({ownerState:n},r,n)):l.style))}),a}return i}function u5(e={}){const{themeId:t,defaultTheme:n=a5,rootShouldForwardProp:r=Qh,slotShouldForwardProp:i=Qh}=e,o=s=>(0,e5.default)((0,Wi.default)({},s,{theme:fh((0,Wi.default)({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,qC.internal_processStyles)(s,k=>k.filter(R=>!(R!=null&&R.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=c5(l5(c))}=a,m=(0,a1.default)(a,r5),h=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=d||!1;let E,b=Qh;c==="Root"||c==="root"?b=r:c?b=i:s5(s)&&(b=void 0);const w=(0,qC.default)(s,(0,Wi.default)({shouldForwardProp:b,label:E},m)),y=k=>typeof k=="function"&&k.__emotion_real!==k||(0,J4.isPlainObject)(k)?R=>Xh(k,(0,Wi.default)({},R,{theme:fh({theme:R.theme,defaultTheme:n,themeId:t})})):k,_=(k,...R)=>{let P=y(k);const I=R?R.map(y):[];l&&f&&I.push(N=>{const F=fh((0,Wi.default)({},N,{defaultTheme:n,themeId:t}));if(!F.components||!F.components[l]||!F.components[l].styleOverrides)return null;const z=F.components[l].styleOverrides,K={};return Object.entries(z).forEach(([Z,le])=>{K[Z]=Xh(le,(0,Wi.default)({},N,{theme:F}))}),f(N,K)}),l&&!h&&I.push(N=>{var F;const z=fh((0,Wi.default)({},N,{defaultTheme:n,themeId:t})),K=z==null||(F=z.components)==null||(F=F[l])==null?void 0:F.variants;return Xh({variants:K},(0,Wi.default)({},N,{theme:z}))}),g||I.push(o);const $=I.length-R.length;if(Array.isArray(k)&&$>0){const N=new Array($).fill("");P=[...k,...N],P.raw=[...k.raw,...N]}const L=w(P,...I);return s.muiName&&(L.muiName=s.muiName),L};return w.withConfig&&(_.withConfig=w.withConfig),_}}const YC=e=>e,d5=()=>{let e=YC;return{configure(t){e=t},generate(t){return e(t)},reset(){e=YC}}},yx=d5(),cO={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ht(e,t,n="Mui"){const r=cO[t];return r?`${n}-${r}`:`${yx.generate(e)}-${t}`}function f5(e,t){return A({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Nn={};const p5=qs(BD);function h5(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const m5=Object.freeze(Object.defineProperty({__proto__:null,default:h5},Symbol.toStringTag,{value:"Module"})),g5=qs(m5);var uO=so;Object.defineProperty(Nn,"__esModule",{value:!0});var At=Nn.alpha=hO;Nn.blend=R5;Nn.colorChannel=void 0;var Dm=Nn.darken=wx;Nn.decomposeColor=to;var l1=Nn.emphasize=mO,v5=Nn.getContrastRatio=S5;Nn.getLuminance=Fm;Nn.hexToRgb=dO;Nn.hslToRgb=pO;var Bm=Nn.lighten=xx;Nn.private_safeAlpha=_5;Nn.private_safeColorChannel=void 0;Nn.private_safeDarken=C5;Nn.private_safeEmphasize=E5;Nn.private_safeLighten=k5;Nn.recomposeColor=qu;Nn.rgbToHex=x5;var QC=uO(p5),y5=uO(g5);function bx(e,t=0,n=1){return(0,y5.default)(e,t,n)}function dO(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function b5(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function to(e){if(e.type)return e;if(e.charAt(0)==="#")return to(dO(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,QC.default)(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,QC.default)(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const fO=e=>{const t=to(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Nn.colorChannel=fO;const w5=(e,t)=>{try{return fO(e)}catch{return e}};Nn.private_safeColorChannel=w5;function qu(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function x5(e){if(e.indexOf("#")===0)return e;const{values:t}=to(e);return`#${t.map((n,r)=>b5(r===3?Math.round(255*n):n)).join("")}`}function pO(e){e=to(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(c,u=(c+n/30)%12)=>i-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),qu({type:a,values:l})}function Fm(e){e=to(e);let t=e.type==="hsl"||e.type==="hsla"?to(pO(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function S5(e,t){const n=Fm(e),r=Fm(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function hO(e,t){return e=to(e),t=bx(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,qu(e)}function _5(e,t,n){try{return hO(e,t)}catch{return e}}function wx(e,t){if(e=to(e),t=bx(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return qu(e)}function C5(e,t,n){try{return wx(e,t)}catch{return e}}function xx(e,t){if(e=to(e),t=bx(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return qu(e)}function k5(e,t,n){try{return xx(e,t)}catch{return e}}function mO(e,t=.15){return Fm(e)>.5?wx(e,t):xx(e,t)}function E5(e,t,n){try{return mO(e,t)}catch{return e}}function R5(e,t,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),o=to(e),s=to(t),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return qu({type:"rgb",values:a})}const Ff={black:"#000",white:"#fff"},P5={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Sc={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},_c={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Sd={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Cc={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},kc={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Ec={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},T5=["mode","contrastThreshold","tonalOffset"],XC={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Ff.white,default:Ff.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},a0={text:{primary:Ff.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Ff.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function JC(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Bm(e.main,i):t==="dark"&&(e.dark=Dm(e.main,o)))}function O5(e="light"){return e==="dark"?{main:Cc[200],light:Cc[50],dark:Cc[400]}:{main:Cc[700],light:Cc[400],dark:Cc[800]}}function j5(e="light"){return e==="dark"?{main:Sc[200],light:Sc[50],dark:Sc[400]}:{main:Sc[500],light:Sc[300],dark:Sc[700]}}function L5(e="light"){return e==="dark"?{main:_c[500],light:_c[300],dark:_c[700]}:{main:_c[700],light:_c[400],dark:_c[800]}}function I5(e="light"){return e==="dark"?{main:kc[400],light:kc[300],dark:kc[700]}:{main:kc[700],light:kc[500],dark:kc[900]}}function M5(e="light"){return e==="dark"?{main:Ec[400],light:Ec[300],dark:Ec[700]}:{main:Ec[800],light:Ec[500],dark:Ec[900]}}function N5(e="light"){return e==="dark"?{main:Sd[400],light:Sd[300],dark:Sd[700]}:{main:"#ed6c02",light:Sd[500],dark:Sd[900]}}function $5(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Ie(e,T5),o=e.primary||O5(t),s=e.secondary||j5(t),a=e.error||L5(t),l=e.info||I5(t),c=e.success||M5(t),u=e.warning||N5(t);function d(g){return v5(g,a0.text.primary)>=n?a0.text.primary:XC.text.primary}const f=({color:g,name:E,mainShade:b=500,lightShade:w=300,darkShade:y=700})=>{if(g=A({},g),!g.main&&g[b]&&(g.main=g[b]),!g.hasOwnProperty("main"))throw new Error(Vl(11,E?` (${E})`:"",b));if(typeof g.main!="string")throw new Error(Vl(12,E?` (${E})`:"",JSON.stringify(g.main)));return JC(g,"light",w,r),JC(g,"dark",y,r),g.contrastText||(g.contrastText=d(g.main)),g},m={dark:a0,light:XC};return Hr(A({common:A({},Ff),mode:t,primary:f({color:o,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:P5,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},m[t]),i)}const A5=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function D5(e){return Math.round(e*1e5)/1e5}const ZC={textTransform:"uppercase"},ek='"Roboto", "Helvetica", "Arial", sans-serif';function B5(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=ek,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,f=Ie(n,A5),m=i/14,h=d||(b=>`${b/c*m}rem`),g=(b,w,y,_,k)=>A({fontFamily:r,fontWeight:b,fontSize:h(w),lineHeight:y},r===ek?{letterSpacing:`${D5(_/w)}em`}:{},k,u),E={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(a,14,1.75,.4,ZC),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,ZC),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Hr(A({htmlFontSize:c,pxToRem:h,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},E),f,{clone:!1})}const F5=.2,z5=.14,U5=.12;function gn(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${F5})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${z5})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${U5})`].join(",")}const W5=["none",gn(0,2,1,-1,0,1,1,0,0,1,3,0),gn(0,3,1,-2,0,2,2,0,0,1,5,0),gn(0,3,3,-2,0,3,4,0,0,1,8,0),gn(0,2,4,-1,0,4,5,0,0,1,10,0),gn(0,3,5,-1,0,5,8,0,0,1,14,0),gn(0,3,5,-1,0,6,10,0,0,1,18,0),gn(0,4,5,-2,0,7,10,1,0,2,16,1),gn(0,5,5,-3,0,8,10,1,0,3,14,2),gn(0,5,6,-3,0,9,12,1,0,3,16,2),gn(0,6,6,-3,0,10,14,1,0,4,18,3),gn(0,6,7,-4,0,11,15,1,0,4,20,3),gn(0,7,8,-4,0,12,17,2,0,5,22,4),gn(0,7,8,-4,0,13,19,2,0,5,24,4),gn(0,7,9,-4,0,14,21,2,0,5,26,4),gn(0,8,9,-5,0,15,22,2,0,6,28,5),gn(0,8,10,-5,0,16,24,2,0,6,30,5),gn(0,8,11,-5,0,17,26,2,0,6,32,5),gn(0,9,11,-5,0,18,28,2,0,7,34,6),gn(0,9,12,-6,0,19,29,2,0,7,36,6),gn(0,10,13,-6,0,20,31,3,0,8,38,7),gn(0,10,13,-6,0,21,33,3,0,8,40,7),gn(0,10,14,-6,0,22,35,3,0,8,42,7),gn(0,11,14,-7,0,23,36,3,0,9,44,8),gn(0,11,15,-7,0,24,38,3,0,9,46,8)],G5=["duration","easing","delay"],H5={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},gO={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function tk(e){return`${Math.round(e)}ms`}function V5(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function K5(e){const t=A({},H5,e.easing),n=A({},gO,e.duration);return A({getAutoHeightDuration:V5,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0}=o;return Ie(o,G5),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:tk(s)} ${a} ${typeof l=="string"?l:tk(l)}`).join(",")}},e,{easing:t,duration:n})}const q5={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Y5=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Sx(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Ie(e,Y5);if(e.vars)throw new Error(Vl(18));const a=$5(r),l=gp(e);let c=Hr(l,{mixins:f5(l.breakpoints,n),palette:a,shadows:W5.slice(),typography:B5(a,o),transitions:K5(i),zIndex:A({},q5)});return c=Hr(c,s),c=t.reduce((u,d)=>Hr(u,d),c),c.unstable_sxConfig=A({},mp,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Vu({sx:d,theme:this})},c}const _x=Sx(),Ru="$$material";function vO(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const cr=e=>vO(e)&&e!=="classes",Ee=X4({themeId:Ru,defaultTheme:_x,rootShouldForwardProp:cr});function zf(e,t){const n=A({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=A({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=A({},o),Object.keys(i).forEach(s=>{n[r][s]=zf(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}const yO=C.createContext(void 0);function Q5({value:e,children:t}){return v.jsx(yO.Provider,{value:e,children:t})}function X5(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?zf(i.defaultProps,r):!i.styleOverrides&&!i.variants?zf(i,r):r}function J5({props:e,name:t}){const n=C.useContext(yO);return X5({props:e,name:t,theme:{components:n}})}function mt(e){return J5(e)}const nk={};function Z5(e,t){const n=C.useRef(nk);return n.current===nk&&(n.current=e(t)),n}const e3=[];function t3(e){C.useEffect(e,e3)}class vp{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new vp}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Sa(){const e=Z5(vp.create).current;return t3(e.disposeEffect),e}let xv=!0,c1=!1;const n3=new vp,r3={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function i3(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&r3[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function o3(e){e.metaKey||e.altKey||e.ctrlKey||(xv=!0)}function l0(){xv=!1}function s3(){this.visibilityState==="hidden"&&c1&&(xv=!0)}function a3(e){e.addEventListener("keydown",o3,!0),e.addEventListener("mousedown",l0,!0),e.addEventListener("pointerdown",l0,!0),e.addEventListener("touchstart",l0,!0),e.addEventListener("visibilitychange",s3,!0)}function l3(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return xv||i3(t)}function Sv(){const e=C.useCallback(i=>{i!=null&&a3(i.ownerDocument)},[]),t=C.useRef(!1);function n(){return t.current?(c1=!0,n3.start(100,()=>{c1=!1}),t.current=!1,!0):!1}function r(i){return l3(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function zm(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function un(...e){return C.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{zm(n,t)})},e)}function gt(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=ht(e,i,n)}),r}function c3(e){return ht("MuiTypography",e)}gt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const u3=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],d3=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,e.align!=="inherit"&&`align${we(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return pt(a,c3,s)},f3=Ee("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${we(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>A({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),rk={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},p3={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},h3=e=>p3[e]||e,_t=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiTypography"}),i=h3(r.color),o=wv(A({},r,{color:i})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:d=!1,variant:f="body1",variantMapping:m=rk}=o,h=Ie(o,u3),g=A({},o,{align:s,color:i,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:d,variant:f,variantMapping:m}),E=l||(d?"p":m[f]||rk[f])||"span",b=d3(g);return v.jsx(f3,A({as:E,ref:n,ownerState:g,className:De(b.root,a)},h))});function m3(e){return ht("MuiLink",e)}const g3=gt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);function v3(e){return Object.keys(e).length===0}function Cx(e=null){const t=C.useContext(pp);return!t||v3(t)?e:t}const y3=gp();function _v(e=y3){return Cx(e)}function b3({styles:e,themeId:t,defaultTheme:n={}}){const r=_v(n),i=typeof e=="function"?e(t&&r[t]||r):e;return v.jsx(qT,{styles:i})}const w3=["className","component"];function x3(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=ux("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(Vu);return C.forwardRef(function(l,c){const u=_v(n),d=wv(l),{className:f,component:m="div"}=d,h=Ie(d,w3);return v.jsx(o,A({as:m,ref:c,className:De(f,i?i(r):r),theme:t&&u[t]||u},h))})}const S3=["ownerState"],_3=["variants"],C3=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function k3(e){return Object.keys(e).length===0}function E3(e){return typeof e=="string"&&e.charCodeAt(0)>96}function c0(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const R3=gp(),P3=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function ph({defaultTheme:e,theme:t,themeId:n}){return k3(t)?e:t[n]||t}function T3(e){return e?(t,n)=>n[e]:null}function Jh(e,t){let{ownerState:n}=t,r=Ie(t,S3);const i=typeof e=="function"?e(A({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Jh(o,A({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=Ie(i,_3);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props(A({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style(A({ownerState:n},r,n)):l.style))}),a}return i}function O3(e={}){const{themeId:t,defaultTheme:n=R3,rootShouldForwardProp:r=c0,slotShouldForwardProp:i=c0}=e,o=s=>Vu(A({},s,{theme:ph(A({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{YT(s,k=>k.filter(R=>!(R!=null&&R.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=T3(P3(c))}=a,m=Ie(a,C3),h=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=d||!1;let E,b=c0;c==="Root"||c==="root"?b=r:c?b=i:E3(s)&&(b=void 0);const w=ux(s,A({shouldForwardProp:b,label:E},m)),y=k=>typeof k=="function"&&k.__emotion_real!==k||Cs(k)?R=>Jh(k,A({},R,{theme:ph({theme:R.theme,defaultTheme:n,themeId:t})})):k,_=(k,...R)=>{let P=y(k);const I=R?R.map(y):[];l&&f&&I.push(N=>{const F=ph(A({},N,{defaultTheme:n,themeId:t}));if(!F.components||!F.components[l]||!F.components[l].styleOverrides)return null;const z=F.components[l].styleOverrides,K={};return Object.entries(z).forEach(([Z,le])=>{K[Z]=Jh(le,A({},N,{theme:F}))}),f(N,K)}),l&&!h&&I.push(N=>{var F;const z=ph(A({},N,{defaultTheme:n,themeId:t})),K=z==null||(F=z.components)==null||(F=F[l])==null?void 0:F.variants;return Jh({variants:K},A({},N,{theme:z}))}),g||I.push(o);const $=I.length-R.length;if(Array.isArray(k)&&$>0){const N=new Array($).fill("");P=[...k,...N],P.raw=[...k.raw,...N]}const L=w(P,...I);return s.muiName&&(L.muiName=s.muiName),L};return w.withConfig&&(_.withConfig=w.withConfig),_}}const j3=O3();function bO(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:zf(t.components[n].defaultProps,r)}function L3({props:e,name:t,defaultTheme:n,themeId:r}){let i=_v(n);return r&&(i=i[r]||i),bO({theme:i,name:t,props:e})}const li=typeof window<"u"?C.useLayoutEffect:C.useEffect;function I3(e,t,n,r,i){const[o,s]=C.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return li(()=>{let a=!0;if(!n)return;const l=n(e),c=()=>{a&&s(l.matches)};return c(),l.addListener(c),()=>{a=!1,l.removeListener(c)}},[e,n]),o}const wO=C.useSyncExternalStore;function M3(e,t,n,r,i){const o=C.useCallback(()=>t,[t]),s=C.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(r!==null){const{matches:u}=r(e);return()=>u}return o},[o,e,r,i,n]),[a,l]=C.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const u=n(e);return[()=>u.matches,d=>(u.addListener(d),()=>{u.removeListener(d)})]},[o,n,e]);return wO(l,a,s)}function kx(e,t={}){const n=Cx(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=bO({name:"MuiUseMediaQuery",props:t,theme:n});let l=typeof e=="function"?e(n):e;return l=l.replace(/^@media( ?)/m,""),(wO!==void 0?M3:I3)(l,i,o,s,a)}function u1(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function Cv(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function N3(e,t){return()=>null}function tf(e,t){var n,r;return C.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function qn(e){return e&&e.ownerDocument||document}function ss(e){return qn(e).defaultView||window}function $3(e,t){return()=>null}let ik=0;function A3(e){const[t,n]=C.useState(e),r=e||t;return C.useEffect(()=>{t==null&&(ik+=1,n(`mui-${ik}`))},[t]),r}const ok=um.useId;function yp(e){if(ok!==void 0){const t=ok();return e??t}return A3(e)}function D3(e,t,n,r,i){return null}function Pu({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=C.useRef(e!==void 0),[o,s]=C.useState(t),a=i?e:o,l=C.useCallback(c=>{i||s(c)},[]);return[a,l]}function Yi(e){const t=C.useRef(e);return li(()=>{t.current=e}),C.useRef((...n)=>(0,t.current)(...n)).current}function xO(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const SO=e=>{const t=C.useRef({});return C.useEffect(()=>{t.current=e}),t.current};function B3(e){return C.Children.toArray(e).filter(t=>C.isValidElement(t))}const _O=C.createContext(null);function CO(){return C.useContext(_O)}const F3=typeof Symbol=="function"&&Symbol.for,z3=F3?Symbol.for("mui.nested"):"__THEME_NESTED__";function U3(e,t){return typeof t=="function"?t(e):A({},e,t)}function W3(e){const{children:t,theme:n}=e,r=CO(),i=C.useMemo(()=>{const o=r===null?n:U3(r,n);return o!=null&&(o[z3]=r!==null),o},[n,r]);return v.jsx(_O.Provider,{value:i,children:t})}const G3=["value"],kO=C.createContext();function H3(e){let{value:t}=e,n=Ie(e,G3);return v.jsx(kO.Provider,A({value:t??!0},n))}const Ex=()=>{const e=C.useContext(kO);return e??!1},sk={};function ak(e,t,n,r=!1){return C.useMemo(()=>{const i=e&&t[e]||t;if(typeof n=="function"){const o=n(i),s=e?A({},t,{[e]:o}):o;return r?()=>s:s}return e?A({},t,{[e]:n}):A({},t,n)},[e,t,n,r])}function V3(e){const{children:t,theme:n,themeId:r}=e,i=Cx(sk),o=CO()||sk,s=ak(r,i,n),a=ak(r,o,n,!0),l=s.direction==="rtl";return v.jsx(W3,{theme:a,children:v.jsx(pp.Provider,{value:s,children:v.jsx(H3,{value:l,children:v.jsx(Q5,{value:s==null?void 0:s.components,children:t})})})})}function Uf(e){"@babel/helpers - typeof";return Uf=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},Uf(e)}function K3(e,t){if(Uf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function q3(e){var t=K3(e,"string");return Uf(t)=="symbol"?t:t+""}const Y3=["component","direction","spacing","divider","children","className","useFlexGap"],Q3=gp(),X3=j3("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function J3(e){return L3({props:e,name:"MuiStack",defaultTheme:Q3})}function Z3(e,t){const n=C.Children.toArray(e).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],tF=({ownerState:e,theme:t})=>{let n=A({display:"flex",flexDirection:"column"},No({theme:t},s0({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=gx(t),i=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),o=s0({values:e.direction,base:i}),s=s0({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((l,c,u)=>{if(!o[l]){const f=c>0?o[u[c-1]]:"column";o[l]=f}}),n=Hr(n,No({theme:t},s,(l,c)=>e.useFlexGap?{gap:Kl(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${eF(c?o[c]:e.direction)}`]:Kl(r,l)}}))}return n=r4(t.breakpoints,n),n};function nF(e={}){const{createStyledComponent:t=X3,useThemeProps:n=J3,componentName:r="MuiStack"}=e,i=()=>pt({root:["root"]},l=>ht(r,l),{}),o=t(tF);return C.forwardRef(function(l,c){const u=n(l),d=wv(u),{component:f="div",direction:m="column",spacing:h=0,divider:g,children:E,className:b,useFlexGap:w=!1}=d,y=Ie(d,Y3),_={direction:m,spacing:h,useFlexGap:w},k=i();return v.jsx(o,A({as:f,ownerState:_,ref:c,className:De(k.root,b)},y,{children:g?Z3(E,g):E}))})}const EO={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},rF=e=>EO[e]||e,iF=({theme:e,ownerState:t})=>{const n=rF(t.color),r=Eu(e,`palette.${n}`,!1)||t.color,i=Eu(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:At(r,.4)},oF=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],sF=e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root",`underline${we(i)}`,n==="button"&&"button",r&&"focusVisible"]};return pt(o,m3,t)},aF=Ee(_t,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${we(n.underline)}`],n.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>A({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&A({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:iF({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${g3.focusVisible}`]:{outline:"auto"}})),ko=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiLink"}),{className:i,color:o="primary",component:s="a",onBlur:a,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:f}=r,m=Ie(r,oF),{isFocusVisibleRef:h,onBlur:g,onFocus:E,ref:b}=Sv(),[w,y]=C.useState(!1),_=un(n,b),k=$=>{g($),h.current===!1&&y(!1),a&&a($)},R=$=>{E($),h.current===!0&&y(!0),l&&l($)},P=A({},r,{color:o,component:s,focusVisible:w,underline:u,variant:d}),I=sF(P);return v.jsx(aF,A({color:o,className:De(I.root,i),classes:c,component:s,onBlur:k,onFocus:R,ref:_,ownerState:P,variant:d,sx:[...Object.keys(EO).includes(o)?[]:[{color:o}],...Array.isArray(f)?f:[f]]},m))}),lk=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function Ni(){const e=_v(_x);return e[Ru]||e}function lF(e){return ht("MuiPaper",e)}gt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const cF=["className","component","elevation","square","variant"],uF=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return pt(o,lF,i)},dF=Ee("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return A({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&A({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${At("#fff",lk(t.elevation))}, ${At("#fff",lk(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),us=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,c=Ie(r,cF),u=A({},r,{component:o,elevation:s,square:a,variant:l}),d=uF(u);return v.jsx(dF,A({as:o,ownerState:u,className:De(d.root,i),ref:n},c))});function fF(e){return ht("MuiAppBar",e)}gt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const pF=["className","color","enableColorOnDark","position"],hF=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${we(t)}`,`position${we(n)}`]};return pt(i,fF,r)},hh=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,mF=Ee(us,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${we(n.position)}`],t[`color${we(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return A({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&A({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&A({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&A({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:hh(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:hh(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:hh(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:hh(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},!["inherit","transparent"].includes(t.color)&&{backgroundColor:"var(--AppBar-background)"},{color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),gF=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,l=Ie(r,pF),c=A({},r,{color:o,position:a,enableColorOnDark:s}),u=hF(c);return v.jsx(mF,A({square:!0,component:"header",ownerState:c,elevation:4,className:De(u.root,i,a==="fixed"&&"mui-fixed"),ref:n},l))});function vF(e){return ht("MuiToolbar",e)}gt("MuiToolbar",["root","gutters","regular","dense"]);const yF=["className","component","disableGutters","variant"],bF=e=>{const{classes:t,disableGutters:n,variant:r}=e;return pt({root:["root",!n&&"gutters",r]},vF,t)},wF=Ee("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>A({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),xF=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular"}=r,l=Ie(r,yF),c=A({},r,{component:o,disableGutters:s,variant:a}),u=bF(c);return v.jsx(wF,A({as:o,className:De(u.root,i),ref:n,ownerState:c},l))});function Wf(e,t){return Wf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Wf(e,t)}function bp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Wf(e,t)}const ck={disabled:!1},Um=jt.createContext(null);var SF=function(t){return t.scrollTop},Fd="unmounted",vl="exited",yl="entering",Ac="entered",d1="exiting",co=function(e){bp(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=vl,o.appearStatus=yl):l=Ac:r.unmountOnExit||r.mountOnEnter?l=Fd:l=vl,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Fd?{status:vl}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==yl&&s!==Ac&&(o=yl):(s===yl||s===Ac)&&(o=d1)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===yl){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Dd.findDOMNode(this);s&&SF(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===vl&&this.setState({status:Fd})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[Dd.findDOMNode(this),a],c=l[0],u=l[1],d=this.getTimeouts(),f=a?d.appear:d.enter;if(!i&&!s||ck.disabled){this.safeSetState({status:Ac},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:yl},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:Ac},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Dd.findDOMNode(this);if(!o||ck.disabled){this.safeSetState({status:vl},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:d1},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:vl},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Dd.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Fd)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=Ie(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return jt.createElement(Um.Provider,{value:null},typeof s=="function"?s(i,a):jt.cloneElement(jt.Children.only(s),a))},t}(jt.Component);co.contextType=Um;co.propTypes={};function Rc(){}co.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Rc,onEntering:Rc,onEntered:Rc,onExit:Rc,onExiting:Rc,onExited:Rc};co.UNMOUNTED=Fd;co.EXITED=vl;co.ENTERING=yl;co.ENTERED=Ac;co.EXITING=d1;function _F(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rx(e,t){var n=function(o){return t&&C.isValidElement(o)?t(o):o},r=Object.create(null);return e&&C.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function CF(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,a={};for(var l in t){if(r[l])for(s=0;s{if(!a&&l!=null){const g=setTimeout(l,c);return()=>{clearTimeout(g)}}},[l,a,c]),v.jsx("span",{className:f,style:m,children:v.jsx("span",{className:h})})}const Gi=gt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),OF=["center","classes","className"];let kv=e=>e,uk,dk,fk,pk;const f1=550,jF=80,LF=iv(uk||(uk=kv` + */var dx=Symbol.for("react.element"),fx=Symbol.for("react.portal"),ov=Symbol.for("react.fragment"),sv=Symbol.for("react.strict_mode"),av=Symbol.for("react.profiler"),lv=Symbol.for("react.provider"),cv=Symbol.for("react.context"),qB=Symbol.for("react.server_context"),uv=Symbol.for("react.forward_ref"),dv=Symbol.for("react.suspense"),fv=Symbol.for("react.suspense_list"),pv=Symbol.for("react.memo"),hv=Symbol.for("react.lazy"),YB=Symbol.for("react.offscreen"),XT;XT=Symbol.for("react.module.reference");function ao(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case dx:switch(e=e.type,e){case ov:case av:case sv:case dv:case fv:return e;default:switch(e=e&&e.$$typeof,e){case qB:case cv:case uv:case hv:case pv:case lv:return e;default:return t}}case fx:return t}}}en.ContextConsumer=cv;en.ContextProvider=lv;en.Element=dx;en.ForwardRef=uv;en.Fragment=ov;en.Lazy=hv;en.Memo=pv;en.Portal=fx;en.Profiler=av;en.StrictMode=sv;en.Suspense=dv;en.SuspenseList=fv;en.isAsyncMode=function(){return!1};en.isConcurrentMode=function(){return!1};en.isContextConsumer=function(e){return ao(e)===cv};en.isContextProvider=function(e){return ao(e)===lv};en.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===dx};en.isForwardRef=function(e){return ao(e)===uv};en.isFragment=function(e){return ao(e)===ov};en.isLazy=function(e){return ao(e)===hv};en.isMemo=function(e){return ao(e)===pv};en.isPortal=function(e){return ao(e)===fx};en.isProfiler=function(e){return ao(e)===av};en.isStrictMode=function(e){return ao(e)===sv};en.isSuspense=function(e){return ao(e)===dv};en.isSuspenseList=function(e){return ao(e)===fv};en.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ov||e===av||e===sv||e===dv||e===fv||e===YB||typeof e=="object"&&e!==null&&(e.$$typeof===hv||e.$$typeof===pv||e.$$typeof===lv||e.$$typeof===cv||e.$$typeof===uv||e.$$typeof===XT||e.getModuleId!==void 0)};en.typeOf=ao;QT.exports=en;var GC=QT.exports;const QB=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function JT(e){const t=`${e}`.match(QB);return t&&t[1]||""}function ZT(e,t=""){return e.displayName||e.name||JT(e)||t}function HC(e,t,n){const r=ZT(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function XB(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return ZT(e,"Component");if(typeof e=="object")switch(e.$$typeof){case GC.ForwardRef:return HC(e,e.render,"ForwardRef");case GC.Memo:return HC(e,e.type,"memo");default:return}}}const JB=Object.freeze(Object.defineProperty({__proto__:null,default:XB,getFunctionName:JT},Symbol.toStringTag,{value:"Module"})),ZB=qs(JB),e4=["values","unit","step"],t4=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>$({},n,{[r.key]:r.val}),{})};function eO(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ie(e,e4),o=t4(t),s=Object.keys(o);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,m){const h=s.indexOf(m);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(h!==-1&&typeof t[s[h]]=="number"?t[s[h]]:m)-r/100}${n})`}function u(f){return s.indexOf(f)+1`@media (min-width:${px[e]}px)`};function No(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||VC;return t.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const o=r.breakpoints||VC;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||px).indexOf(a)!==-1){const l=o.up(a);s[l]=n(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return n(t)}function tO(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function nO(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function r4(e,...t){const n=tO(e),r=[n,...t].reduce((i,o)=>Hr(i,o),{});return nO(Object.keys(n),r)}function i4(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((i,o)=>{o{e[i]!=null&&(n[i]=!0)}),n}function s0({values:e,breakpoints:t,base:n}){const r=n||i4(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,a,l)=>(Array.isArray(e)?(s[a]=e[l]!=null?e[l]:e[o],o=l):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[o],o=a):s[a]=e,s),{})}function Eu(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Am(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Eu(e,n)||r,t&&(i=t(i,r,e)),i}function Mn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,c=Eu(l,r)||{};return No(s,a,d=>{let f=Am(c,i,d);return d===f&&typeof d=="string"&&(f=Am(c,i,`${t}${d==="default"?"":we(d)}`,d)),n===!1?f:{[n]:f}})};return o.propTypes={},o.filterProps=[t],o}function o4(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const s4={m:"margin",p:"padding"},a4={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},KC={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},l4=o4(e=>{if(e.length>2)if(KC[e])e=KC[e];else return[e];const[t,n]=e.split(""),r=s4[t],i=a4[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),hx=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],mx=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...hx,...mx];function hp(e,t,n,r){var i;const o=(i=Eu(e,t,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function gx(e){return hp(e,"spacing",8)}function Kl(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function c4(e,t){return n=>e.reduce((r,i)=>(r[i]=Kl(t,n),r),{})}function u4(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=l4(n),o=c4(i,r),s=e[n];return No(e,s,o)}function rO(e,t){const n=gx(e.theme);return Object.keys(e).map(r=>u4(e,t,r,n)).reduce(ef,{})}function En(e){return rO(e,hx)}En.propTypes={};En.filterProps=hx;function Rn(e){return rO(e,mx)}Rn.propTypes={};Rn.filterProps=mx;function d4(e=8){if(e.mui)return e;const t=gx({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function mv(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?ef(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Ki(e){return typeof e!="number"?e:`${e}px solid`}function lo(e,t){return Mn({prop:e,themeKey:"borders",transform:t})}const f4=lo("border",Ki),p4=lo("borderTop",Ki),h4=lo("borderRight",Ki),m4=lo("borderBottom",Ki),g4=lo("borderLeft",Ki),v4=lo("borderColor"),y4=lo("borderTopColor"),b4=lo("borderRightColor"),w4=lo("borderBottomColor"),x4=lo("borderLeftColor"),S4=lo("outline",Ki),_4=lo("outlineColor"),gv=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=hp(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Kl(t,r)});return No(e,e.borderRadius,n)}return null};gv.propTypes={};gv.filterProps=["borderRadius"];mv(f4,p4,h4,m4,g4,v4,y4,b4,w4,x4,gv,S4,_4);const vv=e=>{if(e.gap!==void 0&&e.gap!==null){const t=hp(e.theme,"spacing",8),n=r=>({gap:Kl(t,r)});return No(e,e.gap,n)}return null};vv.propTypes={};vv.filterProps=["gap"];const yv=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=hp(e.theme,"spacing",8),n=r=>({columnGap:Kl(t,r)});return No(e,e.columnGap,n)}return null};yv.propTypes={};yv.filterProps=["columnGap"];const bv=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=hp(e.theme,"spacing",8),n=r=>({rowGap:Kl(t,r)});return No(e,e.rowGap,n)}return null};bv.propTypes={};bv.filterProps=["rowGap"];const C4=Mn({prop:"gridColumn"}),k4=Mn({prop:"gridRow"}),E4=Mn({prop:"gridAutoFlow"}),R4=Mn({prop:"gridAutoColumns"}),P4=Mn({prop:"gridAutoRows"}),T4=Mn({prop:"gridTemplateColumns"}),O4=Mn({prop:"gridTemplateRows"}),j4=Mn({prop:"gridTemplateAreas"}),L4=Mn({prop:"gridArea"});mv(vv,yv,bv,C4,k4,E4,R4,P4,T4,O4,j4,L4);function uu(e,t){return t==="grey"?t:e}const I4=Mn({prop:"color",themeKey:"palette",transform:uu}),M4=Mn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:uu}),N4=Mn({prop:"backgroundColor",themeKey:"palette",transform:uu});mv(I4,M4,N4);function wi(e){return e<=1&&e!==0?`${e*100}%`:e}const $4=Mn({prop:"width",transform:wi}),vx=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||px[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:wi(n)}};return No(e,e.maxWidth,t)}return null};vx.filterProps=["maxWidth"];const A4=Mn({prop:"minWidth",transform:wi}),D4=Mn({prop:"height",transform:wi}),B4=Mn({prop:"maxHeight",transform:wi}),F4=Mn({prop:"minHeight",transform:wi});Mn({prop:"size",cssProperty:"width",transform:wi});Mn({prop:"size",cssProperty:"height",transform:wi});const z4=Mn({prop:"boxSizing"});mv($4,vx,A4,D4,B4,F4,z4);const mp={border:{themeKey:"borders",transform:Ki},borderTop:{themeKey:"borders",transform:Ki},borderRight:{themeKey:"borders",transform:Ki},borderBottom:{themeKey:"borders",transform:Ki},borderLeft:{themeKey:"borders",transform:Ki},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ki},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:gv},color:{themeKey:"palette",transform:uu},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:uu},backgroundColor:{themeKey:"palette",transform:uu},p:{style:Rn},pt:{style:Rn},pr:{style:Rn},pb:{style:Rn},pl:{style:Rn},px:{style:Rn},py:{style:Rn},padding:{style:Rn},paddingTop:{style:Rn},paddingRight:{style:Rn},paddingBottom:{style:Rn},paddingLeft:{style:Rn},paddingX:{style:Rn},paddingY:{style:Rn},paddingInline:{style:Rn},paddingInlineStart:{style:Rn},paddingInlineEnd:{style:Rn},paddingBlock:{style:Rn},paddingBlockStart:{style:Rn},paddingBlockEnd:{style:Rn},m:{style:En},mt:{style:En},mr:{style:En},mb:{style:En},ml:{style:En},mx:{style:En},my:{style:En},margin:{style:En},marginTop:{style:En},marginRight:{style:En},marginBottom:{style:En},marginLeft:{style:En},marginX:{style:En},marginY:{style:En},marginInline:{style:En},marginInlineStart:{style:En},marginInlineEnd:{style:En},marginBlock:{style:En},marginBlockStart:{style:En},marginBlockEnd:{style:En},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:vv},rowGap:{style:bv},columnGap:{style:yv},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:wi},maxWidth:{style:vx},minWidth:{transform:wi},height:{transform:wi},maxHeight:{transform:wi},minHeight:{transform:wi},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function U4(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function W4(e,t){return typeof e=="function"?e(t):e}function iO(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=Eu(i,c)||{};return d?d(s):No(s,r,h=>{let g=Am(f,u,h);return h===g&&typeof h=="string"&&(g=Am(f,u,`${n}${h==="default"?"":we(h)}`,h)),l===!1?g:{[l]:g}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:mp;function a(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;const u=tO(o.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(m=>{const h=W4(c[m],o);if(h!=null)if(typeof h=="object")if(s[m])f=ef(f,e(m,h,o,s));else{const g=No({theme:o},h,R=>({[m]:R}));U4(g,h)?f[m]=t({sx:h,theme:o}):f=ef(f,g)}else f=ef(f,e(m,h,o,s))}),nO(d,f)}return Array.isArray(i)?i.map(a):a(i)}return t}const Vu=iO();Vu.filterProps=["sx"];function oO(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const G4=["breakpoints","palette","spacing","shape"];function gp(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Ie(e,G4),a=eO(n),l=d4(i);let c=Hr({breakpoints:a,direction:"ltr",components:{},palette:$({mode:"light"},r),spacing:l,shape:$({},n4,o)},s);return c.applyStyles=oO,c=t.reduce((u,d)=>Hr(u,d),c),c.unstable_sxConfig=$({},mp,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Vu({sx:d,theme:this})},c}const H4=Object.freeze(Object.defineProperty({__proto__:null,default:gp,private_createBreakpoints:eO,unstable_applyStyles:oO},Symbol.toStringTag,{value:"Module"})),V4=qs(H4),K4=["sx"],q4=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:mp;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function wv(e){const{sx:t}=e,n=Ie(e,K4),{systemProps:r,otherProps:i}=q4(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const a=t(...s);return Cs(a)?$({},r,a):r}:o=$({},r,t),$({},i,{sx:o})}const Y4=Object.freeze(Object.defineProperty({__proto__:null,default:Vu,extendSxProp:wv,unstable_createStyleFunctionSx:iO,unstable_defaultSxConfig:mp},Symbol.toStringTag,{value:"Module"})),Q4=qs(Y4);var Ku=so;Object.defineProperty(dp,"__esModule",{value:!0});var X4=dp.default=u5;dp.shouldForwardProp=Qh;dp.systemDefaultTheme=void 0;var Wi=Ku(ET()),a1=Ku($D()),qC=i5(qT),J4=VB;Ku(KB);Ku(ZB);var Z4=Ku(V4),e5=Ku(Q4);const t5=["ownerState"],n5=["variants"],r5=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function sO(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(sO=function(r){return r?n:t})(e)}function i5(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=sO(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function o5(e){return Object.keys(e).length===0}function s5(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Qh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const a5=dp.systemDefaultTheme=(0,Z4.default)(),l5=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function fh({defaultTheme:e,theme:t,themeId:n}){return o5(t)?e:t[n]||t}function c5(e){return e?(t,n)=>n[e]:null}function Xh(e,t){let{ownerState:n}=t,r=(0,a1.default)(t,t5);const i=typeof e=="function"?e((0,Wi.default)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Xh(o,(0,Wi.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=(0,a1.default)(i,n5);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,Wi.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,Wi.default)({ownerState:n},r,n)):l.style))}),a}return i}function u5(e={}){const{themeId:t,defaultTheme:n=a5,rootShouldForwardProp:r=Qh,slotShouldForwardProp:i=Qh}=e,o=s=>(0,e5.default)((0,Wi.default)({},s,{theme:fh((0,Wi.default)({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,qC.internal_processStyles)(s,k=>k.filter(E=>!(E!=null&&E.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=c5(l5(c))}=a,m=(0,a1.default)(a,r5),h=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=d||!1;let R,b=Qh;c==="Root"||c==="root"?b=r:c?b=i:s5(s)&&(b=void 0);const w=(0,qC.default)(s,(0,Wi.default)({shouldForwardProp:b,label:R},m)),y=k=>typeof k=="function"&&k.__emotion_real!==k||(0,J4.isPlainObject)(k)?E=>Xh(k,(0,Wi.default)({},E,{theme:fh({theme:E.theme,defaultTheme:n,themeId:t})})):k,_=(k,...E)=>{let P=y(k);const I=E?E.map(y):[];l&&f&&I.push(N=>{const F=fh((0,Wi.default)({},N,{defaultTheme:n,themeId:t}));if(!F.components||!F.components[l]||!F.components[l].styleOverrides)return null;const z=F.components[l].styleOverrides,K={};return Object.entries(z).forEach(([Z,le])=>{K[Z]=Xh(le,(0,Wi.default)({},N,{theme:F}))}),f(N,K)}),l&&!h&&I.push(N=>{var F;const z=fh((0,Wi.default)({},N,{defaultTheme:n,themeId:t})),K=z==null||(F=z.components)==null||(F=F[l])==null?void 0:F.variants;return Xh({variants:K},(0,Wi.default)({},N,{theme:z}))}),g||I.push(o);const A=I.length-E.length;if(Array.isArray(k)&&A>0){const N=new Array(A).fill("");P=[...k,...N],P.raw=[...k.raw,...N]}const L=w(P,...I);return s.muiName&&(L.muiName=s.muiName),L};return w.withConfig&&(_.withConfig=w.withConfig),_}}const YC=e=>e,d5=()=>{let e=YC;return{configure(t){e=t},generate(t){return e(t)},reset(){e=YC}}},yx=d5(),f5={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ft(e,t,n="Mui"){const r=f5[t];return r?`${n}-${r}`:`${yx.generate(e)}-${t}`}function p5(e,t){return $({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Nn={};const h5=qs(MD);function m5(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const g5=Object.freeze(Object.defineProperty({__proto__:null,default:m5},Symbol.toStringTag,{value:"Module"})),v5=qs(g5);var aO=so;Object.defineProperty(Nn,"__esModule",{value:!0});var At=Nn.alpha=dO;Nn.blend=P5;Nn.colorChannel=void 0;var Dm=Nn.darken=wx;Nn.decomposeColor=to;var l1=Nn.emphasize=fO,y5=Nn.getContrastRatio=_5;Nn.getLuminance=Fm;Nn.hexToRgb=lO;Nn.hslToRgb=uO;var Bm=Nn.lighten=xx;Nn.private_safeAlpha=C5;Nn.private_safeColorChannel=void 0;Nn.private_safeDarken=k5;Nn.private_safeEmphasize=R5;Nn.private_safeLighten=E5;Nn.recomposeColor=qu;Nn.rgbToHex=S5;var QC=aO(h5),b5=aO(v5);function bx(e,t=0,n=1){return(0,b5.default)(e,t,n)}function lO(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function w5(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function to(e){if(e.type)return e;if(e.charAt(0)==="#")return to(lO(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,QC.default)(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,QC.default)(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const cO=e=>{const t=to(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Nn.colorChannel=cO;const x5=(e,t)=>{try{return cO(e)}catch{return e}};Nn.private_safeColorChannel=x5;function qu(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function S5(e){if(e.indexOf("#")===0)return e;const{values:t}=to(e);return`#${t.map((n,r)=>w5(r===3?Math.round(255*n):n)).join("")}`}function uO(e){e=to(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(c,u=(c+n/30)%12)=>i-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),qu({type:a,values:l})}function Fm(e){e=to(e);let t=e.type==="hsl"||e.type==="hsla"?to(uO(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function _5(e,t){const n=Fm(e),r=Fm(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function dO(e,t){return e=to(e),t=bx(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,qu(e)}function C5(e,t,n){try{return dO(e,t)}catch{return e}}function wx(e,t){if(e=to(e),t=bx(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return qu(e)}function k5(e,t,n){try{return wx(e,t)}catch{return e}}function xx(e,t){if(e=to(e),t=bx(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return qu(e)}function E5(e,t,n){try{return xx(e,t)}catch{return e}}function fO(e,t=.15){return Fm(e)>.5?wx(e,t):xx(e,t)}function R5(e,t,n){try{return fO(e,t)}catch{return e}}function P5(e,t,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),o=to(e),s=to(t),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return qu({type:"rgb",values:a})}const Ff={black:"#000",white:"#fff"},T5={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Sc={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},_c={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Sd={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Cc={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},kc={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Ec={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},O5=["mode","contrastThreshold","tonalOffset"],XC={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Ff.white,default:Ff.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},a0={text:{primary:Ff.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Ff.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function JC(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Bm(e.main,i):t==="dark"&&(e.dark=Dm(e.main,o)))}function j5(e="light"){return e==="dark"?{main:Cc[200],light:Cc[50],dark:Cc[400]}:{main:Cc[700],light:Cc[400],dark:Cc[800]}}function L5(e="light"){return e==="dark"?{main:Sc[200],light:Sc[50],dark:Sc[400]}:{main:Sc[500],light:Sc[300],dark:Sc[700]}}function I5(e="light"){return e==="dark"?{main:_c[500],light:_c[300],dark:_c[700]}:{main:_c[700],light:_c[400],dark:_c[800]}}function M5(e="light"){return e==="dark"?{main:kc[400],light:kc[300],dark:kc[700]}:{main:kc[700],light:kc[500],dark:kc[900]}}function N5(e="light"){return e==="dark"?{main:Ec[400],light:Ec[300],dark:Ec[700]}:{main:Ec[800],light:Ec[500],dark:Ec[900]}}function $5(e="light"){return e==="dark"?{main:Sd[400],light:Sd[300],dark:Sd[700]}:{main:"#ed6c02",light:Sd[500],dark:Sd[900]}}function A5(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Ie(e,O5),o=e.primary||j5(t),s=e.secondary||L5(t),a=e.error||I5(t),l=e.info||M5(t),c=e.success||N5(t),u=e.warning||$5(t);function d(g){return y5(g,a0.text.primary)>=n?a0.text.primary:XC.text.primary}const f=({color:g,name:R,mainShade:b=500,lightShade:w=300,darkShade:y=700})=>{if(g=$({},g),!g.main&&g[b]&&(g.main=g[b]),!g.hasOwnProperty("main"))throw new Error(Vl(11,R?` (${R})`:"",b));if(typeof g.main!="string")throw new Error(Vl(12,R?` (${R})`:"",JSON.stringify(g.main)));return JC(g,"light",w,r),JC(g,"dark",y,r),g.contrastText||(g.contrastText=d(g.main)),g},m={dark:a0,light:XC};return Hr($({common:$({},Ff),mode:t,primary:f({color:o,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:T5,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},m[t]),i)}const D5=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function B5(e){return Math.round(e*1e5)/1e5}const ZC={textTransform:"uppercase"},ek='"Roboto", "Helvetica", "Arial", sans-serif';function F5(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=ek,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,f=Ie(n,D5),m=i/14,h=d||(b=>`${b/c*m}rem`),g=(b,w,y,_,k)=>$({fontFamily:r,fontWeight:b,fontSize:h(w),lineHeight:y},r===ek?{letterSpacing:`${B5(_/w)}em`}:{},k,u),R={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(a,14,1.75,.4,ZC),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,ZC),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Hr($({htmlFontSize:c,pxToRem:h,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},R),f,{clone:!1})}const z5=.2,U5=.14,W5=.12;function gn(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${z5})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${U5})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${W5})`].join(",")}const G5=["none",gn(0,2,1,-1,0,1,1,0,0,1,3,0),gn(0,3,1,-2,0,2,2,0,0,1,5,0),gn(0,3,3,-2,0,3,4,0,0,1,8,0),gn(0,2,4,-1,0,4,5,0,0,1,10,0),gn(0,3,5,-1,0,5,8,0,0,1,14,0),gn(0,3,5,-1,0,6,10,0,0,1,18,0),gn(0,4,5,-2,0,7,10,1,0,2,16,1),gn(0,5,5,-3,0,8,10,1,0,3,14,2),gn(0,5,6,-3,0,9,12,1,0,3,16,2),gn(0,6,6,-3,0,10,14,1,0,4,18,3),gn(0,6,7,-4,0,11,15,1,0,4,20,3),gn(0,7,8,-4,0,12,17,2,0,5,22,4),gn(0,7,8,-4,0,13,19,2,0,5,24,4),gn(0,7,9,-4,0,14,21,2,0,5,26,4),gn(0,8,9,-5,0,15,22,2,0,6,28,5),gn(0,8,10,-5,0,16,24,2,0,6,30,5),gn(0,8,11,-5,0,17,26,2,0,6,32,5),gn(0,9,11,-5,0,18,28,2,0,7,34,6),gn(0,9,12,-6,0,19,29,2,0,7,36,6),gn(0,10,13,-6,0,20,31,3,0,8,38,7),gn(0,10,13,-6,0,21,33,3,0,8,40,7),gn(0,10,14,-6,0,22,35,3,0,8,42,7),gn(0,11,14,-7,0,23,36,3,0,9,44,8),gn(0,11,15,-7,0,24,38,3,0,9,46,8)],H5=["duration","easing","delay"],V5={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},pO={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function tk(e){return`${Math.round(e)}ms`}function K5(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function q5(e){const t=$({},V5,e.easing),n=$({},pO,e.duration);return $({getAutoHeightDuration:K5,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0}=o;return Ie(o,H5),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:tk(s)} ${a} ${typeof l=="string"?l:tk(l)}`).join(",")}},e,{easing:t,duration:n})}const Y5={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Q5=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Sx(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Ie(e,Q5);if(e.vars)throw new Error(Vl(18));const a=A5(r),l=gp(e);let c=Hr(l,{mixins:p5(l.breakpoints,n),palette:a,shadows:G5.slice(),typography:F5(a,o),transitions:q5(i),zIndex:$({},Y5)});return c=Hr(c,s),c=t.reduce((u,d)=>Hr(u,d),c),c.unstable_sxConfig=$({},mp,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Vu({sx:d,theme:this})},c}const _x=Sx(),Ru="$$material";function hO(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const cr=e=>hO(e)&&e!=="classes",Ee=X4({themeId:Ru,defaultTheme:_x,rootShouldForwardProp:cr});function zf(e,t){const n=$({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=$({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=$({},o),Object.keys(i).forEach(s=>{n[r][s]=zf(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}const mO=C.createContext(void 0);function X5({value:e,children:t}){return v.jsx(mO.Provider,{value:e,children:t})}function J5(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?zf(i.defaultProps,r):!i.styleOverrides&&!i.variants?zf(i,r):r}function Z5({props:e,name:t}){const n=C.useContext(mO);return J5({props:e,name:t,theme:{components:n}})}function gt(e){return Z5(e)}const nk={};function e3(e,t){const n=C.useRef(nk);return n.current===nk&&(n.current=e(t)),n}const t3=[];function n3(e){C.useEffect(e,t3)}class vp{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new vp}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Sa(){const e=e3(vp.create).current;return n3(e.disposeEffect),e}let xv=!0,c1=!1;const r3=new vp,i3={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function o3(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&i3[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function s3(e){e.metaKey||e.altKey||e.ctrlKey||(xv=!0)}function l0(){xv=!1}function a3(){this.visibilityState==="hidden"&&c1&&(xv=!0)}function l3(e){e.addEventListener("keydown",s3,!0),e.addEventListener("mousedown",l0,!0),e.addEventListener("pointerdown",l0,!0),e.addEventListener("touchstart",l0,!0),e.addEventListener("visibilitychange",a3,!0)}function c3(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return xv||o3(t)}function Sv(){const e=C.useCallback(i=>{i!=null&&l3(i.ownerDocument)},[]),t=C.useRef(!1);function n(){return t.current?(c1=!0,r3.start(100,()=>{c1=!1}),t.current=!1,!0):!1}function r(i){return c3(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function zm(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function un(...e){return C.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{zm(n,t)})},e)}function pt(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=ft(e,i,n)}),r}function u3(e){return ft("MuiTypography",e)}pt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const d3=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],f3=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,e.align!=="inherit"&&`align${we(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return mt(a,u3,s)},p3=Ee("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${we(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>$({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),rk={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},h3={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},m3=e=>h3[e]||e,_t=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiTypography"}),i=m3(r.color),o=wv($({},r,{color:i})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:d=!1,variant:f="body1",variantMapping:m=rk}=o,h=Ie(o,d3),g=$({},o,{align:s,color:i,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:d,variant:f,variantMapping:m}),R=l||(d?"p":m[f]||rk[f])||"span",b=f3(g);return v.jsx(p3,$({as:R,ref:n,ownerState:g,className:De(b.root,a)},h))});function g3(e){return ft("MuiLink",e)}const v3=pt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);function y3(e){return Object.keys(e).length===0}function Cx(e=null){const t=C.useContext(pp);return!t||y3(t)?e:t}const b3=gp();function _v(e=b3){return Cx(e)}function w3({styles:e,themeId:t,defaultTheme:n={}}){const r=_v(n),i=typeof e=="function"?e(t&&r[t]||r):e;return v.jsx(VT,{styles:i})}const x3=["className","component"];function S3(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=ux("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(Vu);return C.forwardRef(function(l,c){const u=_v(n),d=wv(l),{className:f,component:m="div"}=d,h=Ie(d,x3);return v.jsx(o,$({as:m,ref:c,className:De(f,i?i(r):r),theme:t&&u[t]||u},h))})}const _3=["ownerState"],C3=["variants"],k3=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function E3(e){return Object.keys(e).length===0}function R3(e){return typeof e=="string"&&e.charCodeAt(0)>96}function c0(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const P3=gp(),T3=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function ph({defaultTheme:e,theme:t,themeId:n}){return E3(t)?e:t[n]||t}function O3(e){return e?(t,n)=>n[e]:null}function Jh(e,t){let{ownerState:n}=t,r=Ie(t,_3);const i=typeof e=="function"?e($({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Jh(o,$({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=Ie(i,C3);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props($({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style($({ownerState:n},r,n)):l.style))}),a}return i}function j3(e={}){const{themeId:t,defaultTheme:n=P3,rootShouldForwardProp:r=c0,slotShouldForwardProp:i=c0}=e,o=s=>Vu($({},s,{theme:ph($({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{KT(s,k=>k.filter(E=>!(E!=null&&E.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=O3(T3(c))}=a,m=Ie(a,k3),h=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=d||!1;let R,b=c0;c==="Root"||c==="root"?b=r:c?b=i:R3(s)&&(b=void 0);const w=ux(s,$({shouldForwardProp:b,label:R},m)),y=k=>typeof k=="function"&&k.__emotion_real!==k||Cs(k)?E=>Jh(k,$({},E,{theme:ph({theme:E.theme,defaultTheme:n,themeId:t})})):k,_=(k,...E)=>{let P=y(k);const I=E?E.map(y):[];l&&f&&I.push(N=>{const F=ph($({},N,{defaultTheme:n,themeId:t}));if(!F.components||!F.components[l]||!F.components[l].styleOverrides)return null;const z=F.components[l].styleOverrides,K={};return Object.entries(z).forEach(([Z,le])=>{K[Z]=Jh(le,$({},N,{theme:F}))}),f(N,K)}),l&&!h&&I.push(N=>{var F;const z=ph($({},N,{defaultTheme:n,themeId:t})),K=z==null||(F=z.components)==null||(F=F[l])==null?void 0:F.variants;return Jh({variants:K},$({},N,{theme:z}))}),g||I.push(o);const A=I.length-E.length;if(Array.isArray(k)&&A>0){const N=new Array(A).fill("");P=[...k,...N],P.raw=[...k.raw,...N]}const L=w(P,...I);return s.muiName&&(L.muiName=s.muiName),L};return w.withConfig&&(_.withConfig=w.withConfig),_}}const L3=j3();function gO(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:zf(t.components[n].defaultProps,r)}function I3({props:e,name:t,defaultTheme:n,themeId:r}){let i=_v(n);return r&&(i=i[r]||i),gO({theme:i,name:t,props:e})}const li=typeof window<"u"?C.useLayoutEffect:C.useEffect;function M3(e,t,n,r,i){const[o,s]=C.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return li(()=>{let a=!0;if(!n)return;const l=n(e),c=()=>{a&&s(l.matches)};return c(),l.addListener(c),()=>{a=!1,l.removeListener(c)}},[e,n]),o}const vO=C.useSyncExternalStore;function N3(e,t,n,r,i){const o=C.useCallback(()=>t,[t]),s=C.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(r!==null){const{matches:u}=r(e);return()=>u}return o},[o,e,r,i,n]),[a,l]=C.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const u=n(e);return[()=>u.matches,d=>(u.addListener(d),()=>{u.removeListener(d)})]},[o,n,e]);return vO(l,a,s)}function kx(e,t={}){const n=Cx(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=gO({name:"MuiUseMediaQuery",props:t,theme:n});let l=typeof e=="function"?e(n):e;return l=l.replace(/^@media( ?)/m,""),(vO!==void 0?N3:M3)(l,i,o,s,a)}function u1(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function Cv(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function $3(e,t){return()=>null}function tf(e,t){var n,r;return C.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function qn(e){return e&&e.ownerDocument||document}function ss(e){return qn(e).defaultView||window}function A3(e,t){return()=>null}let ik=0;function D3(e){const[t,n]=C.useState(e),r=e||t;return C.useEffect(()=>{t==null&&(ik+=1,n(`mui-${ik}`))},[t]),r}const ok=um.useId;function yp(e){if(ok!==void 0){const t=ok();return e??t}return D3(e)}function B3(e,t,n,r,i){return null}function Pu({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=C.useRef(e!==void 0),[o,s]=C.useState(t),a=i?e:o,l=C.useCallback(c=>{i||s(c)},[]);return[a,l]}function Yi(e){const t=C.useRef(e);return li(()=>{t.current=e}),C.useRef((...n)=>(0,t.current)(...n)).current}function yO(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const bO=e=>{const t=C.useRef({});return C.useEffect(()=>{t.current=e}),t.current};function F3(e){return C.Children.toArray(e).filter(t=>C.isValidElement(t))}function Tu(e){return typeof e=="string"}function tu(e,t,n){return e===void 0||Tu(e)?t:$({},t,{ownerState:$({},t.ownerState,n)})}function Um(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function sk(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function wO(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const m=De(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=$({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=$({},n,i,r);return m.length>0&&(g.className=m),Object.keys(h).length>0&&(g.style=h),{props:g,internalRef:void 0}}const s=Um($({},i,r)),a=sk(r),l=sk(i),c=t(s),u=De(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),d=$({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),f=$({},c,n,l,a);return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function xO(e,t,n){return typeof e=="function"?e(t,n):e}const z3=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function $o(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Ie(e,z3),a=o?{}:xO(r,i),{props:l,internalRef:c}=wO($({},s,{externalSlotProps:a})),u=un(c,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return tu(n,$({},l,{ref:u}),i)}const SO=C.createContext(null);function _O(){return C.useContext(SO)}const U3=typeof Symbol=="function"&&Symbol.for,W3=U3?Symbol.for("mui.nested"):"__THEME_NESTED__";function G3(e,t){return typeof t=="function"?t(e):$({},e,t)}function H3(e){const{children:t,theme:n}=e,r=_O(),i=C.useMemo(()=>{const o=r===null?n:G3(r,n);return o!=null&&(o[W3]=r!==null),o},[n,r]);return v.jsx(SO.Provider,{value:i,children:t})}const V3=["value"],CO=C.createContext();function K3(e){let{value:t}=e,n=Ie(e,V3);return v.jsx(CO.Provider,$({value:t??!0},n))}const Ex=()=>{const e=C.useContext(CO);return e??!1},ak={};function lk(e,t,n,r=!1){return C.useMemo(()=>{const i=e&&t[e]||t;if(typeof n=="function"){const o=n(i),s=e?$({},t,{[e]:o}):o;return r?()=>s:s}return e?$({},t,{[e]:n}):$({},t,n)},[e,t,n,r])}function q3(e){const{children:t,theme:n,themeId:r}=e,i=Cx(ak),o=_O()||ak,s=lk(r,i,n),a=lk(r,o,n,!0),l=s.direction==="rtl";return v.jsx(H3,{theme:a,children:v.jsx(pp.Provider,{value:s,children:v.jsx(K3,{value:l,children:v.jsx(X5,{value:s==null?void 0:s.components,children:t})})})})}function Uf(e){"@babel/helpers - typeof";return Uf=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},Uf(e)}function Y3(e,t){if(Uf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Q3(e){var t=Y3(e,"string");return Uf(t)=="symbol"?t:t+""}const X3=["component","direction","spacing","divider","children","className","useFlexGap"],J3=gp(),Z3=L3("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function eF(e){return I3({props:e,name:"MuiStack",defaultTheme:J3})}function tF(e,t){const n=C.Children.toArray(e).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],rF=({ownerState:e,theme:t})=>{let n=$({display:"flex",flexDirection:"column"},No({theme:t},s0({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=gx(t),i=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),o=s0({values:e.direction,base:i}),s=s0({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((l,c,u)=>{if(!o[l]){const f=c>0?o[u[c-1]]:"column";o[l]=f}}),n=Hr(n,No({theme:t},s,(l,c)=>e.useFlexGap?{gap:Kl(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${nF(c?o[c]:e.direction)}`]:Kl(r,l)}}))}return n=r4(t.breakpoints,n),n};function iF(e={}){const{createStyledComponent:t=Z3,useThemeProps:n=eF,componentName:r="MuiStack"}=e,i=()=>mt({root:["root"]},l=>ft(r,l),{}),o=t(rF);return C.forwardRef(function(l,c){const u=n(l),d=wv(u),{component:f="div",direction:m="column",spacing:h=0,divider:g,children:R,className:b,useFlexGap:w=!1}=d,y=Ie(d,X3),_={direction:m,spacing:h,useFlexGap:w},k=i();return v.jsx(o,$({as:f,ownerState:_,ref:c,className:De(k.root,b)},y,{children:g?tF(R,g):R}))})}const kO={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},oF=e=>kO[e]||e,sF=({theme:e,ownerState:t})=>{const n=oF(t.color),r=Eu(e,`palette.${n}`,!1)||t.color,i=Eu(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:At(r,.4)},aF=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],lF=e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root",`underline${we(i)}`,n==="button"&&"button",r&&"focusVisible"]};return mt(o,g3,t)},cF=Ee(_t,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${we(n.underline)}`],n.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>$({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&$({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:sF({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${v3.focusVisible}`]:{outline:"auto"}})),ko=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiLink"}),{className:i,color:o="primary",component:s="a",onBlur:a,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:f}=r,m=Ie(r,aF),{isFocusVisibleRef:h,onBlur:g,onFocus:R,ref:b}=Sv(),[w,y]=C.useState(!1),_=un(n,b),k=A=>{g(A),h.current===!1&&y(!1),a&&a(A)},E=A=>{R(A),h.current===!0&&y(!0),l&&l(A)},P=$({},r,{color:o,component:s,focusVisible:w,underline:u,variant:d}),I=lF(P);return v.jsx(cF,$({color:o,className:De(I.root,i),classes:c,component:s,onBlur:k,onFocus:E,ref:_,ownerState:P,variant:d,sx:[...Object.keys(kO).includes(o)?[]:[{color:o}],...Array.isArray(f)?f:[f]]},m))}),ck=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function Ni(){const e=_v(_x);return e[Ru]||e}function uF(e){return ft("MuiPaper",e)}pt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const dF=["className","component","elevation","square","variant"],fF=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return mt(o,uF,i)},pF=Ee("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return $({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&$({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${At("#fff",ck(t.elevation))}, ${At("#fff",ck(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),us=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,c=Ie(r,dF),u=$({},r,{component:o,elevation:s,square:a,variant:l}),d=fF(u);return v.jsx(pF,$({as:o,ownerState:u,className:De(d.root,i),ref:n},c))});function hF(e){return ft("MuiAppBar",e)}pt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const mF=["className","color","enableColorOnDark","position"],gF=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${we(t)}`,`position${we(n)}`]};return mt(i,hF,r)},hh=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,vF=Ee(us,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${we(n.position)}`],t[`color${we(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return $({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&$({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&$({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&$({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:hh(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:hh(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:hh(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:hh(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},!["inherit","transparent"].includes(t.color)&&{backgroundColor:"var(--AppBar-background)"},{color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),yF=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,l=Ie(r,mF),c=$({},r,{color:o,position:a,enableColorOnDark:s}),u=gF(c);return v.jsx(vF,$({square:!0,component:"header",ownerState:c,elevation:4,className:De(u.root,i,a==="fixed"&&"mui-fixed"),ref:n},l))});function bF(e){return ft("MuiToolbar",e)}pt("MuiToolbar",["root","gutters","regular","dense"]);const wF=["className","component","disableGutters","variant"],xF=e=>{const{classes:t,disableGutters:n,variant:r}=e;return mt({root:["root",!n&&"gutters",r]},bF,t)},SF=Ee("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),_F=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular"}=r,l=Ie(r,wF),c=$({},r,{component:o,disableGutters:s,variant:a}),u=xF(c);return v.jsx(SF,$({as:o,className:De(u.root,i),ref:n,ownerState:c},l))});function Wf(e,t){return Wf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Wf(e,t)}function bp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Wf(e,t)}const uk={disabled:!1},Wm=jt.createContext(null);var CF=function(t){return t.scrollTop},Fd="unmounted",vl="exited",yl="entering",Ac="entered",d1="exiting",co=function(e){bp(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=vl,o.appearStatus=yl):l=Ac:r.unmountOnExit||r.mountOnEnter?l=Fd:l=vl,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Fd?{status:vl}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==yl&&s!==Ac&&(o=yl):(s===yl||s===Ac)&&(o=d1)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===yl){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Dd.findDOMNode(this);s&&CF(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===vl&&this.setState({status:Fd})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[Dd.findDOMNode(this),a],c=l[0],u=l[1],d=this.getTimeouts(),f=a?d.appear:d.enter;if(!i&&!s||uk.disabled){this.safeSetState({status:Ac},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:yl},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:Ac},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Dd.findDOMNode(this);if(!o||uk.disabled){this.safeSetState({status:vl},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:d1},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:vl},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Dd.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Fd)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=Ie(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return jt.createElement(Wm.Provider,{value:null},typeof s=="function"?s(i,a):jt.cloneElement(jt.Children.only(s),a))},t}(jt.Component);co.contextType=Wm;co.propTypes={};function Rc(){}co.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Rc,onEntering:Rc,onEntered:Rc,onExit:Rc,onExiting:Rc,onExited:Rc};co.UNMOUNTED=Fd;co.EXITED=vl;co.ENTERING=yl;co.ENTERED=Ac;co.EXITING=d1;function kF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rx(e,t){var n=function(o){return t&&C.isValidElement(o)?t(o):o},r=Object.create(null);return e&&C.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function EF(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,a={};for(var l in t){if(r[l])for(s=0;s{if(!a&&l!=null){const g=setTimeout(l,c);return()=>{clearTimeout(g)}}},[l,a,c]),v.jsx("span",{className:f,style:m,children:v.jsx("span",{className:h})})}const Gi=pt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),LF=["center","classes","className"];let kv=e=>e,dk,fk,pk,hk;const f1=550,IF=80,MF=iv(dk||(dk=kv` 0% { transform: scale(0); opacity: 0.1; @@ -90,7 +90,7 @@ Error generating stack: `+o.message+` transform: scale(1); opacity: 0.3; } -`)),IF=iv(dk||(dk=kv` +`)),NF=iv(fk||(fk=kv` 0% { opacity: 1; } @@ -98,7 +98,7 @@ Error generating stack: `+o.message+` 100% { opacity: 0; } -`)),MF=iv(fk||(fk=kv` +`)),$F=iv(pk||(pk=kv` 0% { transform: scale(1); } @@ -110,7 +110,7 @@ Error generating stack: `+o.message+` 100% { transform: scale(1); } -`)),NF=Ee("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),$F=Ee(TF,{name:"MuiTouchRipple",slot:"Ripple"})(pk||(pk=kv` +`)),AF=Ee("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),DF=Ee(jF,{name:"MuiTouchRipple",slot:"Ripple"})(hk||(hk=kv` opacity: 0; position: absolute; @@ -153,7 +153,7 @@ Error generating stack: `+o.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),Gi.rippleVisible,LF,f1,({theme:e})=>e.transitions.easing.easeInOut,Gi.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Gi.child,Gi.childLeaving,IF,f1,({theme:e})=>e.transitions.easing.easeInOut,Gi.childPulsate,MF,({theme:e})=>e.transitions.easing.easeInOut),AF=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=Ie(r,OF),[l,c]=C.useState([]),u=C.useRef(0),d=C.useRef(null);C.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=C.useRef(!1),m=Sa(),h=C.useRef(null),g=C.useRef(null),E=C.useCallback(_=>{const{pulsate:k,rippleX:R,rippleY:P,rippleSize:I,cb:$}=_;c(L=>[...L,v.jsx($F,{classes:{ripple:De(o.ripple,Gi.ripple),rippleVisible:De(o.rippleVisible,Gi.rippleVisible),ripplePulsate:De(o.ripplePulsate,Gi.ripplePulsate),child:De(o.child,Gi.child),childLeaving:De(o.childLeaving,Gi.childLeaving),childPulsate:De(o.childPulsate,Gi.childPulsate)},timeout:f1,pulsate:k,rippleX:R,rippleY:P,rippleSize:I},u.current)]),u.current+=1,d.current=$},[o]),b=C.useCallback((_={},k={},R=()=>{})=>{const{pulsate:P=!1,center:I=i||k.pulsate,fakeElement:$=!1}=k;if((_==null?void 0:_.type)==="mousedown"&&f.current){f.current=!1;return}(_==null?void 0:_.type)==="touchstart"&&(f.current=!0);const L=$?null:g.current,N=L?L.getBoundingClientRect():{width:0,height:0,left:0,top:0};let F,z,K;if(I||_===void 0||_.clientX===0&&_.clientY===0||!_.clientX&&!_.touches)F=Math.round(N.width/2),z=Math.round(N.height/2);else{const{clientX:Z,clientY:le}=_.touches&&_.touches.length>0?_.touches[0]:_;F=Math.round(Z-N.left),z=Math.round(le-N.top)}if(I)K=Math.sqrt((2*N.width**2+N.height**2)/3),K%2===0&&(K+=1);else{const Z=Math.max(Math.abs((L?L.clientWidth:0)-F),F)*2+2,le=Math.max(Math.abs((L?L.clientHeight:0)-z),z)*2+2;K=Math.sqrt(Z**2+le**2)}_!=null&&_.touches?h.current===null&&(h.current=()=>{E({pulsate:P,rippleX:F,rippleY:z,rippleSize:K,cb:R})},m.start(jF,()=>{h.current&&(h.current(),h.current=null)})):E({pulsate:P,rippleX:F,rippleY:z,rippleSize:K,cb:R})},[i,E,m]),w=C.useCallback(()=>{b({},{pulsate:!0})},[b]),y=C.useCallback((_,k)=>{if(m.clear(),(_==null?void 0:_.type)==="touchend"&&h.current){h.current(),h.current=null,m.start(0,()=>{y(_,k)});return}h.current=null,c(R=>R.length>0?R.slice(1):R),d.current=k},[m]);return C.useImperativeHandle(n,()=>({pulsate:w,start:b,stop:y}),[w,b,y]),v.jsx(NF,A({className:De(Gi.root,o.root,s),ref:g},a,{children:v.jsx(Px,{component:null,exit:!0,children:l})}))});function DF(e){return ht("MuiButtonBase",e)}const BF=gt("MuiButtonBase",["root","disabled","focusVisible"]),FF=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],zF=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=pt({root:["root",t&&"disabled",n&&"focusVisible"]},DF,i);return n&&r&&(s.root+=` ${r}`),s},UF=Ee("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${BF.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),$o=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,LinkComponent:m="a",onBlur:h,onClick:g,onContextMenu:E,onDragLeave:b,onFocus:w,onFocusVisible:y,onKeyDown:_,onKeyUp:k,onMouseDown:R,onMouseLeave:P,onMouseUp:I,onTouchEnd:$,onTouchMove:L,onTouchStart:N,tabIndex:F=0,TouchRippleProps:z,touchRippleRef:K,type:Z}=r,le=Ie(r,FF),ce=C.useRef(null),H=C.useRef(null),V=un(H,K),{isFocusVisibleRef:se,onFocus:je,onBlur:Ge,ref:Le}=Sv(),[_e,Ve]=C.useState(!1);c&&_e&&Ve(!1),C.useImperativeHandle(i,()=>({focusVisible:()=>{Ve(!0),ce.current.focus()}}),[]);const[Pe,ct]=C.useState(!1);C.useEffect(()=>{ct(!0)},[]);const ft=Pe&&!u&&!c;C.useEffect(()=>{_e&&f&&!u&&Pe&&H.current.pulsate()},[u,f,_e,Pe]);function Te(Oe,et,Rt=d){return Yi(tn=>(et&&et(tn),!Rt&&H.current&&H.current[Oe](tn),!0))}const Tt=Te("start",R),ut=Te("stop",E),ze=Te("stop",b),Ze=Te("stop",I),yt=Te("stop",Oe=>{_e&&Oe.preventDefault(),P&&P(Oe)}),ee=Te("start",N),me=Te("stop",$),Ce=Te("stop",L),Ue=Te("stop",Oe=>{Ge(Oe),se.current===!1&&Ve(!1),h&&h(Oe)},!1),W=Yi(Oe=>{ce.current||(ce.current=Oe.currentTarget),je(Oe),se.current===!0&&(Ve(!0),y&&y(Oe)),w&&w(Oe)}),S=()=>{const Oe=ce.current;return l&&l!=="button"&&!(Oe.tagName==="A"&&Oe.href)},O=C.useRef(!1),D=Yi(Oe=>{f&&!O.current&&_e&&H.current&&Oe.key===" "&&(O.current=!0,H.current.stop(Oe,()=>{H.current.start(Oe)})),Oe.target===Oe.currentTarget&&S()&&Oe.key===" "&&Oe.preventDefault(),_&&_(Oe),Oe.target===Oe.currentTarget&&S()&&Oe.key==="Enter"&&!c&&(Oe.preventDefault(),g&&g(Oe))}),q=Yi(Oe=>{f&&Oe.key===" "&&H.current&&_e&&!Oe.defaultPrevented&&(O.current=!1,H.current.stop(Oe,()=>{H.current.pulsate(Oe)})),k&&k(Oe),g&&Oe.target===Oe.currentTarget&&S()&&Oe.key===" "&&!Oe.defaultPrevented&&g(Oe)});let X=l;X==="button"&&(le.href||le.to)&&(X=m);const pe={};X==="button"?(pe.type=Z===void 0?"button":Z,pe.disabled=c):(!le.href&&!le.to&&(pe.role="button"),c&&(pe["aria-disabled"]=c));const Fe=un(n,Le,ce),rt=A({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:F,focusVisible:_e}),Xe=zF(rt);return v.jsxs(UF,A({as:X,className:De(Xe.root,a),ownerState:rt,onBlur:Ue,onClick:g,onContextMenu:ut,onFocus:W,onKeyDown:D,onKeyUp:q,onMouseDown:Tt,onMouseLeave:yt,onMouseUp:Ze,onDragLeave:ze,onTouchEnd:me,onTouchMove:Ce,onTouchStart:ee,ref:Fe,tabIndex:c?-1:F,type:Z},pe,le,{children:[s,ft?v.jsx(AF,A({ref:V,center:o},z)):null]}))});function WF(e){return ht("MuiIconButton",e)}const GF=gt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),HF=["edge","children","className","color","disabled","disableFocusRipple","size"],VF=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${we(r)}`,i&&`edge${we(i)}`,`size${we(o)}`]};return pt(s,WF,t)},KF=Ee($o,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${we(n.color)}`],n.edge&&t[`edge${we(n.edge)}`],t[`size${we(n.size)}`]]}})(({theme:e,ownerState:t})=>A({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return A({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&A({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":A({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:At(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${GF.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Fo=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium"}=r,d=Ie(r,HF),f=A({},r,{edge:i,color:a,disabled:l,disableFocusRipple:c,size:u}),m=VF(f);return v.jsx(KF,A({className:De(m.root,s),centerRipple:!0,focusRipple:!c,disabled:l,ref:n},d,{ownerState:f,children:o}))});var Tx={},u0={};function qF(e){return ht("MuiSvgIcon",e)}gt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const YF=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],QF=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${we(t)}`,`fontSize${we(n)}`]};return pt(i,qF,r)},XF=Ee("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${we(n.color)}`],t[`fontSize${we(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,a,l,c,u,d,f,m,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=e.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((a=e.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=e.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[t.fontSize],color:(d=(f=(e.vars||e).palette)==null||(f=f[t.color])==null?void 0:f.main)!=null?d:{action:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(h=(e.vars||e).palette)==null||(h=h.action)==null?void 0:h.disabled,inherit:void 0}[t.color]}}),p1=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24"}=r,m=Ie(r,YF),h=C.isValidElement(i)&&i.type==="svg",g=A({},r,{color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h}),E={};u||(E.viewBox=f);const b=QF(g);return v.jsxs(XF,A({as:a,className:De(b.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},E,m,h&&i.props,{ownerState:g,children:[h?i.props.children:i,d?v.jsx("title",{children:d}):null]}))});p1.muiName="SvgIcon";function Wn(e,t){function n(r,i){return v.jsx(p1,A({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=p1.muiName,C.memo(C.forwardRef(n))}const JF={configure:e=>{yx.configure(e)}},ZF=Object.freeze(Object.defineProperty({__proto__:null,capitalize:we,createChainedFunction:u1,createSvgIcon:Wn,debounce:Cv,deprecatedPropType:N3,isMuiElement:tf,ownerDocument:qn,ownerWindow:ss,requirePropFactory:$3,setRef:zm,unstable_ClassNameGenerator:JF,unstable_useEnhancedEffect:li,unstable_useId:yp,unsupportedProp:D3,useControlled:Pu,useEventCallback:Yi,useForkRef:un,useIsFocusVisible:Sv},Symbol.toStringTag,{value:"Module"})),e6=qs(ZF);var hk;function ds(){return hk||(hk=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=e6}(u0)),u0}var t6=so;Object.defineProperty(Tx,"__esModule",{value:!0});var RO=Tx.default=void 0,n6=t6(ds()),r6=v;RO=Tx.default=(0,n6.default)((0,r6.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");function Tu(e){return typeof e=="string"}function tu(e,t,n){return e===void 0||Tu(e)?t:A({},t,{ownerState:A({},t.ownerState,n)})}const i6={disableDefaultClasses:!1},o6=C.createContext(i6);function s6(e){const{disableDefaultClasses:t}=C.useContext(o6);return n=>t?"":e(n)}function Wm(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function PO(e,t,n){return typeof e=="function"?e(t,n):e}function mk(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function TO(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const m=De(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=A({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=A({},n,i,r);return m.length>0&&(g.className=m),Object.keys(h).length>0&&(g.style=h),{props:g,internalRef:void 0}}const s=Wm(A({},i,r)),a=mk(r),l=mk(i),c=t(s),u=De(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),d=A({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),f=A({},c,n,l,a);return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}const a6=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Ao(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Ie(e,a6),a=o?{}:PO(r,i),{props:l,internalRef:c}=TO(A({},s,{externalSlotProps:a})),u=un(c,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return tu(n,A({},l,{ref:u}),i)}function l6(e){const t=qn(e);return t.body===e?ss(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function nf(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function gk(e){return parseInt(ss(e).getComputedStyle(e).paddingRight,10)||0}function c6(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function vk(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=o.indexOf(s)===-1,l=!c6(s);a&&l&&nf(s,i)})}function d0(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function u6(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(l6(r)){const s=xO(qn(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${gk(r)+s}px`;const a=qn(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${gk(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=qn(r).body;else{const s=r.parentElement,a=ss(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function d6(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class f6{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&nf(t.modalRef,!1);const i=d6(n);vk(n,t.mount,t.modalRef,i,!0);const o=d0(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=d0(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=u6(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=d0(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&nf(t.modalRef,n),vk(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&nf(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function p6(e){return typeof e=="function"?e():e}function h6(e){return e?e.props.hasOwnProperty("in"):!1}const m6=new f6;function g6(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=m6,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:d}=e,f=C.useRef({}),m=C.useRef(null),h=C.useRef(null),g=un(h,d),[E,b]=C.useState(!u),w=h6(l);let y=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(y=!1);const _=()=>qn(m.current),k=()=>(f.current.modalRef=h.current,f.current.mount=m.current,f.current),R=()=>{i.mount(k(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},P=Yi(()=>{const le=p6(t)||_().body;i.add(k(),le),h.current&&R()}),I=C.useCallback(()=>i.isTopModal(k()),[i]),$=Yi(le=>{m.current=le,le&&(u&&I()?R():h.current&&nf(h.current,y))}),L=C.useCallback(()=>{i.remove(k(),y)},[y,i]);C.useEffect(()=>()=>{L()},[L]),C.useEffect(()=>{u?P():(!w||!o)&&L()},[u,L,w,o,P]);const N=le=>ce=>{var H;(H=le.onKeyDown)==null||H.call(le,ce),!(ce.key!=="Escape"||ce.which===229||!I())&&(n||(ce.stopPropagation(),c&&c(ce,"escapeKeyDown")))},F=le=>ce=>{var H;(H=le.onClick)==null||H.call(le,ce),ce.target===ce.currentTarget&&c&&c(ce,"backdropClick")};return{getRootProps:(le={})=>{const ce=Wm(e);delete ce.onTransitionEnter,delete ce.onTransitionExited;const H=A({},ce,le);return A({role:"presentation"},H,{onKeyDown:N(H),ref:g})},getBackdropProps:(le={})=>{const ce=le;return A({"aria-hidden":!0},ce,{onClick:F(ce),open:u})},getTransitionProps:()=>{const le=()=>{b(!1),s&&s()},ce=()=>{b(!0),a&&a(),o&&L()};return{onEnter:u1(le,l==null?void 0:l.props.onEnter),onExited:u1(ce,l==null?void 0:l.props.onExited)}},rootRef:g,portalRef:$,isTopModal:I,exited:E,hasTransition:w}}const v6=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function y6(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function b6(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function w6(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||b6(e))}function x6(e){const t=[],n=[];return Array.from(e.querySelectorAll(v6)).forEach((r,i)=>{const o=y6(r);o===-1||!w6(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function S6(){return!0}function _6(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=x6,isEnabled:s=S6,open:a}=e,l=C.useRef(!1),c=C.useRef(null),u=C.useRef(null),d=C.useRef(null),f=C.useRef(null),m=C.useRef(!1),h=C.useRef(null),g=un(t.ref,h),E=C.useRef(null);C.useEffect(()=>{!a||!h.current||(m.current=!n)},[n,a]),C.useEffect(()=>{if(!a||!h.current)return;const y=qn(h.current);return h.current.contains(y.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),m.current&&h.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[a]),C.useEffect(()=>{if(!a||!h.current)return;const y=qn(h.current),_=P=>{E.current=P,!(r||!s()||P.key!=="Tab")&&y.activeElement===h.current&&P.shiftKey&&(l.current=!0,u.current&&u.current.focus())},k=()=>{const P=h.current;if(P===null)return;if(!y.hasFocus()||!s()||l.current){l.current=!1;return}if(P.contains(y.activeElement)||r&&y.activeElement!==c.current&&y.activeElement!==u.current)return;if(y.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!m.current)return;let I=[];if((y.activeElement===c.current||y.activeElement===u.current)&&(I=o(h.current)),I.length>0){var $,L;const N=!!(($=E.current)!=null&&$.shiftKey&&((L=E.current)==null?void 0:L.key)==="Tab"),F=I[0],z=I[I.length-1];typeof F!="string"&&typeof z!="string"&&(N?z.focus():F.focus())}else P.focus()};y.addEventListener("focusin",k),y.addEventListener("keydown",_,!0);const R=setInterval(()=>{y.activeElement&&y.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(R),y.removeEventListener("focusin",k),y.removeEventListener("keydown",_,!0)}},[n,r,i,s,a,o]);const b=y=>{d.current===null&&(d.current=y.relatedTarget),m.current=!0,f.current=y.target;const _=t.props.onFocus;_&&_(y)},w=y=>{d.current===null&&(d.current=y.relatedTarget),m.current=!0};return v.jsxs(C.Fragment,{children:[v.jsx("div",{tabIndex:a?0:-1,onFocus:w,ref:c,"data-testid":"sentinelStart"}),C.cloneElement(t,{ref:g,onFocus:b}),v.jsx("div",{tabIndex:a?0:-1,onFocus:w,ref:u,"data-testid":"sentinelEnd"})]})}function C6(e){return typeof e=="function"?e():e}const Ox=C.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[s,a]=C.useState(null),l=un(C.isValidElement(r)?r.ref:null,n);if(li(()=>{o||a(C6(i)||document.body)},[i,o]),li(()=>{if(s&&!o)return zm(n,s),()=>{zm(n,null)}},[n,s,o]),o){if(C.isValidElement(r)){const c={ref:l};return C.cloneElement(r,c)}return v.jsx(C.Fragment,{children:r})}return v.jsx(C.Fragment,{children:s&&Fg.createPortal(r,s)})}),jx=e=>e.scrollTop;function Fa(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}const k6=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],E6={entering:{opacity:1},entered:{opacity:1}},OO=C.forwardRef(function(t,n){const r=Ni(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:m,onExited:h,onExiting:g,style:E,timeout:b=i,TransitionComponent:w=co}=t,y=Ie(t,k6),_=C.useRef(null),k=un(_,a.ref,n),R=K=>Z=>{if(K){const le=_.current;Z===void 0?K(le):K(le,Z)}},P=R(f),I=R((K,Z)=>{jx(K);const le=Fa({style:E,timeout:b,easing:l},{mode:"enter"});K.style.webkitTransition=r.transitions.create("opacity",le),K.style.transition=r.transitions.create("opacity",le),u&&u(K,Z)}),$=R(d),L=R(g),N=R(K=>{const Z=Fa({style:E,timeout:b,easing:l},{mode:"exit"});K.style.webkitTransition=r.transitions.create("opacity",Z),K.style.transition=r.transitions.create("opacity",Z),m&&m(K)}),F=R(h),z=K=>{o&&o(_.current,K)};return v.jsx(w,A({appear:s,in:c,nodeRef:_,onEnter:I,onEntered:$,onEntering:P,onExit:N,onExited:F,onExiting:L,addEndListener:z,timeout:b},y,{children:(K,Z)=>C.cloneElement(a,A({style:A({opacity:0,visibility:K==="exited"&&!c?"hidden":void 0},E6[K],E,a.props.style),ref:k},Z))}))});function R6(e){return ht("MuiBackdrop",e)}gt("MuiBackdrop",["root","invisible"]);const P6=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],T6=e=>{const{classes:t,invisible:n}=e;return pt({root:["root",n&&"invisible"]},R6,t)},O6=Ee("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>A({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),jO=C.forwardRef(function(t,n){var r,i,o;const s=mt({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:d={},invisible:f=!1,open:m,slotProps:h={},slots:g={},TransitionComponent:E=OO,transitionDuration:b}=s,w=Ie(s,P6),y=A({},s,{component:c,invisible:f}),_=T6(y),k=(r=h.root)!=null?r:d.root;return v.jsx(E,A({in:m,timeout:b},w,{children:v.jsx(O6,A({"aria-hidden":!0},k,{as:(i=(o=g.root)!=null?o:u.Root)!=null?i:c,className:De(_.root,l,k==null?void 0:k.className),ownerState:A({},y,k==null?void 0:k.ownerState),classes:_,ref:n,children:a}))}))});function j6(e){return ht("MuiModal",e)}gt("MuiModal",["root","hidden","backdrop"]);const L6=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],I6=e=>{const{open:t,exited:n,classes:r}=e;return pt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},j6,r)},M6=Ee("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>A({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),N6=Ee(jO,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Ev=C.forwardRef(function(t,n){var r,i,o,s,a,l;const c=mt({name:"MuiModal",props:t}),{BackdropComponent:u=N6,BackdropProps:d,className:f,closeAfterTransition:m=!1,children:h,container:g,component:E,components:b={},componentsProps:w={},disableAutoFocus:y=!1,disableEnforceFocus:_=!1,disableEscapeKeyDown:k=!1,disablePortal:R=!1,disableRestoreFocus:P=!1,disableScrollLock:I=!1,hideBackdrop:$=!1,keepMounted:L=!1,onBackdropClick:N,open:F,slotProps:z,slots:K}=c,Z=Ie(c,L6),le=A({},c,{closeAfterTransition:m,disableAutoFocus:y,disableEnforceFocus:_,disableEscapeKeyDown:k,disablePortal:R,disableRestoreFocus:P,disableScrollLock:I,hideBackdrop:$,keepMounted:L}),{getRootProps:ce,getBackdropProps:H,getTransitionProps:V,portalRef:se,isTopModal:je,exited:Ge,hasTransition:Le}=g6(A({},le,{rootRef:n})),_e=A({},le,{exited:Ge}),Ve=I6(_e),Pe={};if(h.props.tabIndex===void 0&&(Pe.tabIndex="-1"),Le){const{onEnter:Ze,onExited:yt}=V();Pe.onEnter=Ze,Pe.onExited=yt}const ct=(r=(i=K==null?void 0:K.root)!=null?i:b.Root)!=null?r:M6,ft=(o=(s=K==null?void 0:K.backdrop)!=null?s:b.Backdrop)!=null?o:u,Te=(a=z==null?void 0:z.root)!=null?a:w.root,Tt=(l=z==null?void 0:z.backdrop)!=null?l:w.backdrop,ut=Ao({elementType:ct,externalSlotProps:Te,externalForwardedProps:Z,getSlotProps:ce,additionalProps:{ref:n,as:E},ownerState:_e,className:De(f,Te==null?void 0:Te.className,Ve==null?void 0:Ve.root,!_e.open&&_e.exited&&(Ve==null?void 0:Ve.hidden))}),ze=Ao({elementType:ft,externalSlotProps:Tt,additionalProps:d,getSlotProps:Ze=>H(A({},Ze,{onClick:yt=>{N&&N(yt),Ze!=null&&Ze.onClick&&Ze.onClick(yt)}})),className:De(Tt==null?void 0:Tt.className,d==null?void 0:d.className,Ve==null?void 0:Ve.backdrop),ownerState:_e});return!L&&!F&&(!Le||Ge)?null:v.jsx(Ox,{ref:se,container:g,disablePortal:R,children:v.jsxs(ct,A({},ut,{children:[!$&&u?v.jsx(ft,A({},ze)):null,v.jsx(_6,{disableEnforceFocus:_,disableAutoFocus:y,disableRestoreFocus:P,isEnabled:je,open:F,children:C.cloneElement(h,Pe)})]}))})}),$6=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function A6(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=ss(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function D6(e){return typeof e=="function"?e():e}function mh(e,t,n){const r=D6(n),i=A6(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const B6=C.forwardRef(function(t,n){const r=Ni(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:d=i,in:f,onEnter:m,onEntered:h,onEntering:g,onExit:E,onExited:b,onExiting:w,style:y,timeout:_=o,TransitionComponent:k=co}=t,R=Ie(t,$6),P=C.useRef(null),I=un(l.ref,P,n),$=H=>V=>{H&&(V===void 0?H(P.current):H(P.current,V))},L=$((H,V)=>{mh(u,H,c),jx(H),m&&m(H,V)}),N=$((H,V)=>{const se=Fa({timeout:_,style:y,easing:d},{mode:"enter"});H.style.webkitTransition=r.transitions.create("-webkit-transform",A({},se)),H.style.transition=r.transitions.create("transform",A({},se)),H.style.webkitTransform="none",H.style.transform="none",g&&g(H,V)}),F=$(h),z=$(w),K=$(H=>{const V=Fa({timeout:_,style:y,easing:d},{mode:"exit"});H.style.webkitTransition=r.transitions.create("-webkit-transform",V),H.style.transition=r.transitions.create("transform",V),mh(u,H,c),E&&E(H)}),Z=$(H=>{H.style.webkitTransition="",H.style.transition="",b&&b(H)}),le=H=>{s&&s(P.current,H)},ce=C.useCallback(()=>{P.current&&mh(u,P.current,c)},[u,c]);return C.useEffect(()=>{if(f||u==="down"||u==="right")return;const H=Cv(()=>{P.current&&mh(u,P.current,c)}),V=ss(P.current);return V.addEventListener("resize",H),()=>{H.clear(),V.removeEventListener("resize",H)}},[u,f,c]),C.useEffect(()=>{f||ce()},[f,ce]),v.jsx(k,A({nodeRef:P,onEnter:L,onEntered:F,onEntering:N,onExit:K,onExited:Z,onExiting:z,addEndListener:le,appear:a,in:f,timeout:_},R,{children:(H,V)=>C.cloneElement(l,A({ref:I,style:A({visibility:H==="exited"&&!f?"hidden":void 0},y,l.props.style)},V))}))});function F6(e){return ht("MuiDrawer",e)}gt("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const z6=["BackdropProps"],U6=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],LO=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},W6=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${we(n)}`,r!=="temporary"&&`paperAnchorDocked${we(n)}`]};return pt(i,F6,t)},G6=Ee(Ev,{name:"MuiDrawer",slot:"Root",overridesResolver:LO})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),yk=Ee("div",{shouldForwardProp:cr,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:LO})({flex:"0 0 auto"}),H6=Ee(us,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${we(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${we(n.anchor)}`]]}})(({theme:e,ownerState:t})=>A({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},t.anchor==="left"&&{left:0},t.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="right"&&{right:0},t.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="left"&&t.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="top"&&t.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="right"&&t.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="bottom"&&t.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),IO={left:"right",right:"left",top:"down",bottom:"up"};function V6(e){return["left","right"].indexOf(e)!==-1}function K6({direction:e},t){return e==="rtl"&&V6(t)?IO[t]:t}const q6=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiDrawer"}),i=Ni(),o=Ex(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:m}={},onClose:h,open:g=!1,PaperProps:E={},SlideProps:b,TransitionComponent:w=B6,transitionDuration:y=s,variant:_="temporary"}=r,k=Ie(r.ModalProps,z6),R=Ie(r,U6),P=C.useRef(!1);C.useEffect(()=>{P.current=!0},[]);const I=K6({direction:o?"rtl":"ltr"},a),L=A({},r,{anchor:a,elevation:d,open:g,variant:_},R),N=W6(L),F=v.jsx(H6,A({elevation:_==="temporary"?d:0,square:!0},E,{className:De(N.paper,E.className),ownerState:L,children:c}));if(_==="permanent")return v.jsx(yk,A({className:De(N.root,N.docked,u),ownerState:L,ref:n},R,{children:F}));const z=v.jsx(w,A({in:g,direction:IO[I],timeout:y,appear:P.current},b,{children:F}));return _==="persistent"?v.jsx(yk,A({className:De(N.root,N.docked,u),ownerState:L,ref:n},R,{children:z})):v.jsx(G6,A({BackdropProps:A({},l,m,{transitionDuration:y}),className:De(N.root,N.modal,u),open:g,ownerState:L,onClose:h,hideBackdrop:f,ref:n},R,k,{children:z}))}),jo=C.createContext({});function Y6(e){return ht("MuiList",e)}gt("MuiList",["root","padding","dense","subheader"]);const Q6=["children","className","component","dense","disablePadding","subheader"],X6=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return pt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},Y6,t)},J6=Ee("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>A({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),rf=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=Ie(r,Q6),d=C.useMemo(()=>({dense:a}),[a]),f=A({},r,{component:s,dense:a,disablePadding:l}),m=X6(f);return v.jsx(jo.Provider,{value:d,children:v.jsxs(J6,A({as:s,className:De(m.root,o),ref:n,ownerState:f},u,{children:[c,i]}))})});function Z6(e){return ht("MuiListItem",e)}const Dc=gt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function ez(e){return ht("MuiListItemButton",e)}const Bc=gt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),tz=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],nz=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},rz=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=e,c=pt({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},ez,n);return A({},n,c)},iz=Ee($o,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:nz})(({theme:e,ownerState:t})=>A({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Bc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:At(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Bc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:At(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Bc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:At(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:At(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Bc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Bc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),oz=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:f=!1,className:m}=r,h=Ie(r,tz),g=C.useContext(jo),E=C.useMemo(()=>({dense:l||g.dense||!1,alignItems:i,disableGutters:c}),[i,g.dense,l,c]),b=C.useRef(null);li(()=>{o&&b.current&&b.current.focus()},[o]);const w=A({},r,{alignItems:i,dense:E.dense,disableGutters:c,divider:u,selected:f}),y=rz(w),_=un(b,n);return v.jsx(jo.Provider,{value:E,children:v.jsx(iz,A({ref:_,href:h.href||h.to,component:(h.href||h.to)&&s==="div"?"button":s,focusVisibleClassName:De(y.focusVisible,d),ownerState:w,className:De(y.root,m)},h,{classes:y,children:a}))})});function sz(e){return ht("MuiListItemSecondaryAction",e)}gt("MuiListItemSecondaryAction",["root","disableGutters"]);const az=["className"],lz=e=>{const{disableGutters:t,classes:n}=e;return pt({root:["root",t&&"disableGutters"]},sz,n)},cz=Ee("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>A({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),MO=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Ie(r,az),s=C.useContext(jo),a=A({},r,{disableGutters:s.disableGutters}),l=lz(a);return v.jsx(cz,A({className:De(l.root,i),ownerState:a,ref:n},o))});MO.muiName="ListItemSecondaryAction";const uz=["className"],dz=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],fz=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},pz=e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=e;return pt({root:["root",i&&"dense",!s&&"gutters",!a&&"padding",l&&"divider",o&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},Z6,r)},hz=Ee("div",{name:"MuiListItem",slot:"Root",overridesResolver:fz})(({theme:e,ownerState:t})=>A({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&A({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Bc.root}`]:{paddingRight:48}},{[`&.${Dc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Dc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:At(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Dc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:At(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Dc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Dc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:At(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:At(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),mz=Ee("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),wo=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:a,className:l,component:c,components:u={},componentsProps:d={},ContainerComponent:f="li",ContainerProps:{className:m}={},dense:h=!1,disabled:g=!1,disableGutters:E=!1,disablePadding:b=!1,divider:w=!1,focusVisibleClassName:y,secondaryAction:_,selected:k=!1,slotProps:R={},slots:P={}}=r,I=Ie(r.ContainerProps,uz),$=Ie(r,dz),L=C.useContext(jo),N=C.useMemo(()=>({dense:h||L.dense||!1,alignItems:i,disableGutters:E}),[i,L.dense,h,E]),F=C.useRef(null);li(()=>{o&&F.current&&F.current.focus()},[o]);const z=C.Children.toArray(a),K=z.length&&tf(z[z.length-1],["ListItemSecondaryAction"]),Z=A({},r,{alignItems:i,autoFocus:o,button:s,dense:N.dense,disabled:g,disableGutters:E,disablePadding:b,divider:w,hasSecondaryAction:K,selected:k}),le=pz(Z),ce=un(F,n),H=P.root||u.Root||hz,V=R.root||d.root||{},se=A({className:De(le.root,V.className,l),disabled:g},$);let je=c||"li";return s&&(se.component=c||"div",se.focusVisibleClassName=De(Dc.focusVisible,y),je=$o),K?(je=!se.component&&!c?"div":je,f==="li"&&(je==="li"?je="div":se.component==="li"&&(se.component="div")),v.jsx(jo.Provider,{value:N,children:v.jsxs(mz,A({as:f,className:De(le.container,m),ref:ce,ownerState:Z},I,{children:[v.jsx(H,A({},V,!Tu(H)&&{as:je,ownerState:A({},Z,V.ownerState)},se,{children:z})),z.pop()]}))})):v.jsx(jo.Provider,{value:N,children:v.jsxs(H,A({},V,{as:je,ref:ce},!Tu(H)&&{ownerState:A({},Z,V.ownerState)},se,{children:[z,_&&v.jsx(MO,{children:_})]}))})});function gz(e){return ht("MuiListItemText",e)}const Gm=gt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),vz=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],yz=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return pt({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},gz,t)},bz=Ee("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Gm.primary}`]:t.primary},{[`& .${Gm.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>A({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),Ss=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=r,f=Ie(r,vz),{dense:m}=C.useContext(jo);let h=l??i,g=u;const E=A({},r,{disableTypography:s,inset:a,primary:!!h,secondary:!!g,dense:m}),b=yz(E);return h!=null&&h.type!==_t&&!s&&(h=v.jsx(_t,A({variant:m?"body2":"body1",className:b.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:h}))),g!=null&&g.type!==_t&&!s&&(g=v.jsx(_t,A({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:g}))),v.jsxs(bz,A({className:De(b.root,o),ownerState:E,ref:n},f,{children:[h,g]}))});function wz(e){return ht("MuiDivider",e)}const bk=gt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),xz=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Sz=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:a,variant:l}=e;return pt({root:["root",t&&"absolute",l,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},wz,r)},_z=Ee("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>A({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:At(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>A({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>A({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>A({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>A({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),Cz=Ee("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>A({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),Lo=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:a=o?"div":"hr",flexItem:l=!1,light:c=!1,orientation:u="horizontal",role:d=a!=="hr"?"separator":void 0,textAlign:f="center",variant:m="fullWidth"}=r,h=Ie(r,xz),g=A({},r,{absolute:i,component:a,flexItem:l,light:c,orientation:u,role:d,textAlign:f,variant:m}),E=Sz(g);return v.jsx(_z,A({as:a,className:De(E.root,s),role:d,ref:n,ownerState:g},h,{children:o?v.jsx(Cz,{className:E.wrapper,ownerState:g,children:o}):null}))});Lo.muiSkipListHighlight=!0;const kz=["theme"];function Ez(e){let{theme:t}=e,n=Ie(e,kz);const r=t[Ru];return v.jsx(V3,A({},n,{themeId:r?Ru:void 0,theme:r||t}))}var sn={};/** +`),Gi.rippleVisible,MF,f1,({theme:e})=>e.transitions.easing.easeInOut,Gi.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Gi.child,Gi.childLeaving,NF,f1,({theme:e})=>e.transitions.easing.easeInOut,Gi.childPulsate,$F,({theme:e})=>e.transitions.easing.easeInOut),BF=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=Ie(r,LF),[l,c]=C.useState([]),u=C.useRef(0),d=C.useRef(null);C.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=C.useRef(!1),m=Sa(),h=C.useRef(null),g=C.useRef(null),R=C.useCallback(_=>{const{pulsate:k,rippleX:E,rippleY:P,rippleSize:I,cb:A}=_;c(L=>[...L,v.jsx(DF,{classes:{ripple:De(o.ripple,Gi.ripple),rippleVisible:De(o.rippleVisible,Gi.rippleVisible),ripplePulsate:De(o.ripplePulsate,Gi.ripplePulsate),child:De(o.child,Gi.child),childLeaving:De(o.childLeaving,Gi.childLeaving),childPulsate:De(o.childPulsate,Gi.childPulsate)},timeout:f1,pulsate:k,rippleX:E,rippleY:P,rippleSize:I},u.current)]),u.current+=1,d.current=A},[o]),b=C.useCallback((_={},k={},E=()=>{})=>{const{pulsate:P=!1,center:I=i||k.pulsate,fakeElement:A=!1}=k;if((_==null?void 0:_.type)==="mousedown"&&f.current){f.current=!1;return}(_==null?void 0:_.type)==="touchstart"&&(f.current=!0);const L=A?null:g.current,N=L?L.getBoundingClientRect():{width:0,height:0,left:0,top:0};let F,z,K;if(I||_===void 0||_.clientX===0&&_.clientY===0||!_.clientX&&!_.touches)F=Math.round(N.width/2),z=Math.round(N.height/2);else{const{clientX:Z,clientY:le}=_.touches&&_.touches.length>0?_.touches[0]:_;F=Math.round(Z-N.left),z=Math.round(le-N.top)}if(I)K=Math.sqrt((2*N.width**2+N.height**2)/3),K%2===0&&(K+=1);else{const Z=Math.max(Math.abs((L?L.clientWidth:0)-F),F)*2+2,le=Math.max(Math.abs((L?L.clientHeight:0)-z),z)*2+2;K=Math.sqrt(Z**2+le**2)}_!=null&&_.touches?h.current===null&&(h.current=()=>{R({pulsate:P,rippleX:F,rippleY:z,rippleSize:K,cb:E})},m.start(IF,()=>{h.current&&(h.current(),h.current=null)})):R({pulsate:P,rippleX:F,rippleY:z,rippleSize:K,cb:E})},[i,R,m]),w=C.useCallback(()=>{b({},{pulsate:!0})},[b]),y=C.useCallback((_,k)=>{if(m.clear(),(_==null?void 0:_.type)==="touchend"&&h.current){h.current(),h.current=null,m.start(0,()=>{y(_,k)});return}h.current=null,c(E=>E.length>0?E.slice(1):E),d.current=k},[m]);return C.useImperativeHandle(n,()=>({pulsate:w,start:b,stop:y}),[w,b,y]),v.jsx(AF,$({className:De(Gi.root,o.root,s),ref:g},a,{children:v.jsx(Px,{component:null,exit:!0,children:l})}))});function FF(e){return ft("MuiButtonBase",e)}const zF=pt("MuiButtonBase",["root","disabled","focusVisible"]),UF=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],WF=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=mt({root:["root",t&&"disabled",n&&"focusVisible"]},FF,i);return n&&r&&(s.root+=` ${r}`),s},GF=Ee("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${zF.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ao=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,LinkComponent:m="a",onBlur:h,onClick:g,onContextMenu:R,onDragLeave:b,onFocus:w,onFocusVisible:y,onKeyDown:_,onKeyUp:k,onMouseDown:E,onMouseLeave:P,onMouseUp:I,onTouchEnd:A,onTouchMove:L,onTouchStart:N,tabIndex:F=0,TouchRippleProps:z,touchRippleRef:K,type:Z}=r,le=Ie(r,UF),ce=C.useRef(null),H=C.useRef(null),V=un(H,K),{isFocusVisibleRef:se,onFocus:je,onBlur:Ge,ref:Le}=Sv(),[_e,Ve]=C.useState(!1);c&&_e&&Ve(!1),C.useImperativeHandle(i,()=>({focusVisible:()=>{Ve(!0),ce.current.focus()}}),[]);const[Pe,ct]=C.useState(!1);C.useEffect(()=>{ct(!0)},[]);const ht=Pe&&!u&&!c;C.useEffect(()=>{_e&&f&&!u&&Pe&&H.current.pulsate()},[u,f,_e,Pe]);function Te(Oe,et,Rt=d){return Yi(tn=>(et&&et(tn),!Rt&&H.current&&H.current[Oe](tn),!0))}const Tt=Te("start",E),ut=Te("stop",R),ze=Te("stop",b),Ze=Te("stop",I),yt=Te("stop",Oe=>{_e&&Oe.preventDefault(),P&&P(Oe)}),ee=Te("start",N),me=Te("stop",A),Ce=Te("stop",L),Ue=Te("stop",Oe=>{Ge(Oe),se.current===!1&&Ve(!1),h&&h(Oe)},!1),W=Yi(Oe=>{ce.current||(ce.current=Oe.currentTarget),je(Oe),se.current===!0&&(Ve(!0),y&&y(Oe)),w&&w(Oe)}),S=()=>{const Oe=ce.current;return l&&l!=="button"&&!(Oe.tagName==="A"&&Oe.href)},O=C.useRef(!1),D=Yi(Oe=>{f&&!O.current&&_e&&H.current&&Oe.key===" "&&(O.current=!0,H.current.stop(Oe,()=>{H.current.start(Oe)})),Oe.target===Oe.currentTarget&&S()&&Oe.key===" "&&Oe.preventDefault(),_&&_(Oe),Oe.target===Oe.currentTarget&&S()&&Oe.key==="Enter"&&!c&&(Oe.preventDefault(),g&&g(Oe))}),q=Yi(Oe=>{f&&Oe.key===" "&&H.current&&_e&&!Oe.defaultPrevented&&(O.current=!1,H.current.stop(Oe,()=>{H.current.pulsate(Oe)})),k&&k(Oe),g&&Oe.target===Oe.currentTarget&&S()&&Oe.key===" "&&!Oe.defaultPrevented&&g(Oe)});let X=l;X==="button"&&(le.href||le.to)&&(X=m);const pe={};X==="button"?(pe.type=Z===void 0?"button":Z,pe.disabled=c):(!le.href&&!le.to&&(pe.role="button"),c&&(pe["aria-disabled"]=c));const Fe=un(n,Le,ce),rt=$({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:F,focusVisible:_e}),Xe=WF(rt);return v.jsxs(GF,$({as:X,className:De(Xe.root,a),ownerState:rt,onBlur:Ue,onClick:g,onContextMenu:ut,onFocus:W,onKeyDown:D,onKeyUp:q,onMouseDown:Tt,onMouseLeave:yt,onMouseUp:Ze,onDragLeave:ze,onTouchEnd:me,onTouchMove:Ce,onTouchStart:ee,ref:Fe,tabIndex:c?-1:F,type:Z},pe,le,{children:[s,ht?v.jsx(BF,$({ref:V,center:o},z)):null]}))});function HF(e){return ft("MuiIconButton",e)}const VF=pt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),KF=["edge","children","className","color","disabled","disableFocusRipple","size"],qF=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${we(r)}`,i&&`edge${we(i)}`,`size${we(o)}`]};return mt(s,HF,t)},YF=Ee(Ao,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${we(n.color)}`],n.edge&&t[`edge${we(n.edge)}`],t[`size${we(n.size)}`]]}})(({theme:e,ownerState:t})=>$({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return $({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&$({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":$({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:At(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${VF.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Fo=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium"}=r,d=Ie(r,KF),f=$({},r,{edge:i,color:a,disabled:l,disableFocusRipple:c,size:u}),m=qF(f);return v.jsx(YF,$({className:De(m.root,s),centerRipple:!0,focusRipple:!c,disabled:l,ref:n},d,{ownerState:f,children:o}))});var Tx={},u0={};function QF(e){return ft("MuiSvgIcon",e)}pt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const XF=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],JF=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${we(t)}`,`fontSize${we(n)}`]};return mt(i,QF,r)},ZF=Ee("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${we(n.color)}`],t[`fontSize${we(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,a,l,c,u,d,f,m,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=e.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((a=e.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=e.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[t.fontSize],color:(d=(f=(e.vars||e).palette)==null||(f=f[t.color])==null?void 0:f.main)!=null?d:{action:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(h=(e.vars||e).palette)==null||(h=h.action)==null?void 0:h.disabled,inherit:void 0}[t.color]}}),p1=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24"}=r,m=Ie(r,XF),h=C.isValidElement(i)&&i.type==="svg",g=$({},r,{color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h}),R={};u||(R.viewBox=f);const b=JF(g);return v.jsxs(ZF,$({as:a,className:De(b.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},R,m,h&&i.props,{ownerState:g,children:[h?i.props.children:i,d?v.jsx("title",{children:d}):null]}))});p1.muiName="SvgIcon";function Wn(e,t){function n(r,i){return v.jsx(p1,$({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=p1.muiName,C.memo(C.forwardRef(n))}const e6={configure:e=>{yx.configure(e)}},t6=Object.freeze(Object.defineProperty({__proto__:null,capitalize:we,createChainedFunction:u1,createSvgIcon:Wn,debounce:Cv,deprecatedPropType:$3,isMuiElement:tf,ownerDocument:qn,ownerWindow:ss,requirePropFactory:A3,setRef:zm,unstable_ClassNameGenerator:e6,unstable_useEnhancedEffect:li,unstable_useId:yp,unsupportedProp:B3,useControlled:Pu,useEventCallback:Yi,useForkRef:un,useIsFocusVisible:Sv},Symbol.toStringTag,{value:"Module"})),n6=qs(t6);var mk;function ds(){return mk||(mk=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=n6}(u0)),u0}var r6=so;Object.defineProperty(Tx,"__esModule",{value:!0});var EO=Tx.default=void 0,i6=r6(ds()),o6=v;EO=Tx.default=(0,i6.default)((0,o6.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");function s6(e){const t=qn(e);return t.body===e?ss(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function nf(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function gk(e){return parseInt(ss(e).getComputedStyle(e).paddingRight,10)||0}function a6(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function vk(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=o.indexOf(s)===-1,l=!a6(s);a&&l&&nf(s,i)})}function d0(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function l6(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(s6(r)){const s=yO(qn(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${gk(r)+s}px`;const a=qn(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${gk(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=qn(r).body;else{const s=r.parentElement,a=ss(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function c6(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class u6{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&nf(t.modalRef,!1);const i=c6(n);vk(n,t.mount,t.modalRef,i,!0);const o=d0(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=d0(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=l6(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=d0(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&nf(t.modalRef,n),vk(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&nf(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const d6=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function f6(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function p6(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function h6(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||p6(e))}function m6(e){const t=[],n=[];return Array.from(e.querySelectorAll(d6)).forEach((r,i)=>{const o=f6(r);o===-1||!h6(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function g6(){return!0}function v6(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=m6,isEnabled:s=g6,open:a}=e,l=C.useRef(!1),c=C.useRef(null),u=C.useRef(null),d=C.useRef(null),f=C.useRef(null),m=C.useRef(!1),h=C.useRef(null),g=un(t.ref,h),R=C.useRef(null);C.useEffect(()=>{!a||!h.current||(m.current=!n)},[n,a]),C.useEffect(()=>{if(!a||!h.current)return;const y=qn(h.current);return h.current.contains(y.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),m.current&&h.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[a]),C.useEffect(()=>{if(!a||!h.current)return;const y=qn(h.current),_=P=>{R.current=P,!(r||!s()||P.key!=="Tab")&&y.activeElement===h.current&&P.shiftKey&&(l.current=!0,u.current&&u.current.focus())},k=()=>{const P=h.current;if(P===null)return;if(!y.hasFocus()||!s()||l.current){l.current=!1;return}if(P.contains(y.activeElement)||r&&y.activeElement!==c.current&&y.activeElement!==u.current)return;if(y.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!m.current)return;let I=[];if((y.activeElement===c.current||y.activeElement===u.current)&&(I=o(h.current)),I.length>0){var A,L;const N=!!((A=R.current)!=null&&A.shiftKey&&((L=R.current)==null?void 0:L.key)==="Tab"),F=I[0],z=I[I.length-1];typeof F!="string"&&typeof z!="string"&&(N?z.focus():F.focus())}else P.focus()};y.addEventListener("focusin",k),y.addEventListener("keydown",_,!0);const E=setInterval(()=>{y.activeElement&&y.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(E),y.removeEventListener("focusin",k),y.removeEventListener("keydown",_,!0)}},[n,r,i,s,a,o]);const b=y=>{d.current===null&&(d.current=y.relatedTarget),m.current=!0,f.current=y.target;const _=t.props.onFocus;_&&_(y)},w=y=>{d.current===null&&(d.current=y.relatedTarget),m.current=!0};return v.jsxs(C.Fragment,{children:[v.jsx("div",{tabIndex:a?0:-1,onFocus:w,ref:c,"data-testid":"sentinelStart"}),C.cloneElement(t,{ref:g,onFocus:b}),v.jsx("div",{tabIndex:a?0:-1,onFocus:w,ref:u,"data-testid":"sentinelEnd"})]})}function y6(e){return typeof e=="function"?e():e}const Ox=C.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[s,a]=C.useState(null),l=un(C.isValidElement(r)?r.ref:null,n);if(li(()=>{o||a(y6(i)||document.body)},[i,o]),li(()=>{if(s&&!o)return zm(n,s),()=>{zm(n,null)}},[n,s,o]),o){if(C.isValidElement(r)){const c={ref:l};return C.cloneElement(r,c)}return v.jsx(C.Fragment,{children:r})}return v.jsx(C.Fragment,{children:s&&Fg.createPortal(r,s)})}),jx=e=>e.scrollTop;function Fa(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}const b6=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],w6={entering:{opacity:1},entered:{opacity:1}},RO=C.forwardRef(function(t,n){const r=Ni(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:m,onExited:h,onExiting:g,style:R,timeout:b=i,TransitionComponent:w=co}=t,y=Ie(t,b6),_=C.useRef(null),k=un(_,a.ref,n),E=K=>Z=>{if(K){const le=_.current;Z===void 0?K(le):K(le,Z)}},P=E(f),I=E((K,Z)=>{jx(K);const le=Fa({style:R,timeout:b,easing:l},{mode:"enter"});K.style.webkitTransition=r.transitions.create("opacity",le),K.style.transition=r.transitions.create("opacity",le),u&&u(K,Z)}),A=E(d),L=E(g),N=E(K=>{const Z=Fa({style:R,timeout:b,easing:l},{mode:"exit"});K.style.webkitTransition=r.transitions.create("opacity",Z),K.style.transition=r.transitions.create("opacity",Z),m&&m(K)}),F=E(h),z=K=>{o&&o(_.current,K)};return v.jsx(w,$({appear:s,in:c,nodeRef:_,onEnter:I,onEntered:A,onEntering:P,onExit:N,onExited:F,onExiting:L,addEndListener:z,timeout:b},y,{children:(K,Z)=>C.cloneElement(a,$({style:$({opacity:0,visibility:K==="exited"&&!c?"hidden":void 0},w6[K],R,a.props.style),ref:k},Z))}))});function x6(e){return ft("MuiBackdrop",e)}pt("MuiBackdrop",["root","invisible"]);const S6=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],_6=e=>{const{classes:t,invisible:n}=e;return mt({root:["root",n&&"invisible"]},x6,t)},C6=Ee("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>$({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),PO=C.forwardRef(function(t,n){var r,i,o;const s=gt({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:d={},invisible:f=!1,open:m,slotProps:h={},slots:g={},TransitionComponent:R=RO,transitionDuration:b}=s,w=Ie(s,S6),y=$({},s,{component:c,invisible:f}),_=_6(y),k=(r=h.root)!=null?r:d.root;return v.jsx(R,$({in:m,timeout:b},w,{children:v.jsx(C6,$({"aria-hidden":!0},k,{as:(i=(o=g.root)!=null?o:u.Root)!=null?i:c,className:De(_.root,l,k==null?void 0:k.className),ownerState:$({},y,k==null?void 0:k.ownerState),classes:_,ref:n,children:a}))}))});function k6(e){return typeof e=="function"?e():e}function E6(e){return e?e.props.hasOwnProperty("in"):!1}const R6=new u6;function P6(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=R6,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:d}=e,f=C.useRef({}),m=C.useRef(null),h=C.useRef(null),g=un(h,d),[R,b]=C.useState(!u),w=E6(l);let y=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(y=!1);const _=()=>qn(m.current),k=()=>(f.current.modalRef=h.current,f.current.mount=m.current,f.current),E=()=>{i.mount(k(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},P=Yi(()=>{const le=k6(t)||_().body;i.add(k(),le),h.current&&E()}),I=C.useCallback(()=>i.isTopModal(k()),[i]),A=Yi(le=>{m.current=le,le&&(u&&I()?E():h.current&&nf(h.current,y))}),L=C.useCallback(()=>{i.remove(k(),y)},[y,i]);C.useEffect(()=>()=>{L()},[L]),C.useEffect(()=>{u?P():(!w||!o)&&L()},[u,L,w,o,P]);const N=le=>ce=>{var H;(H=le.onKeyDown)==null||H.call(le,ce),!(ce.key!=="Escape"||ce.which===229||!I())&&(n||(ce.stopPropagation(),c&&c(ce,"escapeKeyDown")))},F=le=>ce=>{var H;(H=le.onClick)==null||H.call(le,ce),ce.target===ce.currentTarget&&c&&c(ce,"backdropClick")};return{getRootProps:(le={})=>{const ce=Um(e);delete ce.onTransitionEnter,delete ce.onTransitionExited;const H=$({},ce,le);return $({role:"presentation"},H,{onKeyDown:N(H),ref:g})},getBackdropProps:(le={})=>{const ce=le;return $({"aria-hidden":!0},ce,{onClick:F(ce),open:u})},getTransitionProps:()=>{const le=()=>{b(!1),s&&s()},ce=()=>{b(!0),a&&a(),o&&L()};return{onEnter:u1(le,l==null?void 0:l.props.onEnter),onExited:u1(ce,l==null?void 0:l.props.onExited)}},rootRef:g,portalRef:A,isTopModal:I,exited:R,hasTransition:w}}function T6(e){return ft("MuiModal",e)}pt("MuiModal",["root","hidden","backdrop"]);const O6=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],j6=e=>{const{open:t,exited:n,classes:r}=e;return mt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},T6,r)},L6=Ee("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>$({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),I6=Ee(PO,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Ev=C.forwardRef(function(t,n){var r,i,o,s,a,l;const c=gt({name:"MuiModal",props:t}),{BackdropComponent:u=I6,BackdropProps:d,className:f,closeAfterTransition:m=!1,children:h,container:g,component:R,components:b={},componentsProps:w={},disableAutoFocus:y=!1,disableEnforceFocus:_=!1,disableEscapeKeyDown:k=!1,disablePortal:E=!1,disableRestoreFocus:P=!1,disableScrollLock:I=!1,hideBackdrop:A=!1,keepMounted:L=!1,onBackdropClick:N,open:F,slotProps:z,slots:K}=c,Z=Ie(c,O6),le=$({},c,{closeAfterTransition:m,disableAutoFocus:y,disableEnforceFocus:_,disableEscapeKeyDown:k,disablePortal:E,disableRestoreFocus:P,disableScrollLock:I,hideBackdrop:A,keepMounted:L}),{getRootProps:ce,getBackdropProps:H,getTransitionProps:V,portalRef:se,isTopModal:je,exited:Ge,hasTransition:Le}=P6($({},le,{rootRef:n})),_e=$({},le,{exited:Ge}),Ve=j6(_e),Pe={};if(h.props.tabIndex===void 0&&(Pe.tabIndex="-1"),Le){const{onEnter:Ze,onExited:yt}=V();Pe.onEnter=Ze,Pe.onExited=yt}const ct=(r=(i=K==null?void 0:K.root)!=null?i:b.Root)!=null?r:L6,ht=(o=(s=K==null?void 0:K.backdrop)!=null?s:b.Backdrop)!=null?o:u,Te=(a=z==null?void 0:z.root)!=null?a:w.root,Tt=(l=z==null?void 0:z.backdrop)!=null?l:w.backdrop,ut=$o({elementType:ct,externalSlotProps:Te,externalForwardedProps:Z,getSlotProps:ce,additionalProps:{ref:n,as:R},ownerState:_e,className:De(f,Te==null?void 0:Te.className,Ve==null?void 0:Ve.root,!_e.open&&_e.exited&&(Ve==null?void 0:Ve.hidden))}),ze=$o({elementType:ht,externalSlotProps:Tt,additionalProps:d,getSlotProps:Ze=>H($({},Ze,{onClick:yt=>{N&&N(yt),Ze!=null&&Ze.onClick&&Ze.onClick(yt)}})),className:De(Tt==null?void 0:Tt.className,d==null?void 0:d.className,Ve==null?void 0:Ve.backdrop),ownerState:_e});return!L&&!F&&(!Le||Ge)?null:v.jsx(Ox,{ref:se,container:g,disablePortal:E,children:v.jsxs(ct,$({},ut,{children:[!A&&u?v.jsx(ht,$({},ze)):null,v.jsx(v6,{disableEnforceFocus:_,disableAutoFocus:y,disableRestoreFocus:P,isEnabled:je,open:F,children:C.cloneElement(h,Pe)})]}))})}),M6=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function N6(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=ss(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function $6(e){return typeof e=="function"?e():e}function mh(e,t,n){const r=$6(n),i=N6(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const A6=C.forwardRef(function(t,n){const r=Ni(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:d=i,in:f,onEnter:m,onEntered:h,onEntering:g,onExit:R,onExited:b,onExiting:w,style:y,timeout:_=o,TransitionComponent:k=co}=t,E=Ie(t,M6),P=C.useRef(null),I=un(l.ref,P,n),A=H=>V=>{H&&(V===void 0?H(P.current):H(P.current,V))},L=A((H,V)=>{mh(u,H,c),jx(H),m&&m(H,V)}),N=A((H,V)=>{const se=Fa({timeout:_,style:y,easing:d},{mode:"enter"});H.style.webkitTransition=r.transitions.create("-webkit-transform",$({},se)),H.style.transition=r.transitions.create("transform",$({},se)),H.style.webkitTransform="none",H.style.transform="none",g&&g(H,V)}),F=A(h),z=A(w),K=A(H=>{const V=Fa({timeout:_,style:y,easing:d},{mode:"exit"});H.style.webkitTransition=r.transitions.create("-webkit-transform",V),H.style.transition=r.transitions.create("transform",V),mh(u,H,c),R&&R(H)}),Z=A(H=>{H.style.webkitTransition="",H.style.transition="",b&&b(H)}),le=H=>{s&&s(P.current,H)},ce=C.useCallback(()=>{P.current&&mh(u,P.current,c)},[u,c]);return C.useEffect(()=>{if(f||u==="down"||u==="right")return;const H=Cv(()=>{P.current&&mh(u,P.current,c)}),V=ss(P.current);return V.addEventListener("resize",H),()=>{H.clear(),V.removeEventListener("resize",H)}},[u,f,c]),C.useEffect(()=>{f||ce()},[f,ce]),v.jsx(k,$({nodeRef:P,onEnter:L,onEntered:F,onEntering:N,onExit:K,onExited:Z,onExiting:z,addEndListener:le,appear:a,in:f,timeout:_},E,{children:(H,V)=>C.cloneElement(l,$({ref:I,style:$({visibility:H==="exited"&&!f?"hidden":void 0},y,l.props.style)},V))}))});function D6(e){return ft("MuiDrawer",e)}pt("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const B6=["BackdropProps"],F6=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],TO=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},z6=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${we(n)}`,r!=="temporary"&&`paperAnchorDocked${we(n)}`]};return mt(i,D6,t)},U6=Ee(Ev,{name:"MuiDrawer",slot:"Root",overridesResolver:TO})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),yk=Ee("div",{shouldForwardProp:cr,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:TO})({flex:"0 0 auto"}),W6=Ee(us,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${we(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${we(n.anchor)}`]]}})(({theme:e,ownerState:t})=>$({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},t.anchor==="left"&&{left:0},t.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="right"&&{right:0},t.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="left"&&t.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="top"&&t.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="right"&&t.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="bottom"&&t.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),OO={left:"right",right:"left",top:"down",bottom:"up"};function G6(e){return["left","right"].indexOf(e)!==-1}function H6({direction:e},t){return e==="rtl"&&G6(t)?OO[t]:t}const V6=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiDrawer"}),i=Ni(),o=Ex(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:m}={},onClose:h,open:g=!1,PaperProps:R={},SlideProps:b,TransitionComponent:w=A6,transitionDuration:y=s,variant:_="temporary"}=r,k=Ie(r.ModalProps,B6),E=Ie(r,F6),P=C.useRef(!1);C.useEffect(()=>{P.current=!0},[]);const I=H6({direction:o?"rtl":"ltr"},a),L=$({},r,{anchor:a,elevation:d,open:g,variant:_},E),N=z6(L),F=v.jsx(W6,$({elevation:_==="temporary"?d:0,square:!0},R,{className:De(N.paper,R.className),ownerState:L,children:c}));if(_==="permanent")return v.jsx(yk,$({className:De(N.root,N.docked,u),ownerState:L,ref:n},E,{children:F}));const z=v.jsx(w,$({in:g,direction:OO[I],timeout:y,appear:P.current},b,{children:F}));return _==="persistent"?v.jsx(yk,$({className:De(N.root,N.docked,u),ownerState:L,ref:n},E,{children:z})):v.jsx(U6,$({BackdropProps:$({},l,m,{transitionDuration:y}),className:De(N.root,N.modal,u),open:g,ownerState:L,onClose:h,hideBackdrop:f,ref:n},E,k,{children:z}))}),jo=C.createContext({});function K6(e){return ft("MuiList",e)}pt("MuiList",["root","padding","dense","subheader"]);const q6=["children","className","component","dense","disablePadding","subheader"],Y6=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return mt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},K6,t)},Q6=Ee("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>$({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),rf=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=Ie(r,q6),d=C.useMemo(()=>({dense:a}),[a]),f=$({},r,{component:s,dense:a,disablePadding:l}),m=Y6(f);return v.jsx(jo.Provider,{value:d,children:v.jsxs(Q6,$({as:s,className:De(m.root,o),ref:n,ownerState:f},u,{children:[c,i]}))})});function X6(e){return ft("MuiListItem",e)}const Dc=pt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function J6(e){return ft("MuiListItemButton",e)}const Bc=pt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Z6=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],ez=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},tz=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=e,c=mt({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},J6,n);return $({},n,c)},nz=Ee(Ao,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:ez})(({theme:e,ownerState:t})=>$({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Bc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:At(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Bc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:At(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Bc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:At(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:At(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Bc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Bc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),rz=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:f=!1,className:m}=r,h=Ie(r,Z6),g=C.useContext(jo),R=C.useMemo(()=>({dense:l||g.dense||!1,alignItems:i,disableGutters:c}),[i,g.dense,l,c]),b=C.useRef(null);li(()=>{o&&b.current&&b.current.focus()},[o]);const w=$({},r,{alignItems:i,dense:R.dense,disableGutters:c,divider:u,selected:f}),y=tz(w),_=un(b,n);return v.jsx(jo.Provider,{value:R,children:v.jsx(nz,$({ref:_,href:h.href||h.to,component:(h.href||h.to)&&s==="div"?"button":s,focusVisibleClassName:De(y.focusVisible,d),ownerState:w,className:De(y.root,m)},h,{classes:y,children:a}))})});function iz(e){return ft("MuiListItemSecondaryAction",e)}pt("MuiListItemSecondaryAction",["root","disableGutters"]);const oz=["className"],sz=e=>{const{disableGutters:t,classes:n}=e;return mt({root:["root",t&&"disableGutters"]},iz,n)},az=Ee("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>$({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),jO=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Ie(r,oz),s=C.useContext(jo),a=$({},r,{disableGutters:s.disableGutters}),l=sz(a);return v.jsx(az,$({className:De(l.root,i),ownerState:a,ref:n},o))});jO.muiName="ListItemSecondaryAction";const lz=["className"],cz=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],uz=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},dz=e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=e;return mt({root:["root",i&&"dense",!s&&"gutters",!a&&"padding",l&&"divider",o&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},X6,r)},fz=Ee("div",{name:"MuiListItem",slot:"Root",overridesResolver:uz})(({theme:e,ownerState:t})=>$({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&$({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Bc.root}`]:{paddingRight:48}},{[`&.${Dc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Dc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:At(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Dc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:At(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Dc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Dc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:At(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:At(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),pz=Ee("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),wo=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:a,className:l,component:c,components:u={},componentsProps:d={},ContainerComponent:f="li",ContainerProps:{className:m}={},dense:h=!1,disabled:g=!1,disableGutters:R=!1,disablePadding:b=!1,divider:w=!1,focusVisibleClassName:y,secondaryAction:_,selected:k=!1,slotProps:E={},slots:P={}}=r,I=Ie(r.ContainerProps,lz),A=Ie(r,cz),L=C.useContext(jo),N=C.useMemo(()=>({dense:h||L.dense||!1,alignItems:i,disableGutters:R}),[i,L.dense,h,R]),F=C.useRef(null);li(()=>{o&&F.current&&F.current.focus()},[o]);const z=C.Children.toArray(a),K=z.length&&tf(z[z.length-1],["ListItemSecondaryAction"]),Z=$({},r,{alignItems:i,autoFocus:o,button:s,dense:N.dense,disabled:g,disableGutters:R,disablePadding:b,divider:w,hasSecondaryAction:K,selected:k}),le=dz(Z),ce=un(F,n),H=P.root||u.Root||fz,V=E.root||d.root||{},se=$({className:De(le.root,V.className,l),disabled:g},A);let je=c||"li";return s&&(se.component=c||"div",se.focusVisibleClassName=De(Dc.focusVisible,y),je=Ao),K?(je=!se.component&&!c?"div":je,f==="li"&&(je==="li"?je="div":se.component==="li"&&(se.component="div")),v.jsx(jo.Provider,{value:N,children:v.jsxs(pz,$({as:f,className:De(le.container,m),ref:ce,ownerState:Z},I,{children:[v.jsx(H,$({},V,!Tu(H)&&{as:je,ownerState:$({},Z,V.ownerState)},se,{children:z})),z.pop()]}))})):v.jsx(jo.Provider,{value:N,children:v.jsxs(H,$({},V,{as:je,ref:ce},!Tu(H)&&{ownerState:$({},Z,V.ownerState)},se,{children:[z,_&&v.jsx(jO,{children:_})]}))})});function hz(e){return ft("MuiListItemText",e)}const Gm=pt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),mz=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],gz=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return mt({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},hz,t)},vz=Ee("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Gm.primary}`]:t.primary},{[`& .${Gm.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>$({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),Ss=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=r,f=Ie(r,mz),{dense:m}=C.useContext(jo);let h=l??i,g=u;const R=$({},r,{disableTypography:s,inset:a,primary:!!h,secondary:!!g,dense:m}),b=gz(R);return h!=null&&h.type!==_t&&!s&&(h=v.jsx(_t,$({variant:m?"body2":"body1",className:b.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:h}))),g!=null&&g.type!==_t&&!s&&(g=v.jsx(_t,$({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:g}))),v.jsxs(vz,$({className:De(b.root,o),ownerState:R,ref:n},f,{children:[h,g]}))});function yz(e){return ft("MuiDivider",e)}const bk=pt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),bz=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],wz=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:a,variant:l}=e;return mt({root:["root",t&&"absolute",l,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},yz,r)},xz=Ee("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>$({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:At(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>$({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>$({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>$({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>$({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),Sz=Ee("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>$({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),Lo=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:a=o?"div":"hr",flexItem:l=!1,light:c=!1,orientation:u="horizontal",role:d=a!=="hr"?"separator":void 0,textAlign:f="center",variant:m="fullWidth"}=r,h=Ie(r,bz),g=$({},r,{absolute:i,component:a,flexItem:l,light:c,orientation:u,role:d,textAlign:f,variant:m}),R=wz(g);return v.jsx(xz,$({as:a,className:De(R.root,s),role:d,ref:n,ownerState:g},h,{children:o?v.jsx(Sz,{className:R.wrapper,ownerState:g,children:o}):null}))});Lo.muiSkipListHighlight=!0;const _z=["theme"];function Cz(e){let{theme:t}=e,n=Ie(e,_z);const r=t[Ru];return v.jsx(q3,$({},n,{themeId:r?Ru:void 0,theme:r||t}))}var sn={};/** * @license React * react-is.production.min.js * @@ -161,32 +161,32 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Lx=Symbol.for("react.element"),Ix=Symbol.for("react.portal"),Rv=Symbol.for("react.fragment"),Pv=Symbol.for("react.strict_mode"),Tv=Symbol.for("react.profiler"),Ov=Symbol.for("react.provider"),jv=Symbol.for("react.context"),Rz=Symbol.for("react.server_context"),Lv=Symbol.for("react.forward_ref"),Iv=Symbol.for("react.suspense"),Mv=Symbol.for("react.suspense_list"),Nv=Symbol.for("react.memo"),$v=Symbol.for("react.lazy"),Pz=Symbol.for("react.offscreen"),NO;NO=Symbol.for("react.module.reference");function uo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Lx:switch(e=e.type,e){case Rv:case Tv:case Pv:case Iv:case Mv:return e;default:switch(e=e&&e.$$typeof,e){case Rz:case jv:case Lv:case $v:case Nv:case Ov:return e;default:return t}}case Ix:return t}}}sn.ContextConsumer=jv;sn.ContextProvider=Ov;sn.Element=Lx;sn.ForwardRef=Lv;sn.Fragment=Rv;sn.Lazy=$v;sn.Memo=Nv;sn.Portal=Ix;sn.Profiler=Tv;sn.StrictMode=Pv;sn.Suspense=Iv;sn.SuspenseList=Mv;sn.isAsyncMode=function(){return!1};sn.isConcurrentMode=function(){return!1};sn.isContextConsumer=function(e){return uo(e)===jv};sn.isContextProvider=function(e){return uo(e)===Ov};sn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lx};sn.isForwardRef=function(e){return uo(e)===Lv};sn.isFragment=function(e){return uo(e)===Rv};sn.isLazy=function(e){return uo(e)===$v};sn.isMemo=function(e){return uo(e)===Nv};sn.isPortal=function(e){return uo(e)===Ix};sn.isProfiler=function(e){return uo(e)===Tv};sn.isStrictMode=function(e){return uo(e)===Pv};sn.isSuspense=function(e){return uo(e)===Iv};sn.isSuspenseList=function(e){return uo(e)===Mv};sn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Rv||e===Tv||e===Pv||e===Iv||e===Mv||e===Pz||typeof e=="object"&&e!==null&&(e.$$typeof===$v||e.$$typeof===Nv||e.$$typeof===Ov||e.$$typeof===jv||e.$$typeof===Lv||e.$$typeof===NO||e.getModuleId!==void 0)};sn.typeOf=uo;function Tz(e){return ht("MuiCollapse",e)}gt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Oz=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],jz=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return pt(r,Tz,n)},Lz=Ee("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>A({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&A({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),Iz=Ee("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>A({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),Mz=Ee("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>A({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),$O=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:a="0px",component:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:m,onExit:h,onExited:g,onExiting:E,orientation:b="vertical",style:w,timeout:y=gO.standard,TransitionComponent:_=co}=r,k=Ie(r,Oz),R=A({},r,{orientation:b,collapsedSize:a}),P=jz(R),I=Ni(),$=Sa(),L=C.useRef(null),N=C.useRef(),F=typeof a=="number"?`${a}px`:a,z=b==="horizontal",K=z?"width":"height",Z=C.useRef(null),le=un(n,Z),ce=Pe=>ct=>{if(Pe){const ft=Z.current;ct===void 0?Pe(ft):Pe(ft,ct)}},H=()=>L.current?L.current[z?"clientWidth":"clientHeight"]:0,V=ce((Pe,ct)=>{L.current&&z&&(L.current.style.position="absolute"),Pe.style[K]=F,d&&d(Pe,ct)}),se=ce((Pe,ct)=>{const ft=H();L.current&&z&&(L.current.style.position="");const{duration:Te,easing:Tt}=Fa({style:w,timeout:y,easing:c},{mode:"enter"});if(y==="auto"){const ut=I.transitions.getAutoHeightDuration(ft);Pe.style.transitionDuration=`${ut}ms`,N.current=ut}else Pe.style.transitionDuration=typeof Te=="string"?Te:`${Te}ms`;Pe.style[K]=`${ft}px`,Pe.style.transitionTimingFunction=Tt,m&&m(Pe,ct)}),je=ce((Pe,ct)=>{Pe.style[K]="auto",f&&f(Pe,ct)}),Ge=ce(Pe=>{Pe.style[K]=`${H()}px`,h&&h(Pe)}),Le=ce(g),_e=ce(Pe=>{const ct=H(),{duration:ft,easing:Te}=Fa({style:w,timeout:y,easing:c},{mode:"exit"});if(y==="auto"){const Tt=I.transitions.getAutoHeightDuration(ct);Pe.style.transitionDuration=`${Tt}ms`,N.current=Tt}else Pe.style.transitionDuration=typeof ft=="string"?ft:`${ft}ms`;Pe.style[K]=F,Pe.style.transitionTimingFunction=Te,E&&E(Pe)}),Ve=Pe=>{y==="auto"&&$.start(N.current||0,Pe),i&&i(Z.current,Pe)};return v.jsx(_,A({in:u,onEnter:V,onEntered:je,onEntering:se,onExit:Ge,onExited:Le,onExiting:_e,addEndListener:Ve,nodeRef:Z,timeout:y==="auto"?null:y},k,{children:(Pe,ct)=>v.jsx(Lz,A({as:l,className:De(P.root,s,{entered:P.entered,exited:!u&&F==="0px"&&P.hidden}[Pe]),style:A({[z?"minWidth":"minHeight"]:F},w),ref:le},ct,{ownerState:A({},R,{state:Pe}),children:v.jsx(Iz,{ownerState:A({},R,{state:Pe}),className:P.wrapper,ref:L,children:v.jsx(Mz,{ownerState:A({},R,{state:Pe}),className:P.wrapperInner,children:o})})}))}))});$O.muiSupportAuto=!0;const AO=C.createContext({}),Nz=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],$z=["component","slots","slotProps"],Az=["component"];function h1(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:s,internalForwardedProps:a}=t,l=Ie(t,Nz),{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0}}=o,f=Ie(o,$z),m=u[e]||r,h=PO(d[e],i),g=TO(A({className:n},l,{externalForwardedProps:e==="root"?f:void 0,externalSlotProps:h})),{props:{component:E},internalRef:b}=g,w=Ie(g.props,Az),y=un(b,h==null?void 0:h.ref,t.ref),_=s?s(w):{},k=A({},i,_),R=e==="root"?E||c:E,P=tu(m,A({},e==="root"&&!c&&!u[e]&&a,e!=="root"&&!u[e]&&a,w,R&&{as:R},{ref:y}),k);return Object.keys(_).forEach(I=>{delete P[I]}),[m,P]}function Dz(e){return ht("MuiAccordion",e)}const gh=gt("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),Bz=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],Fz=e=>{const{classes:t,square:n,expanded:r,disabled:i,disableGutters:o}=e;return pt({root:["root",!n&&"rounded",r&&"expanded",i&&"disabled",!o&&"gutters"],region:["region"]},Dz,t)},zz=Ee(us,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${gh.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${gh.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${gh.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}},({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${gh.expanded}`]:{margin:"16px 0"}}}]})),Uz=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiAccordion"}),{children:i,className:o,defaultExpanded:s=!1,disabled:a=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:f={},slotProps:m={},TransitionComponent:h,TransitionProps:g}=r,E=Ie(r,Bz),[b,w]=Pu({controlled:c,default:s,name:"Accordion",state:"expanded"}),y=C.useCallback(z=>{w(!b),u&&u(z,!b)},[b,u,w]),[_,...k]=C.Children.toArray(i),R=C.useMemo(()=>({expanded:b,disabled:a,disableGutters:l,toggle:y}),[b,a,l,y]),P=A({},r,{square:d,disabled:a,disableGutters:l,expanded:b}),I=Fz(P),$=A({transition:h},f),L=A({transition:g},m),[N,F]=h1("transition",{elementType:$O,externalForwardedProps:{slots:$,slotProps:L},ownerState:P});return v.jsxs(zz,A({className:De(I.root,o),ref:n,ownerState:P,square:d},E,{children:[v.jsx(AO.Provider,{value:R,children:_}),v.jsx(N,A({in:b,timeout:"auto"},F,{children:v.jsx("div",{"aria-labelledby":_.props.id,id:_.props["aria-controls"],role:"region",className:I.region,children:k})}))]}))});function Wz(e){return ht("MuiAccordionDetails",e)}gt("MuiAccordionDetails",["root"]);const Gz=["className"],Hz=e=>{const{classes:t}=e;return pt({root:["root"]},Wz,t)},Vz=Ee("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(1,2,2)})),Kz=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiAccordionDetails"}),{className:i}=r,o=Ie(r,Gz),s=r,a=Hz(s);return v.jsx(Vz,A({className:De(a.root,i),ref:n,ownerState:s},o))});function qz(e){return ht("MuiAccordionSummary",e)}const nu=gt("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),Yz=["children","className","expandIcon","focusVisibleClassName","onClick"],Qz=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return pt({root:["root",n&&"expanded",r&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},qz,t)},Xz=Ee($o,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${nu.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${nu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${nu.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${nu.expanded}`]:{minHeight:64}}}]}}),Jz=Ee("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${nu.expanded}`]:{margin:"20px 0"}}}]})),Zz=Ee("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${nu.expanded}`]:{transform:"rotate(180deg)"}})),e8=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiAccordionSummary"}),{children:i,className:o,expandIcon:s,focusVisibleClassName:a,onClick:l}=r,c=Ie(r,Yz),{disabled:u=!1,disableGutters:d,expanded:f,toggle:m}=C.useContext(AO),h=b=>{m&&m(b),l&&l(b)},g=A({},r,{expanded:f,disabled:u,disableGutters:d}),E=Qz(g);return v.jsxs(Xz,A({focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":f,className:De(E.root,o),focusVisibleClassName:De(E.focusVisible,a),onClick:h,ref:n,ownerState:g},c,{children:[v.jsx(Jz,{className:E.content,ownerState:g,children:i}),s&&v.jsx(Zz,{className:E.expandIconWrapper,ownerState:g,children:s})]}))});function t8(e){return ht("MuiAlert",e)}const wk=gt("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),n8=Wn(v.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),r8=Wn(v.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),i8=Wn(v.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),o8=Wn(v.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),s8=Wn(v.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),a8=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],l8=e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root",`color${we(n||r)}`,`${t}${we(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return pt(o,t8,i)},c8=Ee(us,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${we(n.color||n.severity)}`]]}})(({theme:e})=>{const t=e.palette.mode==="light"?Dm:Bm,n=e.palette.mode==="light"?Bm:Dm;return A({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${wk.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${wk.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.dark).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:A({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)})}))]})}),u8=Ee("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),d8=Ee("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),xk=Ee("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),Sk={success:v.jsx(n8,{fontSize:"inherit"}),warning:v.jsx(r8,{fontSize:"inherit"}),error:v.jsx(i8,{fontSize:"inherit"}),info:v.jsx(o8,{fontSize:"inherit"})},f8=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiAlert"}),{action:i,children:o,className:s,closeText:a="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:f=Sk,onClose:m,role:h="alert",severity:g="success",slotProps:E={},slots:b={},variant:w="standard"}=r,y=Ie(r,a8),_=A({},r,{color:l,severity:g,variant:w,colorSeverity:l||g}),k=l8(_),R={slots:A({closeButton:c.CloseButton,closeIcon:c.CloseIcon},b),slotProps:A({},u,E)},[P,I]=h1("closeButton",{elementType:Fo,externalForwardedProps:R,ownerState:_}),[$,L]=h1("closeIcon",{elementType:s8,externalForwardedProps:R,ownerState:_});return v.jsxs(c8,A({role:h,elevation:0,ownerState:_,className:De(k.root,s),ref:n},y,{children:[d!==!1?v.jsx(u8,{ownerState:_,className:k.icon,children:d||f[g]||Sk[g]}):null,v.jsx(d8,{ownerState:_,className:k.message,children:o}),i!=null?v.jsx(xk,{ownerState:_,className:k.action,children:i}):null,i==null&&m?v.jsx(xk,{ownerState:_,className:k.action,children:v.jsx(P,A({size:"small","aria-label":a,title:a,color:"inherit",onClick:m},I,{children:v.jsx($,A({fontSize:"small"},L))}))}):null]}))});function p8(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,o=SO({badgeContent:t,max:r});let s=n;n===!1&&t===0&&!i&&(s=!0);const{badgeContent:a,max:l=r}=s?o:e,c=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:c}}const DO="base";function h8(e){return`${DO}--${e}`}function m8(e,t){return`${DO}-${e}-${t}`}function BO(e,t){const n=cO[t];return n?h8(n):m8(e,t)}function g8(e,t){const n={};return t.forEach(r=>{n[r]=BO(e,r)}),n}function _k(e){return e.substring(2).toLowerCase()}function v8(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=un(t.ref,a),d=Yi(h=>{const g=c.current;c.current=!1;const E=qn(a.current);if(!l.current||!a.current||"clientX"in h&&v8(h,E))return;if(s.current){s.current=!1;return}let b;h.composedPath?b=h.composedPath().indexOf(a.current)>-1:b=!E.documentElement.contains(h.target)||a.current.contains(h.target),!b&&(n||!g)&&i(h)}),f=h=>g=>{c.current=!0;const E=t.props[h];E&&E(g)},m={ref:u};return o!==!1&&(m[o]=f(o)),C.useEffect(()=>{if(o!==!1){const h=_k(o),g=qn(a.current),E=()=>{s.current=!0};return g.addEventListener(h,d),g.addEventListener("touchmove",E),()=>{g.removeEventListener(h,d),g.removeEventListener("touchmove",E)}}},[d,o]),r!==!1&&(m[r]=f(r)),C.useEffect(()=>{if(r!==!1){const h=_k(r),g=qn(a.current);return g.addEventListener(h,d),()=>{g.removeEventListener(h,d)}}},[d,r]),v.jsx(C.Fragment,{children:C.cloneElement(t,m)})}var oi="top",no="bottom",ro="right",si="left",Mx="auto",wp=[oi,no,ro,si],Ou="start",Gf="end",b8="clippingParents",FO="viewport",_d="popper",w8="reference",Ck=wp.reduce(function(e,t){return e.concat([t+"-"+Ou,t+"-"+Gf])},[]),zO=[].concat(wp,[Mx]).reduce(function(e,t){return e.concat([t,t+"-"+Ou,t+"-"+Gf])},[]),x8="beforeRead",S8="read",_8="afterRead",C8="beforeMain",k8="main",E8="afterMain",R8="beforeWrite",P8="write",T8="afterWrite",O8=[x8,S8,_8,C8,k8,E8,R8,P8,T8];function as(e){return e?(e.nodeName||"").toLowerCase():null}function Ti(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ql(e){var t=Ti(e).Element;return e instanceof t||e instanceof Element}function Xi(e){var t=Ti(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Nx(e){if(typeof ShadowRoot>"u")return!1;var t=Ti(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function j8(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Xi(o)||!as(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function L8(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!Xi(i)||!as(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const I8={name:"applyStyles",enabled:!0,phase:"write",fn:j8,effect:L8,requires:["computeStyles"]};function os(e){return e.split("-")[0]}var Ml=Math.max,Hm=Math.min,ju=Math.round;function m1(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function UO(){return!/^((?!chrome|android).)*safari/i.test(m1())}function Lu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Xi(e)&&(i=e.offsetWidth>0&&ju(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ju(r.height)/e.offsetHeight||1);var s=ql(e)?Ti(e):window,a=s.visualViewport,l=!UO()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/o,d=r.width/i,f=r.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function $x(e){var t=Lu(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function WO(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Nx(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function zs(e){return Ti(e).getComputedStyle(e)}function M8(e){return["table","td","th"].indexOf(as(e))>=0}function Ya(e){return((ql(e)?e.ownerDocument:e.document)||window.document).documentElement}function Av(e){return as(e)==="html"?e:e.assignedSlot||e.parentNode||(Nx(e)?e.host:null)||Ya(e)}function kk(e){return!Xi(e)||zs(e).position==="fixed"?null:e.offsetParent}function N8(e){var t=/firefox/i.test(m1()),n=/Trident/i.test(m1());if(n&&Xi(e)){var r=zs(e);if(r.position==="fixed")return null}var i=Av(e);for(Nx(i)&&(i=i.host);Xi(i)&&["html","body"].indexOf(as(i))<0;){var o=zs(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function xp(e){for(var t=Ti(e),n=kk(e);n&&M8(n)&&zs(n).position==="static";)n=kk(n);return n&&(as(n)==="html"||as(n)==="body"&&zs(n).position==="static")?t:n||N8(e)||t}function Ax(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function of(e,t,n){return Ml(e,Hm(t,n))}function $8(e,t,n){var r=of(e,t,n);return r>n?n:r}function GO(){return{top:0,right:0,bottom:0,left:0}}function HO(e){return Object.assign({},GO(),e)}function VO(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var A8=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,HO(typeof t!="number"?t:VO(t,wp))};function D8(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=os(n.placement),l=Ax(a),c=[si,ro].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var d=A8(i.padding,n),f=$x(o),m=l==="y"?oi:si,h=l==="y"?no:ro,g=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],E=s[l]-n.rects.reference[l],b=xp(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,y=g/2-E/2,_=d[m],k=w-f[u]-d[h],R=w/2-f[u]/2+y,P=of(_,R,k),I=l;n.modifiersData[r]=(t={},t[I]=P,t.centerOffset=P-R,t)}}function B8(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||WO(t.elements.popper,i)&&(t.elements.arrow=i))}const F8={name:"arrow",enabled:!0,phase:"main",fn:D8,effect:B8,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Iu(e){return e.split("-")[1]}var z8={top:"auto",right:"auto",bottom:"auto",left:"auto"};function U8(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:ju(n*i)/i||0,y:ju(r*i)/i||0}}function Ek(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=s.x,m=f===void 0?0:f,h=s.y,g=h===void 0?0:h,E=typeof u=="function"?u({x:m,y:g}):{x:m,y:g};m=E.x,g=E.y;var b=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),y=si,_=oi,k=window;if(c){var R=xp(n),P="clientHeight",I="clientWidth";if(R===Ti(n)&&(R=Ya(n),zs(R).position!=="static"&&a==="absolute"&&(P="scrollHeight",I="scrollWidth")),R=R,i===oi||(i===si||i===ro)&&o===Gf){_=no;var $=d&&R===k&&k.visualViewport?k.visualViewport.height:R[P];g-=$-r.height,g*=l?1:-1}if(i===si||(i===oi||i===no)&&o===Gf){y=ro;var L=d&&R===k&&k.visualViewport?k.visualViewport.width:R[I];m-=L-r.width,m*=l?1:-1}}var N=Object.assign({position:a},c&&z8),F=u===!0?U8({x:m,y:g},Ti(n)):{x:m,y:g};if(m=F.x,g=F.y,l){var z;return Object.assign({},N,(z={},z[_]=w?"0":"",z[y]=b?"0":"",z.transform=(k.devicePixelRatio||1)<=1?"translate("+m+"px, "+g+"px)":"translate3d("+m+"px, "+g+"px, 0)",z))}return Object.assign({},N,(t={},t[_]=w?g+"px":"",t[y]=b?m+"px":"",t.transform="",t))}function W8(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:os(t.placement),variation:Iu(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ek(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ek(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const G8={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:W8,data:{}};var vh={passive:!0};function H8(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=Ti(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,vh)}),a&&l.addEventListener("resize",n.update,vh),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,vh)}),a&&l.removeEventListener("resize",n.update,vh)}}const V8={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:H8,data:{}};var K8={left:"right",right:"left",bottom:"top",top:"bottom"};function Zh(e){return e.replace(/left|right|bottom|top/g,function(t){return K8[t]})}var q8={start:"end",end:"start"};function Rk(e){return e.replace(/start|end/g,function(t){return q8[t]})}function Dx(e){var t=Ti(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Bx(e){return Lu(Ya(e)).left+Dx(e).scrollLeft}function Y8(e,t){var n=Ti(e),r=Ya(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=UO();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Bx(e),y:l}}function Q8(e){var t,n=Ya(e),r=Dx(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ml(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Ml(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Bx(e),l=-r.scrollTop;return zs(i||n).direction==="rtl"&&(a+=Ml(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Fx(e){var t=zs(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function KO(e){return["html","body","#document"].indexOf(as(e))>=0?e.ownerDocument.body:Xi(e)&&Fx(e)?e:KO(Av(e))}function sf(e,t){var n;t===void 0&&(t=[]);var r=KO(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ti(r),s=i?[o].concat(o.visualViewport||[],Fx(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(sf(Av(s)))}function g1(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function X8(e,t){var n=Lu(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Pk(e,t,n){return t===FO?g1(Y8(e,n)):ql(t)?X8(t,n):g1(Q8(Ya(e)))}function J8(e){var t=sf(Av(e)),n=["absolute","fixed"].indexOf(zs(e).position)>=0,r=n&&Xi(e)?xp(e):e;return ql(r)?t.filter(function(i){return ql(i)&&WO(i,r)&&as(i)!=="body"}):[]}function Z8(e,t,n,r){var i=t==="clippingParents"?J8(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var u=Pk(e,c,r);return l.top=Ml(u.top,l.top),l.right=Hm(u.right,l.right),l.bottom=Hm(u.bottom,l.bottom),l.left=Ml(u.left,l.left),l},Pk(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function qO(e){var t=e.reference,n=e.element,r=e.placement,i=r?os(r):null,o=r?Iu(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case oi:l={x:s,y:t.y-n.height};break;case no:l={x:s,y:t.y+t.height};break;case ro:l={x:t.x+t.width,y:a};break;case si:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?Ax(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Ou:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Gf:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Hf(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?b8:a,c=n.rootBoundary,u=c===void 0?FO:c,d=n.elementContext,f=d===void 0?_d:d,m=n.altBoundary,h=m===void 0?!1:m,g=n.padding,E=g===void 0?0:g,b=HO(typeof E!="number"?E:VO(E,wp)),w=f===_d?w8:_d,y=e.rects.popper,_=e.elements[h?w:f],k=Z8(ql(_)?_:_.contextElement||Ya(e.elements.popper),l,u,s),R=Lu(e.elements.reference),P=qO({reference:R,element:y,strategy:"absolute",placement:i}),I=g1(Object.assign({},y,P)),$=f===_d?I:R,L={top:k.top-$.top+b.top,bottom:$.bottom-k.bottom+b.bottom,left:k.left-$.left+b.left,right:$.right-k.right+b.right},N=e.modifiersData.offset;if(f===_d&&N){var F=N[i];Object.keys(L).forEach(function(z){var K=[ro,no].indexOf(z)>=0?1:-1,Z=[oi,no].indexOf(z)>=0?"y":"x";L[z]+=F[Z]*K})}return L}function eU(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?zO:l,u=Iu(r),d=u?a?Ck:Ck.filter(function(h){return Iu(h)===u}):wp,f=d.filter(function(h){return c.indexOf(h)>=0});f.length===0&&(f=d);var m=f.reduce(function(h,g){return h[g]=Hf(e,{placement:g,boundary:i,rootBoundary:o,padding:s})[os(g)],h},{});return Object.keys(m).sort(function(h,g){return m[h]-m[g]})}function tU(e){if(os(e)===Mx)return[];var t=Zh(e);return[Rk(e),t,Rk(t)]}function nU(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,m=n.flipVariations,h=m===void 0?!0:m,g=n.allowedAutoPlacements,E=t.options.placement,b=os(E),w=b===E,y=l||(w||!h?[Zh(E)]:tU(E)),_=[E].concat(y).reduce(function(_e,Ve){return _e.concat(os(Ve)===Mx?eU(t,{placement:Ve,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:g}):Ve)},[]),k=t.rects.reference,R=t.rects.popper,P=new Map,I=!0,$=_[0],L=0;L<_.length;L++){var N=_[L],F=os(N),z=Iu(N)===Ou,K=[oi,no].indexOf(F)>=0,Z=K?"width":"height",le=Hf(t,{placement:N,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),ce=K?z?ro:si:z?no:oi;k[Z]>R[Z]&&(ce=Zh(ce));var H=Zh(ce),V=[];if(o&&V.push(le[F]<=0),a&&V.push(le[ce]<=0,le[H]<=0),V.every(function(_e){return _e})){$=N,I=!1;break}P.set(N,V)}if(I)for(var se=h?3:1,je=function(Ve){var Pe=_.find(function(ct){var ft=P.get(ct);if(ft)return ft.slice(0,Ve).every(function(Te){return Te})});if(Pe)return $=Pe,"break"},Ge=se;Ge>0;Ge--){var Le=je(Ge);if(Le==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const rU={name:"flip",enabled:!0,phase:"main",fn:nU,requiresIfExists:["offset"],data:{_skip:!1}};function Tk(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ok(e){return[oi,ro,no,si].some(function(t){return e[t]>=0})}function iU(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Hf(t,{elementContext:"reference"}),a=Hf(t,{altBoundary:!0}),l=Tk(s,r),c=Tk(a,i,o),u=Ok(l),d=Ok(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const oU={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:iU};function sU(e,t,n){var r=os(e),i=[si,oi].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[si,ro].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function aU(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=zO.reduce(function(u,d){return u[d]=sU(d,t.rects,o),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const lU={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:aU};function cU(e){var t=e.state,n=e.name;t.modifiersData[n]=qO({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const uU={name:"popperOffsets",enabled:!0,phase:"read",fn:cU,data:{}};function dU(e){return e==="x"?"y":"x"}function fU(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,m=f===void 0?!0:f,h=n.tetherOffset,g=h===void 0?0:h,E=Hf(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=os(t.placement),w=Iu(t.placement),y=!w,_=Ax(b),k=dU(_),R=t.modifiersData.popperOffsets,P=t.rects.reference,I=t.rects.popper,$=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,L=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(R){if(o){var z,K=_==="y"?oi:si,Z=_==="y"?no:ro,le=_==="y"?"height":"width",ce=R[_],H=ce+E[K],V=ce-E[Z],se=m?-I[le]/2:0,je=w===Ou?P[le]:I[le],Ge=w===Ou?-I[le]:-P[le],Le=t.elements.arrow,_e=m&&Le?$x(Le):{width:0,height:0},Ve=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:GO(),Pe=Ve[K],ct=Ve[Z],ft=of(0,P[le],_e[le]),Te=y?P[le]/2-se-ft-Pe-L.mainAxis:je-ft-Pe-L.mainAxis,Tt=y?-P[le]/2+se+ft+ct+L.mainAxis:Ge+ft+ct+L.mainAxis,ut=t.elements.arrow&&xp(t.elements.arrow),ze=ut?_==="y"?ut.clientTop||0:ut.clientLeft||0:0,Ze=(z=N==null?void 0:N[_])!=null?z:0,yt=ce+Te-Ze-ze,ee=ce+Tt-Ze,me=of(m?Hm(H,yt):H,ce,m?Ml(V,ee):V);R[_]=me,F[_]=me-ce}if(a){var Ce,Ue=_==="x"?oi:si,W=_==="x"?no:ro,S=R[k],O=k==="y"?"height":"width",D=S+E[Ue],q=S-E[W],X=[oi,si].indexOf(b)!==-1,pe=(Ce=N==null?void 0:N[k])!=null?Ce:0,Fe=X?D:S-P[O]-I[O]-pe+L.altAxis,rt=X?S+P[O]+I[O]-pe-L.altAxis:q,Xe=m&&X?$8(Fe,S,rt):of(m?Fe:D,S,m?rt:q);R[k]=Xe,F[k]=Xe-S}t.modifiersData[r]=F}}const pU={name:"preventOverflow",enabled:!0,phase:"main",fn:fU,requiresIfExists:["offset"]};function hU(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function mU(e){return e===Ti(e)||!Xi(e)?Dx(e):hU(e)}function gU(e){var t=e.getBoundingClientRect(),n=ju(t.width)/e.offsetWidth||1,r=ju(t.height)/e.offsetHeight||1;return n!==1||r!==1}function vU(e,t,n){n===void 0&&(n=!1);var r=Xi(t),i=Xi(t)&&gU(t),o=Ya(t),s=Lu(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((as(t)!=="body"||Fx(o))&&(a=mU(t)),Xi(t)?(l=Lu(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Bx(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function yU(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function bU(e){var t=yU(e);return O8.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function wU(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function xU(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var jk={placement:"bottom",modifiers:[],strategy:"absolute"};function Lk(){for(var e=arguments.length,t=new Array(e),n=0;npt({root:["root"]},s6(kU)),jU={},LU=C.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:a,modifiers:l,open:c,placement:u,popperOptions:d,popperRef:f,slotProps:m={},slots:h={},TransitionProps:g}=t,E=Ie(t,EU),b=C.useRef(null),w=un(b,n),y=C.useRef(null),_=un(y,f),k=C.useRef(_);li(()=>{k.current=_},[_]),C.useImperativeHandle(f,()=>y.current,[]);const R=PU(u,s),[P,I]=C.useState(R),[$,L]=C.useState(v1(i));C.useEffect(()=>{y.current&&y.current.forceUpdate()}),C.useEffect(()=>{i&&L(v1(i))},[i]),li(()=>{if(!$||!c)return;const Z=H=>{I(H.placement)};let le=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:H})=>{Z(H)}}];l!=null&&(le=le.concat(l)),d&&d.modifiers!=null&&(le=le.concat(d.modifiers));const ce=CU($,b.current,A({placement:R},d,{modifiers:le}));return k.current(ce),()=>{ce.destroy(),k.current(null)}},[$,a,l,c,d,R]);const N={placement:P};g!==null&&(N.TransitionProps=g);const F=OU(),z=(r=h.root)!=null?r:"div",K=Ao({elementType:z,externalSlotProps:m.root,externalForwardedProps:E,additionalProps:{role:"tooltip",ref:w},ownerState:t,className:F.root});return v.jsx(z,A({},K,{children:typeof o=="function"?o(N):o}))}),IU=C.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=jU,popperRef:m,style:h,transition:g=!1,slotProps:E={},slots:b={}}=t,w=Ie(t,RU),[y,_]=C.useState(!0),k=()=>{_(!1)},R=()=>{_(!0)};if(!l&&!u&&(!g||y))return null;let P;if(o)P=o;else if(r){const L=v1(r);P=L&&TU(L)?qn(L).body:qn(null).body}const I=!u&&l&&(!g||y)?"none":void 0,$=g?{in:u,onEnter:k,onExited:R}:void 0;return v.jsx(Ox,{disablePortal:a,container:P,children:v.jsx(LU,A({anchorEl:r,direction:s,disablePortal:a,modifiers:c,ref:n,open:g?!y:u,placement:d,popperOptions:f,popperRef:m,slotProps:E,slots:b},w,{style:A({position:"fixed",top:0,left:0,display:I},h),TransitionProps:$,children:i}))})});function MU(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=Sa();C.useEffect(()=>{if(!i)return;function b(w){w.defaultPrevented||(w.key==="Escape"||w.key==="Esc")&&(r==null||r(w,"escapeKeyDown"))}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i,r]);const a=Yi((b,w)=>{r==null||r(b,w)}),l=Yi(b=>{!r||b==null||s.start(b,()=>{a(null,"timeout")})});C.useEffect(()=>(i&&l(t),s.clear),[i,t,l,s]);const c=b=>{r==null||r(b,"clickaway")},u=s.clear,d=C.useCallback(()=>{t!=null&&l(o??t*.5)},[t,o,l]),f=b=>w=>{const y=b.onBlur;y==null||y(w),d()},m=b=>w=>{const y=b.onFocus;y==null||y(w),u()},h=b=>w=>{const y=b.onMouseEnter;y==null||y(w),u()},g=b=>w=>{const y=b.onMouseLeave;y==null||y(w),d()};return C.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,i,d,u]),{getRootProps:(b={})=>{const w=A({},Wm(e),Wm(b));return A({role:"presentation"},b,w,{onBlur:f(w),onFocus:m(w),onMouseEnter:h(w),onMouseLeave:g(w)})},onClickAway:c}}const NU=["onChange","maxRows","minRows","style","value"];function yh(e){return parseInt(e,10)||0}const $U={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function AU(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const DU=C.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=t,l=Ie(t,NU),{current:c}=C.useRef(a!=null),u=C.useRef(null),d=un(n,u),f=C.useRef(null),m=C.useCallback(()=>{const E=u.current,w=ss(E).getComputedStyle(E);if(w.width==="0px")return{outerHeightStyle:0,overflowing:!1};const y=f.current;y.style.width=w.width,y.value=E.value||t.placeholder||"x",y.value.slice(-1)===` -`&&(y.value+=" ");const _=w.boxSizing,k=yh(w.paddingBottom)+yh(w.paddingTop),R=yh(w.borderBottomWidth)+yh(w.borderTopWidth),P=y.scrollHeight;y.value="x";const I=y.scrollHeight;let $=P;o&&($=Math.max(Number(o)*I,$)),i&&($=Math.min(Number(i)*I,$)),$=Math.max($,I);const L=$+(_==="border-box"?k+R:0),N=Math.abs($-P)<=1;return{outerHeightStyle:L,overflowing:N}},[i,o,t.placeholder]),h=C.useCallback(()=>{const E=m();if(AU(E))return;const b=u.current;b.style.height=`${E.outerHeightStyle}px`,b.style.overflow=E.overflowing?"hidden":""},[m]);li(()=>{const E=()=>{h()};let b;const w=Cv(E),y=u.current,_=ss(y);_.addEventListener("resize",w);let k;return typeof ResizeObserver<"u"&&(k=new ResizeObserver(E),k.observe(y)),()=>{w.clear(),cancelAnimationFrame(b),_.removeEventListener("resize",w),k&&k.disconnect()}},[m,h]),li(()=>{h()});const g=E=>{c||h(),r&&r(E)};return v.jsxs(C.Fragment,{children:[v.jsx("textarea",A({value:a,onChange:g,ref:d,rows:o,style:s},l)),v.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:f,tabIndex:-1,style:A({},$U.shadow,s,{paddingTop:0,paddingBottom:0})})]})});var zx={};Object.defineProperty(zx,"__esModule",{value:!0});var QO=zx.default=void 0,BU=zU(C),FU=QT;function XO(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(XO=function(r){return r?n:t})(e)}function zU(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=XO(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function UU(e){return Object.keys(e).length===0}function WU(e=null){const t=BU.useContext(FU.ThemeContext);return!t||UU(t)?e:t}QO=zx.default=WU;const GU=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],HU=Ee(IU,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),JO=C.forwardRef(function(t,n){var r;const i=QO(),o=mt({props:t,name:"MuiPopper"}),{anchorEl:s,component:a,components:l,componentsProps:c,container:u,disablePortal:d,keepMounted:f,modifiers:m,open:h,placement:g,popperOptions:E,popperRef:b,transition:w,slots:y,slotProps:_}=o,k=Ie(o,GU),R=(r=y==null?void 0:y.root)!=null?r:l==null?void 0:l.Root,P=A({anchorEl:s,container:u,disablePortal:d,keepMounted:f,modifiers:m,open:h,placement:g,popperOptions:E,popperRef:b,transition:w},k);return v.jsx(HU,A({as:a,direction:i==null?void 0:i.direction,slots:{root:R},slotProps:_??c},P,{ref:n}))});function VU(e){return ht("MuiListSubheader",e)}gt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const KU=["className","color","component","disableGutters","disableSticky","inset"],qU=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${we(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return pt(s,VU,t)},YU=Ee("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${we(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>A({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),ZO=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:a=!1,disableSticky:l=!1,inset:c=!1}=r,u=Ie(r,KU),d=A({},r,{color:o,component:s,disableGutters:a,disableSticky:l,inset:c}),f=qU(d);return v.jsx(YU,A({as:s,className:De(f.root,i),ref:n,ownerState:d},u))});ZO.muiSkipListHighlight=!0;const QU=Wn(v.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function XU(e){return ht("MuiChip",e)}const Wt=gt("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),JU=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],ZU=e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:s,clickable:a,variant:l}=e,c={root:["root",l,n&&"disabled",`size${we(r)}`,`color${we(i)}`,a&&"clickable",a&&`clickableColor${we(i)}`,s&&"deletable",s&&`deletableColor${we(i)}`,`${l}${we(i)}`],label:["label",`label${we(r)}`],avatar:["avatar",`avatar${we(r)}`,`avatarColor${we(i)}`],icon:["icon",`icon${we(r)}`,`iconColor${we(o)}`],deleteIcon:["deleteIcon",`deleteIcon${we(r)}`,`deleteIconColor${we(i)}`,`deleteIcon${we(l)}Color${we(i)}`]};return pt(c,XU,t)},e9=Ee("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:s,size:a,variant:l}=n;return[{[`& .${Wt.avatar}`]:t.avatar},{[`& .${Wt.avatar}`]:t[`avatar${we(a)}`]},{[`& .${Wt.avatar}`]:t[`avatarColor${we(r)}`]},{[`& .${Wt.icon}`]:t.icon},{[`& .${Wt.icon}`]:t[`icon${we(a)}`]},{[`& .${Wt.icon}`]:t[`iconColor${we(i)}`]},{[`& .${Wt.deleteIcon}`]:t.deleteIcon},{[`& .${Wt.deleteIcon}`]:t[`deleteIcon${we(a)}`]},{[`& .${Wt.deleteIcon}`]:t[`deleteIconColor${we(r)}`]},{[`& .${Wt.deleteIcon}`]:t[`deleteIcon${we(l)}Color${we(r)}`]},t.root,t[`size${we(a)}`],t[`color${we(r)}`],o&&t.clickable,o&&r!=="default"&&t[`clickableColor${we(r)})`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${we(r)}`],t[l],t[`${l}${we(r)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return A({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Wt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Wt.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${Wt.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Wt.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Wt.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Wt.icon}`]:A({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&A({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},t.color!=="default"&&{color:"inherit"})),[`& .${Wt.deleteIcon}`]:A({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:At(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:At(e.palette.text.primary,.4)}},t.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},t.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:At(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},t.size==="small"&&{height:24},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${Wt.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:At(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${Wt.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>A({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:At(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Wt.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:At(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&t.color!=="default"&&{[`&:hover, &.${Wt.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>A({},t.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Wt.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Wt.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Wt.avatar}`]:{marginLeft:4},[`& .${Wt.avatarSmall}`]:{marginLeft:2},[`& .${Wt.icon}`]:{marginLeft:4},[`& .${Wt.iconSmall}`]:{marginLeft:2},[`& .${Wt.deleteIcon}`]:{marginRight:5},[`& .${Wt.deleteIconSmall}`]:{marginRight:3}},t.variant==="outlined"&&t.color!=="default"&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:At(e.palette[t.color].main,.7)}`,[`&.${Wt.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Wt.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:At(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Wt.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:At(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),t9=Ee("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${we(r)}`]]}})(({ownerState:e})=>A({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function Ik(e){return e.key==="Backspace"||e.key==="Delete"}const Ux=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiChip"}),{avatar:i,className:o,clickable:s,color:a="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:f,onClick:m,onDelete:h,onKeyDown:g,onKeyUp:E,size:b="medium",variant:w="filled",tabIndex:y,skipFocusWhenDisabled:_=!1}=r,k=Ie(r,JU),R=C.useRef(null),P=un(R,n),I=V=>{V.stopPropagation(),h&&h(V)},$=V=>{V.currentTarget===V.target&&Ik(V)&&V.preventDefault(),g&&g(V)},L=V=>{V.currentTarget===V.target&&(h&&Ik(V)?h(V):V.key==="Escape"&&R.current&&R.current.blur()),E&&E(V)},N=s!==!1&&m?!0:s,F=N||h?$o:l||"div",z=A({},r,{component:F,disabled:u,size:b,color:a,iconColor:C.isValidElement(d)&&d.props.color||a,onDelete:!!h,clickable:N,variant:w}),K=ZU(z),Z=F===$o?A({component:l||"div",focusVisibleClassName:K.focusVisible},h&&{disableRipple:!0}):{};let le=null;h&&(le=c&&C.isValidElement(c)?C.cloneElement(c,{className:De(c.props.className,K.deleteIcon),onClick:I}):v.jsx(QU,{className:De(K.deleteIcon),onClick:I}));let ce=null;i&&C.isValidElement(i)&&(ce=C.cloneElement(i,{className:De(K.avatar,i.props.className)}));let H=null;return d&&C.isValidElement(d)&&(H=C.cloneElement(d,{className:De(K.icon,d.props.className)})),v.jsxs(e9,A({as:F,className:De(K.root,o),disabled:N&&u?!0:void 0,onClick:m,onKeyDown:$,onKeyUp:L,ref:P,tabIndex:_&&u?-1:y,ownerState:z},Z,k,{children:[ce||H,v.jsx(t9,{className:De(K.label),ownerState:z,children:f}),le]}))});function lc({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const Wx=C.createContext(void 0);function Qa(){return C.useContext(Wx)}function ej(e){return v.jsx(b3,A({},e,{defaultTheme:_x,themeId:Ru}))}function Mk(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Vm(e,t=!1){return e&&(Mk(e.value)&&e.value!==""||t&&Mk(e.defaultValue)&&e.defaultValue!=="")}function n9(e){return e.startAdornment}function r9(e){return ht("MuiInputBase",e)}const Mu=gt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),i9=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Dv=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${we(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Bv=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},o9=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:m,type:h}=e,g={root:["root",`color${we(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",f&&f!=="medium"&&`size${we(f)}`,u&&"multiline",m&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",h==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return pt(g,r9,t)},Fv=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Dv})(({theme:e,ownerState:t})=>A({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Mu.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&A({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),zv=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Bv})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=A({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),i={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return A({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Mu.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Mu.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),s9=v.jsx(ej,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),a9=C.forwardRef(function(t,n){var r;const i=mt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:m,endAdornment:h,fullWidth:g=!1,id:E,inputComponent:b="input",inputProps:w={},inputRef:y,maxRows:_,minRows:k,multiline:R=!1,name:P,onBlur:I,onChange:$,onClick:L,onFocus:N,onKeyDown:F,onKeyUp:z,placeholder:K,readOnly:Z,renderSuffix:le,rows:ce,slotProps:H={},slots:V={},startAdornment:se,type:je="text",value:Ge}=i,Le=Ie(i,i9),_e=w.value!=null?w.value:Ge,{current:Ve}=C.useRef(_e!=null),Pe=C.useRef(),ct=C.useCallback(Xe=>{},[]),ft=un(Pe,y,w.ref,ct),[Te,Tt]=C.useState(!1),ut=Qa(),ze=lc({props:i,muiFormControl:ut,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ze.focused=ut?ut.focused:Te,C.useEffect(()=>{!ut&&f&&Te&&(Tt(!1),I&&I())},[ut,f,Te,I]);const Ze=ut&&ut.onFilled,yt=ut&&ut.onEmpty,ee=C.useCallback(Xe=>{Vm(Xe)?Ze&&Ze():yt&&yt()},[Ze,yt]);li(()=>{Ve&&ee({value:_e})},[_e,ee,Ve]);const me=Xe=>{if(ze.disabled){Xe.stopPropagation();return}N&&N(Xe),w.onFocus&&w.onFocus(Xe),ut&&ut.onFocus?ut.onFocus(Xe):Tt(!0)},Ce=Xe=>{I&&I(Xe),w.onBlur&&w.onBlur(Xe),ut&&ut.onBlur?ut.onBlur(Xe):Tt(!1)},Ue=(Xe,...Oe)=>{if(!Ve){const et=Xe.target||Pe.current;if(et==null)throw new Error(Vl(1));ee({value:et.value})}w.onChange&&w.onChange(Xe,...Oe),$&&$(Xe,...Oe)};C.useEffect(()=>{ee(Pe.current)},[]);const W=Xe=>{Pe.current&&Xe.currentTarget===Xe.target&&Pe.current.focus(),L&&L(Xe)};let S=b,O=w;R&&S==="input"&&(ce?O=A({type:void 0,minRows:ce,maxRows:ce},O):O=A({type:void 0,maxRows:_,minRows:k},O),S=DU);const D=Xe=>{ee(Xe.animationName==="mui-auto-fill-cancel"?Pe.current:{value:"x"})};C.useEffect(()=>{ut&&ut.setAdornedStart(!!se)},[ut,se]);const q=A({},i,{color:ze.color||"primary",disabled:ze.disabled,endAdornment:h,error:ze.error,focused:ze.focused,formControl:ut,fullWidth:g,hiddenLabel:ze.hiddenLabel,multiline:R,size:ze.size,startAdornment:se,type:je}),X=o9(q),pe=V.root||c.Root||Fv,Fe=H.root||u.root||{},rt=V.input||c.Input||zv;return O=A({},O,(r=H.input)!=null?r:u.input),v.jsxs(C.Fragment,{children:[!m&&s9,v.jsxs(pe,A({},Fe,!Tu(pe)&&{ownerState:A({},q,Fe.ownerState)},{ref:n,onClick:W},Le,{className:De(X.root,Fe.className,l,Z&&"MuiInputBase-readOnly"),children:[se,v.jsx(Wx.Provider,{value:null,children:v.jsx(rt,A({ownerState:q,"aria-invalid":ze.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:d,disabled:ze.disabled,id:E,onAnimationStart:D,name:P,placeholder:K,readOnly:Z,required:ze.required,rows:ce,value:_e,onKeyDown:F,onKeyUp:z,type:je},O,!Tu(rt)&&{as:S,ownerState:A({},q,O.ownerState)},{ref:ft,className:De(X.input,O.className,Z&&"MuiInputBase-readOnly"),onBlur:Ce,onChange:Ue,onFocus:me}))}),h,le?le(A({},ze,{startAdornment:se})):null]}))]})}),Gx=a9;function l9(e){return ht("MuiInput",e)}const Cd=A({},Mu,gt("MuiInput",["root","underline","input"]));function c9(e){return ht("MuiOutlinedInput",e)}const ca=A({},Mu,gt("MuiOutlinedInput",["root","notchedOutline","input"]));function u9(e){return ht("MuiFilledInput",e)}const dl=A({},Mu,gt("MuiFilledInput",["root","underline","input"])),d9=Wn(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function f9(e){return ht("MuiBadge",e)}const ua=gt("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),p9=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],f0=10,p0=4,h9=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:i,variant:o,classes:s={}}=e,a={root:["root"],badge:["badge",o,r&&"invisible",`anchorOrigin${we(n.vertical)}${we(n.horizontal)}`,`anchorOrigin${we(n.vertical)}${we(n.horizontal)}${we(i)}`,`overlap${we(i)}`,t!=="default"&&`color${we(t)}`]};return pt(a,f9,s)},m9=Ee("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),g9=Ee("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${we(n.anchorOrigin.vertical)}${we(n.anchorOrigin.horizontal)}${we(n.overlap)}`],n.color!=="default"&&t[`color${we(n.color)}`],n.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:f0*2,lineHeight:1,padding:"0 6px",height:f0*2,borderRadius:f0,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r,i;return((r=e.vars)!=null?r:e).palette[n].main&&((i=e.vars)!=null?i:e).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:p0,height:p0*2,minWidth:p0*2,padding:0}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),v9=C.forwardRef(function(t,n){var r,i,o,s,a,l;const c=mt({props:t,name:"MuiBadge"}),{anchorOrigin:u={vertical:"top",horizontal:"right"},className:d,component:f,components:m={},componentsProps:h={},children:g,overlap:E="rectangular",color:b="default",invisible:w=!1,max:y=99,badgeContent:_,slots:k,slotProps:R,showZero:P=!1,variant:I="standard"}=c,$=Ie(c,p9),{badgeContent:L,invisible:N,max:F,displayValue:z}=p8({max:y,invisible:w,badgeContent:_,showZero:P}),K=SO({anchorOrigin:u,color:b,overlap:E,variant:I,badgeContent:_}),Z=N||L==null&&I!=="dot",{color:le=b,overlap:ce=E,anchorOrigin:H=u,variant:V=I}=Z?K:c,se=V!=="dot"?z:void 0,je=A({},c,{badgeContent:L,invisible:Z,max:F,displayValue:se,showZero:P,anchorOrigin:H,color:le,overlap:ce,variant:V}),Ge=h9(je),Le=(r=(i=k==null?void 0:k.root)!=null?i:m.Root)!=null?r:m9,_e=(o=(s=k==null?void 0:k.badge)!=null?s:m.Badge)!=null?o:g9,Ve=(a=R==null?void 0:R.root)!=null?a:h.root,Pe=(l=R==null?void 0:R.badge)!=null?l:h.badge,ct=Ao({elementType:Le,externalSlotProps:Ve,externalForwardedProps:$,additionalProps:{ref:n,as:f},ownerState:je,className:De(Ve==null?void 0:Ve.className,Ge.root,d)}),ft=Ao({elementType:_e,externalSlotProps:Pe,ownerState:je,className:De(Ge.badge,Pe==null?void 0:Pe.className)});return v.jsxs(Le,A({},ct,{children:[g,v.jsx(_e,A({},ft,{children:se}))]}))}),y9=gt("MuiBox",["root"]),b9=Sx(),rn=x3({themeId:Ru,defaultTheme:b9,defaultClassName:y9.root,generateClassName:yx.generate}),w9=Wn(v.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),x9=["slots","slotProps"],S9=Ee($o)(({theme:e})=>A({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":A({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":A({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:l1(e.palette.grey[200],.12)}:{backgroundColor:l1(e.palette.grey[600],.12)})})),_9=Ee(w9)({width:24,height:16});function C9(e){const{slots:t={},slotProps:n={}}=e,r=Ie(e,x9),i=e;return v.jsx("li",{children:v.jsx(S9,A({focusRipple:!0},r,{ownerState:i,children:v.jsx(_9,A({as:t.CollapsedIcon,ownerState:i},n.collapsedIcon))}))})}function k9(e){return ht("MuiBreadcrumbs",e)}const E9=gt("MuiBreadcrumbs",["root","ol","li","separator"]),R9=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],P9=e=>{const{classes:t}=e;return pt({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},k9,t)},T9=Ee(_t,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${E9.li}`]:t.li},t.root]})({}),O9=Ee("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),j9=Ee("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function L9(e,t,n,r){return e.reduce((i,o,s)=>(s{const I=()=>{E(!0);const $=_.current.querySelector("a[href],button,[tabindex]");$&&$.focus()};return d+u>=P.length?P:[...P.slice(0,d),v.jsx(C9,{"aria-label":c,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:y},onClick:I},"ellipsis"),...P.slice(P.length-u,P.length)]},R=C.Children.toArray(i).filter(P=>C.isValidElement(P)).map((P,I)=>v.jsx("li",{className:w.li,children:P},`child-${I}`));return v.jsx(T9,A({ref:n,component:s,color:"text.secondary",className:De(w.root,o),ownerState:b},h,{children:v.jsx(O9,{className:w.ol,ref:_,ownerState:b,children:L9(g||f&&R.length<=f?R:k(R),w.separator,m,b)})}))});function I9(e){return ht("MuiButton",e)}const bh=gt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),tj=C.createContext({}),nj=C.createContext(void 0),M9=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],N9=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,a={root:["root",o,`${o}${we(t)}`,`size${we(i)}`,`${o}Size${we(i)}`,`color${we(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${we(i)}`],endIcon:["icon","endIcon",`iconSize${we(i)}`]},l=pt(a,I9,s);return A({},s,l)},rj=e=>A({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),$9=Ee($o,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${we(n.color)}`],t[`size${we(n.size)}`],t[`${n.variant}Size${we(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],o=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return A({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":A({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":A({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${bh.focusVisible}`]:A({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${bh.disabled}`]:A({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${At(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${bh.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${bh.disabled}`]:{boxShadow:"none"}}),A9=Ee("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${we(n.size)}`]]}})(({ownerState:e})=>A({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},rj(e))),D9=Ee("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${we(n.size)}`]]}})(({ownerState:e})=>A({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},rj(e))),yn=C.forwardRef(function(t,n){const r=C.useContext(tj),i=C.useContext(nj),o=zf(r,t),s=mt({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:m=!1,endIcon:h,focusVisibleClassName:g,fullWidth:E=!1,size:b="medium",startIcon:w,type:y,variant:_="text"}=s,k=Ie(s,M9),R=A({},s,{color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:m,fullWidth:E,size:b,type:y,variant:_}),P=N9(R),I=w&&v.jsx(A9,{className:P.startIcon,ownerState:R,children:w}),$=h&&v.jsx(D9,{className:P.endIcon,ownerState:R,children:h}),L=i||"";return v.jsxs($9,A({ownerState:R,className:De(r.className,P.root,u,L),component:c,disabled:d,focusRipple:!m,focusVisibleClassName:De(P.focusVisible,g),ref:n,type:y},k,{classes:P,children:[I,a,$]}))});function B9(e){return ht("MuiButtonGroup",e)}const ir=gt("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),F9=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],z9=(e,t)=>{const{ownerState:n}=e;return[{[`& .${ir.grouped}`]:t.grouped},{[`& .${ir.grouped}`]:t[`grouped${we(n.orientation)}`]},{[`& .${ir.grouped}`]:t[`grouped${we(n.variant)}`]},{[`& .${ir.grouped}`]:t[`grouped${we(n.variant)}${we(n.orientation)}`]},{[`& .${ir.grouped}`]:t[`grouped${we(n.variant)}${we(n.color)}`]},{[`& .${ir.firstButton}`]:t.firstButton},{[`& .${ir.lastButton}`]:t.lastButton},{[`& .${ir.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},U9=e=>{const{classes:t,color:n,disabled:r,disableElevation:i,fullWidth:o,orientation:s,variant:a}=e,l={root:["root",a,s==="vertical"&&"vertical",o&&"fullWidth",i&&"disableElevation"],grouped:["grouped",`grouped${we(s)}`,`grouped${we(a)}`,`grouped${we(a)}${we(s)}`,`grouped${we(a)}${we(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return pt(l,B9,t)},W9=Ee("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:z9})(({theme:e,ownerState:t})=>A({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[2]},t.disableElevation&&{boxShadow:"none"},t.fullWidth&&{width:"100%"},t.orientation==="vertical"&&{flexDirection:"column"},{[`& .${ir.grouped}`]:A({minWidth:40,"&:hover":A({},t.variant==="contained"&&{boxShadow:"none"})},t.variant==="contained"&&{boxShadow:"none"}),[`& .${ir.firstButton},& .${ir.middleButton}`]:A({},t.orientation==="horizontal"&&{borderTopRightRadius:0,borderBottomRightRadius:0},t.orientation==="vertical"&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},t.variant==="text"&&t.orientation==="horizontal"&&{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ir.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="text"&&t.orientation==="vertical"&&{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ir.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="text"&&t.color!=="inherit"&&{borderColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:At(e.palette[t.color].main,.5)},t.variant==="outlined"&&t.orientation==="horizontal"&&{borderRightColor:"transparent"},t.variant==="outlined"&&t.orientation==="vertical"&&{borderBottomColor:"transparent"},t.variant==="contained"&&t.orientation==="horizontal"&&{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ir.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="contained"&&t.orientation==="vertical"&&{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ir.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="contained"&&t.color!=="inherit"&&{borderColor:(e.vars||e).palette[t.color].dark},{"&:hover":A({},t.variant==="outlined"&&t.orientation==="horizontal"&&{borderRightColor:"currentColor"},t.variant==="outlined"&&t.orientation==="vertical"&&{borderBottomColor:"currentColor"})}),[`& .${ir.lastButton},& .${ir.middleButton}`]:A({},t.orientation==="horizontal"&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t.orientation==="vertical"&&{borderTopRightRadius:0,borderTopLeftRadius:0},t.variant==="outlined"&&t.orientation==="horizontal"&&{marginLeft:-1},t.variant==="outlined"&&t.orientation==="vertical"&&{marginTop:-1})})),Vf=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiButtonGroup"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:f=!1,orientation:m="horizontal",size:h="medium",variant:g="outlined"}=r,E=Ie(r,F9),b=A({},r,{color:s,component:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:m,size:h,variant:g}),w=U9(b),y=C.useMemo(()=>({className:w.grouped,color:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,size:h,variant:g}),[s,l,c,u,d,f,h,g,w.grouped]),_=B3(i),k=_.length,R=P=>{const I=P===0,$=P===k-1;return I&&$?"":I?w.firstButton:$?w.lastButton:w.middleButton};return v.jsx(W9,A({as:a,role:"group",className:De(w.root,o),ref:n,ownerState:b},E,{children:v.jsx(tj.Provider,{value:y,children:_.map((P,I)=>v.jsx(nj.Provider,{value:R(I),children:P},I))})}))});function G9(e){return ht("MuiCard",e)}gt("MuiCard",["root"]);const H9=["className","raised"],V9=e=>{const{classes:t}=e;return pt({root:["root"]},G9,t)},K9=Ee(us,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),ij=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Ie(r,H9),a=A({},r,{raised:o}),l=V9(a);return v.jsx(K9,A({className:De(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))});function q9(e){return ht("PrivateSwitchBase",e)}gt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Y9=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Q9=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${we(i)}`],input:["input"]};return pt(o,q9,t)},X9=Ee($o)(({ownerState:e})=>A({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),J9=Ee("input",{shouldForwardProp:cr})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),oj=C.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:m,inputRef:h,name:g,onBlur:E,onChange:b,onFocus:w,readOnly:y,required:_=!1,tabIndex:k,type:R,value:P}=t,I=Ie(t,Y9),[$,L]=Pu({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),N=Qa(),F=V=>{w&&w(V),N&&N.onFocus&&N.onFocus(V)},z=V=>{E&&E(V),N&&N.onBlur&&N.onBlur(V)},K=V=>{if(V.nativeEvent.defaultPrevented)return;const se=V.target.checked;L(se),b&&b(V,se)};let Z=l;N&&typeof Z>"u"&&(Z=N.disabled);const le=R==="checkbox"||R==="radio",ce=A({},t,{checked:$,disabled:Z,disableFocusRipple:c,edge:u}),H=Q9(ce);return v.jsxs(X9,A({component:"span",className:De(H.root,s),centerRipple:!0,focusRipple:!c,disabled:Z,tabIndex:null,role:void 0,onFocus:F,onBlur:z,ownerState:ce,ref:n},I,{children:[v.jsx(J9,A({autoFocus:r,checked:i,defaultChecked:a,className:H.input,disabled:Z,id:le?f:void 0,name:g,onChange:K,readOnly:y,ref:h,required:_,ownerState:ce,tabIndex:k,type:R},R==="checkbox"&&P===void 0?{}:{value:P},m)),$?o:d]}))}),Z9=Wn(v.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),eW=Wn(v.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),tW=Wn(v.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function nW(e){return ht("MuiCheckbox",e)}const h0=gt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),rW=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],iW=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${we(r)}`,`size${we(i)}`]},s=pt(o,nW,t);return A({},t,s)},oW=Ee(oj,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${we(n.size)}`],n.color!=="default"&&t[`color${we(n.color)}`]]}})(({theme:e,ownerState:t})=>A({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:At(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${h0.checked}, &.${h0.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${h0.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),sW=v.jsx(eW,{}),aW=v.jsx(Z9,{}),lW=v.jsx(tW,{}),Is=C.forwardRef(function(t,n){var r,i;const o=mt({props:t,name:"MuiCheckbox"}),{checkedIcon:s=sW,color:a="primary",icon:l=aW,indeterminate:c=!1,indeterminateIcon:u=lW,inputProps:d,size:f="medium",className:m}=o,h=Ie(o,rW),g=c?u:l,E=c?u:s,b=A({},o,{color:a,indeterminate:c,size:f}),w=iW(b);return v.jsx(oW,A({type:"checkbox",inputProps:A({"data-indeterminate":c},d),icon:C.cloneElement(g,{fontSize:(r=g.props.fontSize)!=null?r:f}),checkedIcon:C.cloneElement(E,{fontSize:(i=E.props.fontSize)!=null?i:f}),ownerState:b,ref:n,className:De(w.root,m)},h,{classes:w}))}),cW=(e,t)=>A({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),uW=e=>A({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),dW=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,a])=>{var l;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let i=A({html:cW(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:A({margin:0},uW(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const o=(n=e.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return o&&(i=[i,o]),i};function fW(e){const t=mt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return v.jsxs(C.Fragment,{children:[v.jsx(ej,{styles:i=>dW(i,r)}),n]})}function pW(e){return ht("MuiDialog",e)}const m0=gt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),sj=C.createContext({}),hW=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],mW=Ee(jO,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),gW=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${we(n)}`],paper:["paper",`paperScroll${we(n)}`,`paperWidth${we(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return pt(s,pW,t)},vW=Ee(Ev,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),yW=Ee("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${we(n.scroll)}`]]}})(({ownerState:e})=>A({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),bW=Ee(us,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${we(n.scroll)}`],t[`paperWidth${we(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>A({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${m0.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${m0.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${m0.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),wW=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiDialog"}),i=Ni(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:m=!1,fullWidth:h=!1,maxWidth:g="sm",onBackdropClick:E,onClick:b,onClose:w,open:y,PaperComponent:_=us,PaperProps:k={},scroll:R="paper",TransitionComponent:P=OO,transitionDuration:I=o,TransitionProps:$}=r,L=Ie(r,hW),N=A({},r,{disableEscapeKeyDown:f,fullScreen:m,fullWidth:h,maxWidth:g,scroll:R}),F=gW(N),z=C.useRef(),K=H=>{z.current=H.target===H.currentTarget},Z=H=>{b&&b(H),z.current&&(z.current=null,E&&E(H),w&&w(H,"backdropClick"))},le=yp(a),ce=C.useMemo(()=>({titleId:le}),[le]);return v.jsx(vW,A({className:De(F.root,d),closeAfterTransition:!0,components:{Backdrop:mW},componentsProps:{backdrop:A({transitionDuration:I,as:l},c)},disableEscapeKeyDown:f,onClose:w,open:y,ref:n,onClick:Z,ownerState:N},L,{children:v.jsx(P,A({appear:!0,in:y,timeout:I,role:"presentation"},$,{children:v.jsx(yW,{className:De(F.container),onMouseDown:K,ownerState:N,children:v.jsx(bW,A({as:_,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":le},k,{className:De(F.paper,k.className),ownerState:N,children:v.jsx(sj.Provider,{value:ce,children:u})}))})}))}))});function xW(e){return ht("MuiDialogContent",e)}gt("MuiDialogContent",["root","dividers"]);function SW(e){return ht("MuiDialogTitle",e)}const _W=gt("MuiDialogTitle",["root"]),CW=["className","dividers"],kW=e=>{const{classes:t,dividers:n}=e;return pt({root:["root",n&&"dividers"]},xW,t)},EW=Ee("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>A({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${_W.root} + &`]:{paddingTop:0}})),RW=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiDialogContent"}),{className:i,dividers:o=!1}=r,s=Ie(r,CW),a=A({},r,{dividers:o}),l=kW(a);return v.jsx(EW,A({className:De(l.root,i),ownerState:a,ref:n},s))}),PW=["className","id"],TW=e=>{const{classes:t}=e;return pt({root:["root"]},SW,t)},OW=Ee(_t,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),jW=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiDialogTitle"}),{className:i,id:o}=r,s=Ie(r,PW),a=r,l=TW(a),{titleId:c=o}=C.useContext(sj);return v.jsx(OW,A({component:"h2",className:De(l.root,i),ownerState:a,ref:n,variant:"h6",id:o??c},s))});function LW(e){return ht("MuiFab",e)}const Nk=gt("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),IW=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],MW=e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,`size${we(i)}`,t==="inherit"?"colorInherit":t]},s=pt(o,LW,r);return A({},r,s)},NW=Ee($o,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>cr(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${we(n.size)}`],n.color==="inherit"&&t.colorInherit,t[we(n.size)],t[n.color]]}})(({theme:e,ownerState:t})=>{var n,r;return A({},e.typography.button,{minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${Nk.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]}},t.size==="small"&&{width:40,height:40},t.size==="medium"&&{width:48,height:48},t.variant==="extended"&&{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},t.variant==="extended"&&t.size==="small"&&{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34},t.variant==="extended"&&t.size==="medium"&&{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40},t.color==="inherit"&&{color:"inherit"})},({theme:e,ownerState:t})=>A({},t.color!=="inherit"&&t.color!=="default"&&(e.vars||e).palette[t.color]!=null&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}}),({theme:e})=>({[`&.${Nk.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}})),$W=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiFab"}),{children:i,className:o,color:s="default",component:a="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:f="circular"}=r,m=Ie(r,IW),h=A({},r,{color:s,component:a,disabled:l,disableFocusRipple:c,size:d,variant:f}),g=MW(h);return v.jsx(NW,A({className:De(g.root,o),component:a,disabled:l,focusRipple:!c,focusVisibleClassName:De(g.focusVisible,u),ownerState:h,ref:n},m,{classes:g,children:i}))}),AW=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],DW=e=>{const{classes:t,disableUnderline:n}=e,i=pt({root:["root",!n&&"underline"],input:["input"]},u9,t);return A({},t,i)},BW=Ee(Fv,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Dv(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return A({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${dl.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${dl.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${dl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${dl.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${dl.disabled}, .${dl.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${dl.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&A({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9}))}),FW=Ee(zv,{name:"MuiFilledInput",slot:"Input",overridesResolver:Bv})(({theme:e,ownerState:t})=>A({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),Hx=C.forwardRef(function(t,n){var r,i,o,s;const a=mt({props:t,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:f=!1,slotProps:m,slots:h={},type:g="text"}=a,E=Ie(a,AW),b=A({},a,{fullWidth:u,inputComponent:d,multiline:f,type:g}),w=DW(a),y={root:{ownerState:b},input:{ownerState:b}},_=m??c?Hr(y,m??c):y,k=(r=(i=h.root)!=null?i:l.Root)!=null?r:BW,R=(o=(s=h.input)!=null?s:l.Input)!=null?o:FW;return v.jsx(Gx,A({slots:{root:k,input:R},componentsProps:_,fullWidth:u,inputComponent:d,multiline:f,ref:n,type:g},E,{classes:w}))});Hx.muiName="Input";function zW(e){return ht("MuiFormControl",e)}gt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const UW=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],WW=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${we(n)}`,r&&"fullWidth"]};return pt(i,zW,t)},GW=Ee("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>A({},t.root,t[`margin${we(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>A({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),xl=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:f=!1,margin:m="none",required:h=!1,size:g="medium",variant:E="outlined"}=r,b=Ie(r,UW),w=A({},r,{color:s,component:a,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:m,required:h,size:g,variant:E}),y=WW(w),[_,k]=C.useState(()=>{let z=!1;return i&&C.Children.forEach(i,K=>{if(!tf(K,["Input","Select"]))return;const Z=tf(K,["Select"])?K.props.input:K;Z&&n9(Z.props)&&(z=!0)}),z}),[R,P]=C.useState(()=>{let z=!1;return i&&C.Children.forEach(i,K=>{tf(K,["Input","Select"])&&(Vm(K.props,!0)||Vm(K.props.inputProps,!0))&&(z=!0)}),z}),[I,$]=C.useState(!1);l&&I&&$(!1);const L=u!==void 0&&!l?u:I;let N;const F=C.useMemo(()=>({adornedStart:_,setAdornedStart:k,color:s,disabled:l,error:c,filled:R,focused:L,fullWidth:d,hiddenLabel:f,size:g,onBlur:()=>{$(!1)},onEmpty:()=>{P(!1)},onFilled:()=>{P(!0)},onFocus:()=>{$(!0)},registerEffect:N,required:h,variant:E}),[_,s,l,c,R,L,d,f,N,h,g,E]);return v.jsx(Wx.Provider,{value:F,children:v.jsx(GW,A({as:a,ownerState:w,className:De(y.root,o),ref:n},b,{children:i}))})}),Km=nF({createStyledComponent:Ee("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>mt({props:e,name:"MuiStack"})});function HW(e){return ht("MuiFormControlLabel",e)}const zd=gt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),VW=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],KW=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${we(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return pt(s,HW,t)},qW=Ee("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${zd.label}`]:t.label},t.root,t[`labelPlacement${we(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>A({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${zd.disabled}`]:{cursor:"default"}},t.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},t.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},t.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${zd.label}`]:{[`&.${zd.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),YW=Ee("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${zd.error}`]:{color:(e.vars||e).palette.error.main}})),Ms=C.forwardRef(function(t,n){var r,i;const o=mt({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:a={},control:l,disabled:c,disableTypography:u,label:d,labelPlacement:f="end",required:m,slotProps:h={}}=o,g=Ie(o,VW),E=Qa(),b=(r=c??l.props.disabled)!=null?r:E==null?void 0:E.disabled,w=m??l.props.required,y={disabled:b,required:w};["checked","name","onChange","value","inputRef"].forEach($=>{typeof l.props[$]>"u"&&typeof o[$]<"u"&&(y[$]=o[$])});const _=lc({props:o,muiFormControl:E,states:["error"]}),k=A({},o,{disabled:b,labelPlacement:f,required:w,error:_.error}),R=KW(k),P=(i=h.typography)!=null?i:a.typography;let I=d;return I!=null&&I.type!==_t&&!u&&(I=v.jsx(_t,A({component:"span"},P,{className:De(R.label,P==null?void 0:P.className),children:I}))),v.jsxs(qW,A({className:De(R.root,s),ownerState:k,ref:n},g,{children:[C.cloneElement(l,y),w?v.jsxs(Km,{display:"block",children:[I,v.jsxs(YW,{ownerState:k,"aria-hidden":!0,className:R.asterisk,children:[" ","*"]})]}):I]}))});function QW(e){return ht("MuiFormHelperText",e)}const $k=gt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Ak;const XW=["children","className","component","disabled","error","filled","focused","margin","required","variant"],JW=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=e,c={root:["root",i&&"disabled",o&&"error",r&&`size${we(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return pt(c,QW,t)},ZW=Ee("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${we(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>A({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${$k.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${$k.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),eG=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=Ie(r,XW),l=Qa(),c=lc({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=A({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=JW(u);return v.jsx(ZW,A({as:s,ownerState:u,className:De(d.root,o),ref:n},a,{children:i===" "?Ak||(Ak=v.jsx("span",{className:"notranslate",children:"​"})):i}))});function tG(e){return ht("MuiFormLabel",e)}const af=gt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),nG=["children","className","color","component","disabled","error","filled","focused","required"],rG=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=e,l={root:["root",`color${we(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return pt(l,tG,t)},iG=Ee("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>A({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>A({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${af.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${af.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${af.error}`]:{color:(e.vars||e).palette.error.main}})),oG=Ee("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${af.error}`]:{color:(e.vars||e).palette.error.main}})),sG=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=Ie(r,nG),l=Qa(),c=lc({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=A({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=rG(u);return v.jsxs(iG,A({as:s,ownerState:u,className:De(d.root,o),ref:n},a,{children:[i,c.required&&v.jsxs(oG,{ownerState:u,"aria-hidden":!0,className:d.asterisk,children:[" ","*"]})]}))}),aG=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function y1(e){return`scale(${e}, ${e**2})`}const lG={entering:{opacity:1,transform:y1(1)},entered:{opacity:1,transform:"none"}},g0=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Kf=C.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:m,style:h,timeout:g="auto",TransitionComponent:E=co}=t,b=Ie(t,aG),w=Sa(),y=C.useRef(),_=Ni(),k=C.useRef(null),R=un(k,o.ref,n),P=Z=>le=>{if(Z){const ce=k.current;le===void 0?Z(ce):Z(ce,le)}},I=P(u),$=P((Z,le)=>{jx(Z);const{duration:ce,delay:H,easing:V}=Fa({style:h,timeout:g,easing:s},{mode:"enter"});let se;g==="auto"?(se=_.transitions.getAutoHeightDuration(Z.clientHeight),y.current=se):se=ce,Z.style.transition=[_.transitions.create("opacity",{duration:se,delay:H}),_.transitions.create("transform",{duration:g0?se:se*.666,delay:H,easing:V})].join(","),l&&l(Z,le)}),L=P(c),N=P(m),F=P(Z=>{const{duration:le,delay:ce,easing:H}=Fa({style:h,timeout:g,easing:s},{mode:"exit"});let V;g==="auto"?(V=_.transitions.getAutoHeightDuration(Z.clientHeight),y.current=V):V=le,Z.style.transition=[_.transitions.create("opacity",{duration:V,delay:ce}),_.transitions.create("transform",{duration:g0?V:V*.666,delay:g0?ce:ce||V*.333,easing:H})].join(","),Z.style.opacity=0,Z.style.transform=y1(.75),d&&d(Z)}),z=P(f),K=Z=>{g==="auto"&&w.start(y.current||0,Z),r&&r(k.current,Z)};return v.jsx(E,A({appear:i,in:a,nodeRef:k,onEnter:$,onEntered:L,onEntering:I,onExit:F,onExited:z,onExiting:N,addEndListener:K,timeout:g==="auto"?null:g},b,{children:(Z,le)=>C.cloneElement(o,A({style:A({opacity:0,transform:y1(.75),visibility:Z==="exited"&&!a?"hidden":void 0},lG[Z],h,o.props.style),ref:R},le))}))});Kf.muiSupportAuto=!0;const cG=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],uG=e=>{const{classes:t,disableUnderline:n}=e,i=pt({root:["root",!n&&"underline"],input:["input"]},l9,t);return A({},t,i)},dG=Ee(Fv,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Dv(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),A({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Cd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Cd.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Cd.disabled}, .${Cd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Cd.disabled}:before`]:{borderBottomStyle:"dotted"}})}),fG=Ee(zv,{name:"MuiInput",slot:"Input",overridesResolver:Bv})({}),Vx=C.forwardRef(function(t,n){var r,i,o,s;const a=mt({props:t,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:d=!1,inputComponent:f="input",multiline:m=!1,slotProps:h,slots:g={},type:E="text"}=a,b=Ie(a,cG),w=uG(a),_={root:{ownerState:{disableUnderline:l}}},k=h??u?Hr(h??u,_):_,R=(r=(i=g.root)!=null?i:c.Root)!=null?r:dG,P=(o=(s=g.input)!=null?s:c.Input)!=null?o:fG;return v.jsx(Gx,A({slots:{root:R,input:P},slotProps:k,fullWidth:d,inputComponent:f,multiline:m,ref:n,type:E},b,{classes:w}))});Vx.muiName="Input";function pG(e){return ht("MuiInputLabel",e)}gt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const hG=["disableAnimation","margin","shrink","variant","className"],mG=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${we(r)}`,s],asterisk:[a&&"asterisk"]},c=pt(l,pG,t);return A({},t,c)},gG=Ee(sG,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${af.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(({theme:e,ownerState:t})=>A({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&A({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&A({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&A({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),aj=C.forwardRef(function(t,n){const r=mt({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=Ie(r,hG),l=Qa();let c=o;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=lc({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),d=A({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),f=mG(d);return v.jsx(gG,A({"data-shrink":c,ownerState:d,ref:n,className:De(f.root,s)},a,{classes:f}))});function vG(e){return ht("MuiListItemIcon",e)}const Dk=gt("MuiListItemIcon",["root","alignItemsFlexStart"]),yG=["className"],bG=e=>{const{alignItems:t,classes:n}=e;return pt({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},vG,n)},wG=Ee("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>A({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),xG=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Ie(r,yG),s=C.useContext(jo),a=A({},r,{alignItems:s.alignItems}),l=bG(a);return v.jsx(wG,A({className:De(l.root,i),ownerState:a,ref:n},o))}),SG=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function v0(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Bk(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function lj(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function kd(e,t,n,r,i,o){let s=!1,a=i(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!lj(a,o)||l)a=i(e,a,n);else return a.focus(),!0}return!1}const cj=C.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=t,f=Ie(t,SG),m=C.useRef(null),h=C.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});li(()=>{i&&m.current.focus()},[i]),C.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(y,{direction:_})=>{const k=!m.current.style.width;if(y.clientHeight{const _=m.current,k=y.key,R=qn(_).activeElement;if(k==="ArrowDown")y.preventDefault(),kd(_,R,c,l,v0);else if(k==="ArrowUp")y.preventDefault(),kd(_,R,c,l,Bk);else if(k==="Home")y.preventDefault(),kd(_,null,c,l,v0);else if(k==="End")y.preventDefault(),kd(_,null,c,l,Bk);else if(k.length===1){const P=h.current,I=k.toLowerCase(),$=performance.now();P.keys.length>0&&($-P.lastTime>500?(P.keys=[],P.repeating=!0,P.previousKeyMatched=!0):P.repeating&&I!==P.keys[0]&&(P.repeating=!1)),P.lastTime=$,P.keys.push(I);const L=R&&!P.repeating&&lj(R,P);P.previousKeyMatched&&(L||kd(_,R,!1,l,v0,P))?y.preventDefault():P.previousKeyMatched=!1}u&&u(y)},E=un(m,n);let b=-1;C.Children.forEach(s,(y,_)=>{if(!C.isValidElement(y)){b===_&&(b+=1,b>=s.length&&(b=-1));return}y.props.disabled||(d==="selectedMenu"&&y.props.selected||b===-1)&&(b=_),b===_&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(b+=1,b>=s.length&&(b=-1))});const w=C.Children.map(s,(y,_)=>{if(_===b){const k={};return o&&(k.autoFocus=!0),y.props.tabIndex===void 0&&d==="selectedMenu"&&(k.tabIndex=0),C.cloneElement(y,k)}return y});return v.jsx(rf,A({role:"menu",ref:E,className:a,onKeyDown:g,tabIndex:i?0:-1},f,{children:w}))});function _G(e){return ht("MuiPopover",e)}gt("MuiPopover",["root","paper"]);const CG=["onEntering"],kG=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],EG=["slotProps"];function Fk(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function zk(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function Uk(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function y0(e){return typeof e=="function"?e():e}const RG=e=>{const{classes:t}=e;return pt({root:["root"],paper:["paper"]},_G,t)},PG=Ee(Ev,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),uj=Ee(us,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),TG=C.forwardRef(function(t,n){var r,i,o;const s=mt({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:f,className:m,container:h,elevation:g=8,marginThreshold:E=16,open:b,PaperProps:w={},slots:y,slotProps:_,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:R=Kf,transitionDuration:P="auto",TransitionProps:{onEntering:I}={},disableScrollLock:$=!1}=s,L=Ie(s.TransitionProps,CG),N=Ie(s,kG),F=(r=_==null?void 0:_.paper)!=null?r:w,z=C.useRef(),K=un(z,F.ref),Z=A({},s,{anchorOrigin:c,anchorReference:d,elevation:g,marginThreshold:E,externalPaperSlotProps:F,transformOrigin:k,TransitionComponent:R,transitionDuration:P,TransitionProps:L}),le=RG(Z),ce=C.useCallback(()=>{if(d==="anchorPosition")return u;const Ze=y0(l),ee=(Ze&&Ze.nodeType===1?Ze:qn(z.current).body).getBoundingClientRect();return{top:ee.top+Fk(ee,c.vertical),left:ee.left+zk(ee,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),H=C.useCallback(Ze=>({vertical:Fk(Ze,k.vertical),horizontal:zk(Ze,k.horizontal)}),[k.horizontal,k.vertical]),V=C.useCallback(Ze=>{const yt={width:Ze.offsetWidth,height:Ze.offsetHeight},ee=H(yt);if(d==="none")return{top:null,left:null,transformOrigin:Uk(ee)};const me=ce();let Ce=me.top-ee.vertical,Ue=me.left-ee.horizontal;const W=Ce+yt.height,S=Ue+yt.width,O=ss(y0(l)),D=O.innerHeight-E,q=O.innerWidth-E;if(E!==null&&CeD){const X=W-D;Ce-=X,ee.vertical+=X}if(E!==null&&Ueq){const X=S-q;Ue-=X,ee.horizontal+=X}return{top:`${Math.round(Ce)}px`,left:`${Math.round(Ue)}px`,transformOrigin:Uk(ee)}},[l,d,ce,H,E]),[se,je]=C.useState(b),Ge=C.useCallback(()=>{const Ze=z.current;if(!Ze)return;const yt=V(Ze);yt.top!==null&&(Ze.style.top=yt.top),yt.left!==null&&(Ze.style.left=yt.left),Ze.style.transformOrigin=yt.transformOrigin,je(!0)},[V]);C.useEffect(()=>($&&window.addEventListener("scroll",Ge),()=>window.removeEventListener("scroll",Ge)),[l,$,Ge]);const Le=(Ze,yt)=>{I&&I(Ze,yt),Ge()},_e=()=>{je(!1)};C.useEffect(()=>{b&&Ge()}),C.useImperativeHandle(a,()=>b?{updatePosition:()=>{Ge()}}:null,[b,Ge]),C.useEffect(()=>{if(!b)return;const Ze=Cv(()=>{Ge()}),yt=ss(l);return yt.addEventListener("resize",Ze),()=>{Ze.clear(),yt.removeEventListener("resize",Ze)}},[l,b,Ge]);let Ve=P;P==="auto"&&!R.muiSupportAuto&&(Ve=void 0);const Pe=h||(l?qn(y0(l)).body:void 0),ct=(i=y==null?void 0:y.root)!=null?i:PG,ft=(o=y==null?void 0:y.paper)!=null?o:uj,Te=Ao({elementType:ft,externalSlotProps:A({},F,{style:se?F.style:A({},F.style,{opacity:0})}),additionalProps:{elevation:g,ref:K},ownerState:Z,className:De(le.paper,F==null?void 0:F.className)}),Tt=Ao({elementType:ct,externalSlotProps:(_==null?void 0:_.root)||{},externalForwardedProps:N,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Pe,open:b},ownerState:Z,className:De(le.root,m)}),{slotProps:ut}=Tt,ze=Ie(Tt,EG);return v.jsx(ct,A({},ze,!Tu(ct)&&{slotProps:ut,disableScrollLock:$},{children:v.jsx(R,A({appear:!0,in:b,onEntering:Le,onExited:_e,timeout:Ve},L,{children:v.jsx(ft,A({},Te,{children:f}))}))}))});function OG(e){return ht("MuiMenu",e)}gt("MuiMenu",["root","paper","list"]);const jG=["onEntering"],LG=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],IG={vertical:"top",horizontal:"right"},MG={vertical:"top",horizontal:"left"},NG=e=>{const{classes:t}=e;return pt({root:["root"],paper:["paper"],list:["list"]},OG,t)},$G=Ee(TG,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),AG=Ee(uj,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),DG=Ee(cj,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Uv=C.forwardRef(function(t,n){var r,i;const o=mt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:f,PaperProps:m={},PopoverClasses:h,transitionDuration:g="auto",TransitionProps:{onEntering:E}={},variant:b="selectedMenu",slots:w={},slotProps:y={}}=o,_=Ie(o.TransitionProps,jG),k=Ie(o,LG),R=Ex(),P=A({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:E,PaperProps:m,transitionDuration:g,TransitionProps:_,variant:b}),I=NG(P),$=s&&!c&&f,L=C.useRef(null),N=(H,V)=>{L.current&&L.current.adjustStyleForScrollbar(H,{direction:R?"rtl":"ltr"}),E&&E(H,V)},F=H=>{H.key==="Tab"&&(H.preventDefault(),d&&d(H,"tabKeyDown"))};let z=-1;C.Children.map(a,(H,V)=>{C.isValidElement(H)&&(H.props.disabled||(b==="selectedMenu"&&H.props.selected||z===-1)&&(z=V))});const K=(r=w.paper)!=null?r:AG,Z=(i=y.paper)!=null?i:m,le=Ao({elementType:w.root,externalSlotProps:y.root,ownerState:P,className:[I.root,l]}),ce=Ao({elementType:K,externalSlotProps:Z,ownerState:P,className:I.paper});return v.jsx($G,A({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:R?"right":"left"},transformOrigin:R?IG:MG,slots:{paper:K,root:w.root},slotProps:{root:le,paper:ce},open:f,ref:n,transitionDuration:g,TransitionProps:A({onEntering:N},_),ownerState:P},k,{classes:h,children:v.jsx(DG,A({onKeyDown:F,actions:L,autoFocus:s&&(z===-1||c),autoFocusItem:$,variant:b},u,{className:De(I.list,u.className),children:a}))}))});function BG(e){return ht("MuiMenuItem",e)}const Ed=gt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),FG=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],zG=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},UG=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,l=pt({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},BG,s);return A({},s,l)},WG=Ee($o,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:zG})(({theme:e,ownerState:t})=>A({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ed.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:At(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ed.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:At(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ed.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:At(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:At(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Ed.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ed.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${bk.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${bk.inset}`]:{marginLeft:52},[`& .${Gm.root}`]:{marginTop:0,marginBottom:0},[`& .${Gm.inset}`]:{paddingLeft:36},[`& .${Dk.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&A({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Dk.root} svg`]:{fontSize:"1.25rem"}}))),yi=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:f}=r,m=Ie(r,FG),h=C.useContext(jo),g=C.useMemo(()=>({dense:s||h.dense||!1,disableGutters:l}),[h.dense,s,l]),E=C.useRef(null);li(()=>{i&&E.current&&E.current.focus()},[i]);const b=A({},r,{dense:g.dense,divider:a,disableGutters:l}),w=UG(r),y=un(E,n);let _;return r.disabled||(_=d!==void 0?d:-1),v.jsx(jo.Provider,{value:g,children:v.jsx(WG,A({ref:y,role:u,tabIndex:_,component:o,focusVisibleClassName:De(w.focusVisible,c),className:De(w.root,f)},m,{ownerState:b,classes:w}))})});function GG(e){return ht("MuiNativeSelect",e)}const Kx=gt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),HG=["className","disabled","error","IconComponent","inputRef","variant"],VG=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${we(n)}`,o&&"iconOpen",r&&"disabled"]};return pt(a,GG,t)},dj=({ownerState:e,theme:t})=>A({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":A({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Kx.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),KG=Ee("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:cr,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Kx.multiple}`]:t.multiple}]}})(dj),fj=({ownerState:e,theme:t})=>A({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${Kx.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),qG=Ee("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${we(n.variant)}`],n.open&&t.iconOpen]}})(fj),YG=C.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard"}=t,c=Ie(t,HG),u=A({},t,{disabled:i,variant:l,error:o}),d=VG(u);return v.jsxs(C.Fragment,{children:[v.jsx(KG,A({ownerState:u,className:De(d.select,r),disabled:i,ref:a||n},c)),t.multiple?null:v.jsx(qG,{as:s,ownerState:u,className:d.icon})]})});var Wk;const QG=["children","classes","className","label","notched"],XG=Ee("fieldset",{shouldForwardProp:cr})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),JG=Ee("legend",{shouldForwardProp:cr})(({ownerState:e,theme:t})=>A({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&A({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function ZG(e){const{className:t,label:n,notched:r}=e,i=Ie(e,QG),o=n!=null&&n!=="",s=A({},e,{notched:r,withLabel:o});return v.jsx(XG,A({"aria-hidden":!0,className:t,ownerState:s},i,{children:v.jsx(JG,{ownerState:s,children:o?v.jsx("span",{children:n}):Wk||(Wk=v.jsx("span",{className:"notranslate",children:"​"}))})}))}const e7=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],t7=e=>{const{classes:t}=e,r=pt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},c9,t);return A({},t,r)},n7=Ee(Fv,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Dv})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return A({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${ca.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${ca.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${ca.focused} .${ca.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${ca.error} .${ca.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${ca.disabled} .${ca.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&A({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),r7=Ee(ZG,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),i7=Ee(zv,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Bv})(({theme:e,ownerState:t})=>A({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),qx=C.forwardRef(function(t,n){var r,i,o,s,a;const l=mt({props:t,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:f,multiline:m=!1,notched:h,slots:g={},type:E="text"}=l,b=Ie(l,e7),w=t7(l),y=Qa(),_=lc({props:l,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),k=A({},l,{color:_.color||"primary",disabled:_.disabled,error:_.error,focused:_.focused,formControl:y,fullWidth:u,hiddenLabel:_.hiddenLabel,multiline:m,size:_.size,type:E}),R=(r=(i=g.root)!=null?i:c.Root)!=null?r:n7,P=(o=(s=g.input)!=null?s:c.Input)!=null?o:i7;return v.jsx(Gx,A({slots:{root:R,input:P},renderSuffix:I=>v.jsx(r7,{ownerState:k,className:w.notchedOutline,label:f!=null&&f!==""&&_.required?a||(a=v.jsxs(C.Fragment,{children:[f," ","*"]})):f,notched:typeof h<"u"?h:!!(I.startAdornment||I.filled||I.focused)}),fullWidth:u,inputComponent:d,multiline:m,ref:n,type:E},b,{classes:A({},w,{notchedOutline:null})}))});qx.muiName="Input";function o7(e){return ht("MuiSelect",e)}const Rd=gt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Gk;const s7=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],a7=Ee("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Rd.select}`]:t.select},{[`&.${Rd.select}`]:t[n.variant]},{[`&.${Rd.error}`]:t.error},{[`&.${Rd.multiple}`]:t.multiple}]}})(dj,{[`&.${Rd.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),l7=Ee("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${we(n.variant)}`],n.open&&t.iconOpen]}})(fj),c7=Ee("input",{shouldForwardProp:e=>vO(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Hk(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function u7(e){return e==null||typeof e=="string"&&!e.trim()}const d7=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${we(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return pt(a,o7,t)},f7=C.forwardRef(function(t,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:m,error:h=!1,IconComponent:g,inputRef:E,labelId:b,MenuProps:w={},multiple:y,name:_,onBlur:k,onChange:R,onClose:P,onFocus:I,onOpen:$,open:L,readOnly:N,renderValue:F,SelectDisplayProps:z={},tabIndex:K,value:Z,variant:le="standard"}=t,ce=Ie(t,s7),[H,V]=Pu({controlled:Z,default:d,name:"Select"}),[se,je]=Pu({controlled:L,default:u,name:"Select"}),Ge=C.useRef(null),Le=C.useRef(null),[_e,Ve]=C.useState(null),{current:Pe}=C.useRef(L!=null),[ct,ft]=C.useState(),Te=un(n,E),Tt=C.useCallback(qe=>{Le.current=qe,qe&&Ve(qe)},[]),ut=_e==null?void 0:_e.parentNode;C.useImperativeHandle(Te,()=>({focus:()=>{Le.current.focus()},node:Ge.current,value:H}),[H]),C.useEffect(()=>{u&&se&&_e&&!Pe&&(ft(a?null:ut.clientWidth),Le.current.focus())},[_e,a]),C.useEffect(()=>{s&&Le.current.focus()},[s]),C.useEffect(()=>{if(!b)return;const qe=qn(Le.current).getElementById(b);if(qe){const bt=()=>{getSelection().isCollapsed&&Le.current.focus()};return qe.addEventListener("click",bt),()=>{qe.removeEventListener("click",bt)}}},[b]);const ze=(qe,bt)=>{qe?$&&$(bt):P&&P(bt),Pe||(ft(a?null:ut.clientWidth),je(qe))},Ze=qe=>{qe.button===0&&(qe.preventDefault(),Le.current.focus(),ze(!0,qe))},yt=qe=>{ze(!1,qe)},ee=C.Children.toArray(l),me=qe=>{const bt=ee.find(Me=>Me.props.value===qe.target.value);bt!==void 0&&(V(bt.props.value),R&&R(qe,bt))},Ce=qe=>bt=>{let Me;if(bt.currentTarget.hasAttribute("tabindex")){if(y){Me=Array.isArray(H)?H.slice():[];const Yt=H.indexOf(qe.props.value);Yt===-1?Me.push(qe.props.value):Me.splice(Yt,1)}else Me=qe.props.value;if(qe.props.onClick&&qe.props.onClick(bt),H!==Me&&(V(Me),R)){const Yt=bt.nativeEvent||bt,An=new Yt.constructor(Yt.type,Yt);Object.defineProperty(An,"target",{writable:!0,value:{value:Me,name:_}}),R(An,qe)}y||ze(!1,bt)}},Ue=qe=>{N||[" ","ArrowUp","ArrowDown","Enter"].indexOf(qe.key)!==-1&&(qe.preventDefault(),ze(!0,qe))},W=_e!==null&&se,S=qe=>{!W&&k&&(Object.defineProperty(qe,"target",{writable:!0,value:{value:H,name:_}}),k(qe))};delete ce["aria-invalid"];let O,D;const q=[];let X=!1;(Vm({value:H})||m)&&(F?O=F(H):X=!0);const pe=ee.map(qe=>{if(!C.isValidElement(qe))return null;let bt;if(y){if(!Array.isArray(H))throw new Error(Vl(2));bt=H.some(Me=>Hk(Me,qe.props.value)),bt&&X&&q.push(qe.props.children)}else bt=Hk(H,qe.props.value),bt&&X&&(D=qe.props.children);return C.cloneElement(qe,{"aria-selected":bt?"true":"false",onClick:Ce(qe),onKeyUp:Me=>{Me.key===" "&&Me.preventDefault(),qe.props.onKeyUp&&qe.props.onKeyUp(Me)},role:"option",selected:bt,value:void 0,"data-value":qe.props.value})});X&&(y?q.length===0?O=null:O=q.reduce((qe,bt,Me)=>(qe.push(bt),Me{const{classes:t}=e;return t},Yx={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>cr(e)&&e!=="variant",slot:"Root"},g7=Ee(Vx,Yx)(""),v7=Ee(qx,Yx)(""),y7=Ee(Hx,Yx)(""),Pl=C.forwardRef(function(t,n){const r=mt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=d9,id:d,input:f,inputProps:m,label:h,labelId:g,MenuProps:E,multiple:b=!1,native:w=!1,onClose:y,onOpen:_,open:k,renderValue:R,SelectDisplayProps:P,variant:I="outlined"}=r,$=Ie(r,p7),L=w?YG:f7,N=Qa(),F=lc({props:r,muiFormControl:N,states:["variant","error"]}),z=F.variant||I,K=A({},r,{variant:z,classes:s}),Z=m7(K),le=Ie(Z,h7),ce=f||{standard:v.jsx(g7,{ownerState:K}),outlined:v.jsx(v7,{label:h,ownerState:K}),filled:v.jsx(y7,{ownerState:K})}[z],H=un(n,ce.ref);return v.jsx(C.Fragment,{children:C.cloneElement(ce,A({inputComponent:L,inputProps:A({children:o,error:F.error,IconComponent:u,variant:z,type:void 0,multiple:b},w?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:E,onClose:y,onOpen:_,open:k,renderValue:R,SelectDisplayProps:A({id:d},P)},m,{classes:m?Hr(le,m.classes):le},f?f.props.inputProps:{})},(b&&w||c)&&z==="outlined"?{notched:!0}:{},{ref:H,className:De(ce.props.className,a,Z.root)},!f&&{variant:z},$))})});Pl.muiName="Select";function b7(e){return ht("MuiSnackbarContent",e)}gt("MuiSnackbarContent",["root","message","action"]);const w7=["action","className","message","role"],x7=e=>{const{classes:t}=e;return pt({root:["root"],action:["action"],message:["message"]},b7,t)},S7=Ee(us,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=l1(e.palette.background.default,t);return A({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),_7=Ee("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),C7=Ee("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),k7=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:a="alert"}=r,l=Ie(r,w7),c=r,u=x7(c);return v.jsxs(S7,A({role:a,square:!0,elevation:6,className:De(u.root,o),ownerState:c,ref:n},l,{children:[v.jsx(_7,{className:u.message,ownerState:c,children:s}),i?v.jsx(C7,{className:u.action,ownerState:c,children:i}):null]}))});function E7(e){return ht("MuiSnackbar",e)}gt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const R7=["onEnter","onExited"],P7=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],T7=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${we(n.vertical)}${we(n.horizontal)}`]};return pt(r,E7,t)},Vk=Ee("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${we(n.anchorOrigin.vertical)}${we(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return A({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:A({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),O7=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiSnackbar"}),i=Ni(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:f,ContentProps:m,disableWindowBlurListener:h=!1,message:g,open:E,TransitionComponent:b=Kf,transitionDuration:w=o,TransitionProps:{onEnter:y,onExited:_}={}}=r,k=Ie(r.TransitionProps,R7),R=Ie(r,P7),P=A({},r,{anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:c,disableWindowBlurListener:h,TransitionComponent:b,transitionDuration:w}),I=T7(P),{getRootProps:$,onClickAway:L}=MU(A({},P)),[N,F]=C.useState(!0),z=Ao({elementType:Vk,getSlotProps:$,externalForwardedProps:R,ownerState:P,additionalProps:{ref:n},className:[I.root,d]}),K=le=>{F(!0),_&&_(le)},Z=(le,ce)=>{F(!1),y&&y(le,ce)};return!E&&N?null:v.jsx(y8,A({onClickAway:L},f,{children:v.jsx(Vk,A({},z,{children:v.jsx(b,A({appear:!0,in:E,timeout:w,direction:a==="top"?"down":"up",onEnter:Z,onExited:K},k,{children:u||v.jsx(k7,A({message:g,action:s},m))}))}))}))});function j7(e){return ht("MuiTooltip",e)}const _a=gt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),L7=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function I7(e){return Math.round(e*1e5)/1e5}const M7=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${we(o.split("-")[0])}`],arrow:["arrow"]};return pt(s,j7,t)},N7=Ee(JO,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>A({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${_a.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${_a.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${_a.arrow}`]:A({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${_a.arrow}`]:A({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),$7=Ee("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${we(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>A({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:At(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${I7(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${_a.popper}[data-popper-placement*="left"] &`]:A({transformOrigin:"right center"},t.isRtl?A({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):A({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${_a.popper}[data-popper-placement*="right"] &`]:A({transformOrigin:"left center"},t.isRtl?A({marginRight:"14px"},t.touch&&{marginRight:"24px"}):A({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${_a.popper}[data-popper-placement*="top"] &`]:A({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${_a.popper}[data-popper-placement*="bottom"] &`]:A({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),A7=Ee("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:At(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let wh=!1;const Kk=new vp;let Pd={x:0,y:0};function xh(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const em=C.forwardRef(function(t,n){var r,i,o,s,a,l,c,u,d,f,m,h,g,E,b,w,y,_,k;const R=mt({props:t,name:"MuiTooltip"}),{arrow:P=!1,children:I,components:$={},componentsProps:L={},describeChild:N=!1,disableFocusListener:F=!1,disableHoverListener:z=!1,disableInteractive:K=!1,disableTouchListener:Z=!1,enterDelay:le=100,enterNextDelay:ce=0,enterTouchDelay:H=700,followCursor:V=!1,id:se,leaveDelay:je=0,leaveTouchDelay:Ge=1500,onClose:Le,onOpen:_e,open:Ve,placement:Pe="bottom",PopperComponent:ct,PopperProps:ft={},slotProps:Te={},slots:Tt={},title:ut,TransitionComponent:ze=Kf,TransitionProps:Ze}=R,yt=Ie(R,L7),ee=C.isValidElement(I)?I:v.jsx("span",{children:I}),me=Ni(),Ce=Ex(),[Ue,W]=C.useState(),[S,O]=C.useState(null),D=C.useRef(!1),q=K||V,X=Sa(),pe=Sa(),Fe=Sa(),rt=Sa(),[Xe,Oe]=Pu({controlled:Ve,default:!1,name:"Tooltip",state:"open"});let et=Xe;const Rt=yp(se),tn=C.useRef(),qe=Yi(()=>{tn.current!==void 0&&(document.body.style.WebkitUserSelect=tn.current,tn.current=void 0),rt.clear()});C.useEffect(()=>qe,[qe]);const bt=Je=>{Kk.clear(),wh=!0,Oe(!0),_e&&!et&&_e(Je)},Me=Yi(Je=>{Kk.start(800+je,()=>{wh=!1}),Oe(!1),Le&&et&&Le(Je),X.start(me.transitions.duration.shortest,()=>{D.current=!1})}),Yt=Je=>{D.current&&Je.type!=="touchstart"||(Ue&&Ue.removeAttribute("title"),pe.clear(),Fe.clear(),le||wh&&ce?pe.start(wh?ce:le,()=>{bt(Je)}):bt(Je))},An=Je=>{pe.clear(),Fe.start(je,()=>{Me(Je)})},{isFocusVisibleRef:dr,onBlur:We,onFocus:Bi,ref:Fi}=Sv(),[,er]=C.useState(!1),po=Je=>{We(Je),dr.current===!1&&(er(!1),An(Je))},zo=Je=>{Ue||W(Je.currentTarget),Bi(Je),dr.current===!0&&(er(!0),Yt(Je))},ps=Je=>{D.current=!0;const Dt=ee.props;Dt.onTouchStart&&Dt.onTouchStart(Je)},tl=Je=>{ps(Je),Fe.clear(),X.clear(),qe(),tn.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",rt.start(H,()=>{document.body.style.WebkitUserSelect=tn.current,Yt(Je)})},di=Je=>{ee.props.onTouchEnd&&ee.props.onTouchEnd(Je),qe(),Fe.start(Ge,()=>{Me(Je)})};C.useEffect(()=>{if(!et)return;function Je(Dt){(Dt.key==="Escape"||Dt.key==="Esc")&&Me(Dt)}return document.addEventListener("keydown",Je),()=>{document.removeEventListener("keydown",Je)}},[Me,et]);const Rr=un(ee.ref,Fi,W,n);!ut&&ut!==0&&(et=!1);const Pr=C.useRef(),fr=Je=>{const Dt=ee.props;Dt.onMouseMove&&Dt.onMouseMove(Je),Pd={x:Je.clientX,y:Je.clientY},Pr.current&&Pr.current.update()},zt={},Q=typeof ut=="string";N?(zt.title=!et&&Q&&!z?ut:null,zt["aria-describedby"]=et?Rt:null):(zt["aria-label"]=Q?ut:null,zt["aria-labelledby"]=et&&!Q?Rt:null);const ie=A({},zt,yt,ee.props,{className:De(yt.className,ee.props.className),onTouchStart:ps,ref:Rr},V?{onMouseMove:fr}:{}),he={};Z||(ie.onTouchStart=tl,ie.onTouchEnd=di),z||(ie.onMouseOver=xh(Yt,ie.onMouseOver),ie.onMouseLeave=xh(An,ie.onMouseLeave),q||(he.onMouseOver=Yt,he.onMouseLeave=An)),F||(ie.onFocus=xh(zo,ie.onFocus),ie.onBlur=xh(po,ie.onBlur),q||(he.onFocus=zo,he.onBlur=po));const Se=C.useMemo(()=>{var Je;let Dt=[{name:"arrow",enabled:!!S,options:{element:S,padding:4}}];return(Je=ft.popperOptions)!=null&&Je.modifiers&&(Dt=Dt.concat(ft.popperOptions.modifiers)),A({},ft.popperOptions,{modifiers:Dt})},[S,ft]),$e=A({},R,{isRtl:Ce,arrow:P,disableInteractive:q,placement:Pe,PopperComponentProp:ct,touch:D.current}),nt=M7($e),st=(r=(i=Tt.popper)!=null?i:$.Popper)!=null?r:N7,Ae=(o=(s=(a=Tt.transition)!=null?a:$.Transition)!=null?s:ze)!=null?o:Kf,vt=(l=(c=Tt.tooltip)!=null?c:$.Tooltip)!=null?l:$7,at=(u=(d=Tt.arrow)!=null?d:$.Arrow)!=null?u:A7,it=tu(st,A({},ft,(f=Te.popper)!=null?f:L.popper,{className:De(nt.popper,ft==null?void 0:ft.className,(m=(h=Te.popper)!=null?h:L.popper)==null?void 0:m.className)}),$e),Ot=tu(Ae,A({},Ze,(g=Te.transition)!=null?g:L.transition),$e),Nt=tu(vt,A({},(E=Te.tooltip)!=null?E:L.tooltip,{className:De(nt.tooltip,(b=(w=Te.tooltip)!=null?w:L.tooltip)==null?void 0:b.className)}),$e),Lt=tu(at,A({},(y=Te.arrow)!=null?y:L.arrow,{className:De(nt.arrow,(_=(k=Te.arrow)!=null?k:L.arrow)==null?void 0:_.className)}),$e);return v.jsxs(C.Fragment,{children:[C.cloneElement(ee,ie),v.jsx(st,A({as:ct??JO,placement:Pe,anchorEl:V?{getBoundingClientRect:()=>({top:Pd.y,left:Pd.x,right:Pd.x,bottom:Pd.y,width:0,height:0})}:Ue,popperRef:Pr,open:Ue?et:!1,id:Rt,transition:!0},he,it,{popperOptions:Se,children:({TransitionProps:Je})=>v.jsx(Ae,A({timeout:me.transitions.duration.shorter},Je,Ot,{children:v.jsxs(vt,A({},Nt,{children:[ut,P?v.jsx(at,A({},Lt,{ref:O})):null]}))}))}))]})});function D7(e){return ht("MuiSwitch",e)}const zr=gt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),B7=["className","color","edge","size","sx"],F7=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,a={root:["root",n&&`edge${we(n)}`,`size${we(r)}`],switchBase:["switchBase",`color${we(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=pt(a,D7,t);return A({},t,l)},z7=Ee("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${we(n.edge)}`],t[`size${we(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${zr.thumb}`]:{width:16,height:16},[`& .${zr.switchBase}`]:{padding:4,[`&.${zr.checked}`]:{transform:"translateX(16px)"}}}}]}),U7=Ee(oj,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${zr.input}`]:t.input},n.color!=="default"&&t[`color${we(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${zr.checked}`]:{transform:"translateX(20px)"},[`&.${zr.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${zr.checked} + .${zr.track}`]:{opacity:.5},[`&.${zr.disabled} + .${zr.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${zr.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{color:t},style:{[`&.${zr.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${zr.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Bm(e.palette[t].main,.62):Dm(e.palette[t].main,.55)}`}},[`&.${zr.checked} + .${zr.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),W7=Ee("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),G7=Ee("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),H7=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:a="medium",sx:l}=r,c=Ie(r,B7),u=A({},r,{color:o,edge:s,size:a}),d=F7(u),f=v.jsx(G7,{className:d.thumb,ownerState:u});return v.jsxs(z7,{className:De(d.root,i),sx:l,ownerState:u,children:[v.jsx(U7,A({type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u},c,{classes:A({},d,{root:d.switchBase})})),v.jsx(W7,{className:d.track,ownerState:u})]})});function V7(e){return ht("MuiTextField",e)}gt("MuiTextField",["root"]);const K7=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],q7={standard:Vx,filled:Hx,outlined:qx},Y7=e=>{const{classes:t}=e;return pt({root:["root"]},V7,t)},Q7=Ee(xl,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),X7=C.forwardRef(function(t,n){const r=mt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:f,fullWidth:m=!1,helperText:h,id:g,InputLabelProps:E,inputProps:b,InputProps:w,inputRef:y,label:_,maxRows:k,minRows:R,multiline:P=!1,name:I,onBlur:$,onChange:L,onFocus:N,placeholder:F,required:z=!1,rows:K,select:Z=!1,SelectProps:le,type:ce,value:H,variant:V="outlined"}=r,se=Ie(r,K7),je=A({},r,{autoFocus:o,color:l,disabled:u,error:d,fullWidth:m,multiline:P,required:z,select:Z,variant:V}),Ge=Y7(je),Le={};V==="outlined"&&(E&&typeof E.shrink<"u"&&(Le.notched=E.shrink),Le.label=_),Z&&((!le||!le.native)&&(Le.id=void 0),Le["aria-describedby"]=void 0);const _e=yp(g),Ve=h&&_e?`${_e}-helper-text`:void 0,Pe=_&&_e?`${_e}-label`:void 0,ct=q7[V],ft=v.jsx(ct,A({"aria-describedby":Ve,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:m,multiline:P,name:I,rows:K,maxRows:k,minRows:R,type:ce,value:H,id:_e,inputRef:y,onBlur:$,onChange:L,onFocus:N,placeholder:F,inputProps:b},Le,w));return v.jsxs(Q7,A({className:De(Ge.root,a),disabled:u,error:d,fullWidth:m,ref:n,required:z,color:l,variant:V,ownerState:je},se,{children:[_!=null&&_!==""&&v.jsx(aj,A({htmlFor:_e,id:Pe},E,{children:_})),Z?v.jsx(Pl,A({"aria-describedby":Ve,id:_e,labelId:Pe,value:H,input:ft},le,{children:s})):ft,h&&v.jsx(eG,A({id:Ve},f,{children:h}))]}))});function J7(e,t){for(var n=0;nr[e]:r=>{for(var i=r,o=0;o"u")return i}return i}}function on(e){return Object.assign({},e)}function rH(e){return Object.keys(e)[0]}function qm(e,t=!1){if(!e)return e;if(!t&&Array.isArray(e))return e.sort((r,i)=>typeof r=="string"&&typeof i=="string"?r.localeCompare(i):typeof r=="object"?1:-1).map(r=>qm(r,t));if(typeof e=="object"&&!Array.isArray(e)){var n={};return Object.keys(e).sort((r,i)=>r.localeCompare(i)).forEach(r=>{n[r]=qm(e[r],t)}),n}return e}function b1(e){if(!e||e===null||typeof e!="object")return e;if(Array.isArray(e)){for(var t=new Array(e.length),n=t.length;n--;)t[n]=b1(e[n]);return t}var r={};for(var i in e)r[i]=b1(e[i]);return r}var io=b1;function Ns(e,t,n){return Object.defineProperty(e,t,{get:function(){return n}}),n}var Xx=1;function Yu(){return{lwt:Xx}}function Do(){return""}function iH(e){return Object.assign({},e,{_meta:void 0,_deleted:void 0,_rev:void 0})}function oH(e,t,n){if(t.length!==n.length)return!1;for(var r=0,i=t.length;r>>2]>>>24-n%4*8&255;this.words[this.sigBytes+n>>>2]|=r<<24-(this.sigBytes+n)%4*8}else for(let n=0;n>>2]=t.words[n>>>2];return this.sigBytes+=t.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new Ma([...this.words])}}const sH={stringify(e){const t=[];for(let n=0;n>>2]>>>24-n%4*8&255;t.push((r>>>4).toString(16),(r&15).toString(16))}return t.join("")}},aH={parse(e){const t=e.length,n=[];for(let r=0;r>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new Ma(n,t)}},lH={parse(e){return aH.parse(unescape(encodeURIComponent(e)))}};class cH{constructor(){this._data=new Ma,this._nDataBytes=0,this._minBufferSize=0,this.blockSize=512/32}reset(){this._data=new Ma,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=lH.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_doProcessBlock(t,n){}_process(t){let n,r=this._data.sigBytes/(this.blockSize*4);t?r=Math.ceil(r):r=Math.max((r|0)-this._minBufferSize,0);const i=r*this.blockSize,o=Math.min(i*4,this._data.sigBytes);if(i){for(let s=0;s>>7)^(y<<14|y>>>18)^y>>>3,k=fl[f-2],R=(k<<15|k>>>17)^(k<<13|k>>>19)^k>>>10;fl[f]=_+fl[f-7]+R+fl[f-16]}const m=l&c^~l&u,h=i&o^i&s^o&s,g=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),E=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),b=d+E+m+dH[f]+fl[f],w=g+h;d=u,u=c,c=l,l=a+b|0,a=s,s=o,o=i,i=b+w|0}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+l|0,r[5]=r[5]+c|0,r[6]=r[6]+u|0,r[7]=r[7]+d|0}finalize(t){super.finalize(t);const n=this._nDataBytes*8,r=this._data.sigBytes*8;return this._data.words[r>>>5]|=128<<24-r%32,this._data.words[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),this._data.words[(r+64>>>9<<4)+15]=n,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function pH(e){return new fH().finalize(e).toString()}function hH(e){return Promise.resolve(pH(e))}async function mH(e){var t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",t),r=Array.prototype.map.call(new Uint8Array(n),i=>("00"+i.toString(16)).slice(-2)).join("");return r}var gH=typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof crypto.subtle.digest=="function",hj=gH?mH:hH;function vH(){return new Promise(e=>setTimeout(e,0))}function mj(e=0){return new Promise(t=>setTimeout(t,e))}function yH(e){return e&&typeof e.then=="function"?e:Promise.resolve(e)}var Wv=Promise.resolve(!0),Po=Promise.resolve(!1),bH=Promise.resolve(null),Ci=Promise.resolve();function Gv(e=1e4){return typeof requestIdleCallback=="function"?new Promise(t=>{requestIdleCallback(()=>t(),{timeout:e})}):mj(0)}var w0=Ci;function wH(e=void 0){return w0=w0.then(()=>Gv(e)),w0}function xH(e,t){return e.reduce((n,r)=>n.then(r),Promise.resolve(t))}var SH=/\./g,Yk="abcdefghijklmnopqrstuvwxyz";function cc(e=10){for(var t="",n=0;n{var t=typeof e;return e!==null&&(t==="object"||t==="function")},x0=new Set(["__proto__","prototype","constructor"]),_H=new Set("0123456789");function vj(e){var t=[],n="",r="start",i=!1;for(var o of e)switch(o){case"\\":{if(r==="index")throw new Error("Invalid character in an index");if(r==="indexEnd")throw new Error("Invalid character after an index");i&&(n+=o),r="property",i=!i;break}case".":{if(r==="index")throw new Error("Invalid character in an index");if(r==="indexEnd"){r="property";break}if(i){i=!1,n+=o;break}if(x0.has(n))return[];t.push(n),n="",r="property";break}case"[":{if(r==="index")throw new Error("Invalid character in an index");if(r==="indexEnd"){r="index";break}if(i){i=!1,n+=o;break}if(r==="property"){if(x0.has(n))return[];t.push(n),n=""}r="index";break}case"]":{if(r==="index"){t.push(Number.parseInt(n,10)),n="",r="indexEnd";break}if(r==="indexEnd")throw new Error("Invalid character after an index")}default:{if(r==="index"&&!_H.has(o))throw new Error("Invalid character in an index");if(r==="indexEnd")throw new Error("Invalid character after an index");r==="start"&&(r="property"),i&&(i=!1,n+="\\"),n+=o}}switch(i&&(n+="\\"),r){case"property":{if(x0.has(n))return[];t.push(n);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}function yj(e,t){if(typeof t!="number"&&Array.isArray(e)){var n=Number.parseInt(t,10);return Number.isInteger(n)&&e[n]===e[t]}return!1}function CH(e,t){if(yj(e,t))throw new Error("Cannot use string index")}function Ua(e,t,n){if(Array.isArray(t)&&(t=t.join(".")),!t.includes(".")&&!t.includes("["))return e[t];if(!w1(e)||typeof t!="string")return n===void 0?e:n;var r=vj(t);if(r.length===0)return n;for(var i=0;i"u")throw new Error("missing value from map "+t);return n}function Gs(e,t,n,r){var i=e.get(t);return typeof i>"u"&&(i=n(),e.set(t,i)),i}function fn(e){var t=e.split("-"),n="RxDB";return t.forEach(r=>{n+=gj(r)}),n+="Plugin",new Error(`You are using a function which must be overwritten by a plugin. + */var Lx=Symbol.for("react.element"),Ix=Symbol.for("react.portal"),Rv=Symbol.for("react.fragment"),Pv=Symbol.for("react.strict_mode"),Tv=Symbol.for("react.profiler"),Ov=Symbol.for("react.provider"),jv=Symbol.for("react.context"),kz=Symbol.for("react.server_context"),Lv=Symbol.for("react.forward_ref"),Iv=Symbol.for("react.suspense"),Mv=Symbol.for("react.suspense_list"),Nv=Symbol.for("react.memo"),$v=Symbol.for("react.lazy"),Ez=Symbol.for("react.offscreen"),LO;LO=Symbol.for("react.module.reference");function uo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Lx:switch(e=e.type,e){case Rv:case Tv:case Pv:case Iv:case Mv:return e;default:switch(e=e&&e.$$typeof,e){case kz:case jv:case Lv:case $v:case Nv:case Ov:return e;default:return t}}case Ix:return t}}}sn.ContextConsumer=jv;sn.ContextProvider=Ov;sn.Element=Lx;sn.ForwardRef=Lv;sn.Fragment=Rv;sn.Lazy=$v;sn.Memo=Nv;sn.Portal=Ix;sn.Profiler=Tv;sn.StrictMode=Pv;sn.Suspense=Iv;sn.SuspenseList=Mv;sn.isAsyncMode=function(){return!1};sn.isConcurrentMode=function(){return!1};sn.isContextConsumer=function(e){return uo(e)===jv};sn.isContextProvider=function(e){return uo(e)===Ov};sn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lx};sn.isForwardRef=function(e){return uo(e)===Lv};sn.isFragment=function(e){return uo(e)===Rv};sn.isLazy=function(e){return uo(e)===$v};sn.isMemo=function(e){return uo(e)===Nv};sn.isPortal=function(e){return uo(e)===Ix};sn.isProfiler=function(e){return uo(e)===Tv};sn.isStrictMode=function(e){return uo(e)===Pv};sn.isSuspense=function(e){return uo(e)===Iv};sn.isSuspenseList=function(e){return uo(e)===Mv};sn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Rv||e===Tv||e===Pv||e===Iv||e===Mv||e===Ez||typeof e=="object"&&e!==null&&(e.$$typeof===$v||e.$$typeof===Nv||e.$$typeof===Ov||e.$$typeof===jv||e.$$typeof===Lv||e.$$typeof===LO||e.getModuleId!==void 0)};sn.typeOf=uo;function Rz(e){return ft("MuiCollapse",e)}pt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Pz=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],Tz=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return mt(r,Rz,n)},Oz=Ee("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>$({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&$({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),jz=Ee("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>$({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),Lz=Ee("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>$({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),IO=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:a="0px",component:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:m,onExit:h,onExited:g,onExiting:R,orientation:b="vertical",style:w,timeout:y=pO.standard,TransitionComponent:_=co}=r,k=Ie(r,Pz),E=$({},r,{orientation:b,collapsedSize:a}),P=Tz(E),I=Ni(),A=Sa(),L=C.useRef(null),N=C.useRef(),F=typeof a=="number"?`${a}px`:a,z=b==="horizontal",K=z?"width":"height",Z=C.useRef(null),le=un(n,Z),ce=Pe=>ct=>{if(Pe){const ht=Z.current;ct===void 0?Pe(ht):Pe(ht,ct)}},H=()=>L.current?L.current[z?"clientWidth":"clientHeight"]:0,V=ce((Pe,ct)=>{L.current&&z&&(L.current.style.position="absolute"),Pe.style[K]=F,d&&d(Pe,ct)}),se=ce((Pe,ct)=>{const ht=H();L.current&&z&&(L.current.style.position="");const{duration:Te,easing:Tt}=Fa({style:w,timeout:y,easing:c},{mode:"enter"});if(y==="auto"){const ut=I.transitions.getAutoHeightDuration(ht);Pe.style.transitionDuration=`${ut}ms`,N.current=ut}else Pe.style.transitionDuration=typeof Te=="string"?Te:`${Te}ms`;Pe.style[K]=`${ht}px`,Pe.style.transitionTimingFunction=Tt,m&&m(Pe,ct)}),je=ce((Pe,ct)=>{Pe.style[K]="auto",f&&f(Pe,ct)}),Ge=ce(Pe=>{Pe.style[K]=`${H()}px`,h&&h(Pe)}),Le=ce(g),_e=ce(Pe=>{const ct=H(),{duration:ht,easing:Te}=Fa({style:w,timeout:y,easing:c},{mode:"exit"});if(y==="auto"){const Tt=I.transitions.getAutoHeightDuration(ct);Pe.style.transitionDuration=`${Tt}ms`,N.current=Tt}else Pe.style.transitionDuration=typeof ht=="string"?ht:`${ht}ms`;Pe.style[K]=F,Pe.style.transitionTimingFunction=Te,R&&R(Pe)}),Ve=Pe=>{y==="auto"&&A.start(N.current||0,Pe),i&&i(Z.current,Pe)};return v.jsx(_,$({in:u,onEnter:V,onEntered:je,onEntering:se,onExit:Ge,onExited:Le,onExiting:_e,addEndListener:Ve,nodeRef:Z,timeout:y==="auto"?null:y},k,{children:(Pe,ct)=>v.jsx(Oz,$({as:l,className:De(P.root,s,{entered:P.entered,exited:!u&&F==="0px"&&P.hidden}[Pe]),style:$({[z?"minWidth":"minHeight"]:F},w),ref:le},ct,{ownerState:$({},E,{state:Pe}),children:v.jsx(jz,{ownerState:$({},E,{state:Pe}),className:P.wrapper,ref:L,children:v.jsx(Lz,{ownerState:$({},E,{state:Pe}),className:P.wrapperInner,children:o})})}))}))});IO.muiSupportAuto=!0;const MO=C.createContext({}),Iz=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],Mz=["component","slots","slotProps"],Nz=["component"];function h1(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:s,internalForwardedProps:a}=t,l=Ie(t,Iz),{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0}}=o,f=Ie(o,Mz),m=u[e]||r,h=xO(d[e],i),g=wO($({className:n},l,{externalForwardedProps:e==="root"?f:void 0,externalSlotProps:h})),{props:{component:R},internalRef:b}=g,w=Ie(g.props,Nz),y=un(b,h==null?void 0:h.ref,t.ref),_=s?s(w):{},k=$({},i,_),E=e==="root"?R||c:R,P=tu(m,$({},e==="root"&&!c&&!u[e]&&a,e!=="root"&&!u[e]&&a,w,E&&{as:E},{ref:y}),k);return Object.keys(_).forEach(I=>{delete P[I]}),[m,P]}function $z(e){return ft("MuiAccordion",e)}const gh=pt("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),Az=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],Dz=e=>{const{classes:t,square:n,expanded:r,disabled:i,disableGutters:o}=e;return mt({root:["root",!n&&"rounded",r&&"expanded",i&&"disabled",!o&&"gutters"],region:["region"]},$z,t)},Bz=Ee(us,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${gh.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${gh.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${gh.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}},({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${gh.expanded}`]:{margin:"16px 0"}}}]})),Fz=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiAccordion"}),{children:i,className:o,defaultExpanded:s=!1,disabled:a=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:f={},slotProps:m={},TransitionComponent:h,TransitionProps:g}=r,R=Ie(r,Az),[b,w]=Pu({controlled:c,default:s,name:"Accordion",state:"expanded"}),y=C.useCallback(z=>{w(!b),u&&u(z,!b)},[b,u,w]),[_,...k]=C.Children.toArray(i),E=C.useMemo(()=>({expanded:b,disabled:a,disableGutters:l,toggle:y}),[b,a,l,y]),P=$({},r,{square:d,disabled:a,disableGutters:l,expanded:b}),I=Dz(P),A=$({transition:h},f),L=$({transition:g},m),[N,F]=h1("transition",{elementType:IO,externalForwardedProps:{slots:A,slotProps:L},ownerState:P});return v.jsxs(Bz,$({className:De(I.root,o),ref:n,ownerState:P,square:d},R,{children:[v.jsx(MO.Provider,{value:E,children:_}),v.jsx(N,$({in:b,timeout:"auto"},F,{children:v.jsx("div",{"aria-labelledby":_.props.id,id:_.props["aria-controls"],role:"region",className:I.region,children:k})}))]}))});function zz(e){return ft("MuiAccordionDetails",e)}pt("MuiAccordionDetails",["root"]);const Uz=["className"],Wz=e=>{const{classes:t}=e;return mt({root:["root"]},zz,t)},Gz=Ee("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(1,2,2)})),Hz=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiAccordionDetails"}),{className:i}=r,o=Ie(r,Uz),s=r,a=Wz(s);return v.jsx(Gz,$({className:De(a.root,i),ref:n,ownerState:s},o))});function Vz(e){return ft("MuiAccordionSummary",e)}const nu=pt("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),Kz=["children","className","expandIcon","focusVisibleClassName","onClick"],qz=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return mt({root:["root",n&&"expanded",r&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},Vz,t)},Yz=Ee(Ao,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${nu.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${nu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${nu.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${nu.expanded}`]:{minHeight:64}}}]}}),Qz=Ee("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${nu.expanded}`]:{margin:"20px 0"}}}]})),Xz=Ee("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${nu.expanded}`]:{transform:"rotate(180deg)"}})),Jz=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiAccordionSummary"}),{children:i,className:o,expandIcon:s,focusVisibleClassName:a,onClick:l}=r,c=Ie(r,Kz),{disabled:u=!1,disableGutters:d,expanded:f,toggle:m}=C.useContext(MO),h=b=>{m&&m(b),l&&l(b)},g=$({},r,{expanded:f,disabled:u,disableGutters:d}),R=qz(g);return v.jsxs(Yz,$({focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":f,className:De(R.root,o),focusVisibleClassName:De(R.focusVisible,a),onClick:h,ref:n,ownerState:g},c,{children:[v.jsx(Qz,{className:R.content,ownerState:g,children:i}),s&&v.jsx(Xz,{className:R.expandIconWrapper,ownerState:g,children:s})]}))});function Zz(e){return ft("MuiAlert",e)}const wk=pt("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),e8=Wn(v.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),t8=Wn(v.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),n8=Wn(v.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),r8=Wn(v.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),i8=Wn(v.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),o8=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],s8=e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root",`color${we(n||r)}`,`${t}${we(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return mt(o,Zz,i)},a8=Ee(us,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${we(n.color||n.severity)}`]]}})(({theme:e})=>{const t=e.palette.mode==="light"?Dm:Bm,n=e.palette.mode==="light"?Bm:Dm;return $({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${wk.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${wk.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.dark).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:$({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)})}))]})}),l8=Ee("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),c8=Ee("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),xk=Ee("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),Sk={success:v.jsx(e8,{fontSize:"inherit"}),warning:v.jsx(t8,{fontSize:"inherit"}),error:v.jsx(n8,{fontSize:"inherit"}),info:v.jsx(r8,{fontSize:"inherit"})},u8=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiAlert"}),{action:i,children:o,className:s,closeText:a="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:f=Sk,onClose:m,role:h="alert",severity:g="success",slotProps:R={},slots:b={},variant:w="standard"}=r,y=Ie(r,o8),_=$({},r,{color:l,severity:g,variant:w,colorSeverity:l||g}),k=s8(_),E={slots:$({closeButton:c.CloseButton,closeIcon:c.CloseIcon},b),slotProps:$({},u,R)},[P,I]=h1("closeButton",{elementType:Fo,externalForwardedProps:E,ownerState:_}),[A,L]=h1("closeIcon",{elementType:i8,externalForwardedProps:E,ownerState:_});return v.jsxs(a8,$({role:h,elevation:0,ownerState:_,className:De(k.root,s),ref:n},y,{children:[d!==!1?v.jsx(l8,{ownerState:_,className:k.icon,children:d||f[g]||Sk[g]}):null,v.jsx(c8,{ownerState:_,className:k.message,children:o}),i!=null?v.jsx(xk,{ownerState:_,className:k.action,children:i}):null,i==null&&m?v.jsx(xk,{ownerState:_,className:k.action,children:v.jsx(P,$({size:"small","aria-label":a,title:a,color:"inherit",onClick:m},I,{children:v.jsx(A,$({fontSize:"small"},L))}))}):null]}))});var Mx={};Object.defineProperty(Mx,"__esModule",{value:!0});var NO=Mx.default=void 0,d8=p8(C),f8=qT;function $O(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return($O=function(r){return r?n:t})(e)}function p8(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=$O(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function h8(e){return Object.keys(e).length===0}function m8(e=null){const t=d8.useContext(f8.ThemeContext);return!t||h8(t)?e:t}NO=Mx.default=m8;var oi="top",no="bottom",ro="right",si="left",Nx="auto",wp=[oi,no,ro,si],Ou="start",Gf="end",g8="clippingParents",AO="viewport",_d="popper",v8="reference",_k=wp.reduce(function(e,t){return e.concat([t+"-"+Ou,t+"-"+Gf])},[]),DO=[].concat(wp,[Nx]).reduce(function(e,t){return e.concat([t,t+"-"+Ou,t+"-"+Gf])},[]),y8="beforeRead",b8="read",w8="afterRead",x8="beforeMain",S8="main",_8="afterMain",C8="beforeWrite",k8="write",E8="afterWrite",R8=[y8,b8,w8,x8,S8,_8,C8,k8,E8];function as(e){return e?(e.nodeName||"").toLowerCase():null}function Ti(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ql(e){var t=Ti(e).Element;return e instanceof t||e instanceof Element}function Xi(e){var t=Ti(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function $x(e){if(typeof ShadowRoot>"u")return!1;var t=Ti(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function P8(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Xi(o)||!as(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function T8(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!Xi(i)||!as(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const O8={name:"applyStyles",enabled:!0,phase:"write",fn:P8,effect:T8,requires:["computeStyles"]};function os(e){return e.split("-")[0]}var Ml=Math.max,Hm=Math.min,ju=Math.round;function m1(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function BO(){return!/^((?!chrome|android).)*safari/i.test(m1())}function Lu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Xi(e)&&(i=e.offsetWidth>0&&ju(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ju(r.height)/e.offsetHeight||1);var s=ql(e)?Ti(e):window,a=s.visualViewport,l=!BO()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/o,d=r.width/i,f=r.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function Ax(e){var t=Lu(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function FO(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&$x(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function zs(e){return Ti(e).getComputedStyle(e)}function j8(e){return["table","td","th"].indexOf(as(e))>=0}function Ya(e){return((ql(e)?e.ownerDocument:e.document)||window.document).documentElement}function Av(e){return as(e)==="html"?e:e.assignedSlot||e.parentNode||($x(e)?e.host:null)||Ya(e)}function Ck(e){return!Xi(e)||zs(e).position==="fixed"?null:e.offsetParent}function L8(e){var t=/firefox/i.test(m1()),n=/Trident/i.test(m1());if(n&&Xi(e)){var r=zs(e);if(r.position==="fixed")return null}var i=Av(e);for($x(i)&&(i=i.host);Xi(i)&&["html","body"].indexOf(as(i))<0;){var o=zs(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function xp(e){for(var t=Ti(e),n=Ck(e);n&&j8(n)&&zs(n).position==="static";)n=Ck(n);return n&&(as(n)==="html"||as(n)==="body"&&zs(n).position==="static")?t:n||L8(e)||t}function Dx(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function of(e,t,n){return Ml(e,Hm(t,n))}function I8(e,t,n){var r=of(e,t,n);return r>n?n:r}function zO(){return{top:0,right:0,bottom:0,left:0}}function UO(e){return Object.assign({},zO(),e)}function WO(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var M8=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,UO(typeof t!="number"?t:WO(t,wp))};function N8(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=os(n.placement),l=Dx(a),c=[si,ro].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var d=M8(i.padding,n),f=Ax(o),m=l==="y"?oi:si,h=l==="y"?no:ro,g=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],R=s[l]-n.rects.reference[l],b=xp(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,y=g/2-R/2,_=d[m],k=w-f[u]-d[h],E=w/2-f[u]/2+y,P=of(_,E,k),I=l;n.modifiersData[r]=(t={},t[I]=P,t.centerOffset=P-E,t)}}function $8(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||FO(t.elements.popper,i)&&(t.elements.arrow=i))}const A8={name:"arrow",enabled:!0,phase:"main",fn:N8,effect:$8,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Iu(e){return e.split("-")[1]}var D8={top:"auto",right:"auto",bottom:"auto",left:"auto"};function B8(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:ju(n*i)/i||0,y:ju(r*i)/i||0}}function kk(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=s.x,m=f===void 0?0:f,h=s.y,g=h===void 0?0:h,R=typeof u=="function"?u({x:m,y:g}):{x:m,y:g};m=R.x,g=R.y;var b=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),y=si,_=oi,k=window;if(c){var E=xp(n),P="clientHeight",I="clientWidth";if(E===Ti(n)&&(E=Ya(n),zs(E).position!=="static"&&a==="absolute"&&(P="scrollHeight",I="scrollWidth")),E=E,i===oi||(i===si||i===ro)&&o===Gf){_=no;var A=d&&E===k&&k.visualViewport?k.visualViewport.height:E[P];g-=A-r.height,g*=l?1:-1}if(i===si||(i===oi||i===no)&&o===Gf){y=ro;var L=d&&E===k&&k.visualViewport?k.visualViewport.width:E[I];m-=L-r.width,m*=l?1:-1}}var N=Object.assign({position:a},c&&D8),F=u===!0?B8({x:m,y:g},Ti(n)):{x:m,y:g};if(m=F.x,g=F.y,l){var z;return Object.assign({},N,(z={},z[_]=w?"0":"",z[y]=b?"0":"",z.transform=(k.devicePixelRatio||1)<=1?"translate("+m+"px, "+g+"px)":"translate3d("+m+"px, "+g+"px, 0)",z))}return Object.assign({},N,(t={},t[_]=w?g+"px":"",t[y]=b?m+"px":"",t.transform="",t))}function F8(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:os(t.placement),variation:Iu(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,kk(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,kk(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const z8={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:F8,data:{}};var vh={passive:!0};function U8(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=Ti(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,vh)}),a&&l.addEventListener("resize",n.update,vh),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,vh)}),a&&l.removeEventListener("resize",n.update,vh)}}const W8={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:U8,data:{}};var G8={left:"right",right:"left",bottom:"top",top:"bottom"};function Zh(e){return e.replace(/left|right|bottom|top/g,function(t){return G8[t]})}var H8={start:"end",end:"start"};function Ek(e){return e.replace(/start|end/g,function(t){return H8[t]})}function Bx(e){var t=Ti(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Fx(e){return Lu(Ya(e)).left+Bx(e).scrollLeft}function V8(e,t){var n=Ti(e),r=Ya(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=BO();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Fx(e),y:l}}function K8(e){var t,n=Ya(e),r=Bx(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ml(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Ml(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Fx(e),l=-r.scrollTop;return zs(i||n).direction==="rtl"&&(a+=Ml(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function zx(e){var t=zs(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function GO(e){return["html","body","#document"].indexOf(as(e))>=0?e.ownerDocument.body:Xi(e)&&zx(e)?e:GO(Av(e))}function sf(e,t){var n;t===void 0&&(t=[]);var r=GO(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ti(r),s=i?[o].concat(o.visualViewport||[],zx(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(sf(Av(s)))}function g1(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function q8(e,t){var n=Lu(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Rk(e,t,n){return t===AO?g1(V8(e,n)):ql(t)?q8(t,n):g1(K8(Ya(e)))}function Y8(e){var t=sf(Av(e)),n=["absolute","fixed"].indexOf(zs(e).position)>=0,r=n&&Xi(e)?xp(e):e;return ql(r)?t.filter(function(i){return ql(i)&&FO(i,r)&&as(i)!=="body"}):[]}function Q8(e,t,n,r){var i=t==="clippingParents"?Y8(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var u=Rk(e,c,r);return l.top=Ml(u.top,l.top),l.right=Hm(u.right,l.right),l.bottom=Hm(u.bottom,l.bottom),l.left=Ml(u.left,l.left),l},Rk(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function HO(e){var t=e.reference,n=e.element,r=e.placement,i=r?os(r):null,o=r?Iu(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case oi:l={x:s,y:t.y-n.height};break;case no:l={x:s,y:t.y+t.height};break;case ro:l={x:t.x+t.width,y:a};break;case si:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?Dx(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Ou:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Gf:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Hf(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?g8:a,c=n.rootBoundary,u=c===void 0?AO:c,d=n.elementContext,f=d===void 0?_d:d,m=n.altBoundary,h=m===void 0?!1:m,g=n.padding,R=g===void 0?0:g,b=UO(typeof R!="number"?R:WO(R,wp)),w=f===_d?v8:_d,y=e.rects.popper,_=e.elements[h?w:f],k=Q8(ql(_)?_:_.contextElement||Ya(e.elements.popper),l,u,s),E=Lu(e.elements.reference),P=HO({reference:E,element:y,strategy:"absolute",placement:i}),I=g1(Object.assign({},y,P)),A=f===_d?I:E,L={top:k.top-A.top+b.top,bottom:A.bottom-k.bottom+b.bottom,left:k.left-A.left+b.left,right:A.right-k.right+b.right},N=e.modifiersData.offset;if(f===_d&&N){var F=N[i];Object.keys(L).forEach(function(z){var K=[ro,no].indexOf(z)>=0?1:-1,Z=[oi,no].indexOf(z)>=0?"y":"x";L[z]+=F[Z]*K})}return L}function X8(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?DO:l,u=Iu(r),d=u?a?_k:_k.filter(function(h){return Iu(h)===u}):wp,f=d.filter(function(h){return c.indexOf(h)>=0});f.length===0&&(f=d);var m=f.reduce(function(h,g){return h[g]=Hf(e,{placement:g,boundary:i,rootBoundary:o,padding:s})[os(g)],h},{});return Object.keys(m).sort(function(h,g){return m[h]-m[g]})}function J8(e){if(os(e)===Nx)return[];var t=Zh(e);return[Ek(e),t,Ek(t)]}function Z8(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,m=n.flipVariations,h=m===void 0?!0:m,g=n.allowedAutoPlacements,R=t.options.placement,b=os(R),w=b===R,y=l||(w||!h?[Zh(R)]:J8(R)),_=[R].concat(y).reduce(function(_e,Ve){return _e.concat(os(Ve)===Nx?X8(t,{placement:Ve,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:g}):Ve)},[]),k=t.rects.reference,E=t.rects.popper,P=new Map,I=!0,A=_[0],L=0;L<_.length;L++){var N=_[L],F=os(N),z=Iu(N)===Ou,K=[oi,no].indexOf(F)>=0,Z=K?"width":"height",le=Hf(t,{placement:N,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),ce=K?z?ro:si:z?no:oi;k[Z]>E[Z]&&(ce=Zh(ce));var H=Zh(ce),V=[];if(o&&V.push(le[F]<=0),a&&V.push(le[ce]<=0,le[H]<=0),V.every(function(_e){return _e})){A=N,I=!1;break}P.set(N,V)}if(I)for(var se=h?3:1,je=function(Ve){var Pe=_.find(function(ct){var ht=P.get(ct);if(ht)return ht.slice(0,Ve).every(function(Te){return Te})});if(Pe)return A=Pe,"break"},Ge=se;Ge>0;Ge--){var Le=je(Ge);if(Le==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const eU={name:"flip",enabled:!0,phase:"main",fn:Z8,requiresIfExists:["offset"],data:{_skip:!1}};function Pk(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Tk(e){return[oi,ro,no,si].some(function(t){return e[t]>=0})}function tU(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Hf(t,{elementContext:"reference"}),a=Hf(t,{altBoundary:!0}),l=Pk(s,r),c=Pk(a,i,o),u=Tk(l),d=Tk(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const nU={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:tU};function rU(e,t,n){var r=os(e),i=[si,oi].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[si,ro].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function iU(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=DO.reduce(function(u,d){return u[d]=rU(d,t.rects,o),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const oU={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:iU};function sU(e){var t=e.state,n=e.name;t.modifiersData[n]=HO({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const aU={name:"popperOffsets",enabled:!0,phase:"read",fn:sU,data:{}};function lU(e){return e==="x"?"y":"x"}function cU(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,m=f===void 0?!0:f,h=n.tetherOffset,g=h===void 0?0:h,R=Hf(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=os(t.placement),w=Iu(t.placement),y=!w,_=Dx(b),k=lU(_),E=t.modifiersData.popperOffsets,P=t.rects.reference,I=t.rects.popper,A=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,L=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(E){if(o){var z,K=_==="y"?oi:si,Z=_==="y"?no:ro,le=_==="y"?"height":"width",ce=E[_],H=ce+R[K],V=ce-R[Z],se=m?-I[le]/2:0,je=w===Ou?P[le]:I[le],Ge=w===Ou?-I[le]:-P[le],Le=t.elements.arrow,_e=m&&Le?Ax(Le):{width:0,height:0},Ve=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:zO(),Pe=Ve[K],ct=Ve[Z],ht=of(0,P[le],_e[le]),Te=y?P[le]/2-se-ht-Pe-L.mainAxis:je-ht-Pe-L.mainAxis,Tt=y?-P[le]/2+se+ht+ct+L.mainAxis:Ge+ht+ct+L.mainAxis,ut=t.elements.arrow&&xp(t.elements.arrow),ze=ut?_==="y"?ut.clientTop||0:ut.clientLeft||0:0,Ze=(z=N==null?void 0:N[_])!=null?z:0,yt=ce+Te-Ze-ze,ee=ce+Tt-Ze,me=of(m?Hm(H,yt):H,ce,m?Ml(V,ee):V);E[_]=me,F[_]=me-ce}if(a){var Ce,Ue=_==="x"?oi:si,W=_==="x"?no:ro,S=E[k],O=k==="y"?"height":"width",D=S+R[Ue],q=S-R[W],X=[oi,si].indexOf(b)!==-1,pe=(Ce=N==null?void 0:N[k])!=null?Ce:0,Fe=X?D:S-P[O]-I[O]-pe+L.altAxis,rt=X?S+P[O]+I[O]-pe-L.altAxis:q,Xe=m&&X?I8(Fe,S,rt):of(m?Fe:D,S,m?rt:q);E[k]=Xe,F[k]=Xe-S}t.modifiersData[r]=F}}const uU={name:"preventOverflow",enabled:!0,phase:"main",fn:cU,requiresIfExists:["offset"]};function dU(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function fU(e){return e===Ti(e)||!Xi(e)?Bx(e):dU(e)}function pU(e){var t=e.getBoundingClientRect(),n=ju(t.width)/e.offsetWidth||1,r=ju(t.height)/e.offsetHeight||1;return n!==1||r!==1}function hU(e,t,n){n===void 0&&(n=!1);var r=Xi(t),i=Xi(t)&&pU(t),o=Ya(t),s=Lu(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((as(t)!=="body"||zx(o))&&(a=fU(t)),Xi(t)?(l=Lu(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Fx(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function mU(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function gU(e){var t=mU(e);return R8.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function vU(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function yU(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ok={placement:"bottom",modifiers:[],strategy:"absolute"};function jk(){for(var e=arguments.length,t=new Array(e),n=0;n{const{classes:t}=e;return mt({root:["root"]},SU,t)},PU={},TU=C.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:a,modifiers:l,open:c,placement:u,popperOptions:d,popperRef:f,slotProps:m={},slots:h={},TransitionProps:g}=t,R=Ie(t,_U),b=C.useRef(null),w=un(b,n),y=C.useRef(null),_=un(y,f),k=C.useRef(_);li(()=>{k.current=_},[_]),C.useImperativeHandle(f,()=>y.current,[]);const E=kU(u,s),[P,I]=C.useState(E),[A,L]=C.useState(v1(i));C.useEffect(()=>{y.current&&y.current.forceUpdate()}),C.useEffect(()=>{i&&L(v1(i))},[i]),li(()=>{if(!A||!c)return;const Z=H=>{I(H.placement)};let le=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:H})=>{Z(H)}}];l!=null&&(le=le.concat(l)),d&&d.modifiers!=null&&(le=le.concat(d.modifiers));const ce=xU(A,b.current,$({placement:E},d,{modifiers:le}));return k.current(ce),()=>{ce.destroy(),k.current(null)}},[A,a,l,c,d,E]);const N={placement:P};g!==null&&(N.TransitionProps=g);const F=RU(t),z=(r=h.root)!=null?r:"div",K=$o({elementType:z,externalSlotProps:m.root,externalForwardedProps:R,additionalProps:{role:"tooltip",ref:w},ownerState:t,className:F.root});return v.jsx(z,$({},K,{children:typeof o=="function"?o(N):o}))}),OU=C.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=PU,popperRef:m,style:h,transition:g=!1,slotProps:R={},slots:b={}}=t,w=Ie(t,CU),[y,_]=C.useState(!0),k=()=>{_(!1)},E=()=>{_(!0)};if(!l&&!u&&(!g||y))return null;let P;if(o)P=o;else if(r){const L=v1(r);P=L&&EU(L)?qn(L).body:qn(null).body}const I=!u&&l&&(!g||y)?"none":void 0,A=g?{in:u,onEnter:k,onExited:E}:void 0;return v.jsx(Ox,{disablePortal:a,container:P,children:v.jsx(TU,$({anchorEl:r,direction:s,disablePortal:a,modifiers:c,ref:n,open:g?!y:u,placement:d,popperOptions:f,popperRef:m,slotProps:R,slots:b},w,{style:$({position:"fixed",top:0,left:0,display:I},h),TransitionProps:A,children:i}))})}),jU=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],LU=Ee(OU,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),VO=C.forwardRef(function(t,n){var r;const i=NO(),o=gt({props:t,name:"MuiPopper"}),{anchorEl:s,component:a,components:l,componentsProps:c,container:u,disablePortal:d,keepMounted:f,modifiers:m,open:h,placement:g,popperOptions:R,popperRef:b,transition:w,slots:y,slotProps:_}=o,k=Ie(o,jU),E=(r=y==null?void 0:y.root)!=null?r:l==null?void 0:l.Root,P=$({anchorEl:s,container:u,disablePortal:d,keepMounted:f,modifiers:m,open:h,placement:g,popperOptions:R,popperRef:b,transition:w},k);return v.jsx(LU,$({as:a,direction:i==null?void 0:i.direction,slots:{root:E},slotProps:_??c},P,{ref:n}))});function IU(e){return ft("MuiListSubheader",e)}pt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const MU=["className","color","component","disableGutters","disableSticky","inset"],NU=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${we(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return mt(s,IU,t)},$U=Ee("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${we(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>$({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),KO=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:a=!1,disableSticky:l=!1,inset:c=!1}=r,u=Ie(r,MU),d=$({},r,{color:o,component:s,disableGutters:a,disableSticky:l,inset:c}),f=NU(d);return v.jsx($U,$({as:s,className:De(f.root,i),ref:n,ownerState:d},u))});KO.muiSkipListHighlight=!0;const AU=Wn(v.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function DU(e){return ft("MuiChip",e)}const Wt=pt("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),BU=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],FU=e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:s,clickable:a,variant:l}=e,c={root:["root",l,n&&"disabled",`size${we(r)}`,`color${we(i)}`,a&&"clickable",a&&`clickableColor${we(i)}`,s&&"deletable",s&&`deletableColor${we(i)}`,`${l}${we(i)}`],label:["label",`label${we(r)}`],avatar:["avatar",`avatar${we(r)}`,`avatarColor${we(i)}`],icon:["icon",`icon${we(r)}`,`iconColor${we(o)}`],deleteIcon:["deleteIcon",`deleteIcon${we(r)}`,`deleteIconColor${we(i)}`,`deleteIcon${we(l)}Color${we(i)}`]};return mt(c,DU,t)},zU=Ee("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:s,size:a,variant:l}=n;return[{[`& .${Wt.avatar}`]:t.avatar},{[`& .${Wt.avatar}`]:t[`avatar${we(a)}`]},{[`& .${Wt.avatar}`]:t[`avatarColor${we(r)}`]},{[`& .${Wt.icon}`]:t.icon},{[`& .${Wt.icon}`]:t[`icon${we(a)}`]},{[`& .${Wt.icon}`]:t[`iconColor${we(i)}`]},{[`& .${Wt.deleteIcon}`]:t.deleteIcon},{[`& .${Wt.deleteIcon}`]:t[`deleteIcon${we(a)}`]},{[`& .${Wt.deleteIcon}`]:t[`deleteIconColor${we(r)}`]},{[`& .${Wt.deleteIcon}`]:t[`deleteIcon${we(l)}Color${we(r)}`]},t.root,t[`size${we(a)}`],t[`color${we(r)}`],o&&t.clickable,o&&r!=="default"&&t[`clickableColor${we(r)})`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${we(r)}`],t[l],t[`${l}${we(r)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return $({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Wt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Wt.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${Wt.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Wt.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Wt.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Wt.icon}`]:$({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&$({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},t.color!=="default"&&{color:"inherit"})),[`& .${Wt.deleteIcon}`]:$({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:At(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:At(e.palette.text.primary,.4)}},t.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},t.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:At(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},t.size==="small"&&{height:24},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${Wt.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:At(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${Wt.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>$({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:At(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Wt.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:At(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&t.color!=="default"&&{[`&:hover, &.${Wt.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>$({},t.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Wt.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Wt.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Wt.avatar}`]:{marginLeft:4},[`& .${Wt.avatarSmall}`]:{marginLeft:2},[`& .${Wt.icon}`]:{marginLeft:4},[`& .${Wt.iconSmall}`]:{marginLeft:2},[`& .${Wt.deleteIcon}`]:{marginRight:5},[`& .${Wt.deleteIconSmall}`]:{marginRight:3}},t.variant==="outlined"&&t.color!=="default"&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:At(e.palette[t.color].main,.7)}`,[`&.${Wt.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Wt.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:At(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Wt.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:At(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),UU=Ee("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${we(r)}`]]}})(({ownerState:e})=>$({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function Lk(e){return e.key==="Backspace"||e.key==="Delete"}const Ux=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiChip"}),{avatar:i,className:o,clickable:s,color:a="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:f,onClick:m,onDelete:h,onKeyDown:g,onKeyUp:R,size:b="medium",variant:w="filled",tabIndex:y,skipFocusWhenDisabled:_=!1}=r,k=Ie(r,BU),E=C.useRef(null),P=un(E,n),I=V=>{V.stopPropagation(),h&&h(V)},A=V=>{V.currentTarget===V.target&&Lk(V)&&V.preventDefault(),g&&g(V)},L=V=>{V.currentTarget===V.target&&(h&&Lk(V)?h(V):V.key==="Escape"&&E.current&&E.current.blur()),R&&R(V)},N=s!==!1&&m?!0:s,F=N||h?Ao:l||"div",z=$({},r,{component:F,disabled:u,size:b,color:a,iconColor:C.isValidElement(d)&&d.props.color||a,onDelete:!!h,clickable:N,variant:w}),K=FU(z),Z=F===Ao?$({component:l||"div",focusVisibleClassName:K.focusVisible},h&&{disableRipple:!0}):{};let le=null;h&&(le=c&&C.isValidElement(c)?C.cloneElement(c,{className:De(c.props.className,K.deleteIcon),onClick:I}):v.jsx(AU,{className:De(K.deleteIcon),onClick:I}));let ce=null;i&&C.isValidElement(i)&&(ce=C.cloneElement(i,{className:De(K.avatar,i.props.className)}));let H=null;return d&&C.isValidElement(d)&&(H=C.cloneElement(d,{className:De(K.icon,d.props.className)})),v.jsxs(zU,$({as:F,className:De(K.root,o),disabled:N&&u?!0:void 0,onClick:m,onKeyDown:A,onKeyUp:L,ref:P,tabIndex:_&&u?-1:y,ownerState:z},Z,k,{children:[ce||H,v.jsx(UU,{className:De(K.label),ownerState:z,children:f}),le]}))}),WU=["onChange","maxRows","minRows","style","value"];function yh(e){return parseInt(e,10)||0}const GU={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function HU(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const VU=C.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=t,l=Ie(t,WU),{current:c}=C.useRef(a!=null),u=C.useRef(null),d=un(n,u),f=C.useRef(null),m=C.useRef(null),h=C.useCallback(()=>{const b=u.current,y=ss(b).getComputedStyle(b);if(y.width==="0px")return{outerHeightStyle:0,overflowing:!1};const _=m.current;_.style.width=y.width,_.value=b.value||t.placeholder||"x",_.value.slice(-1)===` +`&&(_.value+=" ");const k=y.boxSizing,E=yh(y.paddingBottom)+yh(y.paddingTop),P=yh(y.borderBottomWidth)+yh(y.borderTopWidth),I=_.scrollHeight;_.value="x";const A=_.scrollHeight;let L=I;o&&(L=Math.max(Number(o)*A,L)),i&&(L=Math.min(Number(i)*A,L)),L=Math.max(L,A);const N=L+(k==="border-box"?E+P:0),F=Math.abs(L-I)<=1;return{outerHeightStyle:N,overflowing:F}},[i,o,t.placeholder]),g=C.useCallback(()=>{const b=h();if(HU(b))return;const w=b.outerHeightStyle,y=u.current;f.current!==w&&(f.current=w,y.style.height=`${w}px`),y.style.overflow=b.overflowing?"hidden":""},[h]);li(()=>{const b=()=>{g()};let w;const y=Cv(b),_=u.current,k=ss(_);k.addEventListener("resize",y);let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(b),E.observe(_)),()=>{y.clear(),cancelAnimationFrame(w),k.removeEventListener("resize",y),E&&E.disconnect()}},[h,g]),li(()=>{g()});const R=b=>{c||g(),r&&r(b)};return v.jsxs(C.Fragment,{children:[v.jsx("textarea",$({value:a,onChange:R,ref:d,rows:o,style:s},l)),v.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:m,tabIndex:-1,style:$({},GU.shadow,s,{paddingTop:0,paddingBottom:0})})]})});function lc({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const Wx=C.createContext(void 0);function Qa(){return C.useContext(Wx)}function qO(e){return v.jsx(w3,$({},e,{defaultTheme:_x,themeId:Ru}))}function Ik(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Vm(e,t=!1){return e&&(Ik(e.value)&&e.value!==""||t&&Ik(e.defaultValue)&&e.defaultValue!=="")}function KU(e){return e.startAdornment}function qU(e){return ft("MuiInputBase",e)}const Mu=pt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),YU=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Dv=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${we(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Bv=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},QU=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:m,type:h}=e,g={root:["root",`color${we(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",f&&f!=="medium"&&`size${we(f)}`,u&&"multiline",m&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",h==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return mt(g,qU,t)},Fv=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Dv})(({theme:e,ownerState:t})=>$({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Mu.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&$({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),zv=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Bv})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=$({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),i={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return $({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Mu.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Mu.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),XU=v.jsx(qO,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),JU=C.forwardRef(function(t,n){var r;const i=gt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:m,endAdornment:h,fullWidth:g=!1,id:R,inputComponent:b="input",inputProps:w={},inputRef:y,maxRows:_,minRows:k,multiline:E=!1,name:P,onBlur:I,onChange:A,onClick:L,onFocus:N,onKeyDown:F,onKeyUp:z,placeholder:K,readOnly:Z,renderSuffix:le,rows:ce,slotProps:H={},slots:V={},startAdornment:se,type:je="text",value:Ge}=i,Le=Ie(i,YU),_e=w.value!=null?w.value:Ge,{current:Ve}=C.useRef(_e!=null),Pe=C.useRef(),ct=C.useCallback(Xe=>{},[]),ht=un(Pe,y,w.ref,ct),[Te,Tt]=C.useState(!1),ut=Qa(),ze=lc({props:i,muiFormControl:ut,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ze.focused=ut?ut.focused:Te,C.useEffect(()=>{!ut&&f&&Te&&(Tt(!1),I&&I())},[ut,f,Te,I]);const Ze=ut&&ut.onFilled,yt=ut&&ut.onEmpty,ee=C.useCallback(Xe=>{Vm(Xe)?Ze&&Ze():yt&&yt()},[Ze,yt]);li(()=>{Ve&&ee({value:_e})},[_e,ee,Ve]);const me=Xe=>{if(ze.disabled){Xe.stopPropagation();return}N&&N(Xe),w.onFocus&&w.onFocus(Xe),ut&&ut.onFocus?ut.onFocus(Xe):Tt(!0)},Ce=Xe=>{I&&I(Xe),w.onBlur&&w.onBlur(Xe),ut&&ut.onBlur?ut.onBlur(Xe):Tt(!1)},Ue=(Xe,...Oe)=>{if(!Ve){const et=Xe.target||Pe.current;if(et==null)throw new Error(Vl(1));ee({value:et.value})}w.onChange&&w.onChange(Xe,...Oe),A&&A(Xe,...Oe)};C.useEffect(()=>{ee(Pe.current)},[]);const W=Xe=>{Pe.current&&Xe.currentTarget===Xe.target&&Pe.current.focus(),L&&L(Xe)};let S=b,O=w;E&&S==="input"&&(ce?O=$({type:void 0,minRows:ce,maxRows:ce},O):O=$({type:void 0,maxRows:_,minRows:k},O),S=VU);const D=Xe=>{ee(Xe.animationName==="mui-auto-fill-cancel"?Pe.current:{value:"x"})};C.useEffect(()=>{ut&&ut.setAdornedStart(!!se)},[ut,se]);const q=$({},i,{color:ze.color||"primary",disabled:ze.disabled,endAdornment:h,error:ze.error,focused:ze.focused,formControl:ut,fullWidth:g,hiddenLabel:ze.hiddenLabel,multiline:E,size:ze.size,startAdornment:se,type:je}),X=QU(q),pe=V.root||c.Root||Fv,Fe=H.root||u.root||{},rt=V.input||c.Input||zv;return O=$({},O,(r=H.input)!=null?r:u.input),v.jsxs(C.Fragment,{children:[!m&&XU,v.jsxs(pe,$({},Fe,!Tu(pe)&&{ownerState:$({},q,Fe.ownerState)},{ref:n,onClick:W},Le,{className:De(X.root,Fe.className,l,Z&&"MuiInputBase-readOnly"),children:[se,v.jsx(Wx.Provider,{value:null,children:v.jsx(rt,$({ownerState:q,"aria-invalid":ze.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:d,disabled:ze.disabled,id:R,onAnimationStart:D,name:P,placeholder:K,readOnly:Z,required:ze.required,rows:ce,value:_e,onKeyDown:F,onKeyUp:z,type:je},O,!Tu(rt)&&{as:S,ownerState:$({},q,O.ownerState)},{ref:ht,className:De(X.input,O.className,Z&&"MuiInputBase-readOnly"),onBlur:Ce,onChange:Ue,onFocus:me}))}),h,le?le($({},ze,{startAdornment:se})):null]}))]})}),Gx=JU;function ZU(e){return ft("MuiInput",e)}const Cd=$({},Mu,pt("MuiInput",["root","underline","input"]));function e9(e){return ft("MuiOutlinedInput",e)}const ca=$({},Mu,pt("MuiOutlinedInput",["root","notchedOutline","input"]));function t9(e){return ft("MuiFilledInput",e)}const dl=$({},Mu,pt("MuiFilledInput",["root","underline","input"])),n9=Wn(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function r9(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,o=bO({badgeContent:t,max:r});let s=n;n===!1&&t===0&&!i&&(s=!0);const{badgeContent:a,max:l=r}=s?o:e,c=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:c}}function i9(e){return ft("MuiBadge",e)}const ua=pt("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),o9=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],f0=10,p0=4,s9=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:i,variant:o,classes:s={}}=e,a={root:["root"],badge:["badge",o,r&&"invisible",`anchorOrigin${we(n.vertical)}${we(n.horizontal)}`,`anchorOrigin${we(n.vertical)}${we(n.horizontal)}${we(i)}`,`overlap${we(i)}`,t!=="default"&&`color${we(t)}`]};return mt(a,i9,s)},a9=Ee("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),l9=Ee("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${we(n.anchorOrigin.vertical)}${we(n.anchorOrigin.horizontal)}${we(n.overlap)}`],n.color!=="default"&&t[`color${we(n.color)}`],n.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:f0*2,lineHeight:1,padding:"0 6px",height:f0*2,borderRadius:f0,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r,i;return((r=e.vars)!=null?r:e).palette[n].main&&((i=e.vars)!=null?i:e).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:p0,height:p0*2,minWidth:p0*2,padding:0}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ua.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),c9=C.forwardRef(function(t,n){var r,i,o,s,a,l;const c=gt({props:t,name:"MuiBadge"}),{anchorOrigin:u={vertical:"top",horizontal:"right"},className:d,component:f,components:m={},componentsProps:h={},children:g,overlap:R="rectangular",color:b="default",invisible:w=!1,max:y=99,badgeContent:_,slots:k,slotProps:E,showZero:P=!1,variant:I="standard"}=c,A=Ie(c,o9),{badgeContent:L,invisible:N,max:F,displayValue:z}=r9({max:y,invisible:w,badgeContent:_,showZero:P}),K=bO({anchorOrigin:u,color:b,overlap:R,variant:I,badgeContent:_}),Z=N||L==null&&I!=="dot",{color:le=b,overlap:ce=R,anchorOrigin:H=u,variant:V=I}=Z?K:c,se=V!=="dot"?z:void 0,je=$({},c,{badgeContent:L,invisible:Z,max:F,displayValue:se,showZero:P,anchorOrigin:H,color:le,overlap:ce,variant:V}),Ge=s9(je),Le=(r=(i=k==null?void 0:k.root)!=null?i:m.Root)!=null?r:a9,_e=(o=(s=k==null?void 0:k.badge)!=null?s:m.Badge)!=null?o:l9,Ve=(a=E==null?void 0:E.root)!=null?a:h.root,Pe=(l=E==null?void 0:E.badge)!=null?l:h.badge,ct=$o({elementType:Le,externalSlotProps:Ve,externalForwardedProps:A,additionalProps:{ref:n,as:f},ownerState:je,className:De(Ve==null?void 0:Ve.className,Ge.root,d)}),ht=$o({elementType:_e,externalSlotProps:Pe,ownerState:je,className:De(Ge.badge,Pe==null?void 0:Pe.className)});return v.jsxs(Le,$({},ct,{children:[g,v.jsx(_e,$({},ht,{children:se}))]}))}),u9=pt("MuiBox",["root"]),d9=Sx(),rn=S3({themeId:Ru,defaultTheme:d9,defaultClassName:u9.root,generateClassName:yx.generate}),f9=Wn(v.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),p9=["slots","slotProps"],h9=Ee(Ao)(({theme:e})=>$({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":$({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":$({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:l1(e.palette.grey[200],.12)}:{backgroundColor:l1(e.palette.grey[600],.12)})})),m9=Ee(f9)({width:24,height:16});function g9(e){const{slots:t={},slotProps:n={}}=e,r=Ie(e,p9),i=e;return v.jsx("li",{children:v.jsx(h9,$({focusRipple:!0},r,{ownerState:i,children:v.jsx(m9,$({as:t.CollapsedIcon,ownerState:i},n.collapsedIcon))}))})}function v9(e){return ft("MuiBreadcrumbs",e)}const y9=pt("MuiBreadcrumbs",["root","ol","li","separator"]),b9=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],w9=e=>{const{classes:t}=e;return mt({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},v9,t)},x9=Ee(_t,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${y9.li}`]:t.li},t.root]})({}),S9=Ee("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),_9=Ee("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function C9(e,t,n,r){return e.reduce((i,o,s)=>(s{const I=()=>{R(!0);const A=_.current.querySelector("a[href],button,[tabindex]");A&&A.focus()};return d+u>=P.length?P:[...P.slice(0,d),v.jsx(g9,{"aria-label":c,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:y},onClick:I},"ellipsis"),...P.slice(P.length-u,P.length)]},E=C.Children.toArray(i).filter(P=>C.isValidElement(P)).map((P,I)=>v.jsx("li",{className:w.li,children:P},`child-${I}`));return v.jsx(x9,$({ref:n,component:s,color:"text.secondary",className:De(w.root,o),ownerState:b},h,{children:v.jsx(S9,{className:w.ol,ref:_,ownerState:b,children:C9(g||f&&E.length<=f?E:k(E),w.separator,m,b)})}))});function k9(e){return ft("MuiButton",e)}const bh=pt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),YO=C.createContext({}),QO=C.createContext(void 0),E9=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],R9=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,a={root:["root",o,`${o}${we(t)}`,`size${we(i)}`,`${o}Size${we(i)}`,`color${we(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${we(i)}`],endIcon:["icon","endIcon",`iconSize${we(i)}`]},l=mt(a,k9,s);return $({},s,l)},XO=e=>$({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),P9=Ee(Ao,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${we(n.color)}`],t[`size${we(n.size)}`],t[`${n.variant}Size${we(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],o=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return $({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":$({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${bh.focusVisible}`]:$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${bh.disabled}`]:$({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${At(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${bh.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${bh.disabled}`]:{boxShadow:"none"}}),T9=Ee("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${we(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},XO(e))),O9=Ee("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${we(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},XO(e))),yn=C.forwardRef(function(t,n){const r=C.useContext(YO),i=C.useContext(QO),o=zf(r,t),s=gt({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:m=!1,endIcon:h,focusVisibleClassName:g,fullWidth:R=!1,size:b="medium",startIcon:w,type:y,variant:_="text"}=s,k=Ie(s,E9),E=$({},s,{color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:m,fullWidth:R,size:b,type:y,variant:_}),P=R9(E),I=w&&v.jsx(T9,{className:P.startIcon,ownerState:E,children:w}),A=h&&v.jsx(O9,{className:P.endIcon,ownerState:E,children:h}),L=i||"";return v.jsxs(P9,$({ownerState:E,className:De(r.className,P.root,u,L),component:c,disabled:d,focusRipple:!m,focusVisibleClassName:De(P.focusVisible,g),ref:n,type:y},k,{classes:P,children:[I,a,A]}))});function j9(e){return ft("MuiButtonGroup",e)}const ir=pt("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),L9=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],I9=(e,t)=>{const{ownerState:n}=e;return[{[`& .${ir.grouped}`]:t.grouped},{[`& .${ir.grouped}`]:t[`grouped${we(n.orientation)}`]},{[`& .${ir.grouped}`]:t[`grouped${we(n.variant)}`]},{[`& .${ir.grouped}`]:t[`grouped${we(n.variant)}${we(n.orientation)}`]},{[`& .${ir.grouped}`]:t[`grouped${we(n.variant)}${we(n.color)}`]},{[`& .${ir.firstButton}`]:t.firstButton},{[`& .${ir.lastButton}`]:t.lastButton},{[`& .${ir.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},M9=e=>{const{classes:t,color:n,disabled:r,disableElevation:i,fullWidth:o,orientation:s,variant:a}=e,l={root:["root",a,s==="vertical"&&"vertical",o&&"fullWidth",i&&"disableElevation"],grouped:["grouped",`grouped${we(s)}`,`grouped${we(a)}`,`grouped${we(a)}${we(s)}`,`grouped${we(a)}${we(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return mt(l,j9,t)},N9=Ee("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:I9})(({theme:e,ownerState:t})=>$({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[2]},t.disableElevation&&{boxShadow:"none"},t.fullWidth&&{width:"100%"},t.orientation==="vertical"&&{flexDirection:"column"},{[`& .${ir.grouped}`]:$({minWidth:40,"&:hover":$({},t.variant==="contained"&&{boxShadow:"none"})},t.variant==="contained"&&{boxShadow:"none"}),[`& .${ir.firstButton},& .${ir.middleButton}`]:$({},t.orientation==="horizontal"&&{borderTopRightRadius:0,borderBottomRightRadius:0},t.orientation==="vertical"&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},t.variant==="text"&&t.orientation==="horizontal"&&{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ir.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="text"&&t.orientation==="vertical"&&{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ir.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="text"&&t.color!=="inherit"&&{borderColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:At(e.palette[t.color].main,.5)},t.variant==="outlined"&&t.orientation==="horizontal"&&{borderRightColor:"transparent"},t.variant==="outlined"&&t.orientation==="vertical"&&{borderBottomColor:"transparent"},t.variant==="contained"&&t.orientation==="horizontal"&&{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ir.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="contained"&&t.orientation==="vertical"&&{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ir.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="contained"&&t.color!=="inherit"&&{borderColor:(e.vars||e).palette[t.color].dark},{"&:hover":$({},t.variant==="outlined"&&t.orientation==="horizontal"&&{borderRightColor:"currentColor"},t.variant==="outlined"&&t.orientation==="vertical"&&{borderBottomColor:"currentColor"})}),[`& .${ir.lastButton},& .${ir.middleButton}`]:$({},t.orientation==="horizontal"&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t.orientation==="vertical"&&{borderTopRightRadius:0,borderTopLeftRadius:0},t.variant==="outlined"&&t.orientation==="horizontal"&&{marginLeft:-1},t.variant==="outlined"&&t.orientation==="vertical"&&{marginTop:-1})})),Vf=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiButtonGroup"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:f=!1,orientation:m="horizontal",size:h="medium",variant:g="outlined"}=r,R=Ie(r,L9),b=$({},r,{color:s,component:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:m,size:h,variant:g}),w=M9(b),y=C.useMemo(()=>({className:w.grouped,color:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,size:h,variant:g}),[s,l,c,u,d,f,h,g,w.grouped]),_=F3(i),k=_.length,E=P=>{const I=P===0,A=P===k-1;return I&&A?"":I?w.firstButton:A?w.lastButton:w.middleButton};return v.jsx(N9,$({as:a,role:"group",className:De(w.root,o),ref:n,ownerState:b},R,{children:v.jsx(YO.Provider,{value:y,children:_.map((P,I)=>v.jsx(QO.Provider,{value:E(I),children:P},I))})}))});function $9(e){return ft("MuiCard",e)}pt("MuiCard",["root"]);const A9=["className","raised"],D9=e=>{const{classes:t}=e;return mt({root:["root"]},$9,t)},B9=Ee(us,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),JO=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Ie(r,A9),a=$({},r,{raised:o}),l=D9(a);return v.jsx(B9,$({className:De(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))});function F9(e){return ft("PrivateSwitchBase",e)}pt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const z9=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],U9=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${we(i)}`],input:["input"]};return mt(o,F9,t)},W9=Ee(Ao)(({ownerState:e})=>$({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),G9=Ee("input",{shouldForwardProp:cr})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),ZO=C.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:m,inputRef:h,name:g,onBlur:R,onChange:b,onFocus:w,readOnly:y,required:_=!1,tabIndex:k,type:E,value:P}=t,I=Ie(t,z9),[A,L]=Pu({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),N=Qa(),F=V=>{w&&w(V),N&&N.onFocus&&N.onFocus(V)},z=V=>{R&&R(V),N&&N.onBlur&&N.onBlur(V)},K=V=>{if(V.nativeEvent.defaultPrevented)return;const se=V.target.checked;L(se),b&&b(V,se)};let Z=l;N&&typeof Z>"u"&&(Z=N.disabled);const le=E==="checkbox"||E==="radio",ce=$({},t,{checked:A,disabled:Z,disableFocusRipple:c,edge:u}),H=U9(ce);return v.jsxs(W9,$({component:"span",className:De(H.root,s),centerRipple:!0,focusRipple:!c,disabled:Z,tabIndex:null,role:void 0,onFocus:F,onBlur:z,ownerState:ce,ref:n},I,{children:[v.jsx(G9,$({autoFocus:r,checked:i,defaultChecked:a,className:H.input,disabled:Z,id:le?f:void 0,name:g,onChange:K,readOnly:y,ref:h,required:_,ownerState:ce,tabIndex:k,type:E},E==="checkbox"&&P===void 0?{}:{value:P},m)),A?o:d]}))}),H9=Wn(v.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),V9=Wn(v.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),K9=Wn(v.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function q9(e){return ft("MuiCheckbox",e)}const h0=pt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Y9=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Q9=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${we(r)}`,`size${we(i)}`]},s=mt(o,q9,t);return $({},t,s)},X9=Ee(ZO,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${we(n.size)}`],n.color!=="default"&&t[`color${we(n.color)}`]]}})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:At(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${h0.checked}, &.${h0.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${h0.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),J9=v.jsx(V9,{}),Z9=v.jsx(H9,{}),eW=v.jsx(K9,{}),Is=C.forwardRef(function(t,n){var r,i;const o=gt({props:t,name:"MuiCheckbox"}),{checkedIcon:s=J9,color:a="primary",icon:l=Z9,indeterminate:c=!1,indeterminateIcon:u=eW,inputProps:d,size:f="medium",className:m}=o,h=Ie(o,Y9),g=c?u:l,R=c?u:s,b=$({},o,{color:a,indeterminate:c,size:f}),w=Q9(b);return v.jsx(X9,$({type:"checkbox",inputProps:$({"data-indeterminate":c},d),icon:C.cloneElement(g,{fontSize:(r=g.props.fontSize)!=null?r:f}),checkedIcon:C.cloneElement(R,{fontSize:(i=R.props.fontSize)!=null?i:f}),ownerState:b,ref:n,className:De(w.root,m)},h,{classes:w}))});function Mk(e){return e.substring(2).toLowerCase()}function tW(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=un(t.ref,a),d=Yi(h=>{const g=c.current;c.current=!1;const R=qn(a.current);if(!l.current||!a.current||"clientX"in h&&tW(h,R))return;if(s.current){s.current=!1;return}let b;h.composedPath?b=h.composedPath().indexOf(a.current)>-1:b=!R.documentElement.contains(h.target)||a.current.contains(h.target),!b&&(n||!g)&&i(h)}),f=h=>g=>{c.current=!0;const R=t.props[h];R&&R(g)},m={ref:u};return o!==!1&&(m[o]=f(o)),C.useEffect(()=>{if(o!==!1){const h=Mk(o),g=qn(a.current),R=()=>{s.current=!0};return g.addEventListener(h,d),g.addEventListener("touchmove",R),()=>{g.removeEventListener(h,d),g.removeEventListener("touchmove",R)}}},[d,o]),r!==!1&&(m[r]=f(r)),C.useEffect(()=>{if(r!==!1){const h=Mk(r),g=qn(a.current);return g.addEventListener(h,d),()=>{g.removeEventListener(h,d)}}},[d,r]),v.jsx(C.Fragment,{children:C.cloneElement(t,m)})}const rW=(e,t)=>$({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),iW=e=>$({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),oW=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,a])=>{var l;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let i=$({html:rW(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:$({margin:0},iW(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const o=(n=e.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return o&&(i=[i,o]),i};function sW(e){const t=gt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return v.jsxs(C.Fragment,{children:[v.jsx(qO,{styles:i=>oW(i,r)}),n]})}function aW(e){return ft("MuiDialog",e)}const m0=pt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),ej=C.createContext({}),lW=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],cW=Ee(PO,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),uW=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${we(n)}`],paper:["paper",`paperScroll${we(n)}`,`paperWidth${we(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return mt(s,aW,t)},dW=Ee(Ev,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),fW=Ee("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${we(n.scroll)}`]]}})(({ownerState:e})=>$({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),pW=Ee(us,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${we(n.scroll)}`],t[`paperWidth${we(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>$({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${m0.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${m0.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${m0.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),hW=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiDialog"}),i=Ni(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:m=!1,fullWidth:h=!1,maxWidth:g="sm",onBackdropClick:R,onClick:b,onClose:w,open:y,PaperComponent:_=us,PaperProps:k={},scroll:E="paper",TransitionComponent:P=RO,transitionDuration:I=o,TransitionProps:A}=r,L=Ie(r,lW),N=$({},r,{disableEscapeKeyDown:f,fullScreen:m,fullWidth:h,maxWidth:g,scroll:E}),F=uW(N),z=C.useRef(),K=H=>{z.current=H.target===H.currentTarget},Z=H=>{b&&b(H),z.current&&(z.current=null,R&&R(H),w&&w(H,"backdropClick"))},le=yp(a),ce=C.useMemo(()=>({titleId:le}),[le]);return v.jsx(dW,$({className:De(F.root,d),closeAfterTransition:!0,components:{Backdrop:cW},componentsProps:{backdrop:$({transitionDuration:I,as:l},c)},disableEscapeKeyDown:f,onClose:w,open:y,ref:n,onClick:Z,ownerState:N},L,{children:v.jsx(P,$({appear:!0,in:y,timeout:I,role:"presentation"},A,{children:v.jsx(fW,{className:De(F.container),onMouseDown:K,ownerState:N,children:v.jsx(pW,$({as:_,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":le},k,{className:De(F.paper,k.className),ownerState:N,children:v.jsx(ej.Provider,{value:ce,children:u})}))})}))}))});function mW(e){return ft("MuiDialogContent",e)}pt("MuiDialogContent",["root","dividers"]);function gW(e){return ft("MuiDialogTitle",e)}const vW=pt("MuiDialogTitle",["root"]),yW=["className","dividers"],bW=e=>{const{classes:t,dividers:n}=e;return mt({root:["root",n&&"dividers"]},mW,t)},wW=Ee("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>$({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${vW.root} + &`]:{paddingTop:0}})),xW=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiDialogContent"}),{className:i,dividers:o=!1}=r,s=Ie(r,yW),a=$({},r,{dividers:o}),l=bW(a);return v.jsx(wW,$({className:De(l.root,i),ownerState:a,ref:n},s))}),SW=["className","id"],_W=e=>{const{classes:t}=e;return mt({root:["root"]},gW,t)},CW=Ee(_t,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),kW=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiDialogTitle"}),{className:i,id:o}=r,s=Ie(r,SW),a=r,l=_W(a),{titleId:c=o}=C.useContext(ej);return v.jsx(CW,$({component:"h2",className:De(l.root,i),ownerState:a,ref:n,variant:"h6",id:o??c},s))});function EW(e){return ft("MuiFab",e)}const Nk=pt("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),RW=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],PW=e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,`size${we(i)}`,t==="inherit"?"colorInherit":t]},s=mt(o,EW,r);return $({},r,s)},TW=Ee(Ao,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>cr(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${we(n.size)}`],n.color==="inherit"&&t.colorInherit,t[we(n.size)],t[n.color]]}})(({theme:e,ownerState:t})=>{var n,r;return $({},e.typography.button,{minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${Nk.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]}},t.size==="small"&&{width:40,height:40},t.size==="medium"&&{width:48,height:48},t.variant==="extended"&&{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},t.variant==="extended"&&t.size==="small"&&{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34},t.variant==="extended"&&t.size==="medium"&&{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40},t.color==="inherit"&&{color:"inherit"})},({theme:e,ownerState:t})=>$({},t.color!=="inherit"&&t.color!=="default"&&(e.vars||e).palette[t.color]!=null&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}}),({theme:e})=>({[`&.${Nk.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}})),OW=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiFab"}),{children:i,className:o,color:s="default",component:a="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:f="circular"}=r,m=Ie(r,RW),h=$({},r,{color:s,component:a,disabled:l,disableFocusRipple:c,size:d,variant:f}),g=PW(h);return v.jsx(TW,$({className:De(g.root,o),component:a,disabled:l,focusRipple:!c,focusVisibleClassName:De(g.focusVisible,u),ownerState:h,ref:n},m,{classes:g,children:i}))}),jW=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],LW=e=>{const{classes:t,disableUnderline:n}=e,i=mt({root:["root",!n&&"underline"],input:["input"]},t9,t);return $({},t,i)},IW=Ee(Fv,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Dv(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return $({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${dl.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${dl.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${dl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${dl.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${dl.disabled}, .${dl.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${dl.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&$({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9}))}),MW=Ee(zv,{name:"MuiFilledInput",slot:"Input",overridesResolver:Bv})(({theme:e,ownerState:t})=>$({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),Hx=C.forwardRef(function(t,n){var r,i,o,s;const a=gt({props:t,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:f=!1,slotProps:m,slots:h={},type:g="text"}=a,R=Ie(a,jW),b=$({},a,{fullWidth:u,inputComponent:d,multiline:f,type:g}),w=LW(a),y={root:{ownerState:b},input:{ownerState:b}},_=m??c?Hr(y,m??c):y,k=(r=(i=h.root)!=null?i:l.Root)!=null?r:IW,E=(o=(s=h.input)!=null?s:l.Input)!=null?o:MW;return v.jsx(Gx,$({slots:{root:k,input:E},componentsProps:_,fullWidth:u,inputComponent:d,multiline:f,ref:n,type:g},R,{classes:w}))});Hx.muiName="Input";function NW(e){return ft("MuiFormControl",e)}pt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const $W=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],AW=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${we(n)}`,r&&"fullWidth"]};return mt(i,NW,t)},DW=Ee("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,t[`margin${we(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>$({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),xl=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:f=!1,margin:m="none",required:h=!1,size:g="medium",variant:R="outlined"}=r,b=Ie(r,$W),w=$({},r,{color:s,component:a,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:m,required:h,size:g,variant:R}),y=AW(w),[_,k]=C.useState(()=>{let z=!1;return i&&C.Children.forEach(i,K=>{if(!tf(K,["Input","Select"]))return;const Z=tf(K,["Select"])?K.props.input:K;Z&&KU(Z.props)&&(z=!0)}),z}),[E,P]=C.useState(()=>{let z=!1;return i&&C.Children.forEach(i,K=>{tf(K,["Input","Select"])&&(Vm(K.props,!0)||Vm(K.props.inputProps,!0))&&(z=!0)}),z}),[I,A]=C.useState(!1);l&&I&&A(!1);const L=u!==void 0&&!l?u:I;let N;const F=C.useMemo(()=>({adornedStart:_,setAdornedStart:k,color:s,disabled:l,error:c,filled:E,focused:L,fullWidth:d,hiddenLabel:f,size:g,onBlur:()=>{A(!1)},onEmpty:()=>{P(!1)},onFilled:()=>{P(!0)},onFocus:()=>{A(!0)},registerEffect:N,required:h,variant:R}),[_,s,l,c,E,L,d,f,N,h,g,R]);return v.jsx(Wx.Provider,{value:F,children:v.jsx(DW,$({as:a,ownerState:w,className:De(y.root,o),ref:n},b,{children:i}))})}),Km=iF({createStyledComponent:Ee("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>gt({props:e,name:"MuiStack"})});function BW(e){return ft("MuiFormControlLabel",e)}const zd=pt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),FW=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],zW=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${we(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return mt(s,BW,t)},UW=Ee("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${zd.label}`]:t.label},t.root,t[`labelPlacement${we(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>$({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${zd.disabled}`]:{cursor:"default"}},t.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},t.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},t.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${zd.label}`]:{[`&.${zd.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),WW=Ee("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${zd.error}`]:{color:(e.vars||e).palette.error.main}})),Ms=C.forwardRef(function(t,n){var r,i;const o=gt({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:a={},control:l,disabled:c,disableTypography:u,label:d,labelPlacement:f="end",required:m,slotProps:h={}}=o,g=Ie(o,FW),R=Qa(),b=(r=c??l.props.disabled)!=null?r:R==null?void 0:R.disabled,w=m??l.props.required,y={disabled:b,required:w};["checked","name","onChange","value","inputRef"].forEach(A=>{typeof l.props[A]>"u"&&typeof o[A]<"u"&&(y[A]=o[A])});const _=lc({props:o,muiFormControl:R,states:["error"]}),k=$({},o,{disabled:b,labelPlacement:f,required:w,error:_.error}),E=zW(k),P=(i=h.typography)!=null?i:a.typography;let I=d;return I!=null&&I.type!==_t&&!u&&(I=v.jsx(_t,$({component:"span"},P,{className:De(E.label,P==null?void 0:P.className),children:I}))),v.jsxs(UW,$({className:De(E.root,s),ownerState:k,ref:n},g,{children:[C.cloneElement(l,y),w?v.jsxs(Km,{display:"block",children:[I,v.jsxs(WW,{ownerState:k,"aria-hidden":!0,className:E.asterisk,children:[" ","*"]})]}):I]}))});function GW(e){return ft("MuiFormHelperText",e)}const $k=pt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Ak;const HW=["children","className","component","disabled","error","filled","focused","margin","required","variant"],VW=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=e,c={root:["root",i&&"disabled",o&&"error",r&&`size${we(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return mt(c,GW,t)},KW=Ee("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${we(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${$k.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${$k.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),qW=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=Ie(r,HW),l=Qa(),c=lc({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=$({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=VW(u);return v.jsx(KW,$({as:s,ownerState:u,className:De(d.root,o),ref:n},a,{children:i===" "?Ak||(Ak=v.jsx("span",{className:"notranslate",children:"​"})):i}))});function YW(e){return ft("MuiFormLabel",e)}const af=pt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),QW=["children","className","color","component","disabled","error","filled","focused","required"],XW=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=e,l={root:["root",`color${we(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return mt(l,YW,t)},JW=Ee("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${af.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${af.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${af.error}`]:{color:(e.vars||e).palette.error.main}})),ZW=Ee("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${af.error}`]:{color:(e.vars||e).palette.error.main}})),eG=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=Ie(r,QW),l=Qa(),c=lc({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=$({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=XW(u);return v.jsxs(JW,$({as:s,ownerState:u,className:De(d.root,o),ref:n},a,{children:[i,c.required&&v.jsxs(ZW,{ownerState:u,"aria-hidden":!0,className:d.asterisk,children:[" ","*"]})]}))}),tG=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function y1(e){return`scale(${e}, ${e**2})`}const nG={entering:{opacity:1,transform:y1(1)},entered:{opacity:1,transform:"none"}},g0=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Kf=C.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:m,style:h,timeout:g="auto",TransitionComponent:R=co}=t,b=Ie(t,tG),w=Sa(),y=C.useRef(),_=Ni(),k=C.useRef(null),E=un(k,o.ref,n),P=Z=>le=>{if(Z){const ce=k.current;le===void 0?Z(ce):Z(ce,le)}},I=P(u),A=P((Z,le)=>{jx(Z);const{duration:ce,delay:H,easing:V}=Fa({style:h,timeout:g,easing:s},{mode:"enter"});let se;g==="auto"?(se=_.transitions.getAutoHeightDuration(Z.clientHeight),y.current=se):se=ce,Z.style.transition=[_.transitions.create("opacity",{duration:se,delay:H}),_.transitions.create("transform",{duration:g0?se:se*.666,delay:H,easing:V})].join(","),l&&l(Z,le)}),L=P(c),N=P(m),F=P(Z=>{const{duration:le,delay:ce,easing:H}=Fa({style:h,timeout:g,easing:s},{mode:"exit"});let V;g==="auto"?(V=_.transitions.getAutoHeightDuration(Z.clientHeight),y.current=V):V=le,Z.style.transition=[_.transitions.create("opacity",{duration:V,delay:ce}),_.transitions.create("transform",{duration:g0?V:V*.666,delay:g0?ce:ce||V*.333,easing:H})].join(","),Z.style.opacity=0,Z.style.transform=y1(.75),d&&d(Z)}),z=P(f),K=Z=>{g==="auto"&&w.start(y.current||0,Z),r&&r(k.current,Z)};return v.jsx(R,$({appear:i,in:a,nodeRef:k,onEnter:A,onEntered:L,onEntering:I,onExit:F,onExited:z,onExiting:N,addEndListener:K,timeout:g==="auto"?null:g},b,{children:(Z,le)=>C.cloneElement(o,$({style:$({opacity:0,transform:y1(.75),visibility:Z==="exited"&&!a?"hidden":void 0},nG[Z],h,o.props.style),ref:E},le))}))});Kf.muiSupportAuto=!0;const rG=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],iG=e=>{const{classes:t,disableUnderline:n}=e,i=mt({root:["root",!n&&"underline"],input:["input"]},ZU,t);return $({},t,i)},oG=Ee(Fv,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Dv(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),$({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Cd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Cd.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Cd.disabled}, .${Cd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Cd.disabled}:before`]:{borderBottomStyle:"dotted"}})}),sG=Ee(zv,{name:"MuiInput",slot:"Input",overridesResolver:Bv})({}),Vx=C.forwardRef(function(t,n){var r,i,o,s;const a=gt({props:t,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:d=!1,inputComponent:f="input",multiline:m=!1,slotProps:h,slots:g={},type:R="text"}=a,b=Ie(a,rG),w=iG(a),_={root:{ownerState:{disableUnderline:l}}},k=h??u?Hr(h??u,_):_,E=(r=(i=g.root)!=null?i:c.Root)!=null?r:oG,P=(o=(s=g.input)!=null?s:c.Input)!=null?o:sG;return v.jsx(Gx,$({slots:{root:E,input:P},slotProps:k,fullWidth:d,inputComponent:f,multiline:m,ref:n,type:R},b,{classes:w}))});Vx.muiName="Input";function aG(e){return ft("MuiInputLabel",e)}pt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const lG=["disableAnimation","margin","shrink","variant","className"],cG=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${we(r)}`,s],asterisk:[a&&"asterisk"]},c=mt(l,aG,t);return $({},t,c)},uG=Ee(eG,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${af.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(({theme:e,ownerState:t})=>$({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&$({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&$({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&$({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),tj=C.forwardRef(function(t,n){const r=gt({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=Ie(r,lG),l=Qa();let c=o;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=lc({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),d=$({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),f=cG(d);return v.jsx(uG,$({"data-shrink":c,ownerState:d,ref:n,className:De(f.root,s)},a,{classes:f}))});function dG(e){return ft("MuiListItemIcon",e)}const Dk=pt("MuiListItemIcon",["root","alignItemsFlexStart"]),fG=["className"],pG=e=>{const{alignItems:t,classes:n}=e;return mt({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},dG,n)},hG=Ee("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>$({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),mG=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Ie(r,fG),s=C.useContext(jo),a=$({},r,{alignItems:s.alignItems}),l=pG(a);return v.jsx(hG,$({className:De(l.root,i),ownerState:a,ref:n},o))}),gG=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function v0(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Bk(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function nj(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function kd(e,t,n,r,i,o){let s=!1,a=i(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!nj(a,o)||l)a=i(e,a,n);else return a.focus(),!0}return!1}const rj=C.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=t,f=Ie(t,gG),m=C.useRef(null),h=C.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});li(()=>{i&&m.current.focus()},[i]),C.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(y,{direction:_})=>{const k=!m.current.style.width;if(y.clientHeight{const _=m.current,k=y.key,E=qn(_).activeElement;if(k==="ArrowDown")y.preventDefault(),kd(_,E,c,l,v0);else if(k==="ArrowUp")y.preventDefault(),kd(_,E,c,l,Bk);else if(k==="Home")y.preventDefault(),kd(_,null,c,l,v0);else if(k==="End")y.preventDefault(),kd(_,null,c,l,Bk);else if(k.length===1){const P=h.current,I=k.toLowerCase(),A=performance.now();P.keys.length>0&&(A-P.lastTime>500?(P.keys=[],P.repeating=!0,P.previousKeyMatched=!0):P.repeating&&I!==P.keys[0]&&(P.repeating=!1)),P.lastTime=A,P.keys.push(I);const L=E&&!P.repeating&&nj(E,P);P.previousKeyMatched&&(L||kd(_,E,!1,l,v0,P))?y.preventDefault():P.previousKeyMatched=!1}u&&u(y)},R=un(m,n);let b=-1;C.Children.forEach(s,(y,_)=>{if(!C.isValidElement(y)){b===_&&(b+=1,b>=s.length&&(b=-1));return}y.props.disabled||(d==="selectedMenu"&&y.props.selected||b===-1)&&(b=_),b===_&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(b+=1,b>=s.length&&(b=-1))});const w=C.Children.map(s,(y,_)=>{if(_===b){const k={};return o&&(k.autoFocus=!0),y.props.tabIndex===void 0&&d==="selectedMenu"&&(k.tabIndex=0),C.cloneElement(y,k)}return y});return v.jsx(rf,$({role:"menu",ref:R,className:a,onKeyDown:g,tabIndex:i?0:-1},f,{children:w}))});function vG(e){return ft("MuiPopover",e)}pt("MuiPopover",["root","paper"]);const yG=["onEntering"],bG=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],wG=["slotProps"];function Fk(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function zk(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function Uk(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function y0(e){return typeof e=="function"?e():e}const xG=e=>{const{classes:t}=e;return mt({root:["root"],paper:["paper"]},vG,t)},SG=Ee(Ev,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ij=Ee(us,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),_G=C.forwardRef(function(t,n){var r,i,o;const s=gt({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:f,className:m,container:h,elevation:g=8,marginThreshold:R=16,open:b,PaperProps:w={},slots:y,slotProps:_,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:E=Kf,transitionDuration:P="auto",TransitionProps:{onEntering:I}={},disableScrollLock:A=!1}=s,L=Ie(s.TransitionProps,yG),N=Ie(s,bG),F=(r=_==null?void 0:_.paper)!=null?r:w,z=C.useRef(),K=un(z,F.ref),Z=$({},s,{anchorOrigin:c,anchorReference:d,elevation:g,marginThreshold:R,externalPaperSlotProps:F,transformOrigin:k,TransitionComponent:E,transitionDuration:P,TransitionProps:L}),le=xG(Z),ce=C.useCallback(()=>{if(d==="anchorPosition")return u;const Ze=y0(l),ee=(Ze&&Ze.nodeType===1?Ze:qn(z.current).body).getBoundingClientRect();return{top:ee.top+Fk(ee,c.vertical),left:ee.left+zk(ee,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),H=C.useCallback(Ze=>({vertical:Fk(Ze,k.vertical),horizontal:zk(Ze,k.horizontal)}),[k.horizontal,k.vertical]),V=C.useCallback(Ze=>{const yt={width:Ze.offsetWidth,height:Ze.offsetHeight},ee=H(yt);if(d==="none")return{top:null,left:null,transformOrigin:Uk(ee)};const me=ce();let Ce=me.top-ee.vertical,Ue=me.left-ee.horizontal;const W=Ce+yt.height,S=Ue+yt.width,O=ss(y0(l)),D=O.innerHeight-R,q=O.innerWidth-R;if(R!==null&&CeD){const X=W-D;Ce-=X,ee.vertical+=X}if(R!==null&&Ueq){const X=S-q;Ue-=X,ee.horizontal+=X}return{top:`${Math.round(Ce)}px`,left:`${Math.round(Ue)}px`,transformOrigin:Uk(ee)}},[l,d,ce,H,R]),[se,je]=C.useState(b),Ge=C.useCallback(()=>{const Ze=z.current;if(!Ze)return;const yt=V(Ze);yt.top!==null&&(Ze.style.top=yt.top),yt.left!==null&&(Ze.style.left=yt.left),Ze.style.transformOrigin=yt.transformOrigin,je(!0)},[V]);C.useEffect(()=>(A&&window.addEventListener("scroll",Ge),()=>window.removeEventListener("scroll",Ge)),[l,A,Ge]);const Le=(Ze,yt)=>{I&&I(Ze,yt),Ge()},_e=()=>{je(!1)};C.useEffect(()=>{b&&Ge()}),C.useImperativeHandle(a,()=>b?{updatePosition:()=>{Ge()}}:null,[b,Ge]),C.useEffect(()=>{if(!b)return;const Ze=Cv(()=>{Ge()}),yt=ss(l);return yt.addEventListener("resize",Ze),()=>{Ze.clear(),yt.removeEventListener("resize",Ze)}},[l,b,Ge]);let Ve=P;P==="auto"&&!E.muiSupportAuto&&(Ve=void 0);const Pe=h||(l?qn(y0(l)).body:void 0),ct=(i=y==null?void 0:y.root)!=null?i:SG,ht=(o=y==null?void 0:y.paper)!=null?o:ij,Te=$o({elementType:ht,externalSlotProps:$({},F,{style:se?F.style:$({},F.style,{opacity:0})}),additionalProps:{elevation:g,ref:K},ownerState:Z,className:De(le.paper,F==null?void 0:F.className)}),Tt=$o({elementType:ct,externalSlotProps:(_==null?void 0:_.root)||{},externalForwardedProps:N,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Pe,open:b},ownerState:Z,className:De(le.root,m)}),{slotProps:ut}=Tt,ze=Ie(Tt,wG);return v.jsx(ct,$({},ze,!Tu(ct)&&{slotProps:ut,disableScrollLock:A},{children:v.jsx(E,$({appear:!0,in:b,onEntering:Le,onExited:_e,timeout:Ve},L,{children:v.jsx(ht,$({},Te,{children:f}))}))}))});function CG(e){return ft("MuiMenu",e)}pt("MuiMenu",["root","paper","list"]);const kG=["onEntering"],EG=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],RG={vertical:"top",horizontal:"right"},PG={vertical:"top",horizontal:"left"},TG=e=>{const{classes:t}=e;return mt({root:["root"],paper:["paper"],list:["list"]},CG,t)},OG=Ee(_G,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),jG=Ee(ij,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),LG=Ee(rj,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Uv=C.forwardRef(function(t,n){var r,i;const o=gt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:f,PaperProps:m={},PopoverClasses:h,transitionDuration:g="auto",TransitionProps:{onEntering:R}={},variant:b="selectedMenu",slots:w={},slotProps:y={}}=o,_=Ie(o.TransitionProps,kG),k=Ie(o,EG),E=Ex(),P=$({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:R,PaperProps:m,transitionDuration:g,TransitionProps:_,variant:b}),I=TG(P),A=s&&!c&&f,L=C.useRef(null),N=(H,V)=>{L.current&&L.current.adjustStyleForScrollbar(H,{direction:E?"rtl":"ltr"}),R&&R(H,V)},F=H=>{H.key==="Tab"&&(H.preventDefault(),d&&d(H,"tabKeyDown"))};let z=-1;C.Children.map(a,(H,V)=>{C.isValidElement(H)&&(H.props.disabled||(b==="selectedMenu"&&H.props.selected||z===-1)&&(z=V))});const K=(r=w.paper)!=null?r:jG,Z=(i=y.paper)!=null?i:m,le=$o({elementType:w.root,externalSlotProps:y.root,ownerState:P,className:[I.root,l]}),ce=$o({elementType:K,externalSlotProps:Z,ownerState:P,className:I.paper});return v.jsx(OG,$({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:E?"right":"left"},transformOrigin:E?RG:PG,slots:{paper:K,root:w.root},slotProps:{root:le,paper:ce},open:f,ref:n,transitionDuration:g,TransitionProps:$({onEntering:N},_),ownerState:P},k,{classes:h,children:v.jsx(LG,$({onKeyDown:F,actions:L,autoFocus:s&&(z===-1||c),autoFocusItem:A,variant:b},u,{className:De(I.list,u.className),children:a}))}))});function IG(e){return ft("MuiMenuItem",e)}const Ed=pt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),MG=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],NG=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},$G=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,l=mt({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},IG,s);return $({},s,l)},AG=Ee(Ao,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:NG})(({theme:e,ownerState:t})=>$({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ed.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:At(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ed.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:At(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ed.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:At(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:At(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Ed.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ed.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${bk.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${bk.inset}`]:{marginLeft:52},[`& .${Gm.root}`]:{marginTop:0,marginBottom:0},[`& .${Gm.inset}`]:{paddingLeft:36},[`& .${Dk.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Dk.root} svg`]:{fontSize:"1.25rem"}}))),yi=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:f}=r,m=Ie(r,MG),h=C.useContext(jo),g=C.useMemo(()=>({dense:s||h.dense||!1,disableGutters:l}),[h.dense,s,l]),R=C.useRef(null);li(()=>{i&&R.current&&R.current.focus()},[i]);const b=$({},r,{dense:g.dense,divider:a,disableGutters:l}),w=$G(r),y=un(R,n);let _;return r.disabled||(_=d!==void 0?d:-1),v.jsx(jo.Provider,{value:g,children:v.jsx(AG,$({ref:y,role:u,tabIndex:_,component:o,focusVisibleClassName:De(w.focusVisible,c),className:De(w.root,f)},m,{ownerState:b,classes:w}))})});function DG(e){return ft("MuiNativeSelect",e)}const Kx=pt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),BG=["className","disabled","error","IconComponent","inputRef","variant"],FG=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${we(n)}`,o&&"iconOpen",r&&"disabled"]};return mt(a,DG,t)},oj=({ownerState:e,theme:t})=>$({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":$({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Kx.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),zG=Ee("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:cr,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Kx.multiple}`]:t.multiple}]}})(oj),sj=({ownerState:e,theme:t})=>$({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${Kx.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),UG=Ee("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${we(n.variant)}`],n.open&&t.iconOpen]}})(sj),WG=C.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard"}=t,c=Ie(t,BG),u=$({},t,{disabled:i,variant:l,error:o}),d=FG(u);return v.jsxs(C.Fragment,{children:[v.jsx(zG,$({ownerState:u,className:De(d.select,r),disabled:i,ref:a||n},c)),t.multiple?null:v.jsx(UG,{as:s,ownerState:u,className:d.icon})]})});var Wk;const GG=["children","classes","className","label","notched"],HG=Ee("fieldset",{shouldForwardProp:cr})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),VG=Ee("legend",{shouldForwardProp:cr})(({ownerState:e,theme:t})=>$({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&$({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function KG(e){const{className:t,label:n,notched:r}=e,i=Ie(e,GG),o=n!=null&&n!=="",s=$({},e,{notched:r,withLabel:o});return v.jsx(HG,$({"aria-hidden":!0,className:t,ownerState:s},i,{children:v.jsx(VG,{ownerState:s,children:o?v.jsx("span",{children:n}):Wk||(Wk=v.jsx("span",{className:"notranslate",children:"​"}))})}))}const qG=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],YG=e=>{const{classes:t}=e,r=mt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},e9,t);return $({},t,r)},QG=Ee(Fv,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Dv})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return $({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${ca.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${ca.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${ca.focused} .${ca.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${ca.error} .${ca.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${ca.disabled} .${ca.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&$({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),XG=Ee(KG,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),JG=Ee(zv,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Bv})(({theme:e,ownerState:t})=>$({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),qx=C.forwardRef(function(t,n){var r,i,o,s,a;const l=gt({props:t,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:f,multiline:m=!1,notched:h,slots:g={},type:R="text"}=l,b=Ie(l,qG),w=YG(l),y=Qa(),_=lc({props:l,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),k=$({},l,{color:_.color||"primary",disabled:_.disabled,error:_.error,focused:_.focused,formControl:y,fullWidth:u,hiddenLabel:_.hiddenLabel,multiline:m,size:_.size,type:R}),E=(r=(i=g.root)!=null?i:c.Root)!=null?r:QG,P=(o=(s=g.input)!=null?s:c.Input)!=null?o:JG;return v.jsx(Gx,$({slots:{root:E,input:P},renderSuffix:I=>v.jsx(XG,{ownerState:k,className:w.notchedOutline,label:f!=null&&f!==""&&_.required?a||(a=v.jsxs(C.Fragment,{children:[f," ","*"]})):f,notched:typeof h<"u"?h:!!(I.startAdornment||I.filled||I.focused)}),fullWidth:u,inputComponent:d,multiline:m,ref:n,type:R},b,{classes:$({},w,{notchedOutline:null})}))});qx.muiName="Input";function ZG(e){return ft("MuiSelect",e)}const Rd=pt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Gk;const e7=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],t7=Ee("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Rd.select}`]:t.select},{[`&.${Rd.select}`]:t[n.variant]},{[`&.${Rd.error}`]:t.error},{[`&.${Rd.multiple}`]:t.multiple}]}})(oj,{[`&.${Rd.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),n7=Ee("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${we(n.variant)}`],n.open&&t.iconOpen]}})(sj),r7=Ee("input",{shouldForwardProp:e=>hO(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Hk(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function i7(e){return e==null||typeof e=="string"&&!e.trim()}const o7=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${we(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return mt(a,ZG,t)},s7=C.forwardRef(function(t,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:m,error:h=!1,IconComponent:g,inputRef:R,labelId:b,MenuProps:w={},multiple:y,name:_,onBlur:k,onChange:E,onClose:P,onFocus:I,onOpen:A,open:L,readOnly:N,renderValue:F,SelectDisplayProps:z={},tabIndex:K,value:Z,variant:le="standard"}=t,ce=Ie(t,e7),[H,V]=Pu({controlled:Z,default:d,name:"Select"}),[se,je]=Pu({controlled:L,default:u,name:"Select"}),Ge=C.useRef(null),Le=C.useRef(null),[_e,Ve]=C.useState(null),{current:Pe}=C.useRef(L!=null),[ct,ht]=C.useState(),Te=un(n,R),Tt=C.useCallback(qe=>{Le.current=qe,qe&&Ve(qe)},[]),ut=_e==null?void 0:_e.parentNode;C.useImperativeHandle(Te,()=>({focus:()=>{Le.current.focus()},node:Ge.current,value:H}),[H]),C.useEffect(()=>{u&&se&&_e&&!Pe&&(ht(a?null:ut.clientWidth),Le.current.focus())},[_e,a]),C.useEffect(()=>{s&&Le.current.focus()},[s]),C.useEffect(()=>{if(!b)return;const qe=qn(Le.current).getElementById(b);if(qe){const bt=()=>{getSelection().isCollapsed&&Le.current.focus()};return qe.addEventListener("click",bt),()=>{qe.removeEventListener("click",bt)}}},[b]);const ze=(qe,bt)=>{qe?A&&A(bt):P&&P(bt),Pe||(ht(a?null:ut.clientWidth),je(qe))},Ze=qe=>{qe.button===0&&(qe.preventDefault(),Le.current.focus(),ze(!0,qe))},yt=qe=>{ze(!1,qe)},ee=C.Children.toArray(l),me=qe=>{const bt=ee.find(Me=>Me.props.value===qe.target.value);bt!==void 0&&(V(bt.props.value),E&&E(qe,bt))},Ce=qe=>bt=>{let Me;if(bt.currentTarget.hasAttribute("tabindex")){if(y){Me=Array.isArray(H)?H.slice():[];const Yt=H.indexOf(qe.props.value);Yt===-1?Me.push(qe.props.value):Me.splice(Yt,1)}else Me=qe.props.value;if(qe.props.onClick&&qe.props.onClick(bt),H!==Me&&(V(Me),E)){const Yt=bt.nativeEvent||bt,An=new Yt.constructor(Yt.type,Yt);Object.defineProperty(An,"target",{writable:!0,value:{value:Me,name:_}}),E(An,qe)}y||ze(!1,bt)}},Ue=qe=>{N||[" ","ArrowUp","ArrowDown","Enter"].indexOf(qe.key)!==-1&&(qe.preventDefault(),ze(!0,qe))},W=_e!==null&&se,S=qe=>{!W&&k&&(Object.defineProperty(qe,"target",{writable:!0,value:{value:H,name:_}}),k(qe))};delete ce["aria-invalid"];let O,D;const q=[];let X=!1;(Vm({value:H})||m)&&(F?O=F(H):X=!0);const pe=ee.map(qe=>{if(!C.isValidElement(qe))return null;let bt;if(y){if(!Array.isArray(H))throw new Error(Vl(2));bt=H.some(Me=>Hk(Me,qe.props.value)),bt&&X&&q.push(qe.props.children)}else bt=Hk(H,qe.props.value),bt&&X&&(D=qe.props.children);return C.cloneElement(qe,{"aria-selected":bt?"true":"false",onClick:Ce(qe),onKeyUp:Me=>{Me.key===" "&&Me.preventDefault(),qe.props.onKeyUp&&qe.props.onKeyUp(Me)},role:"option",selected:bt,value:void 0,"data-value":qe.props.value})});X&&(y?q.length===0?O=null:O=q.reduce((qe,bt,Me)=>(qe.push(bt),Me{const{classes:t}=e;return t},Yx={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>cr(e)&&e!=="variant",slot:"Root"},u7=Ee(Vx,Yx)(""),d7=Ee(qx,Yx)(""),f7=Ee(Hx,Yx)(""),Pl=C.forwardRef(function(t,n){const r=gt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=n9,id:d,input:f,inputProps:m,label:h,labelId:g,MenuProps:R,multiple:b=!1,native:w=!1,onClose:y,onOpen:_,open:k,renderValue:E,SelectDisplayProps:P,variant:I="outlined"}=r,A=Ie(r,a7),L=w?WG:s7,N=Qa(),F=lc({props:r,muiFormControl:N,states:["variant","error"]}),z=F.variant||I,K=$({},r,{variant:z,classes:s}),Z=c7(K),le=Ie(Z,l7),ce=f||{standard:v.jsx(u7,{ownerState:K}),outlined:v.jsx(d7,{label:h,ownerState:K}),filled:v.jsx(f7,{ownerState:K})}[z],H=un(n,ce.ref);return v.jsx(C.Fragment,{children:C.cloneElement(ce,$({inputComponent:L,inputProps:$({children:o,error:F.error,IconComponent:u,variant:z,type:void 0,multiple:b},w?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:R,onClose:y,onOpen:_,open:k,renderValue:E,SelectDisplayProps:$({id:d},P)},m,{classes:m?Hr(le,m.classes):le},f?f.props.inputProps:{})},(b&&w||c)&&z==="outlined"?{notched:!0}:{},{ref:H,className:De(ce.props.className,a,Z.root)},!f&&{variant:z},A))})});Pl.muiName="Select";function p7(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=Sa();C.useEffect(()=>{if(!i)return;function b(w){w.defaultPrevented||(w.key==="Escape"||w.key==="Esc")&&(r==null||r(w,"escapeKeyDown"))}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i,r]);const a=Yi((b,w)=>{r==null||r(b,w)}),l=Yi(b=>{!r||b==null||s.start(b,()=>{a(null,"timeout")})});C.useEffect(()=>(i&&l(t),s.clear),[i,t,l,s]);const c=b=>{r==null||r(b,"clickaway")},u=s.clear,d=C.useCallback(()=>{t!=null&&l(o??t*.5)},[t,o,l]),f=b=>w=>{const y=b.onBlur;y==null||y(w),d()},m=b=>w=>{const y=b.onFocus;y==null||y(w),u()},h=b=>w=>{const y=b.onMouseEnter;y==null||y(w),u()},g=b=>w=>{const y=b.onMouseLeave;y==null||y(w),d()};return C.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,i,d,u]),{getRootProps:(b={})=>{const w=$({},Um(e),Um(b));return $({role:"presentation"},b,w,{onBlur:f(w),onFocus:m(w),onMouseEnter:h(w),onMouseLeave:g(w)})},onClickAway:c}}function h7(e){return ft("MuiSnackbarContent",e)}pt("MuiSnackbarContent",["root","message","action"]);const m7=["action","className","message","role"],g7=e=>{const{classes:t}=e;return mt({root:["root"],action:["action"],message:["message"]},h7,t)},v7=Ee(us,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=l1(e.palette.background.default,t);return $({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),y7=Ee("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),b7=Ee("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),w7=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:a="alert"}=r,l=Ie(r,m7),c=r,u=g7(c);return v.jsxs(v7,$({role:a,square:!0,elevation:6,className:De(u.root,o),ownerState:c,ref:n},l,{children:[v.jsx(y7,{className:u.message,ownerState:c,children:s}),i?v.jsx(b7,{className:u.action,ownerState:c,children:i}):null]}))});function x7(e){return ft("MuiSnackbar",e)}pt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const S7=["onEnter","onExited"],_7=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],C7=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${we(n.vertical)}${we(n.horizontal)}`]};return mt(r,x7,t)},Vk=Ee("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${we(n.anchorOrigin.vertical)}${we(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return $({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:$({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),k7=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiSnackbar"}),i=Ni(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:f,ContentProps:m,disableWindowBlurListener:h=!1,message:g,open:R,TransitionComponent:b=Kf,transitionDuration:w=o,TransitionProps:{onEnter:y,onExited:_}={}}=r,k=Ie(r.TransitionProps,S7),E=Ie(r,_7),P=$({},r,{anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:c,disableWindowBlurListener:h,TransitionComponent:b,transitionDuration:w}),I=C7(P),{getRootProps:A,onClickAway:L}=p7($({},P)),[N,F]=C.useState(!0),z=$o({elementType:Vk,getSlotProps:A,externalForwardedProps:E,ownerState:P,additionalProps:{ref:n},className:[I.root,d]}),K=le=>{F(!0),_&&_(le)},Z=(le,ce)=>{F(!1),y&&y(le,ce)};return!R&&N?null:v.jsx(nW,$({onClickAway:L},f,{children:v.jsx(Vk,$({},z,{children:v.jsx(b,$({appear:!0,in:R,timeout:w,direction:a==="top"?"down":"up",onEnter:Z,onExited:K},k,{children:u||v.jsx(w7,$({message:g,action:s},m))}))}))}))});function E7(e){return ft("MuiTooltip",e)}const _a=pt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),R7=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function P7(e){return Math.round(e*1e5)/1e5}const T7=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${we(o.split("-")[0])}`],arrow:["arrow"]};return mt(s,E7,t)},O7=Ee(VO,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>$({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${_a.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${_a.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${_a.arrow}`]:$({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${_a.arrow}`]:$({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),j7=Ee("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${we(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>$({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:At(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${P7(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${_a.popper}[data-popper-placement*="left"] &`]:$({transformOrigin:"right center"},t.isRtl?$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):$({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${_a.popper}[data-popper-placement*="right"] &`]:$({transformOrigin:"left center"},t.isRtl?$({marginRight:"14px"},t.touch&&{marginRight:"24px"}):$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${_a.popper}[data-popper-placement*="top"] &`]:$({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${_a.popper}[data-popper-placement*="bottom"] &`]:$({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),L7=Ee("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:At(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let wh=!1;const Kk=new vp;let Pd={x:0,y:0};function xh(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const em=C.forwardRef(function(t,n){var r,i,o,s,a,l,c,u,d,f,m,h,g,R,b,w,y,_,k;const E=gt({props:t,name:"MuiTooltip"}),{arrow:P=!1,children:I,components:A={},componentsProps:L={},describeChild:N=!1,disableFocusListener:F=!1,disableHoverListener:z=!1,disableInteractive:K=!1,disableTouchListener:Z=!1,enterDelay:le=100,enterNextDelay:ce=0,enterTouchDelay:H=700,followCursor:V=!1,id:se,leaveDelay:je=0,leaveTouchDelay:Ge=1500,onClose:Le,onOpen:_e,open:Ve,placement:Pe="bottom",PopperComponent:ct,PopperProps:ht={},slotProps:Te={},slots:Tt={},title:ut,TransitionComponent:ze=Kf,TransitionProps:Ze}=E,yt=Ie(E,R7),ee=C.isValidElement(I)?I:v.jsx("span",{children:I}),me=Ni(),Ce=Ex(),[Ue,W]=C.useState(),[S,O]=C.useState(null),D=C.useRef(!1),q=K||V,X=Sa(),pe=Sa(),Fe=Sa(),rt=Sa(),[Xe,Oe]=Pu({controlled:Ve,default:!1,name:"Tooltip",state:"open"});let et=Xe;const Rt=yp(se),tn=C.useRef(),qe=Yi(()=>{tn.current!==void 0&&(document.body.style.WebkitUserSelect=tn.current,tn.current=void 0),rt.clear()});C.useEffect(()=>qe,[qe]);const bt=Je=>{Kk.clear(),wh=!0,Oe(!0),_e&&!et&&_e(Je)},Me=Yi(Je=>{Kk.start(800+je,()=>{wh=!1}),Oe(!1),Le&&et&&Le(Je),X.start(me.transitions.duration.shortest,()=>{D.current=!1})}),Yt=Je=>{D.current&&Je.type!=="touchstart"||(Ue&&Ue.removeAttribute("title"),pe.clear(),Fe.clear(),le||wh&&ce?pe.start(wh?ce:le,()=>{bt(Je)}):bt(Je))},An=Je=>{pe.clear(),Fe.start(je,()=>{Me(Je)})},{isFocusVisibleRef:dr,onBlur:We,onFocus:Bi,ref:Fi}=Sv(),[,er]=C.useState(!1),po=Je=>{We(Je),dr.current===!1&&(er(!1),An(Je))},zo=Je=>{Ue||W(Je.currentTarget),Bi(Je),dr.current===!0&&(er(!0),Yt(Je))},ps=Je=>{D.current=!0;const Dt=ee.props;Dt.onTouchStart&&Dt.onTouchStart(Je)},tl=Je=>{ps(Je),Fe.clear(),X.clear(),qe(),tn.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",rt.start(H,()=>{document.body.style.WebkitUserSelect=tn.current,Yt(Je)})},di=Je=>{ee.props.onTouchEnd&&ee.props.onTouchEnd(Je),qe(),Fe.start(Ge,()=>{Me(Je)})};C.useEffect(()=>{if(!et)return;function Je(Dt){(Dt.key==="Escape"||Dt.key==="Esc")&&Me(Dt)}return document.addEventListener("keydown",Je),()=>{document.removeEventListener("keydown",Je)}},[Me,et]);const Rr=un(ee.ref,Fi,W,n);!ut&&ut!==0&&(et=!1);const Pr=C.useRef(),fr=Je=>{const Dt=ee.props;Dt.onMouseMove&&Dt.onMouseMove(Je),Pd={x:Je.clientX,y:Je.clientY},Pr.current&&Pr.current.update()},zt={},Q=typeof ut=="string";N?(zt.title=!et&&Q&&!z?ut:null,zt["aria-describedby"]=et?Rt:null):(zt["aria-label"]=Q?ut:null,zt["aria-labelledby"]=et&&!Q?Rt:null);const ie=$({},zt,yt,ee.props,{className:De(yt.className,ee.props.className),onTouchStart:ps,ref:Rr},V?{onMouseMove:fr}:{}),he={};Z||(ie.onTouchStart=tl,ie.onTouchEnd=di),z||(ie.onMouseOver=xh(Yt,ie.onMouseOver),ie.onMouseLeave=xh(An,ie.onMouseLeave),q||(he.onMouseOver=Yt,he.onMouseLeave=An)),F||(ie.onFocus=xh(zo,ie.onFocus),ie.onBlur=xh(po,ie.onBlur),q||(he.onFocus=zo,he.onBlur=po));const Se=C.useMemo(()=>{var Je;let Dt=[{name:"arrow",enabled:!!S,options:{element:S,padding:4}}];return(Je=ht.popperOptions)!=null&&Je.modifiers&&(Dt=Dt.concat(ht.popperOptions.modifiers)),$({},ht.popperOptions,{modifiers:Dt})},[S,ht]),$e=$({},E,{isRtl:Ce,arrow:P,disableInteractive:q,placement:Pe,PopperComponentProp:ct,touch:D.current}),nt=T7($e),st=(r=(i=Tt.popper)!=null?i:A.Popper)!=null?r:O7,Ae=(o=(s=(a=Tt.transition)!=null?a:A.Transition)!=null?s:ze)!=null?o:Kf,vt=(l=(c=Tt.tooltip)!=null?c:A.Tooltip)!=null?l:j7,at=(u=(d=Tt.arrow)!=null?d:A.Arrow)!=null?u:L7,it=tu(st,$({},ht,(f=Te.popper)!=null?f:L.popper,{className:De(nt.popper,ht==null?void 0:ht.className,(m=(h=Te.popper)!=null?h:L.popper)==null?void 0:m.className)}),$e),Ot=tu(Ae,$({},Ze,(g=Te.transition)!=null?g:L.transition),$e),Nt=tu(vt,$({},(R=Te.tooltip)!=null?R:L.tooltip,{className:De(nt.tooltip,(b=(w=Te.tooltip)!=null?w:L.tooltip)==null?void 0:b.className)}),$e),Lt=tu(at,$({},(y=Te.arrow)!=null?y:L.arrow,{className:De(nt.arrow,(_=(k=Te.arrow)!=null?k:L.arrow)==null?void 0:_.className)}),$e);return v.jsxs(C.Fragment,{children:[C.cloneElement(ee,ie),v.jsx(st,$({as:ct??VO,placement:Pe,anchorEl:V?{getBoundingClientRect:()=>({top:Pd.y,left:Pd.x,right:Pd.x,bottom:Pd.y,width:0,height:0})}:Ue,popperRef:Pr,open:Ue?et:!1,id:Rt,transition:!0},he,it,{popperOptions:Se,children:({TransitionProps:Je})=>v.jsx(Ae,$({timeout:me.transitions.duration.shorter},Je,Ot,{children:v.jsxs(vt,$({},Nt,{children:[ut,P?v.jsx(at,$({},Lt,{ref:O})):null]}))}))}))]})});function I7(e){return ft("MuiSwitch",e)}const zr=pt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),M7=["className","color","edge","size","sx"],N7=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,a={root:["root",n&&`edge${we(n)}`,`size${we(r)}`],switchBase:["switchBase",`color${we(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=mt(a,I7,t);return $({},t,l)},$7=Ee("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${we(n.edge)}`],t[`size${we(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${zr.thumb}`]:{width:16,height:16},[`& .${zr.switchBase}`]:{padding:4,[`&.${zr.checked}`]:{transform:"translateX(16px)"}}}}]}),A7=Ee(ZO,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${zr.input}`]:t.input},n.color!=="default"&&t[`color${we(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${zr.checked}`]:{transform:"translateX(20px)"},[`&.${zr.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${zr.checked} + .${zr.track}`]:{opacity:.5},[`&.${zr.disabled} + .${zr.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${zr.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{color:t},style:{[`&.${zr.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:At(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${zr.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Bm(e.palette[t].main,.62):Dm(e.palette[t].main,.55)}`}},[`&.${zr.checked} + .${zr.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),D7=Ee("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),B7=Ee("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),F7=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:a="medium",sx:l}=r,c=Ie(r,M7),u=$({},r,{color:o,edge:s,size:a}),d=N7(u),f=v.jsx(B7,{className:d.thumb,ownerState:u});return v.jsxs($7,{className:De(d.root,i),sx:l,ownerState:u,children:[v.jsx(A7,$({type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u},c,{classes:$({},d,{root:d.switchBase})})),v.jsx(D7,{className:d.track,ownerState:u})]})});function z7(e){return ft("MuiTextField",e)}pt("MuiTextField",["root"]);const U7=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],W7={standard:Vx,filled:Hx,outlined:qx},G7=e=>{const{classes:t}=e;return mt({root:["root"]},z7,t)},H7=Ee(xl,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),V7=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:f,fullWidth:m=!1,helperText:h,id:g,InputLabelProps:R,inputProps:b,InputProps:w,inputRef:y,label:_,maxRows:k,minRows:E,multiline:P=!1,name:I,onBlur:A,onChange:L,onFocus:N,placeholder:F,required:z=!1,rows:K,select:Z=!1,SelectProps:le,type:ce,value:H,variant:V="outlined"}=r,se=Ie(r,U7),je=$({},r,{autoFocus:o,color:l,disabled:u,error:d,fullWidth:m,multiline:P,required:z,select:Z,variant:V}),Ge=G7(je),Le={};V==="outlined"&&(R&&typeof R.shrink<"u"&&(Le.notched=R.shrink),Le.label=_),Z&&((!le||!le.native)&&(Le.id=void 0),Le["aria-describedby"]=void 0);const _e=yp(g),Ve=h&&_e?`${_e}-helper-text`:void 0,Pe=_&&_e?`${_e}-label`:void 0,ct=W7[V],ht=v.jsx(ct,$({"aria-describedby":Ve,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:m,multiline:P,name:I,rows:K,maxRows:k,minRows:E,type:ce,value:H,id:_e,inputRef:y,onBlur:A,onChange:L,onFocus:N,placeholder:F,inputProps:b},Le,w));return v.jsxs(H7,$({className:De(Ge.root,a),disabled:u,error:d,fullWidth:m,ref:n,required:z,color:l,variant:V,ownerState:je},se,{children:[_!=null&&_!==""&&v.jsx(tj,$({htmlFor:_e,id:Pe},R,{children:_})),Z?v.jsx(Pl,$({"aria-describedby":Ve,id:_e,labelId:Pe,value:H,input:ht},le,{children:s})):ht,h&&v.jsx(qW,$({id:Ve},f,{children:h}))]}))});function K7(e,t){for(var n=0;nr[e]:r=>{for(var i=r,o=0;o"u")return i}return i}}function on(e){return Object.assign({},e)}function J7(e){return Object.keys(e)[0]}function qm(e,t=!1){if(!e)return e;if(!t&&Array.isArray(e))return e.sort((r,i)=>typeof r=="string"&&typeof i=="string"?r.localeCompare(i):typeof r=="object"?1:-1).map(r=>qm(r,t));if(typeof e=="object"&&!Array.isArray(e)){var n={};return Object.keys(e).sort((r,i)=>r.localeCompare(i)).forEach(r=>{n[r]=qm(e[r],t)}),n}return e}function b1(e){if(!e||e===null||typeof e!="object")return e;if(Array.isArray(e)){for(var t=new Array(e.length),n=t.length;n--;)t[n]=b1(e[n]);return t}var r={};for(var i in e)r[i]=b1(e[i]);return r}var io=b1;function Ns(e,t,n){return Object.defineProperty(e,t,{get:function(){return n}}),n}var Xx=1;function Yu(){return{lwt:Xx}}function Do(){return""}function Z7(e){return Object.assign({},e,{_meta:void 0,_deleted:void 0,_rev:void 0})}function eH(e,t,n){if(t.length!==n.length)return!1;for(var r=0,i=t.length;r>>2]>>>24-n%4*8&255;this.words[this.sigBytes+n>>>2]|=r<<24-(this.sigBytes+n)%4*8}else for(let n=0;n>>2]=t.words[n>>>2];return this.sigBytes+=t.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new Ma([...this.words])}}const tH={stringify(e){const t=[];for(let n=0;n>>2]>>>24-n%4*8&255;t.push((r>>>4).toString(16),(r&15).toString(16))}return t.join("")}},nH={parse(e){const t=e.length,n=[];for(let r=0;r>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new Ma(n,t)}},rH={parse(e){return nH.parse(unescape(encodeURIComponent(e)))}};class iH{constructor(){this._data=new Ma,this._nDataBytes=0,this._minBufferSize=0,this.blockSize=512/32}reset(){this._data=new Ma,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=rH.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_doProcessBlock(t,n){}_process(t){let n,r=this._data.sigBytes/(this.blockSize*4);t?r=Math.ceil(r):r=Math.max((r|0)-this._minBufferSize,0);const i=r*this.blockSize,o=Math.min(i*4,this._data.sigBytes);if(i){for(let s=0;s>>7)^(y<<14|y>>>18)^y>>>3,k=fl[f-2],E=(k<<15|k>>>17)^(k<<13|k>>>19)^k>>>10;fl[f]=_+fl[f-7]+E+fl[f-16]}const m=l&c^~l&u,h=i&o^i&s^o&s,g=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),R=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),b=d+R+m+sH[f]+fl[f],w=g+h;d=u,u=c,c=l,l=a+b|0,a=s,s=o,o=i,i=b+w|0}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+l|0,r[5]=r[5]+c|0,r[6]=r[6]+u|0,r[7]=r[7]+d|0}finalize(t){super.finalize(t);const n=this._nDataBytes*8,r=this._data.sigBytes*8;return this._data.words[r>>>5]|=128<<24-r%32,this._data.words[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),this._data.words[(r+64>>>9<<4)+15]=n,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function lH(e){return new aH().finalize(e).toString()}function cH(e){return Promise.resolve(lH(e))}async function uH(e){var t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",t),r=Array.prototype.map.call(new Uint8Array(n),i=>("00"+i.toString(16)).slice(-2)).join("");return r}var dH=typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof crypto.subtle.digest=="function",lj=dH?uH:cH;function fH(){return new Promise(e=>setTimeout(e,0))}function cj(e=0){return new Promise(t=>setTimeout(t,e))}function pH(e){return e&&typeof e.then=="function"?e:Promise.resolve(e)}var Wv=Promise.resolve(!0),Po=Promise.resolve(!1),hH=Promise.resolve(null),Ci=Promise.resolve();function Gv(e=1e4){return typeof requestIdleCallback=="function"?new Promise(t=>{requestIdleCallback(()=>t(),{timeout:e})}):cj(0)}var w0=Ci;function mH(e=void 0){return w0=w0.then(()=>Gv(e)),w0}function gH(e,t){return e.reduce((n,r)=>n.then(r),Promise.resolve(t))}var vH=/\./g,Yk="abcdefghijklmnopqrstuvwxyz";function cc(e=10){for(var t="",n=0;n{var t=typeof e;return e!==null&&(t==="object"||t==="function")},x0=new Set(["__proto__","prototype","constructor"]),yH=new Set("0123456789");function dj(e){var t=[],n="",r="start",i=!1;for(var o of e)switch(o){case"\\":{if(r==="index")throw new Error("Invalid character in an index");if(r==="indexEnd")throw new Error("Invalid character after an index");i&&(n+=o),r="property",i=!i;break}case".":{if(r==="index")throw new Error("Invalid character in an index");if(r==="indexEnd"){r="property";break}if(i){i=!1,n+=o;break}if(x0.has(n))return[];t.push(n),n="",r="property";break}case"[":{if(r==="index")throw new Error("Invalid character in an index");if(r==="indexEnd"){r="index";break}if(i){i=!1,n+=o;break}if(r==="property"){if(x0.has(n))return[];t.push(n),n=""}r="index";break}case"]":{if(r==="index"){t.push(Number.parseInt(n,10)),n="",r="indexEnd";break}if(r==="indexEnd")throw new Error("Invalid character after an index")}default:{if(r==="index"&&!yH.has(o))throw new Error("Invalid character in an index");if(r==="indexEnd")throw new Error("Invalid character after an index");r==="start"&&(r="property"),i&&(i=!1,n+="\\"),n+=o}}switch(i&&(n+="\\"),r){case"property":{if(x0.has(n))return[];t.push(n);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}function fj(e,t){if(typeof t!="number"&&Array.isArray(e)){var n=Number.parseInt(t,10);return Number.isInteger(n)&&e[n]===e[t]}return!1}function bH(e,t){if(fj(e,t))throw new Error("Cannot use string index")}function Ua(e,t,n){if(Array.isArray(t)&&(t=t.join(".")),!t.includes(".")&&!t.includes("["))return e[t];if(!w1(e)||typeof t!="string")return n===void 0?e:n;var r=dj(t);if(r.length===0)return n;for(var i=0;i"u")throw new Error("missing value from map "+t);return n}function Gs(e,t,n,r){var i=e.get(t);return typeof i>"u"&&(i=n(),e.set(t,i)),i}function fn(e){var t=e.split("-"),n="RxDB";return t.forEach(r=>{n+=uj(r)}),n+="Plugin",new Error(`You are using a function which must be overwritten by a plugin. You should either prevent the usage of this function or add the plugin via: import { `+n+" } from 'rxdb/plugins/"+e+`'; addRxPlugin(`+n+`); `)}function Qk(e){var t={name:e.name,message:e.message,rxdb:e.rxdb,parameters:e.parameters,extensions:e.extensions,code:e.code,url:e.url,stack:e.stack?e.stack.replace(/\n/g,` - `):void 0};return t}var S0=0;function ar(){var e=Date.now();e=e+.01,e<=S0&&(e=S0+.01);var t=parseFloat(e.toFixed(2));return S0=t,t}function xt(e,t){if(!e)throw t||(t=""),new Error("ensureNotFalsy() is falsy: "+t);return e}var Jx={bufferSize:1,refCount:!0},wj="15.28.0",_0={},kH="6da4936d1425ff3a5c44c02342c6daf791d266be3ae8479b8ec59e261df41b93";function x1(e){return x1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},x1(e)}function EH(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function xj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xj=function(){return!!e})()}function RH(e,t,n){if(xj())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Wf(i,n.prototype),i}function Qm(e){var t=typeof Map=="function"?new Map:void 0;return Qm=function(r){if(r===null||!EH(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return RH(r,arguments,x1(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Wf(i,r)},Qm(e)}var bn={isDevMode(){return!1},deepFreezeWhenDevMode(e){return e},tunnelErrorMessage(e){return"RxDB Error-Code "+e+`. + `):void 0};return t}var S0=0;function ar(){var e=Date.now();e=e+.01,e<=S0&&(e=S0+.01);var t=parseFloat(e.toFixed(2));return S0=t,t}function xt(e,t){if(!e)throw t||(t=""),new Error("ensureNotFalsy() is falsy: "+t);return e}var Jx={bufferSize:1,refCount:!0},hj="15.28.0",_0={},wH="6da4936d1425ff3a5c44c02342c6daf791d266be3ae8479b8ec59e261df41b93";function x1(e){return x1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},x1(e)}function xH(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function mj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mj=function(){return!!e})()}function SH(e,t,n){if(mj())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Wf(i,n.prototype),i}function Qm(e){var t=typeof Map=="function"?new Map:void 0;return Qm=function(r){if(r===null||!xH(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return SH(r,arguments,x1(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Wf(i,r)},Qm(e)}var bn={isDevMode(){return!1},deepFreezeWhenDevMode(e){return e},tunnelErrorMessage(e){return"RxDB Error-Code "+e+`. Error messages are not included in RxDB core to reduce build size. - `}};function PH(e){var t="";return Object.keys(e).length===0||(t+=`Given parameters: { + `}};function _H(e){var t="";return Object.keys(e).length===0||(t+=`Given parameters: { `,t+=Object.keys(e).map(n=>{var r="[object Object]";try{n==="errors"?r=e[n].map(i=>JSON.stringify(i,Object.getOwnPropertyNames(i))):r=JSON.stringify(e[n],function(i,o){return o===void 0?null:o},2)}catch{}return n+":"+r}).join(` -`),t+="}"),t}function Sj(e,t,n){return"RxError ("+t+`): +`),t+="}"),t}function gj(e,t,n){return"RxError ("+t+`): `+e+` -`+PH(n)}var TH=function(e){function t(r,i,o={}){var s,a=Sj(i,r,o);return s=e.call(this,a)||this,s.code=r,s.message=a,s.url=Zx(r),s.parameters=o,s.rxdb=!0,s}bp(t,e);var n=t.prototype;return n.toString=function(){return this.message},Ja(t,[{key:"name",get:function(){return"RxError ("+this.code+")"}},{key:"typeError",get:function(){return!1}}])}(Qm(Error)),OH=function(e){function t(r,i,o={}){var s,a=Sj(i,r,o);return s=e.call(this,a)||this,s.code=r,s.message=a,s.url=Zx(r),s.parameters=o,s.rxdb=!0,s}bp(t,e);var n=t.prototype;return n.toString=function(){return this.message},Ja(t,[{key:"name",get:function(){return"RxTypeError ("+this.code+")"}},{key:"typeError",get:function(){return!0}}])}(Qm(TypeError));function Zx(e){return"https://rxdb.info/errors.html?console=errors#"+e}function _j(e){return` - You can find out more about this error here: `+Zx(e)+" "}function ot(e,t){return new TH(e,bn.tunnelErrorMessage(e)+_j(e),t)}function xi(e,t){return new OH(e,bn.tunnelErrorMessage(e)+_j(e),t)}function Hv(e){return e&&e.status===409?e:!1}var jH={409:"document write conflict",422:"schema validation error",510:"attachment data missing"};function LH(e){return ot("COL20",{name:jH[e.status],document:e.documentId,writeError:e})}var Yf={preAddRxPlugin:[],preCreateRxDatabase:[],createRxDatabase:[],preCreateRxCollection:[],createRxCollection:[],createRxState:[],postDestroyRxCollection:[],postRemoveRxCollection:[],preCreateRxSchema:[],createRxSchema:[],preCreateRxQuery:[],prePrepareQuery:[],createRxDocument:[],postCreateRxDocument:[],preCreateRxStorageInstance:[],preStorageWrite:[],preMigrateDocument:[],postMigrateDocument:[],preDestroyRxDatabase:[],postRemoveRxDatabase:[],preReplicationMasterWrite:[],preReplicationMasterWriteDocumentsHandle:[]};function oo(e,t){Yf[e].length>0&&Yf[e].forEach(n=>n(t))}function Ql(e,t){return Promise.all(Yf[e].map(n=>n(t)))}function Nu(e,t){var n=t;n=n.replace(SH,".properties."),n="properties."+n,n=Ud(n);var r=Ua(e,n);return r}function IH(e,t,n){if(typeof t.primaryKey=="string")return n;var r=Za(t,n),i=n[e];if(i&&i!==r)throw ot("DOC19",{args:{documentData:n,existingPrimary:i,newPrimary:r},schema:t});return n[e]=r,n}function $i(e){return typeof e=="string"?e:e.key}function MH(e){var t=$i(e.primaryKey),n=Nu(e,t);return xt(n.maxLength)}function Za(e,t){if(typeof e.primaryKey=="string")return t[e.primaryKey];var n=e.primaryKey;return n.fields.map(r=>{var i=Ua(t,r);if(typeof i>"u")throw ot("DOC18",{args:{field:r,documentData:t}});return i}).join(n.separator)}function NH(e){var t=qm(e,!0);return t}function $H(e){return["_deleted",e]}function Vv(e){e=on(e);var t=$i(e.primaryKey);e.properties=on(e.properties),e.additionalProperties=!1,Object.prototype.hasOwnProperty.call(e,"keyCompression")||(e.keyCompression=!1),e.indexes=e.indexes?e.indexes.slice(0):[],e.required=e.required?e.required.slice(0):[],e.encrypted=e.encrypted?e.encrypted.slice(0):[],e.properties._rev={type:"string",minLength:1},e.properties._attachments={type:"object"},e.properties._deleted={type:"boolean"},e.properties._meta=AH,e.required=e.required?e.required.slice(0):[],e.required.push("_deleted"),e.required.push("_rev"),e.required.push("_meta"),e.required.push("_attachments");var n=Cj(e);Yl(e.required,n),e.required=e.required.filter(o=>!o.includes(".")).filter((o,s,a)=>a.indexOf(o)===s),e.version=e.version||0;var r=e.indexes.map(o=>{var s=Qx(o)?o.slice(0):[o];return s.includes(t)||s.push(t),s[0]!=="_deleted"&&s.unshift("_deleted"),s});r.length===0&&r.push($H(t)),r.push(["_meta.lwt",t]),e.internalIndexes&&e.internalIndexes.map(o=>{r.push(o)});var i=new Set;return r.filter(o=>{var s=o.join(",");return i.has(s)?!1:(i.add(s),!0)}),e.indexes=r,e}var AH={type:"object",properties:{lwt:{type:"number",minimum:Xx,maximum:1e15,multipleOf:.01}},additionalProperties:!0,required:["lwt"]};function Cj(e){var t=Object.keys(e.properties).filter(r=>e.properties[r].final),n=$i(e.primaryKey);return t.push(n),typeof e.primaryKey!="string"&&e.primaryKey.fields.forEach(r=>t.push(r)),t}function DH(e,t){for(var n=Object.keys(e.defaultValues),r=0;r"u")&&(t[i]=e.defaultValues[i])}return t}var kj=function(){function e(n,r){this.jsonSchema=n,this.hashFunction=r,this.indexes=BH(this.jsonSchema),this.primaryPath=$i(this.jsonSchema.primaryKey),this.finalFields=Cj(this.jsonSchema)}var t=e.prototype;return t.validateChange=function(r,i){this.finalFields.forEach(o=>{if(!Ym(r[o],i[o]))throw ot("DOC9",{dataBefore:r,dataAfter:i,fieldName:o,schema:this.jsonSchema})})},t.getDocumentPrototype=function(){var r={},i=Nu(this.jsonSchema,"");return Object.keys(i).forEach(o=>{var s=o;r.__defineGetter__(o,function(){if(!(!this.get||typeof this.get!="function")){var a=this.get(s);return a}}),Object.defineProperty(r,o+"$",{get:function(){return this.get$(s)},enumerable:!1,configurable:!1}),Object.defineProperty(r,o+"$$",{get:function(){return this.get$$(s)},enumerable:!1,configurable:!1}),Object.defineProperty(r,o+"_",{get:function(){return this.populate(s)},enumerable:!1,configurable:!1})}),Ns(this,"getDocumentPrototype",()=>r),r},t.getPrimaryOfDocumentData=function(r){return Za(this.jsonSchema,r)},Ja(e,[{key:"version",get:function(){return this.jsonSchema.version}},{key:"defaultValues",get:function(){var n={};return Object.entries(this.jsonSchema.properties).filter(([,r])=>Object.prototype.hasOwnProperty.call(r,"default")).forEach(([r,i])=>n[r]=i.default),Ns(this,"defaultValues",n)}},{key:"hash",get:function(){return Ns(this,"hash",this.hashFunction(JSON.stringify(this.jsonSchema)))}}])}();function BH(e){return(e.indexes||[]).map(t=>Qx(t)?t:[t])}function FH(e,t,n=!0){n&&oo("preCreateRxSchema",e);var r=Vv(e);r=NH(r),bn.deepFreezeWhenDevMode(r);var i=new kj(r,t);return oo("createRxSchema",i),i}function In(e){return typeof e=="function"}function zH(e){return In(e==null?void 0:e.lift)}function Zs(e){return function(t){if(zH(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}var S1=function(e,t){return S1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},S1(e,t)};function uc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");S1(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function UH(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):i(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function Ej(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xl(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function Jl(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r1||l(m,g)})},h&&(i[m]=h(i[m])))}function l(m,h){try{c(r[m](h))}catch(g){f(o[0][3],g)}}function c(m){m.value instanceof du?Promise.resolve(m.value.v).then(u,d):f(o[0][2],m)}function u(m){l("next",m)}function d(m){l("throw",m)}function f(m,h){m(h),o.shift(),o.length&&l(o[0][0],o[0][1])}}function GH(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof $u=="function"?$u(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,l){s=e[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var Rj=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function Pj(e){return In(e==null?void 0:e.then)}function eS(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var C0=eS(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription: +`+_H(n)}var CH=function(e){function t(r,i,o={}){var s,a=gj(i,r,o);return s=e.call(this,a)||this,s.code=r,s.message=a,s.url=Zx(r),s.parameters=o,s.rxdb=!0,s}bp(t,e);var n=t.prototype;return n.toString=function(){return this.message},Ja(t,[{key:"name",get:function(){return"RxError ("+this.code+")"}},{key:"typeError",get:function(){return!1}}])}(Qm(Error)),kH=function(e){function t(r,i,o={}){var s,a=gj(i,r,o);return s=e.call(this,a)||this,s.code=r,s.message=a,s.url=Zx(r),s.parameters=o,s.rxdb=!0,s}bp(t,e);var n=t.prototype;return n.toString=function(){return this.message},Ja(t,[{key:"name",get:function(){return"RxTypeError ("+this.code+")"}},{key:"typeError",get:function(){return!0}}])}(Qm(TypeError));function Zx(e){return"https://rxdb.info/errors.html?console=errors#"+e}function vj(e){return` + You can find out more about this error here: `+Zx(e)+" "}function ot(e,t){return new CH(e,bn.tunnelErrorMessage(e)+vj(e),t)}function xi(e,t){return new kH(e,bn.tunnelErrorMessage(e)+vj(e),t)}function Hv(e){return e&&e.status===409?e:!1}var EH={409:"document write conflict",422:"schema validation error",510:"attachment data missing"};function RH(e){return ot("COL20",{name:EH[e.status],document:e.documentId,writeError:e})}var Yf={preAddRxPlugin:[],preCreateRxDatabase:[],createRxDatabase:[],preCreateRxCollection:[],createRxCollection:[],createRxState:[],postDestroyRxCollection:[],postRemoveRxCollection:[],preCreateRxSchema:[],createRxSchema:[],preCreateRxQuery:[],prePrepareQuery:[],createRxDocument:[],postCreateRxDocument:[],preCreateRxStorageInstance:[],preStorageWrite:[],preMigrateDocument:[],postMigrateDocument:[],preDestroyRxDatabase:[],postRemoveRxDatabase:[],preReplicationMasterWrite:[],preReplicationMasterWriteDocumentsHandle:[]};function oo(e,t){Yf[e].length>0&&Yf[e].forEach(n=>n(t))}function Ql(e,t){return Promise.all(Yf[e].map(n=>n(t)))}function Nu(e,t){var n=t;n=n.replace(vH,".properties."),n="properties."+n,n=Ud(n);var r=Ua(e,n);return r}function PH(e,t,n){if(typeof t.primaryKey=="string")return n;var r=Za(t,n),i=n[e];if(i&&i!==r)throw ot("DOC19",{args:{documentData:n,existingPrimary:i,newPrimary:r},schema:t});return n[e]=r,n}function $i(e){return typeof e=="string"?e:e.key}function TH(e){var t=$i(e.primaryKey),n=Nu(e,t);return xt(n.maxLength)}function Za(e,t){if(typeof e.primaryKey=="string")return t[e.primaryKey];var n=e.primaryKey;return n.fields.map(r=>{var i=Ua(t,r);if(typeof i>"u")throw ot("DOC18",{args:{field:r,documentData:t}});return i}).join(n.separator)}function OH(e){var t=qm(e,!0);return t}function jH(e){return["_deleted",e]}function Vv(e){e=on(e);var t=$i(e.primaryKey);e.properties=on(e.properties),e.additionalProperties=!1,Object.prototype.hasOwnProperty.call(e,"keyCompression")||(e.keyCompression=!1),e.indexes=e.indexes?e.indexes.slice(0):[],e.required=e.required?e.required.slice(0):[],e.encrypted=e.encrypted?e.encrypted.slice(0):[],e.properties._rev={type:"string",minLength:1},e.properties._attachments={type:"object"},e.properties._deleted={type:"boolean"},e.properties._meta=LH,e.required=e.required?e.required.slice(0):[],e.required.push("_deleted"),e.required.push("_rev"),e.required.push("_meta"),e.required.push("_attachments");var n=yj(e);Yl(e.required,n),e.required=e.required.filter(o=>!o.includes(".")).filter((o,s,a)=>a.indexOf(o)===s),e.version=e.version||0;var r=e.indexes.map(o=>{var s=Qx(o)?o.slice(0):[o];return s.includes(t)||s.push(t),s[0]!=="_deleted"&&s.unshift("_deleted"),s});r.length===0&&r.push(jH(t)),r.push(["_meta.lwt",t]),e.internalIndexes&&e.internalIndexes.map(o=>{r.push(o)});var i=new Set;return r.filter(o=>{var s=o.join(",");return i.has(s)?!1:(i.add(s),!0)}),e.indexes=r,e}var LH={type:"object",properties:{lwt:{type:"number",minimum:Xx,maximum:1e15,multipleOf:.01}},additionalProperties:!0,required:["lwt"]};function yj(e){var t=Object.keys(e.properties).filter(r=>e.properties[r].final),n=$i(e.primaryKey);return t.push(n),typeof e.primaryKey!="string"&&e.primaryKey.fields.forEach(r=>t.push(r)),t}function IH(e,t){for(var n=Object.keys(e.defaultValues),r=0;r"u")&&(t[i]=e.defaultValues[i])}return t}var bj=function(){function e(n,r){this.jsonSchema=n,this.hashFunction=r,this.indexes=MH(this.jsonSchema),this.primaryPath=$i(this.jsonSchema.primaryKey),this.finalFields=yj(this.jsonSchema)}var t=e.prototype;return t.validateChange=function(r,i){this.finalFields.forEach(o=>{if(!Ym(r[o],i[o]))throw ot("DOC9",{dataBefore:r,dataAfter:i,fieldName:o,schema:this.jsonSchema})})},t.getDocumentPrototype=function(){var r={},i=Nu(this.jsonSchema,"");return Object.keys(i).forEach(o=>{var s=o;r.__defineGetter__(o,function(){if(!(!this.get||typeof this.get!="function")){var a=this.get(s);return a}}),Object.defineProperty(r,o+"$",{get:function(){return this.get$(s)},enumerable:!1,configurable:!1}),Object.defineProperty(r,o+"$$",{get:function(){return this.get$$(s)},enumerable:!1,configurable:!1}),Object.defineProperty(r,o+"_",{get:function(){return this.populate(s)},enumerable:!1,configurable:!1})}),Ns(this,"getDocumentPrototype",()=>r),r},t.getPrimaryOfDocumentData=function(r){return Za(this.jsonSchema,r)},Ja(e,[{key:"version",get:function(){return this.jsonSchema.version}},{key:"defaultValues",get:function(){var n={};return Object.entries(this.jsonSchema.properties).filter(([,r])=>Object.prototype.hasOwnProperty.call(r,"default")).forEach(([r,i])=>n[r]=i.default),Ns(this,"defaultValues",n)}},{key:"hash",get:function(){return Ns(this,"hash",this.hashFunction(JSON.stringify(this.jsonSchema)))}}])}();function MH(e){return(e.indexes||[]).map(t=>Qx(t)?t:[t])}function NH(e,t,n=!0){n&&oo("preCreateRxSchema",e);var r=Vv(e);r=OH(r),bn.deepFreezeWhenDevMode(r);var i=new bj(r,t);return oo("createRxSchema",i),i}function In(e){return typeof e=="function"}function $H(e){return In(e==null?void 0:e.lift)}function Zs(e){return function(t){if($H(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}var S1=function(e,t){return S1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},S1(e,t)};function uc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");S1(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function AH(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):i(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function wj(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xl(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function Jl(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r1||l(m,g)})},h&&(i[m]=h(i[m])))}function l(m,h){try{c(r[m](h))}catch(g){f(o[0][3],g)}}function c(m){m.value instanceof du?Promise.resolve(m.value.v).then(u,d):f(o[0][2],m)}function u(m){l("next",m)}function d(m){l("throw",m)}function f(m,h){m(h),o.shift(),o.length&&l(o[0][0],o[0][1])}}function BH(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof $u=="function"?$u(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,l){s=e[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var xj=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function Sj(e){return In(e==null?void 0:e.then)}function eS(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var C0=eS(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription: `+n.map(function(r,i){return i+1+") "+r.toString()}).join(` - `):"",this.name="UnsubscriptionError",this.errors=n}});function _1(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Kv=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=$u(s),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else s.remove(this);var u=this.initialTeardown;if(In(u))try{u()}catch(g){o=g instanceof C0?g.errors:[g]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=$u(d),m=f.next();!m.done;m=f.next()){var h=m.value;try{Xk(h)}catch(g){o=o??[],g instanceof C0?o=Jl(Jl([],Xl(o)),Xl(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new C0(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Xk(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&_1(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&_1(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Tj=Kv.EMPTY;function Oj(e){return e instanceof Kv||e&&"closed"in e&&In(e.remove)&&In(e.add)&&In(e.unsubscribe)}function Xk(e){In(e)?e():e.unsubscribe()}var jj={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Lj={setTimeout:function(e,t){for(var n=[],r=2;r0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,s=i.isStopped,a=i.observers;return o||s?Tj:(this.currentObservers=null,a.push(n),new Kv(function(){r.currentObservers=null,_1(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,s=r.isStopped;i?n.error(o):s&&n.complete()},t.prototype.asObservable=function(){var n=new ci;return n.source=this,n},t.create=function(n,r){return new tE(n,r)},t}(ci),tE=function(e){uc(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Tj},t}(Tn);function nE(){for(var e=[],t=0;t0&&(u=new Au({next:function(R){return k.next(R)},error:function(R){g=!0,E(),d=E0(b,i,R),k.error(R)},complete:function(){h=!0,E(),d=E0(b,s),k.complete()}}),el(y).subscribe(u))})(c)}}function E0(e,t){for(var n=[],r=2;r!!e.queryParams.limit,UV=e=>e.queryParams.limit===1,WV=e=>!!(e.queryParams.skip&&e.queryParams.skip>0),GV=e=>e.changeEvent.operation==="DELETE",HV=e=>e.changeEvent.operation==="INSERT",VV=e=>e.changeEvent.operation==="UPDATE",KV=e=>Yj(e)&&e.previousResults.length>=e.queryParams.limit,qV=e=>{const t=e.queryParams.sortFields,n=e.changeEvent.previous,r=e.changeEvent.doc;if(!r)return!1;if(!n)return!0;for(let i=0;i{const t=e.changeEvent.id;if(e.keyDocumentMap)return e.keyDocumentMap.has(t);{const n=e.queryParams.primaryKey,r=e.previousResults;for(let i=0;i{const t=e.previousResults[0];return!!(t&&t[e.queryParams.primaryKey]===e.changeEvent.id)},XV=e=>{const t=sS(e.previousResults);return!!(t&&t[e.queryParams.primaryKey]===e.changeEvent.id)},JV=e=>{const t=e.changeEvent.previous;if(!t)return!1;const n=e.previousResults[0];return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)<0:!1},ZV=e=>{const t=e.changeEvent.previous;if(!t)return!1;const n=sS(e.previousResults);return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)>0:!1},eK=e=>{const t=e.changeEvent.doc;if(!t)return!1;const n=e.previousResults[0];return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)<0:!1},tK=e=>{const t=e.changeEvent.doc;if(!t)return!1;const n=sS(e.previousResults);return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)>0:!1},nK=e=>{const t=e.changeEvent.previous;return t?e.queryParams.queryMatcher(t):!1},rK=e=>{const t=e.changeEvent.doc;return t?e.queryParams.queryMatcher(t):!1},iK=e=>e.previousResults.length===0,oK={0:HV,1:VV,2:GV,3:Yj,4:UV,5:WV,6:iK,7:KV,8:QV,9:XV,10:qV,11:YV,12:JV,13:ZV,14:eK,15:tK,16:nK,17:rK};function sK(e,t,n,r){var i=e.length,o=i-1,s=0;if(i===0)return e.push(t),0;for(var a;r<=o;)s=r+(o-r>>1),a=e[s],n(a,t)<=0?r=s+1:o=s-1;return n(a,t)<=0&&s++,e.splice(s,0,t),s}const aK=e=>{},aS=e=>{e.previousResults.unshift(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},lS=e=>{e.previousResults.push(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},cS=e=>{const t=e.previousResults.shift();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},uS=e=>{const t=e.previousResults.pop();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},lK=e=>{cS(e),lS(e)},cK=e=>{uS(e),aS(e)},uK=e=>{cS(e),aS(e)},dK=e=>{uS(e),lS(e)},Qj=e=>{e.keyDocumentMap&&e.keyDocumentMap.delete(e.changeEvent.id);const t=e.queryParams.primaryKey,n=e.previousResults;for(let r=0;r{const t=e.changeEvent.doc,n=e.queryParams.primaryKey,r=e.previousResults;for(let i=0;i{const t={_id:"wrongHuman"+new Date().getTime()};e.previousResults.length=0,e.previousResults.push(t),e.keyDocumentMap&&(e.keyDocumentMap.clear(),e.keyDocumentMap.set(t._id,t))},Xj=e=>{const t=e.changeEvent.id,n=e.changeEvent.doc;if(e.keyDocumentMap){if(e.keyDocumentMap.has(t))return;e.keyDocumentMap.set(t,n)}else if(e.previousResults.find(i=>i[e.queryParams.primaryKey]===t))return;sK(e.previousResults,n,e.queryParams.sortComparator,0)},hK=e=>{Qj(e),Xj(e)},mK=e=>{throw new Error("Action runFullQueryAgain must be implemented by yourself")},gK=e=>{throw new Error("Action unknownAction should never be called")},vK=["doNothing","insertFirst","insertLast","removeFirstItem","removeLastItem","removeFirstInsertLast","removeLastInsertFirst","removeFirstInsertFirst","removeLastInsertLast","removeExisting","replaceExisting","alwaysWrong","insertAtSortPosition","removeExistingAndInsertAtSortPosition","runFullQueryAgain","unknownAction"],yK={doNothing:aK,insertFirst:aS,insertLast:lS,removeFirstItem:cS,removeLastItem:uS,removeFirstInsertLast:lK,removeLastInsertFirst:cK,removeFirstInsertFirst:uK,removeLastInsertLast:dK,removeExisting:Qj,replaceExisting:fK,alwaysWrong:pK,insertAtSortPosition:Xj,removeExistingAndInsertAtSortPosition:hK,runFullQueryAgain:mK,unknownAction:gK},bK=40;function R0(e){return e.charCodeAt(0)-bK}function wK(e){return e?"1":"0"}function iE(e,t){const n=[];for(let r=0,i=e.length;rSK(CK(),oK,e);function EK(e){const t=kK(e);return vK[t]}function RK(e,t,n,r,i){const o=yK[e];return o({queryParams:t,changeEvent:n,previousResults:r,keyDocumentMap:i}),r}var fu="￿",pu=Number.MIN_SAFE_INTEGER;function PK(e,t){var n=t.selector,r=e.indexes?e.indexes.slice(0):[];t.index&&(r=[t.index]);var i=!!t.sort.find(u=>Object.values(u)[0]==="desc"),o=new Set;Object.keys(n).forEach(u=>{var d=Nu(e,u);d&&d.type==="boolean"&&Object.prototype.hasOwnProperty.call(n[u],"$eq")&&o.add(u)});var s=t.sort.map(u=>Object.keys(u)[0]),a=s.filter(u=>!o.has(u)).join(","),l=-1,c;if(r.forEach(u=>{var d=!0,f=!0,m=u.map(w=>{var y=n[w],_=y?Object.keys(y):[],k={};if(!y||!_.length){var R=f?pu:fu;k={startKey:R,endKey:d?fu:pu,inclusiveStart:!0,inclusiveEnd:!0}}else _.forEach(P=>{if(dS.has(P)){var I=y[P],$=LK(P,I);k=Object.assign(k,$)}});return typeof k.startKey>"u"&&(k.startKey=pu),typeof k.endKey>"u"&&(k.endKey=fu),typeof k.inclusiveStart>"u"&&(k.inclusiveStart=!0),typeof k.inclusiveEnd>"u"&&(k.inclusiveEnd=!0),f&&!k.inclusiveStart&&(f=!1),d&&!k.inclusiveEnd&&(d=!1),k}),h=m.map(w=>w.startKey),g=m.map(w=>w.endKey),E={index:u,startKeys:h,endKeys:g,inclusiveEnd:d,inclusiveStart:f,sortSatisfiedByIndex:!i&&a===u.filter(w=>!o.has(w)).join(","),selectorSatisfiedByIndex:jK(u,t.selector,h,g)},b=IK(e,t,E);(b>=l||t.index)&&(l=b,c=E)}),!c)throw ot("SNH",{query:t});return c}var dS=new Set(["$eq","$gt","$gte","$lt","$lte"]),TK=new Set(["$eq","$gt","$gte"]),OK=new Set(["$eq","$lt","$lte"]);function jK(e,t,n,r){var i=Object.entries(t),o=i.find(([P,I])=>{if(!e.includes(P))return!0;var $=Object.entries(I).find(([L,N])=>!dS.has(L));return $});if(o||t.$and||t.$or)return!1;var s=[],a=new Set;for(var[l,c]of Object.entries(t)){if(!e.includes(l))return!1;var u=Object.keys(c).filter(P=>TK.has(P));if(u.length>1)return!1;var d=u[0];if(d&&a.add(l),d!=="$eq"){if(s.length>0)return!1;s.push(d)}}var f=[],m=new Set;for(var[h,g]of Object.entries(t)){if(!e.includes(h))return!1;var E=Object.keys(g).filter(P=>OK.has(P));if(E.length>1)return!1;var b=E[0];if(b&&m.add(h),b!=="$eq"){if(f.length>0)return!1;f.push(b)}}var w=0;for(var y of e){for(var _ of[a,m]){if(!_.has(y)&&_.size>0)return!1;_.delete(y)}var k=n[w],R=r[w];if(k!==R&&a.size>0&&m.size>0)return!1;w++}return!0}function LK(e,t){switch(e){case"$eq":return{startKey:t,endKey:t,inclusiveEnd:!0,inclusiveStart:!0};case"$lte":return{endKey:t,inclusiveEnd:!0};case"$gte":return{startKey:t,inclusiveStart:!0};case"$lt":return{endKey:t,inclusiveEnd:!1};case"$gt":return{startKey:t,inclusiveStart:!1};default:throw new Error("SNH")}}function IK(e,t,n){var r=0,i=u=>{u>0&&(r=r+u)},o=10,s=b0(n.startKeys,u=>u!==pu&&u!==fu);i(s*o);var a=b0(n.startKeys,u=>u!==fu&&u!==pu);i(a*o);var l=b0(n.startKeys,(u,d)=>u===n.endKeys[d]);i(l*o*1.5);var c=n.sortSatisfiedByIndex?5:0;return i(c),r}class Qu extends Error{}const MK=2147483647,NK=-2147483648,$K=Number.MAX_SAFE_INTEGER,AK=Number.MIN_SAFE_INTEGER,ec=Symbol("missing"),Jj=Object.freeze(new Error("mingo: cycle detected while processing object/array")),DK=Object.getPrototypeOf([]),Zj=Object.getPrototypeOf({}),BK="[object Object]",FK=/^\[object ([a-zA-Z0-9]+)\]$/;class fS{}class pS{}const tc=e=>e===null?fS:e===void 0?pS:e.constructor,Yv=e=>{const t=VK(e);let n=0,r=t.length;for(;r;)n=(n<<5)-n^t.charCodeAt(--r);return n>>>0},eL=new Set(["null","undefined","boolean","number","string","date","regexp"]),oE=new Set([pS,fS,Boolean,String,Number]),Td=e=>e.toString(),xo=e=>`${tc(e).name}[${e.toString()}]`,nc=new Map([[Number,Td],[Boolean,Td],[RegExp,Td],[Function,Td],[Symbol,Td],[Date,e=>e.toISOString()],[String,JSON.stringify],[fS,e=>"null"],[pS,e=>"undefined"],[Int8Array,xo],[Uint8Array,xo],[Uint8ClampedArray,xo],[Int16Array,xo],[Uint16Array,xo],[Int32Array,xo],[Uint32Array,xo],[Float32Array,xo],[Float64Array,xo]]);typeof BigInt<"u"&&nc.set(BigInt,e=>"0x"+e.toString(16));typeof BigInt64Array<"u"&&nc.set(BigInt64Array,xo);typeof BigUint64Array<"u"&&nc.set(BigUint64Array,xo);const zK={null:0,undefined:0,number:1,string:2,object:3,array:4,boolean:5,date:6,regexp:7,function:8},Bo=(e,t)=>{e===ec&&(e=void 0),t===ec&&(t=void 0);const[n,r]=[e,t].map(i=>zK[Xf(i).toLowerCase()]);return n!==r?n-r:n===1||n===2||n===6?et?1:0:rc(e,t)?0:et?1:0};function Ji(e,t){if(!e)throw new Qu(t)}const UK=e=>{const t=Object.getPrototypeOf(tc(e));return t&&t.name==="TypedArray"},sE=e=>{if(oE.has(tc(e)))return e;const t=new Set,n=r=>{if(t.has(r))throw Jj;const i=tc(r);if(oE.has(i))return r;try{if(kr(r))return t.add(r),r.map(n);if(Yn(r)){t.add(r);const o={};for(const s in r)o[s]=n(r[s]);return o}}finally{t.delete(r)}return i===Date||i===RegExp||UK(r)?new i(r):r};return n(e)},Xf=e=>FK.exec(Object.prototype.toString.call(e))[1],T0=e=>typeof e=="boolean",Hs=e=>typeof e=="string",ba=e=>!isNaN(e)&&typeof e=="number",kr=Array.isArray,Yn=e=>{if(!e)return!1;const t=Object.getPrototypeOf(e);return(t===Zj||t===null)&&BK===Object.prototype.toString.call(e)},Qv=e=>e===Object(e),aE=e=>e instanceof Date,nm=e=>e instanceof RegExp,Xv=e=>typeof e=="function",Er=e=>e==null,Du=(e,t)=>e.includes(t),tL=(e,t)=>!Du(e,t),WK=(e,t=!0)=>!!e||t&&e==="",Xu=e=>Er(e)||Hs(e)&&!e||e instanceof Array&&e.length===0||Yn(e)&&Object.keys(e).length===0,lE=e=>e===ec,kp=e=>e instanceof Array?e:[e],$a=(e,t)=>!!e&&Object.prototype.hasOwnProperty.call(e,t),GK=(e,t)=>Yn(e)&&Yn(t)||kr(e)&&kr(t);function C1(e,t,n){if(n=n||{flatten:!1},lE(e)||Er(e))return t;if(lE(t)||Er(t))return e;if(!GK(e,t)){if(n.skipValidation)return t||e;throw Error("mismatched types. must both be array or object")}if(n.skipValidation=!0,kr(e)){const r=e,i=t;if(n.flatten){let o=0,s=0;for(;o{const o=iL(r,t);n.has(o)?n.get(o).some(s=>rc(e[s],r))||n.get(o).push(i):n.set(o,[i])}),n}function nL(e,t=Yv){if(e.some(a=>a.length==0))return[];if(e.length===1)return Array.from(e);const n=KK(e.map((a,l)=>[l,a.length]),a=>a[1]),r=e[n[0][0]],i=cE(r,t),o=new Map,s=new Array;return i.forEach((a,l)=>{const c=a.map(m=>r[m]),u=c.map(m=>0),d=c.map(m=>[n[0][0],0]);let f=!1;for(let m=1;mE[w]);f=c.map((w,y)=>b.some((_,k)=>{const R=u[y];return rc(w,_)&&(u[y]++,hm===e.length-1?[c[h],d[h]]:ec).filter(m=>m!==ec))}),s.sort((a,l)=>{const[c,[u,d]]=a,[f,[m,h]]=l,g=Bo(u,m);return g!==0?g:Bo(d,h)}).map(a=>a[0])}function rL(e,t=0){const n=new Array;function r(i,o){for(let s=0,a=i.length;s0||o<0)?r(i[s],Math.max(-1,o-1)):n.push(i[s])}return r(e,t),n}const HK=e=>{let[t,n]=[Object.getPrototypeOf(e),Object.getOwnPropertyNames(e)],r=t;for(;!n.length&&t!==Zj&&t!==DK;)r=t,n=Object.getOwnPropertyNames(t),t=Object.getPrototypeOf(t);const i={};return n.forEach(o=>i[o]=e[o]),[i,r]};function rc(e,t){const n=[[e,t]];for(;n.length>0;){if([e,t]=n.pop(),e===t)continue;const r=tc(e);if(r!==tc(t)||Xv(e))return!1;if(nc.has(r)){const i=nc.get(r);if(i(e)!==i(t))return!1;continue}if(r===Array||r===Object){const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length||new Set(i.concat(o)).size!=i.length)return!1;for(const s of i)n.push([e[s],t[s]]);continue}return!1}return!n.length}function VK(e){const t=new Set,n=r=>{const i=tc(r);if(nc.has(i))return nc.get(i)(r);const o=i===Object?"":i.name;if(Xv(r.toJSON))return`${o}(${JSON.stringify(r)})`;if(t.has(r))throw Jj;t.add(r);try{if(i===Array)return"["+r.map(n).join(",")+"]";if(i!==Object){const[a,l]=HK(r);if(kr(r))return`${o}${n([...r,a])}`;r=a}const s=Object.keys(r);return s.sort(),`${o}{`+s.map(a=>`${a}:${n(r[a])}`).join(",")+"}"}finally{t.delete(r)}};return n(e)}function iL(e,t){return t=t||Yv,Er(e)?null:t(e).toString()}function KK(e,t,n=Bo){if(Xu(e))return e;const r=new Array,i=new Array;for(let o=0;on(o[0],s[0])),Ep(i,r.map(o=>o[1]))}function qK(e,t,n=Yv){if(e.length<1)return new Map;const r=new Map,i=new Map;for(let o=0;orc(u,a)):null;Er(c)?(i.set(a,[s]),r.has(l)?r.get(l).push(a):r.set(l,[a])):i.get(c).push(s)}}return i}const O0=5e4;function Ep(e,...t){return e instanceof Array?t.reduce((n,r)=>{let i=Math.ceil(r.length/O0),o=0;for(;i-- >0;)Array.prototype.push.apply(n,r.slice(o,o+O0)),o+=O0;return n},e):t.filter(Qv).reduce((n,r)=>(Object.assign(n,r),n),e)}function k1(e,t){return Qv(e)?e[t]:void 0}function YK(e,t){if(t<1)return e;for(;t--&&e.length===1;)e=e[0];return e}function hS(e,t,n){let r=0;function i(s,a){let l=s;for(let c=0;c0)break;r+=1;const f=a.slice(c);l=l.reduce((m,h)=>{const g=i(h,f);return g!==void 0&&m.push(g),m},[]);break}else l=k1(l,u);if(l===void 0)break}return l}const o=eL.has(Xf(e).toLowerCase())?e:i(e,t.split("."));return o instanceof Array&&(n!=null&&n.unwrapArray)?YK(o,r):o}function rm(e,t,n){const r=t.split("."),i=r[0],o=r.slice(1).join("."),s=/^\d+$/.exec(i)!==null,a=r.length>1;let l,c;if(e instanceof Array)if(s)l=k1(e,Number(i)),a&&(l=rm(l,o,n)),l=[l];else{l=[];for(const u of e)c=rm(u,t,n),n!=null&&n.preserveMissing?(c===void 0&&(c=ec),l.push(c)):c!==void 0&&l.push(c)}else{if(c=k1(e,i),a&&(c=rm(c,o,n)),c===void 0)return;l=n!=null&&n.preserveKeys?Object.assign({},e):{},l[i]=c}return l}function E1(e){if(e instanceof Array)for(let t=e.length-1;t>=0;t--)e[t]===ec?e.splice(t,1):E1(e[t]);else if(Yn(e))for(const t in e)$a(e,t)&&E1(e[t])}const uE=/^\d+$/;function Xm(e,t,n,r){const i=t.split("."),o=i[0],s=i.slice(1).join(".");if(i.length===1)(Yn(e)||kr(e)&&uE.test(o))&&n(e,o);else{r!=null&&r.buildGraph&&Er(e[o])&&(e[o]={});const a=e[o];if(!a)return;const l=!!(i.length>1&&uE.test(i[1]));a instanceof Array&&(r!=null&&r.descendArray)&&!l?a.forEach(c=>Xm(c,s,n,r)):Xm(a,s,n,r)}}function QK(e,t,n){Xm(e,t,(r,i)=>{r[i]=Xv(n)?n(r[i]):n},{buildGraph:!0})}function dE(e,t,n){Xm(e,t,(r,i)=>{if(r instanceof Array){if(/^\d+$/.test(i))r.splice(parseInt(i),1);else if(n&&n.descendArray)for(const o of r)Yn(o)&&delete o[i]}else Yn(r)&&delete r[i]},n)}const XK=/^\$[a-zA-Z0-9_]+$/;function Ju(e){return XK.test(e)}function oL(e){if(eL.has(Xf(e).toLowerCase()))return nm(e)?{$regex:e}:{$eq:e};if(Qv(e)){if(!Object.keys(e).some(Ju))return{$eq:e};if($a(e,"$regex")){const n=Object.assign({},e);return n.$regex=new RegExp(e.$regex,e.$options),delete n.$options,n}}return e}var Ca;(function(e){e.CLONE_ALL="CLONE_ALL",e.CLONE_INPUT="CLONE_INPUT",e.CLONE_OUTPUT="CLONE_OUTPUT",e.CLONE_OFF="CLONE_OFF"})(Ca||(Ca={}));class Nl{constructor(t,n,r,i=Date.now()){this._opts=t,this._root=n,this._local=r,this.timestamp=i,this.update(n,r)}static init(t,n,r){return t instanceof Nl?new Nl(t._opts,Er(t.root)?n:t.root,Object.assign({},t.local,r)):new Nl(t,n,r)}update(t,n){var r;return this._root=t,this._local=n&&Object.assign({},n,{variables:Object.assign({},(r=this._local)===null||r===void 0?void 0:r.variables,n==null?void 0:n.variables)}),this}getOptions(){return Object.freeze(Object.assign(Object.assign({},this._opts),{context:ic.from(this._opts.context)}))}get root(){return this._root}get local(){return this._local}get idKey(){return this._opts.idKey}get collation(){var t;return(t=this._opts)===null||t===void 0?void 0:t.collation}get processingMode(){var t;return((t=this._opts)===null||t===void 0?void 0:t.processingMode)||Ca.CLONE_OFF}get useStrictMode(){var t;return(t=this._opts)===null||t===void 0?void 0:t.useStrictMode}get scriptEnabled(){var t;return(t=this._opts)===null||t===void 0?void 0:t.scriptEnabled}get useGlobalContext(){var t;return(t=this._opts)===null||t===void 0?void 0:t.useGlobalContext}get hashFunction(){var t;return(t=this._opts)===null||t===void 0?void 0:t.hashFunction}get collectionResolver(){var t;return(t=this._opts)===null||t===void 0?void 0:t.collectionResolver}get jsonSchemaValidator(){var t;return(t=this._opts)===null||t===void 0?void 0:t.jsonSchemaValidator}get variables(){var t;return(t=this._opts)===null||t===void 0?void 0:t.variables}get context(){var t;return(t=this._opts)===null||t===void 0?void 0:t.context}}function sL(e){return e instanceof Nl?e.getOptions():Object.freeze(Object.assign(Object.assign({idKey:"_id",scriptEnabled:!0,useStrictMode:!0,useGlobalContext:!0,processingMode:Ca.CLONE_OFF},e),{context:e!=null&&e.context?ic.from(e==null?void 0:e.context):ic.init({})}))}var Xt;(function(e){e.ACCUMULATOR="accumulator",e.EXPRESSION="expression",e.PIPELINE="pipeline",e.PROJECTION="projection",e.QUERY="query",e.WINDOW="window"})(Xt||(Xt={}));class ic{constructor(t){this.operators={[Xt.ACCUMULATOR]:{},[Xt.EXPRESSION]:{},[Xt.PIPELINE]:{},[Xt.PROJECTION]:{},[Xt.QUERY]:{},[Xt.WINDOW]:{}};for(const[n,r]of Object.entries(t))this.addOperators(n,r)}static init(t={}){return new ic(t)}static from(t){return new ic(t.operators)}addOperators(t,n){for(const[r,i]of Object.entries(n))this.getOperator(t,r)||(this.operators[t][r]=i);return this}addAccumulatorOps(t){return this.addOperators(Xt.ACCUMULATOR,t)}addExpressionOps(t){return this.addOperators(Xt.EXPRESSION,t)}addQueryOps(t){return this.addOperators(Xt.QUERY,t)}addPipelineOps(t){return this.addOperators(Xt.PIPELINE,t)}addProjectionOps(t){return this.addOperators(Xt.PROJECTION,t)}addWindowOps(t){return this.addOperators(Xt.WINDOW,t)}getOperator(t,n){return t in this.operators&&this.operators[t][n]||null}}const bl=ic.init();function fE(e,t){for(const[n,r]of Object.entries(t)){Ji(Xv(r)&&Ju(n),`'${n}' is not a valid operator`);const i=$l(e,n,null);Ji(!i||r===i,`${n} already exists for '${e}' operators. Cannot change operator function once registered.`)}switch(e){case Xt.ACCUMULATOR:bl.addAccumulatorOps(t);break;case Xt.EXPRESSION:bl.addExpressionOps(t);break;case Xt.PIPELINE:bl.addPipelineOps(t);break;case Xt.PROJECTION:bl.addProjectionOps(t);break;case Xt.QUERY:bl.addQueryOps(t);break;case Xt.WINDOW:bl.addWindowOps(t);break}}function $l(e,t,n){const{context:r,useGlobalContext:i}=n||{},o=r?r.getOperator(e,t):null;return!o&&i?bl.getOperator(e,t):o}const pE={$$ROOT(e,t,n){return n.root},$$CURRENT(e,t,n){return e},$$REMOVE(e,t,n){},$$NOW(e,t,n){return new Date(n.timestamp)}},R1={$$KEEP(e,t,n){return e},$$PRUNE(e,t,n){},$$DESCEND(e,t,n){if(!$a(t,"$cond"))return e;let r;for(const[i,o]of Object.entries(e))if(Qv(o)){if(o instanceof Array){const s=[];for(let a of o)Yn(a)&&(a=hE(a,t,n.update(a))),Er(a)||s.push(a);r=s}else r=hE(o,t,n.update(o));Er(r)?delete e[i]:e[i]=r}return e}};function Jo(e,t,n,r){var i;const o=Nl.init(r,e);if(n=n||"",Ju(n)){const s=$l(Xt.EXPRESSION,n,r);if(s)return s(e,t,o);const a=$l(Xt.ACCUMULATOR,n,r);if(a)return e instanceof Array||(e=Jo(e,t,null,o),t=null),Ji(e instanceof Array,`'${n}' target must be an array.`),a(e,t,o.update(null,o.local));throw new Qu(`operator '${n}' is not registered`)}if(Hs(t)&&t.length>0&&t[0]==="$"){if($a(R1,t))return t;let s=o.root;const a=t.split(".");if($a(pE,a[0]))s=pE[a[0]](e,null,o),t=t.slice(a[0].length+1);else if(a[0].slice(0,2)==="$$"){s=Object.assign({},o.variables,{this:e},(i=o.local)===null||i===void 0?void 0:i.variables);const l=a[0].slice(2);Ji($a(s,l),`Use of undefined variable: ${l}`),t=t.slice(2)}else t=t.slice(1);return t===""?s:hS(s,t)}if(kr(t))return t.map(s=>Jo(e,s,null,o));if(Yn(t)){const s={};for(const[a,l]of Object.entries(t))if(s[a]=Jo(e,l,a,o),[Xt.EXPRESSION,Xt.ACCUMULATOR].some(c=>!!$l(c,a,r)))return Ji(Object.keys(t).length===1,"Invalid aggregation expression '"+JSON.stringify(t)+"'"),s[a];return s}return t}function hE(e,t,n){const r=Jo(e,t,null,n);return $a(R1,r)?R1[r](e,t,n):r}function Bu(e){return e instanceof mE?e:new mE(e)}function JK(...e){let t=0;return Bu(()=>{for(;t{const i=r.next();if(i.done)throw P1;return i.value}}else if(t instanceof Array){const r=t,i=r.length;let o=0;n=()=>{if(o0?this.push(Zo.TAKE,t):this}drop(t){return t>0?this.push(Zo.DROP,t):this}transform(t){const n=this;let r;return Bu(()=>(r||(r=Bu(t(n.value()))),r.next()))}value(){return this.isDone||(this.isDone=this.getNext(!0).done),this.yieldedValues}each(t){for(;;){const n=this.next();if(n.done)break;if(t(n.value)===!1)return!1}return!0}reduce(t,n){let r=this.next();for(n===void 0&&!r.done&&(n=r.value,r=this.next());!r.done;)n=t(n,r.value),r=this.next();return n}size(){return this.reduce((t,n)=>++t,0)}[Symbol.iterator](){return this}}class nq{constructor(t,n){this.pipeline=t,this.options=sL(n)}stream(t){let n=Bu(t);const r=this.options.processingMode;(r==Ca.CLONE_ALL||r==Ca.CLONE_INPUT)&&n.map(sE);const i=new Array;if(!Xu(this.pipeline))for(const o of this.pipeline){const s=Object.keys(o),a=s[0],l=$l(Xt.PIPELINE,a,this.options);Ji(s.length===1&&!!l,`invalid pipeline operator ${a}`),i.push(a),n=l(n,o[a],this.options)}return(r==Ca.CLONE_OUTPUT||r==Ca.CLONE_ALL&&nL([["$group","$unwind"],i]).length)&&n.map(sE),n}run(t){return this.stream(t).value()}}class rq{constructor(t,n,r,i){this.source=t,this.predicate=n,this.projection=r,this.options=i,this.operators=[],this.result=null,this.buffer=[]}fetch(){return this.result?this.result:(Yn(this.projection)&&this.operators.push({$project:this.projection}),this.result=Bu(this.source).filter(this.predicate),this.operators.length>0&&(this.result=new nq(this.operators,this.options).stream(this.result)),this.result)}fetchAll(){const t=Bu([...this.buffer]);return this.buffer=[],JK(t,this.fetch())}all(){return this.fetchAll().value()}count(){return this.all().length}skip(t){return this.operators.push({$skip:t}),this}limit(t){return this.operators.push({$limit:t}),this}sort(t){return this.operators.push({$sort:t}),this}collation(t){return this.options=Object.assign(Object.assign({},this.options),{collation:t}),this}next(){if(this.buffer.length>0)return this.buffer.pop();const t=this.fetch().next();if(!t.done)return t.value}hasNext(){if(this.buffer.length>0)return!0;const t=this.fetch().next();return t.done?!1:(this.buffer.push(t.value),!0)}map(t){return this.all().map(t)}forEach(t){this.all().forEach(t)}[Symbol.iterator](){return this.fetchAll()}}class Rp{constructor(t,n){this.condition=t,this.options=sL(n),this.compiled=[],this.compile()}compile(){Ji(Yn(this.condition),`query criteria must be an object: ${JSON.stringify(this.condition)}`);const t={};for(const[n,r]of Object.entries(this.condition)){if(n==="$where")Object.assign(t,{field:n,expr:r});else if(Du(["$and","$or","$nor","$expr","$jsonSchema"],n))this.processOperator(n,n,r);else{Ji(!Ju(n),`unknown top level operator: ${n}`);for(const[i,o]of Object.entries(oL(r)))this.processOperator(n,i,o)}t.field&&this.processOperator(t.field,t.field,t.expr)}}processOperator(t,n,r){const i=$l(Xt.QUERY,n,this.options);if(!i)throw new Qu(`unknown query operator ${n}`);const o=i(t,r,this.options);this.compiled.push(o)}test(t){for(let n=0,r=this.compiled.length;nthis.test(r),n||{},this.options)}remove(t){return t.reduce((n,r)=>(this.test(r)||n.push(r),n),[])}}const iq=(e,t,n)=>{if(Xu(t)||!Yn(t))return e;let r=Bo;const i=n.collation;return Yn(i)&&Hs(i.locale)&&(r=sq(i)),e.transform(o=>{const s=Object.keys(t);for(const a of s.reverse()){const l=qK(o,u=>hS(u,a),n.hashFunction),c=Array.from(l.keys()).sort(r);t[a]===-1&&c.reverse(),o=[],c.reduce((u,d)=>Ep(u,l.get(d)),o)}return o})},oq={1:"base",2:"accent",3:"variant"};function sq(e){const t={sensitivity:oq[e.strength||3],caseFirst:e.caseFirst==="off"?"false":e.caseFirst||"false",numeric:e.numericOrdering||!1,ignorePunctuation:e.alternate==="shifted"};(e.caseLevel||!1)===!0&&(t.sensitivity==="base"&&(t.sensitivity="case"),t.sensitivity==="accent"&&(t.sensitivity="variant"));const n=new Intl.Collator(e.locale,t);return(r,i)=>{if(!Hs(r)||!Hs(i))return Bo(r,i);const o=n.compare(r,i);return o<0?-1:o>0?1:0}}function qr(e){const t=(n,r,i)=>{const o={unwrapArray:!0},s=Math.max(1,n.split(".").length-1);return a=>{const l=hS(a,n,o);return e(l,r,Object.assign(Object.assign({},i),{depth:s}))}};return t.op="query",t}function aL(e,t,n){if(rc(e,t)||Er(e)&&Er(t))return!0;if(e instanceof Array){const r=rc.bind(null,t);return e.some(r)||rL(e,n==null?void 0:n.depth).some(r)}return!1}function aq(e,t,n){return!aL(e,t,n)}function lL(e,t,n){return Er(e)?t.some(r=>r===null):nL([kp(e),t],n==null?void 0:n.hashFunction).length>0}function lq(e,t,n){return!lL(e,t,n)}function cq(e,t,n){return Jv(e,t,(r,i)=>Bo(r,i)<0)}function uq(e,t,n){return Jv(e,t,(r,i)=>Bo(r,i)<=0)}function dq(e,t,n){return Jv(e,t,(r,i)=>Bo(r,i)>0)}function fq(e,t,n){return Jv(e,t,(r,i)=>Bo(r,i)>=0)}function pq(e,t,n){return kp(e).some(r=>t.length===2&&r%t[0]===t[1])}function hq(e,t,n){const r=kp(e),i=o=>Hs(o)&&WK(t.exec(o),n==null?void 0:n.useStrictMode);return r.some(i)||rL(r,1).some(i)}function mq(e,t,n){return(t===!1||t===0)&&e===void 0||(t===!0||t===1)&&e!==void 0}function gq(e,t,n){if(!kr(e)||!kr(t)||!e.length||!t.length)return!1;let r=!0;for(const i of t){if(!r)break;Yn(i)&&Du(Object.keys(i),"$elemMatch")?r=cL(e,i.$elemMatch,n):i instanceof RegExp?r=e.some(o=>typeof o=="string"&&i.test(o)):r=e.some(o=>rc(i,o))}return r}function vq(e,t,n){return Array.isArray(e)&&e.length===t}function yq(e){return Ju(e)&&["$and","$or","$nor"].indexOf(e)===-1}function cL(e,t,n){if(kr(e)&&!Xu(e)){let r=s=>s,i=t;Object.keys(t).every(yq)&&(i={temp:t},r=s=>({temp:s}));const o=new Rp(i,n);for(let s=0,a=e.length;se===null,vE=e=>ba(e)&&e>=NK&&e<=MK&&e.toString().indexOf(".")===-1,yE=e=>ba(e)&&e>=AK&&e<=$K&&e.toString().indexOf(".")===-1,bq={array:kr,bool:T0,boolean:T0,date:aE,decimal:ba,double:ba,int:vE,long:yE,number:ba,null:gE,object:Yn,regex:nm,regexp:nm,string:Hs,undefined:Er,function:e=>{throw new Qu("unsupported type key `function`.")},1:ba,2:Hs,3:Yn,4:kr,6:Er,8:T0,9:aE,10:gE,11:nm,16:vE,18:yE,19:ba};function bE(e,t,n){const r=bq[t];return r?r(e):!1}function wq(e,t,n){return Array.isArray(t)?t.findIndex(r=>bE(e,r))>=0:bE(e,t)}function Jv(e,t,n){return kp(e).some(r=>Xf(r)===Xf(t)&&n(r,t))}const wE=(e,t)=>{const n={};return e.split("").forEach((r,i)=>n[r]=t*(i+1)),n};Object.assign(Object.assign(Object.assign({},wE("ABCDEFGHIKLM",1)),wE("NOPQRSTUVWXY",-1)),{Z:0});const xE={undefined:null,null:null,NaN:NaN,Infinity:new Error,"-Infinity":new Error};function Ai(e,t=xE){const n=Object.assign({},xE,t),r=new Set(Object.keys(n));return(i,o,s)=>{const a=Jo(i,o,null,s);if(r.has(`${a}`)){const l=n[`${a}`];if(l instanceof Error)throw new Qu(`cannot apply $${e.name} to -inf, value must in (-inf,inf)`);return l}return e(a)}}Ai(Math.acos,{Infinity:1/0,0:new Error});Ai(Math.acosh,{Infinity:1/0,0:new Error});Ai(Math.asin);Ai(Math.asinh,{Infinity:1/0,"-Infinity":-1/0});Ai(Math.atan);Ai(Math.atanh,{1:1/0,"-1":-1/0});Ai(Math.cos);Ai(Math.cosh,{"-Infinity":1/0,Infinity:1/0});const xq=Math.PI/180;Ai(e=>e*xq,{Infinity:1/0,"-Infinity":1/0});const Sq=180/Math.PI;Ai(e=>e*Sq,{Infinity:1/0,"-Infinity":-1/0});Ai(Math.sin);Ai(Math.sinh,{"-Infinity":-1/0,Infinity:1/0});Ai(Math.tan);const _q=(e,t,n)=>{if(Xu(t))return e;let r=Object.keys(t),i=!1;uL(t,n);const o=n.idKey;if(Du(r,o)){const a=t[o];(a===0||a===!1)&&(r=r.filter(tL.bind(null,[o])),i=r.length==0)}else r.push(o);const s=Nl.init(n);return e.map(a=>T1(a,t,s.update(a),r,i))};function T1(e,t,n,r,i){let o={},s=!1,a=!1;const l=[];i&&l.push(n.idKey);for(const c of r){let u;const d=t[c];if(c!==n.idKey&&Du([0,!1],d)&&(a=!0),c===n.idKey&&Xu(d))u=e[c];else if(Hs(d))u=Jo(e,d,c,n);else if(!Du([1,!0],d))if(d instanceof Array)u=d.map(m=>{const h=Jo(e,m,null,n);return Er(h)?null:h});else if(Yn(d)){const m=d,h=Object.keys(d),g=h.length==1?h[0]:"",E=$l(Xt.PROJECTION,g,n);if(E)g==="$slice"?kp(m[g]).every(ba)?(u=E(e,m[g],c,n),s=!0):u=Jo(e,m,c,n):u=E(e,m[g],c,n);else if(Ju(g))u=Jo(e,m[g],g,n);else if($a(e,c)){uL(m,n);let b=e[c];b instanceof Array?u=b.map(w=>T1(w,m,n,h,!1)):(b=Yn(b)?b:e,u=T1(b,m,n,h,!1))}else u=Jo(e,d,null,n)}else{l.push(c);continue}const f=rm(e,c,{preserveMissing:!0});f!==void 0&&C1(o,f,{flatten:!0}),tL([0,1,!1,!0],d)&&(u===void 0?dE(o,c,{descendArray:!0}):QK(o,c,u))}if(E1(o),(s||a||i)&&(o=Ep({},e,o),l.length>0))for(const c of l)dE(o,c,{descendArray:!0});return o}function uL(e,t){const n=[!1,!1];for(const[r,i]of Object.entries(e)){if(r===(t==null?void 0:t.idKey))return;i===0||i===!1?n[0]=!0:(i===1||i===!0)&&(n[1]=!0),Ji(!(n[0]&&n[1]),"Projection cannot have a mix of inclusion and exclusion.")}}const Cq=(e,t,n)=>{Ji(kr(t),"Invalid expression: $and expects value to be an Array.");const r=t.map(i=>new Rp(i,n));return i=>r.every(o=>o.test(i))},dL=(e,t,n)=>{Ji(kr(t),"Invalid expression. $or expects value to be an Array");const r=t.map(i=>new Rp(i,n));return i=>r.some(o=>o.test(i))},kq=(e,t,n)=>{Ji(kr(t),"Invalid expression. $nor expects value to be an array.");const r=dL("$or",t,n);return i=>!r(i)},Eq=(e,t,n)=>{const r={};r[e]=oL(t);const i=new Rp(r,n);return o=>!i.test(o)},Rq=qr(aL),Pq=qr(dq),Tq=qr(fq),Oq=qr(lL),jq=qr(cq),Lq=qr(uq),Iq=qr(aq),Mq=qr(lq),Nq=qr(pq),$q=qr(hq);qr(gq);const Aq=qr(cL),Dq=qr(vq),Bq=qr(mq),Fq=qr(wq);var SE=!1;function zq(e){return SE||(fE(Xt.PIPELINE,{$sort:iq,$project:_q}),fE(Xt.QUERY,{$and:Cq,$eq:Rq,$elemMatch:Aq,$exists:Bq,$gt:Pq,$gte:Tq,$in:Oq,$lt:jq,$lte:Lq,$ne:Iq,$nin:Mq,$mod:Nq,$nor:kq,$not:Eq,$or:dL,$regex:$q,$size:Dq,$type:Fq}),SE=!0),new Rp(e)}function Jm(e,t){var n=$i(e.primaryKey);t=on(t);var r=io(t);if(typeof r.skip!="number"&&(r.skip=0),r.selector?(r.selector=r.selector,Object.entries(r.selector).forEach(([c,u])=>{(typeof u!="object"||u===null)&&(r.selector[c]={$eq:u})})):r.selector={},r.index){var i=qf(r.index);i.includes(n)||i.push(n),r.index=i}if(r.sort){var l=r.sort.find(c=>rH(c)===n);l||(r.sort=r.sort.slice(0),r.sort.push({[n]:"asc"}))}else if(r.index)r.sort=r.index.map(c=>({[c]:"asc"}));else{if(e.indexes){var o=new Set;Object.entries(r.selector).forEach(([c,u])=>{var d=!1;typeof u=="object"&&u!==null?d=!!Object.keys(u).find(f=>dS.has(f)):d=!0,d&&o.add(c)});var s=-1,a;e.indexes.forEach(c=>{var u=Qx(c)?c:[c],d=u.findIndex(f=>!o.has(f));d>0&&d>s&&(s=d,a=u)}),a&&(r.sort=a.map(c=>({[c]:"asc"})))}r.sort||(r.sort=[{[n]:"asc"}])}return r}function fL(e,t){if(!t.sort)throw ot("SNH",{query:t});var n=[];t.sort.forEach(i=>{var o=Object.keys(i)[0],s=Object.values(i)[0];n.push({key:o,direction:s,getValueFn:nH(o)})});var r=(i,o)=>{for(var s=0;sn.test(i);return r}async function Od(e,t){var n=await e.exec();if(!n)return null;if(Array.isArray(n))return Promise.all(n.map(i=>t(i)));var r=await t(n);return r}function Uq(e,t){return!t.sort||t.sort.length===0?[e]:t.sort.map(n=>Object.keys(n)[0])}var Wq=new WeakMap;function Gq(e){return Gs(Wq,e,()=>{var t=e.collection,n=Jm(t.storageInstance.schema,io(e.mangoQuery)),r=t.schema.primaryPath,i=fL(t.schema.jsonSchema,n),o=(c,u)=>{var d={docA:c,docB:u,rxQuery:e};return i(d.docA,d.docB)},s=mS(t.schema.jsonSchema,n),a=c=>{var u={doc:c,rxQuery:e};return s(u.doc)},l={primaryKey:e.collection.schema.primaryPath,skip:n.skip,limit:n.limit,sortFields:Uq(r,n),sortComparator:o,queryMatcher:a};return l})}function Hq(e,t){if(!e.collection.database.eventReduce)return{runFullQueryAgain:!0};var n=Gq(e),r=xt(e._result).docsData.slice(0),i=xt(e._result).docsDataMap,o=!1,s=t.map(l=>AV(l)).filter(pj),a=s.find(l=>{var c={queryParams:n,changeEvent:l,previousResults:r,keyDocumentMap:i},u=EK(c);if(u==="runFullQueryAgain")return!0;if(u!=="doNothing")return o=!0,RK(u,n,l,r,i),!1});return a?{runFullQueryAgain:!0}:{runFullQueryAgain:!1,changed:o,newResults:r}}var Vq=function(){function e(){this._map=new Map}var t=e.prototype;return t.getByQuery=function(r){var i=r.toString();return Gs(this._map,i,()=>r)},e}();function Kq(){return new Vq}function _E(e,t){t.uncached=!0;var n=t.toString();e._map.delete(n)}function qq(e){return e.refCount$.observers.length}var Yq=100,Qq=30*1e3,Xq=(e,t)=>(n,r)=>{if(!(r._map.size0)){if(a._lastEnsureEqual===0&&a._creationTimed._lastEnsureEqual-f._lastEnsureEqual),u=c.slice(0,l);u.forEach(d=>_E(r,d))}}},pL=Xq(Yq,Qq),j0=new WeakSet;function Jq(e){j0.has(e)||(j0.add(e),vH().then(()=>wH(200)).then(()=>{e.destroyed||e.cacheReplacementPolicy(e,e._queryCache),j0.delete(e)}))}var hL=function(){function e(n,r,i){this.cacheItemByDocId=new Map,this.tasks=new Set,this.registry=typeof FinalizationRegistry=="function"?new FinalizationRegistry(o=>{var s=o.docId,a=this.cacheItemByDocId.get(s);a&&(a[0].delete(o.revisionHeight),a[0].size===0&&this.cacheItemByDocId.delete(s))}):void 0,this.primaryPath=n,this.changes$=r,this.documentCreator=i,r.subscribe(o=>{this.tasks.add(()=>{for(var s=this.cacheItemByDocId,a=0;a{this.processTasks()})})}var t=e.prototype;return t.processTasks=function(){if(this.tasks.size!==0){var r=Array.from(this.tasks);r.forEach(i=>i()),this.tasks.clear()}},t.getLatestDocumentData=function(r){this.processTasks();var i=Ws(this.cacheItemByDocId,r);return i[1]},t.getLatestDocumentDataIfExists=function(r){this.processTasks();var i=this.cacheItemByDocId.get(r);if(i)return i[1]},Ja(e,[{key:"getCachedRxDocuments",get:function(){var n=CE(this);return Ns(this,"getCachedRxDocuments",n)}},{key:"getCachedRxDocument",get:function(){var n=CE(this);return Ns(this,"getCachedRxDocument",r=>n([r])[0])}}])}();function CE(e){var t=e.primaryPath,n=e.cacheItemByDocId,r=e.registry,i=bn.deepFreezeWhenDevMode,o=e.documentCreator,s=a=>{for(var l=new Array(a.length),c=[],u=0;u0&&r&&(e.tasks.add(()=>{for(var w=0;w{e.processTasks()})),l};return s}function mL(e,t){var n=e.getCachedRxDocuments;return n(t)}var Zq=typeof WeakRef=="function",eY=Zq?tY:nY;function tY(e){return new WeakRef(e)}function nY(e){return{deref(){return e}}}var kE=function(){function e(t,n,r){this.time=ar(),this.collection=t,this.count=r,this.documents=mL(this.collection._docCache,n)}return Ja(e,[{key:"docsData",get:function(){return Ns(this,"docsData",this.documents.map(t=>t._data))}},{key:"docsDataMap",get:function(){var t=new Map;return this.documents.forEach(n=>{t.set(n.primary,n._data)}),Ns(this,"docsDataMap",t)}},{key:"docsMap",get:function(){for(var t=new Map,n=this.documents,r=0;r{var d=this.collection._docCache.getLatestDocumentDataIfExists(u);if(d){if(!d._deleted){var f=this.collection._docCache.getCachedRxDocument(d);s.set(u,f)}}else a.push(u)}),a.length>0){var l=await this.collection.storageInstance.findDocumentsById(a,!1);l.forEach(u=>{var d=this.collection._docCache.getCachedRxDocument(u);s.set(d.primary,d)})}return s}var c=aY(this);return c.then(u=>(this._lastExecEnd=ar(),u))},t.exec=function(r){if(r&&this.op!=="findOne")throw ot("QU9",{collection:this.collection.name,query:this.mangoQuery,op:this.op});return EE(this).then(()=>Ln(this.$)).then(i=>{if(!i&&r)throw ot("QU10",{collection:this.collection.name,query:this.mangoQuery,op:this.op});return i})},t.toString=function(){var r=qm({op:this.op,query:this.mangoQuery,other:this.other},!0),i=JSON.stringify(r);return this.toString=()=>i,i},t.getPreparedQuery=function(){var r={rxQuery:this,mangoQuery:Jm(this.collection.schema.jsonSchema,this.mangoQuery)};r.mangoQuery.selector._deleted={$eq:!1},r.mangoQuery.index&&r.mangoQuery.index.unshift("_deleted"),oo("prePrepareQuery",r);var i=gS(this.collection.schema.jsonSchema,r.mangoQuery);return this.getPreparedQuery=()=>i,i},t.doesDocumentDataMatch=function(r){return r._deleted?!1:this.queryMatcher(r)},t.remove=function(){return this.exec().then(r=>Array.isArray(r)?Promise.all(r.map(i=>i.remove())):r.remove())},t.incrementalRemove=function(){return Od(this.asRxQuery,r=>r.incrementalRemove())},t.update=function(r){throw fn("update")},t.patch=function(r){return Od(this.asRxQuery,i=>i.patch(r))},t.incrementalPatch=function(r){return Od(this.asRxQuery,i=>i.incrementalPatch(r))},t.modify=function(r){return Od(this.asRxQuery,i=>i.modify(r))},t.incrementalModify=function(r){return Od(this.asRxQuery,i=>i.incrementalModify(r))},t.where=function(r){throw fn("query-builder")},t.sort=function(r){throw fn("query-builder")},t.skip=function(r){throw fn("query-builder")},t.limit=function(r){throw fn("query-builder")},Ja(e,[{key:"$",get:function(){if(!this._$){var n=this.collection.$.pipe(Gt(r=>!r.isLocal),qv(null),ls(()=>EE(this)),qt(()=>this._result),oS(Jx),Qf((r,i)=>!!(r&&r.time===xt(i).time)),Gt(r=>!!r),qt(r=>{var i=xt(r);return this.op==="count"?i.count:this.op==="findOne"?i.documents.length===0?null:i.documents[0]:this.op==="findByIds"?i.docsMap:i.documents.slice(0)}));this._$=BV(n,this.refCount$.pipe(Gt(()=>!1)))}return this._$}},{key:"$$",get:function(){var n=this.collection.database.getReactivityFactory();return n.fromObservable(this.$,void 0,this.collection.database)}},{key:"queryMatcher",get:function(){var n=this.collection.schema.jsonSchema,r=Jm(this.collection.schema.jsonSchema,this.mangoQuery);return Ns(this,"queryMatcher",mS(n,r))}},{key:"asRxQuery",get:function(){return this}}])}();function im(){return{selector:{}}}function oY(e){return e.collection._queryCache.getByQuery(e)}function Fc(e,t,n,r){oo("preCreateRxQuery",{op:e,queryObj:t,collection:n,other:r});var i=new gL(e,t,n,r);return i=oY(i),Jq(n),i}function vL(e){var t=e.asRxQuery.collection._changeEventBuffer.getCounter();return e._latestChangeEvent>=t}function EE(e){return e.collection.database.destroyed||vL(e)?Po:(e._ensureEqualQueue=e._ensureEqualQueue.then(()=>sY(e)),e._ensureEqualQueue)}function sY(e){if(e._lastEnsureEqual=ar(),e.collection.database.destroyed||vL(e))return Po;var t=!1,n=!1;if(e._latestChangeEvent===-1&&(n=!0),!n){var r=e.asRxQuery.collection._changeEventBuffer.getFrom(e._latestChangeEvent+1);if(r===null)n=!0;else{e._latestChangeEvent=e.asRxQuery.collection._changeEventBuffer.getCounter();var i=e.asRxQuery.collection._changeEventBuffer.reduceByLastOfDoc(r);if(e.op==="count"){var o=xt(e._result).count,s=o;i.forEach(l=>{var c=l.previousDocumentData&&e.doesDocumentDataMatch(l.previousDocumentData),u=e.doesDocumentDataMatch(l.documentData);!c&&u&&s++,c&&!u&&s--}),s!==o&&(t=!0,e._setResultData(s))}else{var a=Hq(e,i);a.runFullQueryAgain?n=!0:a.changed&&(t=!0,e._setResultData(a.newResults))}}}return n?e._execOverDatabase().then(l=>(e._latestChangeEvent=e.collection._changeEventBuffer.getCounter(),typeof l=="number"?((!e._result||l!==e._result.count)&&(t=!0,e._setResultData(l)),t):((!e._result||!oH(e.collection.schema.primaryPath,l,e._result.docsData))&&(t=!0,e._setResultData(l)),t))):Promise.resolve(t)}function gS(e,t){if(!t.sort)throw ot("SNH",{query:t});var n=PK(e,t);return{query:t,queryPlan:n}}async function aY(e){var t=[],n=e.collection;if(e.isFindOneByIdQuery)if(Array.isArray(e.isFindOneByIdQuery)){var r=e.isFindOneByIdQuery;if(r=r.filter(u=>{var d=e.collection._docCache.getLatestDocumentDataIfExists(u);return d?(d._deleted||t.push(d),!1):!0}),r.length>0){var i=await n.storageInstance.findDocumentsById(r,!1);Yl(t,i)}}else{var o=e.isFindOneByIdQuery,s=e.collection._docCache.getLatestDocumentDataIfExists(o);if(!s){var a=await n.storageInstance.findDocumentsById([o],!1);a[0]&&(s=a[0])}s&&!s._deleted&&t.push(s)}else{var l=e.getPreparedQuery(),c=await n.storageInstance.query(l);t=c.documents}return t}function lY(e,t){if(!t.skip&&t.selector&&Object.keys(t.selector).length===1&&t.selector[e]){var n=t.selector[e];if(typeof n=="string")return n;if(Object.keys(n).length===1&&typeof n.$eq=="string"||Object.keys(n).length===1&&Array.isArray(n.$eq)&&!n.$eq.find(r=>typeof r!="string"))return n.$eq}return!1}var cY="_rxdb_internal";async function Zv(e,t){var n=await e.findDocumentsById([t],!1),r=n[0];if(r)return r}async function ey(e,t,n){var r=await e.bulkWrite([t],n);if(r.error.length>0){var i=r.error[0];throw i}else{var o=$i(e.schema.primaryKey),s=Oi(o,[t],r),a=s[0];return a}}function Jf(e){return Object.assign({},...e)}function Zm(e,t,n,r){if(r)throw r.status===409?ot("CONFLICT",{collection:e.name,id:t,writeError:r,data:n}):r.status===422?ot("VD2",{collection:e.name,id:t,writeError:r,data:n}):r}function uY(e,t,n,r,i,o,s){for(var a=!!e.schema.attachments,l=[],c=[],u=[],d=cc(10),f={id:d,events:[],checkpoint:null,context:i,startTime:ar(),endTime:0},m=f.events,h=[],g=[],E=[],b=n.size>0,w,y=r.length,_=function(){var R=r[k],P=R.document,I=R.previous,$=P[t],L=P._deleted,N=I&&I._deleted,F=void 0;b&&(F=n.get($));var z;if(F){var le=F._rev;if(!I||I&&le!==I._rev){var ce={isError:!0,status:409,documentId:$,writeRow:R,documentInDb:F};return u.push(ce),1}var H=a?L0(R):R;a&&(L?I&&Object.keys(I._attachments).forEach(Le=>{g.push({documentId:$,attachmentId:Le,digest:xt(I)._attachments[Le].digest})}):(Object.entries(P._attachments).find(([Le,_e])=>{var Ve=I?I._attachments[Le]:void 0;return!Ve&&!_e.data&&(z={documentId:$,documentInDb:F,isError:!0,status:510,writeRow:R,attachmentId:Le}),!0}),z||Object.entries(P._attachments).forEach(([Le,_e])=>{var Ve=I?I._attachments[Le]:void 0;if(!Ve)h.push({documentId:$,attachmentId:Le,attachmentData:_e,digest:_e.digest});else{var Pe=H.document._attachments[Le].digest;_e.data&&Ve.digest!==Pe&&E.push({documentId:$,attachmentId:Le,attachmentData:_e,digest:_e.digest})}}))),z?u.push(z):(a?c.push(L0(H)):c.push(H),w=H);var V=null,se=null,je=null;if(N&&!L)je="INSERT",V=a?es(P):P;else if(I&&!N&&!L)je="UPDATE",V=a?es(P):P,se=I;else if(L)je="DELETE",V=xt(P),se=I;else throw ot("SNH",{args:{writeRow:R}});var Ge={documentId:$,documentData:V,previousDocumentData:se,operation:je};m.push(Ge)}else{var K=!!L;if(a&&Object.entries(P._attachments).forEach(([Le,_e])=>{_e.data?h.push({documentId:$,attachmentId:Le,attachmentData:_e,digest:_e.digest}):(z={documentId:$,isError:!0,status:510,writeRow:R,attachmentId:Le},u.push(z))}),z||(a?l.push(L0(R)):l.push(R),w=R),!K){var Z={documentId:$,operation:"INSERT",documentData:a?es(P):P,previousDocumentData:a&&I?es(I):I};m.push(Z)}}},k=0;k{t._attachments[n]=fY(r)}),t}function Pp(e){return Object.assign({},e,{_meta:on(e._meta)})}var yL=new WeakMap;function vS(e,t,n){bn.deepFreezeWhenDevMode(n);var r=$i(t.schema.primaryKey),i={originalStorageInstance:t,schema:t.schema,internals:t.internals,collectionName:t.collectionName,databaseName:t.databaseName,options:t.options,bulkWrite(o,s){for(var a=e.token,l=new Array(o.length),c=ar(),u=0;ut.bulkWrite(l,s)).then(h=>{var g={error:[]},E=Oi(r,l,h);yL.set(g,E);var b=h.error.length===0?[]:h.error.filter(y=>y.status===409&&!y.writeRow.previous&&!y.writeRow.document._deleted&&xt(y.documentInDb)._deleted?!0:(g.error.push(y),!1));if(b.length>0){var w=b.map(y=>({previous:y.documentInDb,document:Object.assign({},y.writeRow.document,{_rev:Us(e.token,y.documentInDb)})}));return e.lockedRun(()=>t.bulkWrite(w,s)).then(y=>{Yl(g.error,y.error);var _=Oi(r,w,y);return Yl(E,_),g})}return g})},query(o){return e.lockedRun(()=>t.query(o))},count(o){return e.lockedRun(()=>t.count(o))},findDocumentsById(o,s){return e.lockedRun(()=>t.findDocumentsById(o,s))},getAttachmentData(o,s,a){return e.lockedRun(()=>t.getAttachmentData(o,s,a))},getChangedDocumentsSince:t.getChangedDocumentsSince?(o,s)=>e.lockedRun(()=>t.getChangedDocumentsSince(xt(o),s)):void 0,cleanup(o){return e.lockedRun(()=>t.cleanup(o))},remove(){return e.storageInstances.delete(i),e.lockedRun(()=>t.remove())},close(){return e.storageInstances.delete(i),e.lockedRun(()=>t.close())},changeStream(){return t.changeStream()},conflictResultionTasks(){return t.conflictResultionTasks()},resolveConflictResultionTask(o){if(o.output.isEqual)return t.resolveConflictResultionTask(o);var s=Object.assign({},o.output.documentData,{_meta:Yu(),_rev:Do(),_attachments:{}}),a=on(s);return delete a._meta,delete a._rev,delete a._attachments,t.resolveConflictResultionTask({id:o.id,output:{isEqual:!1,documentData:a}})}};return e.storageInstances.add(i),i}function pY(e){if(e.schema.keyCompression)throw ot("UT5",{args:{params:e}});if(bL(e.schema))throw ot("UT6",{args:{params:e}});if(e.schema.attachments&&e.schema.attachments.compression)throw ot("UT7",{args:{params:e}})}function bL(e){return!!(e.encrypted&&e.encrypted.length>0||e.attachments&&e.attachments.encrypted)}function hY(e,t,n){var r=$i(e.schema.primaryKey),i=n?n.lwt:Xx,o=n?n.id:"";return Jm(e.schema,{selector:{$or:[{"_meta.lwt":{$gt:i}},{"_meta.lwt":{$eq:i},[r]:{$gt:n?o:""}}],"_meta.lwt":{$gte:i}},sort:[{"_meta.lwt":"asc"},{[r]:"asc"}],skip:0,limit:t})}async function wL(e,t,n){if(e.getChangedDocumentsSince)return e.getChangedDocumentsSince(t,n);var r=$i(e.schema.primaryKey),i=gS(e.schema,hY(e,t,n)),o=await e.query(i),s=o.documents,a=Z7(s);return{documents:s,checkpoint:a?{id:a[r],lwt:a._meta.lwt}:n||{id:"",lwt:0}}}function Oi(e,t,n){var r=yL.get(n);if(r)return r;var i=new Array(t.length-n.error.length);if(n.error.length>0){for(var o=new Set,s=0;s[]),a=new Promise((l,c)=>{var u={lastKnownDocumentState:r,modifier:i,resolve:l,reject:c};xt(s).push(u),this.triggerRun()});return a},t.triggerRun=async function(){if(!(this.isRunning===!0||this.queueByDocId.size===0)){this.isRunning=!0;var r=[],i=this.queueByDocId;this.queueByDocId=new Map,await Promise.all(Array.from(i.entries()).map(async([s,a])=>{var l=mY(a.map(d=>d.lastKnownDocumentState)),c=l;for(var u of a)try{c=await u.modifier(io(c))}catch(d){u.reject(d),u.reject=()=>{},u.resolve=()=>{}}try{await this.preWrite(c,l)}catch(d){a.forEach(f=>f.reject(d));return}r.push({previous:l,document:c})}));var o=r.length>0?await this.storageInstance.bulkWrite(r,"incremental-write"):{error:[]};return await Promise.all(Oi(this.primaryPath,r,o).map(s=>{var a=s[this.primaryPath];this.postWrite(s);var l=Ws(i,a);l.forEach(c=>c.resolve(s))})),o.error.forEach(s=>{var a=s.documentId,l=Ws(i,a),c=Hv(s);if(c){var u=Gs(this.queueByDocId,a,()=>[]);l.reverse().forEach(f=>{f.lastKnownDocumentState=xt(c.documentInDb),xt(u).unshift(f)})}else{var d=LH(s);l.forEach(f=>f.reject(d))}}),this.isRunning=!1,this.triggerRun()}},e}();function RE(e){var t=async n=>{var r=iH(n);r._deleted=n._deleted;var i=await e(r),o=Object.assign({},i,{_meta:n._meta,_attachments:n._attachments,_rev:n._rev,_deleted:typeof i._deleted<"u"?i._deleted:n._deleted});return typeof o._deleted>"u"&&(o._deleted=!1),o};return t}function mY(e){var t=e[0],n=za(t._rev);return e.forEach(r=>{var i=za(r._rev);i>n&&(t=r,n=i)}),t}var ty={get primaryPath(){var e=this;if(e.isInstanceOfRxDocument)return e.collection.schema.primaryPath},get primary(){var e=this;if(e.isInstanceOfRxDocument)return e._data[e.primaryPath]},get revision(){var e=this;if(e.isInstanceOfRxDocument)return e._data._rev},get deleted$(){var e=this;if(e.isInstanceOfRxDocument)return e.$.pipe(qt(t=>t._data._deleted))},get deleted$$(){var e=this,t=e.collection.database.getReactivityFactory();return t.fromObservable(e.deleted$,e.getLatest().deleted,e.collection.database)},get deleted(){var e=this;if(e.isInstanceOfRxDocument)return e._data._deleted},getLatest(){var e=this.collection._docCache.getLatestDocumentData(this.primary);return this.collection._docCache.getCachedRxDocument(e)},get $(){var e=this;return e.collection.$.pipe(Gt(t=>!t.isLocal),Gt(t=>t.documentId===this.primary),qt(t=>qj(t)),qv(e.collection._docCache.getLatestDocumentData(this.primary)),Qf((t,n)=>t._rev===n._rev),qt(t=>this.collection._docCache.getCachedRxDocument(t)),oS(Jx))},get $$(){var e=this,t=e.collection.database.getReactivityFactory();return t.fromObservable(e.$,e.getLatest()._data,e.collection.database)},get$(e){if(bn.isDevMode()){if(e.includes(".item."))throw ot("DOC1",{path:e});if(e===this.primaryPath)throw ot("DOC2");if(this.collection.schema.finalFields.includes(e))throw ot("DOC3",{path:e});var t=Nu(this.collection.schema.jsonSchema,e);if(!t)throw ot("DOC4",{path:e})}return this.$.pipe(qt(n=>Ua(n,e)),Qf())},get$$(e){var t=this.get$(e),n=this.collection.database.getReactivityFactory();return n.fromObservable(t,this.getLatest().get(e),this.collection.database)},populate(e){var t=Nu(this.collection.schema.jsonSchema,e),n=this.get(e);if(!n)return bH;if(!t)throw ot("DOC5",{path:e});if(!t.ref)throw ot("DOC6",{path:e,schemaObj:t});var r=this.collection.database.collections[t.ref];if(!r)throw ot("DOC7",{ref:t.ref,path:e,schemaObj:t});return t.type==="array"?r.findByIds(n).exec().then(i=>{var o=i.values();return Array.from(o)}):r.findOne(n).exec()},get(e){return Gs(this._propertyCache,e,()=>{var t=Ua(this._data,e);if(typeof t!="object"||t===null||Array.isArray(t))return bn.deepFreezeWhenDevMode(t);var n=this,r=new Proxy(on(t),{get(i,o){if(typeof o!="string")return i[o];var s=o.charAt(o.length-1);if(o.endsWith("$$")){var a=o.slice(0,-2);return n.get$$(Ud(e+"."+a))}else if(s==="$"){var l=o.slice(0,-1);return n.get$(Ud(e+"."+l))}else if(s==="_"){var c=o.slice(0,-1);return n.populate(Ud(e+"."+c))}else return n.get(Ud(e+"."+o))}});return r})},toJSON(e=!1){if(e)return bn.deepFreezeWhenDevMode(this._data);var t=on(this._data);return delete t._rev,delete t._attachments,delete t._deleted,delete t._meta,bn.deepFreezeWhenDevMode(t)},toMutableJSON(e=!1){return io(this.toJSON(e))},update(e){throw fn("update")},incrementalUpdate(e){throw fn("update")},updateCRDT(e){throw fn("crdt")},putAttachment(){throw fn("attachments")},getAttachment(){throw fn("attachments")},allAttachments(){throw fn("attachments")},get allAttachments$(){throw fn("attachments")},async modify(e,t){var n=this._data,r=await RE(e)(n);return this._saveData(r,n)},incrementalModify(e,t){return this.collection.incrementalWriteQueue.addWrite(this._data,RE(e)).then(n=>this.collection._docCache.getCachedRxDocument(n))},patch(e){var t=this._data,n=io(t);return Object.entries(e).forEach(([r,i])=>{n[r]=i}),this._saveData(n,t)},incrementalPatch(e){return this.incrementalModify(t=>(Object.entries(e).forEach(([n,r])=>{t[n]=r}),t))},async _saveData(e,t){if(e=on(e),this._data._deleted)throw ot("DOC11",{id:this.primary,document:this});await _L(this.collection,e,t);var n=[{previous:t,document:e}],r=await this.collection.storageInstance.bulkWrite(n,"rx-document-save-data"),i=r.error[0];return Zm(this.collection,this.primary,e,i),await this.collection._runHooks("post","save",e,this),this.collection._docCache.getCachedRxDocument(Oi(this.collection.schema.primaryPath,n,r)[0])},remove(){var e=this.collection;if(this.deleted)return Promise.reject(ot("DOC13",{document:this,id:this.primary}));var t=on(this._data),n;return e._runHooks("pre","remove",t,this).then(async()=>{t._deleted=!0;var r=[{previous:this._data,document:t}],i=await e.storageInstance.bulkWrite(r,"rx-document-remove"),o=i.error[0];return Zm(e,this.primary,t,o),Oi(this.collection.schema.primaryPath,r,i)[0]}).then(r=>(n=r,this.collection._runHooks("post","remove",t,this))).then(()=>this.collection._docCache.getCachedRxDocument(n))},incrementalRemove(){return this.incrementalModify(async e=>(await this.collection._runHooks("pre","remove",e,this),e._deleted=!0,e)).then(async e=>(await this.collection._runHooks("post","remove",e._data,e),e))},destroy(){throw ot("DOC14")}};function SL(e=ty){var t=function(r,i){this.collection=r,this._data=i,this._propertyCache=new Map,this.isInstanceOfRxDocument=!0};return t.prototype=e,t}function gY(e,t,n){var r=new e(t,n);return oo("createRxDocument",r),r}function _L(e,t,n){return t._meta=Object.assign({},n._meta,t._meta),bn.isDevMode()&&e.schema.validateChange(n,t),e._runHooks("pre","save",t,n)}var Al="collection",yS="storage-token",vY="rx-migration-status",yY="RxInternalDocument",bS=Vv({version:0,title:yY,primaryKey:{key:"id",fields:["context","key"],separator:"|"},type:"object",properties:{id:{type:"string",maxLength:200},key:{type:"string"},context:{type:"string",enum:[Al,yS,vY,"OTHER"]},data:{type:"object",additionalProperties:!0}},indexes:[],required:["key","context","data"],additionalProperties:!1,sharding:{shards:1,mode:"collection"}});function Zf(e,t){return Za(bS,{key:e,context:t})}async function CL(e){var t=gS(e.schema,{selector:{context:Al,_deleted:{$eq:!1}},sort:[{id:"asc"}],skip:0}),n=await e.query(t),r=n.documents;return r}var kL="storageToken",bY=Zf(kL,yS);async function wY(e){var t=cc(10),n=e.password?await e.hashFunction(JSON.stringify(e.password)):void 0,r={id:bY,context:yS,key:kL,data:{rxdbVersion:e.rxdbVersion,token:t,instanceToken:e.token,passwordHash:n},_deleted:!1,_meta:Yu(),_rev:Do(),_attachments:{}},i=[{document:r}],o=await e.internalStore.bulkWrite(i,"internal-add-storage-token");if(!o.error[0])return Oi("id",i,o)[0];var s=xt(o.error[0]);if(s.isError&&Hv(s)){var a=s;if(!xY(a.documentInDb.data.rxdbVersion,e.rxdbVersion))throw ot("DM5",{args:{database:e.name,databaseStateVersion:a.documentInDb.data.rxdbVersion,codeVersion:e.rxdbVersion}});if(n&&n!==a.documentInDb.data.passwordHash)throw ot("DB1",{passwordHash:n,existingPasswordHash:a.documentInDb.data.passwordHash});var l=a.documentInDb;return xt(l)}throw s}function xY(e,t){if(!e||t.includes("beta")&&t!==e)return!1;var n=e.split(".")[0],r=t.split(".")[0];return n===r}async function SY(e,t,n){if(e.schema.version!==n.version)throw ot("SNH",{schema:n,version:e.schema.version,name:e.name,collection:e,args:{storageCollectionName:t}});for(var r=eg(e.name,e.schema.jsonSchema),i=Zf(r,Al);;){var o=await Zv(e.database.internalStore,i),s=io(xt(o)),a=s.data.connectedStorages.find(l=>l.collectionName===t&&l.schema.version===n.version);if(a)return;s.data.connectedStorages.push({collectionName:t,schema:n});try{await ey(e.database.internalStore,{previous:xt(o),document:s},"add-connected-storage-to-collection")}catch(l){if(!Hv(l))throw l}}}async function _Y(e,t,n){if(e.schema.version!==n.version)throw ot("SNH",{schema:n,version:e.schema.version,name:e.name,collection:e,args:{storageCollectionName:t}});for(var r=eg(e.name,e.schema.jsonSchema),i=Zf(r,Al);;){var o=await Zv(e.database.internalStore,i),s=io(xt(o)),a=s.data.connectedStorages.find(l=>l.collectionName===t&&l.schema.version===n.version);if(!a)return;s.data.connectedStorages=s.data.connectedStorages.filter(l=>l.collectionName!==t);try{await ey(e.database.internalStore,{previous:xt(o),document:s},"remove-connected-storage-from-collection")}catch(l){if(!Hv(l))throw l}}}function eg(e,t){return e+"-"+t.version}function _h(e,t){return t=on(t),t=DH(e,t),typeof e.jsonSchema.primaryKey!="string"&&(t=IH(e.primaryPath,e.jsonSchema,t)),t._meta=Yu(),Object.prototype.hasOwnProperty.call(t,"_deleted")||(t._deleted=!1),Object.prototype.hasOwnProperty.call(t,"_attachments")||(t._attachments={}),Object.prototype.hasOwnProperty.call(t,"_rev")||(t._rev=Do()),t}async function CY(e,t){t.multiInstance=e.multiInstance;var n=await e.storage.createStorageInstance(t);return n}async function EL(e,t,n,r,i,o,s){var a=await CL(t),l=a.filter(f=>f.data.name===i),c=[];l.forEach(f=>{c.push({collectionName:f.data.name,schema:f.data.schema,isCollection:!0}),f.data.connectedStorages.forEach(m=>c.push({collectionName:m.collectionName,isCollection:!1,schema:m.schema}))});var u=new Set;if(c=c.filter(f=>{var m=f.collectionName+"||"+f.schema.version;return u.has(m)?!1:(u.add(m),!0)}),await Promise.all(c.map(async f=>{var m=await e.createStorageInstance({collectionName:f.collectionName,databaseInstanceToken:n,databaseName:r,multiInstance:!1,options:{},schema:f.schema,password:o,devMode:bn.isDevMode()});await m.remove(),f.isCollection&&await Ql("postRemoveRxCollection",{storage:e,databaseName:r,collectionName:i})})),s){var d=l.map(f=>{var m=Pp(f);return m._deleted=!0,m._meta.lwt=ar(),m._rev=Us(n,f),{previous:f,document:m}});await t.bulkWrite(d,"rx-database-remove-collection-all")}}function Ui(e){if(e.destroyed)throw ot("COL21",{collection:e.name,version:e.schema.version})}var kY=function(){function e(n){this.subs=[],this.counter=0,this.eventCounterMap=new WeakMap,this.buffer=[],this.limit=100,this.tasks=new Set,this.collection=n,this.subs.push(this.collection.database.eventBulks$.pipe(Gt(r=>r.collectionName===this.collection.name),Gt(r=>{var i=r.events[0];return!i.isLocal})).subscribe(r=>{this.tasks.add(()=>this._handleChangeEvents(r.events)),this.tasks.size<=1&&Gv().then(()=>{this.processTasks()})}))}var t=e.prototype;return t.processTasks=function(){if(this.tasks.size!==0){var r=Array.from(this.tasks);r.forEach(i=>i()),this.tasks.clear()}},t._handleChangeEvents=function(r){var i=this.counter;this.counter=this.counter+r.length,r.length>this.limit?this.buffer=r.slice(r.length*-1):(Yl(this.buffer,r),this.buffer=this.buffer.slice(this.limit*-1));for(var o=i+1,s=this.eventCounterMap,a=0;ai(s))},t.reduceByLastOfDoc=function(r){return this.processTasks(),r.slice(0)},t.destroy=function(){this.tasks.clear(),this.subs.forEach(r=>r.unsubscribe())},e}();function EY(e){return new kY(e)}var RY=new WeakMap;function PY(e){var t=e.schema.getDocumentPrototype(),n=jY(e),r=ty,i={};return[t,n,r].forEach(o=>{var s=Object.getOwnPropertyNames(o);s.forEach(a=>{var l=Object.getOwnPropertyDescriptor(o,a),c=!0;(a.startsWith("_")||a.endsWith("_")||a.startsWith("$")||a.endsWith("$"))&&(c=!1),typeof l.value=="function"?Object.defineProperty(i,a,{get(){return l.value.bind(this)},enumerable:c,configurable:!1}):(l.enumerable=c,l.configurable=!1,l.writable&&(l.writable=!1),Object.defineProperty(i,a,l))})}),i}function TY(e){return Gs(RY,e,()=>SL(PY(e)))}function OY(e,t,n){var r=gY(t,e,bn.deepFreezeWhenDevMode(n));return e._runHooksSync("post","create",n,r),oo("postCreateRxDocument",r),r}function jY(e){var t={};return Object.entries(e.methods).forEach(([n,r])=>{t[n]=r}),t}async function tg(e,t){var n=Za(e.input.metaInstance.schema,{isCheckpoint:"1",itemId:t}),r=await e.input.metaInstance.findDocumentsById([n],!1),i=r[0];if(e.lastCheckpointDoc[t]=i,i)return i.checkpointData}async function ng(e,t,n){e.checkpointQueue=e.checkpointQueue.then(async()=>{var r=e.lastCheckpointDoc[t];if(n&&!e.events.canceled.getValue()&&(!r||JSON.stringify(r.checkpointData)!==JSON.stringify(n))){var i={id:"",isCheckpoint:"1",itemId:t,_deleted:!1,_attachments:{},checkpointData:n,_meta:Yu(),_rev:Do()};for(i.id=Za(e.input.metaInstance.schema,i);!e.events.canceled.getValue();){if(r&&(i.checkpointData=Jf([r.checkpointData,i.checkpointData])),i._meta.lwt=ar(),i._rev=Us(await e.checkpointKey,r),e.events.canceled.getValue())return;var o=[{previous:r,document:i}],s=await e.input.metaInstance.bulkWrite(o,"replication-set-checkpoint"),a=Oi(e.primaryPath,o,s)[0];if(a){e.lastCheckpointDoc[t]=a;return}else{var l=s.error[0];if(l.status!==409)throw l;r=xt(l.documentInDb),i._rev=Us(await e.checkpointKey,r)}}}}),await e.checkpointQueue}async function LY(e){var t=await e.hashFunction([e.identifier,e.forkInstance.databaseName,e.forkInstance.collectionName].join("||"));return"rx_storage_replication_"+t}function PE(e,t,n,r,i){var o=Object.assign({},r,{_attachments:t&&r._attachments?r._attachments:{},_meta:n?r._meta:Object.assign({},i?i._meta:{},{lwt:ar()}),_rev:n?r._rev:Do()});return o._rev||(o._rev=Us(e,i)),o}function ga(e,t,n){var r=on(e);return t||delete r._attachments,n||(delete r._meta,delete r._rev),r}function O1(e,t){return e.hasAttachments?t.map(n=>{var r=io(n.document);return r.docData=es(r.docData),{document:r,previous:n.previous}}):t}function j1(e){for(;;)if(e.underlyingPersistentStorage)e=e.underlyingPersistentStorage;else return e}var IY="RxReplicationProtocolMetaData";function MY(e,t){var n=MH(e),r={title:IY,primaryKey:{key:"id",fields:["itemId","isCheckpoint"],separator:"|"},type:"object",version:e.version,additionalProperties:!1,properties:{id:{type:"string",minLength:1,maxLength:n+2},isCheckpoint:{type:"string",enum:["0","1"],minLength:1,maxLength:1},itemId:{type:"string",maxLength:n>4?n:4},checkpointData:{type:"object",additionalProperties:!0},docData:{type:"object",properties:e.properties},isResolvedConflict:{type:"string"}},keyCompression:e.keyCompression,required:["id","isCheckpoint","itemId"]};t&&(r.encrypted=["docData"]);var i=Vv(r);return i}function RL(e,t){return e.input.metaInstance.findDocumentsById(t.map(n=>{var r=Za(e.input.metaInstance.schema,{itemId:n,isCheckpoint:"0"});return r}),!0).then(n=>{var r={};return Object.values(n).forEach(i=>{r[i.itemId]={docData:i.docData,metaDocument:i}}),r})}async function rg(e,t,n,r){var i=t[e.primaryPath],o=n?Pp(n):{id:"",isCheckpoint:"0",itemId:i,docData:t,_attachments:{},_deleted:!1,_rev:Do(),_meta:{lwt:0}};o.docData=t,r&&(o.isResolvedConflict=r),o._meta.lwt=ar(),o.id=Za(e.input.metaInstance.schema,o),o._rev=Us(await e.checkpointKey,n);var s={previous:n,document:o};return s}async function NY(e){if(e.input.initialCheckpoint&&e.input.initialCheckpoint.downstream){var t=await tg(e,"down");t||await ng(e,"down",e.input.initialCheckpoint.downstream)}var n=await e.input.hashFunction(e.input.identifier),r=e.input.replicationHandler,i=0,o=[];function s(h){e.stats.down.addNewTask=e.stats.down.addNewTask+1;var g={time:i++,task:h};o.push(g),e.streamQueue.down=e.streamQueue.down.then(()=>{for(var E=[];o.length>0;){e.events.active.down.next(!0);var b=xt(o.shift());if(!(b.time{e.events.active.down.next(!1),!e.firstSyncDone.down.getValue()&&!e.events.canceled.getValue()&&e.firstSyncDone.down.next(!0)})}if(s("RESYNC"),!e.events.canceled.getValue()){var a=r.masterChangeStream$.pipe(ls(async h=>(await Ln(e.events.active.up.pipe(Gt(g=>!g))),h))).subscribe(h=>{e.stats.down.masterChangeStreamEmit=e.stats.down.masterChangeStreamEmit+1,s(h)});Ln(e.events.canceled.pipe(Gt(h=>!!h))).then(()=>a.unsubscribe())}var l=-1;async function c(){if(e.stats.down.downstreamResyncOnce=e.stats.down.downstreamResyncOnce+1,!e.events.canceled.getValue()){e.checkpointQueue=e.checkpointQueue.then(()=>tg(e,"down"));for(var h=await e.checkpointQueue,g=[];!e.events.canceled.getValue();){l=i++;var E=await r.masterChangesSince(h,e.input.pullBatchSize);if(E.documents.length===0||(h=Jf([h,E.checkpoint]),g.push(m(E.documents,h)),E.documents.length{if(b==="RESYNC")throw new Error("SNH");Yl(g,b.documents),E=Jf([E,b.checkpoint])}),m(g,xt(E))}var d=Ci,f={docs:{}};function m(h,g){var E=e.primaryPath;return e.stats.down.persistFromMaster=e.stats.down.persistFromMaster+1,h.forEach(b=>{var w=b[E];f.docs[w]=b}),f.checkpoint=g,d=d.then(()=>{var b=f.docs;f.docs={};var w=f.checkpoint,y=Object.keys(b);if(e.events.canceled.getValue()||y.length===0)return Ci;var _=[],k={},R={},P=[];return Promise.all([e.input.forkInstance.findDocumentsById(y,!0),RL(e,y)]).then(([I,$])=>{var L=new Map;return I.forEach(N=>L.set(N[E],N)),Promise.all(y.map(async N=>{var F=L.get(N),z=F?ga(F,e.hasAttachments,!1):void 0,K=b[N],Z=$[N];Z&&F&&Z.metaDocument.isResolvedConflict===F._rev&&await e.streamQueue.up;var le=!Z||!z?!1:await e.input.conflictHandler({realMasterState:Z.docData,newDocumentState:z},"downstream-check-if-equal-0").then(je=>je.isEqual);if(!le&&Z&&Z.docData._rev&&F&&F._meta[e.input.identifier]&&za(F._rev)===F._meta[e.input.identifier]&&(le=!0),F&&Z&&le===!1||F&&!Z)return Ci;var ce=z?await e.input.conflictHandler({realMasterState:K,newDocumentState:z},"downstream-check-if-equal-1").then(je=>je.isEqual):!1;if(z&&ce)return(!Z||le===!1)&&P.push(await rg(e,z,Z?Z.metaDocument:void 0)),Ci;var H=Object.assign({},K,F?{_meta:on(F._meta),_attachments:e.hasAttachments&&K._attachments?K._attachments:{},_rev:Do()}:{_meta:{lwt:ar()},_rev:Do(),_attachments:e.hasAttachments&&K._attachments?K._attachments:{}});if(K._rev){var V=F?za(F._rev)+1:1;H._meta[e.input.identifier]=V,e.input.keepMeta&&(H._rev=K._rev)}e.input.keepMeta&&K._meta&&(H._meta=K._meta);var se={previous:F,document:H};se.document._rev=se.document._rev?se.document._rev:Us(n,se.previous),_.push(se),k[N]=se,R[N]=await rg(e,K,Z?Z.metaDocument:void 0)}))}).then(async()=>{if(_.length>0)return e.input.forkInstance.bulkWrite(_,await e.downstreamBulkWriteFlag).then(I=>{var $=Oi(e.primaryPath,_,I);$.forEach(L=>{var N=L[E];e.events.processed.down.next(k[N]),P.push(R[N])}),I.error.forEach(L=>{L.status!==409&&e.events.error.next(ot("RC_PULL",{writeError:L}))})})}).then(()=>{if(P.length>0)return e.input.metaInstance.bulkWrite(O1(e,P),"replication-down-write-meta").then(I=>{I.error.forEach($=>{e.events.error.next(ot("RC_PULL",{id:$.documentId,writeError:$}))})})}).then(()=>{ng(e,"down",w)})}).catch(b=>e.events.error.next(b)),d}}var PL=function(e,t){var n=es(e.newDocumentState),r=es(e.realMasterState);return Ym(n,r)?Promise.resolve({isEqual:!0}):Promise.resolve({isEqual:!1,documentData:e.realMasterState})};async function $Y(e,t,n){var r=e.input.conflictHandler,i=await r(t,"replication-resolve-conflict");if(!i.isEqual){var o=Object.assign({},i.documentData,{_meta:on(n._meta),_rev:Do(),_attachments:on(n._attachments)});return o._meta.lwt=ar(),o._rev=Us(await e.checkpointKey,n),{resolvedDoc:o,output:i}}}async function L1(e,t,n,r){if(!n._attachments||r&&!r._attachments)throw new Error("_attachments missing");var i=n[e],o=new Set(r&&r._attachments?Object.keys(r._attachments):[]);return await Promise.all(Object.entries(n._attachments).map(async([s,a])=>{if((!o.has(s)||r&&xt(r._attachments)[s].digest!==a.digest)&&!a.data){var l=await t.getAttachmentData(i,s,a.digest);a.data=l}})),n}async function AY(e){if(e.input.initialCheckpoint&&e.input.initialCheckpoint.upstream){var t=await tg(e,"up");t||await ng(e,"up",e.input.initialCheckpoint.upstream)}var n=e.input.replicationHandler;e.streamQueue.up=e.streamQueue.up.then(()=>c().then(()=>{u()}));var r=0,i=-1,o=[],s=Po,a={docs:{}},l=e.input.forkInstance.changeStream().subscribe(async f=>{if(f.context!==await e.downstreamBulkWriteFlag)return e.stats.up.forkChangeStreamEmit=e.stats.up.forkChangeStreamEmit+1,o.push({task:f,time:r++}),e.events.active.up.getValue()||e.events.active.up.next(!0),e.input.waitBeforePersist?e.input.waitBeforePersist().then(()=>u()):u()});Ln(e.events.canceled.pipe(Gt(f=>!!f))).then(()=>l.unsubscribe());async function c(){if(e.stats.up.upstreamInitialSync=e.stats.up.upstreamInitialSync+1,!e.events.canceled.getValue()){e.checkpointQueue=e.checkpointQueue.then(()=>tg(e,"up"));for(var f=await e.checkpointQueue,m=new Set,h=async function(){i=r++,m.size>3&&await Promise.race(Array.from(m));var b=await wL(e.input.forkInstance,e.input.pushBatchSize,f);if(b.documents.length===0)return 1;f=Jf([f,b.checkpoint]);var w=d(b.documents,xt(f));m.add(w),w.catch().then(()=>m.delete(w))};!e.events.canceled.getValue()&&!await h(););var g=await Promise.all(m),E=g.find(b=>!!b);E?await c():!e.firstSyncDone.up.getValue()&&!e.events.canceled.getValue()&&e.firstSyncDone.up.next(!0)}}function u(){if(e.events.canceled.getValue()||o.length===0){e.events.active.up.next(!1);return}e.stats.up.processTasks=e.stats.up.processTasks+1,e.events.active.up.next(!0),e.streamQueue.up=e.streamQueue.up.then(()=>{for(var f=[],m={};o.length>0;){var h=xt(o.shift());h.timeE.documentData)),m=Jf([m,h.task.checkpoint]))}var g=f.length===0?Po:d(f,m);return g.then(()=>{o.length===0?e.events.active.up.next(!1):u()})})}function d(f,m){return e.stats.up.persistToMaster=e.stats.up.persistToMaster+1,f.forEach(h=>{var g=h[e.primaryPath];a.docs[g]=h}),a.checkpoint=m,s=s.then(async()=>{if(e.events.canceled.getValue())return!1;var h=a.docs;a.docs={};var g=a.checkpoint,E=Object.keys(h);if(E.length===0)return!1;var b=await RL(e,E),w={},y=[],_={},k={};if(await Promise.all(E.map(async ce=>{var H=h[ce];k[ce]=H;var V=ga(H,e.hasAttachments,!!e.input.keepMeta),se=b[ce];se&&se.metaDocument.isResolvedConflict!==H._rev&&(await e.input.conflictHandler({realMasterState:se.docData,newDocumentState:V},"upstream-check-if-equal")).isEqual||se&&se.docData._rev&&za(H._rev)===H._meta[e.input.identifier]||(y.push(ce),w[ce]={assumedMasterState:se?se.docData:void 0,newDocumentState:V},_[ce]=await rg(e,V,se?se.metaDocument:void 0))})),y.length===0)return!1;var R=Object.values(w),P=new Set,I={},$=eH(R,e.input.pushBatchSize);await Promise.all($.map(async ce=>{e.hasAttachments&&await Promise.all(ce.map(async V=>{V.newDocumentState=await L1(e.primaryPath,e.input.forkInstance,io(V.newDocumentState),V.assumedMasterState)}));var H=await n.masterWrite(ce);H.forEach(V=>{var se=V[e.primaryPath];P.add(se),I[se]=V})}));var L=[];if(y.forEach(ce=>{P.has(ce)||(e.events.processed.up.next(w[ce]),L.push(_[ce]))}),e.events.canceled.getValue())return!1;L.length>0&&await e.input.metaInstance.bulkWrite(O1(e,L),"replication-up-write-meta");var N=!1;if(P.size>0){e.stats.up.persistToMasterHadConflicts=e.stats.up.persistToMasterHadConflicts+1;var F=[],z={};if(await Promise.all(Object.entries(I).map(([ce,H])=>{var V=w[ce],se={newDocumentState:V.newDocumentState,assumedMasterState:V.assumedMasterState,realMasterState:H};return $Y(e,se,k[ce]).then(async je=>{if(je){e.events.resolvedConflicts.next({input:se,output:je.output}),F.push({previous:k[ce],document:je.resolvedDoc});var Ge=b[ce];z[ce]=await rg(e,xt(H),Ge?Ge.metaDocument:void 0,je.resolvedDoc._rev)}})})),F.length>0){N=!0,e.stats.up.persistToMasterConflictWrites=e.stats.up.persistToMasterConflictWrites+1;var K=await e.input.forkInstance.bulkWrite(F,"replication-up-write-conflict"),Z=[],le=Oi(e.primaryPath,F,K);le.forEach(ce=>{var H=ce[e.primaryPath];Z.push(z[H])}),Z.length>0&&await e.input.metaInstance.bulkWrite(O1(e,Z),"replication-up-write-conflict-meta")}}return ng(e,"up",g),N}).catch(h=>(e.events.error.next(h),!1)),s}}function DY(e){e=on(e),e.forkInstance=j1(e.forkInstance),e.metaInstance=j1(e.metaInstance);var t=LY(e),n={primaryPath:$i(e.forkInstance.schema.primaryKey),hasAttachments:!!e.forkInstance.schema.attachments,input:e,checkpointKey:t,downstreamBulkWriteFlag:t.then(r=>"replication-downstream-"+r),events:{canceled:new ks(!1),active:{down:new ks(!0),up:new ks(!0)},processed:{down:new Tn,up:new Tn},resolvedConflicts:new Tn,error:new Tn},stats:{down:{addNewTask:0,downstreamProcessChanges:0,downstreamResyncOnce:0,masterChangeStreamEmit:0,persistFromMaster:0},up:{forkChangeStreamEmit:0,persistToMaster:0,persistToMasterConflictWrites:0,persistToMasterHadConflicts:0,processTasks:0,upstreamInitialSync:0}},firstSyncDone:{down:new ks(!1),up:new ks(!1)},streamQueue:{down:Ci,up:Ci},checkpointQueue:Ci,lastCheckpointDoc:{}};return NY(n),AY(n),n}function I0(e){return Ln(Kj([e.firstSyncDone.down.pipe(Gt(t=>!!t)),e.firstSyncDone.up.pipe(Gt(t=>!!t))])).then(()=>{})}function TE(e){return Promise.all([e.streamQueue.up,e.streamQueue.down,e.checkpointQueue])}function BY(e,t,n,r=!1){e=j1(e);var i=!!e.schema.attachments,o=$i(e.schema.primaryKey),s={masterChangeStream$:e.changeStream().pipe(ls(async a=>{var l={checkpoint:a.checkpoint,documents:await Promise.all(a.events.map(async c=>{var u=ga(c.documentData,i,r);return i&&(u=await L1(o,e,io(u),void 0)),u}))};return l})),masterChangesSince(a,l){return wL(e,l,a).then(async c=>({checkpoint:c.documents.length>0?c.checkpoint:a,documents:await Promise.all(c.documents.map(async u=>{var d=ga(u,i,r);return i&&(d=await L1(o,e,io(d),void 0)),d}))}))},async masterWrite(a){var l={};a.forEach(g=>{var E=g.newDocumentState[o];l[E]=g});var c=Object.keys(l),u=await e.findDocumentsById(c,!0),d=new Map;u.forEach(g=>d.set(g[o],g));var f=[],m=[];if(await Promise.all(Object.entries(l).map(async([g,E])=>{var b=d.get(g);b?b&&!E.assumedMasterState?f.push(ga(b,i,r)):(await t({realMasterState:ga(b,i,r),newDocumentState:xt(E.assumedMasterState)},"rxStorageInstanceToReplicationHandler-masterWrite")).isEqual===!0?m.push({previous:b,document:PE(n,i,r,E.newDocumentState,b)}):f.push(ga(b,i,r)):m.push({document:PE(n,i,r,E.newDocumentState)})})),m.length>0){var h=await e.bulkWrite(m,"replication-master-write");h.error.forEach(g=>{if(g.status!==409)throw new Error("non conflict error");f.push(ga(xt(g.documentInDb),i,r))})}return f}};return s}async function FY(e){e.events.canceled.next(!0),e.events.active.up.complete(),e.events.active.down.complete(),e.events.processed.up.complete(),e.events.processed.down.complete(),e.events.resolvedConflicts.complete(),e.events.canceled.complete(),await e.checkpointQueue}var TL=["pre","post"],OL=["insert","save","remove","create"],OE=!1,jL=function(){function e(n,r,i,o,s={},a={},l={},c={},u={},d=pL,f={},m=PL){this.storageInstance={},this.timeouts=new Set,this.incrementalWriteQueue={},this._incrementalUpsertQueues=new Map,this.synced=!1,this.hooks={},this._subs=[],this._docCache={},this._queryCache=Kq(),this.$={},this.checkpoint$={},this._changeEventBuffer={},this.onDestroy=[],this.destroyed=!1,this.onRemove=[],this.database=n,this.name=r,this.schema=i,this.internalStorageInstance=o,this.instanceCreationOptions=s,this.migrationStrategies=a,this.methods=l,this.attachments=c,this.options=u,this.cacheReplacementPolicy=d,this.statics=f,this.conflictHandler=m,zY(this.asRxCollection)}var t=e.prototype;return t.prepare=async function(){this.storageInstance=vS(this.database,this.internalStorageInstance,this.schema.jsonSchema),this.incrementalWriteQueue=new xL(this.storageInstance,this.schema.primaryPath,(l,c)=>_L(this,l,c),l=>this._runHooks("post","save",l));var r=this.database.eventBulks$.pipe(Gt(l=>l.collectionName===this.name));this.$=r.pipe(ls(l=>l.events)),this.checkpoint$=r.pipe(qt(l=>l.checkpoint)),this._changeEventBuffer=EY(this.asRxCollection);var i;this._docCache=new hL(this.schema.primaryPath,this.database.eventBulks$.pipe(Gt(l=>l.collectionName===this.name&&!l.events[0].isLocal),qt(l=>l.events)),l=>(i||(i=TY(this.asRxCollection)),OY(this.asRxCollection,i,l)));var o=this.database.internalStore.changeStream().pipe(Gt(l=>{var c=this.name+"-"+this.schema.version,u=l.events.find(d=>d.documentData.context==="collection"&&d.documentData.key===c&&d.operation==="DELETE");return!!u})).subscribe(async()=>{await this.destroy(),await Promise.all(this.onRemove.map(l=>l()))});this._subs.push(o);var s=await this.database.storageToken,a=this.storageInstance.changeStream().subscribe(l=>{for(var c=new Array(l.events.length),u=l.events,d=this.name,f=bn.deepFreezeWhenDevMode,m=0;m{this.conflictHandler(l.input,l.context).then(c=>{this.storageInstance.resolveConflictResultionTask({id:l.id,output:c})})})),Ci},t.cleanup=function(r){throw Ui(this),fn("cleanup")},t.migrationNeeded=function(){throw fn("migration-schema")},t.getMigrationState=function(){throw fn("migration-schema")},t.startMigration=function(r=10){return Ui(this),this.getMigrationState().startMigration(r)},t.migratePromise=function(r=10){return this.getMigrationState().migratePromise(r)},t.insert=async function(r){Ui(this);var i=await this.bulkInsert([r]),o=i.error[0];Zm(this,r[this.schema.primaryPath],r,o);var s=xt(i.success[0]);return s},t.bulkInsert=async function(r){if(Ui(this),r.length===0)return{success:[],error:[]};var i=this.schema.primaryPath,o;if(this.hasHooks("pre","insert"))o=await Promise.all(r.map(g=>{var E=_h(this.schema,g);return this._runHooks("pre","insert",E).then(()=>({document:E}))}));else{o=new Array(r.length);for(var s=this.schema,a=0;a{var E=g.document;h.set(E[i],E)}),await Promise.all(m.success.map(g=>this._runHooks("post","insert",h.get(g.primary),g)))}return m},t.bulkRemove=async function(r){Ui(this);var i=this.schema.primaryPath;if(r.length===0)return{success:[],error:[]};var o=await this.findByIds(r).exec(),s=[],a=new Map;Array.from(o.values()).forEach(m=>{var h=m.toMutableJSON(!0);s.push(h),a.set(m.primary,h)}),await Promise.all(s.map(m=>{var h=m[this.schema.primaryPath];return this._runHooks("pre","remove",m,o.get(h))}));var l=s.map(m=>{var h=on(m);return h._deleted=!0,{previous:m,document:h}}),c=await this.storageInstance.bulkWrite(l,"rx-collection-bulk-remove"),u=Oi(this.schema.primaryPath,l,c),d=u.map(m=>m[i]);await Promise.all(d.map(m=>this._runHooks("post","remove",a.get(m),o.get(m))));var f=d.map(m=>Ws(o,m));return{success:f,error:c.error}},t.bulkUpsert=async function(r){Ui(this);var i=[],o=new Map;r.forEach(c=>{var u=_h(this.schema,c),d=u[this.schema.primaryPath];if(!d)throw ot("COL3",{primaryPath:this.schema.primaryPath,data:u,schema:this.schema.jsonSchema});o.set(d,u),i.push(u)});var s=await this.bulkInsert(i),a=s.success.slice(0),l=[];return await Promise.all(s.error.map(async c=>{if(c.status!==409)l.push(c);else{var u=c.documentId,d=Ws(o,u),f=xt(c.documentInDb),m=this._docCache.getCachedRxDocuments([f])[0],h=await m.incrementalModify(()=>d);a.push(h)}})),{error:l,success:a}},t.upsert=async function(r){Ui(this);var i=await this.bulkUpsert([r]);return Zm(this.asRxCollection,r[this.schema.primaryPath],r,i.error[0]),i.success[0]},t.incrementalUpsert=function(r){Ui(this);var i=_h(this.schema,r),o=i[this.schema.primaryPath];if(!o)throw ot("COL4",{data:r});var s=this._incrementalUpsertQueues.get(o);return s||(s=Ci),s=s.then(()=>WY(this,o,i)).then(a=>a.inserted?a.doc:UY(a.doc,i)),this._incrementalUpsertQueues.set(o,s),s},t.find=function(r){if(Ui(this),typeof r=="string")throw ot("COL5",{queryObj:r});r||(r=im());var i=Fc("find",r,this);return i},t.findOne=function(r){if(Ui(this),typeof r=="number"||Array.isArray(r))throw xi("COL6",{queryObj:r});var i;if(typeof r=="string")i=Fc("findOne",{selector:{[this.schema.primaryPath]:r},limit:1},this);else{if(r||(r=im()),r.limit)throw ot("QU6");r=on(r),r.limit=1,i=Fc("findOne",r,this)}return i},t.count=function(r){Ui(this),r||(r=im());var i=Fc("count",r,this);return i},t.findByIds=function(r){Ui(this);var i={selector:{[this.schema.primaryPath]:{$in:r.slice(0)}}},o=Fc("findByIds",i,this);return o},t.exportJSON=function(){throw fn("json-dump")},t.importJSON=function(r){throw fn("json-dump")},t.insertCRDT=function(r){throw fn("crdt")},t.addHook=function(r,i,o,s=!1){if(typeof o!="function")throw xi("COL7",{key:i,when:r});if(!TL.includes(r))throw xi("COL8",{key:i,when:r});if(!OL.includes(i))throw ot("COL9",{key:i});if(r==="post"&&i==="create"&&s===!0)throw ot("COL10",{when:r,key:i,parallel:s});var a=o.bind(this),l=s?"parallel":"series";this.hooks[i]=this.hooks[i]||{},this.hooks[i][r]=this.hooks[i][r]||{series:[],parallel:[]},this.hooks[i][r][l].push(a)},t.getHooks=function(r,i){return!this.hooks[i]||!this.hooks[i][r]?{series:[],parallel:[]}:this.hooks[i][r]},t.hasHooks=function(r,i){if(!this.hooks[i]||!this.hooks[i][r])return!1;var o=this.getHooks(r,i);return o?o.series.length>0||o.parallel.length>0:!1},t._runHooks=function(r,i,o,s){var a=this.getHooks(r,i);if(!a)return Ci;var l=a.series.map(c=>()=>c(o,s));return xH(l).then(()=>Promise.all(a.parallel.map(c=>c(o,s))))},t._runHooksSync=function(r,i,o,s){if(this.hasHooks(r,i)){var a=this.getHooks(r,i);a&&a.series.forEach(l=>l(o,s))}},t.promiseWait=function(r){var i=new Promise(o=>{var s=setTimeout(()=>{this.timeouts.delete(s),o()},r);this.timeouts.add(s)});return i},t.destroy=async function(){return this.destroyed?Po:(await Promise.all(this.onDestroy.map(r=>r())),this.destroyed=!0,Array.from(this.timeouts).forEach(r=>clearTimeout(r)),this._changeEventBuffer&&this._changeEventBuffer.destroy(),this.database.requestIdlePromise().then(()=>this.storageInstance.close()).then(()=>(this._subs.forEach(r=>r.unsubscribe()),delete this.database.collections[this.name],Ql("postDestroyRxCollection",this).then(()=>!0))))},t.remove=async function(){await this.destroy(),await Promise.all(this.onRemove.map(r=>r())),await EL(this.database.storage,this.database.internalStore,this.database.token,this.database.name,this.name,this.database.password,this.database.hashFunction)},Ja(e,[{key:"insert$",get:function(){return this.$.pipe(Gt(n=>n.operation==="INSERT"))}},{key:"update$",get:function(){return this.$.pipe(Gt(n=>n.operation==="UPDATE"))}},{key:"remove$",get:function(){return this.$.pipe(Gt(n=>n.operation==="DELETE"))}},{key:"asRxCollection",get:function(){return this}}])}();function zY(e){if(!OE){OE=!0;var t=Object.getPrototypeOf(e);OL.forEach(n=>{TL.map(r=>{var i=r+gj(n);t[i]=function(o,s){return this.addHook(r,n,o,s)}})})}}function UY(e,t){return e.incrementalModify(n=>t)}function WY(e,t,n){var r=e._docCache.getLatestDocumentDataIfExists(t);return r?Promise.resolve({doc:e._docCache.getCachedRxDocuments([r])[0],inserted:!1}):e.findOne(t).exec().then(i=>i?{doc:i,inserted:!1}:e.insert(n).then(o=>({doc:o,inserted:!0})))}function GY({database:e,name:t,schema:n,instanceCreationOptions:r={},migrationStrategies:i={},autoMigrate:o=!0,statics:s={},methods:a={},attachments:l={},options:c={},localDocuments:u=!1,cacheReplacementPolicy:d=pL,conflictHandler:f=PL}){var m={databaseInstanceToken:e.token,databaseName:e.name,collectionName:t,schema:n.jsonSchema,options:r,multiInstance:e.multiInstance,password:e.password,devMode:bn.isDevMode()};return oo("preCreateRxStorageInstance",m),CY(e,m).then(h=>{var g=new jL(e,t,n,h,r,i,a,l,c,d,s,f);return g.prepare().then(()=>{Object.entries(s).forEach(([b,w])=>{Object.defineProperty(g,b,{get:()=>w.bind(g)})});var E=Ci;return o&&g.schema.version!==0&&(E=g.migratePromise()),E}).then(()=>(oo("createRxCollection",{collection:g,creator:{name:t,schema:n,storageInstance:h,instanceCreationOptions:r,migrationStrategies:i,methods:a,attachments:l,options:c,cacheReplacementPolicy:d,localDocuments:u,statics:s}}),g)).catch(E=>h.close().then(()=>Promise.reject(E)))})}var LL=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this._parallels=t||1,this._qC=0,this._iC=new Set,this._lHN=0,this._hPM=new Map,this._pHM=new Map};LL.prototype={isIdle:function(){return this._qC{this._to=!1,VY(this)},0))}clear(){this.map.clear()}}function VY(e){const t=IL()-e.ttl,n=e.map[Symbol.iterator]();for(;;){const r=n.next().value;if(!r)return;const i=r[0];if(r[1]g.events)),this.storageToken=Po,this.storageTokenDocument=Po,this.emittedEventBulkIds=new wS(60*1e3),this.name=n,this.token=r,this.storage=i,this.instanceCreationOptions=o,this.password=s,this.multiInstance=a,this.eventReduce=l,this.options=c,this.internalStore=u,this.hashFunction=d,this.cleanupPolicy=f,this.allowSlowCount=m,this.reactivity=h,this.name!=="pseudoInstance"&&(this.internalStore=vS(this.asRxDatabase,u,bS),this.storageTokenDocument=wY(this.asRxDatabase).catch(g=>this.startupErrors.push(g)),this.storageToken=this.storageTokenDocument.then(g=>g.data.token).catch(g=>this.startupErrors.push(g)))}var t=e.prototype;return t.getReactivityFactory=function(){if(!this.reactivity)throw ot("DB14",{database:this.name});return this.reactivity},t.$emit=function(r){this.emittedEventBulkIds.has(r.id)||(this.emittedEventBulkIds.add(r.id),this.eventBulks$.next(r))},t.removeCollectionDoc=async function(r,i){var o=await Zv(this.internalStore,Zf(eg(r,i),Al));if(!o)throw ot("SNH",{name:r,schema:i});var s=Pp(o);s._deleted=!0,await this.internalStore.bulkWrite([{document:s,previous:o}],"rx-database-remove-collection")},t.addCollections=async function(r){var i={},o={},s=[],a={};await Promise.all(Object.entries(r).map(async([u,d])=>{var f=u,m=d.schema;i[f]=m;var h=FH(m,this.hashFunction);if(o[f]=h,this.collections[u])throw ot("DB3",{name:u});var g=eg(u,m),E={id:Zf(g,Al),key:g,context:Al,data:{name:f,schemaHash:await h.hash,schema:h.jsonSchema,version:h.version,connectedStorages:[]},_deleted:!1,_meta:Yu(),_rev:Do(),_attachments:{}};s.push({document:E});var b=Object.assign({},d,{name:f,schema:h,database:this}),w=on(d);w.database=this,w.name=u,oo("preCreateRxCollection",w),b.conflictHandler=w.conflictHandler,a[f]=b}));var l=await this.internalStore.bulkWrite(s,"rx-database-add-collection");await XY(this),await Promise.all(l.error.map(async u=>{if(u.status!==409)throw ot("DB12",{database:this.name,writeError:u});var d=xt(u.documentInDb),f=d.data.name,m=o[f];if(d.data.schemaHash!==await m.hash)throw ot("DB6",{database:this.name,collection:f,previousSchemaHash:d.data.schemaHash,schemaHash:await m.hash,previousSchema:d.data.schema,schema:xt(i[f])})}));var c={};return await Promise.all(Object.keys(r).map(async u=>{var d=a[u],f=await GY(d);c[u]=f,this.collections[u]=f,this[u]||Object.defineProperty(this,u,{get:()=>this.collections[u]})})),c},t.lockedRun=function(r){return this.idleQueue.wrapCall(r)},t.requestIdlePromise=function(){return this.idleQueue.requestIdlePromise()},t.exportJSON=function(r){throw fn("json-dump")},t.addState=function(r){throw fn("state")},t.importJSON=function(r){throw fn("json-dump")},t.backup=function(r){throw fn("backup")},t.leaderElector=function(){throw fn("leader-election")},t.isLeader=function(){throw fn("leader-election")},t.waitForLeadership=function(){throw fn("leader-election")},t.migrationStates=function(){throw fn("migration-schema")},t.destroy=async function(){return this.destroyed||(this.destroyed=!0,await Ql("preDestroyRxDatabase",this),this.eventBulks$.complete(),this._subs.map(r=>r.unsubscribe()),this.name==="pseudoInstance")?Po:this.requestIdlePromise().then(()=>Promise.all(this.onDestroy.map(r=>r()))).then(()=>Promise.all(Object.keys(this.collections).map(r=>this.collections[r]).map(r=>r.destroy()))).then(()=>this.internalStore.close()).then(()=>ig.delete(this.storage.name+"|"+this.name)).then(()=>!0)},t.remove=function(){return this.destroy().then(()=>YY(this.name,this.storage,this.password))},Ja(e,[{key:"$",get:function(){return this.observable$}},{key:"asRxDatabase",get:function(){return this}}])}();function KY(e,t){var n=t.name+"|"+e;if(ig.has(n))throw ot("DB8",{name:e,storage:t.name,link:"https://rxdb.info/rx-database.html#ignoreduplicate"})}async function ML(e,t,n,r,i,o){var s=await t.createStorageInstance({databaseInstanceToken:e,databaseName:n,collectionName:cY,schema:bS,options:r,multiInstance:i,password:o,devMode:bn.isDevMode()});return s}function qY({storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i=!0,eventReduce:o=!0,ignoreDuplicate:s=!1,options:a={},cleanupPolicy:l,allowSlowCount:c=!1,localDocuments:u=!1,hashFunction:d=hj,reactivity:f}){oo("preCreateRxDatabase",{storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i,eventReduce:o,ignoreDuplicate:s,options:a,localDocuments:u}),s||KY(n,e),ig.add(e.name+"|"+n);var m=cc(10);return ML(m,e,n,t,i,r).catch(h=>{throw ig.delete(e.name+"|"+n),h}).then(h=>{var g=new xS(n,m,e,t,r,i,o,a,h,d,l,c,f);return Ql("createRxDatabase",{database:g,creator:{storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i,eventReduce:o,ignoreDuplicate:s,options:a,localDocuments:u}}).then(()=>g)})}async function YY(e,t,n){var r=cc(10),i=await ML(r,t,e,{},!1,n),o=await CL(i),s=new Set;o.forEach(l=>s.add(l.data.name));var a=Array.from(s);return await Promise.all(a.map(l=>EL(t,i,r,e,l,n))),await Ql("postRemoveRxDatabase",{databaseName:e,storage:t}),await i.remove(),a}function QY(e){return e instanceof xS}async function XY(e){if(await e.storageToken,e.startupErrors[0])throw e.startupErrors[0]}var JY={RxSchema:kj.prototype,RxDocument:ty,RxQuery:gL.prototype,RxCollection:jL.prototype,RxDatabase:xS.prototype},N0=new Set,jE=new Set;function Zu(e){if(oo("preAddRxPlugin",{plugin:e,plugins:N0}),!N0.has(e)){{if(jE.has(e.name))throw ot("PL3",{name:e.name,plugin:e});N0.add(e),jE.add(e.name)}if(!e.rxdb)throw xi("PL1",{plugin:e});e.init&&e.init(),e.prototypes&&Object.entries(e.prototypes).forEach(([t,n])=>n(JY[t])),e.overwritable&&Object.assign(bn,e.overwritable),e.hooks&&Object.entries(e.hooks).forEach(([t,n])=>{n.after&&Yf[t].push(n.after),n.before&&Yf[t].unshift(n.before)})}}function ZY(e){return e&&typeof e.then=="function"}Promise.resolve(!1);var eQ=Promise.resolve(!0),$s=Promise.resolve();function Tl(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function tQ(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Tp(){return Math.random().toString(36).substring(2)}var $0=0;function Op(){var e=Date.now()*1e3;return e<=$0&&(e=$0+1),$0=e,e}function nQ(){return typeof navigator<"u"&&typeof navigator.locks<"u"&&typeof navigator.locks.request=="function"}var rQ=Op,iQ="native";function oQ(e){var t={time:Op(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function sQ(e){e.bc.close(),e.subFns=[]}function aQ(e,t){try{return e.bc.postMessage(t,!1),$s}catch(n){return Promise.reject(n)}}function lQ(e,t){e.messagesCallback=t}function cQ(){if(typeof globalThis<"u"&&globalThis.Deno&&globalThis.Deno.args)return!0;if((typeof window<"u"||typeof self<"u")&&typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function uQ(){return 150}var dQ={create:oQ,close:sQ,onMessage:lQ,postMessage:aQ,canBeUsed:cQ,type:iQ,averageResponseTime:uQ,microSeconds:rQ};function SS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var fQ=Op,pQ="pubkey.broadcast-channel-0-",Vs="messages",ny={durability:"relaxed"},hQ="idb";function NL(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function _S(e){e.commit&&e.commit()}function mQ(e){var t=NL(),n=pQ+e,r=t.open(n);return r.onupgradeneeded=function(i){var o=i.target.result;o.createObjectStore(Vs,{keyPath:"id",autoIncrement:!0})},new Promise(function(i,o){r.onerror=function(s){return o(s)},r.onsuccess=function(){i(r.result)}})}function gQ(e,t,n){var r=Date.now(),i={uuid:t,time:r,data:n},o=e.transaction([Vs],"readwrite",ny);return new Promise(function(s,a){o.oncomplete=function(){return s()},o.onerror=function(c){return a(c)};var l=o.objectStore(Vs);l.add(i),_S(o)})}function vQ(e,t){var n=e.transaction(Vs,"readonly",ny),r=n.objectStore(Vs),i=[],o=IDBKeyRange.bound(t+1,1/0);if(r.getAll){var s=r.getAll(o);return new Promise(function(l,c){s.onerror=function(u){return c(u)},s.onsuccess=function(u){l(u.target.result)}})}function a(){try{return o=IDBKeyRange.bound(t+1,1/0),r.openCursor(o)}catch{return r.openCursor()}}return new Promise(function(l,c){var u=a();u.onerror=function(d){return c(d)},u.onsuccess=function(d){var f=d.target.result;f?f.value.ide.lastCursorId&&(e.lastCursorId=r.id),r}).filter(function(r){return SQ(r,e)}).sort(function(r,i){return r.time-i.time});return n.forEach(function(r){e.messagesCallback&&(e.eMIs.add(r.id),e.messagesCallback(r.data))}),$s})}function _Q(e){e.closed=!0,e.db.close()}function CQ(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return gQ(e.db,e.uuid,t)}).then(function(){tQ(0,10)===0&&wQ(e)}),e.writeBlockPromise}function kQ(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,AL(e)}function EQ(){return!!NL()}function RQ(e){return e.idb.fallbackInterval*2}var PQ={create:xQ,close:_Q,onMessage:kQ,postMessage:CQ,canBeUsed:EQ,type:hQ,averageResponseTime:RQ,microSeconds:fQ},TQ=Op,OQ="pubkey.broadcastChannel-",jQ="localstorage";function DL(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function BL(e){return OQ+e}function LQ(e,t){return new Promise(function(n){Tl().then(function(){var r=BL(e.channelName),i={token:Tp(),time:Date.now(),data:t,uuid:e.uuid},o=JSON.stringify(i);DL().setItem(r,o);var s=document.createEvent("Event");s.initEvent("storage",!0,!0),s.key=r,s.newValue=o,window.dispatchEvent(s),n()})})}function IQ(e,t){var n=BL(e),r=function(o){o.key===n&&t(JSON.parse(o.newValue))};return window.addEventListener("storage",r),r}function MQ(e){window.removeEventListener("storage",e)}function NQ(e,t){if(t=SS(t),!FL())throw new Error("BroadcastChannel: localstorage cannot be used");var n=Tp(),r=new wS(t.localstorage.removeTimeout),i={channelName:e,uuid:n,eMIs:r};return i.listener=IQ(e,function(o){i.messagesCallback&&o.uuid!==n&&(!o.token||r.has(o.token)||o.data.time&&o.data.time0||e._addEL.internal.length>0}function NE(e,t,n){e._addEL[t].push(n),XQ(e)}function $E(e,t,n){e._addEL[t]=e._addEL[t].filter(function(r){return r!==n}),JQ(e)}function XQ(e){if(!e._iL&&GL(e)){var t=function(i){e._addEL[i.type].forEach(function(o){i.time>=o.time&&o.fn(i.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function JQ(e){if(e._iL&&!GL(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}function ZQ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var HL={exports:{}},$n=HL.exports={},Ko,qo;function M1(){throw new Error("setTimeout has not been defined")}function N1(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ko=setTimeout:Ko=M1}catch{Ko=M1}try{typeof clearTimeout=="function"?qo=clearTimeout:qo=N1}catch{qo=N1}})();function VL(e){if(Ko===setTimeout)return setTimeout(e,0);if((Ko===M1||!Ko)&&setTimeout)return Ko=setTimeout,setTimeout(e,0);try{return Ko(e,0)}catch{try{return Ko.call(null,e,0)}catch{return Ko.call(this,e,0)}}}function eX(e){if(qo===clearTimeout)return clearTimeout(e);if((qo===N1||!qo)&&clearTimeout)return qo=clearTimeout,clearTimeout(e);try{return qo(e)}catch{try{return qo.call(null,e)}catch{return qo.call(this,e)}}}var Ps=[],hu=!1,Ol,om=-1;function tX(){!hu||!Ol||(hu=!1,Ol.length?Ps=Ol.concat(Ps):om=-1,Ps.length&&KL())}function KL(){if(!hu){var e=VL(tX);hu=!0;for(var t=Ps.length;t;){for(Ol=Ps,Ps=[];++om1)for(var n=1;n0)})},awaitLeadership:function(){var t=this;if(!this._wLMP){this._wKMC.c=new AbortController;var n=new Promise(function(r,i){t._wKMC.res=r,t._wKMC.rej=i});this._wLMP=new Promise(function(r){navigator.locks.request(t.lN,{signal:t._wKMC.c.signal},function(){return t._wKMC.c=void 0,YL(t),r(),n}).catch(function(){})})}return this._wLMP},set onduplicate(e){},die:function(){var t=this;return this._lstns.forEach(function(n){return t.broadcastChannel.removeEventListener("internal",n)}),this._lstns=[],this._unl.forEach(function(n){return n.remove()}),this._unl=[],this.isLeader&&(this.isLeader=!1),this.isDead=!0,this._wKMC.res&&this._wKMC.res(),this._wKMC.c&&this._wKMC.c.abort("LeaderElectionWebLock.die() called"),Dl(this,"death")}};var XL=function(t,n){var r=this;this.broadcastChannel=t,this._options=n,this.isLeader=!1,this._hasLeader=!1,this.isDead=!1,this.token=Tp(),this._aplQ=$s,this._aplQC=0,this._unl=[],this._lstns=[],this._dpL=function(){},this._dpLC=!1;var i=function(s){s.context==="leader"&&(s.action==="death"&&(r._hasLeader=!1),s.action==="tell"&&(r._hasLeader=!0))};this.broadcastChannel.addEventListener("internal",i),this._lstns.push(i)};XL.prototype={hasLeader:function(){return Promise.resolve(this._hasLeader)},applyOnce:function(t){var n=this;if(this.isLeader)return Tl(0,!0);if(this.isDead)return Tl(0,!1);if(this._aplQC>1)return this._aplQ;var r=function(){if(n.isLeader)return eQ;var o=!1,s,a=new Promise(function(u){s=function(){o=!0,u()}}),l=function(d){d.context==="leader"&&d.token!=n.token&&(d.action==="apply"&&d.token>n.token&&s(),d.action==="tell"&&(s(),n._hasLeader=!0))};n.broadcastChannel.addEventListener("internal",l);var c=t?n._options.responseTime*4:n._options.responseTime;return Dl(n,"apply").then(function(){return Promise.race([Tl(c),a.then(function(){return Promise.reject(new Error)})])}).then(function(){return Dl(n,"apply")}).then(function(){return Promise.race([Tl(c),a.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return n.broadcastChannel.removeEventListener("internal",l),o?!1:YL(n).then(function(){return!0})})};return this._aplQC=this._aplQC+1,this._aplQ=this._aplQ.then(function(){return r()}).then(function(){n._aplQC=n._aplQC-1}),this._aplQ.then(function(){return n.isLeader})},awaitLeadership:function(){return this._aLP||(this._aLP=uX(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(n){return t.broadcastChannel.removeEventListener("internal",n)}),this._lstns=[],this._unl.forEach(function(n){return n.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,Dl(this,"death")}};function uX(e){return e.isLeader?$s:new Promise(function(t){var n=!1;function r(){n||(n=!0,e.broadcastChannel.removeEventListener("internal",o),t(!0))}e.applyOnce().then(function(){e.isLeader&&r()});var i=function s(){return Tl(e._options.fallbackInterval).then(function(){if(!(e.isDead||n))if(e.isLeader)r();else return e.applyOnce(!0).then(function(){e.isLeader?r():s()})})};i();var o=function(a){a.context==="leader"&&a.action==="death"&&(e._hasLeader=!1,e.applyOnce().then(function(){e.isLeader&&r()}))};e.broadcastChannel.addEventListener("internal",o),e._lstns.push(o)})}function dX(e,t){return e||(e={}),e=JSON.parse(JSON.stringify(e)),e.fallbackInterval||(e.fallbackInterval=3e3),e.responseTime||(e.responseTime=t.method.averageResponseTime(t.options)),e}function fX(e,t){if(e._leaderElector)throw new Error("BroadcastChannel already has a leader-elector");t=dX(t,e);var n=nQ()?new QL(e,t):new XL(e,t);return e._befC.push(function(){return n.die()}),e._leaderElector=n,n}var og=new Map;function JL(e,t,n,r){var i=og.get(t);return i||(i={bc:new kS(["RxDB:",e,n].join("|")),refs:new Set},og.set(t,i)),i.refs.add(r),i.bc}function $1(e,t){var n=og.get(e);if(n&&(n.refs.delete(t),n.refs.size===0))return og.delete(e),n.bc.close()}function pX(e,t,n,r){if(t.multiInstance){var i=JL(e,t.databaseInstanceToken,n.databaseName,n),o=new Tn,s=f=>{f.storageName===e&&f.databaseName===t.databaseName&&f.collectionName===t.collectionName&&f.version===t.schema.version&&o.next(f.eventBulk)};i.addEventListener("message",s);var a=n.changeStream(),l=!1,c=a.subscribe(f=>{l||i.postMessage({storageName:e,databaseName:t.databaseName,collectionName:t.collectionName,version:t.schema.version,eventBulk:f})});n.changeStream=function(){return o.asObservable().pipe(MV(a))};var u=n.close.bind(n);n.close=async function(){return l=!0,c.unsubscribe(),i.removeEventListener("message",s),await $1(t.databaseInstanceToken,n),u()};var d=n.remove.bind(n);n.remove=async function(){return l=!0,c.unsubscribe(),i.removeEventListener("message",s),await $1(t.databaseInstanceToken,n),d()}}}var ZL={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Sr,function(){var n=function(p,x){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,j){T.__proto__=j}||function(T,j){for(var M in j)Object.prototype.hasOwnProperty.call(j,M)&&(T[M]=j[M])})(p,x)},r=function(){return(r=Object.assign||function(p){for(var x,T=1,j=arguments.length;T"u"||o.Promise||(o.Promise=Promise);var c=Object.getPrototypeOf,u={}.hasOwnProperty;function d(p,x){return u.call(p,x)}function f(p,x){typeof x=="function"&&(x=x(c(p))),(typeof Reflect>"u"?s:Reflect.ownKeys)(x).forEach(function(T){h(p,T,x[T])})}var m=Object.defineProperty;function h(p,x,T,j){m(p,x,l(T&&d(T,"get")&&typeof T.get=="function"?{get:T.get,set:T.set,configurable:!0}:{value:T,configurable:!0,writable:!0},j))}function g(p){return{from:function(x){return p.prototype=Object.create(x.prototype),h(p.prototype,"constructor",p),{extend:f.bind(null,p.prototype)}}}}var E=Object.getOwnPropertyDescriptor,b=[].slice;function w(p,x,T){return b.call(p,x,T)}function y(p,x){return x(p)}function _(p){if(!p)throw new Error("Assertion Failed")}function k(p){o.setImmediate?setImmediate(p):setTimeout(p,0)}function R(p,x){if(typeof x=="string"&&d(p,x))return p[x];if(!x)return p;if(typeof x!="string"){for(var T=[],j=0,M=x.length;j"u"?[]:function(){var p=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[p,c(p),p];var x=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[x,c(x),p]}(),pe=go[0],zi=go[1],go=go[2],zi=zi&&zi.then,Fe=pe&&pe.constructor,rt=!!go,Xe=function(p,x){Yt.push([p,x]),et&&(queueMicrotask(tl),et=!1)},Oe=!0,et=!0,Rt=[],tn=[],qe=Ze,bt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ze,pgp:!1,env:{},finalize:ze},Me=bt,Yt=[],An=0,dr=[];function We(p){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var x=this._PSD=Me;if(typeof p!="function"){if(p!==q)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&er(this,this._value))}this._state=null,this._value=null,++x.ref,function T(j,M){try{M(function(B){if(j._state===null){if(B===j)throw new TypeError("A promise cannot be resolved with itself.");var G=j._lib&&di();B&&typeof B.then=="function"?T(j,function(Y,re){B instanceof We?B._then(Y,re):B.then(Y,re)}):(j._state=!0,j._value=B,po(j)),G&&Rr()}},er.bind(null,j))}catch(B){er(j,B)}}(this,p)}var Bi={get:function(){var p=Me,x=$e;function T(j,M){var B=this,G=!p.global&&(p!==Me||x!==$e),Y=G&&!vt(),re=new We(function(te,ue){zo(B,new Fi(Je(j,p,G,Y),Je(M,p,G,Y),te,ue,p))});return this._consoleTask&&(re._consoleTask=this._consoleTask),re}return T.prototype=q,T},set:function(p){h(this,"then",p&&p.prototype===q?Bi:{get:function(){return p},set:Bi.set})}};function Fi(p,x,T,j,M){this.onFulfilled=typeof p=="function"?p:null,this.onRejected=typeof x=="function"?x:null,this.resolve=T,this.reject=j,this.psd=M}function er(p,x){var T,j;tn.push(x),p._state===null&&(T=p._lib&&di(),x=qe(x),p._state=!1,p._value=x,j=p,Rt.some(function(M){return M._value===j._value})||Rt.push(j),po(p),T&&Rr())}function po(p){var x=p._listeners;p._listeners=[];for(var T=0,j=x.length;T.",ho="String expected.",Or=[],fi="__dbnames",pr="readonly",mo="readwrite";function tr(p,x){return p?x?function(){return p.apply(this,arguments)&&x.apply(this,arguments)}:p:x}var hs={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function St(p){return typeof p!="string"||/\./.test(p)?function(x){return x}:function(x){return x[p]===void 0&&p in x&&delete(x=z(x))[p],x}}function an(){throw Te.Type()}function Ct(p,x){try{var T=Ht(p),j=Ht(x);if(T!==j)return T==="Array"?1:j==="Array"?-1:T==="binary"?1:j==="binary"?-1:T==="string"?1:j==="string"?-1:T==="Date"?1:j!=="Date"?NaN:-1;switch(T){case"number":case"Date":case"string":return xbe+xe&&ve(be+de)})})}var ye=na(T)&&T.limit===1/0&&(typeof p!="function"||p===vo)&&{index:T.index,range:T.range};return ve(0).then(function(){if(0=de})).length!==0?(ue.forEach(function(ve){fe.push(function(){var ye=oe,be=ve._cfg.dbschema;Bp(J,ye,ae),Bp(J,be,ae),oe=J._dbSchema=be;var xe=vc(ye,be);xe.add.forEach(function(Qe){yc(ae,Qe[0],Qe[1].primKey,Qe[1].indexes)}),xe.change.forEach(function(Qe){if(Qe.recreate)throw new Te.Upgrade("Not yet support for changing primary key");var He=ae.objectStore(Qe.name);Qe.add.forEach(function(Et){return sa(He,Et)}),Qe.change.forEach(function(Et){He.deleteIndex(Et.name),sa(He,Et)}),Qe.del.forEach(function(Et){return He.deleteIndex(Et)})});var Re=ve._cfg.contentUpgrade;if(Re&&ve._cfg.version>de){Cn(J,ae),ne._memoizedTables={};var Ye=I(be);xe.del.forEach(function(Qe){Ye[Qe]=ye[Qe]}),mi(J,[J.Transaction.prototype]),Gn(J,[J.Transaction.prototype],s(Ye),Ye),ne.schema=Ye;var Be,Ke=je(Re);return Ke&&Ae(),xe=We.follow(function(){var Qe;(Be=Re(ne))&&Ke&&(Qe=vt.bind(null,null),Be.then(Qe,Qe))}),Be&&typeof Be.then=="function"?We.resolve(Be):xe.then(function(){return Be})}}),fe.push(function(ye){var be,xe,Re=ve._cfg.dbschema;be=Re,xe=ye,[].slice.call(xe.db.objectStoreNames).forEach(function(Ye){return be[Ye]==null&&xe.db.deleteObjectStore(Ye)}),mi(J,[J.Transaction.prototype]),Gn(J,[J.Transaction.prototype],J._storeNames,J._dbSchema),ne.schema=J._dbSchema}),fe.push(function(ye){J.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(J.idbdb.version/10)===ve._cfg.version?(J.idbdb.deleteObjectStore("$meta"),delete J._dbSchema.$meta,J._storeNames=J._storeNames.filter(function(be){return be!=="$meta"})):ye.objectStore("$meta").put(ve._cfg.version,"version"))})}),function ve(){return fe.length?We.resolve(fe.shift()(ne.idbtrans)).then(ve):We.resolve()}().then(function(){ld(oe,ae)})):We.resolve();var J,de,ne,ae,fe,oe}).catch(G)):(s(M).forEach(function(ue){yc(T,ue,M[ue].primKey,M[ue].indexes)}),Cn(p,T),void We.follow(function(){return p.on.populate.fire(B)}).catch(G));var re,te})}function oa(p,x){ld(p._dbSchema,x),x.db.version%10!=0||x.objectStoreNames.contains("$meta")||x.db.createObjectStore("$meta").add(Math.ceil(x.db.version/10-1),"version");var T=ys(0,p.idbdb,x);Bp(p,p._dbSchema,x);for(var j=0,M=vc(T,p._dbSchema).change;jMath.pow(2,62)?0:oe.oldVersion,J=oe<1,p.idbdb=fe.result,B&&oa(p,ue),Dp(p,oe/10,ue,ne))},ne),fe.onsuccess=zt(function(){ue=null;var oe,ve,ye,be,xe,Re=p.idbdb=fe.result,Ye=w(Re.objectStoreNames);if(0"u"?We.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(de){function ne(){return indexedDB.databases().finally(de)}re=setInterval(ne,100),ne()}).finally(function(){return clearInterval(re)}):Promise.resolve()).then(Y)]).then(function(){return G(),x.onReadyBeingFired=[],We.resolve(hy(function(){return p.on.ready.fire(p.vip)})).then(function de(){if(0x.limit?de.length=x.limit:p.length===x.limit&&de.length=ve.limit&&(!ve.values||Re.req.values)&&EM(Re.req.query.range,ve.query.range)}),!1,ye,be];case"count":return xe=be.find(function(Re){return n_(Re.req.query.range,ve.query.range)}),[xe,!!xe,ye,be]}}(x,T,"query",B),ue=te[0],J=te[1],de=te[2],ne=te[3];return ue&&J?ue.obsSet=B.obsSet:(J=j.query(B).then(function(ae){var fe=ae.result;if(ue&&(ue.res=fe),G){for(var oe=0,ve=fe.length;oe{var s=(async()=>{var a=on(n);a.autoOpen=!1;var l=new D1(i,a),c={[sg]:bX(r),[mX]:"++sequence, id",[BE]:"id"};return l.version(1).stores(c),await l.open(),{dexieDb:l,dexieTable:l[sg],dexieAttachmentsTable:l[BE],booleanIndexes:wX(r)}})();return FE.set(i,o),sm.set(o,0),s});return o}async function vX(e){var t=await e,n=sm.get(e),r=n-1;r===0?(t.dexieDb.close(),sm.delete(e)):sm.set(e,r)}var B1="__";function jp(e){var t=e.split(".");if(t.length>1)return t.map(r=>jp(r)).join(".");if(e.startsWith("|")){var n=e.substring(1);return B1+n}else return e}function tI(e){var t=e.split(".");if(t.length>1)return t.map(r=>tI(r)).join(".");if(e.startsWith(B1)){var n=e.substring(B1.length);return"|"+n}else return e}function yX(e,t){return t&&(t=on(t),t=F1(t),e.forEach(n=>{var r=Ua(t,n),i=r?"1":"0";bj(t,n,i)}),t)}function nI(e,t){return t&&(t=on(t),t=z1(t),e.forEach(n=>{var r=Ua(t,n),i=r==="1";bj(t,n,i)}),t)}function F1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(n=>F1(n));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([n,r])=>{typeof r=="object"&&(r=F1(r)),t[jp(n)]=r}),t}}function z1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(n=>z1(n));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([n,r])=>{(typeof r=="object"||Array.isArray(e))&&(r=z1(r)),t[tI(n)]=r}),t}}function bX(e){var t=[],n=$i(e.primaryKey);t.push([n]),t.push(["_deleted",n]),e.indexes&&e.indexes.forEach(o=>{var s=qf(o);t.push(s)}),t.push(["_meta.lwt",n]),t.push(["_meta.lwt"]),t=t.map(o=>o.map(s=>jp(s)));var r=t.map(o=>o.length===1?o[0]:"["+o.join("+")+"]");r=r.filter((o,s,a)=>a.indexOf(o)===s);var i=r.join(", ");return i}async function zE(e,t){var n=await e,r=await n.dexieTable.bulkGet(t);return r.map(i=>nI(n.booleanIndexes,i))}function Ch(e,t){return e+"||"+t}function wX(e){var t=new Set,n=[];return e.indexes?(e.indexes.forEach(r=>{var i=qf(r);i.forEach(o=>{if(!t.has(o)){t.add(o);var s=Nu(e,o);s.type==="boolean"&&n.push(o)}})}),n.push("_deleted"),tH(n)):n}function UE(e){return e===pu?-1/0:e}function WE(e,t,n){if(e.includes(t)){var r=n===fu||n===!0?"1":"0";return r}else return n}function rI(e,t,n){if(!n){if(typeof window>"u")throw new Error("IDBKeyRange missing");n=window.IDBKeyRange}var r=t.startKeys.map((s,a)=>{var l=t.index[a];return WE(e,l,s)}).map(UE),i=t.endKeys.map((s,a)=>{var l=t.index[a];return WE(e,l,s)}).map(UE),o=n.bound(r,i,!t.inclusiveStart,!t.inclusiveEnd);return o}async function GE(e,t){var n=await e.internals,r=t.query,i=r.skip?r.skip:0,o=r.limit?r.limit:1/0,s=i+o,a=t.queryPlan,l=!1;a.selectorSatisfiedByIndex||(l=mS(e.schema,t.query));var c=rI(n.booleanIndexes,a,n.dexieDb._options.IDBKeyRange),u=a.index,d=[];if(await n.dexieDb.transaction("r",n.dexieTable,async m=>{var h=m.idbtrans,g=h.objectStore(sg),E,b;b="["+u.map(y=>jp(y)).join("+")+"]",E=g.index(b);var w=E.openCursor(c);await new Promise(y=>{w.onsuccess=function(_){var k=_.target.result;if(k){var R=nI(n.booleanIndexes,k.value);(!l||l(R))&&d.push(R),a.sortSatisfiedByIndex&&d.length===s?y():k.continue()}else y()}})}),!a.sortSatisfiedByIndex){var f=fL(e.schema,t.query);d=d.sort(f)}return d=d.slice(i,s),{documents:d}}async function xX(e,t){var n=await e.internals,r=t.queryPlan,i=r.index,o=rI(n.booleanIndexes,r,n.dexieDb._options.IDBKeyRange),s=-1;return await n.dexieDb.transaction("r",n.dexieTable,async a=>{var l=a.idbtrans,c=l.objectStore(sg),u,d;d="["+i.map(m=>jp(m)).join("+")+"]",u=c.index(d);var f=u.count(o);s=await new Promise((m,h)=>{f.onsuccess=function(){m(f.result)},f.onerror=g=>h(g)})}),s}var SX=ar(),A0=!1,_X=function(){function e(n,r,i,o,s,a,l,c){this.changes$=new Tn,this.instanceId=SX++,this.storage=n,this.databaseName=r,this.collectionName=i,this.schema=o,this.internals=s,this.options=a,this.settings=l,this.devMode=c,this.primaryPath=$i(this.schema.primaryKey)}var t=e.prototype;return t.bulkWrite=async function(r,i){pl(this),!A0&&(!_0.premium||typeof _0.premium!="string"||await hj(_0.premium)!==kH)&&console.warn(["-------------- RxDB Open Core RxStorage -------------------------------","You are using the free Dexie.js based RxStorage implementation from RxDB https://rxdb.info/rx-storage-dexie.html?console=dexie ","While this is a great option, we want to let you know that there are faster storage solutions available in our premium plugins.","For professional users and production environments, we highly recommend considering these premium options to enhance performance and reliability."," https://rxdb.info/premium?console=dexie ","If you already purchased premium access you can disable this log by calling the setPremiumFlag() function from rxdb-premium/plugins/shared.","---------------------------------------------------------------------"].join(` -`)),A0=!0,r.forEach(u=>{if(!u.document._rev||u.previous&&!u.previous._rev)throw ot("SNH",{args:{row:u}})});var o=await this.internals,s={error:[]};this.devMode&&(r=r.map(u=>{var d=Pp(u.document);return{previous:u.previous,document:d}}));var a=r.map(u=>u.document[this.primaryPath]),l;if(await o.dexieDb.transaction("rw",o.dexieTable,o.dexieAttachmentsTable,async()=>{var u=new Map,d=await zE(this.internals,a);d.forEach(h=>{var g=h;return g&&u.set(g[this.primaryPath],g),g}),l=uY(this,this.primaryPath,u,r,i),s.error=l.errors;var f=[];l.bulkInsertDocs.forEach(h=>{f.push(h.document)}),l.bulkUpdateDocs.forEach(h=>{f.push(h.document)}),f=f.map(h=>yX(o.booleanIndexes,h)),f.length>0&&await o.dexieTable.bulkPut(f);var m=[];l.attachmentsAdd.forEach(h=>{m.push({id:Ch(h.documentId,h.attachmentId),data:h.attachmentData.data})}),l.attachmentsUpdate.forEach(h=>{m.push({id:Ch(h.documentId,h.attachmentId),data:h.attachmentData.data})}),await o.dexieAttachmentsTable.bulkPut(m),await o.dexieAttachmentsTable.bulkDelete(l.attachmentsRemove.map(h=>Ch(h.documentId,h.attachmentId)))}),l=xt(l),l.eventBulk.events.length>0){var c=xt(l.newestRow).document;l.eventBulk.checkpoint={id:c[this.primaryPath],lwt:c._meta.lwt},l.eventBulk.endTime=ar(),this.changes$.next(l.eventBulk)}return s},t.findDocumentsById=async function(r,i){pl(this);var o=await this.internals,s=[];return await o.dexieDb.transaction("r",o.dexieTable,async()=>{var a=await zE(this.internals,r);a.forEach(l=>{l&&(!l._deleted||i)&&s.push(l)})}),s},t.query=function(r){return pl(this),GE(this,r)},t.count=async function(r){if(r.queryPlan.selectorSatisfiedByIndex){var i=await xX(this,r);return{count:i,mode:"fast"}}else{var o=await GE(this,r);return{count:o.documents.length,mode:"slow"}}},t.changeStream=function(){return pl(this),this.changes$.asObservable()},t.cleanup=async function(r){pl(this);var i=await this.internals;return await i.dexieDb.transaction("rw",i.dexieTable,async()=>{var o=ar()-r,s=await i.dexieTable.where("_meta.lwt").below(o).toArray(),a=[];s.forEach(l=>{l._deleted==="1"&&a.push(l[this.primaryPath])}),await i.dexieTable.bulkDelete(a)}),!0},t.getAttachmentData=async function(r,i,o){pl(this);var s=await this.internals,a=Ch(r,i);return await s.dexieDb.transaction("r",s.dexieAttachmentsTable,async()=>{var l=await s.dexieAttachmentsTable.get(a);if(l)return l.data;throw new Error("attachment missing documentId: "+r+" attachmentId: "+i)})},t.remove=async function(){pl(this);var r=await this.internals;return await r.dexieTable.clear(),this.close()},t.close=function(){return this.closed?this.closed:(this.closed=(async()=>{this.changes$.complete(),await vX(this.internals)})(),this.closed)},t.conflictResultionTasks=function(){return new Tn},t.resolveConflictResultionTask=async function(r){},e}();async function CX(e,t,n){var r=gX(t.databaseName,t.collectionName,n,t.schema),i=new _X(e,t.databaseName,t.collectionName,t.schema,r,t.options,n,t.devMode);return await pX(eI,t,i),Promise.resolve(i)}function pl(e){if(e.closed)throw new Error("RxStorageInstanceDexie is closed "+e.databaseName+"-"+e.collectionName)}var kX=function(){function e(n){this.name=eI,this.rxdbVersion=wj,this.settings=n}var t=e.prototype;return t.createStorageInstance=function(r){return pY(r),CX(this,r,this.settings)},e}();function EX(e={}){var t=new kX(e);return t}var ES={minimumDeletedTime:1e3*60*60*24*31,minimumCollectionAge:1e3*60,runEach:1e3*60*5,awaitReplicationsInSync:!0,waitForLeadership:!0},iI=new WeakMap,RX=new WeakMap;function HE(e){return Gs(RX,e,()=>fX(e))}function PX(){var e=JL(this.storage.name,this.token,this.name,this),t=this.destroy.bind(this);this.destroy=function(){return $1(this.token,this),t()};var n=HE(e);return n||(n=HE(e),iI.set(this,n)),this.leaderElector=()=>n,n}function TX(){return this.multiInstance?this.leaderElector().isLeader:!0}function OX(){return this.multiInstance?this.leaderElector().awaitLeadership().then(()=>!0):Wv}function jX(e){var t=iI.get(e);t&&t.die()}var LX=!0,IX={RxDatabase:e=>{e.leaderElector=PX,e.isLeader=TX,e.waitForLeadership=OX}},RS={name:"leader-election",rxdb:LX,prototypes:IX,hooks:{preDestroyRxDatabase:{after:jX}}},VE=e=>Promise.resolve(e);function KE(e,t){if(e==="_deleted")return t;t=on(t);var n=!!t._deleted;return t[e]=n,delete t._deleted,t}function D0(e,t,n){return n.map(r=>{var i=on(r);if(t!=="_deleted"){var o=!!i[t];i._deleted=o,delete i[t]}else i._deleted=!!i._deleted;var s=e.schema.primaryPath;return i[s]=Za(e.schema.jsonSchema,i),i})}function qE(e,t){if(typeof window>"u"||typeof window!="object"||typeof window.addEventListener>"u"||navigator.onLine)return e.promiseWait(t);var n,r=new Promise(i=>{n=()=>{window.removeEventListener("online",n),i()},window.addEventListener("online",n)});return Promise.race([r,e.promiseWait(t)]).then(()=>{window.removeEventListener("online",n)})}var PS=new WeakMap,MX=function(){function e(n,r,i,o,s,a,l,c){this.subs=[],this.subjects={received:new Tn,sent:new Tn,error:new Tn,canceled:new ks(!1),active:new ks(!1)},this.received$=this.subjects.received.asObservable(),this.sent$=this.subjects.sent.asObservable(),this.error$=this.subjects.error.asObservable(),this.canceled$=this.subjects.canceled.asObservable(),this.active$=this.subjects.active.asObservable(),this.onCancel=[],this.callOnStart=void 0,this.remoteEvents$=new Tn,this.replicationIdentifier=n,this.collection=r,this.deletedField=i,this.pull=o,this.push=s,this.live=a,this.retryTime=l,this.autoStart=c,this.metaInfoPromise=(async()=>{var f="rx-replication-meta-"+await r.database.hashFunction([this.collection.name,this.replicationIdentifier].join("-")),m=MY(this.collection.schema.jsonSchema,bL(this.collection.schema.jsonSchema));return{collectionName:f,schema:m}})();var u=Gs(PS,r,()=>[]);u.push(this),this.collection.onDestroy.push(()=>this.cancel()),Object.keys(this.subjects).forEach(f=>{Object.defineProperty(this,f+"$",{get:function(){return this.subjects[f].asObservable()}})});var d=new Promise(f=>{this.callOnStart=f});this.startPromise=d}var t=e.prototype;return t.start=async function(){if(!this.isStopped()){var r=this.pull&&this.pull.modifier?this.pull.modifier:VE,i=this.push&&this.push.modifier?this.push.modifier:VE,o=this.collection.database,s=await this.metaInfoPromise,[a]=await Promise.all([this.collection.database.storage.createStorageInstance({databaseName:o.name,collectionName:s.collectionName,databaseInstanceToken:o.token,multiInstance:o.multiInstance,options:{},schema:s.schema,password:o.password,devMode:bn.isDevMode()}),SY(this.collection,s.collectionName,s.schema)]);this.metaInstance=a,this.internalReplicationState=DY({pushBatchSize:this.push&&this.push.batchSize?this.push.batchSize:100,pullBatchSize:this.pull&&this.pull.batchSize?this.pull.batchSize:100,initialCheckpoint:{upstream:this.push?this.push.initialCheckpoint:void 0,downstream:this.pull?this.pull.initialCheckpoint:void 0},forkInstance:this.collection.storageInstance,metaInstance:this.metaInstance,hashFunction:o.hashFunction,identifier:"rxdbreplication"+this.replicationIdentifier,conflictHandler:this.collection.conflictHandler,replicationHandler:{masterChangeStream$:this.remoteEvents$.asObservable().pipe(Gt(l=>!!this.pull),ls(async l=>{if(l==="RESYNC")return l;var c=on(l);return c.documents=D0(this.collection,this.deletedField,c.documents),c.documents=await Promise.all(c.documents.map(u=>r(u))),c})),masterChangesSince:async(l,c)=>{if(!this.pull)return{checkpoint:null,documents:[]};for(var u=!1,d={};!u&&!this.isStopped();)try{d=await this.pull.handler(l,c),u=!0}catch(h){var f=ot("RC_PULL",{checkpoint:l,errors:qf(h).map(g=>Qk(g)),direction:"pull"});this.subjects.error.next(f),await qE(this.collection,xt(this.retryTime))}if(this.isStopped())return{checkpoint:null,documents:[]};var m=on(d);return m.documents=D0(this.collection,this.deletedField,m.documents),m.documents=await Promise.all(m.documents.map(h=>r(h))),m},masterWrite:async l=>{if(!this.push)return[];var c=!1;await Ql("preReplicationMasterWrite",{rows:l,collection:this.collection});var u=await Promise.all(l.map(async g=>(g.newDocumentState=await i(g.newDocumentState),g.newDocumentState===null?null:(g.assumedMasterState&&(g.assumedMasterState=await i(g.assumedMasterState)),this.deletedField!=="_deleted"&&(g.newDocumentState=KE(this.deletedField,g.newDocumentState),g.assumedMasterState&&(g.assumedMasterState=KE(this.deletedField,g.assumedMasterState))),g)))),d=u.filter(pj),f=null;for(d.length===0&&(c=!0,f=[]);!c&&!this.isStopped();)try{if(f=await this.push.handler(d),!Array.isArray(f))throw ot("RC_PUSH_NO_AR",{pushRows:l,direction:"push",args:{result:f}});c=!0}catch(g){var m=g.rxdb?g:ot("RC_PUSH",{pushRows:l,errors:qf(g).map(E=>Qk(E)),direction:"push"});this.subjects.error.next(m),await qE(this.collection,xt(this.retryTime))}if(this.isStopped())return[];await Ql("preReplicationMasterWriteDocumentsHandle",{result:f,collection:this.collection});var h=D0(this.collection,this.deletedField,xt(f));return h}}}),this.subs.push(this.internalReplicationState.events.error.subscribe(l=>{this.subjects.error.next(l)}),this.internalReplicationState.events.processed.down.subscribe(l=>this.subjects.received.next(l.document)),this.internalReplicationState.events.processed.up.subscribe(l=>{this.subjects.sent.next(l.newDocumentState)}),Kj([this.internalReplicationState.events.active.down,this.internalReplicationState.events.active.up]).subscribe(([l,c])=>{var u=l||c;this.subjects.active.next(u)})),this.pull&&this.pull.stream$&&this.live&&this.subs.push(this.pull.stream$.subscribe({next:l=>{this.remoteEvents$.next(l)},error:l=>{this.subjects.error.next(l)}})),this.live||(await I0(this.internalReplicationState),await TE(this.internalReplicationState),await this.cancel()),this.callOnStart()}},t.isStopped=function(){return!!this.subjects.canceled.getValue()},t.awaitInitialReplication=async function(){return await this.startPromise,I0(xt(this.internalReplicationState))},t.awaitInSync=async function(){await this.startPromise,await I0(xt(this.internalReplicationState));for(var r=2;r>0;)r--,await this.collection.database.requestIdlePromise(),await TE(xt(this.internalReplicationState));return!0},t.reSync=function(){this.remoteEvents$.next("RESYNC")},t.emitEvent=function(r){this.remoteEvents$.next(r)},t.cancel=async function(){if(this.isStopped())return Po;var r=this.onCancel.map(i=>yH(i()));return this.internalReplicationState&&await FY(this.internalReplicationState),this.metaInstance&&r.push(xt(this.internalReplicationState).checkpointQueue.then(()=>xt(this.metaInstance).close())),this.subs.forEach(i=>i.unsubscribe()),this.subjects.canceled.next(!0),this.subjects.active.complete(),this.subjects.canceled.complete(),this.subjects.error.complete(),this.subjects.received.complete(),this.subjects.sent.complete(),Promise.all(r)},t.remove=async function(){await xt(this.metaInstance).remove();var r=await this.metaInfoPromise;await this.cancel(),await _Y(this.collection,r.collectionName,r.schema)},e}();function NX({replicationIdentifier:e,collection:t,deletedField:n="_deleted",pull:r,push:i,live:o=!0,retryTime:s=1e3*5,waitForLeadership:a=!0,autoStart:l=!0}){if(Zu(RS),!r&&!i)throw ot("UT3",{collection:t.name,args:{replicationIdentifier:e}});var c=new MX(e,t,n,r,i,o,s,l);return $X(a,c),c}function $X(e,t){var n=e&&t.collection.database.multiInstance,r=n?t.collection.database.waitForLeadership():Wv;return r.then(()=>{t.isStopped()||t.autoStart&&t.start()})}var B0=Wv;async function AX(e){var t=e.database,n=Object.assign({},ES,t.cleanupPolicy?t.cleanupPolicy:{});await oI(e,n),!e.destroyed&&(await sI(e,n),await DX(e,n))}async function oI(e,t){await e.promiseWait(t.minimumCollectionAge),!e.destroyed&&t.waitForLeadership&&await e.database.waitForLeadership()}async function sI(e,t){for(var n=e.database,r=e.storageInstance,i=!1;!i&&!e.destroyed;){if(t.awaitReplicationsInSync){var o=PS.get(e);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(e.destroyed)return;B0=B0.then(async()=>e.destroyed?!0:(await n.requestIdlePromise(),r.cleanup(t.minimumDeletedTime))),i=await B0}}async function DX(e,t){for(;!e.destroyed;){if(await e.promiseWait(t.runEach),e.destroyed)return;await sI(e,t)}}var F0=Wv;async function BX(e){var t=e.collection,n=t.database,r=Object.assign({},ES,n.cleanupPolicy?n.cleanupPolicy:{});await oI(t,r),!t.destroyed&&(await aI(e,r),await FX(e,r))}async function aI(e,t){for(var n=e.collection,r=n.database,i=!1;!i&&!n.destroyed;){if(t.awaitReplicationsInSync){var o=PS.get(n);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(n.destroyed)return;F0=F0.then(async()=>n.destroyed?!0:(await r.requestIdlePromise(),e._cleanup())),i=await F0}}async function FX(e,t){for(var n=e.collection;!n.destroyed;){if(await n.promiseWait(t.runEach),n.destroyed)return;await aI(e,t)}}var zX={name:"cleanup",rxdb:!0,prototypes:{RxCollection:e=>{e.cleanup=async function(t){var n=Object.assign({},ES,this.database.cleanupPolicy?this.database.cleanupPolicy:{});typeof t>"u"&&(t=n.minimumDeletedTime);for(var r=!1;!r&&!this.destroyed;)r=await this.storageInstance.cleanup(t)}}},hooks:{createRxCollection:{after:e=>{AX(e.collection)}},createRxState:{after:e=>{BX(e.state)}}}},UX=["__proto__","constructor","prototype"];function Wd(e,t){Object.keys(t).forEach(n=>{UX.includes(n)||(typeof e[n]>"u"?e[n]=t[n]:cf(t[n])?Wd(e[n],t[n]):e[n]=t[n])})}function cf(e){return e.toString()==="[object Object]"}var ry=function(){function e(n,r){if(this.options={},this._conditions={},this._fields={},this._path=r,n){var i=this;n.selector&&i.find(n.selector),n.limit&&i.limit(n.limit),n.skip&&i.skip(n.skip),n.sort&&n.sort.forEach(o=>i.sort(o))}}var t=e.prototype;return t.where=function(r,i){if(!arguments.length)return this;var o=typeof arguments[0];if(o==="string")return this._path=arguments[0],arguments.length===2&&(this._conditions[this._path]=arguments[1]),this;if(o==="object"&&!Array.isArray(arguments[0]))return this.merge(arguments[0]);throw xi("MQ1",{path:arguments[0]})},t.equals=function(r){this._ensurePath("equals");var i=this._path;return this._conditions[i]=r,this},t.eq=function(r){this._ensurePath("eq");var i=this._path;return this._conditions[i]=r,this},t.or=function(r){var i=this._conditions.$or||(this._conditions.$or=[]);return Array.isArray(r)||(r=[r]),i.push.apply(i,r),this},t.nor=function(r){var i=this._conditions.$nor||(this._conditions.$nor=[]);return Array.isArray(r)||(r=[r]),i.push.apply(i,r),this},t.and=function(r){var i=this._conditions.$and||(this._conditions.$and=[]);return Array.isArray(r)||(r=[r]),i.push.apply(i,r),this},t.mod=function(r,i){var o,s;arguments.length===1?(this._ensurePath("mod"),o=arguments[0],s=this._path):arguments.length===2&&!Array.isArray(arguments[1])?(this._ensurePath("mod"),o=arguments.slice(),s=this._path):arguments.length===3?(o=arguments.slice(1),s=arguments[0]):(o=arguments[1],s=arguments[0]);var a=this._conditions[s]||(this._conditions[s]={});return a.$mod=o,this},t.exists=function(r,i){var o,s;arguments.length===0?(this._ensurePath("exists"),o=this._path,s=!0):arguments.length===1?typeof arguments[0]=="boolean"?(this._ensurePath("exists"),o=this._path,s=arguments[0]):(o=arguments[0],s=!0):arguments.length===2&&(o=arguments[0],s=arguments[1]);var a=this._conditions[o]||(this._conditions[o]={});return a.$exists=s,this},t.elemMatch=function(r,i){if(arguments[0]===null)throw xi("MQ2");var o,s,a;if(typeof arguments[0]=="function")this._ensurePath("elemMatch"),s=this._path,o=arguments[0];else if(cf(arguments[0]))this._ensurePath("elemMatch"),s=this._path,a=arguments[0];else if(typeof arguments[1]=="function")s=arguments[0],o=arguments[1];else if(arguments[1]&&cf(arguments[1]))s=arguments[0],a=arguments[1];else throw xi("MQ2");o&&(a=new e,o(a),a=a._conditions);var l=this._conditions[s]||(this._conditions[s]={});return l.$elemMatch=a,this},t.sort=function(r){if(!r)return this;var i,o=typeof r;if(Array.isArray(r)){i=r.length;for(var s=0;sYE(this.options,d,r[d])),this}throw xi("MQ3",{args:arguments})},t.merge=function(r){if(!r)return this;if(!QE(r))throw xi("MQ4",{source:r});return r instanceof e?(r._conditions&&Wd(this._conditions,r._conditions),r._fields&&(this._fields||(this._fields={}),Wd(this._fields,r._fields)),r.options&&(this.options||(this.options={}),Wd(this.options,r.options)),r._distinct&&(this._distinct=r._distinct),this):(Wd(this._conditions,r),this)},t.find=function(r){return QE(r)&&this.merge(r),this},t._ensurePath=function(r){if(!this._path)throw ot("MQ5",{method:r})},t.toJSON=function(){var r={selector:this._conditions};return this.options.skip&&(r.skip=this.options.skip),this.options.limit&&(r.limit=this.options.limit),this.options.sort&&(r.sort=WX(this.options.sort)),{query:r,path:this._path}},e}();function WX(e){return Object.entries(e).map(([t,n])=>{var r=n===1?"asc":"desc",i={[t]:r};return i})}var lI=["limit","skip","maxScan","batchSize","comment"];lI.forEach(function(e){ry.prototype[e]=function(t){return this.options[e]=t,this}});var cI=["gt","gte","lt","lte","ne","in","nin","all","regex","size"];cI.forEach(function(e){ry.prototype[e]=function(){var t,n;arguments.length===1?(this._ensurePath(e),n=arguments[0],t=this._path):(n=arguments[1],t=arguments[0]);var r=this._conditions[t]===null||typeof this._conditions[t]=="object"?this._conditions[t]:this._conditions[t]={};if(e==="regex"){if(n instanceof RegExp)throw ot("QU16",{field:t,query:this._conditions});typeof n=="string"?r["$"+e]=n:(r["$"+e]=n.$regex,n.$options&&(r.$options=n.$options))}else r["$"+e]=n;return this}});function YE(e,t,n){if(Array.isArray(e.sort))throw xi("MQ6",{opts:e,field:t,value:n});if(n&&n.$meta){var r=e.sort||(e.sort={});r[t]={$meta:n.$meta};return}var i=String(n||1).toLowerCase();if(!/^(?:ascending|asc|descending|desc|1|-1)$/.test(i))throw Array.isArray(n)&&(n="["+n+"]"),xi("MQ7",{field:t,value:n});var o=e.sort||(e.sort={}),s=n.toString().replace("asc","1").replace("ascending","1").replace("desc","-1").replace("descending","-1");o[t]=parseInt(s,10)}function GX(e,t,n){if(e.sort=e.sort||[],!Array.isArray(e.sort))throw xi("MQ8",{opts:e,field:t,value:n});e.sort.push([t,n])}function QE(e){return e instanceof ry||cf(e)}function HX(e,t){return new ry(e,t)}var XE="queryBuilderPath";function VX(e,t,n){var r=HX(io(e.mangoQuery),e.other[XE]);r[t](n);var i=r.toJSON();return Fc(e.op,i.query,e.collection,{...e.other,[XE]:i.path})}function z0(e,t){e[t]=function(n){if(bn.isDevMode()&&this.op==="findByIds")throw ot("QU17",{collection:this.collection.name,query:this.mangoQuery});return VX(this,t,n)}}var KX={name:"query-builder",rxdb:!0,prototypes:{RxQuery(e){["where","equals","eq","or","nor","and","mod","exists","elemMatch","sort"].forEach(t=>{z0(e,t)}),lI.forEach(t=>{z0(e,t)}),cI.forEach(t=>{z0(e,t)})}}},qX=SL(),YX=function(e){function t(n,r,i){var o;return o=e.call(this,null,r)||this,o.id=n,o.parent=i,o}return bp(t,e),t}(qX),uf={get isLocal(){return!0},get allAttachments$(){throw ot("LD1",{document:this})},get primaryPath(){return"id"},get primary(){return this.id},get $(){var e=this,t=Ws(U1,this.parent);return e.parent.$.pipe(Gt(n=>n.documentId===this.primary),Gt(n=>n.isLocal),qt(n=>qj(n)),qv(t.docCache.getLatestDocumentData(this.primary)),Qf((n,r)=>n._rev===r._rev),qt(n=>t.docCache.getCachedRxDocument(n)),oS(Jx))},get $$(){var e=this,t=U0(e),n=t.getReactivityFactory();return n.fromObservable(e.$,e.getLatest()._data,t)},get deleted$$(){var e=this,t=U0(e),n=t.getReactivityFactory();return n.fromObservable(e.deleted$,e.getLatest().deleted,t)},getLatest(){var e=Ws(U1,this.parent),t=e.docCache.getLatestDocumentData(this.primary);return e.docCache.getCachedRxDocument(t)},get(e){if(e="data."+e,!!this._data){if(typeof e!="string")throw xi("LD2",{objPath:e});var t=Ua(this._data,e);return t=bn.deepFreezeWhenDevMode(t),t}},get$(e){if(e="data."+e,bn.isDevMode()){if(e.includes(".item."))throw ot("LD3",{objPath:e});if(e===this.primaryPath)throw ot("LD4")}return this.$.pipe(qt(t=>t._data),qt(t=>Ua(t,e)),Qf())},get$$(e){var t=U0(this),n=t.getReactivityFactory();return n.fromObservable(this.get$(e),this.getLatest().get(e),t)},async incrementalModify(e){var t=await df(this.parent);return t.incrementalWriteQueue.addWrite(this._data,async n=>(n.data=await e(n.data,this),n)).then(n=>t.docCache.getCachedRxDocument(n))},incrementalPatch(e){return this.incrementalModify(t=>(Object.entries(e).forEach(([n,r])=>{t[n]=r}),t))},async _saveData(e){var t=await df(this.parent),n=this._data;e.id=this.id;var r=[{previous:n,document:e}];return t.storageInstance.bulkWrite(r,"local-document-save-data").then(i=>{if(i.error[0])throw i.error[0];var o=Oi(this.collection.schema.primaryPath,r,i)[0];e=on(e),e._rev=o._rev})},async remove(){var e=await df(this.parent),t=on(this._data);return t._deleted=!0,ey(e.storageInstance,{previous:this._data,document:t},"local-document-remove").then(n=>e.docCache.getCachedRxDocument(n))}},JE=!1,QX=()=>{if(!JE){JE=!0;var e=ty,t=Object.getOwnPropertyNames(e);t.forEach(r=>{var i=Object.getOwnPropertyDescriptor(uf,r);if(!i){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(uf,r,o)}});var n=r=>()=>{throw ot("LD6",{functionName:r})};["populate","update","putAttachment","getAttachment","allAttachments"].forEach(r=>uf[r]=n(r))}};function XX(e,t){QX();var n=new YX(e.id,e,t);return Object.setPrototypeOf(n,uf),n.prototype=uf,n}function U0(e){var t=e.parent;return QY(t)?t:t.database}var ag=new WeakMap,U1=new WeakMap;function ZE(e){var t=e.database?e.database:e,n=e.database?e.name:"",r=(async()=>{var i=await uI(t.token,t.storage,t.name,n,t.instanceCreationOptions,t.multiInstance);i=vS(t,i,dI);var o=new hL("id",t.eventBulks$.pipe(Gt(u=>{var d=!1;return(n===""&&!u.collectionName||n!==""&&u.collectionName===n)&&(d=!0),d&&u.events[0].isLocal}),qt(u=>u.events)),u=>XX(u,e)),s=new xL(i,"id",()=>{},()=>{}),a=await t.storageToken,l=i.changeStream().subscribe(u=>{for(var d=new Array(u.events.length),f=u.events,m=e.database?e.name:void 0,h=0;hn.storageInstance.close())}async function tR(e,t,n){var r=cc(10),i=await uI(r,e,t,n,{},!1);await i.remove()}function JX(e){return"plugin-local-documents-"+e}var dI=Vv({title:"RxLocalDocument",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:128},data:{type:"object",additionalProperties:!0}},required:["id","data"]});async function nR(e,t){var n=await df(this),r={id:e,data:t,_deleted:!1,_meta:Yu(),_rev:Do(),_attachments:{}};return ey(n.storageInstance,{document:r},"local-document-insert").then(i=>n.docCache.getCachedRxDocument(i))}function rR(e,t){return this.getLocal(e).then(n=>{if(n)return n.incrementalModify(()=>t);var r=this.insertLocal(e,t);return r})}async function iR(e){var t=await df(this),n=t.docCache,r=n.getLatestDocumentDataIfExists(e);return r?Promise.resolve(n.getCachedRxDocument(r)):Zv(t.storageInstance,e).then(i=>i?t.docCache.getCachedRxDocument(i):null)}function oR(e){return this.$.pipe(qv(null),ls(async t=>{if(t)return{changeEvent:t};var n=await this.getLocal(e);return{doc:n}}),ls(async t=>{if(t.changeEvent){var n=t.changeEvent;if(!n.isLocal||n.documentId!==e)return{use:!1};var r=await this.getLocal(e);return{use:!0,doc:r}}else return{use:!0,doc:t.doc}}),Gt(t=>t.use),qt(t=>t.doc))}var ZX={name:"local-documents",rxdb:!0,prototypes:{RxCollection:e=>{e.insertLocal=nR,e.upsertLocal=rR,e.getLocal=iR,e.getLocal$=oR},RxDatabase:e=>{e.insertLocal=nR,e.upsertLocal=rR,e.getLocal=iR,e.getLocal$=oR}},hooks:{createRxDatabase:{before:e=>{e.creator.localDocuments&&ZE(e.database)}},createRxCollection:{before:e=>{e.creator.localDocuments&&ZE(e.collection)}},preDestroyRxDatabase:{after:e=>eR(e)},postDestroyRxCollection:{after:e=>eR(e)},postRemoveRxDatabase:{after:e=>tR(e.storage,e.databaseName,"")},postRemoveRxCollection:{after:e=>tR(e.storage,e.databaseName,e.collectionName)}},overwritable:{}};async function eJ(e,t,n){var r=await e([t,n].join("|"))>await e([n,t].join("|"));return r}function W0(e,t,n){var r=n.id,i=Ln(e.response$.pipe(Gt(o=>o.peer===t),Gt(o=>o.response.id===r),qt(o=>o.response)));return e.send(t,n),i}const tJ="modulepreload",nJ=function(e){return"/"+e},sR={},rJ=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.all(n.map(a=>{if(a=nJ(a),a in sR)return;sR[a]=!0;const l=a.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${c}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":tJ,l||(u.as="script",u.crossOrigin=""),u.href=a,s&&u.setAttribute("nonce",s),document.head.appendChild(u),l)return new Promise((d,f)=>{u.addEventListener("load",d),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};function kh(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var fI={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n=Math.floor,r=Math.abs,i=Math.pow;return function(){function o(s,a,l){function c(f,m){if(!a[f]){if(!s[f]){var h=typeof kh=="function"&&kh;if(!m&&h)return h(f,!0);if(u)return u(f,!0);var g=new Error("Cannot find module '"+f+"'");throw g.code="MODULE_NOT_FOUND",g}var E=a[f]={exports:{}};s[f][0].call(E.exports,function(b){var w=s[f][1][b];return c(w||b)},E,E.exports,o,s,a,l)}return a[f].exports}for(var u=typeof kh=="function"&&kh,d=0;d>16,L[N++]=255&k>>8,L[N++]=255&k;return $===2&&(k=g[_.charCodeAt(R)]<<2|g[_.charCodeAt(R+1)]>>4,L[N++]=255&k),$===1&&(k=g[_.charCodeAt(R)]<<10|g[_.charCodeAt(R+1)]<<4|g[_.charCodeAt(R+2)]>>2,L[N++]=255&k>>8,L[N++]=255&k),L}function d(_){return h[63&_>>18]+h[63&_>>12]+h[63&_>>6]+h[63&_]}function f(_,k,R){for(var P,I=[],$=k;$N?N:L+$));return P===1?(k=_[R-1],I.push(h[k>>2]+h[63&k<<4]+"==")):P===2&&(k=(_[R-2]<<8)+_[R-1],I.push(h[k>>10]+h[63&k>>4]+h[63&k<<2]+"=")),I.join("")}a.byteLength=function(_){var k=l(_),R=k[0],P=k[1];return 3*(R+P)/4-P},a.toByteArray=u,a.fromByteArray=m;for(var h=[],g=[],E=typeof Uint8Array>"u"?Array:Uint8Array,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=0,y=b.length;wS)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function h(S,O,D){return m(S),0>=S||O===void 0?u(S):typeof D=="string"?u(S).fill(O,D):u(S).fill(O)}function g(S){return m(S),u(0>S?0:0|_(S))}function E(S,O){if((typeof O!="string"||O==="")&&(O="utf8"),!d.isEncoding(O))throw new TypeError("Unknown encoding: "+O);var D=0|k(S,O),q=u(D),X=q.write(S,O);return X!==D&&(q=q.slice(0,X)),q}function b(S){for(var O=0>S.length?0:0|_(S.length),D=u(O),q=0;qO||S.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|S}function k(S,O){if(d.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||ee(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);var D=S.length,q=2>>1;case"base64":return Ze(S).length;default:if(X)return q?-1:Tt(S).length;O=(""+O).toLowerCase(),X=!0}}function R(S,O,D){var q=!1;if((O===void 0||0>O)&&(O=0),O>this.length||((D===void 0||D>this.length)&&(D=this.length),0>=D)||(D>>>=0,O>>>=0,D<=O))return"";for(S||(S="utf8");;)switch(S){case"hex":return je(this,O,D);case"utf8":case"utf-8":return ce(this,O,D);case"ascii":return V(this,O,D);case"latin1":case"binary":return se(this,O,D);case"base64":return le(this,O,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ge(this,O,D);default:if(q)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),q=!0}}function P(S,O,D){var q=S[O];S[O]=S[D],S[D]=q}function I(S,O,D,q,X){if(S.length===0)return-1;if(typeof D=="string"?(q=D,D=0):2147483647D&&(D=-2147483648),D=+D,me(D)&&(D=X?0:S.length-1),0>D&&(D=S.length+D),D>=S.length){if(X)return-1;D=S.length-1}else if(0>D)if(X)D=0;else return-1;if(typeof O=="string"&&(O=d.from(O,q)),d.isBuffer(O))return O.length===0?-1:$(S,O,D,q,X);if(typeof O=="number")return O&=255,typeof Uint8Array.prototype.indexOf=="function"?X?Uint8Array.prototype.indexOf.call(S,O,D):Uint8Array.prototype.lastIndexOf.call(S,O,D):$(S,[O],D,q,X);throw new TypeError("val must be string, number or Buffer")}function $(S,O,D,q,X){function pe(qe,bt){return Fe===1?qe[bt]:qe.readUInt16BE(bt*Fe)}var Fe=1,rt=S.length,Xe=O.length;if(q!==void 0&&(q=(q+"").toLowerCase(),q==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le")){if(2>S.length||2>O.length)return-1;Fe=2,rt/=2,Xe/=2,D/=2}var Oe;if(X){var et=-1;for(Oe=D;Oert&&(D=rt-Xe),Oe=D;0<=Oe;Oe--){for(var Rt=!0,tn=0;tnX&&(q=X)):q=X;var pe=O.length;q>pe/2&&(q=pe/2);for(var Fe,rt=0;rtpe&&(Fe=pe):rt===2?(Xe=S[X+1],(192&Xe)==128&&(Rt=(31&pe)<<6|63&Xe,127Rt||57343Rt&&(Fe=Rt)))}Fe===null?(Fe=65533,rt=1):65535>>10),Fe=56320|1023&Fe),q.push(Fe),X+=rt}return H(q)}function H(S){var O=S.length;if(O<=4096)return l.apply(String,S);for(var D="",q=0;qO)&&(O=0),(!D||0>D||D>q)&&(D=q);for(var X="",pe=O;peS)throw new RangeError("offset is not uint");if(S+O>D)throw new RangeError("Trying to access beyond buffer length")}function _e(S,O,D,q,X,pe){if(!d.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(O>X||OS.length)throw new RangeError("Index out of range")}function Ve(S,O,D,q){if(D+q>S.length)throw new RangeError("Index out of range");if(0>D)throw new RangeError("Index out of range")}function Pe(S,O,D,q,X){return O=+O,D>>>=0,X||Ve(S,O,D,4),Ue.write(S,O,D,q,23,4),D+4}function ct(S,O,D,q,X){return O=+O,D>>>=0,X||Ve(S,O,D,8),Ue.write(S,O,D,q,52,8),D+8}function ft(S){if(S=S.split("=")[0],S=S.trim().replace(W,""),2>S.length)return"";for(;S.length%4!=0;)S+="=";return S}function Te(S){return 16>S?"0"+S.toString(16):S.toString(16)}function Tt(S,O){O=O||1/0;for(var D,q=S.length,X=null,pe=[],Fe=0;FeD){if(!X){if(56319D){-1<(O-=3)&&pe.push(239,191,189),X=D;continue}D=(X-55296<<10|D-56320)+65536}else X&&-1<(O-=3)&&pe.push(239,191,189);if(X=null,128>D){if(0>(O-=1))break;pe.push(D)}else if(2048>D){if(0>(O-=2))break;pe.push(192|D>>6,128|63&D)}else if(65536>D){if(0>(O-=3))break;pe.push(224|D>>12,128|63&D>>6,128|63&D)}else if(1114112>D){if(0>(O-=4))break;pe.push(240|D>>18,128|63&D>>12,128|63&D>>6,128|63&D)}else throw new Error("Invalid code point")}return pe}function ut(S){for(var O=[],D=0;D(O-=2));++Fe)D=S.charCodeAt(Fe),q=D>>8,X=D%256,pe.push(X),pe.push(q);return pe}function Ze(S){return Ce.toByteArray(ft(S))}function yt(S,O,D,q){for(var X=0;X=O.length||X>=S.length);++X)O[X+D]=S[X];return X}function ee(S,O){return S instanceof O||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===O.name}function me(S){return S!==S}var Ce=o("base64-js"),Ue=o("ieee754");a.Buffer=d,a.SlowBuffer=function(S){return+S!=S&&(S=0),d.alloc(+S)},a.INSPECT_MAX_BYTES=50,a.kMaxLength=2147483647,d.TYPED_ARRAY_SUPPORT=function(){try{var S=new Uint8Array(1);return S.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},S.foo()===42}catch{return!1}}(),d.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){return d.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){return d.isBuffer(this)?this.byteOffset:void 0}}),typeof Symbol<"u"&&Symbol.species!=null&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),d.poolSize=8192,d.from=function(S,O,D){return f(S,O,D)},d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,d.alloc=function(S,O,D){return h(S,O,D)},d.allocUnsafe=function(S){return g(S)},d.allocUnsafeSlow=function(S){return g(S)},d.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==d.prototype},d.compare=function(S,O){if(ee(S,Uint8Array)&&(S=d.from(S,S.offset,S.byteLength)),ee(O,Uint8Array)&&(O=d.from(O,O.offset,O.byteLength)),!d.isBuffer(S)||!d.isBuffer(O))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===O)return 0;for(var D=S.length,q=O.length,X=0,pe=c(D,q);XO&&(S+=" ... "),""},d.prototype.compare=function(S,O,D,q,X){if(ee(S,Uint8Array)&&(S=d.from(S,S.offset,S.byteLength)),!d.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(O===void 0&&(O=0),D===void 0&&(D=S?S.length:0),q===void 0&&(q=0),X===void 0&&(X=this.length),0>O||D>S.length||0>q||X>this.length)throw new RangeError("out of range index");if(q>=X&&O>=D)return 0;if(q>=X)return-1;if(O>=D)return 1;if(O>>>=0,D>>>=0,q>>>=0,X>>>=0,this===S)return 0;for(var pe=X-q,Fe=D-O,rt=c(pe,Fe),Xe=this.slice(q,X),Oe=S.slice(O,D),et=0;et>>=0,isFinite(D)?(D>>>=0,q===void 0&&(q="utf8")):(q=D,D=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var X=this.length-O;if((D===void 0||D>X)&&(D=X),0D||0>O)||O>this.length)throw new RangeError("Attempt to write outside buffer bounds");q||(q="utf8");for(var pe=!1;;)switch(q){case"hex":return L(this,S,O,D);case"utf8":case"utf-8":return N(this,S,O,D);case"ascii":return F(this,S,O,D);case"latin1":case"binary":return z(this,S,O,D);case"base64":return K(this,S,O,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,S,O,D);default:if(pe)throw new TypeError("Unknown encoding: "+q);q=(""+q).toLowerCase(),pe=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},d.prototype.slice=function(S,O){var D=this.length;S=~~S,O=O===void 0?D:~~O,0>S?(S+=D,0>S&&(S=0)):S>D&&(S=D),0>O?(O+=D,0>O&&(O=0)):O>D&&(O=D),O>>=0,O>>>=0,D||Le(S,O,this.length);for(var q=this[S],X=1,pe=0;++pe>>=0,O>>>=0,D||Le(S,O,this.length);for(var q=this[S+--O],X=1;0>>=0,O||Le(S,1,this.length),this[S]},d.prototype.readUInt16LE=function(S,O){return S>>>=0,O||Le(S,2,this.length),this[S]|this[S+1]<<8},d.prototype.readUInt16BE=function(S,O){return S>>>=0,O||Le(S,2,this.length),this[S]<<8|this[S+1]},d.prototype.readUInt32LE=function(S,O){return S>>>=0,O||Le(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+16777216*this[S+3]},d.prototype.readUInt32BE=function(S,O){return S>>>=0,O||Le(S,4,this.length),16777216*this[S]+(this[S+1]<<16|this[S+2]<<8|this[S+3])},d.prototype.readIntLE=function(S,O,D){S>>>=0,O>>>=0,D||Le(S,O,this.length);for(var q=this[S],X=1,pe=0;++pe=X&&(q-=i(2,8*O)),q},d.prototype.readIntBE=function(S,O,D){S>>>=0,O>>>=0,D||Le(S,O,this.length);for(var q=O,X=1,pe=this[S+--q];0=X&&(pe-=i(2,8*O)),pe},d.prototype.readInt8=function(S,O){return S>>>=0,O||Le(S,1,this.length),128&this[S]?-1*(255-this[S]+1):this[S]},d.prototype.readInt16LE=function(S,O){S>>>=0,O||Le(S,2,this.length);var D=this[S]|this[S+1]<<8;return 32768&D?4294901760|D:D},d.prototype.readInt16BE=function(S,O){S>>>=0,O||Le(S,2,this.length);var D=this[S+1]|this[S]<<8;return 32768&D?4294901760|D:D},d.prototype.readInt32LE=function(S,O){return S>>>=0,O||Le(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},d.prototype.readInt32BE=function(S,O){return S>>>=0,O||Le(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},d.prototype.readFloatLE=function(S,O){return S>>>=0,O||Le(S,4,this.length),Ue.read(this,S,!0,23,4)},d.prototype.readFloatBE=function(S,O){return S>>>=0,O||Le(S,4,this.length),Ue.read(this,S,!1,23,4)},d.prototype.readDoubleLE=function(S,O){return S>>>=0,O||Le(S,8,this.length),Ue.read(this,S,!0,52,8)},d.prototype.readDoubleBE=function(S,O){return S>>>=0,O||Le(S,8,this.length),Ue.read(this,S,!1,52,8)},d.prototype.writeUIntLE=function(S,O,D,q){if(S=+S,O>>>=0,D>>>=0,!q){var X=i(2,8*D)-1;_e(this,S,O,D,X,0)}var pe=1,Fe=0;for(this[O]=255&S;++Fe>>=0,D>>>=0,!q){var X=i(2,8*D)-1;_e(this,S,O,D,X,0)}var pe=D-1,Fe=1;for(this[O+pe]=255&S;0<=--pe&&(Fe*=256);)this[O+pe]=255&S/Fe;return O+D},d.prototype.writeUInt8=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,1,255,0),this[O]=255&S,O+1},d.prototype.writeUInt16LE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,2,65535,0),this[O]=255&S,this[O+1]=S>>>8,O+2},d.prototype.writeUInt16BE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,2,65535,0),this[O]=S>>>8,this[O+1]=255&S,O+2},d.prototype.writeUInt32LE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,4,4294967295,0),this[O+3]=S>>>24,this[O+2]=S>>>16,this[O+1]=S>>>8,this[O]=255&S,O+4},d.prototype.writeUInt32BE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,4,4294967295,0),this[O]=S>>>24,this[O+1]=S>>>16,this[O+2]=S>>>8,this[O+3]=255&S,O+4},d.prototype.writeIntLE=function(S,O,D,q){if(S=+S,O>>>=0,!q){var X=i(2,8*D-1);_e(this,S,O,D,X-1,-X)}var pe=0,Fe=1,rt=0;for(this[O]=255&S;++peS&&rt===0&&this[O+pe-1]!==0&&(rt=1),this[O+pe]=255&(S/Fe>>0)-rt;return O+D},d.prototype.writeIntBE=function(S,O,D,q){if(S=+S,O>>>=0,!q){var X=i(2,8*D-1);_e(this,S,O,D,X-1,-X)}var pe=D-1,Fe=1,rt=0;for(this[O+pe]=255&S;0<=--pe&&(Fe*=256);)0>S&&rt===0&&this[O+pe+1]!==0&&(rt=1),this[O+pe]=255&(S/Fe>>0)-rt;return O+D},d.prototype.writeInt8=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,1,127,-128),0>S&&(S=255+S+1),this[O]=255&S,O+1},d.prototype.writeInt16LE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,2,32767,-32768),this[O]=255&S,this[O+1]=S>>>8,O+2},d.prototype.writeInt16BE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,2,32767,-32768),this[O]=S>>>8,this[O+1]=255&S,O+2},d.prototype.writeInt32LE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,4,2147483647,-2147483648),this[O]=255&S,this[O+1]=S>>>8,this[O+2]=S>>>16,this[O+3]=S>>>24,O+4},d.prototype.writeInt32BE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,4,2147483647,-2147483648),0>S&&(S=4294967295+S+1),this[O]=S>>>24,this[O+1]=S>>>16,this[O+2]=S>>>8,this[O+3]=255&S,O+4},d.prototype.writeFloatLE=function(S,O,D){return Pe(this,S,O,!0,D)},d.prototype.writeFloatBE=function(S,O,D){return Pe(this,S,O,!1,D)},d.prototype.writeDoubleLE=function(S,O,D){return ct(this,S,O,!0,D)},d.prototype.writeDoubleBE=function(S,O,D){return ct(this,S,O,!1,D)},d.prototype.copy=function(S,O,D,q){if(!d.isBuffer(S))throw new TypeError("argument should be a Buffer");if(D||(D=0),q||q===0||(q=this.length),O>=S.length&&(O=S.length),O||(O=0),0O)throw new RangeError("targetStart out of bounds");if(0>D||D>=this.length)throw new RangeError("Index out of range");if(0>q)throw new RangeError("sourceEnd out of bounds");q>this.length&&(q=this.length),S.length-OX||q==="latin1")&&(S=X)}}else typeof S=="number"&&(S&=255);if(0>O||this.length>>=0,D=D===void 0?this.length:D>>>0,S||(S=0);var pe;if(typeof S=="number")for(pe=O;pe{g==="%%"||(m++,g==="%c"&&(h=m))}),d.splice(h,0,f)},a.save=function(d){try{d?a.storage.setItem("debug",d):a.storage.removeItem("debug")}catch{}},a.load=c,a.useColors=function(){return!!(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},a.storage=function(){try{return localStorage}catch{}}(),a.destroy=(()=>{let d=!1;return()=>{d||(d=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],a.log=console.debug||console.log||(()=>{}),s.exports=o("./common")(a);const{formatters:u}=s.exports;u.j=function(d){try{return JSON.stringify(d)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this)}).call(this,o("_process"))},{"./common":5,_process:12}],5:[function(o,s){s.exports=function(a){function l(d){function f(...g){if(!f.enabled)return;const E=f,b=+new Date,w=b-(m||b);E.diff=w,E.prev=m,E.curr=b,m=b,g[0]=l.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let y=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(k,R)=>{if(k==="%%")return"%";y++;const P=l.formatters[R];if(typeof P=="function"){const I=g[y];k=P.call(E,I),g.splice(y,1),y--}return k}),l.formatArgs.call(E,g),(E.log||l.log).apply(E,g)}let m,h=null;return f.namespace=d,f.useColors=l.useColors(),f.color=l.selectColor(d),f.extend=c,f.destroy=l.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>h===null?l.enabled(d):h,set:g=>{h=g}}),typeof l.init=="function"&&l.init(f),f}function c(d,f){const m=l(this.namespace+(typeof f>"u"?":":f)+d);return m.log=this.log,m}function u(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}return l.debug=l,l.default=l,l.coerce=function(d){return d instanceof Error?d.stack||d.message:d},l.disable=function(){const d=[...l.names.map(u),...l.skips.map(u).map(f=>"-"+f)].join(",");return l.enable(""),d},l.enable=function(d){l.save(d),l.names=[],l.skips=[];let f;const m=(typeof d=="string"?d:"").split(/[\s,]+/),h=m.length;for(f=0;f{l[d]=a[d]}),l.names=[],l.skips=[],l.formatters={},l.selectColor=function(d){let f=0;for(let m=0;mK&&!le.warned){le.warned=!0;var ce=new Error("Possible EventEmitter memory leak detected. "+le.length+" "+(N+" listeners added. Use emitter.setMaxListeners() to increase limit"));ce.name="MaxListenersExceededWarning",ce.emitter=L,ce.type=N,ce.count=le.length,a(ce)}return L}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(L,N,F){var z={fired:!1,wrapFn:void 0,target:L,type:N,listener:F},K=f.bind(z);return K.listener=F,z.wrapFn=K,K}function h(L,N,F){var z=L._events;if(z===void 0)return[];var K=z[N];return K===void 0?[]:typeof K=="function"?F?[K.listener||K]:[K]:F?w(K):E(K,K.length)}function g(L){var N=this._events;if(N!==void 0){var F=N[L];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}function E(L,N){for(var F=Array(N),z=0;zL||I(L))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+L+".");$=L}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(L){if(typeof L!="number"||0>L||I(L))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+L+".");return this._maxListeners=L,this},l.prototype.getMaxListeners=function(){return u(this)},l.prototype.emit=function(L){for(var N=[],F=1;FK)return this;K===0?F.shift():b(F,K),F.length===1&&(z[L]=F[0]),z.removeListener!==void 0&&this.emit("removeListener",L,le||N)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(L){var N,F,z;if(F=this._events,F===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[L]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete F[L]),this;if(arguments.length===0){var K,Z=Object.keys(F);for(z=0;z"u")return null;var a={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return a.RTCPeerConnection?a:null}},{}],9:[function(o,s,a){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */a.read=function(l,c,u,d,f){var m,h,g=8*f-d-1,E=(1<>1,w=-7,y=u?f-1:0,_=u?-1:1,k=l[c+y];for(y+=_,m=k&(1<<-w)-1,k>>=-w,w+=g;0>=-w,w+=d;0>1,R=f===23?i(2,-24)-i(2,-77):0,P=d?0:m-1,I=d?1:-1,$=0>c||c===0&&0>1/c?1:0;for(c=r(c),isNaN(c)||c===1/0?(g=isNaN(c)?1:0,h=_):(h=n(w(c)/b),1>c*(E=i(2,-h))&&(h--,E*=2),c+=1<=h+k?R/E:R*i(2,1-k),2<=c*E&&(h++,E/=2),h+k>=_?(g=0,h=_):1<=h+k?(g=(c*E-1)*i(2,f),h+=k):(g=c*i(2,k-1)*i(2,f),h=0));8<=f;l[u+P]=255&g,P+=I,g/=256,f-=8);for(h=h<=1.5*h?"s":"")}s.exports=function(f,m){m=m||{};var h=typeof f;if(h=="string"&&0 */let l;s.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window>"u"?a:window):c=>(l||(l=Promise.resolve())).then(c).catch(u=>setTimeout(()=>{throw u},0))}).call(this)}).call(this,typeof Sr>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Sr)},{}],14:[function(o,s){(function(a,l){(function(){var c=o("safe-buffer").Buffer,u=l.crypto||l.msCrypto;s.exports=u&&u.getRandomValues?function(d,f){if(d>4294967295)throw new RangeError("requested too many random bytes");var m=c.allocUnsafe(d);if(0"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Sr)},{_process:12,"safe-buffer":30}],15:[function(o,s){function a(h,g){h.prototype=Object.create(g.prototype),h.prototype.constructor=h,h.__proto__=g}function l(h,g,E){function b(y,_,k){return typeof g=="string"?g:g(y,_,k)}E||(E=Error);var w=function(y){function _(k,R,P){return y.call(this,b(k,R,P))||this}return a(_,y),_}(E);w.prototype.name=E.name,w.prototype.code=h,m[h]=w}function c(h,g){if(Array.isArray(h)){var E=h.length;return h=h.map(function(b){return b+""}),2h.length)&&(E=h.length),h.substring(E-g.length,E)===g}function f(h,g,E){return typeof E!="number"&&(E=0),!(E+g.length>h.length)&&h.indexOf(g,E)!==-1}var m={};l("ERR_INVALID_OPT_VALUE",function(h,g){return'The value "'+g+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,g,E){var b;typeof g=="string"&&u(g,"not ")?(b="must not be",g=g.replace(/^not /,"")):b="must be";var w;if(d(h," argument"))w="The ".concat(h," ").concat(b," ").concat(c(g,"type"));else{var y=f(h,".")?"property":"argument";w='The "'.concat(h,'" ').concat(y," ").concat(b," ").concat(c(g,"type"))}return w+=". Received type ".concat(typeof E),w},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),s.exports.codes=m},{}],16:[function(o,s){(function(a){(function(){function l(b){return this instanceof l?(f.call(this,b),m.call(this,b),this.allowHalfOpen=!0,void(b&&(b.readable===!1&&(this.readable=!1),b.writable===!1&&(this.writable=!1),b.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",c))))):new l(b)}function c(){this._writableState.ended||a.nextTick(u,this)}function u(b){b.end()}var d=Object.keys||function(b){var w=[];for(var y in b)w.push(y);return w};s.exports=l;var f=o("./_stream_readable"),m=o("./_stream_writable");o("inherits")(l,f);for(var h,g=d(m.prototype),E=0;E>>1,W|=W>>>2,W|=W>>>4,W|=W>>>8,W|=W>>>16,W++),W}function w(W,S){return 0>=W||S.length===0&&S.ended?0:S.objectMode?1:W===W?(W>S.highWaterMark&&(S.highWaterMark=b(W)),W<=S.length?W:S.ended?S.length:(S.needReadable=!0,0)):S.flowing&&S.length?S.buffer.head.data.length:S.length}function y(W,S){if(V("onEofChunk"),!S.ended){if(S.decoder){var O=S.decoder.end();O&&O.length&&(S.buffer.push(O),S.length+=S.objectMode?1:O.length)}S.ended=!0,S.sync?_(W):(S.needReadable=!1,!S.emittedReadable&&(S.emittedReadable=!0,k(W)))}}function _(W){var S=W._readableState;V("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(V("emitReadable",S.flowing),S.emittedReadable=!0,a.nextTick(k,W))}function k(W){var S=W._readableState;V("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(W.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,z(W)}function R(W,S){S.readingMore||(S.readingMore=!0,a.nextTick(P,W,S))}function P(W,S){for(;!S.reading&&!S.ended&&(S.length=S.length?(O=S.decoder?S.buffer.join(""):S.buffer.length===1?S.buffer.first():S.buffer.concat(S.length),S.buffer.clear()):O=S.buffer.consume(W,S.decoder),O}function Z(W){var S=W._readableState;V("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,a.nextTick(le,S,W))}function le(W,S){if(V("endReadableNT",W.endEmitted,W.length),!W.endEmitted&&W.length===0&&(W.endEmitted=!0,S.readable=!1,S.emit("end"),W.autoDestroy)){var O=S._writableState;(!O||O.autoDestroy&&O.finished)&&S.destroy()}}function ce(W,S){for(var O=0,D=W.length;O=S.highWaterMark)||S.ended))return V("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?Z(this):_(this),null;if(W=w(W,S),W===0&&S.ended)return S.length===0&&Z(this),null;var D=S.needReadable;V("need readable",D),(S.length===0||S.length-W"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Sr)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(o,s){function a(b,w){var y=this._transformState;y.transforming=!1;var _=y.writecb;if(_===null)return this.emit("error",new m);y.writechunk=null,y.writecb=null,w!=null&&this.push(w),_(b);var k=this._readableState;k.reading=!1,(k.needReadable||k.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Sr)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(o,s){(function(a){(function(){function l(I,$,L){return $ in I?Object.defineProperty(I,$,{value:L,enumerable:!0,configurable:!0,writable:!0}):I[$]=L,I}function c(I,$){return{value:I,done:$}}function u(I){var $=I[g];if($!==null){var L=I[k].read();L!==null&&(I[y]=null,I[g]=null,I[E]=null,$(c(L,!1)))}}function d(I){a.nextTick(u,I)}function f(I,$){return function(L,N){I.then(function(){return $[w]?void L(c(void 0,!0)):void $[_](L,N)},N)}}var m,h=o("./end-of-stream"),g=Symbol("lastResolve"),E=Symbol("lastReject"),b=Symbol("error"),w=Symbol("ended"),y=Symbol("lastPromise"),_=Symbol("handlePromise"),k=Symbol("stream"),R=Object.getPrototypeOf(function(){}),P=Object.setPrototypeOf((m={get stream(){return this[k]},next:function(){var I=this,$=this[b];if($!==null)return Promise.reject($);if(this[w])return Promise.resolve(c(void 0,!0));if(this[k].destroyed)return new Promise(function(z,K){a.nextTick(function(){I[b]?K(I[b]):z(c(void 0,!0))})});var L,N=this[y];if(N)L=new Promise(f(N,this));else{var F=this[k].read();if(F!==null)return Promise.resolve(c(F,!1));L=new Promise(this[_])}return this[y]=L,L}},l(m,Symbol.asyncIterator,function(){return this}),l(m,"return",function(){var I=this;return new Promise(function($,L){I[k].destroy(null,function(N){return N?void L(N):void $(c(void 0,!0))})})}),m),R);s.exports=function(I){var $,L=Object.create(P,($={},l($,k,{value:I,writable:!0}),l($,g,{value:null,writable:!0}),l($,E,{value:null,writable:!0}),l($,b,{value:null,writable:!0}),l($,w,{value:I._readableState.endEmitted,writable:!0}),l($,_,{value:function(N,F){var z=L[k].read();z?(L[y]=null,L[g]=null,L[E]=null,N(c(z,!1))):(L[g]=N,L[E]=F)},writable:!0}),$));return L[y]=null,h(I,function(N){if(N&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"){var F=L[E];return F!==null&&(L[y]=null,L[g]=null,L[E]=null,F(N)),void(L[b]=N)}var z=L[g];z!==null&&(L[y]=null,L[g]=null,L[E]=null,z(c(void 0,!0))),L[w]=!0}),I.on("readable",d.bind(null,L)),L}}).call(this)}).call(this,o("_process"))},{"./end-of-stream":24,_process:12}],22:[function(o,s){function a(y,_){var k=Object.keys(y);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(y);_&&(R=R.filter(function(P){return Object.getOwnPropertyDescriptor(y,P).enumerable})),k.push.apply(k,R)}return k}function l(y){for(var _,k=1;k>>0),R=this.head,P=0;R;)m(R.data,k,P),P+=R.data.length,R=R.next;return k}},{key:"consume",value:function(_,k){var R;return _I.length?I.length:_;if(P+=$===I.length?I:I.slice(0,_),_-=$,_===0){$===I.length?(++R,this.head=k.next?k.next:this.tail=null):(this.head=k,k.data=I.slice($));break}++R}return this.length-=R,P}},{key:"_getBuffer",value:function(_){var k=g.allocUnsafe(_),R=this.head,P=1;for(R.data.copy(k),_-=R.data.length;R=R.next;){var I=R.data,$=_>I.length?I.length:_;if(I.copy(k,k.length-_,0,$),_-=$,_===0){$===I.length?(++P,this.head=R.next?R.next:this.tail=null):(this.head=R,R.data=I.slice($));break}++P}return this.length-=P,k}},{key:w,value:function(_,k){return b(this,l({},k,{depth:0,customInspect:!1}))}}]),y}()},{buffer:3,util:2}],23:[function(o,s){(function(a){(function(){function l(d,f){u(d,f),c(d)}function c(d){d._writableState&&!d._writableState.emitClose||d._readableState&&!d._readableState.emitClose||d.emit("close")}function u(d,f){d.emit("error",f)}s.exports={destroy:function(d,f){var m=this,h=this._readableState&&this._readableState.destroyed,g=this._writableState&&this._writableState.destroyed;return h||g?(f?f(d):d&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,a.nextTick(u,this,d)):a.nextTick(u,this,d)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(d||null,function(E){!f&&E?m._writableState?m._writableState.errorEmitted?a.nextTick(c,m):(m._writableState.errorEmitted=!0,a.nextTick(l,m,E)):a.nextTick(l,m,E):f?(a.nextTick(c,m),f(E)):a.nextTick(c,m)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(d,f){var m=d._readableState,h=d._writableState;m&&m.autoDestroy||h&&h.autoDestroy?d.destroy(f):d.emit("error",f)}}}).call(this)}).call(this,o("_process"))},{_process:12}],24:[function(o,s){function a(f){var m=!1;return function(){if(!m){m=!0;for(var h=arguments.length,g=Array(h),E=0;Ey.length)throw new E("streams");var R,P=y.map(function(I,$){var L=$m){var h=f?d:"highWaterMark";throw new l(h,m)}return n(m)}return c.objectMode?16:16384}}},{"../../../errors":15}],28:[function(o,s){s.exports=o("events").EventEmitter},{events:7}],29:[function(o,s,a){a=s.exports=o("./lib/_stream_readable.js"),a.Stream=a,a.Readable=a,a.Writable=o("./lib/_stream_writable.js"),a.Duplex=o("./lib/_stream_duplex.js"),a.Transform=o("./lib/_stream_transform.js"),a.PassThrough=o("./lib/_stream_passthrough.js"),a.finished=o("./lib/internal/streams/end-of-stream.js"),a.pipeline=o("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(o,s,a){function l(f,m){for(var h in f)m[h]=f[h]}function c(f,m,h){return d(f,m,h)}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var u=o("buffer"),d=u.Buffer;d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?s.exports=u:(l(u,a),a.Buffer=c),c.prototype=Object.create(d.prototype),l(d,c),c.from=function(f,m,h){if(typeof f=="number")throw new TypeError("Argument must not be a number");return d(f,m,h)},c.alloc=function(f,m,h){if(typeof f!="number")throw new TypeError("Argument must be a number");var g=d(f);return m===void 0?g.fill(0):typeof h=="string"?g.fill(m,h):g.fill(m),g},c.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return d(f)},c.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return u.SlowBuffer(f)}},{buffer:3}],31:[function(o,s,a){function l(P){if(!P)return"utf8";for(var I;;)switch(P){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return P;default:if(I)return;P=(""+P).toLowerCase(),I=!0}}function c(P){var I=l(P);if(typeof I!="string"&&(k.isEncoding===R||!R(P)))throw new Error("Unknown encoding: "+P);return I||P}function u(P){this.encoding=c(P);var I;switch(this.encoding){case"utf16le":this.text=g,this.end=E,I=4;break;case"utf8":this.fillLast=h,I=4;break;case"base64":this.text=b,this.end=w,I=3;break;default:return this.write=y,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=k.allocUnsafe(I)}function d(P){return 127>=P?0:P>>5==6?2:P>>4==14?3:P>>3==30?4:P>>6==2?-1:-2}function f(P,I,$){var L=I.length-1;if(L<$)return 0;var N=d(I[L]);return 0<=N?(0=L)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1],$.slice(0,-1)}return $}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=P[P.length-1],P.toString("utf16le",I,P.length-1)}function E(P){var I=P&&P.length?this.write(P):"";if(this.lastNeed){var $=this.lastTotal-this.lastNeed;return I+this.lastChar.toString("utf16le",0,$)}return I}function b(P,I){var $=(P.length-I)%3;return $==0?P.toString("base64",I):(this.lastNeed=3-$,this.lastTotal=3,$==1?this.lastChar[0]=P[P.length-1]:(this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1]),P.toString("base64",I,P.length-$))}function w(P){var I=P&&P.length?this.write(P):"";return this.lastNeed?I+this.lastChar.toString("base64",0,3-this.lastNeed):I}function y(P){return P.toString(this.encoding)}function _(P){return P&&P.length?this.write(P):""}var k=o("safe-buffer").Buffer,R=k.isEncoding||function(P){switch(P=""+P,P&&P.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};a.StringDecoder=u,u.prototype.write=function(P){if(P.length===0)return"";var I,$;if(this.lastNeed){if(I=this.fillLast(P),I===void 0)return"";$=this.lastNeed,this.lastNeed=0}else $=0;return $"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Sr)},{}],"/":[function(o,s){function a(w){return w.replace(/a=ice-options:trickle\s\n/g,"")}function l(w){console.warn(w)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const c=o("debug")("simple-peer"),u=o("get-browser-rtc"),d=o("randombytes"),f=o("readable-stream"),m=o("queue-microtask"),h=o("err-code"),{Buffer:g}=o("buffer"),E=65536;class b extends f.Duplex{constructor(y){if(y=Object.assign({allowHalfOpen:!1},y),super(y),this._id=d(4).toString("hex").slice(0,7),this._debug("new peer %o",y),this.channelName=y.initiator?y.channelName||d(20).toString("hex"):null,this.initiator=y.initiator||!1,this.channelConfig=y.channelConfig||b.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},b.config,y.config),this.offerOptions=y.offerOptions||{},this.answerOptions=y.answerOptions||{},this.sdpTransform=y.sdpTransform||(_=>_),this.streams=y.streams||(y.stream?[y.stream]:[]),this.trickle=y.trickle===void 0||y.trickle,this.allowHalfTrickle=y.allowHalfTrickle!==void 0&&y.allowHalfTrickle,this.iceCompleteTimeout=y.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=y.wrtc&&typeof y.wrtc=="object"?y.wrtc:u(),!this._wrtc)throw h(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(_){return void this.destroy(h(_,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=_=>{this._onIceCandidate(_)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(_=>{this.destroy(h(_,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=_=>{this._setupData(_)},this.streams&&this.streams.forEach(_=>{this.addStream(_)}),this._pc.ontrack=_=>{this._onTrack(_)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(y){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof y=="string")try{y=JSON.parse(y)}catch{y={}}this._debug("signal()"),y.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),y.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(y.transceiverRequest.kind,y.transceiverRequest.init)),y.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(y.candidate):this._pendingCandidates.push(y.candidate)),y.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(y)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(_=>{this._addIceCandidate(_)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(_=>{this.destroy(h(_,"ERR_SET_REMOTE_DESCRIPTION"))}),y.sdp||y.candidate||y.renegotiate||y.transceiverRequest||this.destroy(h(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(y){const _=new this._wrtc.RTCIceCandidate(y);this._pc.addIceCandidate(_).catch(k=>{!_.address||_.address.endsWith(".local")?l("Ignoring unsupported ICE candidate."):this.destroy(h(k,"ERR_ADD_ICE_CANDIDATE"))})}send(y){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(y)}}addTransceiver(y,_){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(y,_),this._needsNegotiation()}catch(k){this.destroy(h(k,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:y,init:_}})}}addStream(y){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),y.getTracks().forEach(_=>{this.addTrack(_,y)})}}addTrack(y,_){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const k=this._senderMap.get(y)||new Map;let R=k.get(_);if(!R)R=this._pc.addTrack(y,_),k.set(_,R),this._senderMap.set(y,k),this._needsNegotiation();else throw R.removed?h(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):h(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(y,_,k){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const R=this._senderMap.get(y),P=R?R.get(k):null;if(!P)throw h(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");_&&this._senderMap.set(_,R),P.replaceTrack==null?this.destroy(h(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):P.replaceTrack(_)}removeTrack(y,_){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const k=this._senderMap.get(y),R=k?k.get(_):null;if(!R)throw h(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{R.removed=!0,this._pc.removeTrack(R)}catch(P){P.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(R):this.destroy(h(P,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(y){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),y.getTracks().forEach(_=>{this.removeTrack(_,y)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,m(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(y){this._destroy(y,()=>{})}_destroy(y,_){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",y&&(y.message||y)),m(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",y&&(y.message||y)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,y&&this.emit("error",y),this.emit("close"),_()}))}_setupData(y){if(!y.channel)return this.destroy(h(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=y.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=E),this.channelName=this._channel.label,this._channel.onmessage=k=>{this._onChannelMessage(k)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=k=>{const R=k.error instanceof Error?k.error:new Error(`Datachannel error: ${k.message} ${k.filename}:${k.lineno}:${k.colno}`);this.destroy(h(R,"ERR_DATA_CHANNEL"))};let _=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(_&&this._onChannelClose(),_=!0):_=!1},5e3)}_read(){}_write(y,_,k){if(this.destroyed)return k(h(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(y)}catch(R){return this.destroy(h(R,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>E?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=k):k(null)}else this._debug("write before connect"),this._chunk=y,this._cb=k}_onFinish(){if(!this.destroyed){const y=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?y():this.once("connect",y)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(y=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(y.sdp=a(y.sdp)),y.sdp=this.sdpTransform(y.sdp);const _=()=>{if(!this.destroyed){const k=this._pc.localDescription||y;this._debug("signal"),this.emit("signal",{type:k.type,sdp:k.sdp})}};this._pc.setLocalDescription(y).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?_():this.once("_iceComplete",_))}).catch(k=>{this.destroy(h(k,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(y=>{this.destroy(h(y,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(y=>{y.mid||!y.sender.track||y.requested||(y.requested=!0,this.addTransceiver(y.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(y=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(y.sdp=a(y.sdp)),y.sdp=this.sdpTransform(y.sdp);const _=()=>{if(!this.destroyed){const k=this._pc.localDescription||y;this._debug("signal"),this.emit("signal",{type:k.type,sdp:k.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(y).then(()=>{this.destroyed||(this.trickle||this._iceComplete?_():this.once("_iceComplete",_))}).catch(k=>{this.destroy(h(k,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(y=>{this.destroy(h(y,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(h(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const y=this._pc.iceConnectionState,_=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",y,_),this.emit("iceStateChange",y,_),(y==="connected"||y==="completed")&&(this._pcReady=!0,this._maybeReady()),y==="failed"&&this.destroy(h(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),y==="closed"&&this.destroy(h(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(y){const _=k=>(Object.prototype.toString.call(k.values)==="[object Array]"&&k.values.forEach(R=>{Object.assign(k,R)}),k);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(k=>{const R=[];k.forEach(P=>{R.push(_(P))}),y(null,R)},k=>y(k)):0{if(this.destroyed)return;const R=[];k.result().forEach(P=>{const I={};P.names().forEach($=>{I[$]=P.stat($)}),I.id=P.id,I.type=P.type,I.timestamp=P.timestamp,R.push(_(I))}),y(null,R)},k=>y(k)):y(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const y=()=>{this.destroyed||this.getStats((_,k)=>{if(this.destroyed)return;_&&(k=[]);const R={},P={},I={};let $=!1;k.forEach(N=>{(N.type==="remotecandidate"||N.type==="remote-candidate")&&(R[N.id]=N),(N.type==="localcandidate"||N.type==="local-candidate")&&(P[N.id]=N),(N.type==="candidatepair"||N.type==="candidate-pair")&&(I[N.id]=N)});const L=N=>{$=!0;let F=P[N.localCandidateId];F&&(F.ip||F.address)?(this.localAddress=F.ip||F.address,this.localPort=+F.port):F&&F.ipAddress?(this.localAddress=F.ipAddress,this.localPort=+F.portNumber):typeof N.googLocalAddress=="string"&&(F=N.googLocalAddress.split(":"),this.localAddress=F[0],this.localPort=+F[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let z=R[N.remoteCandidateId];z&&(z.ip||z.address)?(this.remoteAddress=z.ip||z.address,this.remotePort=+z.port):z&&z.ipAddress?(this.remoteAddress=z.ipAddress,this.remotePort=+z.portNumber):typeof N.googRemoteAddress=="string"&&(z=N.googRemoteAddress.split(":"),this.remoteAddress=z[0],this.remotePort=+z[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(k.forEach(N=>{N.type==="transport"&&N.selectedCandidatePairId&&L(I[N.selectedCandidatePairId]),(N.type==="googCandidatePair"&&N.googActiveConnection==="true"||(N.type==="candidatepair"||N.type==="candidate-pair")&&N.selected)&&L(N)}),!$&&(!Object.keys(I).length||Object.keys(P).length))return void setTimeout(y,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(F){return this.destroy(h(F,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const N=this._cb;this._cb=null,N(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};y()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>E)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(y=>{this._pc.removeTrack(y),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(y){this.destroyed||(y.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:y.candidate.candidate,sdpMLineIndex:y.candidate.sdpMLineIndex,sdpMid:y.candidate.sdpMid}}):!y.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),y.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(y){if(this.destroyed)return;let _=y.data;_ instanceof ArrayBuffer&&(_=g.from(_)),this.push(_)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const y=this._cb;this._cb=null,y(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(y){this.destroyed||y.streams.forEach(_=>{this._debug("on track"),this.emit("track",y.track,_),this._remoteTracks.push({track:y.track,stream:_}),this._remoteStreams.some(k=>k.id===_.id)||(this._remoteStreams.push(_),m(()=>{this._debug("on stream"),this.emit("stream",_)}))})}_debug(){const y=[].slice.call(arguments);y[0]="["+this._id+"] "+y[0],c.apply(null,y)}}b.WEBRTC_SUPPORT=!!u(),b.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},b.channelConfig={},s.exports=b},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})})(fI);var iJ=fI.exports;const oJ=Ga(iJ);var sJ=oJ;function G0(e,t){e.send(JSON.stringify(t))}var pI="signaling.rxdb.info",aR="wss://"+pI+"/",lR=!1,aJ=1e3*60*2;function lJ({signalingServerUrl:e,wrtc:t,config:n,webSocketConstructor:r}){cJ(),e=e||aR,r=r||WebSocket,e.includes(pI)&&!lR&&(lR=!0,console.warn(["RxDB Warning: You are using the RxDB WebRTC replication plugin","but you did not specify your own signaling server url.","By default it will use a signaling server provided by RxDB at "+aR,"This server is made for demonstration purposes and tryouts. It is not reliable and might be offline at any time.","In production you must always use your own signaling server instead.","Learn how to run your own server at https://rxdb.info/replication-webrtc.html","Also leave a ⭐ at the RxDB github repo 🙏 https://github.com/pubkey/rxdb 🙏"].join(" ")));var i=async o=>{var s=new Tn,a=new Tn,l=new Tn,c=new Tn,u=new Tn,d=new Map,f=!1,m,h=void 0;g(),(async()=>{for(;await mj(aJ/2),!f;)h&&G0(h,{type:"ping"})})();function g(){f||(h=new r(e),h.onclose=()=>g(),h.onopen=()=>{xt(h).onmessage=b=>{var w=JSON.parse(b.data);switch(w.type){case"init":m=w.yourPeerId,G0(xt(h),{type:"join",room:o.topic});break;case"joined":var y=function(k){var R=!1,P=new sJ({initiator:k>m,wrtc:t,config:n,trickle:!0});P.id=cc(10),d.set(k,P),P.on("signal",I=>{G0(xt(h),{type:"signal",senderPeerId:m,receiverPeerId:k,room:o.topic,data:I})}),P.on("data",I=>{I=JSON.parse(I.toString()),I.result?c.next({peer:P,response:I}):l.next({peer:P,message:I})}),P.on("error",I=>{u.next(ot("RC_WEBRTC_PEER",{error:I})),P.destroy(),R||(R=!0,a.next(P))}),P.on("connect",()=>{s.next(P)}),P.on("close",()=>{R||(R=!0,a.next(P)),y(k)})};w.otherPeerIds.forEach(k=>{k===m||d.has(k)||y(k)});break;case"signal":var _=Ws(d,w.senderPeerId);_.signal(w.data);break}}})}var E={error$:u,connect$:s,disconnect$:a,message$:l,response$:c,async send(b,w){await b.send(JSON.stringify(w))},destroy(){return f=!0,xt(h).close(),u.complete(),s.complete(),a.complete(),l.complete(),c.complete(),Ci}};return E};return i}function cJ(){if(typeof Eo>"u"||typeof Eo.nextTick!="function")throw ot("RC7")}async function uJ(e){var t=e.collection;Zu(RS),e.pull&&(e.pull.batchSize||(e.pull.batchSize=20)),e.push&&(e.push.batchSize||(e.push.batchSize=20)),t.database.multiInstance&&await t.database.waitForLeadership();var n=0,r=cc(10);function i(){var l=n++;return t.database.token+"|"+r+"|"+l}var o=await t.database.storageToken,s=new dJ(t,e,await e.connectionHandlerCreator(e));s.subs.push(s.connectionHandler.error$.subscribe(l=>s.error$.next(l)),s.connectionHandler.disconnect$.subscribe(l=>s.removePeer(l))),s.subs.push(s.connectionHandler.message$.pipe(Gt(l=>l.message.method==="token")).subscribe(l=>{s.connectionHandler.send(l.peer,{id:l.message.id,result:o})}));var a=s.connectionHandler.connect$.pipe(Gt(()=>!s.canceled)).subscribe(async l=>{if(e.isPeerValid){var c=await e.isPeerValid(l);if(!c)return}var u;try{var d=await W0(s.connectionHandler,l,{id:i(),method:"token",params:[]});u=d.result}catch(b){s.error$.next(ot("RC_WEBRTC_PEER",{error:b}));return}var f=await eJ(t.database.hashFunction,o,u),m;if(f){var h=s.masterReplicationHandler,g=h.masterChangeStream$.subscribe(b=>{var w={id:"masterChangeStream$",result:b};s.connectionHandler.send(l,w)});s.subs.push(g,s.connectionHandler.disconnect$.pipe(Gt(b=>b===l)).subscribe(()=>g.unsubscribe()));var E=s.connectionHandler.message$.pipe(Gt(b=>b.peer===l),Gt(b=>b.message.method!=="token")).subscribe(async b=>{var{peer:w,message:y}=b,_=h[y.method].bind(h),k=await _(...y.params),R={id:y.id,result:k};s.connectionHandler.send(w,R)});s.subs.push(E)}else m=NX({replicationIdentifier:[t.name,e.topic,u].join("||"),collection:t,autoStart:!0,deletedField:"_deleted",live:!0,retryTime:e.retryTime,waitForLeadership:!1,pull:e.pull?Object.assign({},e.pull,{async handler(b){var w=await W0(s.connectionHandler,l,{method:"masterChangesSince",params:[b,xt(e.pull).batchSize],id:i()});return w.result},stream$:s.connectionHandler.response$.pipe(Gt(b=>b.response.id==="masterChangeStream$"),qt(b=>b.response.result))}):void 0,push:e.push?Object.assign({},e.push,{async handler(b){var w=await W0(s.connectionHandler,l,{method:"masterWrite",params:[b],id:i()});return w.result}}):void 0});s.addPeer(l,m)});return s.subs.push(a),s}var dJ=function(){function e(n,r,i){this.peerStates$=new ks(new Map),this.canceled=!1,this.subs=[],this.error$=new Tn,this.collection=n,this.options=r,this.connectionHandler=i,this.collection.onDestroy.push(()=>this.cancel()),this.masterReplicationHandler=BY(n.storageInstance,n.conflictHandler,n.database.token)}var t=e.prototype;return t.addPeer=function(r,i){var o={peer:r,replicationState:i,subs:[]};this.peerStates$.next(this.peerStates$.getValue().set(r,o)),i&&o.subs.push(i.error$.subscribe(s=>this.error$.next(s)))},t.removePeer=function(r){var i=Ws(this.peerStates$.getValue(),r);this.peerStates$.getValue().delete(r),this.peerStates$.next(this.peerStates$.getValue()),i.subs.forEach(o=>o.unsubscribe()),i.replicationState&&i.replicationState.cancel()},t.awaitFirstPeer=function(){return Ln(this.peerStates$.pipe(Gt(r=>r.size>0)))},t.cancel=async function(){this.canceled||(this.canceled=!0,this.subs.forEach(r=>r.unsubscribe()),Array.from(this.peerStates$.getValue().keys()).forEach(r=>{this.removePeer(r)}),await this.connectionHandler.destroy())},e}();Zu(zX);Zu(KX);Zu(RS);Zu(ZX);function fJ(e){return Promise.all(e.character_traits.map(t=>t.split(/[[\]]/)).map(async([t,n])=>{const r=await ln.character_traits.findOne(t.trim()).exec();return Object.assign({},r==null?void 0:r.toMutableJSON(),{parameter:n==null?void 0:n.trim()})}))}const pJ={expand:async function(){const e=await ln.getLocal("gbdata_meta"),[t,n]=await Promise.all([this.populate("character_plays").then(i=>i.map(o=>o.toMutableJSON())),fJ(this)]);return Object.assign({},this.toMutableJSON(),{character_plays:t,character_traits:n,_inf:this.id==="Pneuma"?0:void 0,statLine:`${this.jog}"/${this.sprint}" | ${this.tac} | ${this.kickdice}/${this.kickdist}" | ${this.def}+ | ${this.arm} | ${this.inf}/${this.infmax} | ${this.reach?2:1}"`,version:e==null?void 0:e.get("version")})}},hJ={title:"Guild Ball model",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:32},name:{type:"string"},captain:{type:"boolean",default:!1},mascot:{type:"boolean",default:!1},veteran:{type:"boolean",default:!1},seasoned:{type:"boolean",default:!1},hp:{type:"integer",minimum:0},recovery:{type:"integer",minimum:0},jog:{type:"integer",minimum:0},sprint:{type:"integer",minimum:0},tac:{type:"integer",minimum:1},kickdice:{type:"integer",minimum:1},kickdist:{type:"integer",minimum:0},def:{type:"integer",minimum:1,maximum:6},arm:{type:"integer",minimum:0},inf:{type:"integer",minimum:0},infmax:{type:"integer",minimum:0},reach:{type:"boolean",default:!1},benched:{type:"string"},dehcneb:{type:"string"},playbook:{type:"array",minItems:2,maxItems:2,items:{type:"array",minItems:7,maxItems:7,items:{type:["string","null"]}}},character_plays:{type:"array",ref:"character_plays",items:{type:"string"}},character_traits:{type:"array",ref:"character_traits",items:{type:"string"}},heroic:{type:"string"},legendary:{type:"string"},types:{type:"string"},base:{type:"integer",enum:[30,40,50]},guild1:{type:"string",maxLength:32},guild2:{type:"string",maxLength:32,default:""},gbcp:{type:"boolean",default:!1}},required:["name","hp","recovery","jog","sprint","tac","kickdice","kickdist","def","arm","inf","infmax","playbook","types","base","guild1"],indexes:["guild1","guild2"]},mJ={title:"Guild Ball guild",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:32},minor:{type:"boolean",default:!1},color:{type:"string"},shadow:{type:"string"},darkColor:{type:"string"},roster:{type:"array",items:{type:"string"}}},required:["color","roster"]},gJ={title:"Guild Ball character play",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:64},text:{type:"string"},CST:{type:["string","integer"]},RNG:{type:["string","integer"]},SUS:{type:"boolean",default:!1},OPT:{type:"boolean",default:!1}},required:["text","CST","RNG","SUS","OPT"]},vJ={title:"Guild Ball character trait",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:64},active:{type:"boolean",default:!1},text:{type:"string"}},required:["text"]},yJ={title:"Guild Ball Game State",version:0,primaryKey:"_id",type:"object",properties:{_id:{type:"string",maxLength:128},guild:{type:"string",ref:"guilds"},score:{type:"integer",minimum:0,default:0},momentum:{type:"integer",minimum:0,default:0},roster:{type:"array",items:{type:"object",properties:{name:{type:"string",ref:"models"},health:{type:"integer",minimum:0}},required:["name","health"]}},currentStep:{type:"string",enum:["Guilds","Draft","Game"]},navigateTo:{type:"string",enum:["Guilds","Draft","Game"]}}},ln=await qY({name:"gb_playbook",localDocuments:!0,storage:EX()});await ln.addCollections({guilds:{schema:mJ},models:{schema:hJ,methods:pJ},character_plays:{schema:gJ},character_traits:{schema:vJ},game_state:{schema:yJ,localDocuments:!0}});const bJ={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]},{urls:["turn:standard.relay.metered.ca:80","turn:standard.relay.metered.ca:80?transport=tcp","turn:standard.relay.metered.ca:443","turns:standard.relay.metered.ca:443?transport=tcp"],username:"25ee3bdfcc273a8e3ae9db71",credential:"XVIpxKTNnMR7XQDK"}]};function TS(e,t){return uJ({collection:ln.game_state,connectionHandlerCreator:lJ({signalingServerUrl:e,config:bJ}),topic:t,pull:{},push:{}}).then(n=>(n.error$.subscribe(r=>{console.log("replication error:"),console.dir(r)}),n.peerStates$.subscribe(r=>{console.log("new peer states:"),console.dir(r)}),n))}const hI=C.createContext({}),wJ=e=>{const t=C.useMemo(()=>ln.getLocal$("settings"),[]);return C.useEffect(()=>{if(!t)return;const n=t.subscribe(r=>{if(!r){ln==null||ln.upsertLocal("settings",mI).catch(console.error);return}});return()=>n.unsubscribe()},[t]),v.jsx(hI.Provider,{value:{setting$:t},children:e.children})},ui=()=>C.useContext(hI),mI={dataSet:"GB-Playbook-4-6.json",language:"auto",initialScreen:"/game",gameSize:6,networkPlay:!1,uiPreferences:{displayStatLine:!1},cardPreferences:{preferredStyle:"gbcp"},gamePlayRoute:"/game",libraryRoute:"/library"},OS=C.createContext(null),fs=e=>{const t=C.useContext(OS);return v.jsx(Ox,{container:t,children:e.children})},xJ=jt.forwardRef((e,t)=>v.jsx(gF,{position:"static",className:"no-print",children:v.jsxs(xF,{variant:"dense",children:[v.jsx(rn,{ref:t,sx:{display:"flex",flexDirection:"row",width:"100%"}}),v.jsx(Fo,{size:"small",color:"inherit",onClick:e.onClick,children:v.jsx(RO,{})})]})})),cR=jt.forwardRef((e,t)=>{const{href:n,...r}=e;return v.jsx(_T,{ref:t,to:n,...r,role:void 0})}),SJ=Sx({palette:{mode:"dark",primary:{main:"#3d708f"},secondary:{main:"#ffb300"},background:{default:"#121a22"}},components:{MuiCssBaseline:{styleOverrides:{body:{background:"linear-gradient(120deg, black, #221a22, #5f405f, #221a22, black)"},"@media print":{body:{background:"white"}}}},MuiLink:{defaultProps:{component:cR}},MuiButtonBase:{defaultProps:{LinkComponent:cR}}}}),Eh=e=>v.jsx(MD,{to:e.to,style:{textDecoration:"inherit",color:"inherit"},onClick:e.onClick,children:({isActive:t})=>v.jsx(oz,{selected:t,children:e.children})}),_J=()=>{const[e,t]=C.useState(null),[n,r]=C.useState(!1);return v.jsxs(Ez,{theme:SJ,children:[v.jsx(fW,{}),v.jsxs("div",{className:"App",children:[v.jsx(xJ,{ref:i=>t(i),onClick:()=>r(!0)}),v.jsx(CJ,{drawer:n,setDrawer:r}),v.jsx(OS.Provider,{value:e,children:v.jsx(nx,{})})]})]})};function CJ(e){const{drawer:t,setDrawer:n}=e,{setting$:r}=ui(),[i,o]=C.useState(),[s,a]=C.useState();return C.useEffect(()=>{const l=r==null?void 0:r.pipe(qt(u=>u==null?void 0:u.toJSON().data.gamePlayRoute)).subscribe(u=>o(u)),c=r==null?void 0:r.pipe(qt(u=>u==null?void 0:u.toJSON().data.libraryRoute)).subscribe(u=>a(u));return()=>{l==null||l.unsubscribe(),c==null||c.unsubscribe()}}),v.jsxs(q6,{anchor:"right",open:t,onClose:()=>n(!1),PaperProps:{sx:{width:"275px"}},ModalProps:{keepMounted:!0},children:[v.jsxs(rf,{children:[v.jsxs(wo,{children:[v.jsx("img",{src:new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAJaUlEQVRYR+2YeVjVVRrHP3fj3ssqYCwqoA5iYvloljbYOE8GqOk8hDpZrizqkE5mapmKWGJj82SFKYwLomTpqJTmxthoY5lLZW65IEEsAgKxidcLd4E7zzkoiVzF0uqPmXMf/uD3u+fc7/m+3+973vcoxm2IsnEvhgIaLY0Ufp2P1WxFoVDci1VR/B/gXfL4izDYYGmQIbbZ7l499xQgVsj/6nvqjHWoVWo0ag0NjQ13xeE9A6hUKjBcNVJ2ogQ3nRtGk5HK2iqc9U6/PUClQkmdpY6e3sFM6DOOLj6dMZgMpO1YT/rudHRa3c8O910zqECB1daAi4MTb0cuRWlV8P4H7xPy+xB6PtCTWe/OZt+xT3FxdKaxsfEns3nXAAV7BvNVHunUl1fCXuLFmS+S9E4SQUFBnM86z47PdzB/1QI8XD1+lh7vGKBw5fUP2BD+FC4VzwXAR/36MTv0RSZOnMimjZvo0KEDBQUF7D68h7kp81oAFLPF3DtxeZsABUONtkZMVhPWxgZstkYJVKlU4qByQKvWcsVsoH+nR3gpdCYxsTGsS1tH586dycvLY+ehXcxcNgsnnTPWBosMsUqlQuegw0HtINe+HdBbApRHlQ3Jjk6txd/NDz/3TrjqXTFbLZTVlpFfXUB1XTXmBgsDuzzGrCdmEB0Tzfp16wkICCA/P5+dX+xixdZk+vfsRzsXd8wWM4VlhWQVZFFe/YN0uVqtvqU+7QIUrFkaLHJ3A7v+gcg+Efg6+9gV+KfZB/jgm00EtPMnYej8ZoBdu3bl7JmzoEKydfMQrt/0r3+SnvkeBqMBR52jXY22AiiYszRY0Wt0THssjr5+D1FeWs6GjRs4dPgwZWVl6HQ6evYIJvKpSB4f9DhXrUYOZR8mPDi0VYhN9SY2btrI3r17KSouknMffOBBxo8bx0N9+5JXkiedXlBaiF6nb8VkK4DX9TA/9BV6+N7P8uQVvLpwIVWVVXYZfHLYk6SlpuHt4y3fT4qdxNq0tQQHB7Ny5Uri4uI4d+5cq7mCiKnTprJi+QqKyouISozmitEgw32jJlsAFKG9YrpCbP9ohvUcSuLriSTEJ8jFu/h1IjwiEqeOfpiMRrIPH+Tf+/fLd926dePAgQP4+voSHR1Neno6Hh4e1NXVyb/Q0FDCwsJwdnaWYDMyMmQkxIiOiSFt7Voyj2QyJ3kurs6uLVhsBih2ZLaa8XH25u0Rb3L0yFEGDBggF4kYEs5TS5LI0jgzwNudK/Vmgh017Exdxd8S4qk3mYiIiGD79u1MmDCBDRs2SJcLJtLS0oiKimrB4MWLFxk7diwHDx6UzzMzMxkyZAij458lpygHvVYv9S9GM0CVQsXl+ss83XsUz/YdzfA/DWfPrj0EBvgze1smju3v49KlUiorayi+WIyXWskLTw1l6avzWb78XbmYSCtLly4lOTlZ/h8fH09iYiJWq7UZoACt0WioqKigV69elJaWSh3v37ef1dvXsGzrcjxc3WloaCoymgHKE8Fk4LVhCfzOqSuduvhRVVHJ9JfnED57Pp9/+Q1FpT/gpVLygKcrLiYTaqMRn473MezpEdRU10jN5eTkSJBubm5kZ2fj6ekpk7lg9Powm804ODgwb948lixZgru7O8VFxZwpPMuk1yfj4uTSHOYWGhQhXjb6bYxFVwnsHihDFL/8HwQ+OpBTJ7+lt7cnTqZ6qvMKqLmQg8OVWob+ZSKjZ8/gxIkTzJkzR+5cAOzTpw/Hjx+3ayzBqEjW27ZtY+TIkSiUCnKzc1G5qhjx8ii0Gu21s+oGBsVKFquF5c8kUZ1XRffg7k1hWrKUkD8+gflSCUVnzmP4Pg+9wYCvV3t8vTwJCnucoTOe5/ixYxKgYOuNN96gd+/eEqC93uRmgILdnOwclC4qRs75iQCfi5vK+BHP8PWO3SgrKvHz9cLT3Q1NRQWqgkLcpk2m//ix1JSXk5KSIpmZMmUKrq6uMsTt27dvFWKLxSJ1OHfuXLkZIYOii0WcyjvN5CVTcHX60cktQnwzg6IvC+jalc1Ll6E3XOVyXj6qsjKsF7LRqtX0+2scr+zfy9+TkiTbp06dQqfX0T3oGvvXTCIAXWfSnkmGDB3Cnt17SM5IIWXbSvsmsRdiQb2o4cJCQ1m94FU8KyqpPXwUtwB/VI560msqmB4fj6W+noEDB/LZZ59JoJGRkTLlaLVaaZyb00xJSQljxoxp/r5INyEDQhg192l5TmsdtM3J+rYMih/z8fGRqaBDgD+jnxyGv5MLRoWN/V9+yacij9lsMpxHjh4hMDBQ5q/L1ZdlDs3NzZWABw8ezKBBg2SizsrK4sMPP0SAFGNBwgIWvbaIzfu2sHj967RzbtfiTL41wJ7dZTWzatUqRGJdvHixXUfe36MH69evo3+//qT8ZxXfncvmnWlvUVxczMSoKPbv22d3nkgtCQsTmPHCDE5/d5rn3pwmNyfSXVO12TTaBJiamkpsbCxfHf2KLRmbOXnyJCaTiQ4dOxIeFk70hGiUGiWbjm/moxPbyPniOwY/HE5i3CI0Kg2ffPIJH3/8MVkXshCFg7e3NyEhIYwfNx4vby8OnT5E/OoEDMaraDVN9eGNo02Aq1evJiYmBpvKhhp1KzbOl2ex5ZsMTpd+i16pp+hYIZVVlXTz70bM8GiGDxhml8GCsgLSd73Hji92NhW/ApydnqVNgGtWr2HS5EnM+mgOLjpn/D38UCs11Birya8qpKi2WFbZjlpHeScj7mZsVhv15npZnHZo70uQXxAdvTpKENW11eQWf09OcQ7GeqNMKWLcqqpuE2DqmlRiJ8Xy3JbnKaktQa1UN2tFNOei5BctQKP43HB5pFKqZGoxWUyYzKZm4YtnoqEXRaz4TluNvV2AlbkVBPcKloJNXpHMlLgpTN86k8q6SrRqB2FcKeTrzU+Tmu3fbslm61rDdT3Wgq2btWZXBzeaRLAgGqOkP79FY5WVTv5+ck7G1q2MHDWKqVumy/5D7N5uOH7p6zeVQkmtycD4h8cQ2StCuu/SpUuyjbxQns3CzEWyi7sxBbS0269wPyiYEWGd2G8cTwQNkr9/pvQsqw6lUmGokGnjNwUoxW5rpN5qwkPvLg1RVVclTXDL0DZn1F+BwSatN4latJ2CLY1SIw3Q5i3AL63Bm10kgMr8dMOxcyun3c7Ft51zBy/bvPq4gzWuHZq/UojvGFBryv83b/n/CxJONjR0KMriAAAAAElFTkSuQmCC",import.meta.url).href,style:{borderRadius:5.4},alt:""}),v.jsx(Ss,{style:{textAlign:"center"},children:v.jsx(_t,{variant:"h6",fontFamily:"Comfortaa",children:"GB Playbook"})})]}),v.jsx(Lo,{}),v.jsx(Eh,{to:i??"/game",onClick:()=>n(!1),children:v.jsx(Ss,{children:"Game Play"})}),v.jsx(Eh,{to:s??"/library",onClick:()=>n(!1),children:v.jsx(Ss,{children:"Library"})}),v.jsx(Eh,{to:"/print",onClick:()=>n(!1),children:v.jsx(Ss,{children:"Card Printer"})}),v.jsx(Eh,{to:"/settings",onClick:()=>n(!1),children:v.jsx(Ss,{children:"Settings"})}),v.jsx("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"1em"},children:v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://github.com/cleech/GBPlaybook/blob/pwa/README.md",children:"About"})})})]}),v.jsx(Lo,{}),v.jsxs(rf,{children:[v.jsx(wo,{children:v.jsx(Ss,{children:"Rules Documents:"})}),v.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-Rulebook-4.1.pdf",children:"Season 4 Core Rulebook"})}),v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-FAQ-19-12-20.pdf",children:"Season 4 FAQ"})}),v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-RegionalCup-Rules-200128__1.pdf",children:"Organized Play Rules"})})]})]}),v.jsx(Lo,{}),v.jsxs(rf,{children:[v.jsx(wo,{children:v.jsx(Ss,{children:"Community Links:"})}),v.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://steamforged.com/pages/guild-ball",children:"Steamforged Games"})}),v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://discord.gg/fvpFSfm976",children:"Guild Ball Community Project"})}),v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://www.longshanks.org/systems/guildball/",children:"Longshanks"})})]})]})]})}const kJ=Wn(v.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),EJ=Wn([v.jsx("path",{d:"M5 19h14V5H5zM16.5 6c.83 0 1.5.67 1.5 1.5S17.33 9 16.5 9 15 8.33 15 7.5 15.67 6 16.5 6m0 9c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5M12 10.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5M7.5 6C8.33 6 9 6.67 9 7.5S8.33 9 7.5 9 6 8.33 6 7.5 6.67 6 7.5 6m0 9c.83 0 1.5.67 1.5 1.5S8.33 18 7.5 18 6 17.33 6 16.5 6.67 15 7.5 15",opacity:".3"},"0"),v.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14z"},"1"),v.jsx("circle",{cx:"7.5",cy:"16.5",r:"1.5"},"2"),v.jsx("circle",{cx:"7.5",cy:"7.5",r:"1.5"},"3"),v.jsx("circle",{cx:"12",cy:"12",r:"1.5"},"4"),v.jsx("circle",{cx:"16.5",cy:"16.5",r:"1.5"},"5"),v.jsx("circle",{cx:"16.5",cy:"7.5",r:"1.5"},"6")],"CasinoTwoTone"),gI=Wn([v.jsx("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m-2 13-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9z",opacity:".3"},"0"),v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"},"1")],"CheckCircleTwoTone"),jS=Wn(v.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),dc=Wn(v.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),RJ=Wn(v.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),PJ=Wn(v.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),TJ=Wn(v.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"}),"Sync"),OJ=new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1});function am(e){return e===0?1:e*am(e-1)}function jJ(e,t,n){if(!e||!t)return[];const r=t,o=1-Math.pow((e-1)/6,n?2:1),s=[...Array(t).keys()].map(l=>l+1).map(l=>am(r)/(am(l)*am(r-l))*Math.pow(o,l)*Math.pow(1-o,r-l));return[...Array(t).keys()].map(l=>s.slice(l).reduce((c,u)=>c+u,0)).map(l=>Math.min(l,.999))}function uR(e){const{value:t,setValue:n,clamp:r}=e;return v.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v.jsxs(Vf,{size:"small",variant:"contained",children:[v.jsx(yn,{onClick:i=>{i.stopPropagation(),r(t-1)&&n(t-1)},children:v.jsx(RJ,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(yn,{disabled:!0,size:"small",children:v.jsx(_t,{variant:"body2",color:"text.primary",children:t})}),v.jsx(yn,{onClick:i=>{i.stopPropagation(),r(t+1)&&n(t+1)},children:v.jsx(kJ,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function LJ(){const[e,t]=C.useState(null),n=!!e,[r,i]=C.useState(4),[o,s]=C.useState(4),[a,l]=C.useState(!1);return v.jsxs(v.Fragment,{children:[v.jsx(Fo,{size:"small",onClick:c=>{t(e?null:c.currentTarget)},children:v.jsx(EJ,{})}),v.jsxs(Uv,{open:n,anchorEl:e,onClose:()=>{t(null)},children:[v.jsx(_t,{variant:"h5",textAlign:"center",children:"Dice Odds"}),v.jsx(Lo,{}),v.jsxs("div",{style:{margin:"1em",display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.5em"},children:[v.jsx(_t,{children:"Target Number :"}),v.jsx(uR,{value:r,setValue:i,clamp:c=>c>1&&c<7}),v.jsx(_t,{children:"Dice Pool :"}),v.jsx(uR,{value:o,setValue:s,clamp:c=>c>0}),v.jsx(_t,{children:"Reroll :"}),v.jsx(Is,{checked:a,onChange:(c,u)=>{l(u)},sx:{padding:0}})]}),v.jsx(Lo,{}),v.jsxs("div",{style:{margin:"1em",display:"grid",gap:"0em 1em",justifyContent:"center",justifyItems:"center",gridTemplateColumns:"auto auto"},children:[v.jsx(_t,{sx:{textDecoration:"underline"},children:"Hits"}),v.jsx(_t,{sx:{textDecoration:"underline"},children:"Chance"}),jJ(r,o,a).map((c,u)=>v.jsxs(C.Fragment,{children:[v.jsxs("div",{children:[u+1,"+"]}),v.jsx("div",{className:`dice-bin-${Math.floor(c*10)}`,style:{padding:"0 1em",margin:"1px",width:"100%"},children:OJ.format(c)})]},u))]})]})]})}const IJ={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class lg{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||IJ,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[a,l]=s;for(let c=0;c{let[a,l]=s;for(let c=0;c{e=r,t=i});return n.resolve=e,n.reject=t,n}function dR(e){return e==null?"":""+e}function MJ(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const NJ=/###/g;function ff(e,t,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(NJ,"."):a}function i(){return!e||typeof e=="string"}const o=typeof t!="string"?t:t.split(".");let s=0;for(;s":">",'"':""","'":"'","/":"/"};function BJ(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>DJ[t]):e}class FJ{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const zJ=[" ",",","?","!",";"],UJ=new FJ(20);function WJ(e,t,n){t=t||"",n=n||"";const r=zJ.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=UJ.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}function W1(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;o-1&&l0?e.replace("_","-"):e}class pR extends iy{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&o?a.push(...r.split(o)):a.push(r)));const l=cg(this.data,a);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),l||!s||typeof r!="string"?l:W1(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),fR(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let l=cg(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?vI(l,r,o):l={...l,...r},fR(this.data,a,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var yI={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,i))}),t}};const hR={};class dg extends iy{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),MJ(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ts.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!WJ(t,r,i);if(s&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:o};const c=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),t=c.join(i)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const _=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${_}${s}`,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${_}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const d=this.resolve(t,n);let f=d&&d.res;const m=d&&d.usedKey||s,h=d&&d.exactUsedKey||s,g=Object.prototype.toString.apply(f),E=["[object Number]","[object Function]","[object RegExp]"],b=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&E.indexOf(g)<0&&!(typeof b=="string"&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,f,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(d.res=_,d.usedParams=this.getUsedParamsDetails(n),d):_}if(o){const _=Array.isArray(f),k=_?[]:{},R=_?h:m;for(const P in f)if(Object.prototype.hasOwnProperty.call(f,P)){const I=`${R}${o}${P}`;k[P]=this.translate(I,{...n,joinArrays:!1,ns:a}),k[P]===I&&(k[P]=f[P])}f=k}}else if(w&&typeof b=="string"&&Array.isArray(f))f=f.join(b),f&&(f=this.extendTranslation(f,t,n,r));else{let _=!1,k=!1;const R=n.count!==void 0&&typeof n.count!="string",P=dg.hasDefaultValue(n),I=R?this.pluralResolver.getSuffix(c,n.count,n):"",$=n.ordinal&&R?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",L=R&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),N=L&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${I}`]||n[`defaultValue${$}`]||n.defaultValue;!this.isValidLookup(f)&&P&&(_=!0,f=N),this.isValidLookup(f)||(k=!0,f=s);const z=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:f,K=P&&N!==f&&this.options.updateMissing;if(k||_||K){if(this.logger.log(K?"updateKey":"missingKey",c,l,s,K?N:f),o){const H=this.resolve(s,{...n,keySeparator:!1});H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Z=[];const le=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&le&&le[0])for(let H=0;H{const je=P&&se!==f?se:z;this.options.missingKeyHandler?this.options.missingKeyHandler(H,l,V,je,K,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(H,l,V,je,K,n),this.emit("missingKey",H,l,V,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?Z.forEach(H=>{const V=this.pluralResolver.getSuffixes(H,n);L&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(se=>{ce([H],s+se,n[`defaultValue${se}`]||N)})}):ce(Z,s,N))}f=this.extendTranslation(f,t,n,d,r),k&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(k||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,_?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=t.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language,r),c){const f=t.match(this.interpolator.nestingRegexp),m=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,a;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;i=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",m=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(E=>{this.isValidLookup(r)||(a=E,!hR[`${g[0]}-${E}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(hR[`${g[0]}-${E}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{if(this.isValidLookup(r))return;s=b;const w=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,u,b,E,n);else{let _;f&&(_=this.pluralResolver.getSuffix(b,n.count,n));const k=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(w.push(u+_),n.ordinal&&_.indexOf(R)===0&&w.push(u+_.replace(R,this.options.pluralSeparator)),m&&w.push(u+k)),h){const P=`${u}${this.options.contextSeparator}${n.context}`;w.push(P),f&&(w.push(P+_),n.ordinal&&_.indexOf(R)===0&&w.push(P+_.replace(R,this.options.pluralSeparator)),m&&w.push(P+k))}}let y;for(;y=w.pop();)this.isValidLookup(r)||(o=y,r=this.getResource(b,E,y,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function H0(e){return e.charAt(0).toUpperCase()+e.slice(1)}class mR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ts.create("languageUtils")}getScriptPartFromCode(t){if(t=ug(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=ug(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=H0(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=H0(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=H0(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}let GJ=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],HJ={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const VJ=["v1","v2","v3"],KJ=["v4"],gR={zero:0,one:1,two:2,few:3,many:4,other:5};function qJ(){const e={};return GJ.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:HJ[t.fc]}})}),e}class YJ{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ts.create("pluralResolver"),(!this.options.compatibilityJSON||KJ.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=qJ()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(ug(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>gR[i]-gR[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!VJ.includes(this.options.compatibilityJSON)}}function vR(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=AJ(e,t,n);return!o&&i&&typeof n=="string"&&(o=W1(e,n,r),o===void 0&&(o=W1(t,n,r))),o}class QJ{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ts.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:m,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:E,maxReplaces:b,alwaysFormat:w}=t.interpolation;this.escape=n!==void 0?n:BJ,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Pc(o):s||"{{",this.suffix=a?Pc(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?Pc(f):m||Pc("$t("),this.nestingSuffix=h?Pc(h):g||Pc(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=b||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(h){return h.replace(/\$/g,"$$$$")}const u=h=>{if(h.indexOf(this.formatSeparator)<0){const w=vR(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...i,...n,interpolationkey:h}):w}const g=h.split(this.formatSeparator),E=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(vR(n,l,E,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:E})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>c(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?c(this.escape(h)):c(h)}].forEach(h=>{for(a=0;o=h.regex.exec(t);){const g=o[1].trim();if(s=u(g),s===void 0)if(typeof d=="function"){const b=d(t,o,i);s=typeof b=="string"?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))s="";else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=dR(s));const E=h.safeValue(s);if(t=t.replace(o[0],E),f?(h.regex.lastIndex+=s.length,h.regex.lastIndex-=o[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;function a(l,c){const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const m=f.match(/'/g),h=f.match(/"/g);(m&&m.length%2===0&&!h||h.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l}for(;i=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const u=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=u.shift(),l=u,c=!0}if(o=n(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=dR(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),c&&(o=l.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}function XJ(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(s){const[a,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}}function Tc(e){const t={};return function(r,i,o){const s=i+JSON.stringify(o);let a=t[s];return a||(a=e(ug(i),o),t[s]=a),a(r)}}class JJ{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ts.create("formatter"),this.options=t,this.formats={number:Tc((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:Tc((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:Tc((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:Tc((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:Tc((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Tc(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,l)=>{const{formatName:c,formatOptions:u}=XJ(l);if(this.formats[c]){let d=a;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},m=f.locale||f.lng||i.locale||i.lng||r;d=this.formats[c](a,m,{...u,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return a},t)}}function ZJ(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class eZ extends iy{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ts.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},a={},l={};return t.forEach(c=>{let u=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,u=!1,s[f]===void 0&&(s[f]=!0),o[f]===void 0&&(o[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(a[c]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const a={};this.queue.forEach(l=>{$J(l.loaded,[o],s),ZJ(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&i{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,i,l):u=c(t,n,r,i),u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}else c(t,n,r,i,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function yR(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function bR(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Rh(){}function tZ(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class ep extends iy{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=bR(t),this.services={},this.logger=ts,this.modules={external:[]},tZ(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=yR();this.options={...i,...this.options,...bR(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function o(u){return u?typeof u=="function"?new u:u:null}if(!this.options.isClone){this.modules.logger?ts.init(o(this.modules.logger),this.options):ts.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=JJ);const d=new mR(this.options);this.store=new pR(this.options.resources,this.options);const f=this.services;f.logger=ts,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new YJ(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=o(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new QJ(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new eZ(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var h=arguments.length,g=new Array(h>1?h-1:0),E=1;E1?h-1:0),E=1;E{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Rh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=jd(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rh;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const i=jd();return t||(t=this.languages),n||(n=this.options.ns),r||(r=Rh),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&yI.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=jd();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,c)=>{c?(o(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{s(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const o=function(s,a){let l;if(typeof a!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${l.keyPrefix}${f}${h}`):m=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,i.t(m,l)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=jd();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=jd();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new mR(yR());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new ep(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rh;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new ep(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new pR(this.store.data,i),o.services.resourceStore=o.store),o.translator=new dg(o.services,i),o.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function xR(e,t,n){e.loadNamespaces(t,bI(e,n))}function SR(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,bI(e,r))}function rZ(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=t.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!i||s(o,e)))}function iZ(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(G1("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,e))return!1}}):rZ(e,t,n)}const oZ=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,sZ={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},aZ=e=>sZ[e],lZ=e=>e.replace(oZ,aZ);let H1={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:lZ};function cZ(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};H1={...H1,...e}}function uZ(){return H1}let wI;function dZ(e){wI=e}function fZ(){return wI}const pZ={type:"3rdParty",init(e){cZ(e.options.react),dZ(e)}},hZ=C.createContext();class mZ{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const gZ=(e,t)=>{const n=C.useRef();return C.useEffect(()=>{n.current=e},[e,t]),n.current};function xI(e,t,n,r){return e.getFixedT(t,n,r)}function vZ(e,t,n,r){return C.useCallback(xI(e,t,n,r),[e,t,n,r])}function yZ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=C.useContext(hZ)||{},o=n||r||fZ();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new mZ),!o){G1("You will need to pass in an i18next instance by using initReactI18next");const _=(R,P)=>typeof P=="string"?P:P&&typeof P=="object"&&typeof P.defaultValue=="string"?P.defaultValue:Array.isArray(R)?R[R.length-1]:R,k=[_,{},!1];return k.t=_,k.i18n={},k.ready=!1,k}o.options.react&&o.options.react.wait!==void 0&&G1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...uZ(),...o.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let c=i||o.options&&o.options.defaultNS;c=typeof c=="string"?[c]:c||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(_=>iZ(_,o,s)),d=vZ(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),f=()=>d,m=()=>xI(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),[h,g]=C.useState(f);let E=c.join();t.lng&&(E=`${t.lng}${E}`);const b=gZ(E),w=C.useRef(!0);C.useEffect(()=>{const{bindI18n:_,bindI18nStore:k}=s;w.current=!0,!u&&!a&&(t.lng?SR(o,t.lng,c,()=>{w.current&&g(m)}):xR(o,c,()=>{w.current&&g(m)})),u&&b&&b!==E&&w.current&&g(m);function R(){w.current&&g(m)}return _&&o&&o.on(_,R),k&&o&&o.store.on(k,R),()=>{w.current=!1,_&&o&&_.split(" ").forEach(P=>o.off(P,R)),k&&o&&k.split(" ").forEach(P=>o.store.off(P,R))}},[o,E]),C.useEffect(()=>{w.current&&u&&g(f)},[o,l,u]);const y=[h,o,u];if(y.t=h,y.i18n=o,y.ready=u,u||!u&&!a)return y;throw new Promise(_=>{t.lng?SR(o,t.lng,c,()=>_()):xR(o,c,()=>_())})}const{slice:bZ,forEach:wZ}=[];function xZ(e){return wZ.call(bZ.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const _R=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,SZ=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!_R.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!_R.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},CR={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=SZ(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let a=0;a0&&s[a].substring(0,l)===t&&(n=s[a].substring(l+1))}}return n}};let Ld=null;const kR=()=>{if(Ld!==null)return Ld;try{Ld=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ld=!1}return Ld};var kZ={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&kR())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&kR()&&window.localStorage.setItem(n,e)}};let Id=null;const ER=()=>{if(Id!==null)return Id;try{Id=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Id=!1}return Id};var EZ={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&ER())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&ER()&&window.sessionStorage.setItem(n,e)}},RZ={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o0?t:void 0}},PZ={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},TZ={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},OZ={name:"subdomain",lookup(e){var i,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(i=window.location)==null?void 0:i.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function jZ(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class SI{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=xZ(n,this.options||{},jZ()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(_Z),this.addDetector(CZ),this.addDetector(kZ),this.addDetector(EZ),this.addDetector(RZ),this.addDetector(PZ),this.addDetector(TZ),this.addDetector(OZ)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}SI.type="languageDetector";ur.use(SI).use(pZ).init({fallbackLng:"en",resources:{en:{translation:{"Guild Ball":"Guild Ball"}},fr:{translation:{"Guild Ball":"Guild Ball"}}},debug:!1,interpolation:{escapeValue:!1}});const _I=C.createContext({manifest:void 0,version:0,gameplans:void 0}),RR="gbdata_meta";let V0=!1;async function LZ(e,t,n){if(V0){console.error("concurent reloads");return}console.log(`loading ${e}`),V0=!0;try{const r=t.datafiles.find(a=>a.filename===e),i=r==null?void 0:r.sha256,o=r==null?void 0:r.version,s=await ln.getLocal(RR);if(s&&s.get("version")===o&&s.get("filename")===e&&s.get("sha256")===i){console.log("database pre-loaded :)");return}console.log("database re-loading :("),await Promise.all([ln.guilds.find().exec().then(a=>ln.guilds.bulkRemove(a.map(l=>l.name))).then(()=>ln.guilds.bulkInsert(n.Guilds)).then(a=>{if(a.error.length!==0)throw"error loading Guilds"}).catch(console.error),ln.models.find().exec().then(a=>ln.models.bulkRemove(a.map(l=>l.id))).then(()=>ln.models.bulkInsert(n.Models)).then(a=>{if(a.error.length!==0)throw"error loading Models"}).catch(console.error),ln.character_plays.find().exec().then(a=>ln.character_plays.bulkRemove(a.map(l=>l.name))).then(()=>ln.character_plays.bulkInsert(n["Character Plays"])).then(a=>{if(a.error.length!==0)throw"error loading Character Plays"}).catch(console.error),ln.character_traits.find().exec().then(a=>ln.character_traits.bulkRemove(a.map(l=>l.name))).then(()=>ln.character_traits.bulkInsert(n["Character Traits"])).then(a=>{if(a.error.length!==0)throw"error loading Character Traits"}).catch(console.error)]).then(()=>ln.upsertLocal(RR,{version:o,filename:e,sha256:i})).then(()=>console.log("database re-load complete :|")).catch(console.error)}finally{V0=!1}}const IZ=({children:e})=>{const[t,n]=C.useState(void 0),[r,i]=C.useState(void 0),[o,s]=C.useState(0),[a,l]=C.useState(),{setting$:c}=ui(),[u,d]=C.useState(),[f,m]=C.useState(),[h,g]=C.useState(),[E,b]=C.useState();return C.useEffect(()=>{const w=c==null?void 0:c.subscribe(y=>{const{dataSet:_,language:k,mostRecentErrata:R}=(y==null?void 0:y.toJSON().data)??{};d(_??null),k=="auto"?b(ur.resolvedLanguage??null):b(k??null),m(R??null)});return()=>{w==null||w.unsubscribe()}},[c]),C.useEffect(()=>{if(u===void 0||f===void 0)return;let w=!1;return(async()=>{var $;const _=await MZ();if(w)return;n(_);const k=_.datafiles[0].filename;let R;if(u&&f===k)R=u;else{R=k;const L=await(ln==null?void 0:ln.getLocal("settings"));if(w)return;L==null||L.incrementalPatch({dataSet:R,mostRecentErrata:k})}const P=_.datafiles.find(L=>L.filename===R),I=P.version;s(I),E&&(($=P.translations)!=null&&$[E])&&(console.log(`using translated data set (${E})`),R=P.translations[E].filename),g(R)})(),()=>{w=!0}},[u,E,f]),C.useEffect(()=>{if(!h||!t)return;let w=!1;return(async()=>{const _=await PR(h);w||(l(void 0),await LZ(h,t,_).then(()=>l(ln)),i(await PR("gameplans.json")))})(),()=>{w=!0}},[o,h,t]),v.jsx(_I.Provider,{value:{version:o,manifest:t,gameplans:r,gbdb:a},children:e})},MZ=async()=>await fetch("data/manifest.json",{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(t){return t.json()}),PR=async e=>await fetch(`data/${e}`,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(n){return n.json()}),Yr=()=>C.useContext(_I);function ta(){const{gbdb:e}=Yr(),[t,n]=C.useState(),[r,i]=C.useState(),o=C.useMemo(()=>e==null?void 0:e.game_state.getLocal$("network"),[e]);return C.useEffect(()=>{if(!o)return;const s=o.subscribe(a=>{a&&!a.deleted?(i(a),n(!0)):(i(void 0),n(!1))});return()=>s.unsubscribe()},[o]),{active:t,netDoc:r}}const CI=typeof window>"u"?C.useEffect:C.useLayoutEffect;function NZ(e,t=!1){const n=t?CI:C.useEffect,r=C.useRef(e);return n(()=>{r.current=e}),r}const $Z=()=>{};function AZ(e){C.useEffect(()=>{typeof e=="function"&&e()},[])}const DZ={attributes:!0,characterData:!0,childList:!0,subtree:!0};function oy(e,t=DZ){const[n,r]=C.useState(null);return C.useEffect(()=>{if(n){const o=new MutationObserver(e);return o.observe(n,t),()=>{o.disconnect()}}return $Z},[n,e,t]),[C.useCallback(o=>{r(o)},[])]}function BZ(e){C.useEffect(()=>e,[])}function FZ(e,t){const n=C.useRef(!1),r=C.useMemo(()=>typeof t<"u"&&!Array.isArray(t)?[t]:(Array.isArray(t)&&t.length===0&&console.warn("Using [] as the second argument makes useDidUpdate a noop. The second argument should either be `undefined` or an array of length greater than 0."),t),[t]);C.useEffect(()=>{n.current&&e()},r),AZ(()=>{n.current=!0}),BZ(()=>{n.current=!1})}function zZ(e){const t=NZ(e);function n(...r){typeof t.current=="function"&&t.current(...r)}return n}function kI(e,t,n,r={},i=!0,o=!1){const s=zZ(n);(o?CI:C.useEffect)(()=>typeof e<"u"&&i?(e.addEventListener(t,s,r),()=>{e.removeEventListener(t,s,r)}):()=>{},[t,r])}function UZ(e,t=!0,n=!1){kI(PT.window,"resize",e,{passive:!0},t,n)}function WZ(e,t=!0,n=!1){kI(PT.window,"scroll",e,{passive:!0},t,n)}const GZ=e=>{const t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width,x:t.left,y:t.top}},HZ=[void 0,null,null],VZ=({updateOnScroll:e=!0,updateOnResize:t=!0}={})=>{const[n,r]=C.useState(null),[i,o]=C.useState(null),s=C.useCallback(l=>{o(l)},[]),a=C.useCallback(()=>{window.requestAnimationFrame(()=>{i&&r(GZ(i))})},[i]);return C.useLayoutEffect(()=>{a()},[a]),UZ(()=>{a()},t,!0),WZ(()=>{a()},e,!0),typeof window>"u"?(console.warn("useDimensionsRef: window is undefined."),HZ):[s,n,i]},KZ="/assets/playbook-symbol-defs-Dz3QsL1K.svg",qZ="/assets/gb-symbol-defs-DvUA8_44.svg";function ji(e){const{icon:t,size:n,style:r,className:i,...o}=e,s={...r||{},...n?{width:n,height:n}:{},...r&&r.height?{fontSize:r.height}:{}};return v.jsx("svg",{className:`gbicon gbicon-${t} ${i||""}`,style:s,...o,children:v.jsx("use",{href:`${qZ}#gbicon-${t}`})})}function EI(e){const{icon:t,size:n,style:r}=e,i=t.replace(//g,"P"),o={...n?{width:n,height:n}:{},...r&&r.height?{fontSize:r.height}:{},...e.style||{}};return v.jsx("svg",{className:`pbicon pbicon-${i}`,style:o,...e,children:v.jsx("use",{href:`${KZ}#pbicon-${i}`})})}function YZ(e){const{gbdb:t}=Yr(),[n,r]=C.useState();return C.useEffect(()=>{if(!t||!e)return;const i=e(t).$.subscribe(o=>{r(o)});return()=>{i.unsubscribe()}},[t,e]),n}function fo(e,t){const{gbdb:n}=Yr(),r=C.useCallback(e,t??[]),[i,o]=C.useState();return C.useEffect(()=>{let s=!1;return n?((async()=>{const l=await r(n);s||o(l)})().catch(console.error),()=>{s=!0}):void 0},[n,r,o]),i}function QZ(e,t){return e.reduce((n,r)=>t(n)>=t(r)?n:r)}function XZ({width:e,height:t},n,r=0){if(!e||!t)return;const i=(o,s)=>{const a=(e-o*10)/o,l=(t-s*10-5)/s,c=Math.min(a,l),u=(a-c)/2;return{w:a,h:l,size:c,margin:u,wx:o,hx:s}};return QZ(Array.from({length:n},(o,s)=>s+1).map(o=>i(o,Math.ceil(n/o)+r)),o=>o.size)}function RI({Controller:e}){const[t,n]=VZ(),r=fo(async a=>{var c;if(!n)return;const l=await a.guilds.count().exec();return((c=XZ(n,l,1))==null?void 0:c.size)??0},[n])??0,i=C.useMemo(()=>new Set,[]),o=DV(a=>i.add(a),a=>i.delete(a)),s=C.useCallback(a=>{i.forEach(l=>l(a))},[i]);return v.jsxs("div",{ref:t,style:{display:"flex",flexDirection:"column",height:"100%",alignContent:"flex-start",justifyContent:"space-evenly"},children:[v.jsx(JZ,{size:r,pickTeam:s}),v.jsx(Lo,{}),v.jsx(e,{size:r,update$:o})]})}const JZ=jt.memo(e=>{const{pickTeam:t,size:n}=e,r=YZ(C.useCallback(o=>o.guilds.find(),[]));if(!r)return null;const i=r.map(o=>({key:o.name,name:o.name,icon:o.name}));return v.jsx("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-start",justifyContent:"space-evenly",gap:"10px",padding:"5px",overflow:"clip"},children:i.map((o,s)=>v.jsx(V1,{g:o,pickTeam:t,size:n},s))})});function V1(e){const{g:t,pickTeam:n,size:r}=e;return v.jsxs(yn,{variant:"outlined",onClick:()=>n==null?void 0:n(t.key),style:{display:"flex",flexDirection:"column",minWidth:r,minHeight:r,maxWidth:r,maxHeight:r,background:"rgba(100%, 100%, 100%, 5%)"},sx:{"@media (hover: hover)":{"& > div":{transition:"transform .25s"},"&:hover > div":{transform:"scale(1.2)"}}},children:[v.jsx("div",{style:{display:"flex",placeContent:"center",placeItems:"center",fontSize:r*.7,width:"1em",height:"1em",borderRadius:"50%",padding:"0.0625em",background:"content-box linear-gradient(to bottom, #000, #333)"},children:v.jsx(ji,{icon:t.icon,className:"dark",style:{flexShrink:0,filter:"drop-shadow(0 0 0.03em black)",...t.style||{}}})}),v.jsx(_t,{variant:"caption",style:{color:"whitesmoke",textTransform:"capitalize",textShadow:"1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black, -1px 0 1px black",zIndex:1},children:t.name})]},t.key)}var PI={exports:{}},TI={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},OI={exports:{}},ZZ=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},eee=ZZ,tee=Array.prototype.concat,nee=Array.prototype.slice,TR=OI.exports=function(t){for(var n=[],r=0,i=t.length;r=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};ki.to.keyword=function(e){return LI[e.slice(0,3)]};function Aa(e,t,n){return Math.min(Math.max(t,e),n)}function Ph(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var iee=PI.exports;const tp=TI,II={};for(const e of Object.keys(tp))II[tp[e]]=e;const lt={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var MI=lt;for(const e of Object.keys(lt)){if(!("channels"in lt[e]))throw new Error("missing channels property: "+e);if(!("labels"in lt[e]))throw new Error("missing channel labels property: "+e);if(lt[e].labels.length!==lt[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=lt[e];delete lt[e].channels,delete lt[e].labels,Object.defineProperty(lt[e],"channels",{value:t}),Object.defineProperty(lt[e],"labels",{value:n})}lt.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=o-i;let a,l;o===i?a=0:t===o?a=(n-r)/s:n===o?a=2+(r-t)/s:r===o&&(a=4+(t-n)/s),a=Math.min(a*60,360),a<0&&(a+=360);const c=(i+o)/2;return o===i?l=0:c<=.5?l=s/(o+i):l=s/(2-o-i),[a,l*100,c*100]};lt.rgb.hsv=function(e){let t,n,r,i,o;const s=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(s,a,l),u=c-Math.min(s,a,l),d=function(f){return(c-f)/6/u+1/2};return u===0?(i=0,o=0):(o=u/c,t=d(s),n=d(a),r=d(l),s===c?i=r-n:a===c?i=1/3+t-r:l===c&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,c*100]};lt.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=lt.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,o*100,r*100]};lt.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),o=(1-t-i)/(1-i)||0,s=(1-n-i)/(1-i)||0,a=(1-r-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function oee(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}lt.rgb.keyword=function(e){const t=II[e];if(t)return t;let n=1/0,r;for(const i of Object.keys(tp)){const o=tp[i],s=oee(e,o);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=t*.4124+n*.3576+r*.1805,o=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[i*100,o*100,s*100]};lt.rgb.lab=function(e){const t=lt.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16,s=500*(n-r),a=200*(r-i);return[o,s,a]};lt.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,o,s;if(n===0)return s=r*255,[s,s,s];r<.5?i=r*(1+n):i=r+n-r*n;const a=2*r-i,l=[0,0,0];for(let c=0;c<3;c++)o=t+1/3*-(c-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,l[c]=s*255;return l};lt.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;const s=(r+n)/2,a=r===0?2*i/(o+i):2*n/(r+n);return[t,a*100,s*100]};lt.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),s=255*r*(1-n),a=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,s];case 1:return[a,r,s];case 2:return[s,r,l];case 3:return[s,a,r];case 4:return[l,s,r];case 5:return[r,s,a]}};lt.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let o,s;s=(2-n)*r;const a=(2-n)*i;return o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[t,o*100,s*100]};lt.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const s=Math.floor(6*t),a=1-r;o=6*t-s,s&1&&(o=1-o);const l=n+o*(a-n);let c,u,d;switch(s){default:case 6:case 0:c=a,u=l,d=n;break;case 1:c=l,u=a,d=n;break;case 2:c=n,u=a,d=l;break;case 3:c=n,u=l,d=a;break;case 4:c=l,u=n,d=a;break;case 5:c=a,u=n,d=l;break}return[c*255,u*255,d*255]};lt.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,o=1-Math.min(1,t*(1-i)+i),s=1-Math.min(1,n*(1-i)+i),a=1-Math.min(1,r*(1-i)+i);return[o*255,s*255,a*255]};lt.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,o,s;return i=t*3.2406+n*-1.5372+r*-.4986,o=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};lt.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16,o=500*(t-n),s=200*(n-r);return[i,o,s]};lt.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let i,o,s;o=(t+16)/116,i=n/500+o,s=o-r/200;const a=o**3,l=i**3,c=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};lt.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);const s=Math.sqrt(n*n+r*r);return[t,s,i]};lt.lch.lab=function(e){const t=e[0],n=e[1],i=e[2]/360*2*Math.PI,o=n*Math.cos(i),s=n*Math.sin(i);return[t,o,s]};lt.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=t===null?lt.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s};lt.hsv.ansi16=function(e){return lt.rgb.ansi16(lt.hsv.rgb(e),e[2])};lt.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};lt.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,i=(t>>1&1)*n*255,o=(t>>2&1)*n*255;return[r,i,o]};lt.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[n,r,i]};lt.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};lt.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(a=>a+a).join(""));const r=parseInt(n,16),i=r>>16&255,o=r>>8&255,s=r&255;return[i,o,s]};lt.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),s=i-o;let a,l;return s<1?a=o/(1-s):a=0,s<=0?l=0:i===t?l=(n-r)/s%6:i===n?l=2+(r-t)/s:l=4+(t-n)/s,l/=6,l%=1,[l*360,s*100,a*100]};lt.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]};lt.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]};lt.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const i=[0,0,0],o=t%1*6,s=o%1,a=1-s;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};lt.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let i=0;return r>0&&(i=t/r),[e[0],i*100,r*100]};lt.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],i*100,r*100]};lt.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};lt.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,i=r-t;let o=0;return i<1&&(o=(r-i)/(1-i)),[e[0],i*100,o*100]};lt.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};lt.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};lt.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};lt.gray.hsl=function(e){return[0,0,e[0]]};lt.gray.hsv=lt.gray.hsl;lt.gray.hwb=function(e){return[0,100,e[0]]};lt.gray.cmyk=function(e){return[0,0,0,e[0]]};lt.gray.lab=function(e){return[e[0],0,0]};lt.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};lt.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const fg=MI;function see(){const e={},t=Object.keys(fg);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function hee(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const i=e(n);if(typeof i=="object")for(let o=i.length,s=0;s{zc[e]={},Object.defineProperty(zc[e],"channels",{value:K1[e].channels}),Object.defineProperty(zc[e],"labels",{value:K1[e].labels});const t=dee(e);Object.keys(t).forEach(r=>{const i=t[r];zc[e][r]=hee(i),zc[e][r].raw=pee(i)})});var mee=zc;const Uc=iee,Si=mee,NI=["keyword","gray","hex"],q1={};for(const e of Object.keys(Si))q1[[...Si[e].labels].sort().join("")]=e;const pg={};function Xn(e,t){if(!(this instanceof Xn))return new Xn(e,t);if(t&&t in NI&&(t=null),t&&!(t in Si))throw new Error("Unknown model: "+t);let n,r;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof Xn)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=Uc.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,r=Si[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=Si[this.model].channels;const i=Array.prototype.slice.call(e,0,r);this.color=Y1(i,r),this.valpha=typeof e[r]=="number"?e[r]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const o=i.sort().join("");if(!(o in q1))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=q1[o];const{labels:s}=Si[this.model],a=[];for(n=0;n(e%360+360)%360),saturationl:kn("hsl",1,Hn(100)),lightness:kn("hsl",2,Hn(100)),saturationv:kn("hsv",1,Hn(100)),value:kn("hsv",2,Hn(100)),chroma:kn("hcg",1,Hn(100)),gray:kn("hcg",2,Hn(100)),white:kn("hwb",1,Hn(100)),wblack:kn("hwb",2,Hn(100)),cyan:kn("cmyk",0,Hn(100)),magenta:kn("cmyk",1,Hn(100)),yellow:kn("cmyk",2,Hn(100)),black:kn("cmyk",3,Hn(100)),x:kn("xyz",0,Hn(95.047)),y:kn("xyz",1,Hn(100)),z:kn("xyz",2,Hn(108.833)),l:kn("lab",0,Hn(100)),a:kn("lab",1),b:kn("lab",2),keyword(e){return e!==void 0?new Xn(e):Si[this.model].keyword(this.color)},hex(e){return e!==void 0?new Xn(e):Uc.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new Xn(e);const t=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),Uc.to.hex(t)+n},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const i=r/255;t[n]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return Xn.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,o=2*i-1,s=n.alpha()-r.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return Xn.rgb(a*n.red()+l*r.red(),a*n.green()+l*r.green(),a*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const e of Object.keys(Si)){if(NI.includes(e))continue;const{channels:t}=Si[e];Xn.prototype[e]=function(...n){return this.model===e?new Xn(this):n.length>0?new Xn(n,e):new Xn([...yee(Si[this.model][e].raw(this.color)),this.valpha],e)},Xn[e]=function(...n){let r=n[0];return typeof r=="number"&&(r=Y1(n,t)),new Xn(r,e)}}function gee(e,t){return Number(e.toFixed(t))}function vee(e){return function(t){return gee(t,e)}}function kn(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(pg[r]||(pg[r]=[]))[t]=n;return e=e[0],function(r){let i;return r!==void 0?(n&&(r=n(r)),i=this[e](),i.color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function Hn(e){return function(t){return Math.max(0,Math.min(e,t))}}function yee(e){return Array.isArray(e)?e:[e]}function Y1(e,t){for(let n=0;n{const{version:e}=Yr();return v.jsxs(_t,{sx:{position:"absolute",bottom:0,right:0,color:"text.disabled"},children:["[",e,"]"]})},wee=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function rp(e){return typeof e=="string"&&wee.test(e)}function hg(e){if(!rp(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}var nr=[];for(var q0=0;q0<256;++q0)nr.push((q0+256).toString(16).slice(1));function xee(e,t=0){return(nr[e[t+0]]+nr[e[t+1]]+nr[e[t+2]]+nr[e[t+3]]+"-"+nr[e[t+4]]+nr[e[t+5]]+"-"+nr[e[t+6]]+nr[e[t+7]]+"-"+nr[e[t+8]]+nr[e[t+9]]+"-"+nr[e[t+10]]+nr[e[t+11]]+nr[e[t+12]]+nr[e[t+13]]+nr[e[t+14]]+nr[e[t+15]]).toLowerCase()}var Th,See=new Uint8Array(16);function _ee(){if(!Th&&(Th=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Th))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Th(See)}var Cee=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const OR={randomUUID:Cee};function $I(e,t,n){if(OR.randomUUID&&!t&&!e)return OR.randomUUID();e=e||{};var r=e.random||(e.rng||_ee)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,xee(r)}var kee={VITE_NAME:"gb-playbook",VITE_VERSION:"2.1.0",VITE_METERED_USERNAME:"25ee3bdfcc273a8e3ae9db71",VITE_METERED_PASSWORD:"XVIpxKTNnMR7XQDK",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ip=kee.VITE_SIGNALING_URL??"wss://gbplaybook-webrtc-server.onrender.com";let Ts;function LS(e){return e.game_state.find().exec().then(t=>e.game_state.bulkRemove(t.map(n=>n._id))).catch(console.error)}let Y0=!1;function sy(e){return async(...t)=>{if(Y0)throw"concurent network change";Y0=!0;try{await e(...t)}finally{Y0=!1}}}const Eee=sy(async(e,t)=>{try{const n=await $ee();console.log(`# join code is ${n}`),t(n);const{uid:r,oid:i,gid:o}=await Dee();await LS(e),console.log("# starting new network game"),Ts=await TS(Ip,o),await e.game_state.insertLocal("network",{uid:r,oid:i,gid:o})}finally{Mp()}}),Ree=sy(async(e,t)=>{try{const{uid:n,oid:r,gid:i}=await Aee(t);await LS(e),console.log("# joining a network game"),Ts=await TS(Ip,i),await e.game_state.insertLocal("network",{uid:n,oid:r,gid:i})}finally{Mp()}}),Pee=sy(async e=>{const t=await e.game_state.getLocal("network"),n=t==null?void 0:t.get("gid");n&&Ts===void 0&&(console.log("# reconnecting to a network game"),Ts=await TS(Ip,n))}),Tee=sy(async e=>{console.log("# leaving a network game"),await(Ts==null?void 0:Ts.cancel().catch(console.error).finally(()=>{Ts=void 0})),await LS(e).catch(console.error),await e.game_state.getLocal("network").then(t=>t==null?void 0:t.remove()).catch(console.error)});function IS({allowNew:e=!1}){const{gbdb:t}=Yr(),[n,r]=C.useState(!1),{active:i}=ta();C.useEffect(()=>{t&&i&&!Ts&&Pee(t)},[t,i]);const[o,s]=C.useState("default");if(C.useEffect(()=>{s(i?"success":"default")},[i]),!!t)return v.jsxs(v.Fragment,{children:[v.jsx(Fo,{size:"small",color:o,disabled:!e&&!i,onClick:()=>r(!0),children:v.jsx(TJ,{})}),v.jsxs(wW,{open:n,onClose:()=>r(!1),children:[v.jsx(jW,{children:"Network Game Setup"}),v.jsx(RW,{children:v.jsx(Nee,{allowNew:e,close:()=>{r(!1)}})})]})]})}const Oee=e=>{const{setActiveStep:t}=e;return v.jsxs(rn,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[v.jsx(yn,{variant:"contained",onClick:()=>t("Start"),children:"Start a Game"}),v.jsx(yn,{variant:"contained",onClick:()=>t("Join"),children:"Join a Game"})]})},jee=e=>{const{setActiveStep:t}=e,{gbdb:n}=Yr(),[r,i]=C.useState();return C.useEffect(()=>{n&&Eee(n,i).then(()=>{t("Ready")}).catch(o=>{console.error(o),t("New")})},[n,t]),v.jsxs(rn,{sx:{display:"flex",flexDirection:"column",gap:"1em",alignItems:"center"},children:[v.jsx(_t,{children:"Share this join code:"}),v.jsx(_t,{variant:"h3",children:r==null?void 0:r.toString().padStart(4,"0")}),v.jsx(_t,{children:"Waiting for opponent to connect."}),v.jsx(yn,{variant:"contained",onClick:()=>{Mp(),e.setActiveStep("New")},children:"Cancel"})]})},Lee=e=>{const{setActiveStep:t}=e,{gbdb:n}=Yr(),[r,i]=C.useState(),[o,s]=C.useState(!1);if(n)return v.jsxs(rn,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[v.jsx(X7,{sx:{margin:"1em"},label:"game join code",variant:"outlined",disabled:o,inputProps:{pattern:"[0-9]*",inputMode:"numeric"},onChange:a=>i(Number(a.target.value))}),v.jsx(yn,{variant:"contained",disabled:!r||o,onClick:()=>{s(!0),Ree(n,r??0).then(()=>t("Ready")).then(()=>s(!1)).catch(a=>{console.error(a),t("New")})},children:"Join a Game"}),v.jsx(yn,{variant:"contained",onClick:()=>{Mp(),s(!1),t("New")},children:"Cancel"})]})},Iee=e=>{const{setActiveStep:t}=e,{gbdb:n}=Yr(),r=qa(),{setting$:i}=ui();if(n)return v.jsxs(Km,{spacing:2,alignItems:"center",children:[v.jsx(_t,{variant:"h6",children:"Connected"}),v.jsxs(Km,{direction:"row",spacing:2,children:[v.jsx(yn,{variant:"contained",onClick:()=>Tee(n).then(()=>t("New")).then(()=>i&&Ln(i)).then(o=>o==null?void 0:o.incrementalPatch({gamePlayRoute:void 0})).then(()=>{r("/",{})}).catch(console.error),children:"Leave Game"}),v.jsx(yn,{color:"success",variant:"contained",onClick:()=>{var o;(o=e.close)==null||o.call(e)},children:"Continue"})]})]})},Mee=()=>v.jsx(_t,{children:"Network Games must be started from the inital guild selection screen."});function Nee({allowNew:e=!1,close:t}){const{active:n}=ta(),[r,i]=C.useState(e?"New":"Block");return C.useEffect(()=>{n&&i("Ready")},[n]),C.useEffect(()=>()=>{Mp()},[]),v.jsxs(rn,{children:[r==="New"&&v.jsx(Oee,{setActiveStep:i}),r==="Start"&&v.jsx(jee,{setActiveStep:i}),r==="Join"&&v.jsx(Lee,{setActiveStep:i}),r==="Ready"&&v.jsx(Iee,{setActiveStep:i,close:t}),r==="Block"&&v.jsx(Mee,{})]})}let nn;function $ee(){return new Promise((e,t)=>{nn=new WebSocket(Ip),nn.onopen=()=>{nn==null||nn.send(JSON.stringify({type:"handshake-begin"}))},nn.onclose=()=>{t("socket closed")},nn.onerror=n=>{t(n)},nn.onmessage=n=>{const r=JSON.parse(n.data);switch(r.type){case"handshake-response":nn&&(nn.onmessage=null),e(r.code);break}}})}function Aee(e){return new Promise((t,n)=>{if(!e){n("Invalid Arguments (id undefined)");return}nn=new WebSocket(Ip),nn.onopen=()=>{nn==null||nn.send(JSON.stringify({type:"handshake-join",code:e}))},nn.onclose=()=>{n("socket closed")},nn.onerror=r=>{n(r)},nn.onmessage=r=>{const i=JSON.parse(r.data);switch(i.type){case"handshake-complete":{const o=i.yourId;if(!rp(o)){n(`invalid uID ${o}`);return}const s=i.otherId;if(!rp(s)){n(`invalid oID ${s}`);return}const a=hg(o),l=hg(s),c=a.map((d,f)=>d^l[f]),u=$I({random:c});t({uid:o,oid:s,gid:u})}break}}})}function Dee(){return new Promise((e,t)=>{if((nn==null?void 0:nn.readyState)!==1){t("socket closed");return}nn.onclose=()=>{t("socket closed")},nn.onerror=n=>{t(n)},nn.onmessage=n=>{const r=JSON.parse(n.data);switch(r.type){case"handshake-complete":{const i=r.yourId;if(!rp(i)){t(`invalid uID ${i}`);return}const o=r.otherId;if(!rp(o)){t(`invalid oID ${o}`);return}const s=hg(i),a=hg(o),l=s.map((u,d)=>u^a[d]),c=$I({random:l});e({uid:i,oid:o,gid:c})}break}}})}function Mp(){nn==null||nn.close(),nn=void 0}function ay(){return up()}var MS={},Bee=so;Object.defineProperty(MS,"__esModule",{value:!0});var AI=MS.default=void 0,Fee=Bee(ds()),zee=v;AI=MS.default=(0,Fee.default)((0,zee.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");function Uee(e){switch(e){case"Guilds":return"/game";case"Draft":return"/game/draft";case"Game":return"/game/draft/play"}}function DI(e){const t=qa(),{gameState1$:n,gameState2$:r}=ay(),{active:i}=ta(),[o,s]=C.useState(),[a,l]=C.useState(),[c,u]=C.useState(!1),{dest:d,onAction:f,...m}=e;return C.useEffect(()=>{const h=n==null?void 0:n.pipe(qt(E=>E==null?void 0:E.navigateTo)).subscribe(E=>s(E)),g=r==null?void 0:r.pipe(qt(E=>E==null?void 0:E.navigateTo)).subscribe(E=>l(E));return()=>{h==null||h.unsubscribe(),g==null||g.unsubscribe()}},[n,r]),C.useEffect(()=>{const h=async()=>{await Ln(n).then(g=>{g==null||g.incrementalPatch({navigateTo:void 0}).catch(console.error)}),i||await Ln(r).then(g=>{g==null||g.incrementalPatch({navigateTo:void 0}).catch(console.error)}),t(Uee(d))};o==d&&a===d&&h()},[n,r,d,o,a,i,t,f]),C.useEffect(()=>{u(a===d)},[d,a]),v.jsx($W,{className:c?"fabAnimate":void 0,...m,color:"secondary",onClick:()=>{f==null||f(),Ln(n).then(h=>{h==null||h.incrementalPatch({navigateTo:d}).catch(console.error)}),i||Ln(r).then(h=>{h==null||h.incrementalPatch({navigateTo:d}).catch(console.error)})},children:v.jsx(AI,{fontSize:"large",sx:{zIndex:10}})})}function jR({team:e,size:t}){const n=fo(r=>r.guilds.findOne().where({name:e}).exec(),[e]);return n?v.jsxs("div",{style:{position:"absolute",width:"100%",height:"100%",display:"flex",placeContent:"center",placeItems:"center",overflow:"hidden",zIndex:-1,backgroundColor:np(n.shadow??n.darkColor??n.color).darken(.25).desaturate(.25).string()},children:[v.jsx(ji,{icon:e,fontSize:t,style:{color:"rgba(0, 0, 0, 60%)",flexShrink:0}}),v.jsx(_t,{variant:"caption",style:{position:"absolute",color:"whitesmoke",textShadow:"1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black, -1px 0 1px black",textTransform:"capitalize"},children:e})]}):null}function Wee(e){const[t,n]=C.useState("P1"),[r,i]=C.useState(),[o,s]=C.useState(),[a,l]=C.useState(!1),c=Ni(),{active:u}=ta(),{gameState1$:d,gameState2$:f}=ay(),[m,h]=C.useState();C.useEffect(()=>{i(void 0),n("P1");const w=d==null?void 0:d.subscribe(y=>h(y));return()=>w==null?void 0:w.unsubscribe()},[d]);const[g,E]=C.useState();C.useEffect(()=>{s(void 0),n("P1");const w=f==null?void 0:f.subscribe(y=>E(y));return()=>w==null?void 0:w.unsubscribe()},[f]),C.useEffect(()=>{const w=m==null?void 0:m.get$("guild").subscribe(y=>i(y));return()=>w==null?void 0:w.unsubscribe()},[m]),C.useEffect(()=>{const w=g==null?void 0:g.get$("guild").subscribe(y=>s(y));return()=>w==null?void 0:w.unsubscribe()},[g]);const b=C.useCallback(async w=>{w&&(t==="P1"?(await(m==null?void 0:m.incrementalPatch({guild:w,roster:[]}).catch(console.error)),n(!o&&!u?"P2":"GO")):t==="P2"&&(await(g==null?void 0:g.incrementalPatch({guild:w,roster:[]}).catch(console.error)),n(r?"GO":"P1")))},[t,r,o,m,g,u]);return C.useEffect(()=>{const w=e.update$.subscribe(y=>b(y));return()=>w.unsubscribe()},[e.update$,b]),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",margin:"5px",gap:"5px"},children:[v.jsx(yn,{variant:"outlined",style:{minWidth:e.size,maxWidth:e.size,minHeight:e.size,maxHeight:e.size,fontSize:e.size*.5,...t==="P1"?{borderColor:c.palette.secondary.light,borderRadius:"12px",borderWidth:"4px"}:{borderColor:c.palette.primary.dark,borderRadius:"12px",borderWidth:"4px"}},onClick:()=>n("P1"),children:r?v.jsx(jR,{team:r,size:e.size}):"P1"}),v.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.25em"},children:[v.jsx(_t,{variant:"caption",children:"vs"}),v.jsx(DI,{dest:"Draft",disabled:!r||!o,onAction:()=>l(!0),sx:{m:"0 15px"}}),v.jsx(_t,{variant:"caption",children:a?"(waiting)":" "})]}),v.jsx(yn,{variant:"outlined",disabled:u,style:{minWidth:e.size,maxWidth:e.size,minHeight:e.size,maxHeight:e.size,fontSize:e.size*.5,...t==="P2"?{borderColor:c.palette.secondary.light,borderRadius:"12px",borderWidth:"4px"}:{borderColor:c.palette.primary.dark,borderRadius:"12px",borderWidth:"4px"}},onClick:()=>n("P2"),children:o?v.jsx(jR,{team:o,size:e.size}):"P2"})]})}function Gee(){return v.jsxs(rn,{sx:{width:"100%",height:"100%",position:"relative"},children:[v.jsx(fs,{children:v.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between"},children:[v.jsx(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:v.jsx(Fo,{size:"small",disabled:!0,children:v.jsx(jS,{sx:{color:"text.secondary"}})})}),v.jsx(IS,{allowNew:!0})]})}),v.jsx(RI,{Controller:Wee}),v.jsx(fc,{})]})}var mg={exports:{}};mg.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",f="[object Map]",m="[object Number]",h="[object Object]",g="[object Promise]",E="[object RegExp]",b="[object Set]",w="[object String]",y="[object Symbol]",_="[object WeakMap]",k="[object ArrayBuffer]",R="[object DataView]",P="[object Float32Array]",I="[object Float64Array]",$="[object Int8Array]",L="[object Int16Array]",N="[object Int32Array]",F="[object Uint8Array]",z="[object Uint8ClampedArray]",K="[object Uint16Array]",Z="[object Uint32Array]",le=/[\\^$.*+?()[\]{}|]/g,ce=/\w*$/,H=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,se={};se[o]=se[s]=se[k]=se[R]=se[a]=se[l]=se[P]=se[I]=se[$]=se[L]=se[N]=se[f]=se[m]=se[h]=se[E]=se[b]=se[w]=se[y]=se[F]=se[z]=se[K]=se[Z]=!0,se[c]=se[u]=se[_]=!1;var je=typeof Sr=="object"&&Sr&&Sr.Object===Object&&Sr,Ge=typeof self=="object"&&self&&self.Object===Object&&self,Le=je||Ge||Function("return this")(),_e=t&&!t.nodeType&&t,Ve=_e&&!0&&e&&!e.nodeType&&e,Pe=Ve&&Ve.exports===_e;function ct(U,ge){return U.set(ge[0],ge[1]),U}function ft(U,ge){return U.add(ge),U}function Te(U,ge){for(var ke=-1,dt=U?U.length:0;++ke-1}function at(U,ge){var ke=this.__data__,dt=tr(ke,U);return dt<0?ke.push([U,ge]):ke[dt][1]=ge,this}$e.prototype.clear=nt,$e.prototype.delete=st,$e.prototype.get=Ae,$e.prototype.has=vt,$e.prototype.set=at;function it(U){var ge=-1,ke=U?U.length:0;for(this.clear();++ge-1&&U%1==0&&U-1&&U%1==0&&U<=i}function al(U){var ge=typeof U;return!!U&&(ge=="object"||ge=="function")}function sd(U){return!!U&&typeof U=="object"}function vs(U){return gc(U)?pr(U):nl(U)}function ad(){return[]}function Ap(){return!1}e.exports=Bn})(mg,mg.exports);var Hee=mg.exports;const BI=Ga(Hee);var NS={},Vee=so;Object.defineProperty(NS,"__esModule",{value:!0});var FI=NS.default=void 0,Kee=Vee(ds()),qee=v;FI=NS.default=(0,Kee.default)((0,qee.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonChecked");var $S={},Yee=so;Object.defineProperty($S,"__esModule",{value:!0});var zI=$S.default=void 0,Qee=Yee(ds()),Xee=v;zI=$S.default=(0,Qee.default)((0,Xee.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonUnchecked");const AS=(e,t)=>{const n=jt.useRef(null);return FZ(()=>{var r;e&&((r=n.current)==null||r.animate({backgroundColor:["initial","red","initial"],boxShadow:["0 0 0px 0px transparent","0 0 0.25em 0.25em red","0 0 0.25em 0.25em transparent"]},500))},t),n};function Ks(e,t,n){return e.sort((r,i)=>{const o=n.findIndex(a=>a===r[t]),s=n.findIndex(a=>a===i[t]);return o-s})}function hf(e,t,n,r,i,o){let s=n;return i(t)&&(s+=r?1:-1,s===o?e.forEach(a=>{!a.selected&&i(a)&&(a.disabled+=1)}):s===o-1&&n===o&&e.forEach(a=>{!(a===t||a.selected)&&i(a)&&(a.disabled+=-1)})),s}function UI(e,t,n){e.forEach(r=>{r!==t&&r.name===t.name&&(r.disabled+=n?1:-1),(r.dehcneb===t.name||r.name===t.dehcneb)&&(r.disabled+=n?1:-1)})}function WI(e,t,n,r){if(t.dehcneb){const i=e.find(o=>o.benched&&o.name===t.dehcneb);i&&r(i,n)}}function jl({model:e,disabled:t=!1,stateDoc:n,updateCounts:r}){const[i,o]=C.useState(e.selected);C.useEffect(()=>{const l=n.get$("roster").pipe(qt(c=>c.map(u=>u.name).includes(e.id))).subscribe(c=>{o(c),c!==e.selected&&!e.benched&&r(e,c)});return()=>l==null?void 0:l.unsubscribe()},[n,e,r]);const s=AS(t,[i]);return v.jsx(Ms,{ref:s,label:e.id,control:v.jsx(Is,{size:"small",checked:i,disabled:e.disabled>0||t,onChange:a=>{const l=a.target.checked;n.incrementalModify(c=>{if(l){const u=c.roster.concat({name:e.id,health:e.hp});c.roster=u}else{const u=c.roster.filter(d=>d.name!=e.id);c.roster=u}return c}).catch(console.error)},icon:v.jsx(zI,{}),checkedIcon:v.jsx(FI,{})})})}const GI=Ee(v9)(()=>({"& .MuiBadge-badge":{right:"2em",top:"2em"}})),da={3:{captain:1,mascot:0,squaddies:2},4:{captain:1,mascot:1,squaddies:2},6:{captain:1,mascot:1,squaddies:4}},LR=e=>{const{guild:t,ready:n,unready:r,disabled:i=!1,style:o}=e,{setting$:s}=ui(),[a,l]=C.useState(6);C.useEffect(()=>{const w=s==null?void 0:s.pipe(qt(y=>y==null?void 0:y.toJSON().data.gameSize)).subscribe(y=>l(y??6));return()=>w==null?void 0:w.unsubscribe()},[s]);const c=C.useRef({captain:0,mascot:0,squaddieCount:0}),[,u]=C.useState(0),[d,f]=C.useState(!1),m=fo(async w=>{const _=(await w.models.find().where("id").in(t.roster).exec()).map(k=>Object.assign(k.toMutableJSON(),{selected:!1,disabled:k.benched?1:0}));if(Ks(_,"id",t.roster),!i&&t.minor){const k=new Set(e.stateDoc.get("roster").map(R=>JSON.stringify(R)));_.forEach(R=>{(R.captain||R.mascot&&da[a].mascot>0)&&(k.add(JSON.stringify({name:R.id,health:R.hp})),R.disabled=1)}),e.stateDoc.incrementalModify(R=>(R.roster=Array.from(k).map(P=>JSON.parse(P)),R)).catch(console.error)}return da[a].mascot===0&&_.forEach(k=>{k.mascot&&(k.disabled=1)}),_},[t,a]),h=C.useCallback((w,y)=>{function _(L,N,F,z){return hf(L,N,F,z,K=>!!K.captain,da[a].captain)}function k(L,N,F,z){return hf(L,N,F,z,K=>!!K.mascot,da[a].mascot)}function R(L,N,F,z){return hf(L,N,F,z,K=>!(K.captain||K.mascot),da[a].squaddies)}if(!m)return;w.selected=y;const P=_(m,w,c.current.captain,y);c.current.captain=P;const I=k(m,w,c.current.mascot,y);c.current.mascot=I;const $=R(m,w,c.current.squaddieCount,y);c.current.squaddieCount=$,UI(m,w,y),WI(m,w,y,(L,N)=>{i||(L.selected=N,e.stateDoc.incrementalModify(F=>{if(N){const z=F.roster.concat({name:L.id,health:L.hp});F.roster=z}else{const z=F.roster.filter(K=>K.name!=L.id);F.roster=z}return F}))}),P===da[a].captain&&I===da[a].mascot&&$===da[a].squaddies?f(!0):f(!1),u(L=>L+1)},[e.stateDoc,m,a,i]);if(C.useEffect(()=>{if(d&&m){const w=BI(m.filter(y=>y.selected));n==null||n(w)}else r==null||r()},[d,t,m,n,r]),!m)return null;const g=m.filter(w=>w.captain),E=m.filter(w=>w.mascot&&!w.captain),b=m.filter(w=>!w.captain&&!w.mascot);return v.jsx(GI,{badgeContent:d?v.jsx(gI,{color:"success"}):0,style:{overflow:"visible",...o},children:v.jsxs(ij,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",border:"4px solid",borderColor:t.darkColor??t.color,borderRadius:"1em",padding:"1ex",width:"100%",overflow:"visible"},children:[v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Captains :"}),g.map(w=>v.jsx(jl,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id)),v.jsx("span",{children:"Mascots :"}),E.map(w=>v.jsx(jl,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Squaddies :"}),b.slice(0,b.length/2).map(w=>v.jsx(jl,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:" "}),b.slice(b.length/2).map(w=>v.jsx(jl,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id))]})]})})},Oh={3:{master:1,apprentice:2},4:{master:2,apprentice:2},6:{master:3,apprentice:3}},IR=e=>{const{guild:t,ready:n,unready:r,disabled:i=!1,style:o}=e,{setting$:s}=ui(),[a,l]=C.useState(6);C.useEffect(()=>{const b=s==null?void 0:s.pipe(qt(w=>w==null?void 0:w.toJSON().data.gameSize)).subscribe(w=>l(w??6));return()=>b==null?void 0:b.unsubscribe()},[s]);const c=C.useRef({masterCount:0,apprenticeCount:0}),[,u]=C.useState(0),[d,f]=C.useState(!1),m=fo(async b=>{const y=(await b.models.find().where("id").in(t.roster).exec()).map(_=>Object.assign(_.toMutableJSON(),{selected:!1,disabled:_.benched?1:0}));return Ks(y,"id",t.roster),y},[t]),h=C.useCallback((b,w)=>{function y(P,I,$,L){return hf(P,I,$,L,N=>!!N.captain,Oh[a].master)}function _(P,I,$,L){return hf(P,I,$,L,N=>!N.captain,Oh[a].apprentice)}if(!m)return;b.selected=w;const k=y(m,b,c.current.masterCount,w);c.current.masterCount=k;const R=_(m,b,c.current.apprenticeCount,w);c.current.apprenticeCount=R,UI(m,b,w),WI(m,b,w,(P,I)=>{i||(P.selected=I,e.stateDoc.incrementalModify($=>{if(I){const L=$.roster.concat({name:P.id,health:P.hp});$.roster=L}else{const L=$.roster.filter(N=>N.name!=P.id);$.roster=L}return $}))}),k===Oh[a].master&&R===Oh[a].apprentice?f(!0):f(!1),u(P=>P+1)},[e.stateDoc,m,a,i]);if(C.useEffect(()=>{if(d&&m){const b=BI(m.filter(w=>w.selected));n==null||n(b)}else r==null||r()},[d,t,m,n,r]),!m)return null;const g=m.filter(b=>b.captain),E=m.filter(b=>!b.captain);return v.jsx(GI,{badgeContent:d?v.jsx(gI,{color:"success"}):0,style:{overflow:"visible",...o},children:v.jsxs(ij,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",border:"4px solid",borderColor:t.darkColor??t.color,borderRadius:"1em",padding:"1ex",width:"100%",overflow:"visible"},children:[v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Masters :"}),g.map(b=>v.jsx(jl,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Apprentices :"}),E.slice(0,E.length/2).map(b=>v.jsx(jl,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:" "}),E.slice(E.length/2).map(b=>v.jsx(jl,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]})]})})};function Jee(){const{active:e}=ta();return v.jsxs(rn,{className:"DraftScreen",children:[v.jsx(fs,{children:v.jsxs(rn,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[v.jsxs(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:[v.jsx(Fo,{color:"inherit",href:"/game",size:"small",disabled:e,children:v.jsx(jS,{})}),v.jsx(_t,{children:"Draft"})]}),v.jsxs("div",{children:[v.jsx(ete,{}),v.jsx(IS,{})]})]})}),v.jsx(Zee,{}),v.jsx(fc,{})]})}function Zee(){const{setting$:e}=ui(),t=qa(),[n,r]=C.useState(),[i,o]=C.useState(),s=C.useCallback(P=>r(P),[]),a=C.useCallback(P=>o(P),[]),l=C.useCallback(()=>r(void 0),[]),c=C.useCallback(()=>o(void 0),[]),[u,d]=C.useState();C.useEffect(()=>{const P=e==null?void 0:e.pipe(qt(I=>I==null?void 0:I.toJSON().data.gameSize)).subscribe(I=>d(I));return()=>P==null?void 0:P.unsubscribe()},[e]);const{active:f}=ta(),{gameState1$:m,gameState2$:h}=ay(),[g,E]=C.useState();C.useEffect(()=>{if(!m)return;let P=!1;return(async()=>{const $=await Ln(m);P||E($)})(),()=>{P=!0}},[m]);const[b,w]=C.useState();C.useEffect(()=>{if(!h)return;let P=!1;return(async()=>{const $=await Ln(h);P||w($)})(),()=>{P=!0}},[h]);const[y,_]=fo(async P=>{const I=g==null?void 0:g.guild,$=b==null?void 0:b.guild;if(!I||!$)return;const[L,N]=await Promise.all([P.guilds.findOne().where({name:I}).exec(),P.guilds.findOne().where({name:$}).exec()]);if(!L||!N){t("/game");return}return[L,N]},[g,b,t])??[];if(!y||!_||!g||!b)return null;const k=y.name==="Blacksmiths"?IR:LR,R=_.name==="Blacksmiths"?IR:LR;return v.jsxs(v.Fragment,{children:[v.jsx(k,{guild:y,stateDoc:g,ready:s,unready:l,style:{width:"100%"}},`1-${u}`),v.jsx(DI,{dest:"Game",disabled:!n||!i,onAction:()=>{g.incrementalPatch({score:0,momentum:0,roster:(n==null?void 0:n.map(P=>({name:P.id,health:P.hp})))||[]}).catch(console.error),f||b.incrementalPatch({score:0,momentum:0,roster:(i==null?void 0:i.map(P=>({name:P.id,health:P.hp})))||[]}).catch(console.error)},sx:{m:"10px"}}),v.jsx(R,{guild:_,stateDoc:b,ready:a,unready:c,style:{width:"100%"},disabled:f},`2-${u}`)]})}function ete(){const[e,t]=C.useState(null),n=!!e,r=c=>{t(c.currentTarget)},i=()=>{t(null)},{setting$:o}=ui(),[s,a]=C.useState();C.useEffect(()=>{const c=o==null?void 0:o.subscribe(u=>a(u));return()=>c==null?void 0:c.unsubscribe()},[o]);const l=s==null?void 0:s.toJSON().data.gameSize;return v.jsxs(v.Fragment,{children:[v.jsx(Fo,{onClick:r,color:"inherit",size:"small",sx:{backgroundColor:"primary.dark"},children:v.jsxs(_t,{children:[l,"v",l]})}),v.jsx(Uv,{anchorEl:e,open:n,onClose:i,onClick:i,children:v.jsxs(cj,{dense:!0,children:[v.jsx(yi,{selected:l===6,onClick:()=>{s==null||s.incrementalPatch({gameSize:6})},children:"6v6"}),v.jsx(yi,{selected:l===4,onClick:()=>{s==null||s.incrementalPatch({gameSize:4})},children:"4v4"}),v.jsx(yi,{selected:l===3,onClick:()=>{s==null||s.incrementalPatch({gameSize:3})},children:"3v3"})]})})]})}var DS={},tte=so;Object.defineProperty(DS,"__esModule",{value:!0});var gg=DS.default=void 0,nte=tte(ds()),rte=v;gg=DS.default=(0,nte.default)((0,rte.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove");var BS={},ite=so;Object.defineProperty(BS,"__esModule",{value:!0});var vg=BS.default=void 0,ote=ite(ds()),ste=v;vg=BS.default=(0,ote.default)((0,ste.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");function MR(e){ate(e)&&e.touches.length<2&&e.preventDefault&&e.cancelable&&e.preventDefault()}function ate(e){return e&&"touches"in e}function Q1({onLongPress:e,onClick:t},{delay:n=500,shouldPreventDefault:r=!0}={}){const[i,o]=C.useState(!1),s=C.useRef(),a=C.useRef(),l=C.useCallback(u=>{u.persist();const d={...u};r&&u.target&&(u.target.addEventListener("touchend",MR,{passive:!1}),a.current=u.target),s.current=setTimeout(()=>{e(d),o(!0)},n)},[e,n,r]),c=C.useCallback((u,d=!0)=>{s.current&&clearTimeout(s.current),d&&!i&&(t==null||t(u)),o(!1),r&&a.current&&a.current.removeEventListener("touchend",MR)},[r,t,i]);return{onMouseDown:u=>l(u),onTouchStart:u=>l(u),onMouseUp:u=>c(u),onMouseLeave:u=>c(u,!1),onTouchEnd:u=>c(u),onTouchMove:u=>c(u)}}function lte(e){const{disabled:t,object:n,label:r}=e,i=r(n),o=AS(t,[i]);return v.jsx(_t,{ref:o,sx:{width:"100%",textAlign:"center"},children:i})}function HI({object:e,label:t,value:n,setValue:r,disabled:i=!1,longPressClear:o=!1}){const s=Q1({onLongPress:()=>{r(e,0)},onClick:a=>{a.stopPropagation();const l=n(e);l>0&&r(e,l-1)}});return v.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[v.jsx(lte,{disabled:i,object:e,label:t}),v.jsxs(Vf,{size:"small",variant:"contained",disabled:i,children:[v.jsx(yn,{...o?s:{},onClick:a=>{if(a.stopPropagation(),!o){const l=n(e);l>0&&r(e,l-1)}},children:v.jsx(gg,{fontSize:"inherit"})}),v.jsx(yn,{onClick:a=>{a.stopPropagation();const l=n(e);r(e,l+1)},children:v.jsx(vg,{fontSize:"inherit"})})]})]})}const NR=e=>{const{model:t,disabled:n}=e,r=AS(n,[e.health]);return v.jsx(yn,{ref:r,disabled:!0,size:"small",children:v.jsx(_t,{variant:"body2",color:"text.primary",children:`${String(e.health).padStart(2,"0")} / ${String(t.hp).padStart(2,"0")}`})})};function VI({state:e,model:t,disabled:n=!1,stacked:r=!1}){const i=Q1({onLongPress:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health=0,u})},onClick:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health>0&&(u.roster[d].health-=1),u})}}),o=Q1({onLongPress:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].healthu.name===t.id),a=C.useMemo(()=>e.get$("roster").pipe(qt(u=>u[s].health)),[e,s]),[l,c]=C.useState(t.hp);return C.useEffect(()=>{const u=a.subscribe(d=>c(d));return()=>u.unsubscribe()},[a]),v.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:r?v.jsxs(v.Fragment,{children:[v.jsx(NR,{health:l,model:t,disabled:n}),v.jsxs(Vf,{size:"small",variant:"contained",disabled:n,sx:{"& .MuiButtonGroup-grouped":{minWidth:"1rem"}},children:[v.jsx(yn,{...i,onClick:u=>u.stopPropagation(),children:v.jsx(gg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(yn,{...o,onClick:u=>u.stopPropagation(),children:v.jsx(vg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})]}):v.jsxs(Vf,{size:"small",variant:"contained",disabled:n,children:[v.jsx(yn,{...i,onClick:u=>u.stopPropagation(),children:v.jsx(gg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(NR,{health:l,model:t,disabled:n}),v.jsx(yn,{...o,onClick:u=>u.stopPropagation(),children:v.jsx(vg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function cte(e){const t=e.state,[n,r]=C.useState(0);return C.useEffect(()=>{const i=t.get$("score").subscribe(o=>r(o));return()=>i.unsubscribe()},[t]),v.jsx(HI,{object:t,disabled:e.disabled,label:()=>`VP: ${n}`,value:()=>n,setValue:(i,o)=>{i.incrementalModify(s=>(s.score=o,s))}})}function ute(e){const t=e.state,[n,r]=C.useState(0);return C.useEffect(()=>{const i=t.get$("momentum").subscribe(o=>r(o));return()=>i.unsubscribe()},[t]),v.jsx(HI,{object:t,disabled:e.disabled,longPressClear:!0,label:()=>`MOM: ${n}`,value:()=>n,setValue:(i,o)=>{i.incrementalModify(s=>(s.momentum=o,s))}})}function dte({teams:e,rosters:t,expanded:n,onClick:r,disabled:i}){const o=Ni(),{setting$:s}=ui(),[a,l]=C.useState();C.useEffect(()=>{const u=s==null?void 0:s.pipe(qt(d=>d==null?void 0:d.toJSON().data.uiPreferences.displayStatLine)).subscribe(d=>l(d));return()=>u==null?void 0:u.unsubscribe()});const c=e.reduce((u,d,f)=>[...u,u[f]+d.roster.length+1],[0]);return v.jsx(rn,{sx:{flexGrow:0,overflow:"auto"},children:e.map((u,d)=>{const f=c[d]+1;return v.jsxs(Uz,{expanded:n===!0,square:!0,sx:{backgroundColor:"transparent"},disableGutters:!0,elevation:0,children:[v.jsx(e8,{sx:{position:"sticky",top:0,zIndex:1,padding:0,borderBottom:`1px solid ${o.palette.divider}`,".MuiAccordionSummary-content":{margin:0}},children:v.jsxs(ZO,{onClick:()=>{r(f-1,!n)},sx:{width:"100%",display:"flex",flexDirection:"row"},children:[v.jsx(xG,{sx:{alignItems:"center"},children:v.jsx("div",{style:{fontSize:36,width:"1em",height:"1em",overflow:"visible",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(ji,{icon:u.guild,style:{color:o.palette.text.secondary,filter:"unset",flexShrink:0}})})}),v.jsx(Ss,{primary:u.guild,secondary:`${t[d].reduce((m,h)=>m+(h._inf??h.inf),0)} INF`}),v.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"4px"},children:[v.jsx(cte,{state:u,disabled:i[d]}),v.jsx(ute,{state:u,disabled:i[d]})]})]})}),v.jsx(Kz,{sx:{padding:0},children:v.jsx(rf,{disablePadding:!0,sx:{"li:nth-of-type(odd)":{"&.MuiListItem-root":{backgroundColor:"rgba(100%, 100%, 100%, 5%)"}}},children:t[d].map((m,h)=>v.jsx(wo,{secondaryAction:v.jsx(VI,{state:u,model:m,disabled:i[d]}),onClick:()=>{r(f+h,!1)},children:v.jsx(Ss,{primary:m.id,secondary:a?m.statLine:null})},m.id))},d)})]},d)})})}const Ir=new URL("/assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",import.meta.url).href,Mr=new URL("/assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",import.meta.url).href,Nr=new URL("/assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",import.meta.url).href,$r=new URL("/assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",import.meta.url).href,Oc=new URL("/assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",import.meta.url).href,Xr=new URL("/assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",import.meta.url).href,jc=new URL("/assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",import.meta.url).href,Ar=new URL("/assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",import.meta.url).href,Dr=new URL("/assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",import.meta.url).href,Br=new URL("/assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",import.meta.url).href,Fr=new URL("/assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",import.meta.url).href,Lc=new URL("/assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",import.meta.url).href,wr=new URL("/assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",import.meta.url).href,Ic=new URL("/assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",import.meta.url).href,fa=new URL("/assets/Order_back-qsepM33g.jpg",import.meta.url).href,Mc=new URL("/assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",import.meta.url).href,hl=new URL("/assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",import.meta.url).href,Jr=new URL("/assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",import.meta.url).href,Nc=new URL("/assets/lamps_back_blank-DaxPd_Oo.jpg",import.meta.url).href,cn=new Map([["Alchemists_back",new URL("/assets/GB-S4-Alchemists-19-02-01-VIy3CwEn.jpg",import.meta.url).href],["Alchemists_front",new URL("/assets/GB-S4-Alchemists-19-02-02-Dar2t4NY.jpg",import.meta.url).href],["Midas_back",Ir],["Midas_front",new URL("/assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",import.meta.url).href],["Smoke_back",Ir],["Smoke_front",new URL("/assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",import.meta.url).href],["Soma_back",Ir],["Soma_front",new URL("/assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",import.meta.url).href],["Pneuma_back",Ir],["Pneuma_front",new URL("/assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",import.meta.url).href],["Flask_back",Ir],["Flask_front",new URL("/assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",import.meta.url).href],["Naja_back",Ir],["Naja_front",new URL("/assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",import.meta.url).href],["Calculus_back",Ir],["Calculus_front",new URL("/assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",import.meta.url).href],["vCalculus_back",Ir],["vCalculus_front",new URL("/assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",import.meta.url).href],["Crucible_back",Ir],["Crucible_front",new URL("/assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",import.meta.url).href],["Kami_back",Ir],["Kami_front",new URL("/assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",import.meta.url).href],["Katalyst_back",Ir],["Katalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",import.meta.url).href],["vKatalyst_back",Ir],["vKatalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",import.meta.url).href],["Mercury_back",Ir],["Mercury_front",new URL("/assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",import.meta.url).href],["Venin_back",Ir],["Venin_front",new URL("/assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",import.meta.url).href],["Vitriol_back",Ir],["Vitriol_front",new URL("/assets/GB-S4-Alchemists-20-03-30-DjbTACjD.jpg",import.meta.url).href],["Compound_back",new URL("/assets/GB-S4-Alchemists-20-03-31-BTog_cbt.jpg",import.meta.url).href],["Compound_front",new URL("/assets/GB-S4-Alchemists-20-03-32-Dui0dDSy.jpg",import.meta.url).href],["Blacksmiths_back",new URL("/assets/GB-S4-Blacksmiths-20-03-01-C1aHp8XU.jpg",import.meta.url).href],["Blacksmiths_front",new URL("/assets/GB-S4-Blacksmiths-20-03-02-Buw0Sd4K.jpg",import.meta.url).href],["Anvil_back",Mr],["Anvil_front",new URL("/assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",import.meta.url).href],["Burnish_back",Mr],["Burnish_front",new URL("/assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",import.meta.url).href],["Culverin_back",Mr],["Culverin_front",new URL("/assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",import.meta.url).href],["Farris_back",Mr],["Farris_front",new URL("/assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",import.meta.url).href],["Ferrite_back",Mr],["Ferrite_front",new URL("/assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",import.meta.url).href],["Furnace_back",Mr],["Furnace_front",new URL("/assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",import.meta.url).href],["Hearth_back",Mr],["Hearth_front",new URL("/assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",import.meta.url).href],["Alloy_back",Mr],["Alloy_front",new URL("/assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",import.meta.url).href],["Bolt_back",Mr],["Bolt_front",new URL("/assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",import.meta.url).href],["Cast_back",Mr],["Cast_front",new URL("/assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",import.meta.url).href],["Cinder_back",Mr],["Cinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",import.meta.url).href],["vCinder_back",Mr],["vCinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",import.meta.url).href],["Cutlass_back",Mr],["Cutlass_front",new URL("/assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",import.meta.url).href],["Iron_back",Mr],["Iron_front",new URL("/assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",import.meta.url).href],["Sledge_back",Mr],["Sledge_front",new URL("/assets/GB-S4-Blacksmiths-20-03-32-DJ0MEQk3.jpg",import.meta.url).href],["Brewers_back",new URL("/assets/GB-S4-Brewers-20-03-01-_bnlGcvZ.jpg",import.meta.url).href],["Brewers_front",new URL("/assets/GB-S4-Brewers-20-03-02-Af5aErRU.jpg",import.meta.url).href],["Tapper_back",Nr],["Tapper_front",new URL("/assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",import.meta.url).href],["Esters_back",Nr],["Esters_front",new URL("/assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",import.meta.url).href],["Corker_back",Nr],["Corker_front",new URL("/assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",import.meta.url).href],["Scum_back",Nr],["Scum_front",new URL("/assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",import.meta.url).href],["Quaff_back",Nr],["Quaff_front",new URL("/assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",import.meta.url).href],["vDecimate_back",Nr],["vDecimate_front",new URL("/assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",import.meta.url).href],["Flea_back",Nr],["Flea_front",new URL("/assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",import.meta.url).href],["Friday_back",Nr],["Friday_front",new URL("/assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",import.meta.url).href],["Hooper_back",Nr],["Hooper_front",new URL("/assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",import.meta.url).href],["Mash_back",Nr],["Mash_front",new URL("/assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",import.meta.url).href],["Pintpot_back",Nr],["Pintpot_front",new URL("/assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",import.meta.url).href],["Spigot_back",Nr],["Spigot_front",new URL("/assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",import.meta.url).href],["vSpigot_back",Nr],["vSpigot_front",new URL("/assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",import.meta.url).href],["Stave_back",Nr],["Stave_front",new URL("/assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",import.meta.url).href],["Stoker_back",Nr],["Stoker_front",new URL("/assets/GB-S4-Brewers-20-03-32-Cps3196a.jpg",import.meta.url).href],["Lucky_back",new URL("/assets/GB-S4-Brewers-20-03-33-zps3y-hi.jpg",import.meta.url).href],["Lucky_front",new URL("/assets/GB-S4-Brewers-20-03-34-CdaFu_Sd.jpg",import.meta.url).href],["Butchers_back",new URL("/assets/GB-S4-Butchers-19-08-01-CLWIlX8T.jpg",import.meta.url).href],["Butchers_front",new URL("/assets/GB-S4-Butchers-19-08-02-CFlOzX_b.jpg",import.meta.url).href],["Ox_back",$r],["Ox_front",new URL("/assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",import.meta.url).href],["Fillet_back",$r],["Fillet_front",new URL("/assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",import.meta.url).href],["vBoar_back",$r],["vBoar_front",new URL("/assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",import.meta.url).href],["Princess_back",$r],["Princess_front",new URL("/assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",import.meta.url).href],["Truffles_back",$r],["Truffles_front",new URL("/assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",import.meta.url).href],["Boar_back",$r],["Boar_front",new URL("/assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",import.meta.url).href],["Boiler_back",$r],["Boiler_front",new URL("/assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",import.meta.url).href],["Brisket_back",$r],["Brisket_front",new URL("/assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",import.meta.url).href],["vBrisket_back",$r],["vBrisket_front",new URL("/assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",import.meta.url).href],["vGutter_back",$r],["vGutter_front",new URL("/assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",import.meta.url).href],["Layne_back",$r],["Layne_front",new URL("/assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",import.meta.url).href],["Meathook_back",$r],["Meathook_front",new URL("/assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",import.meta.url).href],["vOx_back",$r],["vOx_front",new URL("/assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",import.meta.url).href],["Shank_back",$r],["Shank_front",new URL("/assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",import.meta.url).href],["Tenderiser_back",$r],["Tenderiser_front",new URL("/assets/GB-S4-Butchers-19-08-32-CDETLFF4.jpg",import.meta.url).href],["Cooks_back",new URL("/assets/GB-S4-Cooks-19-08-01-B_Vd1DVn.jpg",import.meta.url).href],["Cooks_front",new URL("/assets/GB-S4-Cooks-19-08-02-BCRzyOhW.jpg",import.meta.url).href],["Wellington_back",Oc],["Wellington_front",new URL("/assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",import.meta.url).href],["Pepper_back",Oc],["Pepper_front",new URL("/assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",import.meta.url).href],["Cinnamon_back",Oc],["Cinnamon_front",new URL("/assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",import.meta.url).href],["Roast_back",Oc],["Roast_front",new URL("/assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",import.meta.url).href],["Spice_back",Oc],["Spice_front",new URL("/assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",import.meta.url).href],["Sugar_back",Oc],["Sugar_front",new URL("/assets/GB-S4-Cooks-19-08-14-2NKQVsMs.jpg",import.meta.url).href],["Engineers_back",new URL("/assets/GB-S4-Engineers-20-03-01-Di9u3X0x.jpg",import.meta.url).href],["Engineers_front",new URL("/assets/GB-S4-Engineers-20-03-02-Cy2lNFLR.jpg",import.meta.url).href],["Ballista_back",Xr],["Ballista_front",new URL("/assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",import.meta.url).href],["PinVice_back",Xr],["PinVice_front",new URL("/assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",import.meta.url).href],["Rivet_back",Xr],["Rivet_front",new URL("/assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",import.meta.url).href],["Mainspring_back",Xr],["Mainspring_front",new URL("/assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",import.meta.url).href],["Mother_back",Xr],["Mother_front",new URL("/assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",import.meta.url).href],["Colossus_back",Xr],["Colossus_front",new URL("/assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",import.meta.url).href],["vHarriet_back",Xr],["vHarriet_front",new URL("/assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",import.meta.url).href],["Hoist_back",Xr],["Hoist_front",new URL("/assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",import.meta.url).href],["Locus_back",Xr],["Locus_front",new URL("/assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",import.meta.url).href],["Nomad_back",Xr],["Nomad_front",new URL("/assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",import.meta.url).href],["Ratchet_back",Xr],["Ratchet_front",new URL("/assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",import.meta.url).href],["Salvo_back",Xr],["Salvo_front",new URL("/assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",import.meta.url).href],["Velocity_back",Xr],["Velocity_front",new URL("/assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",import.meta.url).href],["vVelocity_back",Xr],["vVelocity_front",new URL("/assets/GB-S4-Engineers-20-03-30-bp8c3Uf4.jpg",import.meta.url).href],["Falconers_back",new URL("/assets/GB-S4-Falconers-20-03-01-DAO812Wl.jpg",import.meta.url).href],["Falconers_front",new URL("/assets/GB-S4-Falconers-20-03-02-C_ro4zOy.jpg",import.meta.url).href],["Devana_back",jc],["Devana_front",new URL("/assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",import.meta.url).href],["Frelsi_back",jc],["Frelsi_front",new URL("/assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",import.meta.url).href],["Ikaros_back",jc],["Ikaros_front",new URL("/assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",import.meta.url).href],["Mataagi_back",jc],["Mataagi_front",new URL("/assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",import.meta.url).href],["Minerva_back",jc],["Minerva_front",new URL("/assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",import.meta.url).href],["Rundaas_back",jc],["Rundaas_front",new URL("/assets/GB-S4-Falconers-20-03-14-D7WFZjKa.jpg",import.meta.url).href],["Farmers_back",new URL("/assets/GB-S4-Farmers-19-12-01-LmV2xFUn.jpg",import.meta.url).href],["Farmers_front",new URL("/assets/GB-S4-Farmers-19-12-02-COLOFnlA.jpg",import.meta.url).href],["Grange_back",Ar],["Grange_front",new URL("/assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",import.meta.url).href],["Thresher_back",Ar],["Thresher_front",new URL("/assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",import.meta.url).href],["Festival_back",Ar],["Festival_front",new URL("/assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",import.meta.url).href],["Peck_back",Ar],["Peck_front",new URL("/assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",import.meta.url).href],["Buckwheat_back",Ar],["Buckwheat_front",new URL("/assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",import.meta.url).href],["Amber_back",Ar],["Amber_front",new URL("/assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",import.meta.url).href],["Bushel_back",Ar],["Bushel_front",new URL("/assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",import.meta.url).href],["Fallow_back",Ar],["Fallow_front",new URL("/assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",import.meta.url).href],["Harrow_back",Ar],["Harrow_front",new URL("/assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",import.meta.url).href],["vHonour_back",Ar],["vHonour_front",new URL("/assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",import.meta.url).href],["Jackstraw_back",Ar],["Jackstraw_front",new URL("/assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",import.meta.url).href],["Millstone_back",Ar],["Millstone_front",new URL("/assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",import.meta.url).href],["Ploughman_back",Ar],["Ploughman_front",new URL("/assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",import.meta.url).href],["Tater_back",Ar],["Tater_front",new URL("/assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",import.meta.url).href],["Windle_back",Ar],["Windle_front",new URL("/assets/GB-S4-Farmers-19-12-32-DfwzxWCr.jpg",import.meta.url).href],["Fishermen_back",new URL("/assets/GB-S4-Fishermen-19-08-01-D54clbHu.jpg",import.meta.url).href],["Fishermen_front",new URL("/assets/GB-S4-Fishermen-19-08-02-D_xvByJF.jpg",import.meta.url).href],["Shark_back",Dr],["Shark_front",new URL("/assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",import.meta.url).href],["Corsair_back",Dr],["Corsair_front",new URL("/assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",import.meta.url).href],["Yukai_back",Dr],["Yukai_front",new URL("/assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",import.meta.url).href],["Salt_back",Dr],["Salt_front",new URL("/assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",import.meta.url).href],["Tentacles_back",Dr],["Tentacles_front",new URL("/assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",import.meta.url).href],["Angel_back",Dr],["Angel_front",new URL("/assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",import.meta.url).href],["Greyscales_back",Dr],["Greyscales_front",new URL("/assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",import.meta.url).href],["Hag_back",Dr],["Hag_front",new URL("/assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",import.meta.url).href],["Jac_back",Dr],["Jac_front",new URL("/assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",import.meta.url).href],["Knuckles_back",Dr],["Knuckles_front",new URL("/assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",import.meta.url).href],["Kraken_back",Dr],["Kraken_front",new URL("/assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",import.meta.url).href],["Sakana_back",Dr],["Sakana_front",new URL("/assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",import.meta.url).href],["vSakana_back",Dr],["vSakana_front",new URL("/assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",import.meta.url).href],["Siren_back",Dr],["Siren_front",new URL("/assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",import.meta.url).href],["vSiren_back",Dr],["vSiren_front",new URL("/assets/GB-S4-Fishermen-19-08-32-Co1is7SR.jpg",import.meta.url).href],["Hunters_back",new URL("/assets/GB-S4-Hunters-19-08-01-CmDbpORb.jpg",import.meta.url).href],["Hunters_front",new URL("/assets/GB-S4-Hunters-19-08-02-DP64V92U.jpg",import.meta.url).href],["Theron_back",Br],["Theron_front",new URL("/assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",import.meta.url).href],["Skatha_back",Br],["Skatha_front",new URL("/assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",import.meta.url).href],["Steeljaw_back",Br],["Steeljaw_front",new URL("/assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",import.meta.url).href],["Fahad_back",Br],["Fahad_front",new URL("/assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",import.meta.url).href],["Snow_back",Br],["Snow_front",new URL("/assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",import.meta.url).href],["Chaska_back",Br],["Chaska_front",new URL("/assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",import.meta.url).href],["Edge_back",Br],["Edge_front",new URL("/assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",import.meta.url).href],["Egret_back",Br],["Egret_front",new URL("/assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",import.meta.url).href],["Hearne_back",Br],["Hearne_front",new URL("/assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",import.meta.url).href],["vHearne_back",Br],["vHearne_front",new URL("/assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",import.meta.url).href],["Jaecar_back",Br],["Jaecar_front",new URL("/assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",import.meta.url).href],["vMinx_back",Br],["vMinx_front",new URL("/assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",import.meta.url).href],["Seenah_back",Br],["Seenah_front",new URL("/assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",import.meta.url).href],["Ulfr_back",Br],["Ulfr_front",new URL("/assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",import.meta.url).href],["Zarola_back",Br],["Zarola_front",new URL("/assets/GB-S4-Hunters-19-08-32-CjwZbZPz.jpg",import.meta.url).href],["Masons_back",new URL("/assets/GB-S4-Masons-19-03-01-CU2vGuj1.jpg",import.meta.url).href],["Masons_front",new URL("/assets/GB-S4-Masons-19-03-02-BT75CHhK.jpg",import.meta.url).href],["Honour_back",Fr],["Honour_front",new URL("/assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",import.meta.url).href],["Hammer_back",Fr],["Hammer_front",new URL("/assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",import.meta.url).href],["Corbelli_back",Fr],["Corbelli_front",new URL("/assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",import.meta.url).href],["Marbles_back",Fr],["Marbles_front",new URL("/assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",import.meta.url).href],["Wrecker_back",Fr],["Wrecker_front",new URL("/assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",import.meta.url).href],["Brick_back",Fr],["Brick_front",new URL("/assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",import.meta.url).href],["Champ_back",Fr],["Champ_front",new URL("/assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",import.meta.url).href],["Chisel_back",Fr],["Chisel_front",new URL("/assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",import.meta.url).href],["vChisel_back",Fr],["vChisel_front",new URL("/assets/GB-S4-Masons-19-08-18-CCBausup.jpg",import.meta.url).href],["Flint_back",Fr],["Flint_front",new URL("/assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",import.meta.url).href],["Granite_back",Fr],["Granite_front",new URL("/assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",import.meta.url).href],["Harmony_back",Fr],["Harmony_front",new URL("/assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",import.meta.url).href],["vHarmony_back",Fr],["vHarmony_front",new URL("/assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",import.meta.url).href],["Mallet_back",Fr],["Mallet_front",new URL("/assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",import.meta.url).href],["Tower_back",Fr],["Tower_front",new URL("/assets/GB-S4-Masons-19-08-30-6kjit4Y9.jpg",import.meta.url).href],["Miners_back",new URL("/assets/GB-S4-Miners-20-03-01-D4YSyCEa.jpg",import.meta.url).href],["Miners_front",new URL("/assets/GB-S4-Miners-20-03-02-osGRf8x4.jpg",import.meta.url).href],["Shaft_back",Lc],["Shaft_front",new URL("/assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",import.meta.url).href],["Digger_back",Lc],["Digger_front",new URL("/assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",import.meta.url).href],["Fissure_back",Lc],["Fissure_front",new URL("/assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",import.meta.url).href],["Fuse_back",Lc],["Fuse_front",new URL("/assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",import.meta.url).href],["Mule_back",Lc],["Mule_front",new URL("/assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",import.meta.url).href],["Spade_back",Lc],["Spade_front",new URL("/assets/GB-S4-Miners-20-03-14-OmIZrrCX.jpg",import.meta.url).href],["Morticians_back",new URL("/assets/GB-S4-Morticians-19-08-01-DIFD5DK0.jpg",import.meta.url).href],["Morticians_front",new URL("/assets/GB-S4-Morticians-19-08-02-BIp1_EUg.jpg",import.meta.url).href],["Obulus_back",wr],["Obulus_front",new URL("/assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",import.meta.url).href],["Scalpel_back",wr],["Scalpel_front",new URL("/assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",import.meta.url).href],["Mourn_back",wr],["Mourn_front",new URL("/assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",import.meta.url).href],["Dirge_back",wr],["Dirge_front",new URL("/assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",import.meta.url).href],["Vileswarm_back",wr],["Vileswarm_front",new URL("/assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",import.meta.url).href],["Bonesaw_back",wr],["Bonesaw_front",new URL("/assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",import.meta.url).href],["Brainpan_back",wr],["Brainpan_front",new URL("/assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",import.meta.url).href],["Memory_back",wr],["Memory_front",new URL("/assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",import.meta.url).href],["Casket_back",wr],["Casket_front",new URL("/assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",import.meta.url).href],["Cosset_back",wr],["Cosset_front",new URL("/assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",import.meta.url).href],["Gaffer_back",wr],["Gaffer_front",new URL("/assets/gaffer-front-large-box-BhDGw3yv.png",import.meta.url).href],["Ghast_back",wr],["Ghast_front",new URL("/assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",import.meta.url).href],["Graves_back",wr],["Graves_front",new URL("/assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",import.meta.url).href],["vGraves_back",wr],["vGraves_front",new URL("/assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",import.meta.url).href],["vHemlocke_back",wr],["vHemlocke_front",new URL("/assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",import.meta.url).href],["Silence_back",wr],["Silence_front",new URL("/assets/GB-S4-Morticians-19-08-34-Cml7KNHH.jpg",import.meta.url).href],["Navigators_back",new URL("/assets/GB-S4-Navigators-20-03-01-M7N3Qnm9.jpg",import.meta.url).href],["Navigators_front",new URL("/assets/GB-S4-Navigators-20-03-02-C0DvULy4.jpg",import.meta.url).href],["Windfinder_back",Ic],["Wander_front",new URL("/assets/GB-S4-Navigators-20-03-04-C54iXdHJ.jpg",import.meta.url).href],["Windfinder_front",new URL("/assets/GB-S4-Navigators-20-03-05-DijPkVU0.jpg",import.meta.url).href],["Wander_back",Ic],["Azimuth_front",new URL("/assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",import.meta.url).href],["Azimuth_back",Ic],["Ebb_back",Ic],["Ebb_front",new URL("/assets/GB-S4-Navigators-20-03-10-kxgvrwFf.jpg",import.meta.url).href],["Fathom_front",new URL("/assets/GB-S4-Navigators-20-03-11-DLBrn3lH.jpg",import.meta.url).href],["Fathom_back",Ic],["Horizon_back",Ic],["Horizon_front",new URL("/assets/GB-S4-Navigators-20-03-14-4LJM_QAb.jpg",import.meta.url).href],["Order_back",new URL("/assets/GB-S4-Order-19-08-01-asZnKqhR.jpg",import.meta.url).href],["Order_front",new URL("/assets/GB-S4-Order-19-08-02-DxYxwIyf.jpg",import.meta.url).href],["sBrisket_back",fa],["sBrisket_front",new URL("/assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",import.meta.url).href],["Pride_back",fa],["Pride_front",new URL("/assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",import.meta.url).href],["Benediction_back",fa],["Benediction_front",new URL("/assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",import.meta.url).href],["vFangtooth_back",fa],["vFangtooth_front",new URL("/assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",import.meta.url).href],["Grace_back",fa],["Grace_front",new URL("/assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",import.meta.url).href],["Harry_back",fa],["Harry_front",new URL("/assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",import.meta.url).href],["Mist_back",fa],["Mist_front",new URL("/assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",import.meta.url).href],["sSpigot_back",fa],["sSpigot_front",new URL("/assets/GB-S4-Order-19-08-18-gkj8skFt.jpg",import.meta.url).href],["Ratcatchers_back",new URL("/assets/GB-S4-Ratcatchers-19-08-01-CbXHBUJx.jpg",import.meta.url).href],["Ratcatchers_front",new URL("/assets/GB-S4-Ratcatchers-19-08-02-XbBjNmUR.jpg",import.meta.url).href],["Piper_back",Mc],["Piper_front",new URL("/assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",import.meta.url).href],["Squeak_back",Mc],["Squeak_front",new URL("/assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",import.meta.url).href],["Miasma_back",Mc],["Miasma_front",new URL("/assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",import.meta.url).href],["Pelage_back",Mc],["Pelage_front",new URL("/assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",import.meta.url).href],["Scourge_back",Mc],["Scourge_front",new URL("/assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",import.meta.url).href],["Skulk_back",Mc],["Skulk_front",new URL("/assets/GB-S4-Ratcatchers-19-08-14-D1JyRK5e.jpg",import.meta.url).href],["Shepherds_back",new URL("/assets/GB-S4-Shepherds-20-03-01-BszDyn7n.jpg",import.meta.url).href],["Shepherds_front",new URL("/assets/GB-S4-Shepherds-20-03-02-XqwLekip.jpg",import.meta.url).href],["Herder_back",hl],["Herder_front",new URL("/assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",import.meta.url).href],["Babe_back",hl],["Babe_front",new URL("/assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",import.meta.url).href],["Crook_back",hl],["Crook_front",new URL("/assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",import.meta.url).href],["Hook_back",hl],["Hook_front",new URL("/assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",import.meta.url).href],["Lamb_back",hl],["Lamb_front",new URL("/assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",import.meta.url).href],["Ram_back",hl],["Ram_front",new URL("/assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",import.meta.url).href],["Shearer_back",hl],["Shearer_front",new URL("/assets/GB-S4-Shepherds-20-03-16-CH7z3m46.jpg",import.meta.url).href],["Union_back",new URL("/assets/GB-S4-Union-20-03-01-BYUf_cPI.jpg",import.meta.url).href],["Union_front",new URL("/assets/GB-S4-Union-20-03-02-CAfWuq1n.jpg",import.meta.url).href],["Blackheart_back",Jr],["Blackheart_front",new URL("/assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",import.meta.url).href],["vRage_back",Jr],["vRage_front",new URL("/assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",import.meta.url).href],["vGreede_back",Jr],["vGreede_front",new URL("/assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",import.meta.url).href],["Coin_back",Jr],["Coin_front",new URL("/assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",import.meta.url).href],["Strongbox_back",Jr],["Strongbox_front",new URL("/assets/GB-S4-Union-20-03-12--TefmgjH.jpg",import.meta.url).href],["Avarisse_back",Jr],["Avarisse_front",new URL("/assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",import.meta.url).href],["Greede_back",Jr],["Greede_front",new URL("/assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",import.meta.url).href],["Decimate_back",Jr],["Decimate_front",new URL("/assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",import.meta.url).href],["Fangtooth_back",Jr],["Fangtooth_front",new URL("/assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",import.meta.url).href],["Gutter_back",Jr],["Gutter_front",new URL("/assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",import.meta.url).href],["Hemlocke_back",Jr],["Hemlocke_front",new URL("/assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",import.meta.url).href],["Minx_back",Jr],["Minx_front",new URL("/assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",import.meta.url).href],["Rage_back",Jr],["Rage_front",new URL("/assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",import.meta.url).href],["Snakeskin_back",Jr],["Snakeskin_front",new URL("/assets/GB-S4-Union-20-03-30-DOPQxsMF.jpg",import.meta.url).href],["Lamplighters_front",new URL("/assets/lamp-beta-63HlWaeb.png",import.meta.url).href],["Lamplighters_back",new URL("/assets/lamp-beta-63HlWaeb.png",import.meta.url).href],["Nightlight_gbcp_front",new URL("/assets/nightlight-00-DeG30Qno.jpg",import.meta.url).href],["Nightlight_gbcp_back",new URL("/assets/nightlight-01-B5GmfHdF.jpg",import.meta.url).href],["Soot_gbcp_front",new URL("/assets/soot-00-CjgkmHEF.jpg",import.meta.url).href],["Soot_gbcp_back",new URL("/assets/soot-01-DLvloUPB.jpg",import.meta.url).href],["Beacon_gbcp_front",new URL("/assets/beacon-00-L9zfj4Q8.jpg",import.meta.url).href],["Beacon_gbcp_back",new URL("/assets/beacon-01-vYao7kaT.jpg",import.meta.url).href],["Heat_gbcp_front",new URL("/assets/heat-00-D38QQgsn.jpg",import.meta.url).href],["Heat_gbcp_back",new URL("/assets/heat-01-TaWfEq1e.jpg",import.meta.url).href],["Phosphor_gbcp_front",new URL("/assets/phosphor-00-kYBsDzr4.jpg",import.meta.url).href],["Phosphor_gbcp_back",new URL("/assets/phosphor-01-aCMgs7Xa.jpg",import.meta.url).href],["Wick_gbcp_front",new URL("/assets/wick-00-CEZ6BY1J.jpg",import.meta.url).href],["Wick_gbcp_back",new URL("/assets/wick-01-DtuDStax.jpg",import.meta.url).href],["sBrisket_gbcp_front",new URL("/assets/brisket3-00-TRUFkM-Q.jpg",import.meta.url).href],["sBrisket_gbcp_back",new URL("/assets/brisket3-01-C19fZQ9I.jpg",import.meta.url).href],["Cast_gbcp_front",new URL("/assets/cast-00-CDhbzPRV.jpg",import.meta.url).href],["Cast_gbcp_back",new URL("/assets/cast-01-DOJiR9Ch.jpg",import.meta.url).href],["Crook_gbcp_front",new URL("/assets/crook-00-C4D_gdaM.jpg",import.meta.url).href],["Crook_gbcp_back",new URL("/assets/crook-01-D9bCOT5R.jpg",import.meta.url).href],["Egret_gbcp_front",new URL("/assets/egret-00-BKhmAAwA.jpg",import.meta.url).href],["Egret_gbcp_back",new URL("/assets/egret-01-DCSfZLX7.jpg",import.meta.url).href],["Hook_gbcp_front",new URL("/assets/hook-00-BCtxORP2.jpg",import.meta.url).href],["Hook_gbcp_back",new URL("/assets/hook-01-CFEXTspD.jpg",import.meta.url).href],["Ikaros_gbcp_front",new URL("/assets/ikaros-00-BlK23AQW.jpg",import.meta.url).href],["Ikaros_gbcp_back",new URL("/assets/ikaros-01-CaTWYr3E.jpg",import.meta.url).href],["Lucky_gbcp_front",new URL("/assets/lucky-00--3wf1Q-o.jpg",import.meta.url).href],["Lucky_gbcp_back",new URL("/assets/lucky-01-CeFOEkb7.jpg",import.meta.url).href],["Miasma_gbcp_front",new URL("/assets/miasma-00-gJuVKj0r.jpg",import.meta.url).href],["Miasma_gbcp_back",new URL("/assets/miasma-01-BFpZKg3H.jpg",import.meta.url).href],["Minx_gbcp_front",new URL("/assets/minx-00-DKid1QgM.jpg",import.meta.url).href],["Minx_gbcp_back",new URL("/assets/minx-01-h4AvAe2P.jpg",import.meta.url).href],["Steeljaw_gbcp_front",new URL("/assets/steeljaw-00-DBylP57a.jpg",import.meta.url).href],["Steeljaw_gbcp_back",new URL("/assets/steeljaw-01-DHvdkD3u.jpg",import.meta.url).href],["Tenderiser_gbcp_front",new URL("/assets/tenderiser-00-DJeWjZaC.jpg",import.meta.url).href],["Tenderiser_gbcp_back",new URL("/assets/tenderiser-01-Dn53BCqM.jpg",import.meta.url).href],["Angel_gbcp_front",new URL("/assets/Angel-00-_OcCE1xs.jpg",import.meta.url).href],["Angel_gbcp_back",new URL("/assets/Angel-01-RsyL_b7r.jpg",import.meta.url).href],["Blackheart_gbcp_front",new URL("/assets/Blackheart-00-Barboaw1.jpg",import.meta.url).href],["Blackheart_gbcp_back",new URL("/assets/Blackheart-01-DqXGaAGL.jpg",import.meta.url).href],["Brisket_gbcp_front",new URL("/assets/Brisket-00-fpn5lXhR.jpg",import.meta.url).href],["Brisket_gbcp_back",new URL("/assets/Brisket-01-Cz0yKYaC.jpg",import.meta.url).href],["Flea_gbcp_front",new URL("/assets/Flea-00-PYY29ZDm.jpg",import.meta.url).href],["Flea_gbcp_back",new URL("/assets/Flea-01-B-ceu-Fs.jpg",import.meta.url).href],["Gaffer_gbcp_front",new URL("/assets/Gaffer-00-Chm4XJB6.jpg",import.meta.url).href],["Gaffer_gbcp_back",new URL("/assets/Gaffer-01-DChRbbv3.jpg",import.meta.url).href],["Locus_gbcp_front",new URL("/assets/Locus-00-BlUYiKL3.jpg",import.meta.url).href],["Locus_gbcp_back",new URL("/assets/Locus-01-CgJeSABI.jpg",import.meta.url).href],["Salt_gbcp_front",new URL("/assets/Salt-00-DTipa4Vq.jpg",import.meta.url).href],["Salt_gbcp_back",new URL("/assets/Salt-01-DgX-3wqX.jpg",import.meta.url).href],["Truffles_gbcp_front",new URL("/assets/Truffles-00-BxTIIeQ4.jpg",import.meta.url).href],["Truffles_gbcp_back",new URL("/assets/Truffles-01-1xGyMIOv.jpg",import.meta.url).href],["Ulfr_gbcp_front",new URL("/assets/Ulfr-00-BXhlGxmA.jpg",import.meta.url).href],["Ulfr_gbcp_back",new URL("/assets/Ulfr-01-JQfocVce.jpg",import.meta.url).href],["vGutter_gbcp_front",new URL("/assets/vGutter-00-CpnNh9P4.jpg",import.meta.url).href],["vGutter_gbcp_back",new URL("/assets/vGutter-01-BWHR1234.jpg",import.meta.url).href],["Beacon_front",new URL("/assets/beacon-WzU-Fgwo.jpg",import.meta.url).href],["Beacon_back",Nc],["Heat_front",new URL("/assets/heat-kg0Ne0rh.jpg",import.meta.url).href],["Heat_back",Nc],["Nightlight_front",new URL("/assets/nightlight-BICbD_Qy.jpg",import.meta.url).href],["Nightlight_back",Nc],["Phosphor_front",new URL("/assets/phosphor-CifRCYrC.jpg",import.meta.url).href],["Phosphor_back",Nc],["Soot_front",new URL("/assets/soot-CXEcs2BT.jpg",import.meta.url).href],["Soot_back",Nc],["Wick_front",new URL("/assets/wick-D10XZuyz.jpg",import.meta.url).href],["Wick_back",Nc]]);var fte=function(e){return e instanceof RegExp},pte=function(t){var n=/[\\^$.*+?()[\]{}|]/g,r=RegExp(n.source);return t&&r.test(t)?t.replace(n,"\\$&"):t},KI=function(e){return typeof e=="string"},hte=function(e){var t=[];return e.forEach(function(n){Array.isArray(n)?t=t.concat(n):t.push(n)}),t};function mte(e,t,n){var r=0,i=0;if(e==="")return e;if(!e||!KI(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var o=t;fte(o)||(o=new RegExp("("+pte(o)+")","gi"));for(var s=e.split(o),a=1,l=s.length;a{let t=jh(e,/\(◉(.*?)\)/g,(n,r)=>v.jsxs(jt.Fragment,{children:["(◉",v.jsx("span",{style:{fontStyle:"italic"},children:n}),")"]},`i-a-${r}`));return t=jh(t,/\(([^◉].*?)\)/g,(n,r)=>v.jsxs(jt.Fragment,{children:["(",v.jsx("span",{style:{fontStyle:"italic"},children:n}),")"]},`i-${r}`)),t=jh(t,/{([<>TKDGB]+)}/,(n,r)=>v.jsx(jt.Fragment,{children:v.jsx("span",{style:{display:"inline-flex",width:"21px",height:"1ex",position:"relative",overflow:"visible"},children:v.jsx("div",{style:{display:"flex",overflow:"visible",width:"21px",height:"21px",backgroundColor:"white",border:"var(--line-width) solid black",borderRadius:"21px",position:"absolute",alignSelf:"center",justifySelf:"center",alignItems:"center",justifyContent:"center"},children:v.jsx(EI,{icon:n.replace(/GB/g,"CP")})})})},`pb-${r}`)),t=jh(t,/\b([A-Z]+)\b/g,(n,r)=>v.jsx("span",{style:{letterSpacing:"-1px"},children:n},`tla-${r}`)),v.jsx(v.Fragment,{children:t})},vte=e=>{const t=e.model,n=t.id,{setting$:r}=ui(),[i,o]=C.useState(),[s,a]=C.useState();C.useEffect(()=>{const f=r==null?void 0:r.subscribe(m=>{o(m==null?void 0:m.toJSON().data.cardPreferences.preferredStyle),a(m==null?void 0:m.toJSON().data.language)});return()=>f==null?void 0:f.unsubscribe()});const[l,c]=fo(f=>Promise.all([f.guilds.findOne().where({name:t.guild1}).exec(),f.guilds.findOne().where({name:t.guild2}).exec()]),[t.guild1,t.guild2])??[];if(!l)return null;const u=i==="gbcp"&&(cn.has(`${n}_gbcp_front`)||cn.has(`${n}_full`)),d=u?cn.get(`${n}_full`)??cn.get(`${n}_gbcp_front`)??cn.get(`${n}_front`):cn.get(`${n}_front`)??cn.get(`${n}_full`)??cn.get(`${n}_gbcp_front`);return v.jsx("div",{className:`card-front ${n} lang-${s} ${u&&"gbcp"} ${e.className}`,style:{"--team-color":l.color,"--gbcp-color":np(l.shadow??l.color).mix(np.rgb(254,246,227),.9).string(),"--guild1-color":l.color,"--guild2-color":c?c.color:void 0,"--mom-color":l.shadow,"--mom-border-color":l.darkColor,backgroundImage:e.noBackground?void 0:`url(${d})`,...e.style},children:v.jsxs("div",{className:`overlay ${u?"gbcp":""}`,children:[v.jsxs("div",{className:"font-top-box",children:[v.jsx(yte,{model:t,guild:l}),v.jsx(xte,{model:t})]}),v.jsx(wte,{model:t,gbcp:u}),v.jsx("div",{className:"character-plays-wrapper",children:v.jsx(_te,{model:t,gbcp:u})}),v.jsx(bte,{model:t,health$:e.health$})]})})},yte=({model:e,guild:t})=>v.jsxs("div",{className:"name-plate",children:[v.jsx("div",{className:"guild-icon",children:v.jsx(ji,{id:"guild-icon",icon:t.name})}),v.jsxs("div",{className:"name-plate-right",children:[v.jsx("div",{className:"name",children:v.jsx("div",{className:"dropcap",children:e.name.split(/(?=[A-Z])/).map((n,r)=>v.jsx("span",{children:n},r))})}),v.jsxs("div",{className:"reach",children:["Melee Zone ",e.reach?2:1,'"']})]})]}),bte=({model:e,health$:t})=>{const[n,r]=C.useState(e.hp);return C.useEffect(()=>{const i=t==null?void 0:t.subscribe(o=>r(o));return()=>i==null?void 0:i.unsubscribe()},[t]),v.jsx("div",{className:"health",children:[...Array(e.hp).keys()].map(i=>v.jsx("div",{className:`health-box ${i+1>n?"damaged":""}`,children:i===0&&v.jsx(ji,{icon:"skull",size:17})||i+1===e.recovery&&v.jsx(ji,{icon:"bandage",size:22})||i+1===e.hp&&i+1},i))})},wte=({model:e,gbcp:t=!1})=>{var n;return v.jsx("div",{className:"playbook",children:(n=e.playbook)==null?void 0:n.map((r,i)=>r==null?void 0:r.flatMap((o,s)=>{const[a,l]=o?o.split(";"):[null,null];return v.jsx("div",{className:`playbook-result ${a?"":"spacer"} ${l?"momentus":""}`,style:{"--col":s,display:"flex",flexDirection:t?"row":"column",padding:"0.10em",gap:t?0:"0.05em"},children:a?a.split(",").map((c,u)=>(c=t?c.replace(/^CP$/,"CP-gbcp").replace(/^CP2$/,"CP2-gbcp"):c,v.jsx(EI,{icon:c},u))):null},i*7+s)}))})},xte=({model:e})=>v.jsxs("div",{className:"statbox",children:[v.jsx("span",{children:"MOV"}),v.jsx("span",{children:"TAC"}),v.jsx("span",{children:"KICK"}),v.jsx("span",{children:"DEF"}),v.jsx("span",{children:"ARM"}),v.jsx("span",{children:"INF"}),v.jsx("span",{children:`${e.jog}"/${e.sprint}"`}),v.jsx("span",{children:e.tac}),v.jsx("span",{children:`${e.kickdice}/${e.kickdist}"`}),v.jsx("span",{children:`${e.def}+`}),v.jsx("span",{children:e.arm}),v.jsx("span",{children:`${e.inf}/${e.infmax}`})]}),$R=({test:e})=>v.jsx(ji,{icon:e?"checkmark":"ballotX",size:14});function Ste({text:e}){const t=e.split("[",1)[0],n=e.replace(/[^[]*(\[.*\])?/," $1");return v.jsxs("div",{className:"name",children:[v.jsx("span",{children:t}),v.jsx("span",{children:n})]})}const _te=({model:e,gbcp:t=!1})=>v.jsxs("div",{className:"character-plays",children:[v.jsxs("span",{className:"dropcap",children:[v.jsx("span",{children:"Character "}),v.jsx("span",{children:"Plays"})]}),v.jsx("span",{children:"CST"}),v.jsx("span",{children:"RNG"}),v.jsx("span",{children:"SUS"}),v.jsx("span",{children:"OPT"}),e.character_plays.map(n=>v.jsxs(jt.Fragment,{children:[v.jsx(Ste,{text:n.name}),v.jsx("span",{children:String(n.CST).split(",").map((r,i)=>v.jsxs("span",{children:[i>0&&"/",{CP:v.jsx(ji,{icon:t?"ball":"GB",size:18}),CP2:v.jsx(ji,{icon:t?"trophy":"GBT",size:18})}[r]||v.jsx("span",{children:r})]},i))}),v.jsxs("span",{children:[n.RNG,typeof n.RNG=="number"&&'"']}),v.jsx("span",{children:v.jsx($R,{test:n.SUS})}),v.jsx("span",{children:v.jsx($R,{test:n.OPT})}),v.jsx("div",{className:"text",children:ly(n.text)})]},n.name))]}),yg=jt.memo(vte),Cte=e=>{const t=e.model,n=t.id,{setting$:r}=ui(),[i,o]=C.useState();C.useEffect(()=>{const c=r==null?void 0:r.pipe(qt(u=>u==null?void 0:u.toJSON().data.cardPreferences.preferredStyle)).subscribe(u=>o(u));return()=>c==null?void 0:c.unsubscribe()});const s=fo(c=>c.guilds.findOne().where({name:t.guild1}).exec(),[t.guild1]);if(!s)return null;const a=i==="gbcp"&&(cn.has(`${n}_gbcp_front`)||cn.has(`${n}_full`)),l=a?cn.get(`${n}_full`)??cn.get(`${n}_gbcp_back`)??cn.get(`${n}_back`):cn.get(`${n}_back`)??cn.get(`${n}_full`)??cn.get(`${n}_gbcp_back`);return v.jsx("div",{className:`card-back ${n} ${a&&"gbcp"} ${e.className}`,style:{"--team-color":s.color,"--gbcp-color":np(s.shadow??s.color).mix(np.rgb(254,246,227),.9),"--mom-color":s.shadow,"--mom-border-color":s.darkColor,backgroundImage:e.noBackground?void 0:`url(${l})`,...e.style},children:v.jsxs("div",{className:`overlay ${a?"gbcp":""}`,children:[v.jsxs("div",{className:"container",children:[v.jsxs("div",{className:"name-plate",children:[v.jsx("div",{className:"guild-icon",children:v.jsx(ji,{id:"guild-icon",icon:s.name})}),v.jsx("div",{className:"name dropcap",children:t.name.split(/(?=[A-Z])/).map((c,u)=>v.jsx("span",{children:c},u))})]}),v.jsx(kte,{model:t}),v.jsx(Ete,{model:t}),v.jsx(Rte,{model:t})]}),v.jsxs("div",{className:"footer",children:[v.jsx("div",{className:"tags",children:t.types}),v.jsxs("div",{className:"right",children:[v.jsxs("div",{className:"icons",children:[v.jsx(Q0,{icon:a?"gbcp":"GB"}),v.jsx("div",{className:"icon wrapper",children:v.jsx("div",{style:{width:"100%",height:"100%",border:"2px solid black",borderRadius:"50%",display:"flex",placeContent:"center",alignItems:"center",fontFamily:"Crimson Text",fontSize:"26px",fontWeight:"800"},children:t.version})}),t.guild2&&v.jsx(Q0,{icon:t.guild2}),v.jsx(Q0,{icon:t.guild1})]}),v.jsx("div",{className:"base-size",children:`Size ${t.base} mm`})]})]})]})})},Q0=({icon:e})=>v.jsx("div",{className:"icon wrapper",children:v.jsx(ji,{icon:e})});function FS({text:e}){const t=e.split("[",1)[0],n=e.replace(/[^[]*(\[.*\])?/," $1");return v.jsxs("div",{children:[v.jsx("span",{children:t}),v.jsx("span",{children:n})]})}const kte=({model:e})=>v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"header dropcap",children:[v.jsx("span",{children:"Character "}),v.jsx("span",{children:"Traits"})]}),e.character_traits.map((t,n)=>v.jsxs(jt.Fragment,{children:[v.jsxs("div",{className:"character-trait",children:[v.jsx("div",{className:`trait ${t.active&&"active"}`,children:v.jsx(FS,{text:t.name.concat(t.parameter?` [${t.parameter}]`:"")})}),v.jsx("span",{className:"text",children:ly(t.text)})]},`${t.name}-${n}`),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]},`ct-${n}`))]}),Ete=({model:e})=>{if(!e.heroic)return null;const t=e.heroic.split(` + `):"",this.name="UnsubscriptionError",this.errors=n}});function _1(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Kv=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=$u(s),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else s.remove(this);var u=this.initialTeardown;if(In(u))try{u()}catch(g){o=g instanceof C0?g.errors:[g]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=$u(d),m=f.next();!m.done;m=f.next()){var h=m.value;try{Xk(h)}catch(g){o=o??[],g instanceof C0?o=Jl(Jl([],Xl(o)),Xl(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new C0(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Xk(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&_1(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&_1(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),_j=Kv.EMPTY;function Cj(e){return e instanceof Kv||e&&"closed"in e&&In(e.remove)&&In(e.add)&&In(e.unsubscribe)}function Xk(e){In(e)?e():e.unsubscribe()}var kj={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ej={setTimeout:function(e,t){for(var n=[],r=2;r0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,s=i.isStopped,a=i.observers;return o||s?_j:(this.currentObservers=null,a.push(n),new Kv(function(){r.currentObservers=null,_1(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,s=r.isStopped;i?n.error(o):s&&n.complete()},t.prototype.asObservable=function(){var n=new ci;return n.source=this,n},t.create=function(n,r){return new tE(n,r)},t}(ci),tE=function(e){uc(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:_j},t}(Tn);function nE(){for(var e=[],t=0;t0&&(u=new Au({next:function(E){return k.next(E)},error:function(E){g=!0,R(),d=E0(b,i,E),k.error(E)},complete:function(){h=!0,R(),d=E0(b,s),k.complete()}}),el(y).subscribe(u))})(c)}}function E0(e,t){for(var n=[],r=2;r!!e.queryParams.limit,AV=e=>e.queryParams.limit===1,DV=e=>!!(e.queryParams.skip&&e.queryParams.skip>0),BV=e=>e.changeEvent.operation==="DELETE",FV=e=>e.changeEvent.operation==="INSERT",zV=e=>e.changeEvent.operation==="UPDATE",UV=e=>Wj(e)&&e.previousResults.length>=e.queryParams.limit,WV=e=>{const t=e.queryParams.sortFields,n=e.changeEvent.previous,r=e.changeEvent.doc;if(!r)return!1;if(!n)return!0;for(let i=0;i{const t=e.changeEvent.id;if(e.keyDocumentMap)return e.keyDocumentMap.has(t);{const n=e.queryParams.primaryKey,r=e.previousResults;for(let i=0;i{const t=e.previousResults[0];return!!(t&&t[e.queryParams.primaryKey]===e.changeEvent.id)},VV=e=>{const t=sS(e.previousResults);return!!(t&&t[e.queryParams.primaryKey]===e.changeEvent.id)},KV=e=>{const t=e.changeEvent.previous;if(!t)return!1;const n=e.previousResults[0];return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)<0:!1},qV=e=>{const t=e.changeEvent.previous;if(!t)return!1;const n=sS(e.previousResults);return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)>0:!1},YV=e=>{const t=e.changeEvent.doc;if(!t)return!1;const n=e.previousResults[0];return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)<0:!1},QV=e=>{const t=e.changeEvent.doc;if(!t)return!1;const n=sS(e.previousResults);return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)>0:!1},XV=e=>{const t=e.changeEvent.previous;return t?e.queryParams.queryMatcher(t):!1},JV=e=>{const t=e.changeEvent.doc;return t?e.queryParams.queryMatcher(t):!1},ZV=e=>e.previousResults.length===0,eK={0:FV,1:zV,2:BV,3:Wj,4:AV,5:DV,6:ZV,7:UV,8:HV,9:VV,10:WV,11:GV,12:KV,13:qV,14:YV,15:QV,16:XV,17:JV};function tK(e,t,n,r){var i=e.length,o=i-1,s=0;if(i===0)return e.push(t),0;for(var a;r<=o;)s=r+(o-r>>1),a=e[s],n(a,t)<=0?r=s+1:o=s-1;return n(a,t)<=0&&s++,e.splice(s,0,t),s}const nK=e=>{},aS=e=>{e.previousResults.unshift(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},lS=e=>{e.previousResults.push(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},cS=e=>{const t=e.previousResults.shift();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},uS=e=>{const t=e.previousResults.pop();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},rK=e=>{cS(e),lS(e)},iK=e=>{uS(e),aS(e)},oK=e=>{cS(e),aS(e)},sK=e=>{uS(e),lS(e)},Gj=e=>{e.keyDocumentMap&&e.keyDocumentMap.delete(e.changeEvent.id);const t=e.queryParams.primaryKey,n=e.previousResults;for(let r=0;r{const t=e.changeEvent.doc,n=e.queryParams.primaryKey,r=e.previousResults;for(let i=0;i{const t={_id:"wrongHuman"+new Date().getTime()};e.previousResults.length=0,e.previousResults.push(t),e.keyDocumentMap&&(e.keyDocumentMap.clear(),e.keyDocumentMap.set(t._id,t))},Hj=e=>{const t=e.changeEvent.id,n=e.changeEvent.doc;if(e.keyDocumentMap){if(e.keyDocumentMap.has(t))return;e.keyDocumentMap.set(t,n)}else if(e.previousResults.find(i=>i[e.queryParams.primaryKey]===t))return;tK(e.previousResults,n,e.queryParams.sortComparator,0)},cK=e=>{Gj(e),Hj(e)},uK=e=>{throw new Error("Action runFullQueryAgain must be implemented by yourself")},dK=e=>{throw new Error("Action unknownAction should never be called")},fK=["doNothing","insertFirst","insertLast","removeFirstItem","removeLastItem","removeFirstInsertLast","removeLastInsertFirst","removeFirstInsertFirst","removeLastInsertLast","removeExisting","replaceExisting","alwaysWrong","insertAtSortPosition","removeExistingAndInsertAtSortPosition","runFullQueryAgain","unknownAction"],pK={doNothing:nK,insertFirst:aS,insertLast:lS,removeFirstItem:cS,removeLastItem:uS,removeFirstInsertLast:rK,removeLastInsertFirst:iK,removeFirstInsertFirst:oK,removeLastInsertLast:sK,removeExisting:Gj,replaceExisting:aK,alwaysWrong:lK,insertAtSortPosition:Hj,removeExistingAndInsertAtSortPosition:cK,runFullQueryAgain:uK,unknownAction:dK},hK=40;function R0(e){return e.charCodeAt(0)-hK}function mK(e){return e?"1":"0"}function iE(e,t){const n=[];for(let r=0,i=e.length;rvK(bK(),eK,e);function xK(e){const t=wK(e);return fK[t]}function SK(e,t,n,r,i){const o=pK[e];return o({queryParams:t,changeEvent:n,previousResults:r,keyDocumentMap:i}),r}var fu="￿",pu=Number.MIN_SAFE_INTEGER;function _K(e,t){var n=t.selector,r=e.indexes?e.indexes.slice(0):[];t.index&&(r=[t.index]);var i=!!t.sort.find(u=>Object.values(u)[0]==="desc"),o=new Set;Object.keys(n).forEach(u=>{var d=Nu(e,u);d&&d.type==="boolean"&&Object.prototype.hasOwnProperty.call(n[u],"$eq")&&o.add(u)});var s=t.sort.map(u=>Object.keys(u)[0]),a=s.filter(u=>!o.has(u)).join(","),l=-1,c;if(r.forEach(u=>{var d=!0,f=!0,m=u.map(w=>{var y=n[w],_=y?Object.keys(y):[],k={};if(!y||!_.length){var E=f?pu:fu;k={startKey:E,endKey:d?fu:pu,inclusiveStart:!0,inclusiveEnd:!0}}else _.forEach(P=>{if(dS.has(P)){var I=y[P],A=RK(P,I);k=Object.assign(k,A)}});return typeof k.startKey>"u"&&(k.startKey=pu),typeof k.endKey>"u"&&(k.endKey=fu),typeof k.inclusiveStart>"u"&&(k.inclusiveStart=!0),typeof k.inclusiveEnd>"u"&&(k.inclusiveEnd=!0),f&&!k.inclusiveStart&&(f=!1),d&&!k.inclusiveEnd&&(d=!1),k}),h=m.map(w=>w.startKey),g=m.map(w=>w.endKey),R={index:u,startKeys:h,endKeys:g,inclusiveEnd:d,inclusiveStart:f,sortSatisfiedByIndex:!i&&a===u.filter(w=>!o.has(w)).join(","),selectorSatisfiedByIndex:EK(u,t.selector,h,g)},b=PK(e,t,R);(b>=l||t.index)&&(l=b,c=R)}),!c)throw ot("SNH",{query:t});return c}var dS=new Set(["$eq","$gt","$gte","$lt","$lte"]),CK=new Set(["$eq","$gt","$gte"]),kK=new Set(["$eq","$lt","$lte"]);function EK(e,t,n,r){var i=Object.entries(t),o=i.find(([P,I])=>{if(!e.includes(P))return!0;var A=Object.entries(I).find(([L,N])=>!dS.has(L));return A});if(o||t.$and||t.$or)return!1;var s=[],a=new Set;for(var[l,c]of Object.entries(t)){if(!e.includes(l))return!1;var u=Object.keys(c).filter(P=>CK.has(P));if(u.length>1)return!1;var d=u[0];if(d&&a.add(l),d!=="$eq"){if(s.length>0)return!1;s.push(d)}}var f=[],m=new Set;for(var[h,g]of Object.entries(t)){if(!e.includes(h))return!1;var R=Object.keys(g).filter(P=>kK.has(P));if(R.length>1)return!1;var b=R[0];if(b&&m.add(h),b!=="$eq"){if(f.length>0)return!1;f.push(b)}}var w=0;for(var y of e){for(var _ of[a,m]){if(!_.has(y)&&_.size>0)return!1;_.delete(y)}var k=n[w],E=r[w];if(k!==E&&a.size>0&&m.size>0)return!1;w++}return!0}function RK(e,t){switch(e){case"$eq":return{startKey:t,endKey:t,inclusiveEnd:!0,inclusiveStart:!0};case"$lte":return{endKey:t,inclusiveEnd:!0};case"$gte":return{startKey:t,inclusiveStart:!0};case"$lt":return{endKey:t,inclusiveEnd:!1};case"$gt":return{startKey:t,inclusiveStart:!1};default:throw new Error("SNH")}}function PK(e,t,n){var r=0,i=u=>{u>0&&(r=r+u)},o=10,s=b0(n.startKeys,u=>u!==pu&&u!==fu);i(s*o);var a=b0(n.startKeys,u=>u!==fu&&u!==pu);i(a*o);var l=b0(n.startKeys,(u,d)=>u===n.endKeys[d]);i(l*o*1.5);var c=n.sortSatisfiedByIndex?5:0;return i(c),r}class Qu extends Error{}const TK=2147483647,OK=-2147483648,jK=Number.MAX_SAFE_INTEGER,LK=Number.MIN_SAFE_INTEGER,ec=Symbol("missing"),Vj=Object.freeze(new Error("mingo: cycle detected while processing object/array")),IK=Object.getPrototypeOf([]),Kj=Object.getPrototypeOf({}),MK="[object Object]",NK=/^\[object ([a-zA-Z0-9]+)\]$/;class fS{}class pS{}const tc=e=>e===null?fS:e===void 0?pS:e.constructor,Yv=e=>{const t=zK(e);let n=0,r=t.length;for(;r;)n=(n<<5)-n^t.charCodeAt(--r);return n>>>0},qj=new Set(["null","undefined","boolean","number","string","date","regexp"]),oE=new Set([pS,fS,Boolean,String,Number]),Td=e=>e.toString(),xo=e=>`${tc(e).name}[${e.toString()}]`,nc=new Map([[Number,Td],[Boolean,Td],[RegExp,Td],[Function,Td],[Symbol,Td],[Date,e=>e.toISOString()],[String,JSON.stringify],[fS,e=>"null"],[pS,e=>"undefined"],[Int8Array,xo],[Uint8Array,xo],[Uint8ClampedArray,xo],[Int16Array,xo],[Uint16Array,xo],[Int32Array,xo],[Uint32Array,xo],[Float32Array,xo],[Float64Array,xo]]);typeof BigInt<"u"&&nc.set(BigInt,e=>"0x"+e.toString(16));typeof BigInt64Array<"u"&&nc.set(BigInt64Array,xo);typeof BigUint64Array<"u"&&nc.set(BigUint64Array,xo);const $K={null:0,undefined:0,number:1,string:2,object:3,array:4,boolean:5,date:6,regexp:7,function:8},Bo=(e,t)=>{e===ec&&(e=void 0),t===ec&&(t=void 0);const[n,r]=[e,t].map(i=>$K[Xf(i).toLowerCase()]);return n!==r?n-r:n===1||n===2||n===6?et?1:0:rc(e,t)?0:et?1:0};function Ji(e,t){if(!e)throw new Qu(t)}const AK=e=>{const t=Object.getPrototypeOf(tc(e));return t&&t.name==="TypedArray"},sE=e=>{if(oE.has(tc(e)))return e;const t=new Set,n=r=>{if(t.has(r))throw Vj;const i=tc(r);if(oE.has(i))return r;try{if(kr(r))return t.add(r),r.map(n);if(Yn(r)){t.add(r);const o={};for(const s in r)o[s]=n(r[s]);return o}}finally{t.delete(r)}return i===Date||i===RegExp||AK(r)?new i(r):r};return n(e)},Xf=e=>NK.exec(Object.prototype.toString.call(e))[1],T0=e=>typeof e=="boolean",Hs=e=>typeof e=="string",ba=e=>!isNaN(e)&&typeof e=="number",kr=Array.isArray,Yn=e=>{if(!e)return!1;const t=Object.getPrototypeOf(e);return(t===Kj||t===null)&&MK===Object.prototype.toString.call(e)},Qv=e=>e===Object(e),aE=e=>e instanceof Date,nm=e=>e instanceof RegExp,Xv=e=>typeof e=="function",Er=e=>e==null,Du=(e,t)=>e.includes(t),Yj=(e,t)=>!Du(e,t),DK=(e,t=!0)=>!!e||t&&e==="",Xu=e=>Er(e)||Hs(e)&&!e||e instanceof Array&&e.length===0||Yn(e)&&Object.keys(e).length===0,lE=e=>e===ec,kp=e=>e instanceof Array?e:[e],$a=(e,t)=>!!e&&Object.prototype.hasOwnProperty.call(e,t),BK=(e,t)=>Yn(e)&&Yn(t)||kr(e)&&kr(t);function C1(e,t,n){if(n=n||{flatten:!1},lE(e)||Er(e))return t;if(lE(t)||Er(t))return e;if(!BK(e,t)){if(n.skipValidation)return t||e;throw Error("mismatched types. must both be array or object")}if(n.skipValidation=!0,kr(e)){const r=e,i=t;if(n.flatten){let o=0,s=0;for(;o{const o=Jj(r,t);n.has(o)?n.get(o).some(s=>rc(e[s],r))||n.get(o).push(i):n.set(o,[i])}),n}function Qj(e,t=Yv){if(e.some(a=>a.length==0))return[];if(e.length===1)return Array.from(e);const n=UK(e.map((a,l)=>[l,a.length]),a=>a[1]),r=e[n[0][0]],i=cE(r,t),o=new Map,s=new Array;return i.forEach((a,l)=>{const c=a.map(m=>r[m]),u=c.map(m=>0),d=c.map(m=>[n[0][0],0]);let f=!1;for(let m=1;mR[w]);f=c.map((w,y)=>b.some((_,k)=>{const E=u[y];return rc(w,_)&&(u[y]++,hm===e.length-1?[c[h],d[h]]:ec).filter(m=>m!==ec))}),s.sort((a,l)=>{const[c,[u,d]]=a,[f,[m,h]]=l,g=Bo(u,m);return g!==0?g:Bo(d,h)}).map(a=>a[0])}function Xj(e,t=0){const n=new Array;function r(i,o){for(let s=0,a=i.length;s0||o<0)?r(i[s],Math.max(-1,o-1)):n.push(i[s])}return r(e,t),n}const FK=e=>{let[t,n]=[Object.getPrototypeOf(e),Object.getOwnPropertyNames(e)],r=t;for(;!n.length&&t!==Kj&&t!==IK;)r=t,n=Object.getOwnPropertyNames(t),t=Object.getPrototypeOf(t);const i={};return n.forEach(o=>i[o]=e[o]),[i,r]};function rc(e,t){const n=[[e,t]];for(;n.length>0;){if([e,t]=n.pop(),e===t)continue;const r=tc(e);if(r!==tc(t)||Xv(e))return!1;if(nc.has(r)){const i=nc.get(r);if(i(e)!==i(t))return!1;continue}if(r===Array||r===Object){const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length||new Set(i.concat(o)).size!=i.length)return!1;for(const s of i)n.push([e[s],t[s]]);continue}return!1}return!n.length}function zK(e){const t=new Set,n=r=>{const i=tc(r);if(nc.has(i))return nc.get(i)(r);const o=i===Object?"":i.name;if(Xv(r.toJSON))return`${o}(${JSON.stringify(r)})`;if(t.has(r))throw Vj;t.add(r);try{if(i===Array)return"["+r.map(n).join(",")+"]";if(i!==Object){const[a,l]=FK(r);if(kr(r))return`${o}${n([...r,a])}`;r=a}const s=Object.keys(r);return s.sort(),`${o}{`+s.map(a=>`${a}:${n(r[a])}`).join(",")+"}"}finally{t.delete(r)}};return n(e)}function Jj(e,t){return t=t||Yv,Er(e)?null:t(e).toString()}function UK(e,t,n=Bo){if(Xu(e))return e;const r=new Array,i=new Array;for(let o=0;on(o[0],s[0])),Ep(i,r.map(o=>o[1]))}function WK(e,t,n=Yv){if(e.length<1)return new Map;const r=new Map,i=new Map;for(let o=0;orc(u,a)):null;Er(c)?(i.set(a,[s]),r.has(l)?r.get(l).push(a):r.set(l,[a])):i.get(c).push(s)}}return i}const O0=5e4;function Ep(e,...t){return e instanceof Array?t.reduce((n,r)=>{let i=Math.ceil(r.length/O0),o=0;for(;i-- >0;)Array.prototype.push.apply(n,r.slice(o,o+O0)),o+=O0;return n},e):t.filter(Qv).reduce((n,r)=>(Object.assign(n,r),n),e)}function k1(e,t){return Qv(e)?e[t]:void 0}function GK(e,t){if(t<1)return e;for(;t--&&e.length===1;)e=e[0];return e}function hS(e,t,n){let r=0;function i(s,a){let l=s;for(let c=0;c0)break;r+=1;const f=a.slice(c);l=l.reduce((m,h)=>{const g=i(h,f);return g!==void 0&&m.push(g),m},[]);break}else l=k1(l,u);if(l===void 0)break}return l}const o=qj.has(Xf(e).toLowerCase())?e:i(e,t.split("."));return o instanceof Array&&(n!=null&&n.unwrapArray)?GK(o,r):o}function rm(e,t,n){const r=t.split("."),i=r[0],o=r.slice(1).join("."),s=/^\d+$/.exec(i)!==null,a=r.length>1;let l,c;if(e instanceof Array)if(s)l=k1(e,Number(i)),a&&(l=rm(l,o,n)),l=[l];else{l=[];for(const u of e)c=rm(u,t,n),n!=null&&n.preserveMissing?(c===void 0&&(c=ec),l.push(c)):c!==void 0&&l.push(c)}else{if(c=k1(e,i),a&&(c=rm(c,o,n)),c===void 0)return;l=n!=null&&n.preserveKeys?Object.assign({},e):{},l[i]=c}return l}function E1(e){if(e instanceof Array)for(let t=e.length-1;t>=0;t--)e[t]===ec?e.splice(t,1):E1(e[t]);else if(Yn(e))for(const t in e)$a(e,t)&&E1(e[t])}const uE=/^\d+$/;function Xm(e,t,n,r){const i=t.split("."),o=i[0],s=i.slice(1).join(".");if(i.length===1)(Yn(e)||kr(e)&&uE.test(o))&&n(e,o);else{r!=null&&r.buildGraph&&Er(e[o])&&(e[o]={});const a=e[o];if(!a)return;const l=!!(i.length>1&&uE.test(i[1]));a instanceof Array&&(r!=null&&r.descendArray)&&!l?a.forEach(c=>Xm(c,s,n,r)):Xm(a,s,n,r)}}function HK(e,t,n){Xm(e,t,(r,i)=>{r[i]=Xv(n)?n(r[i]):n},{buildGraph:!0})}function dE(e,t,n){Xm(e,t,(r,i)=>{if(r instanceof Array){if(/^\d+$/.test(i))r.splice(parseInt(i),1);else if(n&&n.descendArray)for(const o of r)Yn(o)&&delete o[i]}else Yn(r)&&delete r[i]},n)}const VK=/^\$[a-zA-Z0-9_]+$/;function Ju(e){return VK.test(e)}function Zj(e){if(qj.has(Xf(e).toLowerCase()))return nm(e)?{$regex:e}:{$eq:e};if(Qv(e)){if(!Object.keys(e).some(Ju))return{$eq:e};if($a(e,"$regex")){const n=Object.assign({},e);return n.$regex=new RegExp(e.$regex,e.$options),delete n.$options,n}}return e}var Ca;(function(e){e.CLONE_ALL="CLONE_ALL",e.CLONE_INPUT="CLONE_INPUT",e.CLONE_OUTPUT="CLONE_OUTPUT",e.CLONE_OFF="CLONE_OFF"})(Ca||(Ca={}));class Nl{constructor(t,n,r,i=Date.now()){this._opts=t,this._root=n,this._local=r,this.timestamp=i,this.update(n,r)}static init(t,n,r){return t instanceof Nl?new Nl(t._opts,Er(t.root)?n:t.root,Object.assign({},t.local,r)):new Nl(t,n,r)}update(t,n){var r;return this._root=t,this._local=n&&Object.assign({},n,{variables:Object.assign({},(r=this._local)===null||r===void 0?void 0:r.variables,n==null?void 0:n.variables)}),this}getOptions(){return Object.freeze(Object.assign(Object.assign({},this._opts),{context:ic.from(this._opts.context)}))}get root(){return this._root}get local(){return this._local}get idKey(){return this._opts.idKey}get collation(){var t;return(t=this._opts)===null||t===void 0?void 0:t.collation}get processingMode(){var t;return((t=this._opts)===null||t===void 0?void 0:t.processingMode)||Ca.CLONE_OFF}get useStrictMode(){var t;return(t=this._opts)===null||t===void 0?void 0:t.useStrictMode}get scriptEnabled(){var t;return(t=this._opts)===null||t===void 0?void 0:t.scriptEnabled}get useGlobalContext(){var t;return(t=this._opts)===null||t===void 0?void 0:t.useGlobalContext}get hashFunction(){var t;return(t=this._opts)===null||t===void 0?void 0:t.hashFunction}get collectionResolver(){var t;return(t=this._opts)===null||t===void 0?void 0:t.collectionResolver}get jsonSchemaValidator(){var t;return(t=this._opts)===null||t===void 0?void 0:t.jsonSchemaValidator}get variables(){var t;return(t=this._opts)===null||t===void 0?void 0:t.variables}get context(){var t;return(t=this._opts)===null||t===void 0?void 0:t.context}}function eL(e){return e instanceof Nl?e.getOptions():Object.freeze(Object.assign(Object.assign({idKey:"_id",scriptEnabled:!0,useStrictMode:!0,useGlobalContext:!0,processingMode:Ca.CLONE_OFF},e),{context:e!=null&&e.context?ic.from(e==null?void 0:e.context):ic.init({})}))}var Xt;(function(e){e.ACCUMULATOR="accumulator",e.EXPRESSION="expression",e.PIPELINE="pipeline",e.PROJECTION="projection",e.QUERY="query",e.WINDOW="window"})(Xt||(Xt={}));class ic{constructor(t){this.operators={[Xt.ACCUMULATOR]:{},[Xt.EXPRESSION]:{},[Xt.PIPELINE]:{},[Xt.PROJECTION]:{},[Xt.QUERY]:{},[Xt.WINDOW]:{}};for(const[n,r]of Object.entries(t))this.addOperators(n,r)}static init(t={}){return new ic(t)}static from(t){return new ic(t.operators)}addOperators(t,n){for(const[r,i]of Object.entries(n))this.getOperator(t,r)||(this.operators[t][r]=i);return this}addAccumulatorOps(t){return this.addOperators(Xt.ACCUMULATOR,t)}addExpressionOps(t){return this.addOperators(Xt.EXPRESSION,t)}addQueryOps(t){return this.addOperators(Xt.QUERY,t)}addPipelineOps(t){return this.addOperators(Xt.PIPELINE,t)}addProjectionOps(t){return this.addOperators(Xt.PROJECTION,t)}addWindowOps(t){return this.addOperators(Xt.WINDOW,t)}getOperator(t,n){return t in this.operators&&this.operators[t][n]||null}}const bl=ic.init();function fE(e,t){for(const[n,r]of Object.entries(t)){Ji(Xv(r)&&Ju(n),`'${n}' is not a valid operator`);const i=$l(e,n,null);Ji(!i||r===i,`${n} already exists for '${e}' operators. Cannot change operator function once registered.`)}switch(e){case Xt.ACCUMULATOR:bl.addAccumulatorOps(t);break;case Xt.EXPRESSION:bl.addExpressionOps(t);break;case Xt.PIPELINE:bl.addPipelineOps(t);break;case Xt.PROJECTION:bl.addProjectionOps(t);break;case Xt.QUERY:bl.addQueryOps(t);break;case Xt.WINDOW:bl.addWindowOps(t);break}}function $l(e,t,n){const{context:r,useGlobalContext:i}=n||{},o=r?r.getOperator(e,t):null;return!o&&i?bl.getOperator(e,t):o}const pE={$$ROOT(e,t,n){return n.root},$$CURRENT(e,t,n){return e},$$REMOVE(e,t,n){},$$NOW(e,t,n){return new Date(n.timestamp)}},R1={$$KEEP(e,t,n){return e},$$PRUNE(e,t,n){},$$DESCEND(e,t,n){if(!$a(t,"$cond"))return e;let r;for(const[i,o]of Object.entries(e))if(Qv(o)){if(o instanceof Array){const s=[];for(let a of o)Yn(a)&&(a=hE(a,t,n.update(a))),Er(a)||s.push(a);r=s}else r=hE(o,t,n.update(o));Er(r)?delete e[i]:e[i]=r}return e}};function Jo(e,t,n,r){var i;const o=Nl.init(r,e);if(n=n||"",Ju(n)){const s=$l(Xt.EXPRESSION,n,r);if(s)return s(e,t,o);const a=$l(Xt.ACCUMULATOR,n,r);if(a)return e instanceof Array||(e=Jo(e,t,null,o),t=null),Ji(e instanceof Array,`'${n}' target must be an array.`),a(e,t,o.update(null,o.local));throw new Qu(`operator '${n}' is not registered`)}if(Hs(t)&&t.length>0&&t[0]==="$"){if($a(R1,t))return t;let s=o.root;const a=t.split(".");if($a(pE,a[0]))s=pE[a[0]](e,null,o),t=t.slice(a[0].length+1);else if(a[0].slice(0,2)==="$$"){s=Object.assign({},o.variables,{this:e},(i=o.local)===null||i===void 0?void 0:i.variables);const l=a[0].slice(2);Ji($a(s,l),`Use of undefined variable: ${l}`),t=t.slice(2)}else t=t.slice(1);return t===""?s:hS(s,t)}if(kr(t))return t.map(s=>Jo(e,s,null,o));if(Yn(t)){const s={};for(const[a,l]of Object.entries(t))if(s[a]=Jo(e,l,a,o),[Xt.EXPRESSION,Xt.ACCUMULATOR].some(c=>!!$l(c,a,r)))return Ji(Object.keys(t).length===1,"Invalid aggregation expression '"+JSON.stringify(t)+"'"),s[a];return s}return t}function hE(e,t,n){const r=Jo(e,t,null,n);return $a(R1,r)?R1[r](e,t,n):r}function Bu(e){return e instanceof mE?e:new mE(e)}function KK(...e){let t=0;return Bu(()=>{for(;t{const i=r.next();if(i.done)throw P1;return i.value}}else if(t instanceof Array){const r=t,i=r.length;let o=0;n=()=>{if(o0?this.push(Zo.TAKE,t):this}drop(t){return t>0?this.push(Zo.DROP,t):this}transform(t){const n=this;let r;return Bu(()=>(r||(r=Bu(t(n.value()))),r.next()))}value(){return this.isDone||(this.isDone=this.getNext(!0).done),this.yieldedValues}each(t){for(;;){const n=this.next();if(n.done)break;if(t(n.value)===!1)return!1}return!0}reduce(t,n){let r=this.next();for(n===void 0&&!r.done&&(n=r.value,r=this.next());!r.done;)n=t(n,r.value),r=this.next();return n}size(){return this.reduce((t,n)=>++t,0)}[Symbol.iterator](){return this}}class XK{constructor(t,n){this.pipeline=t,this.options=eL(n)}stream(t){let n=Bu(t);const r=this.options.processingMode;(r==Ca.CLONE_ALL||r==Ca.CLONE_INPUT)&&n.map(sE);const i=new Array;if(!Xu(this.pipeline))for(const o of this.pipeline){const s=Object.keys(o),a=s[0],l=$l(Xt.PIPELINE,a,this.options);Ji(s.length===1&&!!l,`invalid pipeline operator ${a}`),i.push(a),n=l(n,o[a],this.options)}return(r==Ca.CLONE_OUTPUT||r==Ca.CLONE_ALL&&Qj([["$group","$unwind"],i]).length)&&n.map(sE),n}run(t){return this.stream(t).value()}}class JK{constructor(t,n,r,i){this.source=t,this.predicate=n,this.projection=r,this.options=i,this.operators=[],this.result=null,this.buffer=[]}fetch(){return this.result?this.result:(Yn(this.projection)&&this.operators.push({$project:this.projection}),this.result=Bu(this.source).filter(this.predicate),this.operators.length>0&&(this.result=new XK(this.operators,this.options).stream(this.result)),this.result)}fetchAll(){const t=Bu([...this.buffer]);return this.buffer=[],KK(t,this.fetch())}all(){return this.fetchAll().value()}count(){return this.all().length}skip(t){return this.operators.push({$skip:t}),this}limit(t){return this.operators.push({$limit:t}),this}sort(t){return this.operators.push({$sort:t}),this}collation(t){return this.options=Object.assign(Object.assign({},this.options),{collation:t}),this}next(){if(this.buffer.length>0)return this.buffer.pop();const t=this.fetch().next();if(!t.done)return t.value}hasNext(){if(this.buffer.length>0)return!0;const t=this.fetch().next();return t.done?!1:(this.buffer.push(t.value),!0)}map(t){return this.all().map(t)}forEach(t){this.all().forEach(t)}[Symbol.iterator](){return this.fetchAll()}}class Rp{constructor(t,n){this.condition=t,this.options=eL(n),this.compiled=[],this.compile()}compile(){Ji(Yn(this.condition),`query criteria must be an object: ${JSON.stringify(this.condition)}`);const t={};for(const[n,r]of Object.entries(this.condition)){if(n==="$where")Object.assign(t,{field:n,expr:r});else if(Du(["$and","$or","$nor","$expr","$jsonSchema"],n))this.processOperator(n,n,r);else{Ji(!Ju(n),`unknown top level operator: ${n}`);for(const[i,o]of Object.entries(Zj(r)))this.processOperator(n,i,o)}t.field&&this.processOperator(t.field,t.field,t.expr)}}processOperator(t,n,r){const i=$l(Xt.QUERY,n,this.options);if(!i)throw new Qu(`unknown query operator ${n}`);const o=i(t,r,this.options);this.compiled.push(o)}test(t){for(let n=0,r=this.compiled.length;nthis.test(r),n||{},this.options)}remove(t){return t.reduce((n,r)=>(this.test(r)||n.push(r),n),[])}}const ZK=(e,t,n)=>{if(Xu(t)||!Yn(t))return e;let r=Bo;const i=n.collation;return Yn(i)&&Hs(i.locale)&&(r=tq(i)),e.transform(o=>{const s=Object.keys(t);for(const a of s.reverse()){const l=WK(o,u=>hS(u,a),n.hashFunction),c=Array.from(l.keys()).sort(r);t[a]===-1&&c.reverse(),o=[],c.reduce((u,d)=>Ep(u,l.get(d)),o)}return o})},eq={1:"base",2:"accent",3:"variant"};function tq(e){const t={sensitivity:eq[e.strength||3],caseFirst:e.caseFirst==="off"?"false":e.caseFirst||"false",numeric:e.numericOrdering||!1,ignorePunctuation:e.alternate==="shifted"};(e.caseLevel||!1)===!0&&(t.sensitivity==="base"&&(t.sensitivity="case"),t.sensitivity==="accent"&&(t.sensitivity="variant"));const n=new Intl.Collator(e.locale,t);return(r,i)=>{if(!Hs(r)||!Hs(i))return Bo(r,i);const o=n.compare(r,i);return o<0?-1:o>0?1:0}}function qr(e){const t=(n,r,i)=>{const o={unwrapArray:!0},s=Math.max(1,n.split(".").length-1);return a=>{const l=hS(a,n,o);return e(l,r,Object.assign(Object.assign({},i),{depth:s}))}};return t.op="query",t}function tL(e,t,n){if(rc(e,t)||Er(e)&&Er(t))return!0;if(e instanceof Array){const r=rc.bind(null,t);return e.some(r)||Xj(e,n==null?void 0:n.depth).some(r)}return!1}function nq(e,t,n){return!tL(e,t,n)}function nL(e,t,n){return Er(e)?t.some(r=>r===null):Qj([kp(e),t],n==null?void 0:n.hashFunction).length>0}function rq(e,t,n){return!nL(e,t,n)}function iq(e,t,n){return Jv(e,t,(r,i)=>Bo(r,i)<0)}function oq(e,t,n){return Jv(e,t,(r,i)=>Bo(r,i)<=0)}function sq(e,t,n){return Jv(e,t,(r,i)=>Bo(r,i)>0)}function aq(e,t,n){return Jv(e,t,(r,i)=>Bo(r,i)>=0)}function lq(e,t,n){return kp(e).some(r=>t.length===2&&r%t[0]===t[1])}function cq(e,t,n){const r=kp(e),i=o=>Hs(o)&&DK(t.exec(o),n==null?void 0:n.useStrictMode);return r.some(i)||Xj(r,1).some(i)}function uq(e,t,n){return(t===!1||t===0)&&e===void 0||(t===!0||t===1)&&e!==void 0}function dq(e,t,n){if(!kr(e)||!kr(t)||!e.length||!t.length)return!1;let r=!0;for(const i of t){if(!r)break;Yn(i)&&Du(Object.keys(i),"$elemMatch")?r=rL(e,i.$elemMatch,n):i instanceof RegExp?r=e.some(o=>typeof o=="string"&&i.test(o)):r=e.some(o=>rc(i,o))}return r}function fq(e,t,n){return Array.isArray(e)&&e.length===t}function pq(e){return Ju(e)&&["$and","$or","$nor"].indexOf(e)===-1}function rL(e,t,n){if(kr(e)&&!Xu(e)){let r=s=>s,i=t;Object.keys(t).every(pq)&&(i={temp:t},r=s=>({temp:s}));const o=new Rp(i,n);for(let s=0,a=e.length;se===null,vE=e=>ba(e)&&e>=OK&&e<=TK&&e.toString().indexOf(".")===-1,yE=e=>ba(e)&&e>=LK&&e<=jK&&e.toString().indexOf(".")===-1,hq={array:kr,bool:T0,boolean:T0,date:aE,decimal:ba,double:ba,int:vE,long:yE,number:ba,null:gE,object:Yn,regex:nm,regexp:nm,string:Hs,undefined:Er,function:e=>{throw new Qu("unsupported type key `function`.")},1:ba,2:Hs,3:Yn,4:kr,6:Er,8:T0,9:aE,10:gE,11:nm,16:vE,18:yE,19:ba};function bE(e,t,n){const r=hq[t];return r?r(e):!1}function mq(e,t,n){return Array.isArray(t)?t.findIndex(r=>bE(e,r))>=0:bE(e,t)}function Jv(e,t,n){return kp(e).some(r=>Xf(r)===Xf(t)&&n(r,t))}const wE=(e,t)=>{const n={};return e.split("").forEach((r,i)=>n[r]=t*(i+1)),n};Object.assign(Object.assign(Object.assign({},wE("ABCDEFGHIKLM",1)),wE("NOPQRSTUVWXY",-1)),{Z:0});const xE={undefined:null,null:null,NaN:NaN,Infinity:new Error,"-Infinity":new Error};function Ai(e,t=xE){const n=Object.assign({},xE,t),r=new Set(Object.keys(n));return(i,o,s)=>{const a=Jo(i,o,null,s);if(r.has(`${a}`)){const l=n[`${a}`];if(l instanceof Error)throw new Qu(`cannot apply $${e.name} to -inf, value must in (-inf,inf)`);return l}return e(a)}}Ai(Math.acos,{Infinity:1/0,0:new Error});Ai(Math.acosh,{Infinity:1/0,0:new Error});Ai(Math.asin);Ai(Math.asinh,{Infinity:1/0,"-Infinity":-1/0});Ai(Math.atan);Ai(Math.atanh,{1:1/0,"-1":-1/0});Ai(Math.cos);Ai(Math.cosh,{"-Infinity":1/0,Infinity:1/0});const gq=Math.PI/180;Ai(e=>e*gq,{Infinity:1/0,"-Infinity":1/0});const vq=180/Math.PI;Ai(e=>e*vq,{Infinity:1/0,"-Infinity":-1/0});Ai(Math.sin);Ai(Math.sinh,{"-Infinity":-1/0,Infinity:1/0});Ai(Math.tan);const yq=(e,t,n)=>{if(Xu(t))return e;let r=Object.keys(t),i=!1;iL(t,n);const o=n.idKey;if(Du(r,o)){const a=t[o];(a===0||a===!1)&&(r=r.filter(Yj.bind(null,[o])),i=r.length==0)}else r.push(o);const s=Nl.init(n);return e.map(a=>T1(a,t,s.update(a),r,i))};function T1(e,t,n,r,i){let o={},s=!1,a=!1;const l=[];i&&l.push(n.idKey);for(const c of r){let u;const d=t[c];if(c!==n.idKey&&Du([0,!1],d)&&(a=!0),c===n.idKey&&Xu(d))u=e[c];else if(Hs(d))u=Jo(e,d,c,n);else if(!Du([1,!0],d))if(d instanceof Array)u=d.map(m=>{const h=Jo(e,m,null,n);return Er(h)?null:h});else if(Yn(d)){const m=d,h=Object.keys(d),g=h.length==1?h[0]:"",R=$l(Xt.PROJECTION,g,n);if(R)g==="$slice"?kp(m[g]).every(ba)?(u=R(e,m[g],c,n),s=!0):u=Jo(e,m,c,n):u=R(e,m[g],c,n);else if(Ju(g))u=Jo(e,m[g],g,n);else if($a(e,c)){iL(m,n);let b=e[c];b instanceof Array?u=b.map(w=>T1(w,m,n,h,!1)):(b=Yn(b)?b:e,u=T1(b,m,n,h,!1))}else u=Jo(e,d,null,n)}else{l.push(c);continue}const f=rm(e,c,{preserveMissing:!0});f!==void 0&&C1(o,f,{flatten:!0}),Yj([0,1,!1,!0],d)&&(u===void 0?dE(o,c,{descendArray:!0}):HK(o,c,u))}if(E1(o),(s||a||i)&&(o=Ep({},e,o),l.length>0))for(const c of l)dE(o,c,{descendArray:!0});return o}function iL(e,t){const n=[!1,!1];for(const[r,i]of Object.entries(e)){if(r===(t==null?void 0:t.idKey))return;i===0||i===!1?n[0]=!0:(i===1||i===!0)&&(n[1]=!0),Ji(!(n[0]&&n[1]),"Projection cannot have a mix of inclusion and exclusion.")}}const bq=(e,t,n)=>{Ji(kr(t),"Invalid expression: $and expects value to be an Array.");const r=t.map(i=>new Rp(i,n));return i=>r.every(o=>o.test(i))},oL=(e,t,n)=>{Ji(kr(t),"Invalid expression. $or expects value to be an Array");const r=t.map(i=>new Rp(i,n));return i=>r.some(o=>o.test(i))},wq=(e,t,n)=>{Ji(kr(t),"Invalid expression. $nor expects value to be an array.");const r=oL("$or",t,n);return i=>!r(i)},xq=(e,t,n)=>{const r={};r[e]=Zj(t);const i=new Rp(r,n);return o=>!i.test(o)},Sq=qr(tL),_q=qr(sq),Cq=qr(aq),kq=qr(nL),Eq=qr(iq),Rq=qr(oq),Pq=qr(nq),Tq=qr(rq),Oq=qr(lq),jq=qr(cq);qr(dq);const Lq=qr(rL),Iq=qr(fq),Mq=qr(uq),Nq=qr(mq);var SE=!1;function $q(e){return SE||(fE(Xt.PIPELINE,{$sort:ZK,$project:yq}),fE(Xt.QUERY,{$and:bq,$eq:Sq,$elemMatch:Lq,$exists:Mq,$gt:_q,$gte:Cq,$in:kq,$lt:Eq,$lte:Rq,$ne:Pq,$nin:Tq,$mod:Oq,$nor:wq,$not:xq,$or:oL,$regex:jq,$size:Iq,$type:Nq}),SE=!0),new Rp(e)}function Jm(e,t){var n=$i(e.primaryKey);t=on(t);var r=io(t);if(typeof r.skip!="number"&&(r.skip=0),r.selector?(r.selector=r.selector,Object.entries(r.selector).forEach(([c,u])=>{(typeof u!="object"||u===null)&&(r.selector[c]={$eq:u})})):r.selector={},r.index){var i=qf(r.index);i.includes(n)||i.push(n),r.index=i}if(r.sort){var l=r.sort.find(c=>J7(c)===n);l||(r.sort=r.sort.slice(0),r.sort.push({[n]:"asc"}))}else if(r.index)r.sort=r.index.map(c=>({[c]:"asc"}));else{if(e.indexes){var o=new Set;Object.entries(r.selector).forEach(([c,u])=>{var d=!1;typeof u=="object"&&u!==null?d=!!Object.keys(u).find(f=>dS.has(f)):d=!0,d&&o.add(c)});var s=-1,a;e.indexes.forEach(c=>{var u=Qx(c)?c:[c],d=u.findIndex(f=>!o.has(f));d>0&&d>s&&(s=d,a=u)}),a&&(r.sort=a.map(c=>({[c]:"asc"})))}r.sort||(r.sort=[{[n]:"asc"}])}return r}function sL(e,t){if(!t.sort)throw ot("SNH",{query:t});var n=[];t.sort.forEach(i=>{var o=Object.keys(i)[0],s=Object.values(i)[0];n.push({key:o,direction:s,getValueFn:X7(o)})});var r=(i,o)=>{for(var s=0;sn.test(i);return r}async function Od(e,t){var n=await e.exec();if(!n)return null;if(Array.isArray(n))return Promise.all(n.map(i=>t(i)));var r=await t(n);return r}function Aq(e,t){return!t.sort||t.sort.length===0?[e]:t.sort.map(n=>Object.keys(n)[0])}var Dq=new WeakMap;function Bq(e){return Gs(Dq,e,()=>{var t=e.collection,n=Jm(t.storageInstance.schema,io(e.mangoQuery)),r=t.schema.primaryPath,i=sL(t.schema.jsonSchema,n),o=(c,u)=>{var d={docA:c,docB:u,rxQuery:e};return i(d.docA,d.docB)},s=mS(t.schema.jsonSchema,n),a=c=>{var u={doc:c,rxQuery:e};return s(u.doc)},l={primaryKey:e.collection.schema.primaryPath,skip:n.skip,limit:n.limit,sortFields:Aq(r,n),sortComparator:o,queryMatcher:a};return l})}function Fq(e,t){if(!e.collection.database.eventReduce)return{runFullQueryAgain:!0};var n=Bq(e),r=xt(e._result).docsData.slice(0),i=xt(e._result).docsDataMap,o=!1,s=t.map(l=>LV(l)).filter(aj),a=s.find(l=>{var c={queryParams:n,changeEvent:l,previousResults:r,keyDocumentMap:i},u=xK(c);if(u==="runFullQueryAgain")return!0;if(u!=="doNothing")return o=!0,SK(u,n,l,r,i),!1});return a?{runFullQueryAgain:!0}:{runFullQueryAgain:!1,changed:o,newResults:r}}var zq=function(){function e(){this._map=new Map}var t=e.prototype;return t.getByQuery=function(r){var i=r.toString();return Gs(this._map,i,()=>r)},e}();function Uq(){return new zq}function _E(e,t){t.uncached=!0;var n=t.toString();e._map.delete(n)}function Wq(e){return e.refCount$.observers.length}var Gq=100,Hq=30*1e3,Vq=(e,t)=>(n,r)=>{if(!(r._map.size0)){if(a._lastEnsureEqual===0&&a._creationTimed._lastEnsureEqual-f._lastEnsureEqual),u=c.slice(0,l);u.forEach(d=>_E(r,d))}}},aL=Vq(Gq,Hq),j0=new WeakSet;function Kq(e){j0.has(e)||(j0.add(e),fH().then(()=>mH(200)).then(()=>{e.destroyed||e.cacheReplacementPolicy(e,e._queryCache),j0.delete(e)}))}var lL=function(){function e(n,r,i){this.cacheItemByDocId=new Map,this.tasks=new Set,this.registry=typeof FinalizationRegistry=="function"?new FinalizationRegistry(o=>{var s=o.docId,a=this.cacheItemByDocId.get(s);a&&(a[0].delete(o.revisionHeight),a[0].size===0&&this.cacheItemByDocId.delete(s))}):void 0,this.primaryPath=n,this.changes$=r,this.documentCreator=i,r.subscribe(o=>{this.tasks.add(()=>{for(var s=this.cacheItemByDocId,a=0;a{this.processTasks()})})}var t=e.prototype;return t.processTasks=function(){if(this.tasks.size!==0){var r=Array.from(this.tasks);r.forEach(i=>i()),this.tasks.clear()}},t.getLatestDocumentData=function(r){this.processTasks();var i=Ws(this.cacheItemByDocId,r);return i[1]},t.getLatestDocumentDataIfExists=function(r){this.processTasks();var i=this.cacheItemByDocId.get(r);if(i)return i[1]},Ja(e,[{key:"getCachedRxDocuments",get:function(){var n=CE(this);return Ns(this,"getCachedRxDocuments",n)}},{key:"getCachedRxDocument",get:function(){var n=CE(this);return Ns(this,"getCachedRxDocument",r=>n([r])[0])}}])}();function CE(e){var t=e.primaryPath,n=e.cacheItemByDocId,r=e.registry,i=bn.deepFreezeWhenDevMode,o=e.documentCreator,s=a=>{for(var l=new Array(a.length),c=[],u=0;u0&&r&&(e.tasks.add(()=>{for(var w=0;w{e.processTasks()})),l};return s}function cL(e,t){var n=e.getCachedRxDocuments;return n(t)}var qq=typeof WeakRef=="function",Yq=qq?Qq:Xq;function Qq(e){return new WeakRef(e)}function Xq(e){return{deref(){return e}}}var kE=function(){function e(t,n,r){this.time=ar(),this.collection=t,this.count=r,this.documents=cL(this.collection._docCache,n)}return Ja(e,[{key:"docsData",get:function(){return Ns(this,"docsData",this.documents.map(t=>t._data))}},{key:"docsDataMap",get:function(){var t=new Map;return this.documents.forEach(n=>{t.set(n.primary,n._data)}),Ns(this,"docsDataMap",t)}},{key:"docsMap",get:function(){for(var t=new Map,n=this.documents,r=0;r{var d=this.collection._docCache.getLatestDocumentDataIfExists(u);if(d){if(!d._deleted){var f=this.collection._docCache.getCachedRxDocument(d);s.set(u,f)}}else a.push(u)}),a.length>0){var l=await this.collection.storageInstance.findDocumentsById(a,!1);l.forEach(u=>{var d=this.collection._docCache.getCachedRxDocument(u);s.set(d.primary,d)})}return s}var c=nY(this);return c.then(u=>(this._lastExecEnd=ar(),u))},t.exec=function(r){if(r&&this.op!=="findOne")throw ot("QU9",{collection:this.collection.name,query:this.mangoQuery,op:this.op});return EE(this).then(()=>Ln(this.$)).then(i=>{if(!i&&r)throw ot("QU10",{collection:this.collection.name,query:this.mangoQuery,op:this.op});return i})},t.toString=function(){var r=qm({op:this.op,query:this.mangoQuery,other:this.other},!0),i=JSON.stringify(r);return this.toString=()=>i,i},t.getPreparedQuery=function(){var r={rxQuery:this,mangoQuery:Jm(this.collection.schema.jsonSchema,this.mangoQuery)};r.mangoQuery.selector._deleted={$eq:!1},r.mangoQuery.index&&r.mangoQuery.index.unshift("_deleted"),oo("prePrepareQuery",r);var i=gS(this.collection.schema.jsonSchema,r.mangoQuery);return this.getPreparedQuery=()=>i,i},t.doesDocumentDataMatch=function(r){return r._deleted?!1:this.queryMatcher(r)},t.remove=function(){return this.exec().then(r=>Array.isArray(r)?Promise.all(r.map(i=>i.remove())):r.remove())},t.incrementalRemove=function(){return Od(this.asRxQuery,r=>r.incrementalRemove())},t.update=function(r){throw fn("update")},t.patch=function(r){return Od(this.asRxQuery,i=>i.patch(r))},t.incrementalPatch=function(r){return Od(this.asRxQuery,i=>i.incrementalPatch(r))},t.modify=function(r){return Od(this.asRxQuery,i=>i.modify(r))},t.incrementalModify=function(r){return Od(this.asRxQuery,i=>i.incrementalModify(r))},t.where=function(r){throw fn("query-builder")},t.sort=function(r){throw fn("query-builder")},t.skip=function(r){throw fn("query-builder")},t.limit=function(r){throw fn("query-builder")},Ja(e,[{key:"$",get:function(){if(!this._$){var n=this.collection.$.pipe(Gt(r=>!r.isLocal),qv(null),ls(()=>EE(this)),qt(()=>this._result),oS(Jx),Qf((r,i)=>!!(r&&r.time===xt(i).time)),Gt(r=>!!r),qt(r=>{var i=xt(r);return this.op==="count"?i.count:this.op==="findOne"?i.documents.length===0?null:i.documents[0]:this.op==="findByIds"?i.docsMap:i.documents.slice(0)}));this._$=MV(n,this.refCount$.pipe(Gt(()=>!1)))}return this._$}},{key:"$$",get:function(){var n=this.collection.database.getReactivityFactory();return n.fromObservable(this.$,void 0,this.collection.database)}},{key:"queryMatcher",get:function(){var n=this.collection.schema.jsonSchema,r=Jm(this.collection.schema.jsonSchema,this.mangoQuery);return Ns(this,"queryMatcher",mS(n,r))}},{key:"asRxQuery",get:function(){return this}}])}();function im(){return{selector:{}}}function eY(e){return e.collection._queryCache.getByQuery(e)}function Fc(e,t,n,r){oo("preCreateRxQuery",{op:e,queryObj:t,collection:n,other:r});var i=new uL(e,t,n,r);return i=eY(i),Kq(n),i}function dL(e){var t=e.asRxQuery.collection._changeEventBuffer.getCounter();return e._latestChangeEvent>=t}function EE(e){return e.collection.database.destroyed||dL(e)?Po:(e._ensureEqualQueue=e._ensureEqualQueue.then(()=>tY(e)),e._ensureEqualQueue)}function tY(e){if(e._lastEnsureEqual=ar(),e.collection.database.destroyed||dL(e))return Po;var t=!1,n=!1;if(e._latestChangeEvent===-1&&(n=!0),!n){var r=e.asRxQuery.collection._changeEventBuffer.getFrom(e._latestChangeEvent+1);if(r===null)n=!0;else{e._latestChangeEvent=e.asRxQuery.collection._changeEventBuffer.getCounter();var i=e.asRxQuery.collection._changeEventBuffer.reduceByLastOfDoc(r);if(e.op==="count"){var o=xt(e._result).count,s=o;i.forEach(l=>{var c=l.previousDocumentData&&e.doesDocumentDataMatch(l.previousDocumentData),u=e.doesDocumentDataMatch(l.documentData);!c&&u&&s++,c&&!u&&s--}),s!==o&&(t=!0,e._setResultData(s))}else{var a=Fq(e,i);a.runFullQueryAgain?n=!0:a.changed&&(t=!0,e._setResultData(a.newResults))}}}return n?e._execOverDatabase().then(l=>(e._latestChangeEvent=e.collection._changeEventBuffer.getCounter(),typeof l=="number"?((!e._result||l!==e._result.count)&&(t=!0,e._setResultData(l)),t):((!e._result||!eH(e.collection.schema.primaryPath,l,e._result.docsData))&&(t=!0,e._setResultData(l)),t))):Promise.resolve(t)}function gS(e,t){if(!t.sort)throw ot("SNH",{query:t});var n=_K(e,t);return{query:t,queryPlan:n}}async function nY(e){var t=[],n=e.collection;if(e.isFindOneByIdQuery)if(Array.isArray(e.isFindOneByIdQuery)){var r=e.isFindOneByIdQuery;if(r=r.filter(u=>{var d=e.collection._docCache.getLatestDocumentDataIfExists(u);return d?(d._deleted||t.push(d),!1):!0}),r.length>0){var i=await n.storageInstance.findDocumentsById(r,!1);Yl(t,i)}}else{var o=e.isFindOneByIdQuery,s=e.collection._docCache.getLatestDocumentDataIfExists(o);if(!s){var a=await n.storageInstance.findDocumentsById([o],!1);a[0]&&(s=a[0])}s&&!s._deleted&&t.push(s)}else{var l=e.getPreparedQuery(),c=await n.storageInstance.query(l);t=c.documents}return t}function rY(e,t){if(!t.skip&&t.selector&&Object.keys(t.selector).length===1&&t.selector[e]){var n=t.selector[e];if(typeof n=="string")return n;if(Object.keys(n).length===1&&typeof n.$eq=="string"||Object.keys(n).length===1&&Array.isArray(n.$eq)&&!n.$eq.find(r=>typeof r!="string"))return n.$eq}return!1}var iY="_rxdb_internal";async function Zv(e,t){var n=await e.findDocumentsById([t],!1),r=n[0];if(r)return r}async function ey(e,t,n){var r=await e.bulkWrite([t],n);if(r.error.length>0){var i=r.error[0];throw i}else{var o=$i(e.schema.primaryKey),s=Oi(o,[t],r),a=s[0];return a}}function Jf(e){return Object.assign({},...e)}function Zm(e,t,n,r){if(r)throw r.status===409?ot("CONFLICT",{collection:e.name,id:t,writeError:r,data:n}):r.status===422?ot("VD2",{collection:e.name,id:t,writeError:r,data:n}):r}function oY(e,t,n,r,i,o,s){for(var a=!!e.schema.attachments,l=[],c=[],u=[],d=cc(10),f={id:d,events:[],checkpoint:null,context:i,startTime:ar(),endTime:0},m=f.events,h=[],g=[],R=[],b=n.size>0,w,y=r.length,_=function(){var E=r[k],P=E.document,I=E.previous,A=P[t],L=P._deleted,N=I&&I._deleted,F=void 0;b&&(F=n.get(A));var z;if(F){var le=F._rev;if(!I||I&&le!==I._rev){var ce={isError:!0,status:409,documentId:A,writeRow:E,documentInDb:F};return u.push(ce),1}var H=a?L0(E):E;a&&(L?I&&Object.keys(I._attachments).forEach(Le=>{g.push({documentId:A,attachmentId:Le,digest:xt(I)._attachments[Le].digest})}):(Object.entries(P._attachments).find(([Le,_e])=>{var Ve=I?I._attachments[Le]:void 0;return!Ve&&!_e.data&&(z={documentId:A,documentInDb:F,isError:!0,status:510,writeRow:E,attachmentId:Le}),!0}),z||Object.entries(P._attachments).forEach(([Le,_e])=>{var Ve=I?I._attachments[Le]:void 0;if(!Ve)h.push({documentId:A,attachmentId:Le,attachmentData:_e,digest:_e.digest});else{var Pe=H.document._attachments[Le].digest;_e.data&&Ve.digest!==Pe&&R.push({documentId:A,attachmentId:Le,attachmentData:_e,digest:_e.digest})}}))),z?u.push(z):(a?c.push(L0(H)):c.push(H),w=H);var V=null,se=null,je=null;if(N&&!L)je="INSERT",V=a?es(P):P;else if(I&&!N&&!L)je="UPDATE",V=a?es(P):P,se=I;else if(L)je="DELETE",V=xt(P),se=I;else throw ot("SNH",{args:{writeRow:E}});var Ge={documentId:A,documentData:V,previousDocumentData:se,operation:je};m.push(Ge)}else{var K=!!L;if(a&&Object.entries(P._attachments).forEach(([Le,_e])=>{_e.data?h.push({documentId:A,attachmentId:Le,attachmentData:_e,digest:_e.digest}):(z={documentId:A,isError:!0,status:510,writeRow:E,attachmentId:Le},u.push(z))}),z||(a?l.push(L0(E)):l.push(E),w=E),!K){var Z={documentId:A,operation:"INSERT",documentData:a?es(P):P,previousDocumentData:a&&I?es(I):I};m.push(Z)}}},k=0;k{t._attachments[n]=aY(r)}),t}function Pp(e){return Object.assign({},e,{_meta:on(e._meta)})}var fL=new WeakMap;function vS(e,t,n){bn.deepFreezeWhenDevMode(n);var r=$i(t.schema.primaryKey),i={originalStorageInstance:t,schema:t.schema,internals:t.internals,collectionName:t.collectionName,databaseName:t.databaseName,options:t.options,bulkWrite(o,s){for(var a=e.token,l=new Array(o.length),c=ar(),u=0;ut.bulkWrite(l,s)).then(h=>{var g={error:[]},R=Oi(r,l,h);fL.set(g,R);var b=h.error.length===0?[]:h.error.filter(y=>y.status===409&&!y.writeRow.previous&&!y.writeRow.document._deleted&&xt(y.documentInDb)._deleted?!0:(g.error.push(y),!1));if(b.length>0){var w=b.map(y=>({previous:y.documentInDb,document:Object.assign({},y.writeRow.document,{_rev:Us(e.token,y.documentInDb)})}));return e.lockedRun(()=>t.bulkWrite(w,s)).then(y=>{Yl(g.error,y.error);var _=Oi(r,w,y);return Yl(R,_),g})}return g})},query(o){return e.lockedRun(()=>t.query(o))},count(o){return e.lockedRun(()=>t.count(o))},findDocumentsById(o,s){return e.lockedRun(()=>t.findDocumentsById(o,s))},getAttachmentData(o,s,a){return e.lockedRun(()=>t.getAttachmentData(o,s,a))},getChangedDocumentsSince:t.getChangedDocumentsSince?(o,s)=>e.lockedRun(()=>t.getChangedDocumentsSince(xt(o),s)):void 0,cleanup(o){return e.lockedRun(()=>t.cleanup(o))},remove(){return e.storageInstances.delete(i),e.lockedRun(()=>t.remove())},close(){return e.storageInstances.delete(i),e.lockedRun(()=>t.close())},changeStream(){return t.changeStream()},conflictResultionTasks(){return t.conflictResultionTasks()},resolveConflictResultionTask(o){if(o.output.isEqual)return t.resolveConflictResultionTask(o);var s=Object.assign({},o.output.documentData,{_meta:Yu(),_rev:Do(),_attachments:{}}),a=on(s);return delete a._meta,delete a._rev,delete a._attachments,t.resolveConflictResultionTask({id:o.id,output:{isEqual:!1,documentData:a}})}};return e.storageInstances.add(i),i}function lY(e){if(e.schema.keyCompression)throw ot("UT5",{args:{params:e}});if(pL(e.schema))throw ot("UT6",{args:{params:e}});if(e.schema.attachments&&e.schema.attachments.compression)throw ot("UT7",{args:{params:e}})}function pL(e){return!!(e.encrypted&&e.encrypted.length>0||e.attachments&&e.attachments.encrypted)}function cY(e,t,n){var r=$i(e.schema.primaryKey),i=n?n.lwt:Xx,o=n?n.id:"";return Jm(e.schema,{selector:{$or:[{"_meta.lwt":{$gt:i}},{"_meta.lwt":{$eq:i},[r]:{$gt:n?o:""}}],"_meta.lwt":{$gte:i}},sort:[{"_meta.lwt":"asc"},{[r]:"asc"}],skip:0,limit:t})}async function hL(e,t,n){if(e.getChangedDocumentsSince)return e.getChangedDocumentsSince(t,n);var r=$i(e.schema.primaryKey),i=gS(e.schema,cY(e,t,n)),o=await e.query(i),s=o.documents,a=q7(s);return{documents:s,checkpoint:a?{id:a[r],lwt:a._meta.lwt}:n||{id:"",lwt:0}}}function Oi(e,t,n){var r=fL.get(n);if(r)return r;var i=new Array(t.length-n.error.length);if(n.error.length>0){for(var o=new Set,s=0;s[]),a=new Promise((l,c)=>{var u={lastKnownDocumentState:r,modifier:i,resolve:l,reject:c};xt(s).push(u),this.triggerRun()});return a},t.triggerRun=async function(){if(!(this.isRunning===!0||this.queueByDocId.size===0)){this.isRunning=!0;var r=[],i=this.queueByDocId;this.queueByDocId=new Map,await Promise.all(Array.from(i.entries()).map(async([s,a])=>{var l=uY(a.map(d=>d.lastKnownDocumentState)),c=l;for(var u of a)try{c=await u.modifier(io(c))}catch(d){u.reject(d),u.reject=()=>{},u.resolve=()=>{}}try{await this.preWrite(c,l)}catch(d){a.forEach(f=>f.reject(d));return}r.push({previous:l,document:c})}));var o=r.length>0?await this.storageInstance.bulkWrite(r,"incremental-write"):{error:[]};return await Promise.all(Oi(this.primaryPath,r,o).map(s=>{var a=s[this.primaryPath];this.postWrite(s);var l=Ws(i,a);l.forEach(c=>c.resolve(s))})),o.error.forEach(s=>{var a=s.documentId,l=Ws(i,a),c=Hv(s);if(c){var u=Gs(this.queueByDocId,a,()=>[]);l.reverse().forEach(f=>{f.lastKnownDocumentState=xt(c.documentInDb),xt(u).unshift(f)})}else{var d=RH(s);l.forEach(f=>f.reject(d))}}),this.isRunning=!1,this.triggerRun()}},e}();function RE(e){var t=async n=>{var r=Z7(n);r._deleted=n._deleted;var i=await e(r),o=Object.assign({},i,{_meta:n._meta,_attachments:n._attachments,_rev:n._rev,_deleted:typeof i._deleted<"u"?i._deleted:n._deleted});return typeof o._deleted>"u"&&(o._deleted=!1),o};return t}function uY(e){var t=e[0],n=za(t._rev);return e.forEach(r=>{var i=za(r._rev);i>n&&(t=r,n=i)}),t}var ty={get primaryPath(){var e=this;if(e.isInstanceOfRxDocument)return e.collection.schema.primaryPath},get primary(){var e=this;if(e.isInstanceOfRxDocument)return e._data[e.primaryPath]},get revision(){var e=this;if(e.isInstanceOfRxDocument)return e._data._rev},get deleted$(){var e=this;if(e.isInstanceOfRxDocument)return e.$.pipe(qt(t=>t._data._deleted))},get deleted$$(){var e=this,t=e.collection.database.getReactivityFactory();return t.fromObservable(e.deleted$,e.getLatest().deleted,e.collection.database)},get deleted(){var e=this;if(e.isInstanceOfRxDocument)return e._data._deleted},getLatest(){var e=this.collection._docCache.getLatestDocumentData(this.primary);return this.collection._docCache.getCachedRxDocument(e)},get $(){var e=this;return e.collection.$.pipe(Gt(t=>!t.isLocal),Gt(t=>t.documentId===this.primary),qt(t=>Uj(t)),qv(e.collection._docCache.getLatestDocumentData(this.primary)),Qf((t,n)=>t._rev===n._rev),qt(t=>this.collection._docCache.getCachedRxDocument(t)),oS(Jx))},get $$(){var e=this,t=e.collection.database.getReactivityFactory();return t.fromObservable(e.$,e.getLatest()._data,e.collection.database)},get$(e){if(bn.isDevMode()){if(e.includes(".item."))throw ot("DOC1",{path:e});if(e===this.primaryPath)throw ot("DOC2");if(this.collection.schema.finalFields.includes(e))throw ot("DOC3",{path:e});var t=Nu(this.collection.schema.jsonSchema,e);if(!t)throw ot("DOC4",{path:e})}return this.$.pipe(qt(n=>Ua(n,e)),Qf())},get$$(e){var t=this.get$(e),n=this.collection.database.getReactivityFactory();return n.fromObservable(t,this.getLatest().get(e),this.collection.database)},populate(e){var t=Nu(this.collection.schema.jsonSchema,e),n=this.get(e);if(!n)return hH;if(!t)throw ot("DOC5",{path:e});if(!t.ref)throw ot("DOC6",{path:e,schemaObj:t});var r=this.collection.database.collections[t.ref];if(!r)throw ot("DOC7",{ref:t.ref,path:e,schemaObj:t});return t.type==="array"?r.findByIds(n).exec().then(i=>{var o=i.values();return Array.from(o)}):r.findOne(n).exec()},get(e){return Gs(this._propertyCache,e,()=>{var t=Ua(this._data,e);if(typeof t!="object"||t===null||Array.isArray(t))return bn.deepFreezeWhenDevMode(t);var n=this,r=new Proxy(on(t),{get(i,o){if(typeof o!="string")return i[o];var s=o.charAt(o.length-1);if(o.endsWith("$$")){var a=o.slice(0,-2);return n.get$$(Ud(e+"."+a))}else if(s==="$"){var l=o.slice(0,-1);return n.get$(Ud(e+"."+l))}else if(s==="_"){var c=o.slice(0,-1);return n.populate(Ud(e+"."+c))}else return n.get(Ud(e+"."+o))}});return r})},toJSON(e=!1){if(e)return bn.deepFreezeWhenDevMode(this._data);var t=on(this._data);return delete t._rev,delete t._attachments,delete t._deleted,delete t._meta,bn.deepFreezeWhenDevMode(t)},toMutableJSON(e=!1){return io(this.toJSON(e))},update(e){throw fn("update")},incrementalUpdate(e){throw fn("update")},updateCRDT(e){throw fn("crdt")},putAttachment(){throw fn("attachments")},getAttachment(){throw fn("attachments")},allAttachments(){throw fn("attachments")},get allAttachments$(){throw fn("attachments")},async modify(e,t){var n=this._data,r=await RE(e)(n);return this._saveData(r,n)},incrementalModify(e,t){return this.collection.incrementalWriteQueue.addWrite(this._data,RE(e)).then(n=>this.collection._docCache.getCachedRxDocument(n))},patch(e){var t=this._data,n=io(t);return Object.entries(e).forEach(([r,i])=>{n[r]=i}),this._saveData(n,t)},incrementalPatch(e){return this.incrementalModify(t=>(Object.entries(e).forEach(([n,r])=>{t[n]=r}),t))},async _saveData(e,t){if(e=on(e),this._data._deleted)throw ot("DOC11",{id:this.primary,document:this});await vL(this.collection,e,t);var n=[{previous:t,document:e}],r=await this.collection.storageInstance.bulkWrite(n,"rx-document-save-data"),i=r.error[0];return Zm(this.collection,this.primary,e,i),await this.collection._runHooks("post","save",e,this),this.collection._docCache.getCachedRxDocument(Oi(this.collection.schema.primaryPath,n,r)[0])},remove(){var e=this.collection;if(this.deleted)return Promise.reject(ot("DOC13",{document:this,id:this.primary}));var t=on(this._data),n;return e._runHooks("pre","remove",t,this).then(async()=>{t._deleted=!0;var r=[{previous:this._data,document:t}],i=await e.storageInstance.bulkWrite(r,"rx-document-remove"),o=i.error[0];return Zm(e,this.primary,t,o),Oi(this.collection.schema.primaryPath,r,i)[0]}).then(r=>(n=r,this.collection._runHooks("post","remove",t,this))).then(()=>this.collection._docCache.getCachedRxDocument(n))},incrementalRemove(){return this.incrementalModify(async e=>(await this.collection._runHooks("pre","remove",e,this),e._deleted=!0,e)).then(async e=>(await this.collection._runHooks("post","remove",e._data,e),e))},destroy(){throw ot("DOC14")}};function gL(e=ty){var t=function(r,i){this.collection=r,this._data=i,this._propertyCache=new Map,this.isInstanceOfRxDocument=!0};return t.prototype=e,t}function dY(e,t,n){var r=new e(t,n);return oo("createRxDocument",r),r}function vL(e,t,n){return t._meta=Object.assign({},n._meta,t._meta),bn.isDevMode()&&e.schema.validateChange(n,t),e._runHooks("pre","save",t,n)}var Al="collection",yS="storage-token",fY="rx-migration-status",pY="RxInternalDocument",bS=Vv({version:0,title:pY,primaryKey:{key:"id",fields:["context","key"],separator:"|"},type:"object",properties:{id:{type:"string",maxLength:200},key:{type:"string"},context:{type:"string",enum:[Al,yS,fY,"OTHER"]},data:{type:"object",additionalProperties:!0}},indexes:[],required:["key","context","data"],additionalProperties:!1,sharding:{shards:1,mode:"collection"}});function Zf(e,t){return Za(bS,{key:e,context:t})}async function yL(e){var t=gS(e.schema,{selector:{context:Al,_deleted:{$eq:!1}},sort:[{id:"asc"}],skip:0}),n=await e.query(t),r=n.documents;return r}var bL="storageToken",hY=Zf(bL,yS);async function mY(e){var t=cc(10),n=e.password?await e.hashFunction(JSON.stringify(e.password)):void 0,r={id:hY,context:yS,key:bL,data:{rxdbVersion:e.rxdbVersion,token:t,instanceToken:e.token,passwordHash:n},_deleted:!1,_meta:Yu(),_rev:Do(),_attachments:{}},i=[{document:r}],o=await e.internalStore.bulkWrite(i,"internal-add-storage-token");if(!o.error[0])return Oi("id",i,o)[0];var s=xt(o.error[0]);if(s.isError&&Hv(s)){var a=s;if(!gY(a.documentInDb.data.rxdbVersion,e.rxdbVersion))throw ot("DM5",{args:{database:e.name,databaseStateVersion:a.documentInDb.data.rxdbVersion,codeVersion:e.rxdbVersion}});if(n&&n!==a.documentInDb.data.passwordHash)throw ot("DB1",{passwordHash:n,existingPasswordHash:a.documentInDb.data.passwordHash});var l=a.documentInDb;return xt(l)}throw s}function gY(e,t){if(!e||t.includes("beta")&&t!==e)return!1;var n=e.split(".")[0],r=t.split(".")[0];return n===r}async function vY(e,t,n){if(e.schema.version!==n.version)throw ot("SNH",{schema:n,version:e.schema.version,name:e.name,collection:e,args:{storageCollectionName:t}});for(var r=eg(e.name,e.schema.jsonSchema),i=Zf(r,Al);;){var o=await Zv(e.database.internalStore,i),s=io(xt(o)),a=s.data.connectedStorages.find(l=>l.collectionName===t&&l.schema.version===n.version);if(a)return;s.data.connectedStorages.push({collectionName:t,schema:n});try{await ey(e.database.internalStore,{previous:xt(o),document:s},"add-connected-storage-to-collection")}catch(l){if(!Hv(l))throw l}}}async function yY(e,t,n){if(e.schema.version!==n.version)throw ot("SNH",{schema:n,version:e.schema.version,name:e.name,collection:e,args:{storageCollectionName:t}});for(var r=eg(e.name,e.schema.jsonSchema),i=Zf(r,Al);;){var o=await Zv(e.database.internalStore,i),s=io(xt(o)),a=s.data.connectedStorages.find(l=>l.collectionName===t&&l.schema.version===n.version);if(!a)return;s.data.connectedStorages=s.data.connectedStorages.filter(l=>l.collectionName!==t);try{await ey(e.database.internalStore,{previous:xt(o),document:s},"remove-connected-storage-from-collection")}catch(l){if(!Hv(l))throw l}}}function eg(e,t){return e+"-"+t.version}function _h(e,t){return t=on(t),t=IH(e,t),typeof e.jsonSchema.primaryKey!="string"&&(t=PH(e.primaryPath,e.jsonSchema,t)),t._meta=Yu(),Object.prototype.hasOwnProperty.call(t,"_deleted")||(t._deleted=!1),Object.prototype.hasOwnProperty.call(t,"_attachments")||(t._attachments={}),Object.prototype.hasOwnProperty.call(t,"_rev")||(t._rev=Do()),t}async function bY(e,t){t.multiInstance=e.multiInstance;var n=await e.storage.createStorageInstance(t);return n}async function wL(e,t,n,r,i,o,s){var a=await yL(t),l=a.filter(f=>f.data.name===i),c=[];l.forEach(f=>{c.push({collectionName:f.data.name,schema:f.data.schema,isCollection:!0}),f.data.connectedStorages.forEach(m=>c.push({collectionName:m.collectionName,isCollection:!1,schema:m.schema}))});var u=new Set;if(c=c.filter(f=>{var m=f.collectionName+"||"+f.schema.version;return u.has(m)?!1:(u.add(m),!0)}),await Promise.all(c.map(async f=>{var m=await e.createStorageInstance({collectionName:f.collectionName,databaseInstanceToken:n,databaseName:r,multiInstance:!1,options:{},schema:f.schema,password:o,devMode:bn.isDevMode()});await m.remove(),f.isCollection&&await Ql("postRemoveRxCollection",{storage:e,databaseName:r,collectionName:i})})),s){var d=l.map(f=>{var m=Pp(f);return m._deleted=!0,m._meta.lwt=ar(),m._rev=Us(n,f),{previous:f,document:m}});await t.bulkWrite(d,"rx-database-remove-collection-all")}}function Ui(e){if(e.destroyed)throw ot("COL21",{collection:e.name,version:e.schema.version})}var wY=function(){function e(n){this.subs=[],this.counter=0,this.eventCounterMap=new WeakMap,this.buffer=[],this.limit=100,this.tasks=new Set,this.collection=n,this.subs.push(this.collection.database.eventBulks$.pipe(Gt(r=>r.collectionName===this.collection.name),Gt(r=>{var i=r.events[0];return!i.isLocal})).subscribe(r=>{this.tasks.add(()=>this._handleChangeEvents(r.events)),this.tasks.size<=1&&Gv().then(()=>{this.processTasks()})}))}var t=e.prototype;return t.processTasks=function(){if(this.tasks.size!==0){var r=Array.from(this.tasks);r.forEach(i=>i()),this.tasks.clear()}},t._handleChangeEvents=function(r){var i=this.counter;this.counter=this.counter+r.length,r.length>this.limit?this.buffer=r.slice(r.length*-1):(Yl(this.buffer,r),this.buffer=this.buffer.slice(this.limit*-1));for(var o=i+1,s=this.eventCounterMap,a=0;ai(s))},t.reduceByLastOfDoc=function(r){return this.processTasks(),r.slice(0)},t.destroy=function(){this.tasks.clear(),this.subs.forEach(r=>r.unsubscribe())},e}();function xY(e){return new wY(e)}var SY=new WeakMap;function _Y(e){var t=e.schema.getDocumentPrototype(),n=EY(e),r=ty,i={};return[t,n,r].forEach(o=>{var s=Object.getOwnPropertyNames(o);s.forEach(a=>{var l=Object.getOwnPropertyDescriptor(o,a),c=!0;(a.startsWith("_")||a.endsWith("_")||a.startsWith("$")||a.endsWith("$"))&&(c=!1),typeof l.value=="function"?Object.defineProperty(i,a,{get(){return l.value.bind(this)},enumerable:c,configurable:!1}):(l.enumerable=c,l.configurable=!1,l.writable&&(l.writable=!1),Object.defineProperty(i,a,l))})}),i}function CY(e){return Gs(SY,e,()=>gL(_Y(e)))}function kY(e,t,n){var r=dY(t,e,bn.deepFreezeWhenDevMode(n));return e._runHooksSync("post","create",n,r),oo("postCreateRxDocument",r),r}function EY(e){var t={};return Object.entries(e.methods).forEach(([n,r])=>{t[n]=r}),t}async function tg(e,t){var n=Za(e.input.metaInstance.schema,{isCheckpoint:"1",itemId:t}),r=await e.input.metaInstance.findDocumentsById([n],!1),i=r[0];if(e.lastCheckpointDoc[t]=i,i)return i.checkpointData}async function ng(e,t,n){e.checkpointQueue=e.checkpointQueue.then(async()=>{var r=e.lastCheckpointDoc[t];if(n&&!e.events.canceled.getValue()&&(!r||JSON.stringify(r.checkpointData)!==JSON.stringify(n))){var i={id:"",isCheckpoint:"1",itemId:t,_deleted:!1,_attachments:{},checkpointData:n,_meta:Yu(),_rev:Do()};for(i.id=Za(e.input.metaInstance.schema,i);!e.events.canceled.getValue();){if(r&&(i.checkpointData=Jf([r.checkpointData,i.checkpointData])),i._meta.lwt=ar(),i._rev=Us(await e.checkpointKey,r),e.events.canceled.getValue())return;var o=[{previous:r,document:i}],s=await e.input.metaInstance.bulkWrite(o,"replication-set-checkpoint"),a=Oi(e.primaryPath,o,s)[0];if(a){e.lastCheckpointDoc[t]=a;return}else{var l=s.error[0];if(l.status!==409)throw l;r=xt(l.documentInDb),i._rev=Us(await e.checkpointKey,r)}}}}),await e.checkpointQueue}async function RY(e){var t=await e.hashFunction([e.identifier,e.forkInstance.databaseName,e.forkInstance.collectionName].join("||"));return"rx_storage_replication_"+t}function PE(e,t,n,r,i){var o=Object.assign({},r,{_attachments:t&&r._attachments?r._attachments:{},_meta:n?r._meta:Object.assign({},i?i._meta:{},{lwt:ar()}),_rev:n?r._rev:Do()});return o._rev||(o._rev=Us(e,i)),o}function ga(e,t,n){var r=on(e);return t||delete r._attachments,n||(delete r._meta,delete r._rev),r}function O1(e,t){return e.hasAttachments?t.map(n=>{var r=io(n.document);return r.docData=es(r.docData),{document:r,previous:n.previous}}):t}function j1(e){for(;;)if(e.underlyingPersistentStorage)e=e.underlyingPersistentStorage;else return e}var PY="RxReplicationProtocolMetaData";function TY(e,t){var n=TH(e),r={title:PY,primaryKey:{key:"id",fields:["itemId","isCheckpoint"],separator:"|"},type:"object",version:e.version,additionalProperties:!1,properties:{id:{type:"string",minLength:1,maxLength:n+2},isCheckpoint:{type:"string",enum:["0","1"],minLength:1,maxLength:1},itemId:{type:"string",maxLength:n>4?n:4},checkpointData:{type:"object",additionalProperties:!0},docData:{type:"object",properties:e.properties},isResolvedConflict:{type:"string"}},keyCompression:e.keyCompression,required:["id","isCheckpoint","itemId"]};t&&(r.encrypted=["docData"]);var i=Vv(r);return i}function xL(e,t){return e.input.metaInstance.findDocumentsById(t.map(n=>{var r=Za(e.input.metaInstance.schema,{itemId:n,isCheckpoint:"0"});return r}),!0).then(n=>{var r={};return Object.values(n).forEach(i=>{r[i.itemId]={docData:i.docData,metaDocument:i}}),r})}async function rg(e,t,n,r){var i=t[e.primaryPath],o=n?Pp(n):{id:"",isCheckpoint:"0",itemId:i,docData:t,_attachments:{},_deleted:!1,_rev:Do(),_meta:{lwt:0}};o.docData=t,r&&(o.isResolvedConflict=r),o._meta.lwt=ar(),o.id=Za(e.input.metaInstance.schema,o),o._rev=Us(await e.checkpointKey,n);var s={previous:n,document:o};return s}async function OY(e){if(e.input.initialCheckpoint&&e.input.initialCheckpoint.downstream){var t=await tg(e,"down");t||await ng(e,"down",e.input.initialCheckpoint.downstream)}var n=await e.input.hashFunction(e.input.identifier),r=e.input.replicationHandler,i=0,o=[];function s(h){e.stats.down.addNewTask=e.stats.down.addNewTask+1;var g={time:i++,task:h};o.push(g),e.streamQueue.down=e.streamQueue.down.then(()=>{for(var R=[];o.length>0;){e.events.active.down.next(!0);var b=xt(o.shift());if(!(b.time{e.events.active.down.next(!1),!e.firstSyncDone.down.getValue()&&!e.events.canceled.getValue()&&e.firstSyncDone.down.next(!0)})}if(s("RESYNC"),!e.events.canceled.getValue()){var a=r.masterChangeStream$.pipe(ls(async h=>(await Ln(e.events.active.up.pipe(Gt(g=>!g))),h))).subscribe(h=>{e.stats.down.masterChangeStreamEmit=e.stats.down.masterChangeStreamEmit+1,s(h)});Ln(e.events.canceled.pipe(Gt(h=>!!h))).then(()=>a.unsubscribe())}var l=-1;async function c(){if(e.stats.down.downstreamResyncOnce=e.stats.down.downstreamResyncOnce+1,!e.events.canceled.getValue()){e.checkpointQueue=e.checkpointQueue.then(()=>tg(e,"down"));for(var h=await e.checkpointQueue,g=[];!e.events.canceled.getValue();){l=i++;var R=await r.masterChangesSince(h,e.input.pullBatchSize);if(R.documents.length===0||(h=Jf([h,R.checkpoint]),g.push(m(R.documents,h)),R.documents.length{if(b==="RESYNC")throw new Error("SNH");Yl(g,b.documents),R=Jf([R,b.checkpoint])}),m(g,xt(R))}var d=Ci,f={docs:{}};function m(h,g){var R=e.primaryPath;return e.stats.down.persistFromMaster=e.stats.down.persistFromMaster+1,h.forEach(b=>{var w=b[R];f.docs[w]=b}),f.checkpoint=g,d=d.then(()=>{var b=f.docs;f.docs={};var w=f.checkpoint,y=Object.keys(b);if(e.events.canceled.getValue()||y.length===0)return Ci;var _=[],k={},E={},P=[];return Promise.all([e.input.forkInstance.findDocumentsById(y,!0),xL(e,y)]).then(([I,A])=>{var L=new Map;return I.forEach(N=>L.set(N[R],N)),Promise.all(y.map(async N=>{var F=L.get(N),z=F?ga(F,e.hasAttachments,!1):void 0,K=b[N],Z=A[N];Z&&F&&Z.metaDocument.isResolvedConflict===F._rev&&await e.streamQueue.up;var le=!Z||!z?!1:await e.input.conflictHandler({realMasterState:Z.docData,newDocumentState:z},"downstream-check-if-equal-0").then(je=>je.isEqual);if(!le&&Z&&Z.docData._rev&&F&&F._meta[e.input.identifier]&&za(F._rev)===F._meta[e.input.identifier]&&(le=!0),F&&Z&&le===!1||F&&!Z)return Ci;var ce=z?await e.input.conflictHandler({realMasterState:K,newDocumentState:z},"downstream-check-if-equal-1").then(je=>je.isEqual):!1;if(z&&ce)return(!Z||le===!1)&&P.push(await rg(e,z,Z?Z.metaDocument:void 0)),Ci;var H=Object.assign({},K,F?{_meta:on(F._meta),_attachments:e.hasAttachments&&K._attachments?K._attachments:{},_rev:Do()}:{_meta:{lwt:ar()},_rev:Do(),_attachments:e.hasAttachments&&K._attachments?K._attachments:{}});if(K._rev){var V=F?za(F._rev)+1:1;H._meta[e.input.identifier]=V,e.input.keepMeta&&(H._rev=K._rev)}e.input.keepMeta&&K._meta&&(H._meta=K._meta);var se={previous:F,document:H};se.document._rev=se.document._rev?se.document._rev:Us(n,se.previous),_.push(se),k[N]=se,E[N]=await rg(e,K,Z?Z.metaDocument:void 0)}))}).then(async()=>{if(_.length>0)return e.input.forkInstance.bulkWrite(_,await e.downstreamBulkWriteFlag).then(I=>{var A=Oi(e.primaryPath,_,I);A.forEach(L=>{var N=L[R];e.events.processed.down.next(k[N]),P.push(E[N])}),I.error.forEach(L=>{L.status!==409&&e.events.error.next(ot("RC_PULL",{writeError:L}))})})}).then(()=>{if(P.length>0)return e.input.metaInstance.bulkWrite(O1(e,P),"replication-down-write-meta").then(I=>{I.error.forEach(A=>{e.events.error.next(ot("RC_PULL",{id:A.documentId,writeError:A}))})})}).then(()=>{ng(e,"down",w)})}).catch(b=>e.events.error.next(b)),d}}var SL=function(e,t){var n=es(e.newDocumentState),r=es(e.realMasterState);return Ym(n,r)?Promise.resolve({isEqual:!0}):Promise.resolve({isEqual:!1,documentData:e.realMasterState})};async function jY(e,t,n){var r=e.input.conflictHandler,i=await r(t,"replication-resolve-conflict");if(!i.isEqual){var o=Object.assign({},i.documentData,{_meta:on(n._meta),_rev:Do(),_attachments:on(n._attachments)});return o._meta.lwt=ar(),o._rev=Us(await e.checkpointKey,n),{resolvedDoc:o,output:i}}}async function L1(e,t,n,r){if(!n._attachments||r&&!r._attachments)throw new Error("_attachments missing");var i=n[e],o=new Set(r&&r._attachments?Object.keys(r._attachments):[]);return await Promise.all(Object.entries(n._attachments).map(async([s,a])=>{if((!o.has(s)||r&&xt(r._attachments)[s].digest!==a.digest)&&!a.data){var l=await t.getAttachmentData(i,s,a.digest);a.data=l}})),n}async function LY(e){if(e.input.initialCheckpoint&&e.input.initialCheckpoint.upstream){var t=await tg(e,"up");t||await ng(e,"up",e.input.initialCheckpoint.upstream)}var n=e.input.replicationHandler;e.streamQueue.up=e.streamQueue.up.then(()=>c().then(()=>{u()}));var r=0,i=-1,o=[],s=Po,a={docs:{}},l=e.input.forkInstance.changeStream().subscribe(async f=>{if(f.context!==await e.downstreamBulkWriteFlag)return e.stats.up.forkChangeStreamEmit=e.stats.up.forkChangeStreamEmit+1,o.push({task:f,time:r++}),e.events.active.up.getValue()||e.events.active.up.next(!0),e.input.waitBeforePersist?e.input.waitBeforePersist().then(()=>u()):u()});Ln(e.events.canceled.pipe(Gt(f=>!!f))).then(()=>l.unsubscribe());async function c(){if(e.stats.up.upstreamInitialSync=e.stats.up.upstreamInitialSync+1,!e.events.canceled.getValue()){e.checkpointQueue=e.checkpointQueue.then(()=>tg(e,"up"));for(var f=await e.checkpointQueue,m=new Set,h=async function(){i=r++,m.size>3&&await Promise.race(Array.from(m));var b=await hL(e.input.forkInstance,e.input.pushBatchSize,f);if(b.documents.length===0)return 1;f=Jf([f,b.checkpoint]);var w=d(b.documents,xt(f));m.add(w),w.catch().then(()=>m.delete(w))};!e.events.canceled.getValue()&&!await h(););var g=await Promise.all(m),R=g.find(b=>!!b);R?await c():!e.firstSyncDone.up.getValue()&&!e.events.canceled.getValue()&&e.firstSyncDone.up.next(!0)}}function u(){if(e.events.canceled.getValue()||o.length===0){e.events.active.up.next(!1);return}e.stats.up.processTasks=e.stats.up.processTasks+1,e.events.active.up.next(!0),e.streamQueue.up=e.streamQueue.up.then(()=>{for(var f=[],m={};o.length>0;){var h=xt(o.shift());h.timeR.documentData)),m=Jf([m,h.task.checkpoint]))}var g=f.length===0?Po:d(f,m);return g.then(()=>{o.length===0?e.events.active.up.next(!1):u()})})}function d(f,m){return e.stats.up.persistToMaster=e.stats.up.persistToMaster+1,f.forEach(h=>{var g=h[e.primaryPath];a.docs[g]=h}),a.checkpoint=m,s=s.then(async()=>{if(e.events.canceled.getValue())return!1;var h=a.docs;a.docs={};var g=a.checkpoint,R=Object.keys(h);if(R.length===0)return!1;var b=await xL(e,R),w={},y=[],_={},k={};if(await Promise.all(R.map(async ce=>{var H=h[ce];k[ce]=H;var V=ga(H,e.hasAttachments,!!e.input.keepMeta),se=b[ce];se&&se.metaDocument.isResolvedConflict!==H._rev&&(await e.input.conflictHandler({realMasterState:se.docData,newDocumentState:V},"upstream-check-if-equal")).isEqual||se&&se.docData._rev&&za(H._rev)===H._meta[e.input.identifier]||(y.push(ce),w[ce]={assumedMasterState:se?se.docData:void 0,newDocumentState:V},_[ce]=await rg(e,V,se?se.metaDocument:void 0))})),y.length===0)return!1;var E=Object.values(w),P=new Set,I={},A=Y7(E,e.input.pushBatchSize);await Promise.all(A.map(async ce=>{e.hasAttachments&&await Promise.all(ce.map(async V=>{V.newDocumentState=await L1(e.primaryPath,e.input.forkInstance,io(V.newDocumentState),V.assumedMasterState)}));var H=await n.masterWrite(ce);H.forEach(V=>{var se=V[e.primaryPath];P.add(se),I[se]=V})}));var L=[];if(y.forEach(ce=>{P.has(ce)||(e.events.processed.up.next(w[ce]),L.push(_[ce]))}),e.events.canceled.getValue())return!1;L.length>0&&await e.input.metaInstance.bulkWrite(O1(e,L),"replication-up-write-meta");var N=!1;if(P.size>0){e.stats.up.persistToMasterHadConflicts=e.stats.up.persistToMasterHadConflicts+1;var F=[],z={};if(await Promise.all(Object.entries(I).map(([ce,H])=>{var V=w[ce],se={newDocumentState:V.newDocumentState,assumedMasterState:V.assumedMasterState,realMasterState:H};return jY(e,se,k[ce]).then(async je=>{if(je){e.events.resolvedConflicts.next({input:se,output:je.output}),F.push({previous:k[ce],document:je.resolvedDoc});var Ge=b[ce];z[ce]=await rg(e,xt(H),Ge?Ge.metaDocument:void 0,je.resolvedDoc._rev)}})})),F.length>0){N=!0,e.stats.up.persistToMasterConflictWrites=e.stats.up.persistToMasterConflictWrites+1;var K=await e.input.forkInstance.bulkWrite(F,"replication-up-write-conflict"),Z=[],le=Oi(e.primaryPath,F,K);le.forEach(ce=>{var H=ce[e.primaryPath];Z.push(z[H])}),Z.length>0&&await e.input.metaInstance.bulkWrite(O1(e,Z),"replication-up-write-conflict-meta")}}return ng(e,"up",g),N}).catch(h=>(e.events.error.next(h),!1)),s}}function IY(e){e=on(e),e.forkInstance=j1(e.forkInstance),e.metaInstance=j1(e.metaInstance);var t=RY(e),n={primaryPath:$i(e.forkInstance.schema.primaryKey),hasAttachments:!!e.forkInstance.schema.attachments,input:e,checkpointKey:t,downstreamBulkWriteFlag:t.then(r=>"replication-downstream-"+r),events:{canceled:new ks(!1),active:{down:new ks(!0),up:new ks(!0)},processed:{down:new Tn,up:new Tn},resolvedConflicts:new Tn,error:new Tn},stats:{down:{addNewTask:0,downstreamProcessChanges:0,downstreamResyncOnce:0,masterChangeStreamEmit:0,persistFromMaster:0},up:{forkChangeStreamEmit:0,persistToMaster:0,persistToMasterConflictWrites:0,persistToMasterHadConflicts:0,processTasks:0,upstreamInitialSync:0}},firstSyncDone:{down:new ks(!1),up:new ks(!1)},streamQueue:{down:Ci,up:Ci},checkpointQueue:Ci,lastCheckpointDoc:{}};return OY(n),LY(n),n}function I0(e){return Ln(zj([e.firstSyncDone.down.pipe(Gt(t=>!!t)),e.firstSyncDone.up.pipe(Gt(t=>!!t))])).then(()=>{})}function TE(e){return Promise.all([e.streamQueue.up,e.streamQueue.down,e.checkpointQueue])}function MY(e,t,n,r=!1){e=j1(e);var i=!!e.schema.attachments,o=$i(e.schema.primaryKey),s={masterChangeStream$:e.changeStream().pipe(ls(async a=>{var l={checkpoint:a.checkpoint,documents:await Promise.all(a.events.map(async c=>{var u=ga(c.documentData,i,r);return i&&(u=await L1(o,e,io(u),void 0)),u}))};return l})),masterChangesSince(a,l){return hL(e,l,a).then(async c=>({checkpoint:c.documents.length>0?c.checkpoint:a,documents:await Promise.all(c.documents.map(async u=>{var d=ga(u,i,r);return i&&(d=await L1(o,e,io(d),void 0)),d}))}))},async masterWrite(a){var l={};a.forEach(g=>{var R=g.newDocumentState[o];l[R]=g});var c=Object.keys(l),u=await e.findDocumentsById(c,!0),d=new Map;u.forEach(g=>d.set(g[o],g));var f=[],m=[];if(await Promise.all(Object.entries(l).map(async([g,R])=>{var b=d.get(g);b?b&&!R.assumedMasterState?f.push(ga(b,i,r)):(await t({realMasterState:ga(b,i,r),newDocumentState:xt(R.assumedMasterState)},"rxStorageInstanceToReplicationHandler-masterWrite")).isEqual===!0?m.push({previous:b,document:PE(n,i,r,R.newDocumentState,b)}):f.push(ga(b,i,r)):m.push({document:PE(n,i,r,R.newDocumentState)})})),m.length>0){var h=await e.bulkWrite(m,"replication-master-write");h.error.forEach(g=>{if(g.status!==409)throw new Error("non conflict error");f.push(ga(xt(g.documentInDb),i,r))})}return f}};return s}async function NY(e){e.events.canceled.next(!0),e.events.active.up.complete(),e.events.active.down.complete(),e.events.processed.up.complete(),e.events.processed.down.complete(),e.events.resolvedConflicts.complete(),e.events.canceled.complete(),await e.checkpointQueue}var _L=["pre","post"],CL=["insert","save","remove","create"],OE=!1,kL=function(){function e(n,r,i,o,s={},a={},l={},c={},u={},d=aL,f={},m=SL){this.storageInstance={},this.timeouts=new Set,this.incrementalWriteQueue={},this._incrementalUpsertQueues=new Map,this.synced=!1,this.hooks={},this._subs=[],this._docCache={},this._queryCache=Uq(),this.$={},this.checkpoint$={},this._changeEventBuffer={},this.onDestroy=[],this.destroyed=!1,this.onRemove=[],this.database=n,this.name=r,this.schema=i,this.internalStorageInstance=o,this.instanceCreationOptions=s,this.migrationStrategies=a,this.methods=l,this.attachments=c,this.options=u,this.cacheReplacementPolicy=d,this.statics=f,this.conflictHandler=m,$Y(this.asRxCollection)}var t=e.prototype;return t.prepare=async function(){this.storageInstance=vS(this.database,this.internalStorageInstance,this.schema.jsonSchema),this.incrementalWriteQueue=new mL(this.storageInstance,this.schema.primaryPath,(l,c)=>vL(this,l,c),l=>this._runHooks("post","save",l));var r=this.database.eventBulks$.pipe(Gt(l=>l.collectionName===this.name));this.$=r.pipe(ls(l=>l.events)),this.checkpoint$=r.pipe(qt(l=>l.checkpoint)),this._changeEventBuffer=xY(this.asRxCollection);var i;this._docCache=new lL(this.schema.primaryPath,this.database.eventBulks$.pipe(Gt(l=>l.collectionName===this.name&&!l.events[0].isLocal),qt(l=>l.events)),l=>(i||(i=CY(this.asRxCollection)),kY(this.asRxCollection,i,l)));var o=this.database.internalStore.changeStream().pipe(Gt(l=>{var c=this.name+"-"+this.schema.version,u=l.events.find(d=>d.documentData.context==="collection"&&d.documentData.key===c&&d.operation==="DELETE");return!!u})).subscribe(async()=>{await this.destroy(),await Promise.all(this.onRemove.map(l=>l()))});this._subs.push(o);var s=await this.database.storageToken,a=this.storageInstance.changeStream().subscribe(l=>{for(var c=new Array(l.events.length),u=l.events,d=this.name,f=bn.deepFreezeWhenDevMode,m=0;m{this.conflictHandler(l.input,l.context).then(c=>{this.storageInstance.resolveConflictResultionTask({id:l.id,output:c})})})),Ci},t.cleanup=function(r){throw Ui(this),fn("cleanup")},t.migrationNeeded=function(){throw fn("migration-schema")},t.getMigrationState=function(){throw fn("migration-schema")},t.startMigration=function(r=10){return Ui(this),this.getMigrationState().startMigration(r)},t.migratePromise=function(r=10){return this.getMigrationState().migratePromise(r)},t.insert=async function(r){Ui(this);var i=await this.bulkInsert([r]),o=i.error[0];Zm(this,r[this.schema.primaryPath],r,o);var s=xt(i.success[0]);return s},t.bulkInsert=async function(r){if(Ui(this),r.length===0)return{success:[],error:[]};var i=this.schema.primaryPath,o;if(this.hasHooks("pre","insert"))o=await Promise.all(r.map(g=>{var R=_h(this.schema,g);return this._runHooks("pre","insert",R).then(()=>({document:R}))}));else{o=new Array(r.length);for(var s=this.schema,a=0;a{var R=g.document;h.set(R[i],R)}),await Promise.all(m.success.map(g=>this._runHooks("post","insert",h.get(g.primary),g)))}return m},t.bulkRemove=async function(r){Ui(this);var i=this.schema.primaryPath;if(r.length===0)return{success:[],error:[]};var o=await this.findByIds(r).exec(),s=[],a=new Map;Array.from(o.values()).forEach(m=>{var h=m.toMutableJSON(!0);s.push(h),a.set(m.primary,h)}),await Promise.all(s.map(m=>{var h=m[this.schema.primaryPath];return this._runHooks("pre","remove",m,o.get(h))}));var l=s.map(m=>{var h=on(m);return h._deleted=!0,{previous:m,document:h}}),c=await this.storageInstance.bulkWrite(l,"rx-collection-bulk-remove"),u=Oi(this.schema.primaryPath,l,c),d=u.map(m=>m[i]);await Promise.all(d.map(m=>this._runHooks("post","remove",a.get(m),o.get(m))));var f=d.map(m=>Ws(o,m));return{success:f,error:c.error}},t.bulkUpsert=async function(r){Ui(this);var i=[],o=new Map;r.forEach(c=>{var u=_h(this.schema,c),d=u[this.schema.primaryPath];if(!d)throw ot("COL3",{primaryPath:this.schema.primaryPath,data:u,schema:this.schema.jsonSchema});o.set(d,u),i.push(u)});var s=await this.bulkInsert(i),a=s.success.slice(0),l=[];return await Promise.all(s.error.map(async c=>{if(c.status!==409)l.push(c);else{var u=c.documentId,d=Ws(o,u),f=xt(c.documentInDb),m=this._docCache.getCachedRxDocuments([f])[0],h=await m.incrementalModify(()=>d);a.push(h)}})),{error:l,success:a}},t.upsert=async function(r){Ui(this);var i=await this.bulkUpsert([r]);return Zm(this.asRxCollection,r[this.schema.primaryPath],r,i.error[0]),i.success[0]},t.incrementalUpsert=function(r){Ui(this);var i=_h(this.schema,r),o=i[this.schema.primaryPath];if(!o)throw ot("COL4",{data:r});var s=this._incrementalUpsertQueues.get(o);return s||(s=Ci),s=s.then(()=>DY(this,o,i)).then(a=>a.inserted?a.doc:AY(a.doc,i)),this._incrementalUpsertQueues.set(o,s),s},t.find=function(r){if(Ui(this),typeof r=="string")throw ot("COL5",{queryObj:r});r||(r=im());var i=Fc("find",r,this);return i},t.findOne=function(r){if(Ui(this),typeof r=="number"||Array.isArray(r))throw xi("COL6",{queryObj:r});var i;if(typeof r=="string")i=Fc("findOne",{selector:{[this.schema.primaryPath]:r},limit:1},this);else{if(r||(r=im()),r.limit)throw ot("QU6");r=on(r),r.limit=1,i=Fc("findOne",r,this)}return i},t.count=function(r){Ui(this),r||(r=im());var i=Fc("count",r,this);return i},t.findByIds=function(r){Ui(this);var i={selector:{[this.schema.primaryPath]:{$in:r.slice(0)}}},o=Fc("findByIds",i,this);return o},t.exportJSON=function(){throw fn("json-dump")},t.importJSON=function(r){throw fn("json-dump")},t.insertCRDT=function(r){throw fn("crdt")},t.addHook=function(r,i,o,s=!1){if(typeof o!="function")throw xi("COL7",{key:i,when:r});if(!_L.includes(r))throw xi("COL8",{key:i,when:r});if(!CL.includes(i))throw ot("COL9",{key:i});if(r==="post"&&i==="create"&&s===!0)throw ot("COL10",{when:r,key:i,parallel:s});var a=o.bind(this),l=s?"parallel":"series";this.hooks[i]=this.hooks[i]||{},this.hooks[i][r]=this.hooks[i][r]||{series:[],parallel:[]},this.hooks[i][r][l].push(a)},t.getHooks=function(r,i){return!this.hooks[i]||!this.hooks[i][r]?{series:[],parallel:[]}:this.hooks[i][r]},t.hasHooks=function(r,i){if(!this.hooks[i]||!this.hooks[i][r])return!1;var o=this.getHooks(r,i);return o?o.series.length>0||o.parallel.length>0:!1},t._runHooks=function(r,i,o,s){var a=this.getHooks(r,i);if(!a)return Ci;var l=a.series.map(c=>()=>c(o,s));return gH(l).then(()=>Promise.all(a.parallel.map(c=>c(o,s))))},t._runHooksSync=function(r,i,o,s){if(this.hasHooks(r,i)){var a=this.getHooks(r,i);a&&a.series.forEach(l=>l(o,s))}},t.promiseWait=function(r){var i=new Promise(o=>{var s=setTimeout(()=>{this.timeouts.delete(s),o()},r);this.timeouts.add(s)});return i},t.destroy=async function(){return this.destroyed?Po:(await Promise.all(this.onDestroy.map(r=>r())),this.destroyed=!0,Array.from(this.timeouts).forEach(r=>clearTimeout(r)),this._changeEventBuffer&&this._changeEventBuffer.destroy(),this.database.requestIdlePromise().then(()=>this.storageInstance.close()).then(()=>(this._subs.forEach(r=>r.unsubscribe()),delete this.database.collections[this.name],Ql("postDestroyRxCollection",this).then(()=>!0))))},t.remove=async function(){await this.destroy(),await Promise.all(this.onRemove.map(r=>r())),await wL(this.database.storage,this.database.internalStore,this.database.token,this.database.name,this.name,this.database.password,this.database.hashFunction)},Ja(e,[{key:"insert$",get:function(){return this.$.pipe(Gt(n=>n.operation==="INSERT"))}},{key:"update$",get:function(){return this.$.pipe(Gt(n=>n.operation==="UPDATE"))}},{key:"remove$",get:function(){return this.$.pipe(Gt(n=>n.operation==="DELETE"))}},{key:"asRxCollection",get:function(){return this}}])}();function $Y(e){if(!OE){OE=!0;var t=Object.getPrototypeOf(e);CL.forEach(n=>{_L.map(r=>{var i=r+uj(n);t[i]=function(o,s){return this.addHook(r,n,o,s)}})})}}function AY(e,t){return e.incrementalModify(n=>t)}function DY(e,t,n){var r=e._docCache.getLatestDocumentDataIfExists(t);return r?Promise.resolve({doc:e._docCache.getCachedRxDocuments([r])[0],inserted:!1}):e.findOne(t).exec().then(i=>i?{doc:i,inserted:!1}:e.insert(n).then(o=>({doc:o,inserted:!0})))}function BY({database:e,name:t,schema:n,instanceCreationOptions:r={},migrationStrategies:i={},autoMigrate:o=!0,statics:s={},methods:a={},attachments:l={},options:c={},localDocuments:u=!1,cacheReplacementPolicy:d=aL,conflictHandler:f=SL}){var m={databaseInstanceToken:e.token,databaseName:e.name,collectionName:t,schema:n.jsonSchema,options:r,multiInstance:e.multiInstance,password:e.password,devMode:bn.isDevMode()};return oo("preCreateRxStorageInstance",m),bY(e,m).then(h=>{var g=new kL(e,t,n,h,r,i,a,l,c,d,s,f);return g.prepare().then(()=>{Object.entries(s).forEach(([b,w])=>{Object.defineProperty(g,b,{get:()=>w.bind(g)})});var R=Ci;return o&&g.schema.version!==0&&(R=g.migratePromise()),R}).then(()=>(oo("createRxCollection",{collection:g,creator:{name:t,schema:n,storageInstance:h,instanceCreationOptions:r,migrationStrategies:i,methods:a,attachments:l,options:c,cacheReplacementPolicy:d,localDocuments:u,statics:s}}),g)).catch(R=>h.close().then(()=>Promise.reject(R)))})}var EL=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this._parallels=t||1,this._qC=0,this._iC=new Set,this._lHN=0,this._hPM=new Map,this._pHM=new Map};EL.prototype={isIdle:function(){return this._qC{this._to=!1,zY(this)},0))}clear(){this.map.clear()}}function zY(e){const t=RL()-e.ttl,n=e.map[Symbol.iterator]();for(;;){const r=n.next().value;if(!r)return;const i=r[0];if(r[1]g.events)),this.storageToken=Po,this.storageTokenDocument=Po,this.emittedEventBulkIds=new wS(60*1e3),this.name=n,this.token=r,this.storage=i,this.instanceCreationOptions=o,this.password=s,this.multiInstance=a,this.eventReduce=l,this.options=c,this.internalStore=u,this.hashFunction=d,this.cleanupPolicy=f,this.allowSlowCount=m,this.reactivity=h,this.name!=="pseudoInstance"&&(this.internalStore=vS(this.asRxDatabase,u,bS),this.storageTokenDocument=mY(this.asRxDatabase).catch(g=>this.startupErrors.push(g)),this.storageToken=this.storageTokenDocument.then(g=>g.data.token).catch(g=>this.startupErrors.push(g)))}var t=e.prototype;return t.getReactivityFactory=function(){if(!this.reactivity)throw ot("DB14",{database:this.name});return this.reactivity},t.$emit=function(r){this.emittedEventBulkIds.has(r.id)||(this.emittedEventBulkIds.add(r.id),this.eventBulks$.next(r))},t.removeCollectionDoc=async function(r,i){var o=await Zv(this.internalStore,Zf(eg(r,i),Al));if(!o)throw ot("SNH",{name:r,schema:i});var s=Pp(o);s._deleted=!0,await this.internalStore.bulkWrite([{document:s,previous:o}],"rx-database-remove-collection")},t.addCollections=async function(r){var i={},o={},s=[],a={};await Promise.all(Object.entries(r).map(async([u,d])=>{var f=u,m=d.schema;i[f]=m;var h=NH(m,this.hashFunction);if(o[f]=h,this.collections[u])throw ot("DB3",{name:u});var g=eg(u,m),R={id:Zf(g,Al),key:g,context:Al,data:{name:f,schemaHash:await h.hash,schema:h.jsonSchema,version:h.version,connectedStorages:[]},_deleted:!1,_meta:Yu(),_rev:Do(),_attachments:{}};s.push({document:R});var b=Object.assign({},d,{name:f,schema:h,database:this}),w=on(d);w.database=this,w.name=u,oo("preCreateRxCollection",w),b.conflictHandler=w.conflictHandler,a[f]=b}));var l=await this.internalStore.bulkWrite(s,"rx-database-add-collection");await VY(this),await Promise.all(l.error.map(async u=>{if(u.status!==409)throw ot("DB12",{database:this.name,writeError:u});var d=xt(u.documentInDb),f=d.data.name,m=o[f];if(d.data.schemaHash!==await m.hash)throw ot("DB6",{database:this.name,collection:f,previousSchemaHash:d.data.schemaHash,schemaHash:await m.hash,previousSchema:d.data.schema,schema:xt(i[f])})}));var c={};return await Promise.all(Object.keys(r).map(async u=>{var d=a[u],f=await BY(d);c[u]=f,this.collections[u]=f,this[u]||Object.defineProperty(this,u,{get:()=>this.collections[u]})})),c},t.lockedRun=function(r){return this.idleQueue.wrapCall(r)},t.requestIdlePromise=function(){return this.idleQueue.requestIdlePromise()},t.exportJSON=function(r){throw fn("json-dump")},t.addState=function(r){throw fn("state")},t.importJSON=function(r){throw fn("json-dump")},t.backup=function(r){throw fn("backup")},t.leaderElector=function(){throw fn("leader-election")},t.isLeader=function(){throw fn("leader-election")},t.waitForLeadership=function(){throw fn("leader-election")},t.migrationStates=function(){throw fn("migration-schema")},t.destroy=async function(){return this.destroyed||(this.destroyed=!0,await Ql("preDestroyRxDatabase",this),this.eventBulks$.complete(),this._subs.map(r=>r.unsubscribe()),this.name==="pseudoInstance")?Po:this.requestIdlePromise().then(()=>Promise.all(this.onDestroy.map(r=>r()))).then(()=>Promise.all(Object.keys(this.collections).map(r=>this.collections[r]).map(r=>r.destroy()))).then(()=>this.internalStore.close()).then(()=>ig.delete(this.storage.name+"|"+this.name)).then(()=>!0)},t.remove=function(){return this.destroy().then(()=>GY(this.name,this.storage,this.password))},Ja(e,[{key:"$",get:function(){return this.observable$}},{key:"asRxDatabase",get:function(){return this}}])}();function UY(e,t){var n=t.name+"|"+e;if(ig.has(n))throw ot("DB8",{name:e,storage:t.name,link:"https://rxdb.info/rx-database.html#ignoreduplicate"})}async function PL(e,t,n,r,i,o){var s=await t.createStorageInstance({databaseInstanceToken:e,databaseName:n,collectionName:iY,schema:bS,options:r,multiInstance:i,password:o,devMode:bn.isDevMode()});return s}function WY({storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i=!0,eventReduce:o=!0,ignoreDuplicate:s=!1,options:a={},cleanupPolicy:l,allowSlowCount:c=!1,localDocuments:u=!1,hashFunction:d=lj,reactivity:f}){oo("preCreateRxDatabase",{storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i,eventReduce:o,ignoreDuplicate:s,options:a,localDocuments:u}),s||UY(n,e),ig.add(e.name+"|"+n);var m=cc(10);return PL(m,e,n,t,i,r).catch(h=>{throw ig.delete(e.name+"|"+n),h}).then(h=>{var g=new xS(n,m,e,t,r,i,o,a,h,d,l,c,f);return Ql("createRxDatabase",{database:g,creator:{storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i,eventReduce:o,ignoreDuplicate:s,options:a,localDocuments:u}}).then(()=>g)})}async function GY(e,t,n){var r=cc(10),i=await PL(r,t,e,{},!1,n),o=await yL(i),s=new Set;o.forEach(l=>s.add(l.data.name));var a=Array.from(s);return await Promise.all(a.map(l=>wL(t,i,r,e,l,n))),await Ql("postRemoveRxDatabase",{databaseName:e,storage:t}),await i.remove(),a}function HY(e){return e instanceof xS}async function VY(e){if(await e.storageToken,e.startupErrors[0])throw e.startupErrors[0]}var KY={RxSchema:bj.prototype,RxDocument:ty,RxQuery:uL.prototype,RxCollection:kL.prototype,RxDatabase:xS.prototype},N0=new Set,jE=new Set;function Zu(e){if(oo("preAddRxPlugin",{plugin:e,plugins:N0}),!N0.has(e)){{if(jE.has(e.name))throw ot("PL3",{name:e.name,plugin:e});N0.add(e),jE.add(e.name)}if(!e.rxdb)throw xi("PL1",{plugin:e});e.init&&e.init(),e.prototypes&&Object.entries(e.prototypes).forEach(([t,n])=>n(KY[t])),e.overwritable&&Object.assign(bn,e.overwritable),e.hooks&&Object.entries(e.hooks).forEach(([t,n])=>{n.after&&Yf[t].push(n.after),n.before&&Yf[t].unshift(n.before)})}}function qY(e){return e&&typeof e.then=="function"}Promise.resolve(!1);var YY=Promise.resolve(!0),$s=Promise.resolve();function Tl(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function QY(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Tp(){return Math.random().toString(36).substring(2)}var $0=0;function Op(){var e=Date.now()*1e3;return e<=$0&&(e=$0+1),$0=e,e}function XY(){return typeof navigator<"u"&&typeof navigator.locks<"u"&&typeof navigator.locks.request=="function"}var JY=Op,ZY="native";function eQ(e){var t={time:Op(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function tQ(e){e.bc.close(),e.subFns=[]}function nQ(e,t){try{return e.bc.postMessage(t,!1),$s}catch(n){return Promise.reject(n)}}function rQ(e,t){e.messagesCallback=t}function iQ(){if(typeof globalThis<"u"&&globalThis.Deno&&globalThis.Deno.args)return!0;if((typeof window<"u"||typeof self<"u")&&typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function oQ(){return 150}var sQ={create:eQ,close:tQ,onMessage:rQ,postMessage:nQ,canBeUsed:iQ,type:ZY,averageResponseTime:oQ,microSeconds:JY};function SS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var aQ=Op,lQ="pubkey.broadcast-channel-0-",Vs="messages",ny={durability:"relaxed"},cQ="idb";function TL(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function _S(e){e.commit&&e.commit()}function uQ(e){var t=TL(),n=lQ+e,r=t.open(n);return r.onupgradeneeded=function(i){var o=i.target.result;o.createObjectStore(Vs,{keyPath:"id",autoIncrement:!0})},new Promise(function(i,o){r.onerror=function(s){return o(s)},r.onsuccess=function(){i(r.result)}})}function dQ(e,t,n){var r=Date.now(),i={uuid:t,time:r,data:n},o=e.transaction([Vs],"readwrite",ny);return new Promise(function(s,a){o.oncomplete=function(){return s()},o.onerror=function(c){return a(c)};var l=o.objectStore(Vs);l.add(i),_S(o)})}function fQ(e,t){var n=e.transaction(Vs,"readonly",ny),r=n.objectStore(Vs),i=[],o=IDBKeyRange.bound(t+1,1/0);if(r.getAll){var s=r.getAll(o);return new Promise(function(l,c){s.onerror=function(u){return c(u)},s.onsuccess=function(u){l(u.target.result)}})}function a(){try{return o=IDBKeyRange.bound(t+1,1/0),r.openCursor(o)}catch{return r.openCursor()}}return new Promise(function(l,c){var u=a();u.onerror=function(d){return c(d)},u.onsuccess=function(d){var f=d.target.result;f?f.value.ide.lastCursorId&&(e.lastCursorId=r.id),r}).filter(function(r){return vQ(r,e)}).sort(function(r,i){return r.time-i.time});return n.forEach(function(r){e.messagesCallback&&(e.eMIs.add(r.id),e.messagesCallback(r.data))}),$s})}function yQ(e){e.closed=!0,e.db.close()}function bQ(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return dQ(e.db,e.uuid,t)}).then(function(){QY(0,10)===0&&mQ(e)}),e.writeBlockPromise}function wQ(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,jL(e)}function xQ(){return!!TL()}function SQ(e){return e.idb.fallbackInterval*2}var _Q={create:gQ,close:yQ,onMessage:wQ,postMessage:bQ,canBeUsed:xQ,type:cQ,averageResponseTime:SQ,microSeconds:aQ},CQ=Op,kQ="pubkey.broadcastChannel-",EQ="localstorage";function LL(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function IL(e){return kQ+e}function RQ(e,t){return new Promise(function(n){Tl().then(function(){var r=IL(e.channelName),i={token:Tp(),time:Date.now(),data:t,uuid:e.uuid},o=JSON.stringify(i);LL().setItem(r,o);var s=document.createEvent("Event");s.initEvent("storage",!0,!0),s.key=r,s.newValue=o,window.dispatchEvent(s),n()})})}function PQ(e,t){var n=IL(e),r=function(o){o.key===n&&t(JSON.parse(o.newValue))};return window.addEventListener("storage",r),r}function TQ(e){window.removeEventListener("storage",e)}function OQ(e,t){if(t=SS(t),!ML())throw new Error("BroadcastChannel: localstorage cannot be used");var n=Tp(),r=new wS(t.localstorage.removeTimeout),i={channelName:e,uuid:n,eMIs:r};return i.listener=PQ(e,function(o){i.messagesCallback&&o.uuid!==n&&(!o.token||r.has(o.token)||o.data.time&&o.data.time0||e._addEL.internal.length>0}function NE(e,t,n){e._addEL[t].push(n),VQ(e)}function $E(e,t,n){e._addEL[t]=e._addEL[t].filter(function(r){return r!==n}),KQ(e)}function VQ(e){if(!e._iL&&DL(e)){var t=function(i){e._addEL[i.type].forEach(function(o){i.time>=o.time&&o.fn(i.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function KQ(e){if(e._iL&&!DL(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}function qQ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var BL={exports:{}},$n=BL.exports={},Ko,qo;function M1(){throw new Error("setTimeout has not been defined")}function N1(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ko=setTimeout:Ko=M1}catch{Ko=M1}try{typeof clearTimeout=="function"?qo=clearTimeout:qo=N1}catch{qo=N1}})();function FL(e){if(Ko===setTimeout)return setTimeout(e,0);if((Ko===M1||!Ko)&&setTimeout)return Ko=setTimeout,setTimeout(e,0);try{return Ko(e,0)}catch{try{return Ko.call(null,e,0)}catch{return Ko.call(this,e,0)}}}function YQ(e){if(qo===clearTimeout)return clearTimeout(e);if((qo===N1||!qo)&&clearTimeout)return qo=clearTimeout,clearTimeout(e);try{return qo(e)}catch{try{return qo.call(null,e)}catch{return qo.call(this,e)}}}var Ps=[],hu=!1,Ol,om=-1;function QQ(){!hu||!Ol||(hu=!1,Ol.length?Ps=Ol.concat(Ps):om=-1,Ps.length&&zL())}function zL(){if(!hu){var e=FL(QQ);hu=!0;for(var t=Ps.length;t;){for(Ol=Ps,Ps=[];++om1)for(var n=1;n0)})},awaitLeadership:function(){var t=this;if(!this._wLMP){this._wKMC.c=new AbortController;var n=new Promise(function(r,i){t._wKMC.res=r,t._wKMC.rej=i});this._wLMP=new Promise(function(r){navigator.locks.request(t.lN,{signal:t._wKMC.c.signal},function(){return t._wKMC.c=void 0,WL(t),r(),n}).catch(function(){})})}return this._wLMP},set onduplicate(e){},die:function(){var t=this;return this._lstns.forEach(function(n){return t.broadcastChannel.removeEventListener("internal",n)}),this._lstns=[],this._unl.forEach(function(n){return n.remove()}),this._unl=[],this.isLeader&&(this.isLeader=!1),this.isDead=!0,this._wKMC.res&&this._wKMC.res(),this._wKMC.c&&this._wKMC.c.abort("LeaderElectionWebLock.die() called"),Dl(this,"death")}};var HL=function(t,n){var r=this;this.broadcastChannel=t,this._options=n,this.isLeader=!1,this._hasLeader=!1,this.isDead=!1,this.token=Tp(),this._aplQ=$s,this._aplQC=0,this._unl=[],this._lstns=[],this._dpL=function(){},this._dpLC=!1;var i=function(s){s.context==="leader"&&(s.action==="death"&&(r._hasLeader=!1),s.action==="tell"&&(r._hasLeader=!0))};this.broadcastChannel.addEventListener("internal",i),this._lstns.push(i)};HL.prototype={hasLeader:function(){return Promise.resolve(this._hasLeader)},applyOnce:function(t){var n=this;if(this.isLeader)return Tl(0,!0);if(this.isDead)return Tl(0,!1);if(this._aplQC>1)return this._aplQ;var r=function(){if(n.isLeader)return YY;var o=!1,s,a=new Promise(function(u){s=function(){o=!0,u()}}),l=function(d){d.context==="leader"&&d.token!=n.token&&(d.action==="apply"&&d.token>n.token&&s(),d.action==="tell"&&(s(),n._hasLeader=!0))};n.broadcastChannel.addEventListener("internal",l);var c=t?n._options.responseTime*4:n._options.responseTime;return Dl(n,"apply").then(function(){return Promise.race([Tl(c),a.then(function(){return Promise.reject(new Error)})])}).then(function(){return Dl(n,"apply")}).then(function(){return Promise.race([Tl(c),a.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return n.broadcastChannel.removeEventListener("internal",l),o?!1:WL(n).then(function(){return!0})})};return this._aplQC=this._aplQC+1,this._aplQ=this._aplQ.then(function(){return r()}).then(function(){n._aplQC=n._aplQC-1}),this._aplQ.then(function(){return n.isLeader})},awaitLeadership:function(){return this._aLP||(this._aLP=oX(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(n){return t.broadcastChannel.removeEventListener("internal",n)}),this._lstns=[],this._unl.forEach(function(n){return n.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,Dl(this,"death")}};function oX(e){return e.isLeader?$s:new Promise(function(t){var n=!1;function r(){n||(n=!0,e.broadcastChannel.removeEventListener("internal",o),t(!0))}e.applyOnce().then(function(){e.isLeader&&r()});var i=function s(){return Tl(e._options.fallbackInterval).then(function(){if(!(e.isDead||n))if(e.isLeader)r();else return e.applyOnce(!0).then(function(){e.isLeader?r():s()})})};i();var o=function(a){a.context==="leader"&&a.action==="death"&&(e._hasLeader=!1,e.applyOnce().then(function(){e.isLeader&&r()}))};e.broadcastChannel.addEventListener("internal",o),e._lstns.push(o)})}function sX(e,t){return e||(e={}),e=JSON.parse(JSON.stringify(e)),e.fallbackInterval||(e.fallbackInterval=3e3),e.responseTime||(e.responseTime=t.method.averageResponseTime(t.options)),e}function aX(e,t){if(e._leaderElector)throw new Error("BroadcastChannel already has a leader-elector");t=sX(t,e);var n=XY()?new GL(e,t):new HL(e,t);return e._befC.push(function(){return n.die()}),e._leaderElector=n,n}var og=new Map;function VL(e,t,n,r){var i=og.get(t);return i||(i={bc:new kS(["RxDB:",e,n].join("|")),refs:new Set},og.set(t,i)),i.refs.add(r),i.bc}function $1(e,t){var n=og.get(e);if(n&&(n.refs.delete(t),n.refs.size===0))return og.delete(e),n.bc.close()}function lX(e,t,n,r){if(t.multiInstance){var i=VL(e,t.databaseInstanceToken,n.databaseName,n),o=new Tn,s=f=>{f.storageName===e&&f.databaseName===t.databaseName&&f.collectionName===t.collectionName&&f.version===t.schema.version&&o.next(f.eventBulk)};i.addEventListener("message",s);var a=n.changeStream(),l=!1,c=a.subscribe(f=>{l||i.postMessage({storageName:e,databaseName:t.databaseName,collectionName:t.collectionName,version:t.schema.version,eventBulk:f})});n.changeStream=function(){return o.asObservable().pipe(TV(a))};var u=n.close.bind(n);n.close=async function(){return l=!0,c.unsubscribe(),i.removeEventListener("message",s),await $1(t.databaseInstanceToken,n),u()};var d=n.remove.bind(n);n.remove=async function(){return l=!0,c.unsubscribe(),i.removeEventListener("message",s),await $1(t.databaseInstanceToken,n),d()}}}var KL={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Sr,function(){var n=function(p,x){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,j){T.__proto__=j}||function(T,j){for(var M in j)Object.prototype.hasOwnProperty.call(j,M)&&(T[M]=j[M])})(p,x)},r=function(){return(r=Object.assign||function(p){for(var x,T=1,j=arguments.length;T"u"||o.Promise||(o.Promise=Promise);var c=Object.getPrototypeOf,u={}.hasOwnProperty;function d(p,x){return u.call(p,x)}function f(p,x){typeof x=="function"&&(x=x(c(p))),(typeof Reflect>"u"?s:Reflect.ownKeys)(x).forEach(function(T){h(p,T,x[T])})}var m=Object.defineProperty;function h(p,x,T,j){m(p,x,l(T&&d(T,"get")&&typeof T.get=="function"?{get:T.get,set:T.set,configurable:!0}:{value:T,configurable:!0,writable:!0},j))}function g(p){return{from:function(x){return p.prototype=Object.create(x.prototype),h(p.prototype,"constructor",p),{extend:f.bind(null,p.prototype)}}}}var R=Object.getOwnPropertyDescriptor,b=[].slice;function w(p,x,T){return b.call(p,x,T)}function y(p,x){return x(p)}function _(p){if(!p)throw new Error("Assertion Failed")}function k(p){o.setImmediate?setImmediate(p):setTimeout(p,0)}function E(p,x){if(typeof x=="string"&&d(p,x))return p[x];if(!x)return p;if(typeof x!="string"){for(var T=[],j=0,M=x.length;j"u"?[]:function(){var p=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[p,c(p),p];var x=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[x,c(x),p]}(),pe=go[0],zi=go[1],go=go[2],zi=zi&&zi.then,Fe=pe&&pe.constructor,rt=!!go,Xe=function(p,x){Yt.push([p,x]),et&&(queueMicrotask(tl),et=!1)},Oe=!0,et=!0,Rt=[],tn=[],qe=Ze,bt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ze,pgp:!1,env:{},finalize:ze},Me=bt,Yt=[],An=0,dr=[];function We(p){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var x=this._PSD=Me;if(typeof p!="function"){if(p!==q)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&er(this,this._value))}this._state=null,this._value=null,++x.ref,function T(j,M){try{M(function(B){if(j._state===null){if(B===j)throw new TypeError("A promise cannot be resolved with itself.");var G=j._lib&&di();B&&typeof B.then=="function"?T(j,function(Y,re){B instanceof We?B._then(Y,re):B.then(Y,re)}):(j._state=!0,j._value=B,po(j)),G&&Rr()}},er.bind(null,j))}catch(B){er(j,B)}}(this,p)}var Bi={get:function(){var p=Me,x=$e;function T(j,M){var B=this,G=!p.global&&(p!==Me||x!==$e),Y=G&&!vt(),re=new We(function(te,ue){zo(B,new Fi(Je(j,p,G,Y),Je(M,p,G,Y),te,ue,p))});return this._consoleTask&&(re._consoleTask=this._consoleTask),re}return T.prototype=q,T},set:function(p){h(this,"then",p&&p.prototype===q?Bi:{get:function(){return p},set:Bi.set})}};function Fi(p,x,T,j,M){this.onFulfilled=typeof p=="function"?p:null,this.onRejected=typeof x=="function"?x:null,this.resolve=T,this.reject=j,this.psd=M}function er(p,x){var T,j;tn.push(x),p._state===null&&(T=p._lib&&di(),x=qe(x),p._state=!1,p._value=x,j=p,Rt.some(function(M){return M._value===j._value})||Rt.push(j),po(p),T&&Rr())}function po(p){var x=p._listeners;p._listeners=[];for(var T=0,j=x.length;T.",ho="String expected.",Or=[],fi="__dbnames",pr="readonly",mo="readwrite";function tr(p,x){return p?x?function(){return p.apply(this,arguments)&&x.apply(this,arguments)}:p:x}var hs={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function St(p){return typeof p!="string"||/\./.test(p)?function(x){return x}:function(x){return x[p]===void 0&&p in x&&delete(x=z(x))[p],x}}function an(){throw Te.Type()}function Ct(p,x){try{var T=Ht(p),j=Ht(x);if(T!==j)return T==="Array"?1:j==="Array"?-1:T==="binary"?1:j==="binary"?-1:T==="string"?1:j==="string"?-1:T==="Date"?1:j!=="Date"?NaN:-1;switch(T){case"number":case"Date":case"string":return xbe+xe&&ve(be+de)})})}var ye=na(T)&&T.limit===1/0&&(typeof p!="function"||p===vo)&&{index:T.index,range:T.range};return ve(0).then(function(){if(0=de})).length!==0?(ue.forEach(function(ve){fe.push(function(){var ye=oe,be=ve._cfg.dbschema;Bp(J,ye,ae),Bp(J,be,ae),oe=J._dbSchema=be;var xe=vc(ye,be);xe.add.forEach(function(Qe){yc(ae,Qe[0],Qe[1].primKey,Qe[1].indexes)}),xe.change.forEach(function(Qe){if(Qe.recreate)throw new Te.Upgrade("Not yet support for changing primary key");var He=ae.objectStore(Qe.name);Qe.add.forEach(function(Et){return sa(He,Et)}),Qe.change.forEach(function(Et){He.deleteIndex(Et.name),sa(He,Et)}),Qe.del.forEach(function(Et){return He.deleteIndex(Et)})});var Re=ve._cfg.contentUpgrade;if(Re&&ve._cfg.version>de){Cn(J,ae),ne._memoizedTables={};var Ye=I(be);xe.del.forEach(function(Qe){Ye[Qe]=ye[Qe]}),mi(J,[J.Transaction.prototype]),Gn(J,[J.Transaction.prototype],s(Ye),Ye),ne.schema=Ye;var Be,Ke=je(Re);return Ke&&Ae(),xe=We.follow(function(){var Qe;(Be=Re(ne))&&Ke&&(Qe=vt.bind(null,null),Be.then(Qe,Qe))}),Be&&typeof Be.then=="function"?We.resolve(Be):xe.then(function(){return Be})}}),fe.push(function(ye){var be,xe,Re=ve._cfg.dbschema;be=Re,xe=ye,[].slice.call(xe.db.objectStoreNames).forEach(function(Ye){return be[Ye]==null&&xe.db.deleteObjectStore(Ye)}),mi(J,[J.Transaction.prototype]),Gn(J,[J.Transaction.prototype],J._storeNames,J._dbSchema),ne.schema=J._dbSchema}),fe.push(function(ye){J.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(J.idbdb.version/10)===ve._cfg.version?(J.idbdb.deleteObjectStore("$meta"),delete J._dbSchema.$meta,J._storeNames=J._storeNames.filter(function(be){return be!=="$meta"})):ye.objectStore("$meta").put(ve._cfg.version,"version"))})}),function ve(){return fe.length?We.resolve(fe.shift()(ne.idbtrans)).then(ve):We.resolve()}().then(function(){ld(oe,ae)})):We.resolve();var J,de,ne,ae,fe,oe}).catch(G)):(s(M).forEach(function(ue){yc(T,ue,M[ue].primKey,M[ue].indexes)}),Cn(p,T),void We.follow(function(){return p.on.populate.fire(B)}).catch(G));var re,te})}function oa(p,x){ld(p._dbSchema,x),x.db.version%10!=0||x.objectStoreNames.contains("$meta")||x.db.createObjectStore("$meta").add(Math.ceil(x.db.version/10-1),"version");var T=ys(0,p.idbdb,x);Bp(p,p._dbSchema,x);for(var j=0,M=vc(T,p._dbSchema).change;jMath.pow(2,62)?0:oe.oldVersion,J=oe<1,p.idbdb=fe.result,B&&oa(p,ue),Dp(p,oe/10,ue,ne))},ne),fe.onsuccess=zt(function(){ue=null;var oe,ve,ye,be,xe,Re=p.idbdb=fe.result,Ye=w(Re.objectStoreNames);if(0"u"?We.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(de){function ne(){return indexedDB.databases().finally(de)}re=setInterval(ne,100),ne()}).finally(function(){return clearInterval(re)}):Promise.resolve()).then(Y)]).then(function(){return G(),x.onReadyBeingFired=[],We.resolve(hy(function(){return p.on.ready.fire(p.vip)})).then(function de(){if(0x.limit?de.length=x.limit:p.length===x.limit&&de.length=ve.limit&&(!ve.values||Re.req.values)&&xM(Re.req.query.range,ve.query.range)}),!1,ye,be];case"count":return xe=be.find(function(Re){return n_(Re.req.query.range,ve.query.range)}),[xe,!!xe,ye,be]}}(x,T,"query",B),ue=te[0],J=te[1],de=te[2],ne=te[3];return ue&&J?ue.obsSet=B.obsSet:(J=j.query(B).then(function(ae){var fe=ae.result;if(ue&&(ue.res=fe),G){for(var oe=0,ve=fe.length;oe{var s=(async()=>{var a=on(n);a.autoOpen=!1;var l=new D1(i,a),c={[sg]:hX(r),[uX]:"++sequence, id",[BE]:"id"};return l.version(1).stores(c),await l.open(),{dexieDb:l,dexieTable:l[sg],dexieAttachmentsTable:l[BE],booleanIndexes:mX(r)}})();return FE.set(i,o),sm.set(o,0),s});return o}async function fX(e){var t=await e,n=sm.get(e),r=n-1;r===0?(t.dexieDb.close(),sm.delete(e)):sm.set(e,r)}var B1="__";function jp(e){var t=e.split(".");if(t.length>1)return t.map(r=>jp(r)).join(".");if(e.startsWith("|")){var n=e.substring(1);return B1+n}else return e}function YL(e){var t=e.split(".");if(t.length>1)return t.map(r=>YL(r)).join(".");if(e.startsWith(B1)){var n=e.substring(B1.length);return"|"+n}else return e}function pX(e,t){return t&&(t=on(t),t=F1(t),e.forEach(n=>{var r=Ua(t,n),i=r?"1":"0";pj(t,n,i)}),t)}function QL(e,t){return t&&(t=on(t),t=z1(t),e.forEach(n=>{var r=Ua(t,n),i=r==="1";pj(t,n,i)}),t)}function F1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(n=>F1(n));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([n,r])=>{typeof r=="object"&&(r=F1(r)),t[jp(n)]=r}),t}}function z1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(n=>z1(n));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([n,r])=>{(typeof r=="object"||Array.isArray(e))&&(r=z1(r)),t[YL(n)]=r}),t}}function hX(e){var t=[],n=$i(e.primaryKey);t.push([n]),t.push(["_deleted",n]),e.indexes&&e.indexes.forEach(o=>{var s=qf(o);t.push(s)}),t.push(["_meta.lwt",n]),t.push(["_meta.lwt"]),t=t.map(o=>o.map(s=>jp(s)));var r=t.map(o=>o.length===1?o[0]:"["+o.join("+")+"]");r=r.filter((o,s,a)=>a.indexOf(o)===s);var i=r.join(", ");return i}async function zE(e,t){var n=await e,r=await n.dexieTable.bulkGet(t);return r.map(i=>QL(n.booleanIndexes,i))}function Ch(e,t){return e+"||"+t}function mX(e){var t=new Set,n=[];return e.indexes?(e.indexes.forEach(r=>{var i=qf(r);i.forEach(o=>{if(!t.has(o)){t.add(o);var s=Nu(e,o);s.type==="boolean"&&n.push(o)}})}),n.push("_deleted"),Q7(n)):n}function UE(e){return e===pu?-1/0:e}function WE(e,t,n){if(e.includes(t)){var r=n===fu||n===!0?"1":"0";return r}else return n}function XL(e,t,n){if(!n){if(typeof window>"u")throw new Error("IDBKeyRange missing");n=window.IDBKeyRange}var r=t.startKeys.map((s,a)=>{var l=t.index[a];return WE(e,l,s)}).map(UE),i=t.endKeys.map((s,a)=>{var l=t.index[a];return WE(e,l,s)}).map(UE),o=n.bound(r,i,!t.inclusiveStart,!t.inclusiveEnd);return o}async function GE(e,t){var n=await e.internals,r=t.query,i=r.skip?r.skip:0,o=r.limit?r.limit:1/0,s=i+o,a=t.queryPlan,l=!1;a.selectorSatisfiedByIndex||(l=mS(e.schema,t.query));var c=XL(n.booleanIndexes,a,n.dexieDb._options.IDBKeyRange),u=a.index,d=[];if(await n.dexieDb.transaction("r",n.dexieTable,async m=>{var h=m.idbtrans,g=h.objectStore(sg),R,b;b="["+u.map(y=>jp(y)).join("+")+"]",R=g.index(b);var w=R.openCursor(c);await new Promise(y=>{w.onsuccess=function(_){var k=_.target.result;if(k){var E=QL(n.booleanIndexes,k.value);(!l||l(E))&&d.push(E),a.sortSatisfiedByIndex&&d.length===s?y():k.continue()}else y()}})}),!a.sortSatisfiedByIndex){var f=sL(e.schema,t.query);d=d.sort(f)}return d=d.slice(i,s),{documents:d}}async function gX(e,t){var n=await e.internals,r=t.queryPlan,i=r.index,o=XL(n.booleanIndexes,r,n.dexieDb._options.IDBKeyRange),s=-1;return await n.dexieDb.transaction("r",n.dexieTable,async a=>{var l=a.idbtrans,c=l.objectStore(sg),u,d;d="["+i.map(m=>jp(m)).join("+")+"]",u=c.index(d);var f=u.count(o);s=await new Promise((m,h)=>{f.onsuccess=function(){m(f.result)},f.onerror=g=>h(g)})}),s}var vX=ar(),A0=!1,yX=function(){function e(n,r,i,o,s,a,l,c){this.changes$=new Tn,this.instanceId=vX++,this.storage=n,this.databaseName=r,this.collectionName=i,this.schema=o,this.internals=s,this.options=a,this.settings=l,this.devMode=c,this.primaryPath=$i(this.schema.primaryKey)}var t=e.prototype;return t.bulkWrite=async function(r,i){pl(this),!A0&&(!_0.premium||typeof _0.premium!="string"||await lj(_0.premium)!==wH)&&console.warn(["-------------- RxDB Open Core RxStorage -------------------------------","You are using the free Dexie.js based RxStorage implementation from RxDB https://rxdb.info/rx-storage-dexie.html?console=dexie ","While this is a great option, we want to let you know that there are faster storage solutions available in our premium plugins.","For professional users and production environments, we highly recommend considering these premium options to enhance performance and reliability."," https://rxdb.info/premium?console=dexie ","If you already purchased premium access you can disable this log by calling the setPremiumFlag() function from rxdb-premium/plugins/shared.","---------------------------------------------------------------------"].join(` +`)),A0=!0,r.forEach(u=>{if(!u.document._rev||u.previous&&!u.previous._rev)throw ot("SNH",{args:{row:u}})});var o=await this.internals,s={error:[]};this.devMode&&(r=r.map(u=>{var d=Pp(u.document);return{previous:u.previous,document:d}}));var a=r.map(u=>u.document[this.primaryPath]),l;if(await o.dexieDb.transaction("rw",o.dexieTable,o.dexieAttachmentsTable,async()=>{var u=new Map,d=await zE(this.internals,a);d.forEach(h=>{var g=h;return g&&u.set(g[this.primaryPath],g),g}),l=oY(this,this.primaryPath,u,r,i),s.error=l.errors;var f=[];l.bulkInsertDocs.forEach(h=>{f.push(h.document)}),l.bulkUpdateDocs.forEach(h=>{f.push(h.document)}),f=f.map(h=>pX(o.booleanIndexes,h)),f.length>0&&await o.dexieTable.bulkPut(f);var m=[];l.attachmentsAdd.forEach(h=>{m.push({id:Ch(h.documentId,h.attachmentId),data:h.attachmentData.data})}),l.attachmentsUpdate.forEach(h=>{m.push({id:Ch(h.documentId,h.attachmentId),data:h.attachmentData.data})}),await o.dexieAttachmentsTable.bulkPut(m),await o.dexieAttachmentsTable.bulkDelete(l.attachmentsRemove.map(h=>Ch(h.documentId,h.attachmentId)))}),l=xt(l),l.eventBulk.events.length>0){var c=xt(l.newestRow).document;l.eventBulk.checkpoint={id:c[this.primaryPath],lwt:c._meta.lwt},l.eventBulk.endTime=ar(),this.changes$.next(l.eventBulk)}return s},t.findDocumentsById=async function(r,i){pl(this);var o=await this.internals,s=[];return await o.dexieDb.transaction("r",o.dexieTable,async()=>{var a=await zE(this.internals,r);a.forEach(l=>{l&&(!l._deleted||i)&&s.push(l)})}),s},t.query=function(r){return pl(this),GE(this,r)},t.count=async function(r){if(r.queryPlan.selectorSatisfiedByIndex){var i=await gX(this,r);return{count:i,mode:"fast"}}else{var o=await GE(this,r);return{count:o.documents.length,mode:"slow"}}},t.changeStream=function(){return pl(this),this.changes$.asObservable()},t.cleanup=async function(r){pl(this);var i=await this.internals;return await i.dexieDb.transaction("rw",i.dexieTable,async()=>{var o=ar()-r,s=await i.dexieTable.where("_meta.lwt").below(o).toArray(),a=[];s.forEach(l=>{l._deleted==="1"&&a.push(l[this.primaryPath])}),await i.dexieTable.bulkDelete(a)}),!0},t.getAttachmentData=async function(r,i,o){pl(this);var s=await this.internals,a=Ch(r,i);return await s.dexieDb.transaction("r",s.dexieAttachmentsTable,async()=>{var l=await s.dexieAttachmentsTable.get(a);if(l)return l.data;throw new Error("attachment missing documentId: "+r+" attachmentId: "+i)})},t.remove=async function(){pl(this);var r=await this.internals;return await r.dexieTable.clear(),this.close()},t.close=function(){return this.closed?this.closed:(this.closed=(async()=>{this.changes$.complete(),await fX(this.internals)})(),this.closed)},t.conflictResultionTasks=function(){return new Tn},t.resolveConflictResultionTask=async function(r){},e}();async function bX(e,t,n){var r=dX(t.databaseName,t.collectionName,n,t.schema),i=new yX(e,t.databaseName,t.collectionName,t.schema,r,t.options,n,t.devMode);return await lX(qL,t,i),Promise.resolve(i)}function pl(e){if(e.closed)throw new Error("RxStorageInstanceDexie is closed "+e.databaseName+"-"+e.collectionName)}var wX=function(){function e(n){this.name=qL,this.rxdbVersion=hj,this.settings=n}var t=e.prototype;return t.createStorageInstance=function(r){return lY(r),bX(this,r,this.settings)},e}();function xX(e={}){var t=new wX(e);return t}var ES={minimumDeletedTime:1e3*60*60*24*31,minimumCollectionAge:1e3*60,runEach:1e3*60*5,awaitReplicationsInSync:!0,waitForLeadership:!0},JL=new WeakMap,SX=new WeakMap;function HE(e){return Gs(SX,e,()=>aX(e))}function _X(){var e=VL(this.storage.name,this.token,this.name,this),t=this.destroy.bind(this);this.destroy=function(){return $1(this.token,this),t()};var n=HE(e);return n||(n=HE(e),JL.set(this,n)),this.leaderElector=()=>n,n}function CX(){return this.multiInstance?this.leaderElector().isLeader:!0}function kX(){return this.multiInstance?this.leaderElector().awaitLeadership().then(()=>!0):Wv}function EX(e){var t=JL.get(e);t&&t.die()}var RX=!0,PX={RxDatabase:e=>{e.leaderElector=_X,e.isLeader=CX,e.waitForLeadership=kX}},RS={name:"leader-election",rxdb:RX,prototypes:PX,hooks:{preDestroyRxDatabase:{after:EX}}},VE=e=>Promise.resolve(e);function KE(e,t){if(e==="_deleted")return t;t=on(t);var n=!!t._deleted;return t[e]=n,delete t._deleted,t}function D0(e,t,n){return n.map(r=>{var i=on(r);if(t!=="_deleted"){var o=!!i[t];i._deleted=o,delete i[t]}else i._deleted=!!i._deleted;var s=e.schema.primaryPath;return i[s]=Za(e.schema.jsonSchema,i),i})}function qE(e,t){if(typeof window>"u"||typeof window!="object"||typeof window.addEventListener>"u"||navigator.onLine)return e.promiseWait(t);var n,r=new Promise(i=>{n=()=>{window.removeEventListener("online",n),i()},window.addEventListener("online",n)});return Promise.race([r,e.promiseWait(t)]).then(()=>{window.removeEventListener("online",n)})}var PS=new WeakMap,TX=function(){function e(n,r,i,o,s,a,l,c){this.subs=[],this.subjects={received:new Tn,sent:new Tn,error:new Tn,canceled:new ks(!1),active:new ks(!1)},this.received$=this.subjects.received.asObservable(),this.sent$=this.subjects.sent.asObservable(),this.error$=this.subjects.error.asObservable(),this.canceled$=this.subjects.canceled.asObservable(),this.active$=this.subjects.active.asObservable(),this.onCancel=[],this.callOnStart=void 0,this.remoteEvents$=new Tn,this.replicationIdentifier=n,this.collection=r,this.deletedField=i,this.pull=o,this.push=s,this.live=a,this.retryTime=l,this.autoStart=c,this.metaInfoPromise=(async()=>{var f="rx-replication-meta-"+await r.database.hashFunction([this.collection.name,this.replicationIdentifier].join("-")),m=TY(this.collection.schema.jsonSchema,pL(this.collection.schema.jsonSchema));return{collectionName:f,schema:m}})();var u=Gs(PS,r,()=>[]);u.push(this),this.collection.onDestroy.push(()=>this.cancel()),Object.keys(this.subjects).forEach(f=>{Object.defineProperty(this,f+"$",{get:function(){return this.subjects[f].asObservable()}})});var d=new Promise(f=>{this.callOnStart=f});this.startPromise=d}var t=e.prototype;return t.start=async function(){if(!this.isStopped()){var r=this.pull&&this.pull.modifier?this.pull.modifier:VE,i=this.push&&this.push.modifier?this.push.modifier:VE,o=this.collection.database,s=await this.metaInfoPromise,[a]=await Promise.all([this.collection.database.storage.createStorageInstance({databaseName:o.name,collectionName:s.collectionName,databaseInstanceToken:o.token,multiInstance:o.multiInstance,options:{},schema:s.schema,password:o.password,devMode:bn.isDevMode()}),vY(this.collection,s.collectionName,s.schema)]);this.metaInstance=a,this.internalReplicationState=IY({pushBatchSize:this.push&&this.push.batchSize?this.push.batchSize:100,pullBatchSize:this.pull&&this.pull.batchSize?this.pull.batchSize:100,initialCheckpoint:{upstream:this.push?this.push.initialCheckpoint:void 0,downstream:this.pull?this.pull.initialCheckpoint:void 0},forkInstance:this.collection.storageInstance,metaInstance:this.metaInstance,hashFunction:o.hashFunction,identifier:"rxdbreplication"+this.replicationIdentifier,conflictHandler:this.collection.conflictHandler,replicationHandler:{masterChangeStream$:this.remoteEvents$.asObservable().pipe(Gt(l=>!!this.pull),ls(async l=>{if(l==="RESYNC")return l;var c=on(l);return c.documents=D0(this.collection,this.deletedField,c.documents),c.documents=await Promise.all(c.documents.map(u=>r(u))),c})),masterChangesSince:async(l,c)=>{if(!this.pull)return{checkpoint:null,documents:[]};for(var u=!1,d={};!u&&!this.isStopped();)try{d=await this.pull.handler(l,c),u=!0}catch(h){var f=ot("RC_PULL",{checkpoint:l,errors:qf(h).map(g=>Qk(g)),direction:"pull"});this.subjects.error.next(f),await qE(this.collection,xt(this.retryTime))}if(this.isStopped())return{checkpoint:null,documents:[]};var m=on(d);return m.documents=D0(this.collection,this.deletedField,m.documents),m.documents=await Promise.all(m.documents.map(h=>r(h))),m},masterWrite:async l=>{if(!this.push)return[];var c=!1;await Ql("preReplicationMasterWrite",{rows:l,collection:this.collection});var u=await Promise.all(l.map(async g=>(g.newDocumentState=await i(g.newDocumentState),g.newDocumentState===null?null:(g.assumedMasterState&&(g.assumedMasterState=await i(g.assumedMasterState)),this.deletedField!=="_deleted"&&(g.newDocumentState=KE(this.deletedField,g.newDocumentState),g.assumedMasterState&&(g.assumedMasterState=KE(this.deletedField,g.assumedMasterState))),g)))),d=u.filter(aj),f=null;for(d.length===0&&(c=!0,f=[]);!c&&!this.isStopped();)try{if(f=await this.push.handler(d),!Array.isArray(f))throw ot("RC_PUSH_NO_AR",{pushRows:l,direction:"push",args:{result:f}});c=!0}catch(g){var m=g.rxdb?g:ot("RC_PUSH",{pushRows:l,errors:qf(g).map(R=>Qk(R)),direction:"push"});this.subjects.error.next(m),await qE(this.collection,xt(this.retryTime))}if(this.isStopped())return[];await Ql("preReplicationMasterWriteDocumentsHandle",{result:f,collection:this.collection});var h=D0(this.collection,this.deletedField,xt(f));return h}}}),this.subs.push(this.internalReplicationState.events.error.subscribe(l=>{this.subjects.error.next(l)}),this.internalReplicationState.events.processed.down.subscribe(l=>this.subjects.received.next(l.document)),this.internalReplicationState.events.processed.up.subscribe(l=>{this.subjects.sent.next(l.newDocumentState)}),zj([this.internalReplicationState.events.active.down,this.internalReplicationState.events.active.up]).subscribe(([l,c])=>{var u=l||c;this.subjects.active.next(u)})),this.pull&&this.pull.stream$&&this.live&&this.subs.push(this.pull.stream$.subscribe({next:l=>{this.remoteEvents$.next(l)},error:l=>{this.subjects.error.next(l)}})),this.live||(await I0(this.internalReplicationState),await TE(this.internalReplicationState),await this.cancel()),this.callOnStart()}},t.isStopped=function(){return!!this.subjects.canceled.getValue()},t.awaitInitialReplication=async function(){return await this.startPromise,I0(xt(this.internalReplicationState))},t.awaitInSync=async function(){await this.startPromise,await I0(xt(this.internalReplicationState));for(var r=2;r>0;)r--,await this.collection.database.requestIdlePromise(),await TE(xt(this.internalReplicationState));return!0},t.reSync=function(){this.remoteEvents$.next("RESYNC")},t.emitEvent=function(r){this.remoteEvents$.next(r)},t.cancel=async function(){if(this.isStopped())return Po;var r=this.onCancel.map(i=>pH(i()));return this.internalReplicationState&&await NY(this.internalReplicationState),this.metaInstance&&r.push(xt(this.internalReplicationState).checkpointQueue.then(()=>xt(this.metaInstance).close())),this.subs.forEach(i=>i.unsubscribe()),this.subjects.canceled.next(!0),this.subjects.active.complete(),this.subjects.canceled.complete(),this.subjects.error.complete(),this.subjects.received.complete(),this.subjects.sent.complete(),Promise.all(r)},t.remove=async function(){await xt(this.metaInstance).remove();var r=await this.metaInfoPromise;await this.cancel(),await yY(this.collection,r.collectionName,r.schema)},e}();function OX({replicationIdentifier:e,collection:t,deletedField:n="_deleted",pull:r,push:i,live:o=!0,retryTime:s=1e3*5,waitForLeadership:a=!0,autoStart:l=!0}){if(Zu(RS),!r&&!i)throw ot("UT3",{collection:t.name,args:{replicationIdentifier:e}});var c=new TX(e,t,n,r,i,o,s,l);return jX(a,c),c}function jX(e,t){var n=e&&t.collection.database.multiInstance,r=n?t.collection.database.waitForLeadership():Wv;return r.then(()=>{t.isStopped()||t.autoStart&&t.start()})}var B0=Wv;async function LX(e){var t=e.database,n=Object.assign({},ES,t.cleanupPolicy?t.cleanupPolicy:{});await ZL(e,n),!e.destroyed&&(await eI(e,n),await IX(e,n))}async function ZL(e,t){await e.promiseWait(t.minimumCollectionAge),!e.destroyed&&t.waitForLeadership&&await e.database.waitForLeadership()}async function eI(e,t){for(var n=e.database,r=e.storageInstance,i=!1;!i&&!e.destroyed;){if(t.awaitReplicationsInSync){var o=PS.get(e);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(e.destroyed)return;B0=B0.then(async()=>e.destroyed?!0:(await n.requestIdlePromise(),r.cleanup(t.minimumDeletedTime))),i=await B0}}async function IX(e,t){for(;!e.destroyed;){if(await e.promiseWait(t.runEach),e.destroyed)return;await eI(e,t)}}var F0=Wv;async function MX(e){var t=e.collection,n=t.database,r=Object.assign({},ES,n.cleanupPolicy?n.cleanupPolicy:{});await ZL(t,r),!t.destroyed&&(await tI(e,r),await NX(e,r))}async function tI(e,t){for(var n=e.collection,r=n.database,i=!1;!i&&!n.destroyed;){if(t.awaitReplicationsInSync){var o=PS.get(n);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(n.destroyed)return;F0=F0.then(async()=>n.destroyed?!0:(await r.requestIdlePromise(),e._cleanup())),i=await F0}}async function NX(e,t){for(var n=e.collection;!n.destroyed;){if(await n.promiseWait(t.runEach),n.destroyed)return;await tI(e,t)}}var $X={name:"cleanup",rxdb:!0,prototypes:{RxCollection:e=>{e.cleanup=async function(t){var n=Object.assign({},ES,this.database.cleanupPolicy?this.database.cleanupPolicy:{});typeof t>"u"&&(t=n.minimumDeletedTime);for(var r=!1;!r&&!this.destroyed;)r=await this.storageInstance.cleanup(t)}}},hooks:{createRxCollection:{after:e=>{LX(e.collection)}},createRxState:{after:e=>{MX(e.state)}}}},AX=["__proto__","constructor","prototype"];function Wd(e,t){Object.keys(t).forEach(n=>{AX.includes(n)||(typeof e[n]>"u"?e[n]=t[n]:cf(t[n])?Wd(e[n],t[n]):e[n]=t[n])})}function cf(e){return e.toString()==="[object Object]"}var ry=function(){function e(n,r){if(this.options={},this._conditions={},this._fields={},this._path=r,n){var i=this;n.selector&&i.find(n.selector),n.limit&&i.limit(n.limit),n.skip&&i.skip(n.skip),n.sort&&n.sort.forEach(o=>i.sort(o))}}var t=e.prototype;return t.where=function(r,i){if(!arguments.length)return this;var o=typeof arguments[0];if(o==="string")return this._path=arguments[0],arguments.length===2&&(this._conditions[this._path]=arguments[1]),this;if(o==="object"&&!Array.isArray(arguments[0]))return this.merge(arguments[0]);throw xi("MQ1",{path:arguments[0]})},t.equals=function(r){this._ensurePath("equals");var i=this._path;return this._conditions[i]=r,this},t.eq=function(r){this._ensurePath("eq");var i=this._path;return this._conditions[i]=r,this},t.or=function(r){var i=this._conditions.$or||(this._conditions.$or=[]);return Array.isArray(r)||(r=[r]),i.push.apply(i,r),this},t.nor=function(r){var i=this._conditions.$nor||(this._conditions.$nor=[]);return Array.isArray(r)||(r=[r]),i.push.apply(i,r),this},t.and=function(r){var i=this._conditions.$and||(this._conditions.$and=[]);return Array.isArray(r)||(r=[r]),i.push.apply(i,r),this},t.mod=function(r,i){var o,s;arguments.length===1?(this._ensurePath("mod"),o=arguments[0],s=this._path):arguments.length===2&&!Array.isArray(arguments[1])?(this._ensurePath("mod"),o=arguments.slice(),s=this._path):arguments.length===3?(o=arguments.slice(1),s=arguments[0]):(o=arguments[1],s=arguments[0]);var a=this._conditions[s]||(this._conditions[s]={});return a.$mod=o,this},t.exists=function(r,i){var o,s;arguments.length===0?(this._ensurePath("exists"),o=this._path,s=!0):arguments.length===1?typeof arguments[0]=="boolean"?(this._ensurePath("exists"),o=this._path,s=arguments[0]):(o=arguments[0],s=!0):arguments.length===2&&(o=arguments[0],s=arguments[1]);var a=this._conditions[o]||(this._conditions[o]={});return a.$exists=s,this},t.elemMatch=function(r,i){if(arguments[0]===null)throw xi("MQ2");var o,s,a;if(typeof arguments[0]=="function")this._ensurePath("elemMatch"),s=this._path,o=arguments[0];else if(cf(arguments[0]))this._ensurePath("elemMatch"),s=this._path,a=arguments[0];else if(typeof arguments[1]=="function")s=arguments[0],o=arguments[1];else if(arguments[1]&&cf(arguments[1]))s=arguments[0],a=arguments[1];else throw xi("MQ2");o&&(a=new e,o(a),a=a._conditions);var l=this._conditions[s]||(this._conditions[s]={});return l.$elemMatch=a,this},t.sort=function(r){if(!r)return this;var i,o=typeof r;if(Array.isArray(r)){i=r.length;for(var s=0;sYE(this.options,d,r[d])),this}throw xi("MQ3",{args:arguments})},t.merge=function(r){if(!r)return this;if(!QE(r))throw xi("MQ4",{source:r});return r instanceof e?(r._conditions&&Wd(this._conditions,r._conditions),r._fields&&(this._fields||(this._fields={}),Wd(this._fields,r._fields)),r.options&&(this.options||(this.options={}),Wd(this.options,r.options)),r._distinct&&(this._distinct=r._distinct),this):(Wd(this._conditions,r),this)},t.find=function(r){return QE(r)&&this.merge(r),this},t._ensurePath=function(r){if(!this._path)throw ot("MQ5",{method:r})},t.toJSON=function(){var r={selector:this._conditions};return this.options.skip&&(r.skip=this.options.skip),this.options.limit&&(r.limit=this.options.limit),this.options.sort&&(r.sort=DX(this.options.sort)),{query:r,path:this._path}},e}();function DX(e){return Object.entries(e).map(([t,n])=>{var r=n===1?"asc":"desc",i={[t]:r};return i})}var nI=["limit","skip","maxScan","batchSize","comment"];nI.forEach(function(e){ry.prototype[e]=function(t){return this.options[e]=t,this}});var rI=["gt","gte","lt","lte","ne","in","nin","all","regex","size"];rI.forEach(function(e){ry.prototype[e]=function(){var t,n;arguments.length===1?(this._ensurePath(e),n=arguments[0],t=this._path):(n=arguments[1],t=arguments[0]);var r=this._conditions[t]===null||typeof this._conditions[t]=="object"?this._conditions[t]:this._conditions[t]={};if(e==="regex"){if(n instanceof RegExp)throw ot("QU16",{field:t,query:this._conditions});typeof n=="string"?r["$"+e]=n:(r["$"+e]=n.$regex,n.$options&&(r.$options=n.$options))}else r["$"+e]=n;return this}});function YE(e,t,n){if(Array.isArray(e.sort))throw xi("MQ6",{opts:e,field:t,value:n});if(n&&n.$meta){var r=e.sort||(e.sort={});r[t]={$meta:n.$meta};return}var i=String(n||1).toLowerCase();if(!/^(?:ascending|asc|descending|desc|1|-1)$/.test(i))throw Array.isArray(n)&&(n="["+n+"]"),xi("MQ7",{field:t,value:n});var o=e.sort||(e.sort={}),s=n.toString().replace("asc","1").replace("ascending","1").replace("desc","-1").replace("descending","-1");o[t]=parseInt(s,10)}function BX(e,t,n){if(e.sort=e.sort||[],!Array.isArray(e.sort))throw xi("MQ8",{opts:e,field:t,value:n});e.sort.push([t,n])}function QE(e){return e instanceof ry||cf(e)}function FX(e,t){return new ry(e,t)}var XE="queryBuilderPath";function zX(e,t,n){var r=FX(io(e.mangoQuery),e.other[XE]);r[t](n);var i=r.toJSON();return Fc(e.op,i.query,e.collection,{...e.other,[XE]:i.path})}function z0(e,t){e[t]=function(n){if(bn.isDevMode()&&this.op==="findByIds")throw ot("QU17",{collection:this.collection.name,query:this.mangoQuery});return zX(this,t,n)}}var UX={name:"query-builder",rxdb:!0,prototypes:{RxQuery(e){["where","equals","eq","or","nor","and","mod","exists","elemMatch","sort"].forEach(t=>{z0(e,t)}),nI.forEach(t=>{z0(e,t)}),rI.forEach(t=>{z0(e,t)})}}},WX=gL(),GX=function(e){function t(n,r,i){var o;return o=e.call(this,null,r)||this,o.id=n,o.parent=i,o}return bp(t,e),t}(WX),uf={get isLocal(){return!0},get allAttachments$(){throw ot("LD1",{document:this})},get primaryPath(){return"id"},get primary(){return this.id},get $(){var e=this,t=Ws(U1,this.parent);return e.parent.$.pipe(Gt(n=>n.documentId===this.primary),Gt(n=>n.isLocal),qt(n=>Uj(n)),qv(t.docCache.getLatestDocumentData(this.primary)),Qf((n,r)=>n._rev===r._rev),qt(n=>t.docCache.getCachedRxDocument(n)),oS(Jx))},get $$(){var e=this,t=U0(e),n=t.getReactivityFactory();return n.fromObservable(e.$,e.getLatest()._data,t)},get deleted$$(){var e=this,t=U0(e),n=t.getReactivityFactory();return n.fromObservable(e.deleted$,e.getLatest().deleted,t)},getLatest(){var e=Ws(U1,this.parent),t=e.docCache.getLatestDocumentData(this.primary);return e.docCache.getCachedRxDocument(t)},get(e){if(e="data."+e,!!this._data){if(typeof e!="string")throw xi("LD2",{objPath:e});var t=Ua(this._data,e);return t=bn.deepFreezeWhenDevMode(t),t}},get$(e){if(e="data."+e,bn.isDevMode()){if(e.includes(".item."))throw ot("LD3",{objPath:e});if(e===this.primaryPath)throw ot("LD4")}return this.$.pipe(qt(t=>t._data),qt(t=>Ua(t,e)),Qf())},get$$(e){var t=U0(this),n=t.getReactivityFactory();return n.fromObservable(this.get$(e),this.getLatest().get(e),t)},async incrementalModify(e){var t=await df(this.parent);return t.incrementalWriteQueue.addWrite(this._data,async n=>(n.data=await e(n.data,this),n)).then(n=>t.docCache.getCachedRxDocument(n))},incrementalPatch(e){return this.incrementalModify(t=>(Object.entries(e).forEach(([n,r])=>{t[n]=r}),t))},async _saveData(e){var t=await df(this.parent),n=this._data;e.id=this.id;var r=[{previous:n,document:e}];return t.storageInstance.bulkWrite(r,"local-document-save-data").then(i=>{if(i.error[0])throw i.error[0];var o=Oi(this.collection.schema.primaryPath,r,i)[0];e=on(e),e._rev=o._rev})},async remove(){var e=await df(this.parent),t=on(this._data);return t._deleted=!0,ey(e.storageInstance,{previous:this._data,document:t},"local-document-remove").then(n=>e.docCache.getCachedRxDocument(n))}},JE=!1,HX=()=>{if(!JE){JE=!0;var e=ty,t=Object.getOwnPropertyNames(e);t.forEach(r=>{var i=Object.getOwnPropertyDescriptor(uf,r);if(!i){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(uf,r,o)}});var n=r=>()=>{throw ot("LD6",{functionName:r})};["populate","update","putAttachment","getAttachment","allAttachments"].forEach(r=>uf[r]=n(r))}};function VX(e,t){HX();var n=new GX(e.id,e,t);return Object.setPrototypeOf(n,uf),n.prototype=uf,n}function U0(e){var t=e.parent;return HY(t)?t:t.database}var ag=new WeakMap,U1=new WeakMap;function ZE(e){var t=e.database?e.database:e,n=e.database?e.name:"",r=(async()=>{var i=await iI(t.token,t.storage,t.name,n,t.instanceCreationOptions,t.multiInstance);i=vS(t,i,oI);var o=new lL("id",t.eventBulks$.pipe(Gt(u=>{var d=!1;return(n===""&&!u.collectionName||n!==""&&u.collectionName===n)&&(d=!0),d&&u.events[0].isLocal}),qt(u=>u.events)),u=>VX(u,e)),s=new mL(i,"id",()=>{},()=>{}),a=await t.storageToken,l=i.changeStream().subscribe(u=>{for(var d=new Array(u.events.length),f=u.events,m=e.database?e.name:void 0,h=0;hn.storageInstance.close())}async function tR(e,t,n){var r=cc(10),i=await iI(r,e,t,n,{},!1);await i.remove()}function KX(e){return"plugin-local-documents-"+e}var oI=Vv({title:"RxLocalDocument",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:128},data:{type:"object",additionalProperties:!0}},required:["id","data"]});async function nR(e,t){var n=await df(this),r={id:e,data:t,_deleted:!1,_meta:Yu(),_rev:Do(),_attachments:{}};return ey(n.storageInstance,{document:r},"local-document-insert").then(i=>n.docCache.getCachedRxDocument(i))}function rR(e,t){return this.getLocal(e).then(n=>{if(n)return n.incrementalModify(()=>t);var r=this.insertLocal(e,t);return r})}async function iR(e){var t=await df(this),n=t.docCache,r=n.getLatestDocumentDataIfExists(e);return r?Promise.resolve(n.getCachedRxDocument(r)):Zv(t.storageInstance,e).then(i=>i?t.docCache.getCachedRxDocument(i):null)}function oR(e){return this.$.pipe(qv(null),ls(async t=>{if(t)return{changeEvent:t};var n=await this.getLocal(e);return{doc:n}}),ls(async t=>{if(t.changeEvent){var n=t.changeEvent;if(!n.isLocal||n.documentId!==e)return{use:!1};var r=await this.getLocal(e);return{use:!0,doc:r}}else return{use:!0,doc:t.doc}}),Gt(t=>t.use),qt(t=>t.doc))}var qX={name:"local-documents",rxdb:!0,prototypes:{RxCollection:e=>{e.insertLocal=nR,e.upsertLocal=rR,e.getLocal=iR,e.getLocal$=oR},RxDatabase:e=>{e.insertLocal=nR,e.upsertLocal=rR,e.getLocal=iR,e.getLocal$=oR}},hooks:{createRxDatabase:{before:e=>{e.creator.localDocuments&&ZE(e.database)}},createRxCollection:{before:e=>{e.creator.localDocuments&&ZE(e.collection)}},preDestroyRxDatabase:{after:e=>eR(e)},postDestroyRxCollection:{after:e=>eR(e)},postRemoveRxDatabase:{after:e=>tR(e.storage,e.databaseName,"")},postRemoveRxCollection:{after:e=>tR(e.storage,e.databaseName,e.collectionName)}},overwritable:{}};async function YX(e,t,n){var r=await e([t,n].join("|"))>await e([n,t].join("|"));return r}function W0(e,t,n){var r=n.id,i=Ln(e.response$.pipe(Gt(o=>o.peer===t),Gt(o=>o.response.id===r),qt(o=>o.response)));return e.send(t,n),i}const QX="modulepreload",XX=function(e){return"/"+e},sR={},JX=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.all(n.map(a=>{if(a=XX(a),a in sR)return;sR[a]=!0;const l=a.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${c}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":QX,l||(u.as="script",u.crossOrigin=""),u.href=a,s&&u.setAttribute("nonce",s),document.head.appendChild(u),l)return new Promise((d,f)=>{u.addEventListener("load",d),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};function kh(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var sI={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n=Math.floor,r=Math.abs,i=Math.pow;return function(){function o(s,a,l){function c(f,m){if(!a[f]){if(!s[f]){var h=typeof kh=="function"&&kh;if(!m&&h)return h(f,!0);if(u)return u(f,!0);var g=new Error("Cannot find module '"+f+"'");throw g.code="MODULE_NOT_FOUND",g}var R=a[f]={exports:{}};s[f][0].call(R.exports,function(b){var w=s[f][1][b];return c(w||b)},R,R.exports,o,s,a,l)}return a[f].exports}for(var u=typeof kh=="function"&&kh,d=0;d>16,L[N++]=255&k>>8,L[N++]=255&k;return A===2&&(k=g[_.charCodeAt(E)]<<2|g[_.charCodeAt(E+1)]>>4,L[N++]=255&k),A===1&&(k=g[_.charCodeAt(E)]<<10|g[_.charCodeAt(E+1)]<<4|g[_.charCodeAt(E+2)]>>2,L[N++]=255&k>>8,L[N++]=255&k),L}function d(_){return h[63&_>>18]+h[63&_>>12]+h[63&_>>6]+h[63&_]}function f(_,k,E){for(var P,I=[],A=k;AN?N:L+A));return P===1?(k=_[E-1],I.push(h[k>>2]+h[63&k<<4]+"==")):P===2&&(k=(_[E-2]<<8)+_[E-1],I.push(h[k>>10]+h[63&k>>4]+h[63&k<<2]+"=")),I.join("")}a.byteLength=function(_){var k=l(_),E=k[0],P=k[1];return 3*(E+P)/4-P},a.toByteArray=u,a.fromByteArray=m;for(var h=[],g=[],R=typeof Uint8Array>"u"?Array:Uint8Array,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=0,y=b.length;wS)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function h(S,O,D){return m(S),0>=S||O===void 0?u(S):typeof D=="string"?u(S).fill(O,D):u(S).fill(O)}function g(S){return m(S),u(0>S?0:0|_(S))}function R(S,O){if((typeof O!="string"||O==="")&&(O="utf8"),!d.isEncoding(O))throw new TypeError("Unknown encoding: "+O);var D=0|k(S,O),q=u(D),X=q.write(S,O);return X!==D&&(q=q.slice(0,X)),q}function b(S){for(var O=0>S.length?0:0|_(S.length),D=u(O),q=0;qO||S.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|S}function k(S,O){if(d.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||ee(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);var D=S.length,q=2>>1;case"base64":return Ze(S).length;default:if(X)return q?-1:Tt(S).length;O=(""+O).toLowerCase(),X=!0}}function E(S,O,D){var q=!1;if((O===void 0||0>O)&&(O=0),O>this.length||((D===void 0||D>this.length)&&(D=this.length),0>=D)||(D>>>=0,O>>>=0,D<=O))return"";for(S||(S="utf8");;)switch(S){case"hex":return je(this,O,D);case"utf8":case"utf-8":return ce(this,O,D);case"ascii":return V(this,O,D);case"latin1":case"binary":return se(this,O,D);case"base64":return le(this,O,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ge(this,O,D);default:if(q)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),q=!0}}function P(S,O,D){var q=S[O];S[O]=S[D],S[D]=q}function I(S,O,D,q,X){if(S.length===0)return-1;if(typeof D=="string"?(q=D,D=0):2147483647D&&(D=-2147483648),D=+D,me(D)&&(D=X?0:S.length-1),0>D&&(D=S.length+D),D>=S.length){if(X)return-1;D=S.length-1}else if(0>D)if(X)D=0;else return-1;if(typeof O=="string"&&(O=d.from(O,q)),d.isBuffer(O))return O.length===0?-1:A(S,O,D,q,X);if(typeof O=="number")return O&=255,typeof Uint8Array.prototype.indexOf=="function"?X?Uint8Array.prototype.indexOf.call(S,O,D):Uint8Array.prototype.lastIndexOf.call(S,O,D):A(S,[O],D,q,X);throw new TypeError("val must be string, number or Buffer")}function A(S,O,D,q,X){function pe(qe,bt){return Fe===1?qe[bt]:qe.readUInt16BE(bt*Fe)}var Fe=1,rt=S.length,Xe=O.length;if(q!==void 0&&(q=(q+"").toLowerCase(),q==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le")){if(2>S.length||2>O.length)return-1;Fe=2,rt/=2,Xe/=2,D/=2}var Oe;if(X){var et=-1;for(Oe=D;Oert&&(D=rt-Xe),Oe=D;0<=Oe;Oe--){for(var Rt=!0,tn=0;tnX&&(q=X)):q=X;var pe=O.length;q>pe/2&&(q=pe/2);for(var Fe,rt=0;rtpe&&(Fe=pe):rt===2?(Xe=S[X+1],(192&Xe)==128&&(Rt=(31&pe)<<6|63&Xe,127Rt||57343Rt&&(Fe=Rt)))}Fe===null?(Fe=65533,rt=1):65535>>10),Fe=56320|1023&Fe),q.push(Fe),X+=rt}return H(q)}function H(S){var O=S.length;if(O<=4096)return l.apply(String,S);for(var D="",q=0;qO)&&(O=0),(!D||0>D||D>q)&&(D=q);for(var X="",pe=O;peS)throw new RangeError("offset is not uint");if(S+O>D)throw new RangeError("Trying to access beyond buffer length")}function _e(S,O,D,q,X,pe){if(!d.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(O>X||OS.length)throw new RangeError("Index out of range")}function Ve(S,O,D,q){if(D+q>S.length)throw new RangeError("Index out of range");if(0>D)throw new RangeError("Index out of range")}function Pe(S,O,D,q,X){return O=+O,D>>>=0,X||Ve(S,O,D,4),Ue.write(S,O,D,q,23,4),D+4}function ct(S,O,D,q,X){return O=+O,D>>>=0,X||Ve(S,O,D,8),Ue.write(S,O,D,q,52,8),D+8}function ht(S){if(S=S.split("=")[0],S=S.trim().replace(W,""),2>S.length)return"";for(;S.length%4!=0;)S+="=";return S}function Te(S){return 16>S?"0"+S.toString(16):S.toString(16)}function Tt(S,O){O=O||1/0;for(var D,q=S.length,X=null,pe=[],Fe=0;FeD){if(!X){if(56319D){-1<(O-=3)&&pe.push(239,191,189),X=D;continue}D=(X-55296<<10|D-56320)+65536}else X&&-1<(O-=3)&&pe.push(239,191,189);if(X=null,128>D){if(0>(O-=1))break;pe.push(D)}else if(2048>D){if(0>(O-=2))break;pe.push(192|D>>6,128|63&D)}else if(65536>D){if(0>(O-=3))break;pe.push(224|D>>12,128|63&D>>6,128|63&D)}else if(1114112>D){if(0>(O-=4))break;pe.push(240|D>>18,128|63&D>>12,128|63&D>>6,128|63&D)}else throw new Error("Invalid code point")}return pe}function ut(S){for(var O=[],D=0;D(O-=2));++Fe)D=S.charCodeAt(Fe),q=D>>8,X=D%256,pe.push(X),pe.push(q);return pe}function Ze(S){return Ce.toByteArray(ht(S))}function yt(S,O,D,q){for(var X=0;X=O.length||X>=S.length);++X)O[X+D]=S[X];return X}function ee(S,O){return S instanceof O||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===O.name}function me(S){return S!==S}var Ce=o("base64-js"),Ue=o("ieee754");a.Buffer=d,a.SlowBuffer=function(S){return+S!=S&&(S=0),d.alloc(+S)},a.INSPECT_MAX_BYTES=50,a.kMaxLength=2147483647,d.TYPED_ARRAY_SUPPORT=function(){try{var S=new Uint8Array(1);return S.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},S.foo()===42}catch{return!1}}(),d.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){return d.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){return d.isBuffer(this)?this.byteOffset:void 0}}),typeof Symbol<"u"&&Symbol.species!=null&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),d.poolSize=8192,d.from=function(S,O,D){return f(S,O,D)},d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,d.alloc=function(S,O,D){return h(S,O,D)},d.allocUnsafe=function(S){return g(S)},d.allocUnsafeSlow=function(S){return g(S)},d.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==d.prototype},d.compare=function(S,O){if(ee(S,Uint8Array)&&(S=d.from(S,S.offset,S.byteLength)),ee(O,Uint8Array)&&(O=d.from(O,O.offset,O.byteLength)),!d.isBuffer(S)||!d.isBuffer(O))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===O)return 0;for(var D=S.length,q=O.length,X=0,pe=c(D,q);XO&&(S+=" ... "),""},d.prototype.compare=function(S,O,D,q,X){if(ee(S,Uint8Array)&&(S=d.from(S,S.offset,S.byteLength)),!d.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(O===void 0&&(O=0),D===void 0&&(D=S?S.length:0),q===void 0&&(q=0),X===void 0&&(X=this.length),0>O||D>S.length||0>q||X>this.length)throw new RangeError("out of range index");if(q>=X&&O>=D)return 0;if(q>=X)return-1;if(O>=D)return 1;if(O>>>=0,D>>>=0,q>>>=0,X>>>=0,this===S)return 0;for(var pe=X-q,Fe=D-O,rt=c(pe,Fe),Xe=this.slice(q,X),Oe=S.slice(O,D),et=0;et>>=0,isFinite(D)?(D>>>=0,q===void 0&&(q="utf8")):(q=D,D=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var X=this.length-O;if((D===void 0||D>X)&&(D=X),0D||0>O)||O>this.length)throw new RangeError("Attempt to write outside buffer bounds");q||(q="utf8");for(var pe=!1;;)switch(q){case"hex":return L(this,S,O,D);case"utf8":case"utf-8":return N(this,S,O,D);case"ascii":return F(this,S,O,D);case"latin1":case"binary":return z(this,S,O,D);case"base64":return K(this,S,O,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,S,O,D);default:if(pe)throw new TypeError("Unknown encoding: "+q);q=(""+q).toLowerCase(),pe=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},d.prototype.slice=function(S,O){var D=this.length;S=~~S,O=O===void 0?D:~~O,0>S?(S+=D,0>S&&(S=0)):S>D&&(S=D),0>O?(O+=D,0>O&&(O=0)):O>D&&(O=D),O>>=0,O>>>=0,D||Le(S,O,this.length);for(var q=this[S],X=1,pe=0;++pe>>=0,O>>>=0,D||Le(S,O,this.length);for(var q=this[S+--O],X=1;0>>=0,O||Le(S,1,this.length),this[S]},d.prototype.readUInt16LE=function(S,O){return S>>>=0,O||Le(S,2,this.length),this[S]|this[S+1]<<8},d.prototype.readUInt16BE=function(S,O){return S>>>=0,O||Le(S,2,this.length),this[S]<<8|this[S+1]},d.prototype.readUInt32LE=function(S,O){return S>>>=0,O||Le(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+16777216*this[S+3]},d.prototype.readUInt32BE=function(S,O){return S>>>=0,O||Le(S,4,this.length),16777216*this[S]+(this[S+1]<<16|this[S+2]<<8|this[S+3])},d.prototype.readIntLE=function(S,O,D){S>>>=0,O>>>=0,D||Le(S,O,this.length);for(var q=this[S],X=1,pe=0;++pe=X&&(q-=i(2,8*O)),q},d.prototype.readIntBE=function(S,O,D){S>>>=0,O>>>=0,D||Le(S,O,this.length);for(var q=O,X=1,pe=this[S+--q];0=X&&(pe-=i(2,8*O)),pe},d.prototype.readInt8=function(S,O){return S>>>=0,O||Le(S,1,this.length),128&this[S]?-1*(255-this[S]+1):this[S]},d.prototype.readInt16LE=function(S,O){S>>>=0,O||Le(S,2,this.length);var D=this[S]|this[S+1]<<8;return 32768&D?4294901760|D:D},d.prototype.readInt16BE=function(S,O){S>>>=0,O||Le(S,2,this.length);var D=this[S+1]|this[S]<<8;return 32768&D?4294901760|D:D},d.prototype.readInt32LE=function(S,O){return S>>>=0,O||Le(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},d.prototype.readInt32BE=function(S,O){return S>>>=0,O||Le(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},d.prototype.readFloatLE=function(S,O){return S>>>=0,O||Le(S,4,this.length),Ue.read(this,S,!0,23,4)},d.prototype.readFloatBE=function(S,O){return S>>>=0,O||Le(S,4,this.length),Ue.read(this,S,!1,23,4)},d.prototype.readDoubleLE=function(S,O){return S>>>=0,O||Le(S,8,this.length),Ue.read(this,S,!0,52,8)},d.prototype.readDoubleBE=function(S,O){return S>>>=0,O||Le(S,8,this.length),Ue.read(this,S,!1,52,8)},d.prototype.writeUIntLE=function(S,O,D,q){if(S=+S,O>>>=0,D>>>=0,!q){var X=i(2,8*D)-1;_e(this,S,O,D,X,0)}var pe=1,Fe=0;for(this[O]=255&S;++Fe>>=0,D>>>=0,!q){var X=i(2,8*D)-1;_e(this,S,O,D,X,0)}var pe=D-1,Fe=1;for(this[O+pe]=255&S;0<=--pe&&(Fe*=256);)this[O+pe]=255&S/Fe;return O+D},d.prototype.writeUInt8=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,1,255,0),this[O]=255&S,O+1},d.prototype.writeUInt16LE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,2,65535,0),this[O]=255&S,this[O+1]=S>>>8,O+2},d.prototype.writeUInt16BE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,2,65535,0),this[O]=S>>>8,this[O+1]=255&S,O+2},d.prototype.writeUInt32LE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,4,4294967295,0),this[O+3]=S>>>24,this[O+2]=S>>>16,this[O+1]=S>>>8,this[O]=255&S,O+4},d.prototype.writeUInt32BE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,4,4294967295,0),this[O]=S>>>24,this[O+1]=S>>>16,this[O+2]=S>>>8,this[O+3]=255&S,O+4},d.prototype.writeIntLE=function(S,O,D,q){if(S=+S,O>>>=0,!q){var X=i(2,8*D-1);_e(this,S,O,D,X-1,-X)}var pe=0,Fe=1,rt=0;for(this[O]=255&S;++peS&&rt===0&&this[O+pe-1]!==0&&(rt=1),this[O+pe]=255&(S/Fe>>0)-rt;return O+D},d.prototype.writeIntBE=function(S,O,D,q){if(S=+S,O>>>=0,!q){var X=i(2,8*D-1);_e(this,S,O,D,X-1,-X)}var pe=D-1,Fe=1,rt=0;for(this[O+pe]=255&S;0<=--pe&&(Fe*=256);)0>S&&rt===0&&this[O+pe+1]!==0&&(rt=1),this[O+pe]=255&(S/Fe>>0)-rt;return O+D},d.prototype.writeInt8=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,1,127,-128),0>S&&(S=255+S+1),this[O]=255&S,O+1},d.prototype.writeInt16LE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,2,32767,-32768),this[O]=255&S,this[O+1]=S>>>8,O+2},d.prototype.writeInt16BE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,2,32767,-32768),this[O]=S>>>8,this[O+1]=255&S,O+2},d.prototype.writeInt32LE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,4,2147483647,-2147483648),this[O]=255&S,this[O+1]=S>>>8,this[O+2]=S>>>16,this[O+3]=S>>>24,O+4},d.prototype.writeInt32BE=function(S,O,D){return S=+S,O>>>=0,D||_e(this,S,O,4,2147483647,-2147483648),0>S&&(S=4294967295+S+1),this[O]=S>>>24,this[O+1]=S>>>16,this[O+2]=S>>>8,this[O+3]=255&S,O+4},d.prototype.writeFloatLE=function(S,O,D){return Pe(this,S,O,!0,D)},d.prototype.writeFloatBE=function(S,O,D){return Pe(this,S,O,!1,D)},d.prototype.writeDoubleLE=function(S,O,D){return ct(this,S,O,!0,D)},d.prototype.writeDoubleBE=function(S,O,D){return ct(this,S,O,!1,D)},d.prototype.copy=function(S,O,D,q){if(!d.isBuffer(S))throw new TypeError("argument should be a Buffer");if(D||(D=0),q||q===0||(q=this.length),O>=S.length&&(O=S.length),O||(O=0),0O)throw new RangeError("targetStart out of bounds");if(0>D||D>=this.length)throw new RangeError("Index out of range");if(0>q)throw new RangeError("sourceEnd out of bounds");q>this.length&&(q=this.length),S.length-OX||q==="latin1")&&(S=X)}}else typeof S=="number"&&(S&=255);if(0>O||this.length>>=0,D=D===void 0?this.length:D>>>0,S||(S=0);var pe;if(typeof S=="number")for(pe=O;pe{g==="%%"||(m++,g==="%c"&&(h=m))}),d.splice(h,0,f)},a.save=function(d){try{d?a.storage.setItem("debug",d):a.storage.removeItem("debug")}catch{}},a.load=c,a.useColors=function(){return!!(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},a.storage=function(){try{return localStorage}catch{}}(),a.destroy=(()=>{let d=!1;return()=>{d||(d=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],a.log=console.debug||console.log||(()=>{}),s.exports=o("./common")(a);const{formatters:u}=s.exports;u.j=function(d){try{return JSON.stringify(d)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this)}).call(this,o("_process"))},{"./common":5,_process:12}],5:[function(o,s){s.exports=function(a){function l(d){function f(...g){if(!f.enabled)return;const R=f,b=+new Date,w=b-(m||b);R.diff=w,R.prev=m,R.curr=b,m=b,g[0]=l.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let y=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(k,E)=>{if(k==="%%")return"%";y++;const P=l.formatters[E];if(typeof P=="function"){const I=g[y];k=P.call(R,I),g.splice(y,1),y--}return k}),l.formatArgs.call(R,g),(R.log||l.log).apply(R,g)}let m,h=null;return f.namespace=d,f.useColors=l.useColors(),f.color=l.selectColor(d),f.extend=c,f.destroy=l.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>h===null?l.enabled(d):h,set:g=>{h=g}}),typeof l.init=="function"&&l.init(f),f}function c(d,f){const m=l(this.namespace+(typeof f>"u"?":":f)+d);return m.log=this.log,m}function u(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}return l.debug=l,l.default=l,l.coerce=function(d){return d instanceof Error?d.stack||d.message:d},l.disable=function(){const d=[...l.names.map(u),...l.skips.map(u).map(f=>"-"+f)].join(",");return l.enable(""),d},l.enable=function(d){l.save(d),l.names=[],l.skips=[];let f;const m=(typeof d=="string"?d:"").split(/[\s,]+/),h=m.length;for(f=0;f{l[d]=a[d]}),l.names=[],l.skips=[],l.formatters={},l.selectColor=function(d){let f=0;for(let m=0;mK&&!le.warned){le.warned=!0;var ce=new Error("Possible EventEmitter memory leak detected. "+le.length+" "+(N+" listeners added. Use emitter.setMaxListeners() to increase limit"));ce.name="MaxListenersExceededWarning",ce.emitter=L,ce.type=N,ce.count=le.length,a(ce)}return L}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(L,N,F){var z={fired:!1,wrapFn:void 0,target:L,type:N,listener:F},K=f.bind(z);return K.listener=F,z.wrapFn=K,K}function h(L,N,F){var z=L._events;if(z===void 0)return[];var K=z[N];return K===void 0?[]:typeof K=="function"?F?[K.listener||K]:[K]:F?w(K):R(K,K.length)}function g(L){var N=this._events;if(N!==void 0){var F=N[L];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}function R(L,N){for(var F=Array(N),z=0;zL||I(L))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+L+".");A=L}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(L){if(typeof L!="number"||0>L||I(L))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+L+".");return this._maxListeners=L,this},l.prototype.getMaxListeners=function(){return u(this)},l.prototype.emit=function(L){for(var N=[],F=1;FK)return this;K===0?F.shift():b(F,K),F.length===1&&(z[L]=F[0]),z.removeListener!==void 0&&this.emit("removeListener",L,le||N)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(L){var N,F,z;if(F=this._events,F===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[L]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete F[L]),this;if(arguments.length===0){var K,Z=Object.keys(F);for(z=0;z"u")return null;var a={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return a.RTCPeerConnection?a:null}},{}],9:[function(o,s,a){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */a.read=function(l,c,u,d,f){var m,h,g=8*f-d-1,R=(1<>1,w=-7,y=u?f-1:0,_=u?-1:1,k=l[c+y];for(y+=_,m=k&(1<<-w)-1,k>>=-w,w+=g;0>=-w,w+=d;0>1,E=f===23?i(2,-24)-i(2,-77):0,P=d?0:m-1,I=d?1:-1,A=0>c||c===0&&0>1/c?1:0;for(c=r(c),isNaN(c)||c===1/0?(g=isNaN(c)?1:0,h=_):(h=n(w(c)/b),1>c*(R=i(2,-h))&&(h--,R*=2),c+=1<=h+k?E/R:E*i(2,1-k),2<=c*R&&(h++,R/=2),h+k>=_?(g=0,h=_):1<=h+k?(g=(c*R-1)*i(2,f),h+=k):(g=c*i(2,k-1)*i(2,f),h=0));8<=f;l[u+P]=255&g,P+=I,g/=256,f-=8);for(h=h<=1.5*h?"s":"")}s.exports=function(f,m){m=m||{};var h=typeof f;if(h=="string"&&0 */let l;s.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window>"u"?a:window):c=>(l||(l=Promise.resolve())).then(c).catch(u=>setTimeout(()=>{throw u},0))}).call(this)}).call(this,typeof Sr>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Sr)},{}],14:[function(o,s){(function(a,l){(function(){var c=o("safe-buffer").Buffer,u=l.crypto||l.msCrypto;s.exports=u&&u.getRandomValues?function(d,f){if(d>4294967295)throw new RangeError("requested too many random bytes");var m=c.allocUnsafe(d);if(0"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Sr)},{_process:12,"safe-buffer":30}],15:[function(o,s){function a(h,g){h.prototype=Object.create(g.prototype),h.prototype.constructor=h,h.__proto__=g}function l(h,g,R){function b(y,_,k){return typeof g=="string"?g:g(y,_,k)}R||(R=Error);var w=function(y){function _(k,E,P){return y.call(this,b(k,E,P))||this}return a(_,y),_}(R);w.prototype.name=R.name,w.prototype.code=h,m[h]=w}function c(h,g){if(Array.isArray(h)){var R=h.length;return h=h.map(function(b){return b+""}),2h.length)&&(R=h.length),h.substring(R-g.length,R)===g}function f(h,g,R){return typeof R!="number"&&(R=0),!(R+g.length>h.length)&&h.indexOf(g,R)!==-1}var m={};l("ERR_INVALID_OPT_VALUE",function(h,g){return'The value "'+g+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,g,R){var b;typeof g=="string"&&u(g,"not ")?(b="must not be",g=g.replace(/^not /,"")):b="must be";var w;if(d(h," argument"))w="The ".concat(h," ").concat(b," ").concat(c(g,"type"));else{var y=f(h,".")?"property":"argument";w='The "'.concat(h,'" ').concat(y," ").concat(b," ").concat(c(g,"type"))}return w+=". Received type ".concat(typeof R),w},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),s.exports.codes=m},{}],16:[function(o,s){(function(a){(function(){function l(b){return this instanceof l?(f.call(this,b),m.call(this,b),this.allowHalfOpen=!0,void(b&&(b.readable===!1&&(this.readable=!1),b.writable===!1&&(this.writable=!1),b.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",c))))):new l(b)}function c(){this._writableState.ended||a.nextTick(u,this)}function u(b){b.end()}var d=Object.keys||function(b){var w=[];for(var y in b)w.push(y);return w};s.exports=l;var f=o("./_stream_readable"),m=o("./_stream_writable");o("inherits")(l,f);for(var h,g=d(m.prototype),R=0;R>>1,W|=W>>>2,W|=W>>>4,W|=W>>>8,W|=W>>>16,W++),W}function w(W,S){return 0>=W||S.length===0&&S.ended?0:S.objectMode?1:W===W?(W>S.highWaterMark&&(S.highWaterMark=b(W)),W<=S.length?W:S.ended?S.length:(S.needReadable=!0,0)):S.flowing&&S.length?S.buffer.head.data.length:S.length}function y(W,S){if(V("onEofChunk"),!S.ended){if(S.decoder){var O=S.decoder.end();O&&O.length&&(S.buffer.push(O),S.length+=S.objectMode?1:O.length)}S.ended=!0,S.sync?_(W):(S.needReadable=!1,!S.emittedReadable&&(S.emittedReadable=!0,k(W)))}}function _(W){var S=W._readableState;V("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(V("emitReadable",S.flowing),S.emittedReadable=!0,a.nextTick(k,W))}function k(W){var S=W._readableState;V("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(W.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,z(W)}function E(W,S){S.readingMore||(S.readingMore=!0,a.nextTick(P,W,S))}function P(W,S){for(;!S.reading&&!S.ended&&(S.length=S.length?(O=S.decoder?S.buffer.join(""):S.buffer.length===1?S.buffer.first():S.buffer.concat(S.length),S.buffer.clear()):O=S.buffer.consume(W,S.decoder),O}function Z(W){var S=W._readableState;V("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,a.nextTick(le,S,W))}function le(W,S){if(V("endReadableNT",W.endEmitted,W.length),!W.endEmitted&&W.length===0&&(W.endEmitted=!0,S.readable=!1,S.emit("end"),W.autoDestroy)){var O=S._writableState;(!O||O.autoDestroy&&O.finished)&&S.destroy()}}function ce(W,S){for(var O=0,D=W.length;O=S.highWaterMark)||S.ended))return V("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?Z(this):_(this),null;if(W=w(W,S),W===0&&S.ended)return S.length===0&&Z(this),null;var D=S.needReadable;V("need readable",D),(S.length===0||S.length-W"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Sr)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(o,s){function a(b,w){var y=this._transformState;y.transforming=!1;var _=y.writecb;if(_===null)return this.emit("error",new m);y.writechunk=null,y.writecb=null,w!=null&&this.push(w),_(b);var k=this._readableState;k.reading=!1,(k.needReadable||k.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Sr)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(o,s){(function(a){(function(){function l(I,A,L){return A in I?Object.defineProperty(I,A,{value:L,enumerable:!0,configurable:!0,writable:!0}):I[A]=L,I}function c(I,A){return{value:I,done:A}}function u(I){var A=I[g];if(A!==null){var L=I[k].read();L!==null&&(I[y]=null,I[g]=null,I[R]=null,A(c(L,!1)))}}function d(I){a.nextTick(u,I)}function f(I,A){return function(L,N){I.then(function(){return A[w]?void L(c(void 0,!0)):void A[_](L,N)},N)}}var m,h=o("./end-of-stream"),g=Symbol("lastResolve"),R=Symbol("lastReject"),b=Symbol("error"),w=Symbol("ended"),y=Symbol("lastPromise"),_=Symbol("handlePromise"),k=Symbol("stream"),E=Object.getPrototypeOf(function(){}),P=Object.setPrototypeOf((m={get stream(){return this[k]},next:function(){var I=this,A=this[b];if(A!==null)return Promise.reject(A);if(this[w])return Promise.resolve(c(void 0,!0));if(this[k].destroyed)return new Promise(function(z,K){a.nextTick(function(){I[b]?K(I[b]):z(c(void 0,!0))})});var L,N=this[y];if(N)L=new Promise(f(N,this));else{var F=this[k].read();if(F!==null)return Promise.resolve(c(F,!1));L=new Promise(this[_])}return this[y]=L,L}},l(m,Symbol.asyncIterator,function(){return this}),l(m,"return",function(){var I=this;return new Promise(function(A,L){I[k].destroy(null,function(N){return N?void L(N):void A(c(void 0,!0))})})}),m),E);s.exports=function(I){var A,L=Object.create(P,(A={},l(A,k,{value:I,writable:!0}),l(A,g,{value:null,writable:!0}),l(A,R,{value:null,writable:!0}),l(A,b,{value:null,writable:!0}),l(A,w,{value:I._readableState.endEmitted,writable:!0}),l(A,_,{value:function(N,F){var z=L[k].read();z?(L[y]=null,L[g]=null,L[R]=null,N(c(z,!1))):(L[g]=N,L[R]=F)},writable:!0}),A));return L[y]=null,h(I,function(N){if(N&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"){var F=L[R];return F!==null&&(L[y]=null,L[g]=null,L[R]=null,F(N)),void(L[b]=N)}var z=L[g];z!==null&&(L[y]=null,L[g]=null,L[R]=null,z(c(void 0,!0))),L[w]=!0}),I.on("readable",d.bind(null,L)),L}}).call(this)}).call(this,o("_process"))},{"./end-of-stream":24,_process:12}],22:[function(o,s){function a(y,_){var k=Object.keys(y);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(y);_&&(E=E.filter(function(P){return Object.getOwnPropertyDescriptor(y,P).enumerable})),k.push.apply(k,E)}return k}function l(y){for(var _,k=1;k>>0),E=this.head,P=0;E;)m(E.data,k,P),P+=E.data.length,E=E.next;return k}},{key:"consume",value:function(_,k){var E;return _I.length?I.length:_;if(P+=A===I.length?I:I.slice(0,_),_-=A,_===0){A===I.length?(++E,this.head=k.next?k.next:this.tail=null):(this.head=k,k.data=I.slice(A));break}++E}return this.length-=E,P}},{key:"_getBuffer",value:function(_){var k=g.allocUnsafe(_),E=this.head,P=1;for(E.data.copy(k),_-=E.data.length;E=E.next;){var I=E.data,A=_>I.length?I.length:_;if(I.copy(k,k.length-_,0,A),_-=A,_===0){A===I.length?(++P,this.head=E.next?E.next:this.tail=null):(this.head=E,E.data=I.slice(A));break}++P}return this.length-=P,k}},{key:w,value:function(_,k){return b(this,l({},k,{depth:0,customInspect:!1}))}}]),y}()},{buffer:3,util:2}],23:[function(o,s){(function(a){(function(){function l(d,f){u(d,f),c(d)}function c(d){d._writableState&&!d._writableState.emitClose||d._readableState&&!d._readableState.emitClose||d.emit("close")}function u(d,f){d.emit("error",f)}s.exports={destroy:function(d,f){var m=this,h=this._readableState&&this._readableState.destroyed,g=this._writableState&&this._writableState.destroyed;return h||g?(f?f(d):d&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,a.nextTick(u,this,d)):a.nextTick(u,this,d)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(d||null,function(R){!f&&R?m._writableState?m._writableState.errorEmitted?a.nextTick(c,m):(m._writableState.errorEmitted=!0,a.nextTick(l,m,R)):a.nextTick(l,m,R):f?(a.nextTick(c,m),f(R)):a.nextTick(c,m)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(d,f){var m=d._readableState,h=d._writableState;m&&m.autoDestroy||h&&h.autoDestroy?d.destroy(f):d.emit("error",f)}}}).call(this)}).call(this,o("_process"))},{_process:12}],24:[function(o,s){function a(f){var m=!1;return function(){if(!m){m=!0;for(var h=arguments.length,g=Array(h),R=0;Ry.length)throw new R("streams");var E,P=y.map(function(I,A){var L=Am){var h=f?d:"highWaterMark";throw new l(h,m)}return n(m)}return c.objectMode?16:16384}}},{"../../../errors":15}],28:[function(o,s){s.exports=o("events").EventEmitter},{events:7}],29:[function(o,s,a){a=s.exports=o("./lib/_stream_readable.js"),a.Stream=a,a.Readable=a,a.Writable=o("./lib/_stream_writable.js"),a.Duplex=o("./lib/_stream_duplex.js"),a.Transform=o("./lib/_stream_transform.js"),a.PassThrough=o("./lib/_stream_passthrough.js"),a.finished=o("./lib/internal/streams/end-of-stream.js"),a.pipeline=o("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(o,s,a){function l(f,m){for(var h in f)m[h]=f[h]}function c(f,m,h){return d(f,m,h)}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var u=o("buffer"),d=u.Buffer;d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?s.exports=u:(l(u,a),a.Buffer=c),c.prototype=Object.create(d.prototype),l(d,c),c.from=function(f,m,h){if(typeof f=="number")throw new TypeError("Argument must not be a number");return d(f,m,h)},c.alloc=function(f,m,h){if(typeof f!="number")throw new TypeError("Argument must be a number");var g=d(f);return m===void 0?g.fill(0):typeof h=="string"?g.fill(m,h):g.fill(m),g},c.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return d(f)},c.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return u.SlowBuffer(f)}},{buffer:3}],31:[function(o,s,a){function l(P){if(!P)return"utf8";for(var I;;)switch(P){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return P;default:if(I)return;P=(""+P).toLowerCase(),I=!0}}function c(P){var I=l(P);if(typeof I!="string"&&(k.isEncoding===E||!E(P)))throw new Error("Unknown encoding: "+P);return I||P}function u(P){this.encoding=c(P);var I;switch(this.encoding){case"utf16le":this.text=g,this.end=R,I=4;break;case"utf8":this.fillLast=h,I=4;break;case"base64":this.text=b,this.end=w,I=3;break;default:return this.write=y,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=k.allocUnsafe(I)}function d(P){return 127>=P?0:P>>5==6?2:P>>4==14?3:P>>3==30?4:P>>6==2?-1:-2}function f(P,I,A){var L=I.length-1;if(L=L)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1],A.slice(0,-1)}return A}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=P[P.length-1],P.toString("utf16le",I,P.length-1)}function R(P){var I=P&&P.length?this.write(P):"";if(this.lastNeed){var A=this.lastTotal-this.lastNeed;return I+this.lastChar.toString("utf16le",0,A)}return I}function b(P,I){var A=(P.length-I)%3;return A==0?P.toString("base64",I):(this.lastNeed=3-A,this.lastTotal=3,A==1?this.lastChar[0]=P[P.length-1]:(this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1]),P.toString("base64",I,P.length-A))}function w(P){var I=P&&P.length?this.write(P):"";return this.lastNeed?I+this.lastChar.toString("base64",0,3-this.lastNeed):I}function y(P){return P.toString(this.encoding)}function _(P){return P&&P.length?this.write(P):""}var k=o("safe-buffer").Buffer,E=k.isEncoding||function(P){switch(P=""+P,P&&P.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};a.StringDecoder=u,u.prototype.write=function(P){if(P.length===0)return"";var I,A;if(this.lastNeed){if(I=this.fillLast(P),I===void 0)return"";A=this.lastNeed,this.lastNeed=0}else A=0;return A"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Sr)},{}],"/":[function(o,s){function a(w){return w.replace(/a=ice-options:trickle\s\n/g,"")}function l(w){console.warn(w)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const c=o("debug")("simple-peer"),u=o("get-browser-rtc"),d=o("randombytes"),f=o("readable-stream"),m=o("queue-microtask"),h=o("err-code"),{Buffer:g}=o("buffer"),R=65536;class b extends f.Duplex{constructor(y){if(y=Object.assign({allowHalfOpen:!1},y),super(y),this._id=d(4).toString("hex").slice(0,7),this._debug("new peer %o",y),this.channelName=y.initiator?y.channelName||d(20).toString("hex"):null,this.initiator=y.initiator||!1,this.channelConfig=y.channelConfig||b.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},b.config,y.config),this.offerOptions=y.offerOptions||{},this.answerOptions=y.answerOptions||{},this.sdpTransform=y.sdpTransform||(_=>_),this.streams=y.streams||(y.stream?[y.stream]:[]),this.trickle=y.trickle===void 0||y.trickle,this.allowHalfTrickle=y.allowHalfTrickle!==void 0&&y.allowHalfTrickle,this.iceCompleteTimeout=y.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=y.wrtc&&typeof y.wrtc=="object"?y.wrtc:u(),!this._wrtc)throw h(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(_){return void this.destroy(h(_,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=_=>{this._onIceCandidate(_)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(_=>{this.destroy(h(_,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=_=>{this._setupData(_)},this.streams&&this.streams.forEach(_=>{this.addStream(_)}),this._pc.ontrack=_=>{this._onTrack(_)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(y){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof y=="string")try{y=JSON.parse(y)}catch{y={}}this._debug("signal()"),y.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),y.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(y.transceiverRequest.kind,y.transceiverRequest.init)),y.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(y.candidate):this._pendingCandidates.push(y.candidate)),y.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(y)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(_=>{this._addIceCandidate(_)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(_=>{this.destroy(h(_,"ERR_SET_REMOTE_DESCRIPTION"))}),y.sdp||y.candidate||y.renegotiate||y.transceiverRequest||this.destroy(h(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(y){const _=new this._wrtc.RTCIceCandidate(y);this._pc.addIceCandidate(_).catch(k=>{!_.address||_.address.endsWith(".local")?l("Ignoring unsupported ICE candidate."):this.destroy(h(k,"ERR_ADD_ICE_CANDIDATE"))})}send(y){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(y)}}addTransceiver(y,_){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(y,_),this._needsNegotiation()}catch(k){this.destroy(h(k,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:y,init:_}})}}addStream(y){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),y.getTracks().forEach(_=>{this.addTrack(_,y)})}}addTrack(y,_){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const k=this._senderMap.get(y)||new Map;let E=k.get(_);if(!E)E=this._pc.addTrack(y,_),k.set(_,E),this._senderMap.set(y,k),this._needsNegotiation();else throw E.removed?h(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):h(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(y,_,k){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const E=this._senderMap.get(y),P=E?E.get(k):null;if(!P)throw h(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");_&&this._senderMap.set(_,E),P.replaceTrack==null?this.destroy(h(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):P.replaceTrack(_)}removeTrack(y,_){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const k=this._senderMap.get(y),E=k?k.get(_):null;if(!E)throw h(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{E.removed=!0,this._pc.removeTrack(E)}catch(P){P.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(E):this.destroy(h(P,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(y){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),y.getTracks().forEach(_=>{this.removeTrack(_,y)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,m(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(y){this._destroy(y,()=>{})}_destroy(y,_){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",y&&(y.message||y)),m(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",y&&(y.message||y)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,y&&this.emit("error",y),this.emit("close"),_()}))}_setupData(y){if(!y.channel)return this.destroy(h(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=y.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=R),this.channelName=this._channel.label,this._channel.onmessage=k=>{this._onChannelMessage(k)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=k=>{const E=k.error instanceof Error?k.error:new Error(`Datachannel error: ${k.message} ${k.filename}:${k.lineno}:${k.colno}`);this.destroy(h(E,"ERR_DATA_CHANNEL"))};let _=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(_&&this._onChannelClose(),_=!0):_=!1},5e3)}_read(){}_write(y,_,k){if(this.destroyed)return k(h(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(y)}catch(E){return this.destroy(h(E,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>R?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=k):k(null)}else this._debug("write before connect"),this._chunk=y,this._cb=k}_onFinish(){if(!this.destroyed){const y=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?y():this.once("connect",y)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(y=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(y.sdp=a(y.sdp)),y.sdp=this.sdpTransform(y.sdp);const _=()=>{if(!this.destroyed){const k=this._pc.localDescription||y;this._debug("signal"),this.emit("signal",{type:k.type,sdp:k.sdp})}};this._pc.setLocalDescription(y).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?_():this.once("_iceComplete",_))}).catch(k=>{this.destroy(h(k,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(y=>{this.destroy(h(y,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(y=>{y.mid||!y.sender.track||y.requested||(y.requested=!0,this.addTransceiver(y.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(y=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(y.sdp=a(y.sdp)),y.sdp=this.sdpTransform(y.sdp);const _=()=>{if(!this.destroyed){const k=this._pc.localDescription||y;this._debug("signal"),this.emit("signal",{type:k.type,sdp:k.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(y).then(()=>{this.destroyed||(this.trickle||this._iceComplete?_():this.once("_iceComplete",_))}).catch(k=>{this.destroy(h(k,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(y=>{this.destroy(h(y,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(h(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const y=this._pc.iceConnectionState,_=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",y,_),this.emit("iceStateChange",y,_),(y==="connected"||y==="completed")&&(this._pcReady=!0,this._maybeReady()),y==="failed"&&this.destroy(h(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),y==="closed"&&this.destroy(h(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(y){const _=k=>(Object.prototype.toString.call(k.values)==="[object Array]"&&k.values.forEach(E=>{Object.assign(k,E)}),k);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(k=>{const E=[];k.forEach(P=>{E.push(_(P))}),y(null,E)},k=>y(k)):0{if(this.destroyed)return;const E=[];k.result().forEach(P=>{const I={};P.names().forEach(A=>{I[A]=P.stat(A)}),I.id=P.id,I.type=P.type,I.timestamp=P.timestamp,E.push(_(I))}),y(null,E)},k=>y(k)):y(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const y=()=>{this.destroyed||this.getStats((_,k)=>{if(this.destroyed)return;_&&(k=[]);const E={},P={},I={};let A=!1;k.forEach(N=>{(N.type==="remotecandidate"||N.type==="remote-candidate")&&(E[N.id]=N),(N.type==="localcandidate"||N.type==="local-candidate")&&(P[N.id]=N),(N.type==="candidatepair"||N.type==="candidate-pair")&&(I[N.id]=N)});const L=N=>{A=!0;let F=P[N.localCandidateId];F&&(F.ip||F.address)?(this.localAddress=F.ip||F.address,this.localPort=+F.port):F&&F.ipAddress?(this.localAddress=F.ipAddress,this.localPort=+F.portNumber):typeof N.googLocalAddress=="string"&&(F=N.googLocalAddress.split(":"),this.localAddress=F[0],this.localPort=+F[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let z=E[N.remoteCandidateId];z&&(z.ip||z.address)?(this.remoteAddress=z.ip||z.address,this.remotePort=+z.port):z&&z.ipAddress?(this.remoteAddress=z.ipAddress,this.remotePort=+z.portNumber):typeof N.googRemoteAddress=="string"&&(z=N.googRemoteAddress.split(":"),this.remoteAddress=z[0],this.remotePort=+z[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(k.forEach(N=>{N.type==="transport"&&N.selectedCandidatePairId&&L(I[N.selectedCandidatePairId]),(N.type==="googCandidatePair"&&N.googActiveConnection==="true"||(N.type==="candidatepair"||N.type==="candidate-pair")&&N.selected)&&L(N)}),!A&&(!Object.keys(I).length||Object.keys(P).length))return void setTimeout(y,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(F){return this.destroy(h(F,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const N=this._cb;this._cb=null,N(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};y()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>R)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(y=>{this._pc.removeTrack(y),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(y){this.destroyed||(y.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:y.candidate.candidate,sdpMLineIndex:y.candidate.sdpMLineIndex,sdpMid:y.candidate.sdpMid}}):!y.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),y.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(y){if(this.destroyed)return;let _=y.data;_ instanceof ArrayBuffer&&(_=g.from(_)),this.push(_)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const y=this._cb;this._cb=null,y(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(y){this.destroyed||y.streams.forEach(_=>{this._debug("on track"),this.emit("track",y.track,_),this._remoteTracks.push({track:y.track,stream:_}),this._remoteStreams.some(k=>k.id===_.id)||(this._remoteStreams.push(_),m(()=>{this._debug("on stream"),this.emit("stream",_)}))})}_debug(){const y=[].slice.call(arguments);y[0]="["+this._id+"] "+y[0],c.apply(null,y)}}b.WEBRTC_SUPPORT=!!u(),b.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},b.channelConfig={},s.exports=b},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})})(sI);var ZX=sI.exports;const eJ=Ga(ZX);var tJ=eJ;function G0(e,t){e.send(JSON.stringify(t))}var aI="signaling.rxdb.info",aR="wss://"+aI+"/",lR=!1,nJ=1e3*60*2;function rJ({signalingServerUrl:e,wrtc:t,config:n,webSocketConstructor:r}){iJ(),e=e||aR,r=r||WebSocket,e.includes(aI)&&!lR&&(lR=!0,console.warn(["RxDB Warning: You are using the RxDB WebRTC replication plugin","but you did not specify your own signaling server url.","By default it will use a signaling server provided by RxDB at "+aR,"This server is made for demonstration purposes and tryouts. It is not reliable and might be offline at any time.","In production you must always use your own signaling server instead.","Learn how to run your own server at https://rxdb.info/replication-webrtc.html","Also leave a ⭐ at the RxDB github repo 🙏 https://github.com/pubkey/rxdb 🙏"].join(" ")));var i=async o=>{var s=new Tn,a=new Tn,l=new Tn,c=new Tn,u=new Tn,d=new Map,f=!1,m,h=void 0;g(),(async()=>{for(;await cj(nJ/2),!f;)h&&G0(h,{type:"ping"})})();function g(){f||(h=new r(e),h.onclose=()=>g(),h.onopen=()=>{xt(h).onmessage=b=>{var w=JSON.parse(b.data);switch(w.type){case"init":m=w.yourPeerId,G0(xt(h),{type:"join",room:o.topic});break;case"joined":var y=function(k){var E=!1,P=new tJ({initiator:k>m,wrtc:t,config:n,trickle:!0});P.id=cc(10),d.set(k,P),P.on("signal",I=>{G0(xt(h),{type:"signal",senderPeerId:m,receiverPeerId:k,room:o.topic,data:I})}),P.on("data",I=>{I=JSON.parse(I.toString()),I.result?c.next({peer:P,response:I}):l.next({peer:P,message:I})}),P.on("error",I=>{u.next(ot("RC_WEBRTC_PEER",{error:I})),P.destroy(),E||(E=!0,a.next(P))}),P.on("connect",()=>{s.next(P)}),P.on("close",()=>{E||(E=!0,a.next(P)),y(k)})};w.otherPeerIds.forEach(k=>{k===m||d.has(k)||y(k)});break;case"signal":var _=Ws(d,w.senderPeerId);_.signal(w.data);break}}})}var R={error$:u,connect$:s,disconnect$:a,message$:l,response$:c,async send(b,w){await b.send(JSON.stringify(w))},destroy(){return f=!0,xt(h).close(),u.complete(),s.complete(),a.complete(),l.complete(),c.complete(),Ci}};return R};return i}function iJ(){if(typeof Eo>"u"||typeof Eo.nextTick!="function")throw ot("RC7")}async function oJ(e){var t=e.collection;Zu(RS),e.pull&&(e.pull.batchSize||(e.pull.batchSize=20)),e.push&&(e.push.batchSize||(e.push.batchSize=20)),t.database.multiInstance&&await t.database.waitForLeadership();var n=0,r=cc(10);function i(){var l=n++;return t.database.token+"|"+r+"|"+l}var o=await t.database.storageToken,s=new sJ(t,e,await e.connectionHandlerCreator(e));s.subs.push(s.connectionHandler.error$.subscribe(l=>s.error$.next(l)),s.connectionHandler.disconnect$.subscribe(l=>s.removePeer(l))),s.subs.push(s.connectionHandler.message$.pipe(Gt(l=>l.message.method==="token")).subscribe(l=>{s.connectionHandler.send(l.peer,{id:l.message.id,result:o})}));var a=s.connectionHandler.connect$.pipe(Gt(()=>!s.canceled)).subscribe(async l=>{if(e.isPeerValid){var c=await e.isPeerValid(l);if(!c)return}var u;try{var d=await W0(s.connectionHandler,l,{id:i(),method:"token",params:[]});u=d.result}catch(b){s.error$.next(ot("RC_WEBRTC_PEER",{error:b}));return}var f=await YX(t.database.hashFunction,o,u),m;if(f){var h=s.masterReplicationHandler,g=h.masterChangeStream$.subscribe(b=>{var w={id:"masterChangeStream$",result:b};s.connectionHandler.send(l,w)});s.subs.push(g,s.connectionHandler.disconnect$.pipe(Gt(b=>b===l)).subscribe(()=>g.unsubscribe()));var R=s.connectionHandler.message$.pipe(Gt(b=>b.peer===l),Gt(b=>b.message.method!=="token")).subscribe(async b=>{var{peer:w,message:y}=b,_=h[y.method].bind(h),k=await _(...y.params),E={id:y.id,result:k};s.connectionHandler.send(w,E)});s.subs.push(R)}else m=OX({replicationIdentifier:[t.name,e.topic,u].join("||"),collection:t,autoStart:!0,deletedField:"_deleted",live:!0,retryTime:e.retryTime,waitForLeadership:!1,pull:e.pull?Object.assign({},e.pull,{async handler(b){var w=await W0(s.connectionHandler,l,{method:"masterChangesSince",params:[b,xt(e.pull).batchSize],id:i()});return w.result},stream$:s.connectionHandler.response$.pipe(Gt(b=>b.response.id==="masterChangeStream$"),qt(b=>b.response.result))}):void 0,push:e.push?Object.assign({},e.push,{async handler(b){var w=await W0(s.connectionHandler,l,{method:"masterWrite",params:[b],id:i()});return w.result}}):void 0});s.addPeer(l,m)});return s.subs.push(a),s}var sJ=function(){function e(n,r,i){this.peerStates$=new ks(new Map),this.canceled=!1,this.subs=[],this.error$=new Tn,this.collection=n,this.options=r,this.connectionHandler=i,this.collection.onDestroy.push(()=>this.cancel()),this.masterReplicationHandler=MY(n.storageInstance,n.conflictHandler,n.database.token)}var t=e.prototype;return t.addPeer=function(r,i){var o={peer:r,replicationState:i,subs:[]};this.peerStates$.next(this.peerStates$.getValue().set(r,o)),i&&o.subs.push(i.error$.subscribe(s=>this.error$.next(s)))},t.removePeer=function(r){var i=Ws(this.peerStates$.getValue(),r);this.peerStates$.getValue().delete(r),this.peerStates$.next(this.peerStates$.getValue()),i.subs.forEach(o=>o.unsubscribe()),i.replicationState&&i.replicationState.cancel()},t.awaitFirstPeer=function(){return Ln(this.peerStates$.pipe(Gt(r=>r.size>0)))},t.cancel=async function(){this.canceled||(this.canceled=!0,this.subs.forEach(r=>r.unsubscribe()),Array.from(this.peerStates$.getValue().keys()).forEach(r=>{this.removePeer(r)}),await this.connectionHandler.destroy())},e}();Zu($X);Zu(UX);Zu(RS);Zu(qX);function aJ(e){return Promise.all(e.character_traits.map(t=>t.split(/[[\]]/)).map(async([t,n])=>{const r=await ln.character_traits.findOne(t.trim()).exec();return Object.assign({},r==null?void 0:r.toMutableJSON(),{parameter:n==null?void 0:n.trim()})}))}const lJ={expand:async function(){const e=await ln.getLocal("gbdata_meta"),[t,n]=await Promise.all([this.populate("character_plays").then(i=>i.map(o=>o.toMutableJSON())),aJ(this)]);return Object.assign({},this.toMutableJSON(),{character_plays:t,character_traits:n,_inf:this.id==="Pneuma"?0:void 0,statLine:`${this.jog}"/${this.sprint}" | ${this.tac} | ${this.kickdice}/${this.kickdist}" | ${this.def}+ | ${this.arm} | ${this.inf}/${this.infmax} | ${this.reach?2:1}"`,version:e==null?void 0:e.get("version")})}},cJ={title:"Guild Ball model",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:32},name:{type:"string"},captain:{type:"boolean",default:!1},mascot:{type:"boolean",default:!1},veteran:{type:"boolean",default:!1},seasoned:{type:"boolean",default:!1},hp:{type:"integer",minimum:0},recovery:{type:"integer",minimum:0},jog:{type:"integer",minimum:0},sprint:{type:"integer",minimum:0},tac:{type:"integer",minimum:1},kickdice:{type:"integer",minimum:1},kickdist:{type:"integer",minimum:0},def:{type:"integer",minimum:1,maximum:6},arm:{type:"integer",minimum:0},inf:{type:"integer",minimum:0},infmax:{type:"integer",minimum:0},reach:{type:"boolean",default:!1},benched:{type:"string"},dehcneb:{type:"string"},playbook:{type:"array",minItems:2,maxItems:2,items:{type:"array",minItems:7,maxItems:7,items:{type:["string","null"]}}},character_plays:{type:"array",ref:"character_plays",items:{type:"string"}},character_traits:{type:"array",ref:"character_traits",items:{type:"string"}},heroic:{type:"string"},legendary:{type:"string"},types:{type:"string"},base:{type:"integer",enum:[30,40,50]},guild1:{type:"string",maxLength:32},guild2:{type:"string",maxLength:32,default:""},gbcp:{type:"boolean",default:!1}},required:["name","hp","recovery","jog","sprint","tac","kickdice","kickdist","def","arm","inf","infmax","playbook","types","base","guild1"],indexes:["guild1","guild2"]},uJ={title:"Guild Ball guild",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:32},minor:{type:"boolean",default:!1},color:{type:"string"},shadow:{type:"string"},darkColor:{type:"string"},roster:{type:"array",items:{type:"string"}}},required:["color","roster"]},dJ={title:"Guild Ball character play",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:64},text:{type:"string"},CST:{type:["string","integer"]},RNG:{type:["string","integer"]},SUS:{type:"boolean",default:!1},OPT:{type:"boolean",default:!1}},required:["text","CST","RNG","SUS","OPT"]},fJ={title:"Guild Ball character trait",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:64},active:{type:"boolean",default:!1},text:{type:"string"}},required:["text"]},pJ={title:"Guild Ball Game State",version:0,primaryKey:"_id",type:"object",properties:{_id:{type:"string",maxLength:128},guild:{type:"string",ref:"guilds"},score:{type:"integer",minimum:0,default:0},momentum:{type:"integer",minimum:0,default:0},roster:{type:"array",items:{type:"object",properties:{name:{type:"string",ref:"models"},health:{type:"integer",minimum:0}},required:["name","health"]}},currentStep:{type:"string",enum:["Guilds","Draft","Game"]},navigateTo:{type:"string",enum:["Guilds","Draft","Game"]}}},ln=await WY({name:"gb_playbook",localDocuments:!0,storage:xX()});await ln.addCollections({guilds:{schema:uJ},models:{schema:cJ,methods:lJ},character_plays:{schema:dJ},character_traits:{schema:fJ},game_state:{schema:pJ,localDocuments:!0}});const hJ={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]},{urls:["turn:standard.relay.metered.ca:80","turn:standard.relay.metered.ca:80?transport=tcp","turn:standard.relay.metered.ca:443","turns:standard.relay.metered.ca:443?transport=tcp"],username:"25ee3bdfcc273a8e3ae9db71",credential:"XVIpxKTNnMR7XQDK"}]};function TS(e,t){return oJ({collection:ln.game_state,connectionHandlerCreator:rJ({signalingServerUrl:e,config:hJ}),topic:t,pull:{},push:{}}).then(n=>(n.error$.subscribe(r=>{console.log("replication error:"),console.dir(r)}),n.peerStates$.subscribe(r=>{console.log("new peer states:"),console.dir(r)}),n))}const lI=C.createContext({}),mJ=e=>{const t=C.useMemo(()=>ln.getLocal$("settings"),[]);return C.useEffect(()=>{if(!t)return;const n=t.subscribe(r=>{if(!r){ln==null||ln.upsertLocal("settings",cI).catch(console.error);return}});return()=>n.unsubscribe()},[t]),v.jsx(lI.Provider,{value:{setting$:t},children:e.children})},ui=()=>C.useContext(lI),cI={dataSet:"GB-Playbook-4-6.json",language:"auto",initialScreen:"/game",gameSize:6,networkPlay:!1,uiPreferences:{displayStatLine:!1},cardPreferences:{preferredStyle:"gbcp"},gamePlayRoute:"/game",libraryRoute:"/library"},OS=C.createContext(null),fs=e=>{const t=C.useContext(OS);return v.jsx(Ox,{container:t,children:e.children})},gJ=jt.forwardRef((e,t)=>v.jsx(yF,{position:"static",className:"no-print",children:v.jsxs(_F,{variant:"dense",children:[v.jsx(rn,{ref:t,sx:{display:"flex",flexDirection:"row",width:"100%"}}),v.jsx(Fo,{size:"small",color:"inherit",onClick:e.onClick,children:v.jsx(EO,{})})]})})),cR=jt.forwardRef((e,t)=>{const{href:n,...r}=e;return v.jsx(_T,{ref:t,to:n,...r,role:void 0})}),vJ=Sx({palette:{mode:"dark",primary:{main:"#3d708f"},secondary:{main:"#ffb300"},background:{default:"#121a22"}},components:{MuiCssBaseline:{styleOverrides:{body:{background:"linear-gradient(120deg, black, #221a22, #5f405f, #221a22, black)"},"@media print":{body:{background:"white"}}}},MuiLink:{defaultProps:{component:cR}},MuiButtonBase:{defaultProps:{LinkComponent:cR}}}}),Eh=e=>v.jsx(TD,{to:e.to,style:{textDecoration:"inherit",color:"inherit"},onClick:e.onClick,children:({isActive:t})=>v.jsx(rz,{selected:t,children:e.children})}),yJ=()=>{const[e,t]=C.useState(null),[n,r]=C.useState(!1);return v.jsxs(Cz,{theme:vJ,children:[v.jsx(sW,{}),v.jsxs("div",{className:"App",children:[v.jsx(gJ,{ref:i=>t(i),onClick:()=>r(!0)}),v.jsx(bJ,{drawer:n,setDrawer:r}),v.jsx(OS.Provider,{value:e,children:v.jsx(nx,{})})]})]})};function bJ(e){const{drawer:t,setDrawer:n}=e,{setting$:r}=ui(),[i,o]=C.useState(),[s,a]=C.useState();return C.useEffect(()=>{const l=r==null?void 0:r.pipe(qt(u=>u==null?void 0:u.toJSON().data.gamePlayRoute)).subscribe(u=>o(u)),c=r==null?void 0:r.pipe(qt(u=>u==null?void 0:u.toJSON().data.libraryRoute)).subscribe(u=>a(u));return()=>{l==null||l.unsubscribe(),c==null||c.unsubscribe()}}),v.jsxs(V6,{anchor:"right",open:t,onClose:()=>n(!1),PaperProps:{sx:{width:"275px"}},ModalProps:{keepMounted:!0},children:[v.jsxs(rf,{children:[v.jsxs(wo,{children:[v.jsx("img",{src:new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAJaUlEQVRYR+2YeVjVVRrHP3fj3ssqYCwqoA5iYvloljbYOE8GqOk8hDpZrizqkE5mapmKWGJj82SFKYwLomTpqJTmxthoY5lLZW65IEEsAgKxidcLd4E7zzkoiVzF0uqPmXMf/uD3u+fc7/m+3+973vcoxm2IsnEvhgIaLY0Ufp2P1WxFoVDci1VR/B/gXfL4izDYYGmQIbbZ7l499xQgVsj/6nvqjHWoVWo0ag0NjQ13xeE9A6hUKjBcNVJ2ogQ3nRtGk5HK2iqc9U6/PUClQkmdpY6e3sFM6DOOLj6dMZgMpO1YT/rudHRa3c8O910zqECB1daAi4MTb0cuRWlV8P4H7xPy+xB6PtCTWe/OZt+xT3FxdKaxsfEns3nXAAV7BvNVHunUl1fCXuLFmS+S9E4SQUFBnM86z47PdzB/1QI8XD1+lh7vGKBw5fUP2BD+FC4VzwXAR/36MTv0RSZOnMimjZvo0KEDBQUF7D68h7kp81oAFLPF3DtxeZsABUONtkZMVhPWxgZstkYJVKlU4qByQKvWcsVsoH+nR3gpdCYxsTGsS1tH586dycvLY+ehXcxcNgsnnTPWBosMsUqlQuegw0HtINe+HdBbApRHlQ3Jjk6txd/NDz/3TrjqXTFbLZTVlpFfXUB1XTXmBgsDuzzGrCdmEB0Tzfp16wkICCA/P5+dX+xixdZk+vfsRzsXd8wWM4VlhWQVZFFe/YN0uVqtvqU+7QIUrFkaLHJ3A7v+gcg+Efg6+9gV+KfZB/jgm00EtPMnYej8ZoBdu3bl7JmzoEKydfMQrt/0r3+SnvkeBqMBR52jXY22AiiYszRY0Wt0THssjr5+D1FeWs6GjRs4dPgwZWVl6HQ6evYIJvKpSB4f9DhXrUYOZR8mPDi0VYhN9SY2btrI3r17KSouknMffOBBxo8bx0N9+5JXkiedXlBaiF6nb8VkK4DX9TA/9BV6+N7P8uQVvLpwIVWVVXYZfHLYk6SlpuHt4y3fT4qdxNq0tQQHB7Ny5Uri4uI4d+5cq7mCiKnTprJi+QqKyouISozmitEgw32jJlsAFKG9YrpCbP9ohvUcSuLriSTEJ8jFu/h1IjwiEqeOfpiMRrIPH+Tf+/fLd926dePAgQP4+voSHR1Neno6Hh4e1NXVyb/Q0FDCwsJwdnaWYDMyMmQkxIiOiSFt7Voyj2QyJ3kurs6uLVhsBih2ZLaa8XH25u0Rb3L0yFEGDBggF4kYEs5TS5LI0jgzwNudK/Vmgh017Exdxd8S4qk3mYiIiGD79u1MmDCBDRs2SJcLJtLS0oiKimrB4MWLFxk7diwHDx6UzzMzMxkyZAij458lpygHvVYv9S9GM0CVQsXl+ss83XsUz/YdzfA/DWfPrj0EBvgze1smju3v49KlUiorayi+WIyXWskLTw1l6avzWb78XbmYSCtLly4lOTlZ/h8fH09iYiJWq7UZoACt0WioqKigV69elJaWSh3v37ef1dvXsGzrcjxc3WloaCoymgHKE8Fk4LVhCfzOqSuduvhRVVHJ9JfnED57Pp9/+Q1FpT/gpVLygKcrLiYTaqMRn473MezpEdRU10jN5eTkSJBubm5kZ2fj6ekpk7lg9Powm804ODgwb948lixZgru7O8VFxZwpPMuk1yfj4uTSHOYWGhQhXjb6bYxFVwnsHihDFL/8HwQ+OpBTJ7+lt7cnTqZ6qvMKqLmQg8OVWob+ZSKjZ8/gxIkTzJkzR+5cAOzTpw/Hjx+3ayzBqEjW27ZtY+TIkSiUCnKzc1G5qhjx8ii0Gu21s+oGBsVKFquF5c8kUZ1XRffg7k1hWrKUkD8+gflSCUVnzmP4Pg+9wYCvV3t8vTwJCnucoTOe5/ixYxKgYOuNN96gd+/eEqC93uRmgILdnOwclC4qRs75iQCfi5vK+BHP8PWO3SgrKvHz9cLT3Q1NRQWqgkLcpk2m//ix1JSXk5KSIpmZMmUKrq6uMsTt27dvFWKLxSJ1OHfuXLkZIYOii0WcyjvN5CVTcHX60cktQnwzg6IvC+jalc1Ll6E3XOVyXj6qsjKsF7LRqtX0+2scr+zfy9+TkiTbp06dQqfX0T3oGvvXTCIAXWfSnkmGDB3Cnt17SM5IIWXbSvsmsRdiQb2o4cJCQ1m94FU8KyqpPXwUtwB/VI560msqmB4fj6W+noEDB/LZZ59JoJGRkTLlaLVaaZyb00xJSQljxoxp/r5INyEDQhg192l5TmsdtM3J+rYMih/z8fGRqaBDgD+jnxyGv5MLRoWN/V9+yacij9lsMpxHjh4hMDBQ5q/L1ZdlDs3NzZWABw8ezKBBg2SizsrK4sMPP0SAFGNBwgIWvbaIzfu2sHj967RzbtfiTL41wJ7dZTWzatUqRGJdvHixXUfe36MH69evo3+//qT8ZxXfncvmnWlvUVxczMSoKPbv22d3nkgtCQsTmPHCDE5/d5rn3pwmNyfSXVO12TTaBJiamkpsbCxfHf2KLRmbOXnyJCaTiQ4dOxIeFk70hGiUGiWbjm/moxPbyPniOwY/HE5i3CI0Kg2ffPIJH3/8MVkXshCFg7e3NyEhIYwfNx4vby8OnT5E/OoEDMaraDVN9eGNo02Aq1evJiYmBpvKhhp1KzbOl2ex5ZsMTpd+i16pp+hYIZVVlXTz70bM8GiGDxhml8GCsgLSd73Hji92NhW/ApydnqVNgGtWr2HS5EnM+mgOLjpn/D38UCs11Birya8qpKi2WFbZjlpHeScj7mZsVhv15npZnHZo70uQXxAdvTpKENW11eQWf09OcQ7GeqNMKWLcqqpuE2DqmlRiJ8Xy3JbnKaktQa1UN2tFNOei5BctQKP43HB5pFKqZGoxWUyYzKZm4YtnoqEXRaz4TluNvV2AlbkVBPcKloJNXpHMlLgpTN86k8q6SrRqB2FcKeTrzU+Tmu3fbslm61rDdT3Wgq2btWZXBzeaRLAgGqOkP79FY5WVTv5+ck7G1q2MHDWKqVumy/5D7N5uOH7p6zeVQkmtycD4h8cQ2StCuu/SpUuyjbxQns3CzEWyi7sxBbS0269wPyiYEWGd2G8cTwQNkr9/pvQsqw6lUmGokGnjNwUoxW5rpN5qwkPvLg1RVVclTXDL0DZn1F+BwSatN4latJ2CLY1SIw3Q5i3AL63Bm10kgMr8dMOxcyun3c7Ft51zBy/bvPq4gzWuHZq/UojvGFBryv83b/n/CxJONjR0KMriAAAAAElFTkSuQmCC",import.meta.url).href,style:{borderRadius:5.4},alt:""}),v.jsx(Ss,{style:{textAlign:"center"},children:v.jsx(_t,{variant:"h6",fontFamily:"Comfortaa",children:"GB Playbook"})})]}),v.jsx(Lo,{}),v.jsx(Eh,{to:i??"/game",onClick:()=>n(!1),children:v.jsx(Ss,{children:"Game Play"})}),v.jsx(Eh,{to:s??"/library",onClick:()=>n(!1),children:v.jsx(Ss,{children:"Library"})}),v.jsx(Eh,{to:"/print",onClick:()=>n(!1),children:v.jsx(Ss,{children:"Card Printer"})}),v.jsx(Eh,{to:"/settings",onClick:()=>n(!1),children:v.jsx(Ss,{children:"Settings"})}),v.jsx("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"1em"},children:v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://github.com/cleech/GBPlaybook/blob/pwa/README.md",children:"About"})})})]}),v.jsx(Lo,{}),v.jsxs(rf,{children:[v.jsx(wo,{children:v.jsx(Ss,{children:"Rules Documents:"})}),v.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-Rulebook-4.1.pdf",children:"Season 4 Core Rulebook"})}),v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-FAQ-19-12-20.pdf",children:"Season 4 FAQ"})}),v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-RegionalCup-Rules-200128__1.pdf",children:"Organized Play Rules"})})]})]}),v.jsx(Lo,{}),v.jsxs(rf,{children:[v.jsx(wo,{children:v.jsx(Ss,{children:"Community Links:"})}),v.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://steamforged.com/pages/guild-ball",children:"Steamforged Games"})}),v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://discord.gg/fvpFSfm976",children:"Guild Ball Community Project"})}),v.jsx(wo,{disablePadding:!0,children:v.jsx(ko,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://www.longshanks.org/systems/guildball/",children:"Longshanks"})})]})]})]})}const wJ=Wn(v.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),xJ=Wn([v.jsx("path",{d:"M5 19h14V5H5zM16.5 6c.83 0 1.5.67 1.5 1.5S17.33 9 16.5 9 15 8.33 15 7.5 15.67 6 16.5 6m0 9c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5M12 10.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5M7.5 6C8.33 6 9 6.67 9 7.5S8.33 9 7.5 9 6 8.33 6 7.5 6.67 6 7.5 6m0 9c.83 0 1.5.67 1.5 1.5S8.33 18 7.5 18 6 17.33 6 16.5 6.67 15 7.5 15",opacity:".3"},"0"),v.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14z"},"1"),v.jsx("circle",{cx:"7.5",cy:"16.5",r:"1.5"},"2"),v.jsx("circle",{cx:"7.5",cy:"7.5",r:"1.5"},"3"),v.jsx("circle",{cx:"12",cy:"12",r:"1.5"},"4"),v.jsx("circle",{cx:"16.5",cy:"16.5",r:"1.5"},"5"),v.jsx("circle",{cx:"16.5",cy:"7.5",r:"1.5"},"6")],"CasinoTwoTone"),uI=Wn([v.jsx("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m-2 13-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9z",opacity:".3"},"0"),v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"},"1")],"CheckCircleTwoTone"),jS=Wn(v.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),dc=Wn(v.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),SJ=Wn(v.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),_J=Wn(v.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),CJ=Wn(v.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"}),"Sync"),kJ=new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1});function am(e){return e===0?1:e*am(e-1)}function EJ(e,t,n){if(!e||!t)return[];const r=t,o=1-Math.pow((e-1)/6,n?2:1),s=[...Array(t).keys()].map(l=>l+1).map(l=>am(r)/(am(l)*am(r-l))*Math.pow(o,l)*Math.pow(1-o,r-l));return[...Array(t).keys()].map(l=>s.slice(l).reduce((c,u)=>c+u,0)).map(l=>Math.min(l,.999))}function uR(e){const{value:t,setValue:n,clamp:r}=e;return v.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v.jsxs(Vf,{size:"small",variant:"contained",children:[v.jsx(yn,{onClick:i=>{i.stopPropagation(),r(t-1)&&n(t-1)},children:v.jsx(SJ,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(yn,{disabled:!0,size:"small",children:v.jsx(_t,{variant:"body2",color:"text.primary",children:t})}),v.jsx(yn,{onClick:i=>{i.stopPropagation(),r(t+1)&&n(t+1)},children:v.jsx(wJ,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function RJ(){const[e,t]=C.useState(null),n=!!e,[r,i]=C.useState(4),[o,s]=C.useState(4),[a,l]=C.useState(!1);return v.jsxs(v.Fragment,{children:[v.jsx(Fo,{size:"small",onClick:c=>{t(e?null:c.currentTarget)},children:v.jsx(xJ,{})}),v.jsxs(Uv,{open:n,anchorEl:e,onClose:()=>{t(null)},children:[v.jsx(_t,{variant:"h5",textAlign:"center",children:"Dice Odds"}),v.jsx(Lo,{}),v.jsxs("div",{style:{margin:"1em",display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.5em"},children:[v.jsx(_t,{children:"Target Number :"}),v.jsx(uR,{value:r,setValue:i,clamp:c=>c>1&&c<7}),v.jsx(_t,{children:"Dice Pool :"}),v.jsx(uR,{value:o,setValue:s,clamp:c=>c>0}),v.jsx(_t,{children:"Reroll :"}),v.jsx(Is,{checked:a,onChange:(c,u)=>{l(u)},sx:{padding:0}})]}),v.jsx(Lo,{}),v.jsxs("div",{style:{margin:"1em",display:"grid",gap:"0em 1em",justifyContent:"center",justifyItems:"center",gridTemplateColumns:"auto auto"},children:[v.jsx(_t,{sx:{textDecoration:"underline"},children:"Hits"}),v.jsx(_t,{sx:{textDecoration:"underline"},children:"Chance"}),EJ(r,o,a).map((c,u)=>v.jsxs(C.Fragment,{children:[v.jsxs("div",{children:[u+1,"+"]}),v.jsx("div",{className:`dice-bin-${Math.floor(c*10)}`,style:{padding:"0 1em",margin:"1px",width:"100%"},children:kJ.format(c)})]},u))]})]})]})}const PJ={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class lg{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||PJ,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[a,l]=s;for(let c=0;c{let[a,l]=s;for(let c=0;c{e=r,t=i});return n.resolve=e,n.reject=t,n}function dR(e){return e==null?"":""+e}function TJ(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const OJ=/###/g;function ff(e,t,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(OJ,"."):a}function i(){return!e||typeof e=="string"}const o=typeof t!="string"?t:t.split(".");let s=0;for(;s":">",'"':""","'":"'","/":"/"};function MJ(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>IJ[t]):e}class NJ{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const $J=[" ",",","?","!",";"],AJ=new NJ(20);function DJ(e,t,n){t=t||"",n=n||"";const r=$J.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=AJ.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}function W1(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;o-1&&l0?e.replace("_","-"):e}class pR extends iy{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&o?a.push(...r.split(o)):a.push(r)));const l=cg(this.data,a);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),l||!s||typeof r!="string"?l:W1(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),fR(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let l=cg(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?dI(l,r,o):l={...l,...r},fR(this.data,a,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var fI={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,i))}),t}};const hR={};class dg extends iy{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),TJ(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ts.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!DJ(t,r,i);if(s&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:o};const c=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),t=c.join(i)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const _=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${_}${s}`,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${_}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const d=this.resolve(t,n);let f=d&&d.res;const m=d&&d.usedKey||s,h=d&&d.exactUsedKey||s,g=Object.prototype.toString.apply(f),R=["[object Number]","[object Function]","[object RegExp]"],b=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&R.indexOf(g)<0&&!(typeof b=="string"&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,f,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(d.res=_,d.usedParams=this.getUsedParamsDetails(n),d):_}if(o){const _=Array.isArray(f),k=_?[]:{},E=_?h:m;for(const P in f)if(Object.prototype.hasOwnProperty.call(f,P)){const I=`${E}${o}${P}`;k[P]=this.translate(I,{...n,joinArrays:!1,ns:a}),k[P]===I&&(k[P]=f[P])}f=k}}else if(w&&typeof b=="string"&&Array.isArray(f))f=f.join(b),f&&(f=this.extendTranslation(f,t,n,r));else{let _=!1,k=!1;const E=n.count!==void 0&&typeof n.count!="string",P=dg.hasDefaultValue(n),I=E?this.pluralResolver.getSuffix(c,n.count,n):"",A=n.ordinal&&E?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",L=E&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),N=L&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${I}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(f)&&P&&(_=!0,f=N),this.isValidLookup(f)||(k=!0,f=s);const z=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:f,K=P&&N!==f&&this.options.updateMissing;if(k||_||K){if(this.logger.log(K?"updateKey":"missingKey",c,l,s,K?N:f),o){const H=this.resolve(s,{...n,keySeparator:!1});H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Z=[];const le=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&le&&le[0])for(let H=0;H{const je=P&&se!==f?se:z;this.options.missingKeyHandler?this.options.missingKeyHandler(H,l,V,je,K,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(H,l,V,je,K,n),this.emit("missingKey",H,l,V,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?Z.forEach(H=>{const V=this.pluralResolver.getSuffixes(H,n);L&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(se=>{ce([H],s+se,n[`defaultValue${se}`]||N)})}):ce(Z,s,N))}f=this.extendTranslation(f,t,n,d,r),k&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(k||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,_?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=t.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language,r),c){const f=t.match(this.interpolator.nestingRegexp),m=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,a;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;i=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",m=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(R=>{this.isValidLookup(r)||(a=R,!hR[`${g[0]}-${R}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(hR[`${g[0]}-${R}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{if(this.isValidLookup(r))return;s=b;const w=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,u,b,R,n);else{let _;f&&(_=this.pluralResolver.getSuffix(b,n.count,n));const k=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(w.push(u+_),n.ordinal&&_.indexOf(E)===0&&w.push(u+_.replace(E,this.options.pluralSeparator)),m&&w.push(u+k)),h){const P=`${u}${this.options.contextSeparator}${n.context}`;w.push(P),f&&(w.push(P+_),n.ordinal&&_.indexOf(E)===0&&w.push(P+_.replace(E,this.options.pluralSeparator)),m&&w.push(P+k))}}let y;for(;y=w.pop();)this.isValidLookup(r)||(o=y,r=this.getResource(b,R,y,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function H0(e){return e.charAt(0).toUpperCase()+e.slice(1)}class mR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ts.create("languageUtils")}getScriptPartFromCode(t){if(t=ug(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=ug(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=H0(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=H0(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=H0(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}let BJ=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],FJ={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const zJ=["v1","v2","v3"],UJ=["v4"],gR={zero:0,one:1,two:2,few:3,many:4,other:5};function WJ(){const e={};return BJ.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:FJ[t.fc]}})}),e}class GJ{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ts.create("pluralResolver"),(!this.options.compatibilityJSON||UJ.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=WJ()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(ug(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>gR[i]-gR[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!zJ.includes(this.options.compatibilityJSON)}}function vR(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=LJ(e,t,n);return!o&&i&&typeof n=="string"&&(o=W1(e,n,r),o===void 0&&(o=W1(t,n,r))),o}class HJ{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ts.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:m,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:R,maxReplaces:b,alwaysFormat:w}=t.interpolation;this.escape=n!==void 0?n:MJ,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Pc(o):s||"{{",this.suffix=a?Pc(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?Pc(f):m||Pc("$t("),this.nestingSuffix=h?Pc(h):g||Pc(")"),this.nestingOptionsSeparator=R||",",this.maxReplaces=b||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(h){return h.replace(/\$/g,"$$$$")}const u=h=>{if(h.indexOf(this.formatSeparator)<0){const w=vR(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...i,...n,interpolationkey:h}):w}const g=h.split(this.formatSeparator),R=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(vR(n,l,R,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:R})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>c(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?c(this.escape(h)):c(h)}].forEach(h=>{for(a=0;o=h.regex.exec(t);){const g=o[1].trim();if(s=u(g),s===void 0)if(typeof d=="function"){const b=d(t,o,i);s=typeof b=="string"?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))s="";else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=dR(s));const R=h.safeValue(s);if(t=t.replace(o[0],R),f?(h.regex.lastIndex+=s.length,h.regex.lastIndex-=o[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;function a(l,c){const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const m=f.match(/'/g),h=f.match(/"/g);(m&&m.length%2===0&&!h||h.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l}for(;i=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const u=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=u.shift(),l=u,c=!0}if(o=n(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=dR(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),c&&(o=l.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}function VJ(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(s){const[a,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}}function Tc(e){const t={};return function(r,i,o){const s=i+JSON.stringify(o);let a=t[s];return a||(a=e(ug(i),o),t[s]=a),a(r)}}class KJ{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ts.create("formatter"),this.options=t,this.formats={number:Tc((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:Tc((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:Tc((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:Tc((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:Tc((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Tc(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,l)=>{const{formatName:c,formatOptions:u}=VJ(l);if(this.formats[c]){let d=a;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},m=f.locale||f.lng||i.locale||i.lng||r;d=this.formats[c](a,m,{...u,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return a},t)}}function qJ(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class YJ extends iy{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ts.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},a={},l={};return t.forEach(c=>{let u=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,u=!1,s[f]===void 0&&(s[f]=!0),o[f]===void 0&&(o[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(a[c]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const a={};this.queue.forEach(l=>{jJ(l.loaded,[o],s),qJ(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&i{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,i,l):u=c(t,n,r,i),u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}else c(t,n,r,i,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function yR(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function bR(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Rh(){}function QJ(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class ep extends iy{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=bR(t),this.services={},this.logger=ts,this.modules={external:[]},QJ(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=yR();this.options={...i,...this.options,...bR(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function o(u){return u?typeof u=="function"?new u:u:null}if(!this.options.isClone){this.modules.logger?ts.init(o(this.modules.logger),this.options):ts.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=KJ);const d=new mR(this.options);this.store=new pR(this.options.resources,this.options);const f=this.services;f.logger=ts,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new GJ(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=o(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new HJ(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new YJ(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var h=arguments.length,g=new Array(h>1?h-1:0),R=1;R1?h-1:0),R=1;R{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Rh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=jd(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rh;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const i=jd();return t||(t=this.languages),n||(n=this.options.ns),r||(r=Rh),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&fI.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=jd();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,c)=>{c?(o(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{s(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const o=function(s,a){let l;if(typeof a!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${l.keyPrefix}${f}${h}`):m=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,i.t(m,l)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=jd();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=jd();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new mR(yR());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new ep(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rh;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new ep(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new pR(this.store.data,i),o.services.resourceStore=o.store),o.translator=new dg(o.services,i),o.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function xR(e,t,n){e.loadNamespaces(t,pI(e,n))}function SR(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,pI(e,r))}function JJ(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=t.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!i||s(o,e)))}function ZJ(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(G1("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,e))return!1}}):JJ(e,t,n)}const eZ=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,tZ={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},nZ=e=>tZ[e],rZ=e=>e.replace(eZ,nZ);let H1={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:rZ};function iZ(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};H1={...H1,...e}}function oZ(){return H1}let hI;function sZ(e){hI=e}function aZ(){return hI}const lZ={type:"3rdParty",init(e){iZ(e.options.react),sZ(e)}},cZ=C.createContext();class uZ{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const dZ=(e,t)=>{const n=C.useRef();return C.useEffect(()=>{n.current=e},[e,t]),n.current};function mI(e,t,n,r){return e.getFixedT(t,n,r)}function fZ(e,t,n,r){return C.useCallback(mI(e,t,n,r),[e,t,n,r])}function pZ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=C.useContext(cZ)||{},o=n||r||aZ();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new uZ),!o){G1("You will need to pass in an i18next instance by using initReactI18next");const _=(E,P)=>typeof P=="string"?P:P&&typeof P=="object"&&typeof P.defaultValue=="string"?P.defaultValue:Array.isArray(E)?E[E.length-1]:E,k=[_,{},!1];return k.t=_,k.i18n={},k.ready=!1,k}o.options.react&&o.options.react.wait!==void 0&&G1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...oZ(),...o.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let c=i||o.options&&o.options.defaultNS;c=typeof c=="string"?[c]:c||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(_=>ZJ(_,o,s)),d=fZ(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),f=()=>d,m=()=>mI(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),[h,g]=C.useState(f);let R=c.join();t.lng&&(R=`${t.lng}${R}`);const b=dZ(R),w=C.useRef(!0);C.useEffect(()=>{const{bindI18n:_,bindI18nStore:k}=s;w.current=!0,!u&&!a&&(t.lng?SR(o,t.lng,c,()=>{w.current&&g(m)}):xR(o,c,()=>{w.current&&g(m)})),u&&b&&b!==R&&w.current&&g(m);function E(){w.current&&g(m)}return _&&o&&o.on(_,E),k&&o&&o.store.on(k,E),()=>{w.current=!1,_&&o&&_.split(" ").forEach(P=>o.off(P,E)),k&&o&&k.split(" ").forEach(P=>o.store.off(P,E))}},[o,R]),C.useEffect(()=>{w.current&&u&&g(f)},[o,l,u]);const y=[h,o,u];if(y.t=h,y.i18n=o,y.ready=u,u||!u&&!a)return y;throw new Promise(_=>{t.lng?SR(o,t.lng,c,()=>_()):xR(o,c,()=>_())})}const{slice:hZ,forEach:mZ}=[];function gZ(e){return mZ.call(hZ.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const _R=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,vZ=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!_R.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!_R.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},CR={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=vZ(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let a=0;a0&&s[a].substring(0,l)===t&&(n=s[a].substring(l+1))}}return n}};let Ld=null;const kR=()=>{if(Ld!==null)return Ld;try{Ld=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ld=!1}return Ld};var wZ={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&kR())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&kR()&&window.localStorage.setItem(n,e)}};let Id=null;const ER=()=>{if(Id!==null)return Id;try{Id=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Id=!1}return Id};var xZ={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&ER())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&ER()&&window.sessionStorage.setItem(n,e)}},SZ={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o0?t:void 0}},_Z={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},CZ={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},kZ={name:"subdomain",lookup(e){var i,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(i=window.location)==null?void 0:i.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function EZ(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class gI{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=gZ(n,this.options||{},EZ()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(yZ),this.addDetector(bZ),this.addDetector(wZ),this.addDetector(xZ),this.addDetector(SZ),this.addDetector(_Z),this.addDetector(CZ),this.addDetector(kZ)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}gI.type="languageDetector";ur.use(gI).use(lZ).init({fallbackLng:"en",resources:{en:{translation:{"Guild Ball":"Guild Ball"}},fr:{translation:{"Guild Ball":"Guild Ball"}}},debug:!1,interpolation:{escapeValue:!1}});const vI=C.createContext({manifest:void 0,version:0,gameplans:void 0}),RR="gbdata_meta";let V0=!1;async function RZ(e,t,n){if(V0){console.error("concurent reloads");return}console.log(`loading ${e}`),V0=!0;try{const r=t.datafiles.find(a=>a.filename===e),i=r==null?void 0:r.sha256,o=r==null?void 0:r.version,s=await ln.getLocal(RR);if(s&&s.get("version")===o&&s.get("filename")===e&&s.get("sha256")===i){console.log("database pre-loaded :)");return}console.log("database re-loading :("),await Promise.all([ln.guilds.find().exec().then(a=>ln.guilds.bulkRemove(a.map(l=>l.name))).then(()=>ln.guilds.bulkInsert(n.Guilds)).then(a=>{if(a.error.length!==0)throw"error loading Guilds"}).catch(console.error),ln.models.find().exec().then(a=>ln.models.bulkRemove(a.map(l=>l.id))).then(()=>ln.models.bulkInsert(n.Models)).then(a=>{if(a.error.length!==0)throw"error loading Models"}).catch(console.error),ln.character_plays.find().exec().then(a=>ln.character_plays.bulkRemove(a.map(l=>l.name))).then(()=>ln.character_plays.bulkInsert(n["Character Plays"])).then(a=>{if(a.error.length!==0)throw"error loading Character Plays"}).catch(console.error),ln.character_traits.find().exec().then(a=>ln.character_traits.bulkRemove(a.map(l=>l.name))).then(()=>ln.character_traits.bulkInsert(n["Character Traits"])).then(a=>{if(a.error.length!==0)throw"error loading Character Traits"}).catch(console.error)]).then(()=>ln.upsertLocal(RR,{version:o,filename:e,sha256:i})).then(()=>console.log("database re-load complete :|")).catch(console.error)}finally{V0=!1}}const PZ=({children:e})=>{const[t,n]=C.useState(void 0),[r,i]=C.useState(void 0),[o,s]=C.useState(0),[a,l]=C.useState(),{setting$:c}=ui(),[u,d]=C.useState(),[f,m]=C.useState(),[h,g]=C.useState(),[R,b]=C.useState();return C.useEffect(()=>{const w=c==null?void 0:c.subscribe(y=>{const{dataSet:_,language:k,mostRecentErrata:E}=(y==null?void 0:y.toJSON().data)??{};d(_??null),k=="auto"?b(ur.resolvedLanguage??null):b(k??null),m(E??null)});return()=>{w==null||w.unsubscribe()}},[c]),C.useEffect(()=>{if(u===void 0||f===void 0)return;let w=!1;return(async()=>{var A;const _=await TZ();if(w)return;n(_);const k=_.datafiles[0].filename;let E;if(u&&f===k)E=u;else{E=k;const L=await(ln==null?void 0:ln.getLocal("settings"));if(w)return;L==null||L.incrementalPatch({dataSet:E,mostRecentErrata:k})}const P=_.datafiles.find(L=>L.filename===E),I=P.version;s(I),R&&((A=P.translations)!=null&&A[R])&&(console.log(`using translated data set (${R})`),E=P.translations[R].filename),g(E)})(),()=>{w=!0}},[u,R,f]),C.useEffect(()=>{if(!h||!t)return;let w=!1;return(async()=>{const _=await PR(h);w||(l(void 0),await RZ(h,t,_).then(()=>l(ln)),i(await PR("gameplans.json")))})(),()=>{w=!0}},[o,h,t]),v.jsx(vI.Provider,{value:{version:o,manifest:t,gameplans:r,gbdb:a},children:e})},TZ=async()=>await fetch("data/manifest.json",{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(t){return t.json()}),PR=async e=>await fetch(`data/${e}`,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(n){return n.json()}),Yr=()=>C.useContext(vI);function ta(){const{gbdb:e}=Yr(),[t,n]=C.useState(),[r,i]=C.useState(),o=C.useMemo(()=>e==null?void 0:e.game_state.getLocal$("network"),[e]);return C.useEffect(()=>{if(!o)return;const s=o.subscribe(a=>{a&&!a.deleted?(i(a),n(!0)):(i(void 0),n(!1))});return()=>s.unsubscribe()},[o]),{active:t,netDoc:r}}const yI=typeof window>"u"?C.useEffect:C.useLayoutEffect;function OZ(e,t=!1){const n=t?yI:C.useEffect,r=C.useRef(e);return n(()=>{r.current=e}),r}const jZ=()=>{};function LZ(e){C.useEffect(()=>{typeof e=="function"&&e()},[])}const IZ={attributes:!0,characterData:!0,childList:!0,subtree:!0};function oy(e,t=IZ){const[n,r]=C.useState(null);return C.useEffect(()=>{if(n){const o=new MutationObserver(e);return o.observe(n,t),()=>{o.disconnect()}}return jZ},[n,e,t]),[C.useCallback(o=>{r(o)},[])]}function MZ(e){C.useEffect(()=>e,[])}function NZ(e,t){const n=C.useRef(!1),r=C.useMemo(()=>typeof t<"u"&&!Array.isArray(t)?[t]:(Array.isArray(t)&&t.length===0&&console.warn("Using [] as the second argument makes useDidUpdate a noop. The second argument should either be `undefined` or an array of length greater than 0."),t),[t]);C.useEffect(()=>{n.current&&e()},r),LZ(()=>{n.current=!0}),MZ(()=>{n.current=!1})}const bI=globalThis||void 0||self;function $Z(e){const t=OZ(e);function n(...r){typeof t.current=="function"&&t.current(...r)}return n}function wI(e,t,n,r={},i=!0,o=!1){const s=$Z(n);(o?yI:C.useEffect)(()=>typeof e<"u"&&i?(e.addEventListener(t,s,r),()=>{e.removeEventListener(t,s,r)}):()=>{},[t,r])}function AZ(e,t=!0,n=!1){wI(bI.window,"resize",e,{passive:!0},t,n)}function DZ(e,t=!0,n=!1){wI(bI.window,"scroll",e,{passive:!0},t,n)}const BZ=e=>{const t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width,x:t.left,y:t.top}},FZ=[void 0,null,null],zZ=({updateOnScroll:e=!0,updateOnResize:t=!0}={})=>{const[n,r]=C.useState(null),[i,o]=C.useState(null),s=C.useCallback(l=>{o(l)},[]),a=C.useCallback(()=>{window.requestAnimationFrame(()=>{i&&r(BZ(i))})},[i]);return C.useLayoutEffect(()=>{a()},[a]),AZ(()=>{a()},t,!0),DZ(()=>{a()},e,!0),typeof window>"u"?(console.warn("useDimensionsRef: window is undefined."),FZ):[s,n,i]},UZ="/assets/playbook-symbol-defs-Dz3QsL1K.svg",WZ="/assets/gb-symbol-defs-DvUA8_44.svg";function ji(e){const{icon:t,size:n,style:r,className:i,...o}=e,s={...r||{},...n?{width:n,height:n}:{},...r&&r.height?{fontSize:r.height}:{}};return v.jsx("svg",{className:`gbicon gbicon-${t} ${i||""}`,style:s,...o,children:v.jsx("use",{href:`${WZ}#gbicon-${t}`})})}function xI(e){const{icon:t,size:n,style:r}=e,i=t.replace(//g,"P"),o={...n?{width:n,height:n}:{},...r&&r.height?{fontSize:r.height}:{},...e.style||{}};return v.jsx("svg",{className:`pbicon pbicon-${i}`,style:o,...e,children:v.jsx("use",{href:`${UZ}#pbicon-${i}`})})}function GZ(e){const{gbdb:t}=Yr(),[n,r]=C.useState();return C.useEffect(()=>{if(!t||!e)return;const i=e(t).$.subscribe(o=>{r(o)});return()=>{i.unsubscribe()}},[t,e]),n}function fo(e,t){const{gbdb:n}=Yr(),r=C.useCallback(e,t??[]),[i,o]=C.useState();return C.useEffect(()=>{let s=!1;return n?((async()=>{const l=await r(n);s||o(l)})().catch(console.error),()=>{s=!0}):void 0},[n,r,o]),i}function HZ(e,t){return e.reduce((n,r)=>t(n)>=t(r)?n:r)}function VZ({width:e,height:t},n,r=0){if(!e||!t)return;const i=(o,s)=>{const a=(e-o*10)/o,l=(t-s*10-5)/s,c=Math.min(a,l),u=(a-c)/2;return{w:a,h:l,size:c,margin:u,wx:o,hx:s}};return HZ(Array.from({length:n},(o,s)=>s+1).map(o=>i(o,Math.ceil(n/o)+r)),o=>o.size)}function SI({Controller:e}){const[t,n]=zZ(),r=fo(async a=>{var c;if(!n)return;const l=await a.guilds.count().exec();return((c=VZ(n,l,1))==null?void 0:c.size)??0},[n])??0,i=C.useMemo(()=>new Set,[]),o=IV(a=>i.add(a),a=>i.delete(a)),s=C.useCallback(a=>{i.forEach(l=>l(a))},[i]);return v.jsxs("div",{ref:t,style:{display:"flex",flexDirection:"column",height:"100%",alignContent:"flex-start",justifyContent:"space-evenly"},children:[v.jsx(KZ,{size:r,pickTeam:s}),v.jsx(Lo,{}),v.jsx(e,{size:r,update$:o})]})}const KZ=jt.memo(e=>{const{pickTeam:t,size:n}=e,r=GZ(C.useCallback(o=>o.guilds.find(),[]));if(!r)return null;const i=r.map(o=>({key:o.name,name:o.name,icon:o.name}));return v.jsx("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-start",justifyContent:"space-evenly",gap:"10px",padding:"5px",overflow:"clip"},children:i.map((o,s)=>v.jsx(V1,{g:o,pickTeam:t,size:n},s))})});function V1(e){const{g:t,pickTeam:n,size:r}=e;return v.jsxs(yn,{variant:"outlined",onClick:()=>n==null?void 0:n(t.key),style:{display:"flex",flexDirection:"column",minWidth:r,minHeight:r,maxWidth:r,maxHeight:r,background:"rgba(100%, 100%, 100%, 5%)"},sx:{"@media (hover: hover)":{"& > div":{transition:"transform .25s"},"&:hover > div":{transform:"scale(1.2)"}}},children:[v.jsx("div",{style:{display:"flex",placeContent:"center",placeItems:"center",fontSize:r*.7,width:"1em",height:"1em",borderRadius:"50%",padding:"0.0625em",background:"content-box linear-gradient(to bottom, #000, #333)"},children:v.jsx(ji,{icon:t.icon,className:"dark",style:{flexShrink:0,filter:"drop-shadow(0 0 0.03em black)",...t.style||{}}})}),v.jsx(_t,{variant:"caption",style:{color:"whitesmoke",textTransform:"capitalize",textShadow:"1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black, -1px 0 1px black",zIndex:1},children:t.name})]},t.key)}var _I={exports:{}},CI={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},kI={exports:{}},qZ=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},YZ=qZ,QZ=Array.prototype.concat,XZ=Array.prototype.slice,TR=kI.exports=function(t){for(var n=[],r=0,i=t.length;r=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};ki.to.keyword=function(e){return RI[e.slice(0,3)]};function Aa(e,t,n){return Math.min(Math.max(t,e),n)}function Ph(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var ZZ=_I.exports;const tp=CI,PI={};for(const e of Object.keys(tp))PI[tp[e]]=e;const lt={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var TI=lt;for(const e of Object.keys(lt)){if(!("channels"in lt[e]))throw new Error("missing channels property: "+e);if(!("labels"in lt[e]))throw new Error("missing channel labels property: "+e);if(lt[e].labels.length!==lt[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=lt[e];delete lt[e].channels,delete lt[e].labels,Object.defineProperty(lt[e],"channels",{value:t}),Object.defineProperty(lt[e],"labels",{value:n})}lt.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=o-i;let a,l;o===i?a=0:t===o?a=(n-r)/s:n===o?a=2+(r-t)/s:r===o&&(a=4+(t-n)/s),a=Math.min(a*60,360),a<0&&(a+=360);const c=(i+o)/2;return o===i?l=0:c<=.5?l=s/(o+i):l=s/(2-o-i),[a,l*100,c*100]};lt.rgb.hsv=function(e){let t,n,r,i,o;const s=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(s,a,l),u=c-Math.min(s,a,l),d=function(f){return(c-f)/6/u+1/2};return u===0?(i=0,o=0):(o=u/c,t=d(s),n=d(a),r=d(l),s===c?i=r-n:a===c?i=1/3+t-r:l===c&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,c*100]};lt.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=lt.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,o*100,r*100]};lt.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),o=(1-t-i)/(1-i)||0,s=(1-n-i)/(1-i)||0,a=(1-r-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function eee(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}lt.rgb.keyword=function(e){const t=PI[e];if(t)return t;let n=1/0,r;for(const i of Object.keys(tp)){const o=tp[i],s=eee(e,o);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=t*.4124+n*.3576+r*.1805,o=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[i*100,o*100,s*100]};lt.rgb.lab=function(e){const t=lt.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16,s=500*(n-r),a=200*(r-i);return[o,s,a]};lt.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,o,s;if(n===0)return s=r*255,[s,s,s];r<.5?i=r*(1+n):i=r+n-r*n;const a=2*r-i,l=[0,0,0];for(let c=0;c<3;c++)o=t+1/3*-(c-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,l[c]=s*255;return l};lt.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;const s=(r+n)/2,a=r===0?2*i/(o+i):2*n/(r+n);return[t,a*100,s*100]};lt.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),s=255*r*(1-n),a=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,s];case 1:return[a,r,s];case 2:return[s,r,l];case 3:return[s,a,r];case 4:return[l,s,r];case 5:return[r,s,a]}};lt.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let o,s;s=(2-n)*r;const a=(2-n)*i;return o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[t,o*100,s*100]};lt.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const s=Math.floor(6*t),a=1-r;o=6*t-s,s&1&&(o=1-o);const l=n+o*(a-n);let c,u,d;switch(s){default:case 6:case 0:c=a,u=l,d=n;break;case 1:c=l,u=a,d=n;break;case 2:c=n,u=a,d=l;break;case 3:c=n,u=l,d=a;break;case 4:c=l,u=n,d=a;break;case 5:c=a,u=n,d=l;break}return[c*255,u*255,d*255]};lt.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,o=1-Math.min(1,t*(1-i)+i),s=1-Math.min(1,n*(1-i)+i),a=1-Math.min(1,r*(1-i)+i);return[o*255,s*255,a*255]};lt.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,o,s;return i=t*3.2406+n*-1.5372+r*-.4986,o=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};lt.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16,o=500*(t-n),s=200*(n-r);return[i,o,s]};lt.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let i,o,s;o=(t+16)/116,i=n/500+o,s=o-r/200;const a=o**3,l=i**3,c=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};lt.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);const s=Math.sqrt(n*n+r*r);return[t,s,i]};lt.lch.lab=function(e){const t=e[0],n=e[1],i=e[2]/360*2*Math.PI,o=n*Math.cos(i),s=n*Math.sin(i);return[t,o,s]};lt.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=t===null?lt.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s};lt.hsv.ansi16=function(e){return lt.rgb.ansi16(lt.hsv.rgb(e),e[2])};lt.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};lt.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,i=(t>>1&1)*n*255,o=(t>>2&1)*n*255;return[r,i,o]};lt.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[n,r,i]};lt.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};lt.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(a=>a+a).join(""));const r=parseInt(n,16),i=r>>16&255,o=r>>8&255,s=r&255;return[i,o,s]};lt.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),s=i-o;let a,l;return s<1?a=o/(1-s):a=0,s<=0?l=0:i===t?l=(n-r)/s%6:i===n?l=2+(r-t)/s:l=4+(t-n)/s,l/=6,l%=1,[l*360,s*100,a*100]};lt.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]};lt.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]};lt.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const i=[0,0,0],o=t%1*6,s=o%1,a=1-s;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};lt.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let i=0;return r>0&&(i=t/r),[e[0],i*100,r*100]};lt.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],i*100,r*100]};lt.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};lt.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,i=r-t;let o=0;return i<1&&(o=(r-i)/(1-i)),[e[0],i*100,o*100]};lt.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};lt.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};lt.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};lt.gray.hsl=function(e){return[0,0,e[0]]};lt.gray.hsv=lt.gray.hsl;lt.gray.hwb=function(e){return[0,100,e[0]]};lt.gray.cmyk=function(e){return[0,0,0,e[0]]};lt.gray.lab=function(e){return[e[0],0,0]};lt.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};lt.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const fg=TI;function tee(){const e={},t=Object.keys(fg);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function cee(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const i=e(n);if(typeof i=="object")for(let o=i.length,s=0;s{zc[e]={},Object.defineProperty(zc[e],"channels",{value:K1[e].channels}),Object.defineProperty(zc[e],"labels",{value:K1[e].labels});const t=see(e);Object.keys(t).forEach(r=>{const i=t[r];zc[e][r]=cee(i),zc[e][r].raw=lee(i)})});var uee=zc;const Uc=ZZ,Si=uee,OI=["keyword","gray","hex"],q1={};for(const e of Object.keys(Si))q1[[...Si[e].labels].sort().join("")]=e;const pg={};function Xn(e,t){if(!(this instanceof Xn))return new Xn(e,t);if(t&&t in OI&&(t=null),t&&!(t in Si))throw new Error("Unknown model: "+t);let n,r;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof Xn)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=Uc.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,r=Si[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=Si[this.model].channels;const i=Array.prototype.slice.call(e,0,r);this.color=Y1(i,r),this.valpha=typeof e[r]=="number"?e[r]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const o=i.sort().join("");if(!(o in q1))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=q1[o];const{labels:s}=Si[this.model],a=[];for(n=0;n(e%360+360)%360),saturationl:kn("hsl",1,Hn(100)),lightness:kn("hsl",2,Hn(100)),saturationv:kn("hsv",1,Hn(100)),value:kn("hsv",2,Hn(100)),chroma:kn("hcg",1,Hn(100)),gray:kn("hcg",2,Hn(100)),white:kn("hwb",1,Hn(100)),wblack:kn("hwb",2,Hn(100)),cyan:kn("cmyk",0,Hn(100)),magenta:kn("cmyk",1,Hn(100)),yellow:kn("cmyk",2,Hn(100)),black:kn("cmyk",3,Hn(100)),x:kn("xyz",0,Hn(95.047)),y:kn("xyz",1,Hn(100)),z:kn("xyz",2,Hn(108.833)),l:kn("lab",0,Hn(100)),a:kn("lab",1),b:kn("lab",2),keyword(e){return e!==void 0?new Xn(e):Si[this.model].keyword(this.color)},hex(e){return e!==void 0?new Xn(e):Uc.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new Xn(e);const t=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),Uc.to.hex(t)+n},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const i=r/255;t[n]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return Xn.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,o=2*i-1,s=n.alpha()-r.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return Xn.rgb(a*n.red()+l*r.red(),a*n.green()+l*r.green(),a*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const e of Object.keys(Si)){if(OI.includes(e))continue;const{channels:t}=Si[e];Xn.prototype[e]=function(...n){return this.model===e?new Xn(this):n.length>0?new Xn(n,e):new Xn([...pee(Si[this.model][e].raw(this.color)),this.valpha],e)},Xn[e]=function(...n){let r=n[0];return typeof r=="number"&&(r=Y1(n,t)),new Xn(r,e)}}function dee(e,t){return Number(e.toFixed(t))}function fee(e){return function(t){return dee(t,e)}}function kn(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(pg[r]||(pg[r]=[]))[t]=n;return e=e[0],function(r){let i;return r!==void 0?(n&&(r=n(r)),i=this[e](),i.color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function Hn(e){return function(t){return Math.max(0,Math.min(e,t))}}function pee(e){return Array.isArray(e)?e:[e]}function Y1(e,t){for(let n=0;n{const{version:e}=Yr();return v.jsxs(_t,{sx:{position:"absolute",bottom:0,right:0,color:"text.disabled"},children:["[",e,"]"]})},mee=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function rp(e){return typeof e=="string"&&mee.test(e)}function hg(e){if(!rp(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}var nr=[];for(var q0=0;q0<256;++q0)nr.push((q0+256).toString(16).slice(1));function gee(e,t=0){return(nr[e[t+0]]+nr[e[t+1]]+nr[e[t+2]]+nr[e[t+3]]+"-"+nr[e[t+4]]+nr[e[t+5]]+"-"+nr[e[t+6]]+nr[e[t+7]]+"-"+nr[e[t+8]]+nr[e[t+9]]+"-"+nr[e[t+10]]+nr[e[t+11]]+nr[e[t+12]]+nr[e[t+13]]+nr[e[t+14]]+nr[e[t+15]]).toLowerCase()}var Th,vee=new Uint8Array(16);function yee(){if(!Th&&(Th=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Th))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Th(vee)}var bee=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const OR={randomUUID:bee};function jI(e,t,n){if(OR.randomUUID&&!t&&!e)return OR.randomUUID();e=e||{};var r=e.random||(e.rng||yee)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,gee(r)}var wee={VITE_NAME:"gb-playbook",VITE_VERSION:"2.1.0",VITE_METERED_USERNAME:"25ee3bdfcc273a8e3ae9db71",VITE_METERED_PASSWORD:"XVIpxKTNnMR7XQDK",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ip=wee.VITE_SIGNALING_URL??"wss://gbplaybook-webrtc-server.onrender.com";let Ts;function LS(e){return e.game_state.find().exec().then(t=>e.game_state.bulkRemove(t.map(n=>n._id))).catch(console.error)}let Y0=!1;function sy(e){return async(...t)=>{if(Y0)throw"concurent network change";Y0=!0;try{await e(...t)}finally{Y0=!1}}}const xee=sy(async(e,t)=>{try{const n=await jee();console.log(`# join code is ${n}`),t(n);const{uid:r,oid:i,gid:o}=await Iee();await LS(e),console.log("# starting new network game"),Ts=await TS(Ip,o),await e.game_state.insertLocal("network",{uid:r,oid:i,gid:o})}finally{Mp()}}),See=sy(async(e,t)=>{try{const{uid:n,oid:r,gid:i}=await Lee(t);await LS(e),console.log("# joining a network game"),Ts=await TS(Ip,i),await e.game_state.insertLocal("network",{uid:n,oid:r,gid:i})}finally{Mp()}}),_ee=sy(async e=>{const t=await e.game_state.getLocal("network"),n=t==null?void 0:t.get("gid");n&&Ts===void 0&&(console.log("# reconnecting to a network game"),Ts=await TS(Ip,n))}),Cee=sy(async e=>{console.log("# leaving a network game"),await(Ts==null?void 0:Ts.cancel().catch(console.error).finally(()=>{Ts=void 0})),await LS(e).catch(console.error),await e.game_state.getLocal("network").then(t=>t==null?void 0:t.remove()).catch(console.error)});function IS({allowNew:e=!1}){const{gbdb:t}=Yr(),[n,r]=C.useState(!1),{active:i}=ta();C.useEffect(()=>{t&&i&&!Ts&&_ee(t)},[t,i]);const[o,s]=C.useState("default");if(C.useEffect(()=>{s(i?"success":"default")},[i]),!!t)return v.jsxs(v.Fragment,{children:[v.jsx(Fo,{size:"small",color:o,disabled:!e&&!i,onClick:()=>r(!0),children:v.jsx(CJ,{})}),v.jsxs(hW,{open:n,onClose:()=>r(!1),children:[v.jsx(kW,{children:"Network Game Setup"}),v.jsx(xW,{children:v.jsx(Oee,{allowNew:e,close:()=>{r(!1)}})})]})]})}const kee=e=>{const{setActiveStep:t}=e;return v.jsxs(rn,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[v.jsx(yn,{variant:"contained",onClick:()=>t("Start"),children:"Start a Game"}),v.jsx(yn,{variant:"contained",onClick:()=>t("Join"),children:"Join a Game"})]})},Eee=e=>{const{setActiveStep:t}=e,{gbdb:n}=Yr(),[r,i]=C.useState();return C.useEffect(()=>{n&&xee(n,i).then(()=>{t("Ready")}).catch(o=>{console.error(o),t("New")})},[n,t]),v.jsxs(rn,{sx:{display:"flex",flexDirection:"column",gap:"1em",alignItems:"center"},children:[v.jsx(_t,{children:"Share this join code:"}),v.jsx(_t,{variant:"h3",children:r==null?void 0:r.toString().padStart(4,"0")}),v.jsx(_t,{children:"Waiting for opponent to connect."}),v.jsx(yn,{variant:"contained",onClick:()=>{Mp(),e.setActiveStep("New")},children:"Cancel"})]})},Ree=e=>{const{setActiveStep:t}=e,{gbdb:n}=Yr(),[r,i]=C.useState(),[o,s]=C.useState(!1);if(n)return v.jsxs(rn,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[v.jsx(V7,{sx:{margin:"1em"},label:"game join code",variant:"outlined",disabled:o,inputProps:{pattern:"[0-9]*",inputMode:"numeric"},onChange:a=>i(Number(a.target.value))}),v.jsx(yn,{variant:"contained",disabled:!r||o,onClick:()=>{s(!0),See(n,r??0).then(()=>t("Ready")).then(()=>s(!1)).catch(a=>{console.error(a),t("New")})},children:"Join a Game"}),v.jsx(yn,{variant:"contained",onClick:()=>{Mp(),s(!1),t("New")},children:"Cancel"})]})},Pee=e=>{const{setActiveStep:t}=e,{gbdb:n}=Yr(),r=qa(),{setting$:i}=ui();if(n)return v.jsxs(Km,{spacing:2,alignItems:"center",children:[v.jsx(_t,{variant:"h6",children:"Connected"}),v.jsxs(Km,{direction:"row",spacing:2,children:[v.jsx(yn,{variant:"contained",onClick:()=>Cee(n).then(()=>t("New")).then(()=>i&&Ln(i)).then(o=>o==null?void 0:o.incrementalPatch({gamePlayRoute:void 0})).then(()=>{r("/",{})}).catch(console.error),children:"Leave Game"}),v.jsx(yn,{color:"success",variant:"contained",onClick:()=>{var o;(o=e.close)==null||o.call(e)},children:"Continue"})]})]})},Tee=()=>v.jsx(_t,{children:"Network Games must be started from the inital guild selection screen."});function Oee({allowNew:e=!1,close:t}){const{active:n}=ta(),[r,i]=C.useState(e?"New":"Block");return C.useEffect(()=>{n&&i("Ready")},[n]),C.useEffect(()=>()=>{Mp()},[]),v.jsxs(rn,{children:[r==="New"&&v.jsx(kee,{setActiveStep:i}),r==="Start"&&v.jsx(Eee,{setActiveStep:i}),r==="Join"&&v.jsx(Ree,{setActiveStep:i}),r==="Ready"&&v.jsx(Pee,{setActiveStep:i,close:t}),r==="Block"&&v.jsx(Tee,{})]})}let nn;function jee(){return new Promise((e,t)=>{nn=new WebSocket(Ip),nn.onopen=()=>{nn==null||nn.send(JSON.stringify({type:"handshake-begin"}))},nn.onclose=()=>{t("socket closed")},nn.onerror=n=>{t(n)},nn.onmessage=n=>{const r=JSON.parse(n.data);switch(r.type){case"handshake-response":nn&&(nn.onmessage=null),e(r.code);break}}})}function Lee(e){return new Promise((t,n)=>{if(!e){n("Invalid Arguments (id undefined)");return}nn=new WebSocket(Ip),nn.onopen=()=>{nn==null||nn.send(JSON.stringify({type:"handshake-join",code:e}))},nn.onclose=()=>{n("socket closed")},nn.onerror=r=>{n(r)},nn.onmessage=r=>{const i=JSON.parse(r.data);switch(i.type){case"handshake-complete":{const o=i.yourId;if(!rp(o)){n(`invalid uID ${o}`);return}const s=i.otherId;if(!rp(s)){n(`invalid oID ${s}`);return}const a=hg(o),l=hg(s),c=a.map((d,f)=>d^l[f]),u=jI({random:c});t({uid:o,oid:s,gid:u})}break}}})}function Iee(){return new Promise((e,t)=>{if((nn==null?void 0:nn.readyState)!==1){t("socket closed");return}nn.onclose=()=>{t("socket closed")},nn.onerror=n=>{t(n)},nn.onmessage=n=>{const r=JSON.parse(n.data);switch(r.type){case"handshake-complete":{const i=r.yourId;if(!rp(i)){t(`invalid uID ${i}`);return}const o=r.otherId;if(!rp(o)){t(`invalid oID ${o}`);return}const s=hg(i),a=hg(o),l=s.map((u,d)=>u^a[d]),c=jI({random:l});e({uid:i,oid:o,gid:c})}break}}})}function Mp(){nn==null||nn.close(),nn=void 0}function ay(){return up()}var MS={},Mee=so;Object.defineProperty(MS,"__esModule",{value:!0});var LI=MS.default=void 0,Nee=Mee(ds()),$ee=v;LI=MS.default=(0,Nee.default)((0,$ee.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");function Aee(e){switch(e){case"Guilds":return"/game";case"Draft":return"/game/draft";case"Game":return"/game/draft/play"}}function II(e){const t=qa(),{gameState1$:n,gameState2$:r}=ay(),{active:i}=ta(),[o,s]=C.useState(),[a,l]=C.useState(),[c,u]=C.useState(!1),{dest:d,onAction:f,...m}=e;return C.useEffect(()=>{const h=n==null?void 0:n.pipe(qt(R=>R==null?void 0:R.navigateTo)).subscribe(R=>s(R)),g=r==null?void 0:r.pipe(qt(R=>R==null?void 0:R.navigateTo)).subscribe(R=>l(R));return()=>{h==null||h.unsubscribe(),g==null||g.unsubscribe()}},[n,r]),C.useEffect(()=>{const h=async()=>{await Ln(n).then(g=>{g==null||g.incrementalPatch({navigateTo:void 0}).catch(console.error)}),i||await Ln(r).then(g=>{g==null||g.incrementalPatch({navigateTo:void 0}).catch(console.error)}),t(Aee(d))};o==d&&a===d&&h()},[n,r,d,o,a,i,t,f]),C.useEffect(()=>{u(a===d)},[d,a]),v.jsx(OW,{className:c?"fabAnimate":void 0,...m,color:"secondary",onClick:()=>{f==null||f(),Ln(n).then(h=>{h==null||h.incrementalPatch({navigateTo:d}).catch(console.error)}),i||Ln(r).then(h=>{h==null||h.incrementalPatch({navigateTo:d}).catch(console.error)})},children:v.jsx(LI,{fontSize:"large",sx:{zIndex:10}})})}function jR({team:e,size:t}){const n=fo(r=>r.guilds.findOne().where({name:e}).exec(),[e]);return n?v.jsxs("div",{style:{position:"absolute",width:"100%",height:"100%",display:"flex",placeContent:"center",placeItems:"center",overflow:"hidden",zIndex:-1,backgroundColor:np(n.shadow??n.darkColor??n.color).darken(.25).desaturate(.25).string()},children:[v.jsx(ji,{icon:e,fontSize:t,style:{color:"rgba(0, 0, 0, 60%)",flexShrink:0}}),v.jsx(_t,{variant:"caption",style:{position:"absolute",color:"whitesmoke",textShadow:"1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black, -1px 0 1px black",textTransform:"capitalize"},children:e})]}):null}function Dee(e){const[t,n]=C.useState("P1"),[r,i]=C.useState(),[o,s]=C.useState(),[a,l]=C.useState(!1),c=Ni(),{active:u}=ta(),{gameState1$:d,gameState2$:f}=ay(),[m,h]=C.useState();C.useEffect(()=>{i(void 0),n("P1");const w=d==null?void 0:d.subscribe(y=>h(y));return()=>w==null?void 0:w.unsubscribe()},[d]);const[g,R]=C.useState();C.useEffect(()=>{s(void 0),n("P1");const w=f==null?void 0:f.subscribe(y=>R(y));return()=>w==null?void 0:w.unsubscribe()},[f]),C.useEffect(()=>{const w=m==null?void 0:m.get$("guild").subscribe(y=>i(y));return()=>w==null?void 0:w.unsubscribe()},[m]),C.useEffect(()=>{const w=g==null?void 0:g.get$("guild").subscribe(y=>s(y));return()=>w==null?void 0:w.unsubscribe()},[g]);const b=C.useCallback(async w=>{w&&(t==="P1"?(await(m==null?void 0:m.incrementalPatch({guild:w,roster:[]}).catch(console.error)),n(!o&&!u?"P2":"GO")):t==="P2"&&(await(g==null?void 0:g.incrementalPatch({guild:w,roster:[]}).catch(console.error)),n(r?"GO":"P1")))},[t,r,o,m,g,u]);return C.useEffect(()=>{const w=e.update$.subscribe(y=>b(y));return()=>w.unsubscribe()},[e.update$,b]),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",margin:"5px",gap:"5px"},children:[v.jsx(yn,{variant:"outlined",style:{minWidth:e.size,maxWidth:e.size,minHeight:e.size,maxHeight:e.size,fontSize:e.size*.5,...t==="P1"?{borderColor:c.palette.secondary.light,borderRadius:"12px",borderWidth:"4px"}:{borderColor:c.palette.primary.dark,borderRadius:"12px",borderWidth:"4px"}},onClick:()=>n("P1"),children:r?v.jsx(jR,{team:r,size:e.size}):"P1"}),v.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.25em"},children:[v.jsx(_t,{variant:"caption",children:"vs"}),v.jsx(II,{dest:"Draft",disabled:!r||!o,onAction:()=>l(!0),sx:{m:"0 15px"}}),v.jsx(_t,{variant:"caption",children:a?"(waiting)":" "})]}),v.jsx(yn,{variant:"outlined",disabled:u,style:{minWidth:e.size,maxWidth:e.size,minHeight:e.size,maxHeight:e.size,fontSize:e.size*.5,...t==="P2"?{borderColor:c.palette.secondary.light,borderRadius:"12px",borderWidth:"4px"}:{borderColor:c.palette.primary.dark,borderRadius:"12px",borderWidth:"4px"}},onClick:()=>n("P2"),children:o?v.jsx(jR,{team:o,size:e.size}):"P2"})]})}function Bee(){return v.jsxs(rn,{sx:{width:"100%",height:"100%",position:"relative"},children:[v.jsx(fs,{children:v.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between"},children:[v.jsx(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:v.jsx(Fo,{size:"small",disabled:!0,children:v.jsx(jS,{sx:{color:"text.secondary"}})})}),v.jsx(IS,{allowNew:!0})]})}),v.jsx(SI,{Controller:Dee}),v.jsx(fc,{})]})}var mg={exports:{}};mg.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",f="[object Map]",m="[object Number]",h="[object Object]",g="[object Promise]",R="[object RegExp]",b="[object Set]",w="[object String]",y="[object Symbol]",_="[object WeakMap]",k="[object ArrayBuffer]",E="[object DataView]",P="[object Float32Array]",I="[object Float64Array]",A="[object Int8Array]",L="[object Int16Array]",N="[object Int32Array]",F="[object Uint8Array]",z="[object Uint8ClampedArray]",K="[object Uint16Array]",Z="[object Uint32Array]",le=/[\\^$.*+?()[\]{}|]/g,ce=/\w*$/,H=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,se={};se[o]=se[s]=se[k]=se[E]=se[a]=se[l]=se[P]=se[I]=se[A]=se[L]=se[N]=se[f]=se[m]=se[h]=se[R]=se[b]=se[w]=se[y]=se[F]=se[z]=se[K]=se[Z]=!0,se[c]=se[u]=se[_]=!1;var je=typeof Sr=="object"&&Sr&&Sr.Object===Object&&Sr,Ge=typeof self=="object"&&self&&self.Object===Object&&self,Le=je||Ge||Function("return this")(),_e=t&&!t.nodeType&&t,Ve=_e&&!0&&e&&!e.nodeType&&e,Pe=Ve&&Ve.exports===_e;function ct(U,ge){return U.set(ge[0],ge[1]),U}function ht(U,ge){return U.add(ge),U}function Te(U,ge){for(var ke=-1,dt=U?U.length:0;++ke-1}function at(U,ge){var ke=this.__data__,dt=tr(ke,U);return dt<0?ke.push([U,ge]):ke[dt][1]=ge,this}$e.prototype.clear=nt,$e.prototype.delete=st,$e.prototype.get=Ae,$e.prototype.has=vt,$e.prototype.set=at;function it(U){var ge=-1,ke=U?U.length:0;for(this.clear();++ge-1&&U%1==0&&U-1&&U%1==0&&U<=i}function al(U){var ge=typeof U;return!!U&&(ge=="object"||ge=="function")}function sd(U){return!!U&&typeof U=="object"}function vs(U){return gc(U)?pr(U):nl(U)}function ad(){return[]}function Ap(){return!1}e.exports=Bn})(mg,mg.exports);var Fee=mg.exports;const MI=Ga(Fee);var NS={},zee=so;Object.defineProperty(NS,"__esModule",{value:!0});var NI=NS.default=void 0,Uee=zee(ds()),Wee=v;NI=NS.default=(0,Uee.default)((0,Wee.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonChecked");var $S={},Gee=so;Object.defineProperty($S,"__esModule",{value:!0});var $I=$S.default=void 0,Hee=Gee(ds()),Vee=v;$I=$S.default=(0,Hee.default)((0,Vee.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonUnchecked");const AS=(e,t)=>{const n=jt.useRef(null);return NZ(()=>{var r;e&&((r=n.current)==null||r.animate({backgroundColor:["initial","red","initial"],boxShadow:["0 0 0px 0px transparent","0 0 0.25em 0.25em red","0 0 0.25em 0.25em transparent"]},500))},t),n};function Ks(e,t,n){return e.sort((r,i)=>{const o=n.findIndex(a=>a===r[t]),s=n.findIndex(a=>a===i[t]);return o-s})}function hf(e,t,n,r,i,o){let s=n;return i(t)&&(s+=r?1:-1,s===o?e.forEach(a=>{!a.selected&&i(a)&&(a.disabled+=1)}):s===o-1&&n===o&&e.forEach(a=>{!(a===t||a.selected)&&i(a)&&(a.disabled+=-1)})),s}function AI(e,t,n){e.forEach(r=>{r!==t&&r.name===t.name&&(r.disabled+=n?1:-1),(r.dehcneb===t.name||r.name===t.dehcneb)&&(r.disabled+=n?1:-1)})}function DI(e,t,n,r){if(t.dehcneb){const i=e.find(o=>o.benched&&o.name===t.dehcneb);i&&r(i,n)}}function jl({model:e,disabled:t=!1,stateDoc:n,updateCounts:r}){const[i,o]=C.useState(e.selected);C.useEffect(()=>{const l=n.get$("roster").pipe(qt(c=>c.map(u=>u.name).includes(e.id))).subscribe(c=>{o(c),c!==e.selected&&!e.benched&&r(e,c)});return()=>l==null?void 0:l.unsubscribe()},[n,e,r]);const s=AS(t,[i]);return v.jsx(Ms,{ref:s,label:e.id,control:v.jsx(Is,{size:"small",checked:i,disabled:e.disabled>0||t,onChange:a=>{const l=a.target.checked;n.incrementalModify(c=>{if(l){const u=c.roster.concat({name:e.id,health:e.hp});c.roster=u}else{const u=c.roster.filter(d=>d.name!=e.id);c.roster=u}return c}).catch(console.error)},icon:v.jsx($I,{}),checkedIcon:v.jsx(NI,{})})})}const BI=Ee(c9)(()=>({"& .MuiBadge-badge":{right:"2em",top:"2em"}})),da={3:{captain:1,mascot:0,squaddies:2},4:{captain:1,mascot:1,squaddies:2},6:{captain:1,mascot:1,squaddies:4}},LR=e=>{const{guild:t,ready:n,unready:r,disabled:i=!1,style:o}=e,{setting$:s}=ui(),[a,l]=C.useState(6);C.useEffect(()=>{const w=s==null?void 0:s.pipe(qt(y=>y==null?void 0:y.toJSON().data.gameSize)).subscribe(y=>l(y??6));return()=>w==null?void 0:w.unsubscribe()},[s]);const c=C.useRef({captain:0,mascot:0,squaddieCount:0}),[,u]=C.useState(0),[d,f]=C.useState(!1),m=fo(async w=>{const _=(await w.models.find().where("id").in(t.roster).exec()).map(k=>Object.assign(k.toMutableJSON(),{selected:!1,disabled:k.benched?1:0}));if(Ks(_,"id",t.roster),!i&&t.minor){const k=new Set(e.stateDoc.get("roster").map(E=>JSON.stringify(E)));_.forEach(E=>{(E.captain||E.mascot&&da[a].mascot>0)&&(k.add(JSON.stringify({name:E.id,health:E.hp})),E.disabled=1)}),e.stateDoc.incrementalModify(E=>(E.roster=Array.from(k).map(P=>JSON.parse(P)),E)).catch(console.error)}return da[a].mascot===0&&_.forEach(k=>{k.mascot&&(k.disabled=1)}),_},[t,a]),h=C.useCallback((w,y)=>{function _(L,N,F,z){return hf(L,N,F,z,K=>!!K.captain,da[a].captain)}function k(L,N,F,z){return hf(L,N,F,z,K=>!!K.mascot,da[a].mascot)}function E(L,N,F,z){return hf(L,N,F,z,K=>!(K.captain||K.mascot),da[a].squaddies)}if(!m)return;w.selected=y;const P=_(m,w,c.current.captain,y);c.current.captain=P;const I=k(m,w,c.current.mascot,y);c.current.mascot=I;const A=E(m,w,c.current.squaddieCount,y);c.current.squaddieCount=A,AI(m,w,y),DI(m,w,y,(L,N)=>{i||(L.selected=N,e.stateDoc.incrementalModify(F=>{if(N){const z=F.roster.concat({name:L.id,health:L.hp});F.roster=z}else{const z=F.roster.filter(K=>K.name!=L.id);F.roster=z}return F}))}),P===da[a].captain&&I===da[a].mascot&&A===da[a].squaddies?f(!0):f(!1),u(L=>L+1)},[e.stateDoc,m,a,i]);if(C.useEffect(()=>{if(d&&m){const w=MI(m.filter(y=>y.selected));n==null||n(w)}else r==null||r()},[d,t,m,n,r]),!m)return null;const g=m.filter(w=>w.captain),R=m.filter(w=>w.mascot&&!w.captain),b=m.filter(w=>!w.captain&&!w.mascot);return v.jsx(BI,{badgeContent:d?v.jsx(uI,{color:"success"}):0,style:{overflow:"visible",...o},children:v.jsxs(JO,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",border:"4px solid",borderColor:t.darkColor??t.color,borderRadius:"1em",padding:"1ex",width:"100%",overflow:"visible"},children:[v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Captains :"}),g.map(w=>v.jsx(jl,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id)),v.jsx("span",{children:"Mascots :"}),R.map(w=>v.jsx(jl,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Squaddies :"}),b.slice(0,b.length/2).map(w=>v.jsx(jl,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:" "}),b.slice(b.length/2).map(w=>v.jsx(jl,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id))]})]})})},Oh={3:{master:1,apprentice:2},4:{master:2,apprentice:2},6:{master:3,apprentice:3}},IR=e=>{const{guild:t,ready:n,unready:r,disabled:i=!1,style:o}=e,{setting$:s}=ui(),[a,l]=C.useState(6);C.useEffect(()=>{const b=s==null?void 0:s.pipe(qt(w=>w==null?void 0:w.toJSON().data.gameSize)).subscribe(w=>l(w??6));return()=>b==null?void 0:b.unsubscribe()},[s]);const c=C.useRef({masterCount:0,apprenticeCount:0}),[,u]=C.useState(0),[d,f]=C.useState(!1),m=fo(async b=>{const y=(await b.models.find().where("id").in(t.roster).exec()).map(_=>Object.assign(_.toMutableJSON(),{selected:!1,disabled:_.benched?1:0}));return Ks(y,"id",t.roster),y},[t]),h=C.useCallback((b,w)=>{function y(P,I,A,L){return hf(P,I,A,L,N=>!!N.captain,Oh[a].master)}function _(P,I,A,L){return hf(P,I,A,L,N=>!N.captain,Oh[a].apprentice)}if(!m)return;b.selected=w;const k=y(m,b,c.current.masterCount,w);c.current.masterCount=k;const E=_(m,b,c.current.apprenticeCount,w);c.current.apprenticeCount=E,AI(m,b,w),DI(m,b,w,(P,I)=>{i||(P.selected=I,e.stateDoc.incrementalModify(A=>{if(I){const L=A.roster.concat({name:P.id,health:P.hp});A.roster=L}else{const L=A.roster.filter(N=>N.name!=P.id);A.roster=L}return A}))}),k===Oh[a].master&&E===Oh[a].apprentice?f(!0):f(!1),u(P=>P+1)},[e.stateDoc,m,a,i]);if(C.useEffect(()=>{if(d&&m){const b=MI(m.filter(w=>w.selected));n==null||n(b)}else r==null||r()},[d,t,m,n,r]),!m)return null;const g=m.filter(b=>b.captain),R=m.filter(b=>!b.captain);return v.jsx(BI,{badgeContent:d?v.jsx(uI,{color:"success"}):0,style:{overflow:"visible",...o},children:v.jsxs(JO,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",border:"4px solid",borderColor:t.darkColor??t.color,borderRadius:"1em",padding:"1ex",width:"100%",overflow:"visible"},children:[v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Masters :"}),g.map(b=>v.jsx(jl,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Apprentices :"}),R.slice(0,R.length/2).map(b=>v.jsx(jl,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:" "}),R.slice(R.length/2).map(b=>v.jsx(jl,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]})]})})};function Kee(){const{active:e}=ta();return v.jsxs(rn,{className:"DraftScreen",children:[v.jsx(fs,{children:v.jsxs(rn,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[v.jsxs(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:[v.jsx(Fo,{color:"inherit",href:"/game",size:"small",disabled:e,children:v.jsx(jS,{})}),v.jsx(_t,{children:"Draft"})]}),v.jsxs("div",{children:[v.jsx(Yee,{}),v.jsx(IS,{})]})]})}),v.jsx(qee,{}),v.jsx(fc,{})]})}function qee(){const{setting$:e}=ui(),t=qa(),[n,r]=C.useState(),[i,o]=C.useState(),s=C.useCallback(P=>r(P),[]),a=C.useCallback(P=>o(P),[]),l=C.useCallback(()=>r(void 0),[]),c=C.useCallback(()=>o(void 0),[]),[u,d]=C.useState();C.useEffect(()=>{const P=e==null?void 0:e.pipe(qt(I=>I==null?void 0:I.toJSON().data.gameSize)).subscribe(I=>d(I));return()=>P==null?void 0:P.unsubscribe()},[e]);const{active:f}=ta(),{gameState1$:m,gameState2$:h}=ay(),[g,R]=C.useState();C.useEffect(()=>{if(!m)return;let P=!1;return(async()=>{const A=await Ln(m);P||R(A)})(),()=>{P=!0}},[m]);const[b,w]=C.useState();C.useEffect(()=>{if(!h)return;let P=!1;return(async()=>{const A=await Ln(h);P||w(A)})(),()=>{P=!0}},[h]);const[y,_]=fo(async P=>{const I=g==null?void 0:g.guild,A=b==null?void 0:b.guild;if(!I||!A)return;const[L,N]=await Promise.all([P.guilds.findOne().where({name:I}).exec(),P.guilds.findOne().where({name:A}).exec()]);if(!L||!N){t("/game");return}return[L,N]},[g,b,t])??[];if(!y||!_||!g||!b)return null;const k=y.name==="Blacksmiths"?IR:LR,E=_.name==="Blacksmiths"?IR:LR;return v.jsxs(v.Fragment,{children:[v.jsx(k,{guild:y,stateDoc:g,ready:s,unready:l,style:{width:"100%"}},`1-${u}`),v.jsx(II,{dest:"Game",disabled:!n||!i,onAction:()=>{g.incrementalPatch({score:0,momentum:0,roster:(n==null?void 0:n.map(P=>({name:P.id,health:P.hp})))||[]}).catch(console.error),f||b.incrementalPatch({score:0,momentum:0,roster:(i==null?void 0:i.map(P=>({name:P.id,health:P.hp})))||[]}).catch(console.error)},sx:{m:"10px"}}),v.jsx(E,{guild:_,stateDoc:b,ready:a,unready:c,style:{width:"100%"},disabled:f},`2-${u}`)]})}function Yee(){const[e,t]=C.useState(null),n=!!e,r=c=>{t(c.currentTarget)},i=()=>{t(null)},{setting$:o}=ui(),[s,a]=C.useState();C.useEffect(()=>{const c=o==null?void 0:o.subscribe(u=>a(u));return()=>c==null?void 0:c.unsubscribe()},[o]);const l=s==null?void 0:s.toJSON().data.gameSize;return v.jsxs(v.Fragment,{children:[v.jsx(Fo,{onClick:r,color:"inherit",size:"small",sx:{backgroundColor:"primary.dark"},children:v.jsxs(_t,{children:[l,"v",l]})}),v.jsx(Uv,{anchorEl:e,open:n,onClose:i,onClick:i,children:v.jsxs(rj,{dense:!0,children:[v.jsx(yi,{selected:l===6,onClick:()=>{s==null||s.incrementalPatch({gameSize:6})},children:"6v6"}),v.jsx(yi,{selected:l===4,onClick:()=>{s==null||s.incrementalPatch({gameSize:4})},children:"4v4"}),v.jsx(yi,{selected:l===3,onClick:()=>{s==null||s.incrementalPatch({gameSize:3})},children:"3v3"})]})})]})}var DS={},Qee=so;Object.defineProperty(DS,"__esModule",{value:!0});var gg=DS.default=void 0,Xee=Qee(ds()),Jee=v;gg=DS.default=(0,Xee.default)((0,Jee.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove");var BS={},Zee=so;Object.defineProperty(BS,"__esModule",{value:!0});var vg=BS.default=void 0,ete=Zee(ds()),tte=v;vg=BS.default=(0,ete.default)((0,tte.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");function MR(e){nte(e)&&e.touches.length<2&&e.preventDefault&&e.cancelable&&e.preventDefault()}function nte(e){return e&&"touches"in e}function Q1({onLongPress:e,onClick:t},{delay:n=500,shouldPreventDefault:r=!0}={}){const[i,o]=C.useState(!1),s=C.useRef(),a=C.useRef(),l=C.useCallback(u=>{u.persist();const d={...u};r&&u.target&&(u.target.addEventListener("touchend",MR,{passive:!1}),a.current=u.target),s.current=setTimeout(()=>{e(d),o(!0)},n)},[e,n,r]),c=C.useCallback((u,d=!0)=>{s.current&&clearTimeout(s.current),d&&!i&&(t==null||t(u)),o(!1),r&&a.current&&a.current.removeEventListener("touchend",MR)},[r,t,i]);return{onMouseDown:u=>l(u),onTouchStart:u=>l(u),onMouseUp:u=>c(u),onMouseLeave:u=>c(u,!1),onTouchEnd:u=>c(u),onTouchMove:u=>c(u)}}function rte(e){const{disabled:t,object:n,label:r}=e,i=r(n),o=AS(t,[i]);return v.jsx(_t,{ref:o,sx:{width:"100%",textAlign:"center"},children:i})}function FI({object:e,label:t,value:n,setValue:r,disabled:i=!1,longPressClear:o=!1}){const s=Q1({onLongPress:()=>{r(e,0)},onClick:a=>{a.stopPropagation();const l=n(e);l>0&&r(e,l-1)}});return v.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[v.jsx(rte,{disabled:i,object:e,label:t}),v.jsxs(Vf,{size:"small",variant:"contained",disabled:i,children:[v.jsx(yn,{...o?s:{},onClick:a=>{if(a.stopPropagation(),!o){const l=n(e);l>0&&r(e,l-1)}},children:v.jsx(gg,{fontSize:"inherit"})}),v.jsx(yn,{onClick:a=>{a.stopPropagation();const l=n(e);r(e,l+1)},children:v.jsx(vg,{fontSize:"inherit"})})]})]})}const NR=e=>{const{model:t,disabled:n}=e,r=AS(n,[e.health]);return v.jsx(yn,{ref:r,disabled:!0,size:"small",children:v.jsx(_t,{variant:"body2",color:"text.primary",children:`${String(e.health).padStart(2,"0")} / ${String(t.hp).padStart(2,"0")}`})})};function zI({state:e,model:t,disabled:n=!1,stacked:r=!1}){const i=Q1({onLongPress:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health=0,u})},onClick:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health>0&&(u.roster[d].health-=1),u})}}),o=Q1({onLongPress:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].healthu.name===t.id),a=C.useMemo(()=>e.get$("roster").pipe(qt(u=>u[s].health)),[e,s]),[l,c]=C.useState(t.hp);return C.useEffect(()=>{const u=a.subscribe(d=>c(d));return()=>u.unsubscribe()},[a]),v.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:r?v.jsxs(v.Fragment,{children:[v.jsx(NR,{health:l,model:t,disabled:n}),v.jsxs(Vf,{size:"small",variant:"contained",disabled:n,sx:{"& .MuiButtonGroup-grouped":{minWidth:"1rem"}},children:[v.jsx(yn,{...i,onClick:u=>u.stopPropagation(),children:v.jsx(gg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(yn,{...o,onClick:u=>u.stopPropagation(),children:v.jsx(vg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})]}):v.jsxs(Vf,{size:"small",variant:"contained",disabled:n,children:[v.jsx(yn,{...i,onClick:u=>u.stopPropagation(),children:v.jsx(gg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(NR,{health:l,model:t,disabled:n}),v.jsx(yn,{...o,onClick:u=>u.stopPropagation(),children:v.jsx(vg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function ite(e){const t=e.state,[n,r]=C.useState(0);return C.useEffect(()=>{const i=t.get$("score").subscribe(o=>r(o));return()=>i.unsubscribe()},[t]),v.jsx(FI,{object:t,disabled:e.disabled,label:()=>`VP: ${n}`,value:()=>n,setValue:(i,o)=>{i.incrementalModify(s=>(s.score=o,s))}})}function ote(e){const t=e.state,[n,r]=C.useState(0);return C.useEffect(()=>{const i=t.get$("momentum").subscribe(o=>r(o));return()=>i.unsubscribe()},[t]),v.jsx(FI,{object:t,disabled:e.disabled,longPressClear:!0,label:()=>`MOM: ${n}`,value:()=>n,setValue:(i,o)=>{i.incrementalModify(s=>(s.momentum=o,s))}})}function ste({teams:e,rosters:t,expanded:n,onClick:r,disabled:i}){const o=Ni(),{setting$:s}=ui(),[a,l]=C.useState();C.useEffect(()=>{const u=s==null?void 0:s.pipe(qt(d=>d==null?void 0:d.toJSON().data.uiPreferences.displayStatLine)).subscribe(d=>l(d));return()=>u==null?void 0:u.unsubscribe()});const c=e.reduce((u,d,f)=>[...u,u[f]+d.roster.length+1],[0]);return v.jsx(rn,{sx:{flexGrow:0,overflow:"auto"},children:e.map((u,d)=>{const f=c[d]+1;return v.jsxs(Fz,{expanded:n===!0,square:!0,sx:{backgroundColor:"transparent"},disableGutters:!0,elevation:0,children:[v.jsx(Jz,{sx:{position:"sticky",top:0,zIndex:1,padding:0,borderBottom:`1px solid ${o.palette.divider}`,".MuiAccordionSummary-content":{margin:0}},children:v.jsxs(KO,{onClick:()=>{r(f-1,!n)},sx:{width:"100%",display:"flex",flexDirection:"row"},children:[v.jsx(mG,{sx:{alignItems:"center"},children:v.jsx("div",{style:{fontSize:36,width:"1em",height:"1em",overflow:"visible",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(ji,{icon:u.guild,style:{color:o.palette.text.secondary,filter:"unset",flexShrink:0}})})}),v.jsx(Ss,{primary:u.guild,secondary:`${t[d].reduce((m,h)=>m+(h._inf??h.inf),0)} INF`}),v.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"4px"},children:[v.jsx(ite,{state:u,disabled:i[d]}),v.jsx(ote,{state:u,disabled:i[d]})]})]})}),v.jsx(Hz,{sx:{padding:0},children:v.jsx(rf,{disablePadding:!0,sx:{"li:nth-of-type(odd)":{"&.MuiListItem-root":{backgroundColor:"rgba(100%, 100%, 100%, 5%)"}}},children:t[d].map((m,h)=>v.jsx(wo,{secondaryAction:v.jsx(zI,{state:u,model:m,disabled:i[d]}),onClick:()=>{r(f+h,!1)},children:v.jsx(Ss,{primary:m.id,secondary:a?m.statLine:null})},m.id))},d)})]},d)})})}const Ir=new URL("/assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",import.meta.url).href,Mr=new URL("/assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",import.meta.url).href,Nr=new URL("/assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",import.meta.url).href,$r=new URL("/assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",import.meta.url).href,Oc=new URL("/assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",import.meta.url).href,Xr=new URL("/assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",import.meta.url).href,jc=new URL("/assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",import.meta.url).href,Ar=new URL("/assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",import.meta.url).href,Dr=new URL("/assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",import.meta.url).href,Br=new URL("/assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",import.meta.url).href,Fr=new URL("/assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",import.meta.url).href,Lc=new URL("/assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",import.meta.url).href,wr=new URL("/assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",import.meta.url).href,Ic=new URL("/assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",import.meta.url).href,fa=new URL("/assets/Order_back-qsepM33g.jpg",import.meta.url).href,Mc=new URL("/assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",import.meta.url).href,hl=new URL("/assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",import.meta.url).href,Jr=new URL("/assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",import.meta.url).href,Nc=new URL("/assets/lamps_back_blank-DaxPd_Oo.jpg",import.meta.url).href,cn=new Map([["Alchemists_back",new URL("/assets/GB-S4-Alchemists-19-02-01-VIy3CwEn.jpg",import.meta.url).href],["Alchemists_front",new URL("/assets/GB-S4-Alchemists-19-02-02-Dar2t4NY.jpg",import.meta.url).href],["Midas_back",Ir],["Midas_front",new URL("/assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",import.meta.url).href],["Smoke_back",Ir],["Smoke_front",new URL("/assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",import.meta.url).href],["Soma_back",Ir],["Soma_front",new URL("/assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",import.meta.url).href],["Pneuma_back",Ir],["Pneuma_front",new URL("/assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",import.meta.url).href],["Flask_back",Ir],["Flask_front",new URL("/assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",import.meta.url).href],["Naja_back",Ir],["Naja_front",new URL("/assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",import.meta.url).href],["Calculus_back",Ir],["Calculus_front",new URL("/assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",import.meta.url).href],["vCalculus_back",Ir],["vCalculus_front",new URL("/assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",import.meta.url).href],["Crucible_back",Ir],["Crucible_front",new URL("/assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",import.meta.url).href],["Kami_back",Ir],["Kami_front",new URL("/assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",import.meta.url).href],["Katalyst_back",Ir],["Katalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",import.meta.url).href],["vKatalyst_back",Ir],["vKatalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",import.meta.url).href],["Mercury_back",Ir],["Mercury_front",new URL("/assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",import.meta.url).href],["Venin_back",Ir],["Venin_front",new URL("/assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",import.meta.url).href],["Vitriol_back",Ir],["Vitriol_front",new URL("/assets/GB-S4-Alchemists-20-03-30-DjbTACjD.jpg",import.meta.url).href],["Compound_back",new URL("/assets/GB-S4-Alchemists-20-03-31-BTog_cbt.jpg",import.meta.url).href],["Compound_front",new URL("/assets/GB-S4-Alchemists-20-03-32-Dui0dDSy.jpg",import.meta.url).href],["Blacksmiths_back",new URL("/assets/GB-S4-Blacksmiths-20-03-01-C1aHp8XU.jpg",import.meta.url).href],["Blacksmiths_front",new URL("/assets/GB-S4-Blacksmiths-20-03-02-Buw0Sd4K.jpg",import.meta.url).href],["Anvil_back",Mr],["Anvil_front",new URL("/assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",import.meta.url).href],["Burnish_back",Mr],["Burnish_front",new URL("/assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",import.meta.url).href],["Culverin_back",Mr],["Culverin_front",new URL("/assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",import.meta.url).href],["Farris_back",Mr],["Farris_front",new URL("/assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",import.meta.url).href],["Ferrite_back",Mr],["Ferrite_front",new URL("/assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",import.meta.url).href],["Furnace_back",Mr],["Furnace_front",new URL("/assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",import.meta.url).href],["Hearth_back",Mr],["Hearth_front",new URL("/assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",import.meta.url).href],["Alloy_back",Mr],["Alloy_front",new URL("/assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",import.meta.url).href],["Bolt_back",Mr],["Bolt_front",new URL("/assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",import.meta.url).href],["Cast_back",Mr],["Cast_front",new URL("/assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",import.meta.url).href],["Cinder_back",Mr],["Cinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",import.meta.url).href],["vCinder_back",Mr],["vCinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",import.meta.url).href],["Cutlass_back",Mr],["Cutlass_front",new URL("/assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",import.meta.url).href],["Iron_back",Mr],["Iron_front",new URL("/assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",import.meta.url).href],["Sledge_back",Mr],["Sledge_front",new URL("/assets/GB-S4-Blacksmiths-20-03-32-DJ0MEQk3.jpg",import.meta.url).href],["Brewers_back",new URL("/assets/GB-S4-Brewers-20-03-01-_bnlGcvZ.jpg",import.meta.url).href],["Brewers_front",new URL("/assets/GB-S4-Brewers-20-03-02-Af5aErRU.jpg",import.meta.url).href],["Tapper_back",Nr],["Tapper_front",new URL("/assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",import.meta.url).href],["Esters_back",Nr],["Esters_front",new URL("/assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",import.meta.url).href],["Corker_back",Nr],["Corker_front",new URL("/assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",import.meta.url).href],["Scum_back",Nr],["Scum_front",new URL("/assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",import.meta.url).href],["Quaff_back",Nr],["Quaff_front",new URL("/assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",import.meta.url).href],["vDecimate_back",Nr],["vDecimate_front",new URL("/assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",import.meta.url).href],["Flea_back",Nr],["Flea_front",new URL("/assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",import.meta.url).href],["Friday_back",Nr],["Friday_front",new URL("/assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",import.meta.url).href],["Hooper_back",Nr],["Hooper_front",new URL("/assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",import.meta.url).href],["Mash_back",Nr],["Mash_front",new URL("/assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",import.meta.url).href],["Pintpot_back",Nr],["Pintpot_front",new URL("/assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",import.meta.url).href],["Spigot_back",Nr],["Spigot_front",new URL("/assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",import.meta.url).href],["vSpigot_back",Nr],["vSpigot_front",new URL("/assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",import.meta.url).href],["Stave_back",Nr],["Stave_front",new URL("/assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",import.meta.url).href],["Stoker_back",Nr],["Stoker_front",new URL("/assets/GB-S4-Brewers-20-03-32-Cps3196a.jpg",import.meta.url).href],["Lucky_back",new URL("/assets/GB-S4-Brewers-20-03-33-zps3y-hi.jpg",import.meta.url).href],["Lucky_front",new URL("/assets/GB-S4-Brewers-20-03-34-CdaFu_Sd.jpg",import.meta.url).href],["Butchers_back",new URL("/assets/GB-S4-Butchers-19-08-01-CLWIlX8T.jpg",import.meta.url).href],["Butchers_front",new URL("/assets/GB-S4-Butchers-19-08-02-CFlOzX_b.jpg",import.meta.url).href],["Ox_back",$r],["Ox_front",new URL("/assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",import.meta.url).href],["Fillet_back",$r],["Fillet_front",new URL("/assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",import.meta.url).href],["vBoar_back",$r],["vBoar_front",new URL("/assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",import.meta.url).href],["Princess_back",$r],["Princess_front",new URL("/assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",import.meta.url).href],["Truffles_back",$r],["Truffles_front",new URL("/assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",import.meta.url).href],["Boar_back",$r],["Boar_front",new URL("/assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",import.meta.url).href],["Boiler_back",$r],["Boiler_front",new URL("/assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",import.meta.url).href],["Brisket_back",$r],["Brisket_front",new URL("/assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",import.meta.url).href],["vBrisket_back",$r],["vBrisket_front",new URL("/assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",import.meta.url).href],["vGutter_back",$r],["vGutter_front",new URL("/assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",import.meta.url).href],["Layne_back",$r],["Layne_front",new URL("/assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",import.meta.url).href],["Meathook_back",$r],["Meathook_front",new URL("/assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",import.meta.url).href],["vOx_back",$r],["vOx_front",new URL("/assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",import.meta.url).href],["Shank_back",$r],["Shank_front",new URL("/assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",import.meta.url).href],["Tenderiser_back",$r],["Tenderiser_front",new URL("/assets/GB-S4-Butchers-19-08-32-CDETLFF4.jpg",import.meta.url).href],["Cooks_back",new URL("/assets/GB-S4-Cooks-19-08-01-B_Vd1DVn.jpg",import.meta.url).href],["Cooks_front",new URL("/assets/GB-S4-Cooks-19-08-02-BCRzyOhW.jpg",import.meta.url).href],["Wellington_back",Oc],["Wellington_front",new URL("/assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",import.meta.url).href],["Pepper_back",Oc],["Pepper_front",new URL("/assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",import.meta.url).href],["Cinnamon_back",Oc],["Cinnamon_front",new URL("/assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",import.meta.url).href],["Roast_back",Oc],["Roast_front",new URL("/assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",import.meta.url).href],["Spice_back",Oc],["Spice_front",new URL("/assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",import.meta.url).href],["Sugar_back",Oc],["Sugar_front",new URL("/assets/GB-S4-Cooks-19-08-14-2NKQVsMs.jpg",import.meta.url).href],["Engineers_back",new URL("/assets/GB-S4-Engineers-20-03-01-Di9u3X0x.jpg",import.meta.url).href],["Engineers_front",new URL("/assets/GB-S4-Engineers-20-03-02-Cy2lNFLR.jpg",import.meta.url).href],["Ballista_back",Xr],["Ballista_front",new URL("/assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",import.meta.url).href],["PinVice_back",Xr],["PinVice_front",new URL("/assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",import.meta.url).href],["Rivet_back",Xr],["Rivet_front",new URL("/assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",import.meta.url).href],["Mainspring_back",Xr],["Mainspring_front",new URL("/assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",import.meta.url).href],["Mother_back",Xr],["Mother_front",new URL("/assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",import.meta.url).href],["Colossus_back",Xr],["Colossus_front",new URL("/assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",import.meta.url).href],["vHarriet_back",Xr],["vHarriet_front",new URL("/assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",import.meta.url).href],["Hoist_back",Xr],["Hoist_front",new URL("/assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",import.meta.url).href],["Locus_back",Xr],["Locus_front",new URL("/assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",import.meta.url).href],["Nomad_back",Xr],["Nomad_front",new URL("/assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",import.meta.url).href],["Ratchet_back",Xr],["Ratchet_front",new URL("/assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",import.meta.url).href],["Salvo_back",Xr],["Salvo_front",new URL("/assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",import.meta.url).href],["Velocity_back",Xr],["Velocity_front",new URL("/assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",import.meta.url).href],["vVelocity_back",Xr],["vVelocity_front",new URL("/assets/GB-S4-Engineers-20-03-30-bp8c3Uf4.jpg",import.meta.url).href],["Falconers_back",new URL("/assets/GB-S4-Falconers-20-03-01-DAO812Wl.jpg",import.meta.url).href],["Falconers_front",new URL("/assets/GB-S4-Falconers-20-03-02-C_ro4zOy.jpg",import.meta.url).href],["Devana_back",jc],["Devana_front",new URL("/assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",import.meta.url).href],["Frelsi_back",jc],["Frelsi_front",new URL("/assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",import.meta.url).href],["Ikaros_back",jc],["Ikaros_front",new URL("/assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",import.meta.url).href],["Mataagi_back",jc],["Mataagi_front",new URL("/assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",import.meta.url).href],["Minerva_back",jc],["Minerva_front",new URL("/assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",import.meta.url).href],["Rundaas_back",jc],["Rundaas_front",new URL("/assets/GB-S4-Falconers-20-03-14-D7WFZjKa.jpg",import.meta.url).href],["Farmers_back",new URL("/assets/GB-S4-Farmers-19-12-01-LmV2xFUn.jpg",import.meta.url).href],["Farmers_front",new URL("/assets/GB-S4-Farmers-19-12-02-COLOFnlA.jpg",import.meta.url).href],["Grange_back",Ar],["Grange_front",new URL("/assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",import.meta.url).href],["Thresher_back",Ar],["Thresher_front",new URL("/assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",import.meta.url).href],["Festival_back",Ar],["Festival_front",new URL("/assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",import.meta.url).href],["Peck_back",Ar],["Peck_front",new URL("/assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",import.meta.url).href],["Buckwheat_back",Ar],["Buckwheat_front",new URL("/assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",import.meta.url).href],["Amber_back",Ar],["Amber_front",new URL("/assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",import.meta.url).href],["Bushel_back",Ar],["Bushel_front",new URL("/assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",import.meta.url).href],["Fallow_back",Ar],["Fallow_front",new URL("/assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",import.meta.url).href],["Harrow_back",Ar],["Harrow_front",new URL("/assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",import.meta.url).href],["vHonour_back",Ar],["vHonour_front",new URL("/assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",import.meta.url).href],["Jackstraw_back",Ar],["Jackstraw_front",new URL("/assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",import.meta.url).href],["Millstone_back",Ar],["Millstone_front",new URL("/assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",import.meta.url).href],["Ploughman_back",Ar],["Ploughman_front",new URL("/assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",import.meta.url).href],["Tater_back",Ar],["Tater_front",new URL("/assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",import.meta.url).href],["Windle_back",Ar],["Windle_front",new URL("/assets/GB-S4-Farmers-19-12-32-DfwzxWCr.jpg",import.meta.url).href],["Fishermen_back",new URL("/assets/GB-S4-Fishermen-19-08-01-D54clbHu.jpg",import.meta.url).href],["Fishermen_front",new URL("/assets/GB-S4-Fishermen-19-08-02-D_xvByJF.jpg",import.meta.url).href],["Shark_back",Dr],["Shark_front",new URL("/assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",import.meta.url).href],["Corsair_back",Dr],["Corsair_front",new URL("/assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",import.meta.url).href],["Yukai_back",Dr],["Yukai_front",new URL("/assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",import.meta.url).href],["Salt_back",Dr],["Salt_front",new URL("/assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",import.meta.url).href],["Tentacles_back",Dr],["Tentacles_front",new URL("/assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",import.meta.url).href],["Angel_back",Dr],["Angel_front",new URL("/assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",import.meta.url).href],["Greyscales_back",Dr],["Greyscales_front",new URL("/assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",import.meta.url).href],["Hag_back",Dr],["Hag_front",new URL("/assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",import.meta.url).href],["Jac_back",Dr],["Jac_front",new URL("/assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",import.meta.url).href],["Knuckles_back",Dr],["Knuckles_front",new URL("/assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",import.meta.url).href],["Kraken_back",Dr],["Kraken_front",new URL("/assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",import.meta.url).href],["Sakana_back",Dr],["Sakana_front",new URL("/assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",import.meta.url).href],["vSakana_back",Dr],["vSakana_front",new URL("/assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",import.meta.url).href],["Siren_back",Dr],["Siren_front",new URL("/assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",import.meta.url).href],["vSiren_back",Dr],["vSiren_front",new URL("/assets/GB-S4-Fishermen-19-08-32-Co1is7SR.jpg",import.meta.url).href],["Hunters_back",new URL("/assets/GB-S4-Hunters-19-08-01-CmDbpORb.jpg",import.meta.url).href],["Hunters_front",new URL("/assets/GB-S4-Hunters-19-08-02-DP64V92U.jpg",import.meta.url).href],["Theron_back",Br],["Theron_front",new URL("/assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",import.meta.url).href],["Skatha_back",Br],["Skatha_front",new URL("/assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",import.meta.url).href],["Steeljaw_back",Br],["Steeljaw_front",new URL("/assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",import.meta.url).href],["Fahad_back",Br],["Fahad_front",new URL("/assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",import.meta.url).href],["Snow_back",Br],["Snow_front",new URL("/assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",import.meta.url).href],["Chaska_back",Br],["Chaska_front",new URL("/assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",import.meta.url).href],["Edge_back",Br],["Edge_front",new URL("/assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",import.meta.url).href],["Egret_back",Br],["Egret_front",new URL("/assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",import.meta.url).href],["Hearne_back",Br],["Hearne_front",new URL("/assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",import.meta.url).href],["vHearne_back",Br],["vHearne_front",new URL("/assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",import.meta.url).href],["Jaecar_back",Br],["Jaecar_front",new URL("/assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",import.meta.url).href],["vMinx_back",Br],["vMinx_front",new URL("/assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",import.meta.url).href],["Seenah_back",Br],["Seenah_front",new URL("/assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",import.meta.url).href],["Ulfr_back",Br],["Ulfr_front",new URL("/assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",import.meta.url).href],["Zarola_back",Br],["Zarola_front",new URL("/assets/GB-S4-Hunters-19-08-32-CjwZbZPz.jpg",import.meta.url).href],["Masons_back",new URL("/assets/GB-S4-Masons-19-03-01-CU2vGuj1.jpg",import.meta.url).href],["Masons_front",new URL("/assets/GB-S4-Masons-19-03-02-BT75CHhK.jpg",import.meta.url).href],["Honour_back",Fr],["Honour_front",new URL("/assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",import.meta.url).href],["Hammer_back",Fr],["Hammer_front",new URL("/assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",import.meta.url).href],["Corbelli_back",Fr],["Corbelli_front",new URL("/assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",import.meta.url).href],["Marbles_back",Fr],["Marbles_front",new URL("/assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",import.meta.url).href],["Wrecker_back",Fr],["Wrecker_front",new URL("/assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",import.meta.url).href],["Brick_back",Fr],["Brick_front",new URL("/assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",import.meta.url).href],["Champ_back",Fr],["Champ_front",new URL("/assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",import.meta.url).href],["Chisel_back",Fr],["Chisel_front",new URL("/assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",import.meta.url).href],["vChisel_back",Fr],["vChisel_front",new URL("/assets/GB-S4-Masons-19-08-18-CCBausup.jpg",import.meta.url).href],["Flint_back",Fr],["Flint_front",new URL("/assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",import.meta.url).href],["Granite_back",Fr],["Granite_front",new URL("/assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",import.meta.url).href],["Harmony_back",Fr],["Harmony_front",new URL("/assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",import.meta.url).href],["vHarmony_back",Fr],["vHarmony_front",new URL("/assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",import.meta.url).href],["Mallet_back",Fr],["Mallet_front",new URL("/assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",import.meta.url).href],["Tower_back",Fr],["Tower_front",new URL("/assets/GB-S4-Masons-19-08-30-6kjit4Y9.jpg",import.meta.url).href],["Miners_back",new URL("/assets/GB-S4-Miners-20-03-01-D4YSyCEa.jpg",import.meta.url).href],["Miners_front",new URL("/assets/GB-S4-Miners-20-03-02-osGRf8x4.jpg",import.meta.url).href],["Shaft_back",Lc],["Shaft_front",new URL("/assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",import.meta.url).href],["Digger_back",Lc],["Digger_front",new URL("/assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",import.meta.url).href],["Fissure_back",Lc],["Fissure_front",new URL("/assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",import.meta.url).href],["Fuse_back",Lc],["Fuse_front",new URL("/assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",import.meta.url).href],["Mule_back",Lc],["Mule_front",new URL("/assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",import.meta.url).href],["Spade_back",Lc],["Spade_front",new URL("/assets/GB-S4-Miners-20-03-14-OmIZrrCX.jpg",import.meta.url).href],["Morticians_back",new URL("/assets/GB-S4-Morticians-19-08-01-DIFD5DK0.jpg",import.meta.url).href],["Morticians_front",new URL("/assets/GB-S4-Morticians-19-08-02-BIp1_EUg.jpg",import.meta.url).href],["Obulus_back",wr],["Obulus_front",new URL("/assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",import.meta.url).href],["Scalpel_back",wr],["Scalpel_front",new URL("/assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",import.meta.url).href],["Mourn_back",wr],["Mourn_front",new URL("/assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",import.meta.url).href],["Dirge_back",wr],["Dirge_front",new URL("/assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",import.meta.url).href],["Vileswarm_back",wr],["Vileswarm_front",new URL("/assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",import.meta.url).href],["Bonesaw_back",wr],["Bonesaw_front",new URL("/assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",import.meta.url).href],["Brainpan_back",wr],["Brainpan_front",new URL("/assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",import.meta.url).href],["Memory_back",wr],["Memory_front",new URL("/assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",import.meta.url).href],["Casket_back",wr],["Casket_front",new URL("/assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",import.meta.url).href],["Cosset_back",wr],["Cosset_front",new URL("/assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",import.meta.url).href],["Gaffer_back",wr],["Gaffer_front",new URL("/assets/gaffer-front-large-box-BhDGw3yv.png",import.meta.url).href],["Ghast_back",wr],["Ghast_front",new URL("/assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",import.meta.url).href],["Graves_back",wr],["Graves_front",new URL("/assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",import.meta.url).href],["vGraves_back",wr],["vGraves_front",new URL("/assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",import.meta.url).href],["vHemlocke_back",wr],["vHemlocke_front",new URL("/assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",import.meta.url).href],["Silence_back",wr],["Silence_front",new URL("/assets/GB-S4-Morticians-19-08-34-Cml7KNHH.jpg",import.meta.url).href],["Navigators_back",new URL("/assets/GB-S4-Navigators-20-03-01-M7N3Qnm9.jpg",import.meta.url).href],["Navigators_front",new URL("/assets/GB-S4-Navigators-20-03-02-C0DvULy4.jpg",import.meta.url).href],["Windfinder_back",Ic],["Wander_front",new URL("/assets/GB-S4-Navigators-20-03-04-C54iXdHJ.jpg",import.meta.url).href],["Windfinder_front",new URL("/assets/GB-S4-Navigators-20-03-05-DijPkVU0.jpg",import.meta.url).href],["Wander_back",Ic],["Azimuth_front",new URL("/assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",import.meta.url).href],["Azimuth_back",Ic],["Ebb_back",Ic],["Ebb_front",new URL("/assets/GB-S4-Navigators-20-03-10-kxgvrwFf.jpg",import.meta.url).href],["Fathom_front",new URL("/assets/GB-S4-Navigators-20-03-11-DLBrn3lH.jpg",import.meta.url).href],["Fathom_back",Ic],["Horizon_back",Ic],["Horizon_front",new URL("/assets/GB-S4-Navigators-20-03-14-4LJM_QAb.jpg",import.meta.url).href],["Order_back",new URL("/assets/GB-S4-Order-19-08-01-asZnKqhR.jpg",import.meta.url).href],["Order_front",new URL("/assets/GB-S4-Order-19-08-02-DxYxwIyf.jpg",import.meta.url).href],["sBrisket_back",fa],["sBrisket_front",new URL("/assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",import.meta.url).href],["Pride_back",fa],["Pride_front",new URL("/assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",import.meta.url).href],["Benediction_back",fa],["Benediction_front",new URL("/assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",import.meta.url).href],["vFangtooth_back",fa],["vFangtooth_front",new URL("/assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",import.meta.url).href],["Grace_back",fa],["Grace_front",new URL("/assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",import.meta.url).href],["Harry_back",fa],["Harry_front",new URL("/assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",import.meta.url).href],["Mist_back",fa],["Mist_front",new URL("/assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",import.meta.url).href],["sSpigot_back",fa],["sSpigot_front",new URL("/assets/GB-S4-Order-19-08-18-gkj8skFt.jpg",import.meta.url).href],["Ratcatchers_back",new URL("/assets/GB-S4-Ratcatchers-19-08-01-CbXHBUJx.jpg",import.meta.url).href],["Ratcatchers_front",new URL("/assets/GB-S4-Ratcatchers-19-08-02-XbBjNmUR.jpg",import.meta.url).href],["Piper_back",Mc],["Piper_front",new URL("/assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",import.meta.url).href],["Squeak_back",Mc],["Squeak_front",new URL("/assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",import.meta.url).href],["Miasma_back",Mc],["Miasma_front",new URL("/assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",import.meta.url).href],["Pelage_back",Mc],["Pelage_front",new URL("/assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",import.meta.url).href],["Scourge_back",Mc],["Scourge_front",new URL("/assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",import.meta.url).href],["Skulk_back",Mc],["Skulk_front",new URL("/assets/GB-S4-Ratcatchers-19-08-14-D1JyRK5e.jpg",import.meta.url).href],["Shepherds_back",new URL("/assets/GB-S4-Shepherds-20-03-01-BszDyn7n.jpg",import.meta.url).href],["Shepherds_front",new URL("/assets/GB-S4-Shepherds-20-03-02-XqwLekip.jpg",import.meta.url).href],["Herder_back",hl],["Herder_front",new URL("/assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",import.meta.url).href],["Babe_back",hl],["Babe_front",new URL("/assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",import.meta.url).href],["Crook_back",hl],["Crook_front",new URL("/assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",import.meta.url).href],["Hook_back",hl],["Hook_front",new URL("/assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",import.meta.url).href],["Lamb_back",hl],["Lamb_front",new URL("/assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",import.meta.url).href],["Ram_back",hl],["Ram_front",new URL("/assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",import.meta.url).href],["Shearer_back",hl],["Shearer_front",new URL("/assets/GB-S4-Shepherds-20-03-16-CH7z3m46.jpg",import.meta.url).href],["Union_back",new URL("/assets/GB-S4-Union-20-03-01-BYUf_cPI.jpg",import.meta.url).href],["Union_front",new URL("/assets/GB-S4-Union-20-03-02-CAfWuq1n.jpg",import.meta.url).href],["Blackheart_back",Jr],["Blackheart_front",new URL("/assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",import.meta.url).href],["vRage_back",Jr],["vRage_front",new URL("/assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",import.meta.url).href],["vGreede_back",Jr],["vGreede_front",new URL("/assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",import.meta.url).href],["Coin_back",Jr],["Coin_front",new URL("/assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",import.meta.url).href],["Strongbox_back",Jr],["Strongbox_front",new URL("/assets/GB-S4-Union-20-03-12--TefmgjH.jpg",import.meta.url).href],["Avarisse_back",Jr],["Avarisse_front",new URL("/assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",import.meta.url).href],["Greede_back",Jr],["Greede_front",new URL("/assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",import.meta.url).href],["Decimate_back",Jr],["Decimate_front",new URL("/assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",import.meta.url).href],["Fangtooth_back",Jr],["Fangtooth_front",new URL("/assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",import.meta.url).href],["Gutter_back",Jr],["Gutter_front",new URL("/assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",import.meta.url).href],["Hemlocke_back",Jr],["Hemlocke_front",new URL("/assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",import.meta.url).href],["Minx_back",Jr],["Minx_front",new URL("/assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",import.meta.url).href],["Rage_back",Jr],["Rage_front",new URL("/assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",import.meta.url).href],["Snakeskin_back",Jr],["Snakeskin_front",new URL("/assets/GB-S4-Union-20-03-30-DOPQxsMF.jpg",import.meta.url).href],["Lamplighters_front",new URL("/assets/lamp-beta-63HlWaeb.png",import.meta.url).href],["Lamplighters_back",new URL("/assets/lamp-beta-63HlWaeb.png",import.meta.url).href],["Nightlight_gbcp_front",new URL("/assets/nightlight-00-DeG30Qno.jpg",import.meta.url).href],["Nightlight_gbcp_back",new URL("/assets/nightlight-01-B5GmfHdF.jpg",import.meta.url).href],["Soot_gbcp_front",new URL("/assets/soot-00-CjgkmHEF.jpg",import.meta.url).href],["Soot_gbcp_back",new URL("/assets/soot-01-DLvloUPB.jpg",import.meta.url).href],["Beacon_gbcp_front",new URL("/assets/beacon-00-L9zfj4Q8.jpg",import.meta.url).href],["Beacon_gbcp_back",new URL("/assets/beacon-01-vYao7kaT.jpg",import.meta.url).href],["Heat_gbcp_front",new URL("/assets/heat-00-D38QQgsn.jpg",import.meta.url).href],["Heat_gbcp_back",new URL("/assets/heat-01-TaWfEq1e.jpg",import.meta.url).href],["Phosphor_gbcp_front",new URL("/assets/phosphor-00-kYBsDzr4.jpg",import.meta.url).href],["Phosphor_gbcp_back",new URL("/assets/phosphor-01-aCMgs7Xa.jpg",import.meta.url).href],["Wick_gbcp_front",new URL("/assets/wick-00-CEZ6BY1J.jpg",import.meta.url).href],["Wick_gbcp_back",new URL("/assets/wick-01-DtuDStax.jpg",import.meta.url).href],["sBrisket_gbcp_front",new URL("/assets/brisket3-00-TRUFkM-Q.jpg",import.meta.url).href],["sBrisket_gbcp_back",new URL("/assets/brisket3-01-C19fZQ9I.jpg",import.meta.url).href],["Cast_gbcp_front",new URL("/assets/cast-00-CDhbzPRV.jpg",import.meta.url).href],["Cast_gbcp_back",new URL("/assets/cast-01-DOJiR9Ch.jpg",import.meta.url).href],["Crook_gbcp_front",new URL("/assets/crook-00-C4D_gdaM.jpg",import.meta.url).href],["Crook_gbcp_back",new URL("/assets/crook-01-D9bCOT5R.jpg",import.meta.url).href],["Egret_gbcp_front",new URL("/assets/egret-00-BKhmAAwA.jpg",import.meta.url).href],["Egret_gbcp_back",new URL("/assets/egret-01-DCSfZLX7.jpg",import.meta.url).href],["Hook_gbcp_front",new URL("/assets/hook-00-BCtxORP2.jpg",import.meta.url).href],["Hook_gbcp_back",new URL("/assets/hook-01-CFEXTspD.jpg",import.meta.url).href],["Ikaros_gbcp_front",new URL("/assets/ikaros-00-BlK23AQW.jpg",import.meta.url).href],["Ikaros_gbcp_back",new URL("/assets/ikaros-01-CaTWYr3E.jpg",import.meta.url).href],["Lucky_gbcp_front",new URL("/assets/lucky-00--3wf1Q-o.jpg",import.meta.url).href],["Lucky_gbcp_back",new URL("/assets/lucky-01-CeFOEkb7.jpg",import.meta.url).href],["Miasma_gbcp_front",new URL("/assets/miasma-00-gJuVKj0r.jpg",import.meta.url).href],["Miasma_gbcp_back",new URL("/assets/miasma-01-BFpZKg3H.jpg",import.meta.url).href],["Minx_gbcp_front",new URL("/assets/minx-00-DKid1QgM.jpg",import.meta.url).href],["Minx_gbcp_back",new URL("/assets/minx-01-h4AvAe2P.jpg",import.meta.url).href],["Steeljaw_gbcp_front",new URL("/assets/steeljaw-00-DBylP57a.jpg",import.meta.url).href],["Steeljaw_gbcp_back",new URL("/assets/steeljaw-01-DHvdkD3u.jpg",import.meta.url).href],["Tenderiser_gbcp_front",new URL("/assets/tenderiser-00-DJeWjZaC.jpg",import.meta.url).href],["Tenderiser_gbcp_back",new URL("/assets/tenderiser-01-Dn53BCqM.jpg",import.meta.url).href],["Angel_gbcp_front",new URL("/assets/Angel-00-_OcCE1xs.jpg",import.meta.url).href],["Angel_gbcp_back",new URL("/assets/Angel-01-RsyL_b7r.jpg",import.meta.url).href],["Blackheart_gbcp_front",new URL("/assets/Blackheart-00-Barboaw1.jpg",import.meta.url).href],["Blackheart_gbcp_back",new URL("/assets/Blackheart-01-DqXGaAGL.jpg",import.meta.url).href],["Brisket_gbcp_front",new URL("/assets/Brisket-00-fpn5lXhR.jpg",import.meta.url).href],["Brisket_gbcp_back",new URL("/assets/Brisket-01-Cz0yKYaC.jpg",import.meta.url).href],["Flea_gbcp_front",new URL("/assets/Flea-00-PYY29ZDm.jpg",import.meta.url).href],["Flea_gbcp_back",new URL("/assets/Flea-01-B-ceu-Fs.jpg",import.meta.url).href],["Gaffer_gbcp_front",new URL("/assets/Gaffer-00-Chm4XJB6.jpg",import.meta.url).href],["Gaffer_gbcp_back",new URL("/assets/Gaffer-01-DChRbbv3.jpg",import.meta.url).href],["Locus_gbcp_front",new URL("/assets/Locus-00-BlUYiKL3.jpg",import.meta.url).href],["Locus_gbcp_back",new URL("/assets/Locus-01-CgJeSABI.jpg",import.meta.url).href],["Salt_gbcp_front",new URL("/assets/Salt-00-DTipa4Vq.jpg",import.meta.url).href],["Salt_gbcp_back",new URL("/assets/Salt-01-DgX-3wqX.jpg",import.meta.url).href],["Truffles_gbcp_front",new URL("/assets/Truffles-00-BxTIIeQ4.jpg",import.meta.url).href],["Truffles_gbcp_back",new URL("/assets/Truffles-01-1xGyMIOv.jpg",import.meta.url).href],["Ulfr_gbcp_front",new URL("/assets/Ulfr-00-BXhlGxmA.jpg",import.meta.url).href],["Ulfr_gbcp_back",new URL("/assets/Ulfr-01-JQfocVce.jpg",import.meta.url).href],["vGutter_gbcp_front",new URL("/assets/vGutter-00-CpnNh9P4.jpg",import.meta.url).href],["vGutter_gbcp_back",new URL("/assets/vGutter-01-BWHR1234.jpg",import.meta.url).href],["Beacon_front",new URL("/assets/beacon-WzU-Fgwo.jpg",import.meta.url).href],["Beacon_back",Nc],["Heat_front",new URL("/assets/heat-kg0Ne0rh.jpg",import.meta.url).href],["Heat_back",Nc],["Nightlight_front",new URL("/assets/nightlight-BICbD_Qy.jpg",import.meta.url).href],["Nightlight_back",Nc],["Phosphor_front",new URL("/assets/phosphor-CifRCYrC.jpg",import.meta.url).href],["Phosphor_back",Nc],["Soot_front",new URL("/assets/soot-CXEcs2BT.jpg",import.meta.url).href],["Soot_back",Nc],["Wick_front",new URL("/assets/wick-D10XZuyz.jpg",import.meta.url).href],["Wick_back",Nc]]);var ate=function(e){return e instanceof RegExp},lte=function(t){var n=/[\\^$.*+?()[\]{}|]/g,r=RegExp(n.source);return t&&r.test(t)?t.replace(n,"\\$&"):t},UI=function(e){return typeof e=="string"},cte=function(e){var t=[];return e.forEach(function(n){Array.isArray(n)?t=t.concat(n):t.push(n)}),t};function ute(e,t,n){var r=0,i=0;if(e==="")return e;if(!e||!UI(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var o=t;ate(o)||(o=new RegExp("("+lte(o)+")","gi"));for(var s=e.split(o),a=1,l=s.length;a{let t=jh(e,/\(◉(.*?)\)/g,(n,r)=>v.jsxs(jt.Fragment,{children:["(◉",v.jsx("span",{style:{fontStyle:"italic"},children:n}),")"]},`i-a-${r}`));return t=jh(t,/\(([^◉].*?)\)/g,(n,r)=>v.jsxs(jt.Fragment,{children:["(",v.jsx("span",{style:{fontStyle:"italic"},children:n}),")"]},`i-${r}`)),t=jh(t,/{([<>TKDGB]+)}/,(n,r)=>v.jsx(jt.Fragment,{children:v.jsx("span",{style:{display:"inline-flex",width:"21px",height:"1ex",position:"relative",overflow:"visible"},children:v.jsx("div",{style:{display:"flex",overflow:"visible",width:"21px",height:"21px",backgroundColor:"white",border:"var(--line-width) solid black",borderRadius:"21px",position:"absolute",alignSelf:"center",justifySelf:"center",alignItems:"center",justifyContent:"center"},children:v.jsx(xI,{icon:n.replace(/GB/g,"CP")})})})},`pb-${r}`)),t=jh(t,/\b([A-Z]+)\b/g,(n,r)=>v.jsx("span",{style:{letterSpacing:"-1px"},children:n},`tla-${r}`)),v.jsx(v.Fragment,{children:t})},fte=e=>{const t=e.model,n=t.id,{setting$:r}=ui(),[i,o]=C.useState(),[s,a]=C.useState();C.useEffect(()=>{const f=r==null?void 0:r.subscribe(m=>{o(m==null?void 0:m.toJSON().data.cardPreferences.preferredStyle),a(m==null?void 0:m.toJSON().data.language)});return()=>f==null?void 0:f.unsubscribe()});const[l,c]=fo(f=>Promise.all([f.guilds.findOne().where({name:t.guild1}).exec(),f.guilds.findOne().where({name:t.guild2}).exec()]),[t.guild1,t.guild2])??[];if(!l)return null;const u=i==="gbcp"&&(cn.has(`${n}_gbcp_front`)||cn.has(`${n}_full`)),d=u?cn.get(`${n}_full`)??cn.get(`${n}_gbcp_front`)??cn.get(`${n}_front`):cn.get(`${n}_front`)??cn.get(`${n}_full`)??cn.get(`${n}_gbcp_front`);return v.jsx("div",{className:`card-front ${n} lang-${s} ${u&&"gbcp"} ${e.className}`,style:{"--team-color":l.color,"--gbcp-color":np(l.shadow??l.color).mix(np.rgb(254,246,227),.9).string(),"--guild1-color":l.color,"--guild2-color":c?c.color:void 0,"--mom-color":l.shadow,"--mom-border-color":l.darkColor,backgroundImage:e.noBackground?void 0:`url(${d})`,...e.style},children:v.jsxs("div",{className:`overlay ${u?"gbcp":""}`,children:[v.jsxs("div",{className:"font-top-box",children:[v.jsx(pte,{model:t,guild:l}),v.jsx(gte,{model:t})]}),v.jsx(mte,{model:t,gbcp:u}),v.jsx("div",{className:"character-plays-wrapper",children:v.jsx(yte,{model:t,gbcp:u})}),v.jsx(hte,{model:t,health$:e.health$})]})})},pte=({model:e,guild:t})=>v.jsxs("div",{className:"name-plate",children:[v.jsx("div",{className:"guild-icon",children:v.jsx(ji,{id:"guild-icon",icon:t.name})}),v.jsxs("div",{className:"name-plate-right",children:[v.jsx("div",{className:"name",children:v.jsx("div",{className:"dropcap",children:e.name.split(/(?=[A-Z])/).map((n,r)=>v.jsx("span",{children:n},r))})}),v.jsxs("div",{className:"reach",children:["Melee Zone ",e.reach?2:1,'"']})]})]}),hte=({model:e,health$:t})=>{const[n,r]=C.useState(e.hp);return C.useEffect(()=>{const i=t==null?void 0:t.subscribe(o=>r(o));return()=>i==null?void 0:i.unsubscribe()},[t]),v.jsx("div",{className:"health",children:[...Array(e.hp).keys()].map(i=>v.jsx("div",{className:`health-box ${i+1>n?"damaged":""}`,children:i===0&&v.jsx(ji,{icon:"skull",size:17})||i+1===e.recovery&&v.jsx(ji,{icon:"bandage",size:22})||i+1===e.hp&&i+1},i))})},mte=({model:e,gbcp:t=!1})=>{var n;return v.jsx("div",{className:"playbook",children:(n=e.playbook)==null?void 0:n.map((r,i)=>r==null?void 0:r.flatMap((o,s)=>{const[a,l]=o?o.split(";"):[null,null];return v.jsx("div",{className:`playbook-result ${a?"":"spacer"} ${l?"momentus":""}`,style:{"--col":s,display:"flex",flexDirection:t?"row":"column",padding:"0.10em",gap:t?0:"0.05em"},children:a?a.split(",").map((c,u)=>(c=t?c.replace(/^CP$/,"CP-gbcp").replace(/^CP2$/,"CP2-gbcp"):c,v.jsx(xI,{icon:c},u))):null},i*7+s)}))})},gte=({model:e})=>v.jsxs("div",{className:"statbox",children:[v.jsx("span",{children:"MOV"}),v.jsx("span",{children:"TAC"}),v.jsx("span",{children:"KICK"}),v.jsx("span",{children:"DEF"}),v.jsx("span",{children:"ARM"}),v.jsx("span",{children:"INF"}),v.jsx("span",{children:`${e.jog}"/${e.sprint}"`}),v.jsx("span",{children:e.tac}),v.jsx("span",{children:`${e.kickdice}/${e.kickdist}"`}),v.jsx("span",{children:`${e.def}+`}),v.jsx("span",{children:e.arm}),v.jsx("span",{children:`${e.inf}/${e.infmax}`})]}),$R=({test:e})=>v.jsx(ji,{icon:e?"checkmark":"ballotX",size:14});function vte({text:e}){const t=e.split("[",1)[0],n=e.replace(/[^[]*(\[.*\])?/," $1");return v.jsxs("div",{className:"name",children:[v.jsx("span",{children:t}),v.jsx("span",{children:n})]})}const yte=({model:e,gbcp:t=!1})=>v.jsxs("div",{className:"character-plays",children:[v.jsxs("span",{className:"dropcap",children:[v.jsx("span",{children:"Character "}),v.jsx("span",{children:"Plays"})]}),v.jsx("span",{children:"CST"}),v.jsx("span",{children:"RNG"}),v.jsx("span",{children:"SUS"}),v.jsx("span",{children:"OPT"}),e.character_plays.map(n=>v.jsxs(jt.Fragment,{children:[v.jsx(vte,{text:n.name}),v.jsx("span",{children:String(n.CST).split(",").map((r,i)=>v.jsxs("span",{children:[i>0&&"/",{CP:v.jsx(ji,{icon:t?"ball":"GB",size:18}),CP2:v.jsx(ji,{icon:t?"trophy":"GBT",size:18})}[r]||v.jsx("span",{children:r})]},i))}),v.jsxs("span",{children:[n.RNG,typeof n.RNG=="number"&&'"']}),v.jsx("span",{children:v.jsx($R,{test:n.SUS})}),v.jsx("span",{children:v.jsx($R,{test:n.OPT})}),v.jsx("div",{className:"text",children:ly(n.text)})]},n.name))]}),yg=jt.memo(fte),bte=e=>{const t=e.model,n=t.id,{setting$:r}=ui(),[i,o]=C.useState();C.useEffect(()=>{const c=r==null?void 0:r.pipe(qt(u=>u==null?void 0:u.toJSON().data.cardPreferences.preferredStyle)).subscribe(u=>o(u));return()=>c==null?void 0:c.unsubscribe()});const s=fo(c=>c.guilds.findOne().where({name:t.guild1}).exec(),[t.guild1]);if(!s)return null;const a=i==="gbcp"&&(cn.has(`${n}_gbcp_front`)||cn.has(`${n}_full`)),l=a?cn.get(`${n}_full`)??cn.get(`${n}_gbcp_back`)??cn.get(`${n}_back`):cn.get(`${n}_back`)??cn.get(`${n}_full`)??cn.get(`${n}_gbcp_back`);return v.jsx("div",{className:`card-back ${n} ${a&&"gbcp"} ${e.className}`,style:{"--team-color":s.color,"--gbcp-color":np(s.shadow??s.color).mix(np.rgb(254,246,227),.9),"--mom-color":s.shadow,"--mom-border-color":s.darkColor,backgroundImage:e.noBackground?void 0:`url(${l})`,...e.style},children:v.jsxs("div",{className:`overlay ${a?"gbcp":""}`,children:[v.jsxs("div",{className:"container",children:[v.jsxs("div",{className:"name-plate",children:[v.jsx("div",{className:"guild-icon",children:v.jsx(ji,{id:"guild-icon",icon:s.name})}),v.jsx("div",{className:"name dropcap",children:t.name.split(/(?=[A-Z])/).map((c,u)=>v.jsx("span",{children:c},u))})]}),v.jsx(wte,{model:t}),v.jsx(xte,{model:t}),v.jsx(Ste,{model:t})]}),v.jsxs("div",{className:"footer",children:[v.jsx("div",{className:"tags",children:t.types}),v.jsxs("div",{className:"right",children:[v.jsxs("div",{className:"icons",children:[v.jsx(Q0,{icon:a?"gbcp":"GB"}),v.jsx("div",{className:"icon wrapper",children:v.jsx("div",{style:{width:"100%",height:"100%",border:"2px solid black",borderRadius:"50%",display:"flex",placeContent:"center",alignItems:"center",fontFamily:"Crimson Text",fontSize:"26px",fontWeight:"800"},children:t.version})}),t.guild2&&v.jsx(Q0,{icon:t.guild2}),v.jsx(Q0,{icon:t.guild1})]}),v.jsx("div",{className:"base-size",children:`Size ${t.base} mm`})]})]})]})})},Q0=({icon:e})=>v.jsx("div",{className:"icon wrapper",children:v.jsx(ji,{icon:e})});function FS({text:e}){const t=e.split("[",1)[0],n=e.replace(/[^[]*(\[.*\])?/," $1");return v.jsxs("div",{children:[v.jsx("span",{children:t}),v.jsx("span",{children:n})]})}const wte=({model:e})=>v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"header dropcap",children:[v.jsx("span",{children:"Character "}),v.jsx("span",{children:"Traits"})]}),e.character_traits.map((t,n)=>v.jsxs(jt.Fragment,{children:[v.jsxs("div",{className:"character-trait",children:[v.jsx("div",{className:`trait ${t.active&&"active"}`,children:v.jsx(FS,{text:t.name.concat(t.parameter?` [${t.parameter}]`:"")})}),v.jsx("span",{className:"text",children:ly(t.text)})]},`${t.name}-${n}`),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]},`ct-${n}`))]}),xte=({model:e})=>{if(!e.heroic)return null;const t=e.heroic.split(` `,1)[0],n=e.heroic.split(` `).slice(1).join(` -`);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"header dropcap",children:[v.jsx("span",{children:"Heroic "}),v.jsx("span",{children:"Play"})]}),v.jsxs("div",{className:"heroic",children:[v.jsx(FS,{text:t}),v.jsx("span",{children:ly(n)})]}),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},Rte=({model:e})=>{if(!e.legendary)return null;const t=e.legendary.split(` +`);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"header dropcap",children:[v.jsx("span",{children:"Heroic "}),v.jsx("span",{children:"Play"})]}),v.jsxs("div",{className:"heroic",children:[v.jsx(FS,{text:t}),v.jsx("span",{children:ly(n)})]}),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},Ste=({model:e})=>{if(!e.legendary)return null;const t=e.legendary.split(` `,1)[0],n=e.legendary.split(` `).slice(1).join(` -`);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"header dropcap",children:[v.jsx("span",{children:"Legendary "}),v.jsx("span",{children:"Play"})]}),v.jsxs("div",{className:"legendary",children:[v.jsx(FS,{text:t}),v.jsx("span",{children:ly(n)})]}),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},bg=jt.memo(Cte);function qI({children:e,model:t,health$:n}){const r=C.useRef(null),i=C.useRef(null),[o,s]=C.useState(1);C.useLayoutEffect(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)));const a=C.useCallback(()=>{if(!r.current)return;const{width:l,height:c}=r.current.getBoundingClientRect(),u=l/500,d=c/700,f=Math.min(u,d,1);s(f??1)},[]);return v.jsx("div",{ref:r,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{ref:i,className:"flip-card",onClick:()=>{var l;(l=i.current)==null||l.classList.toggle("flipped")},children:v.jsxs("div",{className:"flip-card-inner",children:[v.jsxs("div",{className:"flip-card-front",children:[v.jsx(yg,{model:t,health$:n,style:{"--scale":o}}),e]}),v.jsx("div",{className:"flip-card-back",children:v.jsx(bg,{model:t,style:{"--scale":o}})})]})})})}function AR(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function zS(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(n=>{typeof e[n]>"u"?e[n]=t[n]:AR(t[n])&&AR(e[n])&&Object.keys(t[n]).length>0&&zS(e[n],t[n])})}const YI={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function ed(){const e=typeof document<"u"?document:{};return zS(e,YI),e}const Pte={document:YI,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function Di(){const e=typeof window<"u"?window:{};return zS(e,Pte),e}function Tte(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function Ote(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function X1(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function wg(){return Date.now()}function jte(e){const t=Di();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function Lte(e,t){t===void 0&&(t="x");const n=Di();let r,i,o;const s=jte(e);return n.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(a=>a.replace(",",".")).join(", ")),o=new n.WebKitCSSMatrix(i==="none"?"":i)):(o=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=o.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?i=o.m41:r.length===16?i=parseFloat(r[12]):i=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?i=o.m42:r.length===16?i=parseFloat(r[13]):i=parseFloat(r[5])),i||0}function Lh(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function Ite(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function bi(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;nt.indexOf(o)<0);for(let o=0,s=i.length;oo?"next":"prev",u=(f,m)=>c==="next"&&f>=m||c==="prev"&&f<=m,d=()=>{a=new Date().getTime(),s===null&&(s=a);const f=Math.max(Math.min((a-s)/l,1),0),m=.5-Math.cos(f*Math.PI)/2;let h=o+m*(n-o);if(u(h,n)&&(h=n),t.wrapperEl.scrollTo({[r]:h}),u(h,n)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:h})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(d)};d()}function Os(e,t){return t===void 0&&(t=""),[...e.children].filter(n=>n.matches(t))}function xg(e){try{console.warn(e);return}catch{}}function J1(e,t){t===void 0&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:Tte(t)),n}function Mte(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function Nte(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function ka(e,t){return Di().getComputedStyle(e,null).getPropertyValue(t)}function DR(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function $te(e,t){const n=[];let r=e.parentElement;for(;r;)n.push(r),r=r.parentElement;return n}function BR(e,t,n){const r=Di();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}let X0;function Ate(){const e=Di(),t=ed();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function XI(){return X0||(X0=Ate()),X0}let J0;function Dte(e){let{userAgent:t}=e===void 0?{}:e;const n=XI(),r=Di(),i=r.navigator.platform,o=t||r.navigator.userAgent,s={ios:!1,android:!1},a=r.screen.width,l=r.screen.height,c=o.match(/(Android);?[\s\/]+([\d.]+)?/);let u=o.match(/(iPad).*OS\s([\d_]+)/);const d=o.match(/(iPod)(.*OS\s([\d_]+))?/),f=!u&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m=i==="Win32";let h=i==="MacIntel";const g=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!u&&h&&n.touch&&g.indexOf(`${a}x${l}`)>=0&&(u=o.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),h=!1),c&&!m&&(s.os="android",s.android=!0),(u||f||d)&&(s.os="ios",s.ios=!0),s}function JI(e){return e===void 0&&(e={}),J0||(J0=Dte(e)),J0}let Z0;function Bte(){const e=Di(),t=JI();let n=!1;function r(){const a=e.navigator.userAgent.toLowerCase();return a.indexOf("safari")>=0&&a.indexOf("chrome")<0&&a.indexOf("android")<0}if(r()){const a=String(e.navigator.userAgent);if(a.includes("Version/")){const[l,c]=a.split("Version/")[1].split(" ")[0].split(".").map(u=>Number(u));n=l<16||l===16&&c<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),o=r(),s=o||i&&t.ios;return{isSafari:n||o,needPerspectiveFix:n,need3dFix:s,isWebView:i}}function Fte(){return Z0||(Z0=Bte()),Z0}function zte(e){let{swiper:t,on:n,emit:r}=e;const i=Di();let o=null,s=null;const a=()=>{!t||t.destroyed||!t.initialized||(r("beforeResize"),r("resize"))},l=()=>{!t||t.destroyed||!t.initialized||(o=new ResizeObserver(d=>{s=i.requestAnimationFrame(()=>{const{width:f,height:m}=t;let h=f,g=m;d.forEach(E=>{let{contentBoxSize:b,contentRect:w,target:y}=E;y&&y!==t.el||(h=w?w.width:(b[0]||b).inlineSize,g=w?w.height:(b[0]||b).blockSize)}),(h!==f||g!==m)&&a()})}),o.observe(t.el))},c=()=>{s&&i.cancelAnimationFrame(s),o&&o.unobserve&&t.el&&(o.unobserve(t.el),o=null)},u=()=>{!t||t.destroyed||!t.initialized||r("orientationchange")};n("init",()=>{if(t.params.resizeObserver&&typeof i.ResizeObserver<"u"){l();return}i.addEventListener("resize",a),i.addEventListener("orientationchange",u)}),n("destroy",()=>{c(),i.removeEventListener("resize",a),i.removeEventListener("orientationchange",u)})}function Ute(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const o=[],s=Di(),a=function(u,d){d===void 0&&(d={});const f=s.MutationObserver||s.WebkitMutationObserver,m=new f(h=>{if(t.__preventObserver__)return;if(h.length===1){i("observerUpdate",h[0]);return}const g=function(){i("observerUpdate",h[0])};s.requestAnimationFrame?s.requestAnimationFrame(g):s.setTimeout(g,0)});m.observe(u,{attributes:typeof d.attributes>"u"?!0:d.attributes,childList:typeof d.childList>"u"?!0:d.childList,characterData:typeof d.characterData>"u"?!0:d.characterData}),o.push(m)},l=()=>{if(t.params.observer){if(t.params.observeParents){const u=$te(t.hostEl);for(let d=0;d{o.forEach(u=>{u.disconnect()}),o.splice(0,o.length)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",l),r("destroy",c)}var Wte={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;const i=n?"unshift":"push";return e.split(" ").forEach(o=>{r.eventsListeners[o]||(r.eventsListeners[o]=[]),r.eventsListeners[o][i](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;function i(){r.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var o=arguments.length,s=new Array(o),a=0;a=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(r=>{typeof t>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((i,o)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[r].splice(o,1)})}),n},emit(){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,n,r;for(var i=arguments.length,o=new Array(i),s=0;s{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(c=>{c.apply(r,[l,...n])}),e.eventsListeners&&e.eventsListeners[l]&&e.eventsListeners[l].forEach(c=>{c.apply(r,n)})}),e}};function Gte(){const e=this;let t,n;const r=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=r.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?n=e.params.height:n=r.clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(ka(r,"padding-left")||0,10)-parseInt(ka(r,"padding-right")||0,10),n=n-parseInt(ka(r,"padding-top")||0,10)-parseInt(ka(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function Hte(){const e=this;function t(L,N){return parseFloat(L.getPropertyValue(e.getDirectionLabel(N))||0)}const n=e.params,{wrapperEl:r,slidesEl:i,size:o,rtlTranslate:s,wrongRTL:a}=e,l=e.virtual&&n.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,u=Os(i,`.${e.params.slideClass}, swiper-slide`),d=l?e.virtual.slides.length:u.length;let f=[];const m=[],h=[];let g=n.slidesOffsetBefore;typeof g=="function"&&(g=n.slidesOffsetBefore.call(e));let E=n.slidesOffsetAfter;typeof E=="function"&&(E=n.slidesOffsetAfter.call(e));const b=e.snapGrid.length,w=e.slidesGrid.length;let y=n.spaceBetween,_=-g,k=0,R=0;if(typeof o>"u")return;typeof y=="string"&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*o:typeof y=="string"&&(y=parseFloat(y)),e.virtualSize=-y,u.forEach(L=>{s?L.style.marginLeft="":L.style.marginRight="",L.style.marginBottom="",L.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(Ih(r,"--swiper-centered-offset-before",""),Ih(r,"--swiper-centered-offset-after",""));const P=n.grid&&n.grid.rows>1&&e.grid;P?e.grid.initSlides(u):e.grid&&e.grid.unsetSlides();let I;const $=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(L=>typeof n.breakpoints[L].slidesPerView<"u").length>0;for(let L=0;L1&&f.push(e.virtualSize-o)}if(l&&n.loop){const L=h[0]+y;if(n.slidesPerGroup>1){const N=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),F=L*n.slidesPerGroup;for(let z=0;z!n.cssMode||n.loop?!0:F!==u.length-1).forEach(N=>{N.style[L]=`${y}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let L=0;h.forEach(F=>{L+=F+(y||0)}),L-=y;const N=L-o;f=f.map(F=>F<=0?-g:F>N?N+E:F)}if(n.centerInsufficientSlides){let L=0;h.forEach(F=>{L+=F+(y||0)}),L-=y;const N=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(L+N{f[K]=z-F}),m.forEach((z,K)=>{m[K]=z+F})}}if(Object.assign(e,{slides:u,snapGrid:f,slidesGrid:m,slidesSizesGrid:h}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){Ih(r,"--swiper-centered-offset-before",`${-f[0]}px`),Ih(r,"--swiper-centered-offset-after",`${e.size/2-h[h.length-1]/2}px`);const L=-e.snapGrid[0],N=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(F=>F+L),e.slidesGrid=e.slidesGrid.map(F=>F+N)}if(d!==c&&e.emit("slidesLengthChange"),f.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),m.length!==w&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!l&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const L=`${n.containerModifierClass}backface-hidden`,N=e.el.classList.contains(L);d<=n.maxBackfaceHiddenSlides?N||e.el.classList.add(L):N&&e.el.classList.remove(L)}}function Vte(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let i=0,o;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const s=a=>r?t.slides[t.getSlideIndexByData(a)]:t.slides[a];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(a=>{n.push(a)});else for(o=0;ot.slides.length&&!r)break;n.push(s(a))}else n.push(s(t.activeIndex));for(o=0;oi?a:i}(i||i===0)&&(t.wrapperEl.style.height=`${i}px`)}function Kte(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function qte(e){e===void 0&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:r,rtlTranslate:i,snapGrid:o}=t;if(r.length===0)return;typeof r[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let s=-e;i&&(s=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=n.spaceBetween;typeof a=="string"&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:typeof a=="string"&&(a=parseFloat(a));for(let l=0;l=0&&m<=t.size-t.slidesSizesGrid[l],E=m>=0&&m1&&h<=t.size||m<=0&&h>=t.size;E&&(t.visibleSlides.push(c),t.visibleSlidesIndexes.push(l)),FR(c,E,n.slideVisibleClass),FR(c,g,n.slideFullyVisibleClass),c.progress=i?-d:d,c.originalProgress=i?-f:f}}function Yte(e){const t=this;if(typeof e>"u"){const u=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*u||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:o,isEnd:s,progressLoop:a}=t;const l=o,c=s;if(r===0)i=0,o=!0,s=!0;else{i=(e-t.minTranslate())/r;const u=Math.abs(e-t.minTranslate())<1,d=Math.abs(e-t.maxTranslate())<1;o=u||i<=0,s=d||i>=1,u&&(i=0),d&&(i=1)}if(n.loop){const u=t.getSlideIndexByData(0),d=t.getSlideIndexByData(t.slides.length-1),f=t.slidesGrid[u],m=t.slidesGrid[d],h=t.slidesGrid[t.slidesGrid.length-1],g=Math.abs(e);g>=f?a=(g-f)/h:a=(g+h-m)/h,a>1&&(a-=1)}Object.assign(t,{progress:i,progressLoop:a,isBeginning:o,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!c&&t.emit("reachEnd toEdge"),(l&&!o||c&&!s)&&t.emit("fromEdge"),t.emit("progress",i)}const eb=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function Qte(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:i}=e,o=e.virtual&&n.virtual.enabled,s=e.grid&&n.grid&&n.grid.rows>1,a=d=>Os(r,`.${n.slideClass}${d}, swiper-slide${d}`)[0];let l,c,u;if(o)if(n.loop){let d=i-e.virtual.slidesBefore;d<0&&(d=e.virtual.slides.length+d),d>=e.virtual.slides.length&&(d-=e.virtual.slides.length),l=a(`[data-swiper-slide-index="${d}"]`)}else l=a(`[data-swiper-slide-index="${i}"]`);else s?(l=t.filter(d=>d.column===i)[0],u=t.filter(d=>d.column===i+1)[0],c=t.filter(d=>d.column===i-1)[0]):l=t[i];l&&(s||(u=Nte(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!u&&(u=t[0]),c=Mte(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!c===0&&(c=t[t.length-1]))),t.forEach(d=>{eb(d,d===l,n.slideActiveClass),eb(d,d===u,n.slideNextClass),eb(d,d===c,n.slidePrevClass)}),e.emitSlidesClasses()}const lm=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,r=t.closest(n());if(r){let i=r.querySelector(`.${e.params.lazyPreloaderClass}`);!i&&e.isElement&&(r.shadowRoot?i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),i&&i.remove())})),i&&i.remove()}},tb=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},Z1=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=i,a=[s-t];a.push(...Array.from({length:t}).map((l,c)=>s+r+c)),e.slides.forEach((l,c)=>{a.includes(l.column)&&tb(e,c)});return}const o=i+r-1;if(e.params.rewind||e.params.loop)for(let s=i-t;s<=o+t;s+=1){const a=(s%n+n)%n;(ao)&&tb(e,a)}else for(let s=Math.max(i-t,0);s<=Math.min(o+t,n-1);s+=1)s!==i&&(s>o||s=t[o]&&r=t[o]&&r=t[o]&&(i=o);return n.normalizeSlideIndex&&(i<0||typeof i>"u")&&(i=0),i}function Jte(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:i,activeIndex:o,realIndex:s,snapIndex:a}=t;let l=e,c;const u=m=>{let h=m-t.virtual.slidesBefore;return h<0&&(h=t.virtual.slides.length+h),h>=t.virtual.slides.length&&(h-=t.virtual.slides.length),h};if(typeof l>"u"&&(l=Xte(t)),r.indexOf(n)>=0)c=r.indexOf(n);else{const m=Math.min(i.slidesPerGroupSkip,l);c=m+Math.floor((l-m)/i.slidesPerGroup)}if(c>=r.length&&(c=r.length-1),l===o&&!t.params.loop){c!==a&&(t.snapIndex=c,t.emit("snapIndexChange"));return}if(l===o&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=u(l);return}const d=t.grid&&i.grid&&i.grid.rows>1;let f;if(t.virtual&&i.virtual.enabled&&i.loop)f=u(l);else if(d){const m=t.slides.filter(g=>g.column===l)[0];let h=parseInt(m.getAttribute("data-swiper-slide-index"),10);Number.isNaN(h)&&(h=Math.max(t.slides.indexOf(m),0)),f=Math.floor(h/i.grid.rows)}else if(t.slides[l]){const m=t.slides[l].getAttribute("data-swiper-slide-index");m?f=parseInt(m,10):f=l}else f=l;Object.assign(t,{previousSnapIndex:a,snapIndex:c,previousRealIndex:s,realIndex:f,previousIndex:o,activeIndex:l}),t.initialized&&Z1(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==f&&t.emit("realIndexChange"),t.emit("slideChange"))}function Zte(e,t){const n=this,r=n.params;let i=e.closest(`.${r.slideClass}, swiper-slide`);!i&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(a=>{!i&&a.matches&&a.matches(`.${r.slideClass}, swiper-slide`)&&(i=a)});let o=!1,s;if(i){for(let a=0;al?u=l:r&&es?a="next":o"u"&&(t=o.params.speed);const g=Math.min(o.params.slidesPerGroupSkip,s);let E=g+Math.floor((s-g)/o.params.slidesPerGroup);E>=l.length&&(E=l.length-1);const b=-l[E];if(a.normalizeSlideIndex)for(let y=0;y=k&&_=k&&_=k&&(s=y)}if(o.initialized&&s!==d&&(!o.allowSlideNext&&(f?b>o.translate&&b>o.minTranslate():bo.translate&&b>o.maxTranslate()&&(d||0)!==s))return!1;s!==(u||0)&&n&&o.emit("beforeSlideChangeStart"),o.updateProgress(b);let w;if(s>d?w="next":s0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{m[y?"scrollLeft":"scrollTop"]=_})):m[y?"scrollLeft":"scrollTop"]=_,k&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1})}else{if(!o.support.smoothScroll)return QI({swiper:o,targetPosition:_,side:y?"left":"top"}),!0;m.scrollTo({[y?"left":"top"]:_,behavior:"smooth"})}return!0}return o.setTransition(t),o.setTranslate(b),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,r),o.transitionStart(n,w),t===0?o.transitionEnd(n,w):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(_){!o||o.destroyed||_.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,w))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0}function fne(e,t,n,r){e===void 0&&(e=0),n===void 0&&(n=!0),typeof e=="string"&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;typeof t>"u"&&(t=i.params.speed);const o=i.grid&&i.params.grid&&i.params.grid.rows>1;let s=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)s=s+i.virtual.slidesBefore;else{let a;if(o){const f=s*i.params.grid.rows;a=i.slides.filter(m=>m.getAttribute("data-swiper-slide-index")*1===f)[0].column}else a=i.getSlideIndexByData(s);const l=o?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:c}=i.params;let u=i.params.slidesPerView;u==="auto"?u=i.slidesPerViewDynamic():(u=Math.ceil(parseFloat(i.params.slidesPerView,10)),c&&u%2===0&&(u=u+1));let d=l-am.getAttribute("data-swiper-slide-index")*1===f)[0].column}else s=i.getSlideIndexByData(s)}return requestAnimationFrame(()=>{i.slideTo(s,t,n,r)}),i}function pne(e,t,n){t===void 0&&(t=!0);const r=this,{enabled:i,params:o,animating:s}=r;if(!i||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);let a=o.slidesPerGroup;o.slidesPerView==="auto"&&o.slidesPerGroup===1&&o.slidesPerGroupAuto&&(a=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex{r.slideTo(r.activeIndex+l,e,t,n)}),!0}return o.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)}function hne(e,t,n){t===void 0&&(t=!0);const r=this,{params:i,snapGrid:o,slidesGrid:s,rtlTranslate:a,enabled:l,animating:c}=r;if(!l||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const u=r.virtual&&i.virtual.enabled;if(i.loop){if(c&&!u&&i.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const d=a?r.translate:-r.translate;function f(b){return b<0?-Math.floor(Math.abs(b)):Math.floor(b)}const m=f(d),h=o.map(b=>f(b));let g=o[h.indexOf(m)-1];if(typeof g>"u"&&i.cssMode){let b;o.forEach((w,y)=>{m>=w&&(b=y)}),typeof b<"u"&&(g=o[b>0?b-1:b])}let E=0;if(typeof g<"u"&&(E=s.indexOf(g),E<0&&(E=r.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(E=E-r.slidesPerViewDynamic("previous",!0)+1,E=Math.max(E,0))),i.rewind&&r.isBeginning){const b=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(b,e,t,n)}else if(i.loop&&r.activeIndex===0&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(E,e,t,n)}),!0;return r.slideTo(E,e,t,n)}function mne(e,t,n){t===void 0&&(t=!0);const r=this;if(!r.destroyed)return typeof e>"u"&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)}function gne(e,t,n,r){t===void 0&&(t=!0),r===void 0&&(r=.5);const i=this;if(i.destroyed)return;typeof e>"u"&&(e=i.params.speed);let o=i.activeIndex;const s=Math.min(i.params.slidesPerGroupSkip,o),a=s+Math.floor((o-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[a]){const c=i.snapGrid[a],u=i.snapGrid[a+1];l-c>(u-c)*r&&(o+=i.params.slidesPerGroup)}else{const c=i.snapGrid[a-1],u=i.snapGrid[a];l-c<=(u-c)*r&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,e,t,n)}function vne(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let i=e.clickedIndex,o;const s=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;o=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?ie.slides.length-e.loopedSlides+r/2?(e.loopFix(),i=e.getSlideIndex(Os(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),X1(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-r?(e.loopFix(),i=e.getSlideIndex(Os(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),X1(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}var yne={slideTo:dne,slideToLoop:fne,slideNext:pne,slidePrev:hne,slideReset:mne,slideToClosest:gne,slideToClickedSlide:vne};function bne(e){const t=this,{params:n,slidesEl:r}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const i=()=>{Os(r,`.${n.slideClass}, swiper-slide`).forEach((d,f)=>{d.setAttribute("data-swiper-slide-index",f)})},o=t.grid&&n.grid&&n.grid.rows>1,s=n.slidesPerGroup*(o?n.grid.rows:1),a=t.slides.length%s!==0,l=o&&t.slides.length%n.grid.rows!==0,c=u=>{for(let d=0;d1;c.length"u"?o=l.getSlideIndex(c.filter(z=>z.classList.contains(m.slideActiveClass))[0]):k=o;const R=r==="next"||!r,P=r==="prev"||!r;let I=0,$=0;const L=w?Math.ceil(c.length/m.grid.rows):c.length,F=(w?c[o].column:o)+(h&&typeof i>"u"?-g/2+.5:0);if(F=0;le-=1)c[le].column===Z&&y.push(le)}else y.push(L-K-1)}}else if(F+g>L-b){$=Math.max(F-(L-b*2),E);for(let z=0;z<$;z+=1){const K=z-Math.floor(z/L)*L;w?c.forEach((Z,le)=>{Z.column===K&&_.push(le)}):_.push(K)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),P&&y.forEach(z=>{c[z].swiperLoopMoveDOM=!0,f.prepend(c[z]),c[z].swiperLoopMoveDOM=!1}),R&&_.forEach(z=>{c[z].swiperLoopMoveDOM=!0,f.append(c[z]),c[z].swiperLoopMoveDOM=!1}),l.recalcSlides(),m.slidesPerView==="auto"?l.updateSlides():w&&(y.length>0&&P||_.length>0&&R)&&l.slides.forEach((z,K)=>{l.grid.updateSlide(K,z,l.slides)}),m.watchSlidesProgress&&l.updateSlidesOffset(),n){if(y.length>0&&P){if(typeof t>"u"){const z=l.slidesGrid[k],Z=l.slidesGrid[k+I]-z;a?l.setTranslate(l.translate-Z):(l.slideTo(k+Math.ceil(I),0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-Z,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-Z))}else if(i){const z=w?y.length/m.grid.rows:y.length;l.slideTo(l.activeIndex+z,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(_.length>0&&R)if(typeof t>"u"){const z=l.slidesGrid[k],Z=l.slidesGrid[k-$]-z;a?l.setTranslate(l.translate-Z):(l.slideTo(k-$,0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-Z,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-Z))}else{const z=w?_.length/m.grid.rows:_.length;l.slideTo(l.activeIndex-z,0,!1,!0)}}if(l.allowSlidePrev=u,l.allowSlideNext=d,l.controller&&l.controller.control&&!s){const z={slideRealIndex:t,direction:r,setTranslate:i,activeSlideIndex:o,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach(K=>{!K.destroyed&&K.params.loop&&K.loopFix({...z,slideTo:K.params.slidesPerView===m.slidesPerView?n:!1})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...z,slideTo:l.controller.control.params.slidesPerView===m.slidesPerView?n:!1})}l.emit("loopFix")}function xne(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(i=>{const o=typeof i.swiperSlideIndex>"u"?i.getAttribute("data-swiper-slide-index")*1:i.swiperSlideIndex;r[o]=i}),e.slides.forEach(i=>{i.removeAttribute("data-swiper-slide-index")}),r.forEach(i=>{n.append(i)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var Sne={loopCreate:bne,loopFix:wne,loopDestroy:xne};function _ne(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function Cne(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var kne={setGrabCursor:_ne,unsetGrabCursor:Cne};function Ene(e,t){t===void 0&&(t=this);function n(r){if(!r||r===ed()||r===Di())return null;r.assignedSlot&&(r=r.assignedSlot);const i=r.closest(e);return!i&&!r.getRootNode?null:i||n(r.getRootNode().host)}return n(t)}function zR(e,t,n){const r=Di(),{params:i}=e,o=i.edgeSwipeDetection,s=i.edgeSwipeThreshold;return o&&(n<=s||n>=r.innerWidth-s)?o==="prevent"?(t.preventDefault(),!0):!1:!0}function Rne(e){const t=this,n=ed();let r=e;r.originalEvent&&(r=r.originalEvent);const i=t.touchEventsData;if(r.type==="pointerdown"){if(i.pointerId!==null&&i.pointerId!==r.pointerId)return;i.pointerId=r.pointerId}else r.type==="touchstart"&&r.targetTouches.length===1&&(i.touchId=r.targetTouches[0].identifier);if(r.type==="touchstart"){zR(t,r,r.targetTouches[0].pageX);return}const{params:o,touches:s,enabled:a}=t;if(!a||!o.simulateTouch&&r.pointerType==="mouse"||t.animating&&o.preventInteractionOnTransition)return;!t.animating&&o.cssMode&&o.loop&&t.loopFix();let l=r.target;if(o.touchEventsTarget==="wrapper"&&!t.wrapperEl.contains(l)||"which"in r&&r.which===3||"button"in r&&r.button>0||i.isTouched&&i.isMoved)return;const c=!!o.noSwipingClass&&o.noSwipingClass!=="",u=r.composedPath?r.composedPath():r.path;c&&r.target&&r.target.shadowRoot&&u&&(l=u[0]);const d=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,f=!!(r.target&&r.target.shadowRoot);if(o.noSwiping&&(f?Ene(d,l):l.closest(d))){t.allowClick=!0;return}if(o.swipeHandler&&!l.closest(o.swipeHandler))return;s.currentX=r.pageX,s.currentY=r.pageY;const m=s.currentX,h=s.currentY;if(!zR(t,r,m))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=m,s.startY=h,i.touchStartTime=wg(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(i.allowThresholdMove=!1);let g=!0;l.matches(i.focusableElements)&&(g=!1,l.nodeName==="SELECT"&&(i.isTouched=!1)),n.activeElement&&n.activeElement.matches(i.focusableElements)&&n.activeElement!==l&&n.activeElement.blur();const E=g&&t.allowTouchMove&&o.touchStartPreventDefault;(o.touchStartForcePreventDefault||E)&&!l.isContentEditable&&r.preventDefault(),o.freeMode&&o.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function Pne(e){const t=ed(),n=this,r=n.touchEventsData,{params:i,touches:o,rtlTranslate:s,enabled:a}=n;if(!a||!i.simulateTouch&&e.pointerType==="mouse")return;let l=e;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(r.touchId!==null||l.pointerId!==r.pointerId))return;let c;if(l.type==="touchmove"){if(c=[...l.changedTouches].filter(R=>R.identifier===r.touchId)[0],!c||c.identifier!==r.touchId)return}else c=l;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l);return}const u=c.pageX,d=c.pageY;if(l.preventedByNestedSwiper){o.startX=u,o.startY=d;return}if(!n.allowTouchMove){l.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(o,{startX:u,startY:d,currentX:u,currentY:d}),r.touchStartTime=wg());return}if(i.touchReleaseOnEdges&&!i.loop){if(n.isVertical()){if(do.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else if(uo.startX&&n.translate>=n.minTranslate())return}if(t.activeElement&&l.target===t.activeElement&&l.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",l),o.previousX=o.currentX,o.previousY=o.currentY,o.currentX=u,o.currentY=d;const f=o.currentX-o.startX,m=o.currentY-o.startY;if(n.params.threshold&&Math.sqrt(f**2+m**2)"u"){let R;n.isHorizontal()&&o.currentY===o.startY||n.isVertical()&&o.currentX===o.startX?r.isScrolling=!1:f*f+m*m>=25&&(R=Math.atan2(Math.abs(m),Math.abs(f))*180/Math.PI,r.isScrolling=n.isHorizontal()?R>i.touchAngle:90-R>i.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",l),typeof r.startMoving>"u"&&(o.currentX!==o.startX||o.currentY!==o.startY)&&(r.startMoving=!0),r.isScrolling||l.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let h=n.isHorizontal()?f:m,g=n.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;i.oneWayMovement&&(h=Math.abs(h)*(s?1:-1),g=Math.abs(g)*(s?1:-1)),o.diff=h,h*=i.touchRatio,s&&(h=-h,g=-g);const E=n.touchesDirection;n.swipeDirection=h>0?"prev":"next",n.touchesDirection=g>0?"prev":"next";const b=n.params.loop&&!i.cssMode,w=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(b&&w&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const R=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(R)}r.allowMomentumBounce=!1,i.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",l)}let y;if(new Date().getTime(),r.isMoved&&r.allowThresholdMove&&E!==n.touchesDirection&&b&&w&&Math.abs(h)>=1){Object.assign(o,{startX:u,startY:d,currentX:u,currentY:d,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",l),r.isMoved=!0,r.currentTranslate=h+r.startTranslate;let _=!0,k=i.resistanceRatio;if(i.touchReleaseOnEdges&&(k=0),h>0?(b&&w&&!y&&r.allowThresholdMove&&r.currentTranslate>(i.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(_=!1,i.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+h)**k))):h<0&&(b&&w&&!y&&r.allowThresholdMove&&r.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]:n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-(i.slidesPerView==="auto"?n.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),r.currentTranslater.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),i.threshold>0)if(Math.abs(h)>i.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,r.currentTranslate=r.startTranslate,o.diff=n.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY;return}}else{r.currentTranslate=r.startTranslate;return}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function Tne(e){const t=this,n=t.touchEventsData;let r=e;r.originalEvent&&(r=r.originalEvent);let i;if(r.type==="touchend"||r.type==="touchcancel"){if(i=[...r.changedTouches].filter(k=>k.identifier===n.touchId)[0],!i||i.identifier!==n.touchId)return}else{if(n.touchId!==null||r.pointerId!==n.pointerId)return;i=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return;n.pointerId=null,n.touchId=null;const{params:s,touches:a,rtlTranslate:l,slidesGrid:c,enabled:u}=t;if(!u||!s.simulateTouch&&r.pointerType==="mouse")return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&s.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}s.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const d=wg(),f=d-n.touchStartTime;if(t.allowClick){const k=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(k&&k[0]||r.target,k),t.emit("tap click",r),f<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=wg(),X1(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||a.diff===0&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let m;if(s.followFinger?m=l?t.translate:-t.translate:m=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:m});return}const h=m>=-t.maxTranslate()&&!t.params.loop;let g=0,E=t.slidesSizesGrid[0];for(let k=0;k=c[k]&&m=c[k])&&(g=k,E=c[c.length-1]-c[c.length-2])}let b=null,w=null;s.rewind&&(t.isBeginning?w=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const y=(m-c[g])/E,_=gs.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(y>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?b:g+_):t.slideTo(g)),t.swipeDirection==="prev"&&(y>1-s.longSwipesRatio?t.slideTo(g+_):w!==null&&y<0&&Math.abs(y)>s.longSwipesRatio?t.slideTo(w):t.slideTo(g))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(g+_):t.slideTo(g):(t.swipeDirection==="next"&&t.slideTo(b!==null?b:g+_),t.swipeDirection==="prev"&&t.slideTo(w!==null?w:g))}}function UR(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:i,snapGrid:o}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const a=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!a?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=i,e.allowSlideNext=r,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function One(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function jne(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let i;const o=e.maxTranslate()-e.minTranslate();o===0?i=0:i=(e.translate-e.minTranslate())/o,i!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function Lne(e){const t=this;lm(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function Ine(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const eM=(e,t)=>{const n=ed(),{params:r,el:i,wrapperEl:o,device:s}=e,a=!!r.nested,l=t==="on"?"addEventListener":"removeEventListener",c=t;!i||typeof i=="string"||(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:a}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:a}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:a}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&i[l]("click",e.onClick,!0),r.cssMode&&o[l]("scroll",e.onScroll),r.updateOnWindowResize?e[c](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",UR,!0):e[c]("observerUpdate",UR,!0),i[l]("load",e.onLoad,{capture:!0}))};function Mne(){const e=this,{params:t}=e;e.onTouchStart=Rne.bind(e),e.onTouchMove=Pne.bind(e),e.onTouchEnd=Tne.bind(e),e.onDocumentTouchStart=Ine.bind(e),t.cssMode&&(e.onScroll=jne.bind(e)),e.onClick=One.bind(e),e.onLoad=Lne.bind(e),eM(e,"on")}function Nne(){eM(this,"off")}var $ne={attachEvents:Mne,detachEvents:Nne};const WR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function Ane(){const e=this,{realIndex:t,initialized:n,params:r,el:i}=e,o=r.breakpoints;if(!o||o&&Object.keys(o).length===0)return;const s=e.getBreakpoint(o,e.params.breakpointsBase,e.el);if(!s||e.currentBreakpoint===s)return;const l=(s in o?o[s]:void 0)||e.originalParams,c=WR(e,r),u=WR(e,l),d=e.params.grabCursor,f=l.grabCursor,m=r.enabled;c&&!u?(i.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&u&&(i.classList.add(`${r.containerModifierClass}grid`),(l.grid.fill&&l.grid.fill==="column"||!l.grid.fill&&r.grid.fill==="column")&&i.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),d&&!f?e.unsetGrabCursor():!d&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(y=>{if(typeof l[y]>"u")return;const _=r[y]&&r[y].enabled,k=l[y]&&l[y].enabled;_&&!k&&e[y].disable(),!_&&k&&e[y].enable()});const h=l.direction&&l.direction!==r.direction,g=r.loop&&(l.slidesPerView!==r.slidesPerView||h),E=r.loop;h&&n&&e.changeDirection(),bi(e.params,l);const b=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),m&&!b?e.disable():!m&&b&&e.enable(),e.currentBreakpoint=s,e.emit("_beforeBreakpoint",l),n&&(g?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!E&&w?(e.loopCreate(t),e.updateSlides()):E&&!w&&e.loopDestroy()),e.emit("breakpoint",l)}function Dne(e,t,n){if(t===void 0&&(t="window"),!e||t==="container"&&!n)return;let r=!1;const i=Di(),o=t==="window"?i.innerHeight:n.clientHeight,s=Object.keys(e).map(a=>{if(typeof a=="string"&&a.indexOf("@")===0){const l=parseFloat(a.substr(1));return{value:o*l,point:a}}return{value:a,point:a}});s.sort((a,l)=>parseInt(a.value,10)-parseInt(l.value,10));for(let a=0;a{typeof r=="object"?Object.keys(r).forEach(i=>{r[i]&&n.push(t+i)}):typeof r=="string"&&n.push(t+r)}),n}function zne(){const e=this,{classNames:t,params:n,rtl:r,el:i,device:o}=e,s=Fne(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:o.android},{ios:o.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),i.classList.add(...t),e.emitContainerClasses()}function Une(){const e=this,{el:t,classNames:n}=e;!t||typeof t=="string"||(t.classList.remove(...n),e.emitContainerClasses())}var Wne={addClasses:zne,removeClasses:Une};function Gne(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const i=e.slides.length-1,o=e.slidesGrid[i]+e.slidesSizesGrid[i]+r*2;e.isLocked=e.size>o}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var Hne={checkOverflow:Gne},ew={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function Vne(e,t){return function(r){r===void 0&&(r={});const i=Object.keys(r)[0],o=r[i];if(typeof o!="object"||o===null){bi(t,r);return}if(e[i]===!0&&(e[i]={enabled:!0}),i==="navigation"&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),!(i in e&&"enabled"in o)){bi(t,r);return}typeof e[i]=="object"&&!("enabled"in e[i])&&(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),bi(t,r)}}const nb={eventsEmitter:Wte,update:ene,translate:sne,transition:une,slide:yne,loop:Sne,grabCursor:kne,events:$ne,breakpoints:Bne,checkOverflow:Hne,classes:Wne},rb={};let US=class ws{constructor(){let t,n;for(var r=arguments.length,i=new Array(r),o=0;o1){const u=[];return s.querySelectorAll(n.el).forEach(d=>{const f=bi({},n,{el:d});u.push(new ws(f))}),u}const a=this;a.__swiper__=!0,a.support=XI(),a.device=JI({userAgent:n.userAgent}),a.browser=Fte(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],n.modules&&Array.isArray(n.modules)&&a.modules.push(...n.modules);const l={};a.modules.forEach(u=>{u({params:n,swiper:a,extendParams:Vne(n,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const c=bi({},ew,l);return a.params=bi({},c,rb,n),a.originalParams=bi({},a.params),a.passedParams=bi({},n),a.params&&a.params.on&&Object.keys(a.params.on).forEach(u=>{a.on(u,a.params.on[u])}),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return a.params.direction==="horizontal"},isVertical(){return a.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:n,params:r}=this,i=Os(n,`.${r.slideClass}, swiper-slide`),o=DR(i[0]);return DR(t)-o}getSlideIndexByData(t){return this.getSlideIndex(this.slides.filter(n=>n.getAttribute("data-swiper-slide-index")*1===t)[0])}recalcSlides(){const t=this,{slidesEl:n,params:r}=t;t.slides=Os(n,`.${r.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,n){const r=this;t=Math.min(Math.max(t,0),1);const i=r.minTranslate(),s=(r.maxTranslate()-i)*t+i;r.translateTo(s,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.forEach(r=>{const i=t.getSlideClasses(r);n.push({slideEl:r,classNames:i}),t.emit("_slideClass",r,i)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t,n){t===void 0&&(t="current"),n===void 0&&(n=!1);const r=this,{params:i,slides:o,slidesGrid:s,slidesSizesGrid:a,size:l,activeIndex:c}=r;let u=1;if(typeof i.slidesPerView=="number")return i.slidesPerView;if(i.centeredSlides){let d=o[c]?Math.ceil(o[c].swiperSlideSize):0,f;for(let m=c+1;ml&&(f=!0));for(let m=c-1;m>=0;m-=1)o[m]&&!f&&(d+=o[m].swiperSlideSize,u+=1,d>l&&(f=!0))}else if(t==="current")for(let d=c+1;d=0;d-=1)s[c]-s[d]{s.complete&&lm(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function i(){const s=t.rtlTranslate?t.translate*-1:t.translate,a=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(a),t.updateActiveIndex(),t.updateSlidesClasses()}let o;if(r.freeMode&&r.freeMode.enabled&&!r.cssMode)i(),r.autoHeight&&t.updateAutoHeight();else{if((r.slidesPerView==="auto"||r.slidesPerView>1)&&t.isEnd&&!r.centeredSlides){const s=t.virtual&&r.virtual.enabled?t.virtual.slides:t.slides;o=t.slideTo(s.length-1,0,!1,!0)}else o=t.slideTo(t.activeIndex,0,!1,!0);o||i()}r.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n){n===void 0&&(n=!0);const r=this,i=r.params.direction;return t||(t=i==="horizontal"?"vertical":"horizontal"),t===i||t!=="horizontal"&&t!=="vertical"||(r.el.classList.remove(`${r.params.containerModifierClass}${i}`),r.el.classList.add(`${r.params.containerModifierClass}${t}`),r.emitContainerClasses(),r.params.direction=t,r.slides.forEach(o=>{t==="vertical"?o.style.width="":o.style.height=""}),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.el.classList.add(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.el.classList.remove(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;let r=t||n.params.el;if(typeof r=="string"&&(r=document.querySelector(r)),!r)return!1;r.swiper=n,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===n.params.swiperElementNodeName.toUpperCase()&&(n.isElement=!0);const i=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=r&&r.shadowRoot&&r.shadowRoot.querySelector?r.shadowRoot.querySelector(i()):Os(r,i())[0];return!s&&n.params.createElements&&(s=J1("div",n.params.wrapperClass),r.append(s),Os(r,`.${n.params.slideClass}`).forEach(a=>{s.append(a)})),Object.assign(n,{el:r,wrapperEl:s,slidesEl:n.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:s,hostEl:n.isElement?r.parentNode.host:r,mounted:!0,rtl:r.dir.toLowerCase()==="rtl"||ka(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||ka(r,"direction")==="rtl"),wrongRTL:ka(s,"display")==="-webkit-box"}),!0}init(t){const n=this;if(n.initialized||n.mount(t)===!1)return n;n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.loop&&n.virtual&&n.params.virtual.enabled?n.slideTo(n.params.initialSlide+n.virtual.slidesBefore,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.params.loop&&n.loopCreate(),n.attachEvents();const i=[...n.el.querySelectorAll('[loading="lazy"]')];return n.isElement&&i.push(...n.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(o=>{o.complete?lm(n,o):o.addEventListener("load",s=>{lm(n,s.target)})}),Z1(n),n.initialized=!0,Z1(n),n.emit("init"),n.emit("afterInit"),n}destroy(t,n){t===void 0&&(t=!0),n===void 0&&(n=!0);const r=this,{params:i,el:o,wrapperEl:s,slides:a}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),i.loop&&r.loopDestroy(),n&&(r.removeClasses(),o&&typeof o!="string"&&o.removeAttribute("style"),s&&s.removeAttribute("style"),a&&a.length&&a.forEach(l=>{l.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(l=>{r.off(l)}),t!==!1&&(r.el&&typeof r.el!="string"&&(r.el.swiper=null),Ote(r)),r.destroyed=!0),null}static extendDefaults(t){bi(rb,t)}static get extendedDefaults(){return rb}static get defaults(){return ew}static installModule(t){ws.prototype.__modules__||(ws.prototype.__modules__=[]);const n=ws.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>ws.installModule(n)),ws):(ws.installModule(t),ws)}};Object.keys(nb).forEach(e=>{Object.keys(nb[e]).forEach(t=>{US.prototype[t]=nb[e][t]})});US.use([zte,Ute]);const tM=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function oc(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function mu(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:oc(t[r])&&oc(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:mu(e[r],t[r]):e[r]=t[r]})}function nM(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function rM(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function iM(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function oM(e){e===void 0&&(e="");const t=e.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function Kne(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function qne(e){let{swiper:t,slides:n,passedParams:r,changedParams:i,nextEl:o,prevEl:s,scrollbarEl:a,paginationEl:l}=e;const c=i.filter($=>$!=="children"&&$!=="direction"&&$!=="wrapperClass"),{params:u,pagination:d,navigation:f,scrollbar:m,virtual:h,thumbs:g}=t;let E,b,w,y,_,k,R,P;i.includes("thumbs")&&r.thumbs&&r.thumbs.swiper&&u.thumbs&&!u.thumbs.swiper&&(E=!0),i.includes("controller")&&r.controller&&r.controller.control&&u.controller&&!u.controller.control&&(b=!0),i.includes("pagination")&&r.pagination&&(r.pagination.el||l)&&(u.pagination||u.pagination===!1)&&d&&!d.el&&(w=!0),i.includes("scrollbar")&&r.scrollbar&&(r.scrollbar.el||a)&&(u.scrollbar||u.scrollbar===!1)&&m&&!m.el&&(y=!0),i.includes("navigation")&&r.navigation&&(r.navigation.prevEl||s)&&(r.navigation.nextEl||o)&&(u.navigation||u.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(_=!0);const I=$=>{t[$]&&(t[$].destroy(),$==="navigation"?(t.isElement&&(t[$].prevEl.remove(),t[$].nextEl.remove()),u[$].prevEl=void 0,u[$].nextEl=void 0,t[$].prevEl=void 0,t[$].nextEl=void 0):(t.isElement&&t[$].el.remove(),u[$].el=void 0,t[$].el=void 0))};i.includes("loop")&&t.isElement&&(u.loop&&!r.loop?k=!0:!u.loop&&r.loop?R=!0:P=!0),c.forEach($=>{if(oc(u[$])&&oc(r[$]))Object.assign(u[$],r[$]),($==="navigation"||$==="pagination"||$==="scrollbar")&&"enabled"in r[$]&&!r[$].enabled&&I($);else{const L=r[$];(L===!0||L===!1)&&($==="navigation"||$==="pagination"||$==="scrollbar")?L===!1&&I($):u[$]=r[$]}}),c.includes("controller")&&!b&&t.controller&&t.controller.control&&u.controller&&u.controller.control&&(t.controller.control=u.controller.control),i.includes("children")&&n&&h&&u.virtual.enabled?(h.slides=n,h.update(!0)):i.includes("virtual")&&h&&u.virtual.enabled&&(n&&(h.slides=n),h.update(!0)),i.includes("children")&&n&&u.loop&&(P=!0),E&&g.init()&&g.update(!0),b&&(t.controller.control=u.controller.control),w&&(t.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(u.pagination.el=l),d.init(),d.render(),d.update()),y&&(t.isElement&&(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-scrollbar"),a.part.add("scrollbar"),t.el.appendChild(a)),a&&(u.scrollbar.el=a),m.init(),m.updateSize(),m.setTranslate()),_&&(t.isElement&&((!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-button-next"),o.innerHTML=t.hostEl.constructor.nextButtonSvg,o.part.add("button-next"),t.el.appendChild(o)),(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-button-prev"),s.innerHTML=t.hostEl.constructor.prevButtonSvg,s.part.add("button-prev"),t.el.appendChild(s))),o&&(u.navigation.nextEl=o),s&&(u.navigation.prevEl=s),f.init(),f.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=r.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=r.allowSlidePrev),i.includes("direction")&&t.changeDirection(r.direction,!1),(k||P)&&t.loopDestroy(),(R||P)&&t.loopCreate(),t.update()}function Yne(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);const n={on:{}},r={},i={};mu(n,ew),n._emitClasses=!0,n.init=!1;const o={},s=tM.map(l=>l.replace(/_/,"")),a=Object.assign({},e);return Object.keys(a).forEach(l=>{typeof e[l]>"u"||(s.indexOf(l)>=0?oc(e[l])?(n[l]={},i[l]={},mu(n[l],e[l]),mu(i[l],e[l])):(n[l]=e[l],i[l]=e[l]):l.search(/on[A-Z]/)===0&&typeof e[l]=="function"?t?r[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:n.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:o[l]=e[l])}),["navigation","pagination","scrollbar"].forEach(l=>{n[l]===!0&&(n[l]={}),n[l]===!1&&delete n[l]}),{params:n,passedParams:i,rest:o,events:r}}function Qne(e,t){let{el:n,nextEl:r,prevEl:i,paginationEl:o,scrollbarEl:s,swiper:a}=e;nM(t)&&r&&i&&(a.params.navigation.nextEl=r,a.originalParams.navigation.nextEl=r,a.params.navigation.prevEl=i,a.originalParams.navigation.prevEl=i),rM(t)&&o&&(a.params.pagination.el=o,a.originalParams.pagination.el=o),iM(t)&&s&&(a.params.scrollbar.el=s,a.originalParams.scrollbar.el=s),a.init(n)}function Xne(e,t,n,r,i){const o=[];if(!t)return o;const s=l=>{o.indexOf(l)<0&&o.push(l)};if(n&&r){const l=r.map(i),c=n.map(i);l.join("")!==c.join("")&&s("children"),r.length!==n.length&&s("children")}return tM.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(oc(e[l])&&oc(t[l])){const c=Object.keys(e[l]),u=Object.keys(t[l]);c.length!==u.length?s(l):(c.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}),u.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}))}else e[l]!==t[l]&&s(l)}),o}const Jne=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{sM(n)?t.push(n):n.props&&n.props.children&&aM(n.props.children).forEach(r=>t.push(r))}),t}function Zne(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return jt.Children.toArray(e).forEach(r=>{if(sM(r))t.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const i=aM(r.props.children);i.length>0?i.forEach(o=>t.push(o)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:t,slots:n}}function ere(e,t,n){if(!n)return null;const r=u=>{let d=u;return u<0?d=t.length+u:d>=t.length&&(d=d-t.length),d},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:o,to:s}=n,a=e.params.loop?-t.length:0,l=e.params.loop?t.length*2:t.length,c=[];for(let u=a;u=o&&u<=s&&c.push(t[r(u)]);return c.map((u,d)=>jt.cloneElement(u,{swiper:e,style:i,key:u.props.virtualIndex||u.key||`slide-${d}`}))}function mf(e,t){return typeof window>"u"?C.useEffect(e,t):C.useLayoutEffect(e,t)}const GR=C.createContext(null),tre=C.createContext(null),Np=C.forwardRef(function(e,t){let{className:n,tag:r="div",wrapperTag:i="div",children:o,onSwiper:s,...a}=e===void 0?{}:e,l=!1;const[c,u]=C.useState("swiper"),[d,f]=C.useState(null),[m,h]=C.useState(!1),g=C.useRef(!1),E=C.useRef(null),b=C.useRef(null),w=C.useRef(null),y=C.useRef(null),_=C.useRef(null),k=C.useRef(null),R=C.useRef(null),P=C.useRef(null),{params:I,passedParams:$,rest:L,events:N}=Yne(a),{slides:F,slots:z}=Zne(o),K=()=>{h(!m)};Object.assign(I.on,{_containerClasses(V,se){u(se)}});const Z=()=>{Object.assign(I.on,N),l=!0;const V={...I};if(delete V.wrapperClass,b.current=new US(V),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=F;const se={cache:!1,slides:F,renderExternal:f,renderExternalUpdate:!1};mu(b.current.params.virtual,se),mu(b.current.originalParams.virtual,se)}};E.current||Z(),b.current&&b.current.on("_beforeBreakpoint",K);const le=()=>{l||!N||!b.current||Object.keys(N).forEach(V=>{b.current.on(V,N[V])})},ce=()=>{!N||!b.current||Object.keys(N).forEach(V=>{b.current.off(V,N[V])})};C.useEffect(()=>()=>{b.current&&b.current.off("_beforeBreakpoint",K)}),C.useEffect(()=>{!g.current&&b.current&&(b.current.emitSlidesClasses(),g.current=!0)}),mf(()=>{if(t&&(t.current=E.current),!!E.current)return b.current.destroyed&&Z(),Qne({el:E.current,nextEl:_.current,prevEl:k.current,paginationEl:R.current,scrollbarEl:P.current,swiper:b.current},I),s&&!b.current.destroyed&&s(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}},[]),mf(()=>{le();const V=Xne($,w.current,F,y.current,se=>se.key);return w.current=$,y.current=F,V.length&&b.current&&!b.current.destroyed&&qne({swiper:b.current,slides:F,passedParams:$,changedParams:V,nextEl:_.current,prevEl:k.current,scrollbarEl:P.current,paginationEl:R.current}),()=>{ce()}}),mf(()=>{Jne(b.current)},[d]);function H(){return I.virtual?ere(b.current,F,d):F.map((V,se)=>jt.cloneElement(V,{swiper:b.current,swiperSlideIndex:se}))}return jt.createElement(r,Sg({ref:E,className:oM(`${c}${n?` ${n}`:""}`)},L),jt.createElement(tre.Provider,{value:b.current},z["container-start"],jt.createElement(i,{className:Kne(I.wrapperClass)},z["wrapper-start"],H(),z["wrapper-end"]),nM(I)&&jt.createElement(jt.Fragment,null,jt.createElement("div",{ref:k,className:"swiper-button-prev"}),jt.createElement("div",{ref:_,className:"swiper-button-next"})),iM(I)&&jt.createElement("div",{ref:P,className:"swiper-scrollbar"}),rM(I)&&jt.createElement("div",{ref:R,className:"swiper-pagination"}),z["container-end"]))});Np.displayName="Swiper";const Fu=C.forwardRef(function(e,t){let{tag:n="div",children:r,className:i="",swiper:o,zoom:s,lazy:a,virtualIndex:l,swiperSlideIndex:c,...u}=e===void 0?{}:e;const d=C.useRef(null),[f,m]=C.useState("swiper-slide"),[h,g]=C.useState(!1);function E(_,k,R){k===d.current&&m(R)}mf(()=>{if(typeof c<"u"&&(d.current.swiperSlideIndex=c),t&&(t.current=d.current),!(!d.current||!o)){if(o.destroyed){f!=="swiper-slide"&&m("swiper-slide");return}return o.on("_slideClass",E),()=>{o&&o.off("_slideClass",E)}}}),mf(()=>{o&&d.current&&!o.destroyed&&m(o.getSlideClasses(d.current))},[o]);const b={isActive:f.indexOf("swiper-slide-active")>=0,isVisible:f.indexOf("swiper-slide-visible")>=0,isPrev:f.indexOf("swiper-slide-prev")>=0,isNext:f.indexOf("swiper-slide-next")>=0},w=()=>typeof r=="function"?r(b):r,y=()=>{g(!0)};return jt.createElement(n,Sg({ref:d,className:oM(`${f}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:y},u),s&&jt.createElement(GR.Provider,{value:b},jt.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s=="number"?s:void 0},w(),a&&!h&&jt.createElement("div",{className:"swiper-lazy-preloader"}))),!s&&jt.createElement(GR.Provider,{value:b},w(),a&&!h&&jt.createElement("div",{className:"swiper-lazy-preloader"})))});Fu.displayName="SwiperSlide";const nre=({guild:e})=>{const t=C.useRef(null),[n,r]=C.useState(1);C.useLayoutEffect(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)));const i=C.useCallback(()=>{if(!t.current)return;const{width:o,height:s}=t.current.getBoundingClientRect(),a=o/1e3,l=s/700,c=Math.min(a,l,1);r(c??1)},[]);return v.jsx("div",{ref:t,style:{width:"100%",maxWidth:"1000px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsxs("div",{style:{width:`${1e3*n}px`,height:`${700*n}px`,display:"flex",flexDirection:"row"},children:[v.jsx("div",{className:"card-front",style:{backgroundImage:`url(${cn.get(`${e}_front`)})`,"--scale":n,borderTopRightRadius:0,borderBottomRightRadius:0}}),v.jsx("div",{className:"card-back",style:{backgroundImage:`url(${cn.get(`${e}_back`)})`,"--scale":n,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})};function lM({guild:e}){const t=C.useRef(null),n=C.useRef(null),[r,i]=C.useState(1);C.useLayoutEffect(()=>(o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)));const o=C.useCallback(()=>{if(!t.current)return;const{width:s,height:a}=t.current.getBoundingClientRect(),l=s/500,c=a/700,u=Math.min(l,c,1);i(u??1)},[]);return v.jsx("div",{ref:t,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{ref:n,className:"flip-card",onClick:()=>{var s;(s=n.current)==null||s.classList.toggle("flipped")},children:v.jsxs("div",{className:"flip-card-inner",children:[v.jsx("div",{className:"flip-card-front",children:v.jsx("div",{className:"card-front",style:{backgroundImage:`url(${cn.get(`${e}_front`)})`,"--scale":r}})}),v.jsx("div",{className:"flip-card-back",children:v.jsx("div",{className:"card-back",style:{backgroundImage:`url(${cn.get(`${e}_back`)})`,"--scale":r}})})]})})})}function rre(){const[e,t]=C.useState(!1),[n,r]=C.useState(!1),i=dD(C.useCallback(s=>s.nextLocation.pathname.startsWith("/game")?(t(!0),!0):!1,[t]));C.useEffect(()=>{r(!0)},[n,r]);const{active:o}=ta();return v.jsxs(rn,{style:{width:"100%",height:"100%",display:"flex",flexDirection:"row"},children:[v.jsx(fs,{children:v.jsxs(rn,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[v.jsxs(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:[v.jsx(Fo,{color:"inherit",href:"/game",size:"small",disabled:o,children:v.jsx(jS,{})}),o?v.jsx(_t,{children:"Draft"}):v.jsx(ko,{underline:"hover",color:"inherit",href:"/game/draft",children:"Draft"}),v.jsx(_t,{children:"Play"})]}),v.jsx(IS,{})]})}),v.jsx(ire,{}),v.jsx(O7,{open:e,onClose:()=>t(!1),autoHideDuration:5e3,children:v.jsx(f8,{severity:"warning",action:v.jsx(yn,{size:"small",onClick:i.proceed,children:"Exit Game"}),children:"Making changes to the team selections will reset the game state."})})]})}function ire(){const e=Ni(),t=kx(e.breakpoints.up("sm")),{active:n}=ta(),{gameState1$:r,gameState2$:i}=ay(),[o,s]=C.useState();C.useEffect(()=>{if(!r)return;let d=!1;return(async()=>{const m=await Ln(r);d||s(m)})(),()=>{d=!0}},[r]);const[a,l]=C.useState();C.useEffect(()=>{if(!i)return;let d=!1;return(async()=>{const m=await Ln(i);d||l(m)})(),()=>{d=!0}},[i]);const[c,u]=fo(async d=>{if(!o||!a)return;const f=await d.models.find().where("id").in(o.roster.map(E=>E.name)).exec(),m=await Promise.all(f.map(E=>E.expand()));Ks(m,"id",o.roster.map(E=>E.name));const h=await d.models.find().where("id").in(a.roster.map(E=>E.name)).exec(),g=await Promise.all(h.map(E=>E.expand()));return Ks(g,"id",a.roster.map(E=>E.name)),[m,g]},[o,a])??[];return!o||!a||!c||!u?null:t?v.jsxs(v.Fragment,{children:[v.jsx(ib,{teams:[o],rosters:[c],disabled:[!1]}),v.jsx(Lo,{orientation:"vertical"}),v.jsx(ib,{teams:[a],rosters:[u],disabled:[!!n]})]}):v.jsx(ib,{teams:[o,a],rosters:[c,u],disabled:[!1,!!n]})}const ib=({teams:e,rosters:t,disabled:n})=>{const r=Ni(),i=kx(r.breakpoints.up("sm")),o=C.useRef(null),[s,a]=C.useState(!1),[l,c]=C.useState(0),[u,d]=C.useState(!0),[f,m]=C.useState(500),[h,g]=C.useState(700),[E,b]=C.useState(700);C.useLayoutEffect(()=>(w(),window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)));const w=C.useCallback(()=>{var R,P;const y=((R=o.current)==null?void 0:R.getBoundingClientRect().width)??0,_=((P=o.current)==null?void 0:P.getBoundingClientRect().height)??0,k=i?56:112;m(Math.min(y-12,(_-k)*5/7-12)),g(Math.min(_-k-12,y*7/5-12)),b(_-k)},[i]);return v.jsxs("div",{ref:o,style:{width:"100%",display:"flex",flexDirection:"column"},children:[v.jsx(dte,{disabled:n,teams:e,rosters:t,expanded:u,onClick:(y,_)=>{c(y),d(_),a(!_)}}),v.jsx("div",{style:{position:"relative",overflow:"hidden",flexGrow:1},children:v.jsx(Ev,{disablePortal:!0,sx:{zIndex:1100},open:s,onClose:()=>{a(!1),d(!0)},componentsProps:{root:{style:{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"}},backdrop:{style:{position:"absolute"}}},children:v.jsx(Np,{initialSlide:l,direction:"vertical",centeredSlides:!0,spaceBetween:(E-Math.min(h,500))/2,onInit:y=>{y.el.style.width=`${Math.min(f,500)}px`,y.el.style.height=`${Math.min(h,700)}px`},style:{overflow:"visible"},children:e.map((y,_)=>[()=>v.jsx(lM,{guild:y.guild}),t[_].map((k,R)=>()=>v.jsx(qI,{model:k,health$:y.get$("roster").pipe(qt(P=>P[R].health)),children:v.jsx(ore,{model:k,state:e[_],disabled:n[_]})}))]).flat(2).map((y,_)=>v.jsx(Fu,{children:v.jsx("div",{style:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:y==null?void 0:y()})},_))})})})]})};function ore({state:e,model:t,disabled:n=!1}){return v.jsx(us,{elevation:2,sx:{position:"absolute",right:0,bottom:0},children:v.jsx(VI,{state:e,model:t,disabled:n,stacked:!0})})}function sre(){const e=Js(),{setting$:t}=ui(),[n,r]=C.useState(null);C.useEffect(()=>{t&&Ln(t).then(m=>m==null?void 0:m.incrementalPatch({gamePlayRoute:`${e.pathname}${e.search}`})).catch(console.error)},[e,t]);const{gbdb:i}=Yr(),{active:o,netDoc:s}=ta(),a=o?s==null?void 0:s.get("uid"):"Player1",l=o?s==null?void 0:s.get("oid"):"Player2",[c,u]=C.useState();C.useEffect(()=>{const m=i==null?void 0:i.game_state.findOne(a).$;if(u(m),!m)return;let h=!1;return(async()=>{if(h)return;await Ln(m)===null&&await(i==null?void 0:i.game_state.upsert({_id:a,roster:[]}))})().catch(console.error),()=>{h=!0}},[i,a]);const[d,f]=C.useState();return C.useEffect(()=>{const m=i==null?void 0:i.game_state.findOne(l).$;if(f(m),!m)return;let h=!1;return(async()=>{if(h)return;await Ln(m)===null&&!o&&await(i==null?void 0:i.game_state.upsert({_id:l,roster:[]}))})().catch(console.error),()=>{h=!0}},[i,l,o]),v.jsxs("main",{style:{width:"100%",height:"100%",overflow:"auto",display:"flex"},children:[v.jsxs(fs,{children:[v.jsx(rn,{ref:m=>r(m),sx:{width:"100%",display:"flex",flexDirection:"row"}}),v.jsx(LJ,{})]}),v.jsx(OS.Provider,{value:n,children:v.jsx(nx,{context:{gameState1$:c,gameState2$:d}})})]})}function are({model:e}){const{setting$:t}=ui(),n=C.useRef(null),[r,i]=C.useState(1),[o,s]=C.useState();C.useEffect(()=>{const d=t==null?void 0:t.pipe(qt(f=>f==null?void 0:f.toJSON().data.cardPreferences.preferredStyle)).subscribe(f=>s(f));return()=>d==null?void 0:d.unsubscribe()},[t]),C.useLayoutEffect(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)));const a=C.useCallback(()=>{if(!n.current)return;const{width:d,height:f}=n.current.getBoundingClientRect(),m=d/1e3,h=f/700,g=Math.min(m,h,1);i(g??1)},[]),l=e.id,u=o==="gbcp"&&(cn.has(`${l}_gbcp_front`)||cn.has(`${l}_full`))?cn.get(`${l}_full`)??void 0:void 0;return v.jsx("div",{ref:n,style:{width:"100%",maxWidth:"1000px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsxs("div",{style:{width:`${1e3*r}px`,height:`${700*r}px`,display:"flex",flexDirection:"row",...u?{backgroundImage:`url(${u})`,backgroundSize:"100%",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:`${25*r}px`}:{}},children:[v.jsx(yg,{model:e,noBackground:!!u,style:{"--scale":r,borderTopRightRadius:0,borderBottomRightRadius:0}}),v.jsx(bg,{model:e,noBackground:!!u,style:{"--scale":r,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})}const lre="/assets/GB-S4-Reference-1-Cx3eC7d4.png",cre="/assets/GB-S4-Reference-2-CJ4YgyH9.png",ure="/assets/GB-S4-Reference-3-BTbZpB51.png",dre="/assets/GB-S4-Reference-4-CpP58Tap.png",fre="/assets/GB-S4-Reference-5-Be8xjsp1.png",pre=new URL("/assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",import.meta.url).href,cM=e=>{const t=e.gameplan,n=new Intl.NumberFormat("en-US",{signDisplay:"always"});return v.jsx("div",{className:`card-front ${e.bleed?"bleed":null}`,style:{width:"100%",height:"100%",backgroundImage:`url(${pre})`,...e.style},children:v.jsxs("div",{className:"overlay",children:[v.jsx("div",{style:{height:"255px",flexShrink:0}}),v.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"Crimson Text",letterSpacing:"-1px"},children:[v.jsx("div",{style:{fontFamily:"IM Fell Great Primer SC",fontSize:"33.33pt",display:"flex",flexDirection:"column",alignItems:"center",lineHeight:"0.8em",margin:"0.25em 0"},children:t.title.split(/\n/).map((r,i)=>v.jsx("span",{children:r.split(/(?=[A-Z])/).map((o,s)=>v.jsx("span",{className:new RegExp("^\\p{Lu}","u").test(o)?"dropcap":"",children:v.jsx("span",{children:o},`p${i}s${s}c`)},`p${i}s${s}`))},`l${i}`))}),v.jsxs("div",{style:{fontSize:"20pt",margin:"0 1em",whiteSpace:"pre-wrap",display:"flex",flexDirection:"column",alignItems:"center"},children:[t.text,v.jsx("p",{style:{fontStyle:"italic",margin:"0.5em 0"},children:t.detail})]}),v.jsx("div",{style:{fontSize:"35pt",position:"absolute",bottom:40,left:40,width:"80px",height:"80px",borderRadius:"40px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},children:n.format(t.initiative)}),v.jsx("div",{style:{fontSize:"35pt",position:"absolute",bottom:40,right:40,width:"80px",height:"80px",borderRadius:"40px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},children:n.format(t.influence)}),v.jsx("div",{style:{fontFamily:"serif",fontSize:"10pt",position:"absolute",bottom:"2em",letterSpacing:0,wordSpacing:0},children:"™ & © Steamforged Games LTD 2019"})]})]})})},uM=e=>{const t=C.useRef(null),[n,r]=C.useState(1);C.useLayoutEffect(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)));const i=C.useCallback(()=>{if(!t.current)return;const{width:o,height:s}=t.current.getBoundingClientRect(),a=o/500,l=s/700,c=Math.min(a,l,1);r(c??1)},[]);return v.jsx("div",{ref:t,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",padding:0,margin:0},children:v.jsx("div",{style:{width:`${500*n}px`,height:`${700*n}px`,display:"flex","--scale":n},children:e.children})})},hre=e=>v.jsx(uM,{children:v.jsx(cM,{...e})}),dM=e=>{const t=new URL(Object.assign({"../assets/cards/Reference/GB-S4-Reference-1.png":lre,"../assets/cards/Reference/GB-S4-Reference-2.png":cre,"../assets/cards/Reference/GB-S4-Reference-3.png":ure,"../assets/cards/Reference/GB-S4-Reference-4.png":dre,"../assets/cards/Reference/GB-S4-Reference-5.png":fre})[`../assets/cards/Reference/GB-S4-Reference-${e.index}.png`],import.meta.url).href;return v.jsx("div",{className:`card-front ${e.bleed?"bleed":null}`,style:{width:"100%",height:"100%",backgroundImage:`url(${t})`,...e.style}})},mre=e=>v.jsx(uM,{children:v.jsx(dM,{...e})});function gre(){const e=Js(),{setting$:t}=ui(),[n]=AD(),r=C.useRef(n.get("m"));return C.useEffect(()=>{if(t)return Ln(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${r.current}`})).catch(console.error),()=>{Ln(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${r.current}`})).catch(console.error)}},[e,t]),v.jsx("main",{style:{display:"flex",flexDirection:"column-reverse",width:"100%",height:"100%"},children:v.jsx(C.Suspense,{fallback:v.jsx("p",{children:"Loading ..."}),children:v.jsx(nx,{context:{slideRef:r}})})})}function vre(){const{slideRef:e}=up();return e.current=0,v.jsxs(v.Fragment,{children:[v.jsx(fs,{children:v.jsx(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:v.jsx(_t,{children:"Library"})})}),v.jsx(RI,{Controller:yre}),v.jsx(fc,{})]})}function yre(e){const t=qa();return C.useEffect(()=>{const n=e.update$.subscribe(r=>t(r));return()=>n.unsubscribe()},[t,e.update$]),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-evenly",margin:"5px"},children:[v.jsx(V1,{g:{key:"gameplans",name:"gameplans",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("gameplans"),size:e.size}),v.jsx(V1,{g:{key:"refcards",name:"Rules",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("refcards"),size:e.size})]})}function bre(){const{guild:e}=tD(),t=Ni(),n=kx(t.breakpoints.up("sm")),r=C.useRef(null),[i,o]=C.useState(n?1e3:500),[s,a]=C.useState(700),l=C.useCallback(()=>{var b,w;const g=((b=r.current)==null?void 0:b.getBoundingClientRect().width)??0,E=((w=r.current)==null?void 0:w.getBoundingClientRect().height)??0;o(Math.min(g,E*(n?10:5)/7)-12),a(Math.min(E,g*7/5)-12)},[n]);C.useLayoutEffect(()=>(l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)));const[c,u]=C.useState(null),d=qa(),{slideRef:f}=up(),[m,h]=fo(async g=>{const[E,b]=await Promise.all([g.guilds.findOne().where({name:e}).exec(),g.models.find().or([{guild1:e},{guild2:e}]).exec()]);if(!E||!b.length){d("/library");return}Ks(b,"id",E.roster);const w=await Promise.all(b.map(y=>y.expand()));return[E,w]},[e,d])??[];return!m||!h?null:v.jsxs(v.Fragment,{children:[v.jsx(fs,{children:v.jsxs(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:[v.jsx(ko,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(_t,{children:m.name})]})}),v.jsx(Sre,{guild:m,swiper:c}),v.jsxs(rn,{ref:r,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsxs(Np,{onSwiper:u,initialSlide:f.current,onSlideChange:g=>{f.current=g.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:s},children:[v.jsx(Fu,{style:{width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:s,width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:n?v.jsx(nre,{guild:m.name}):v.jsx(lM,{guild:m.name})})},m.name),h.map(g=>v.jsx(Fu,{style:{width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:s,width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:n?v.jsx(are,{model:g}):v.jsx(qI,{model:g})})},g.id))]}),v.jsx(fc,{})]})]})}function wre(){const t=C.useRef(null),[n,r]=C.useState(500),[i,o]=C.useState(700),s=C.useCallback(()=>{var m,h;const d=((m=t.current)==null?void 0:m.getBoundingClientRect().width)??0,f=((h=t.current)==null?void 0:h.getBoundingClientRect().height)??0;r(Math.min(d,f*5/7)-12),o(Math.min(f,d*7/5)-12)},[!1]);C.useLayoutEffect(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)));const[a,l]=C.useState(null),{slideRef:c}=up(),{gameplans:u}=Yr();return u?v.jsxs(v.Fragment,{children:[v.jsx(fs,{children:v.jsxs(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:[v.jsx(ko,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(_t,{children:"Gameplan Cards"})]})}),v.jsx(_re,{swiper:a}),v.jsxs(rn,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsx(Np,{onSwiper:l,initialSlide:c.current,onSlideChange:d=>{c.current=d.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:i},children:u.map((d,f)=>v.jsx(Fu,{style:{width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:i,width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(hre,{gameplan:d})})},`gameplan-${f}`))}),v.jsx(fc,{})]})]}):null}function xre(){const t=C.useRef(null),[n,r]=C.useState(500),[i,o]=C.useState(700),s=C.useCallback(()=>{var f,m;const u=((f=t.current)==null?void 0:f.getBoundingClientRect().width)??0,d=((m=t.current)==null?void 0:m.getBoundingClientRect().height)??0;r(Math.min(u,d*5/7)-12),o(Math.min(d,u*7/5)-12)},[!1]);C.useLayoutEffect(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)));const[a,l]=C.useState(null),{slideRef:c}=up();return v.jsxs(v.Fragment,{children:[v.jsx(fs,{children:v.jsxs(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:[v.jsx(ko,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(_t,{children:"Rules Reference Cards"})]})}),v.jsx(Cre,{swiper:a}),v.jsxs(rn,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsx(Np,{onSwiper:l,initialSlide:c.current,onSlideChange:u=>{c.current=u.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:i},children:[...Array(5).keys()].map(u=>u+1).map(u=>v.jsx(Fu,{style:{width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:i,width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(mre,{index:u})})},`ref-${u}`))}),v.jsx(fc,{})]})]})}function Sre(e){const{guild:t,swiper:n}=e,r=t.roster;return v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsxs(rn,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:[v.jsx(Fo,{sx:{padding:0},onClick:()=>{n==null||n.slideTo(0)},children:v.jsx("span",{children:v.jsx("div",{style:{width:"32px",height:"32px",backgroundColor:"black",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"},children:v.jsx(ji,{icon:t.name,className:"dark",fontSize:"32px",style:{flexShrink:0}})})})}),r.map((i,o)=>v.jsx(Ux,{color:"primary",label:i,onClick:()=>{n==null||n.slideTo(o+1)}},o))]}),v.jsx("div",{style:{flex:"1 1"}})]})}function _re(e){const{gameplans:t}=Yr(),{swiper:n}=e;return t?v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsx(rn,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:t.map((r,i)=>v.jsx(Ux,{color:"primary",label:r.title,onClick:()=>{n==null||n.slideTo(i)}},i))}),v.jsx("div",{style:{flex:"1 1"}})]}):null}function Cre(e){const{gameplans:t}=Yr(),{swiper:n}=e;return t?v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsx(rn,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"].map((r,i)=>v.jsx(Ux,{color:"primary",label:r,onClick:()=>{n==null||n.slideTo(i)}},i))}),v.jsx("div",{style:{flex:"1 1"}})]}):null}const kre={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"اَلْعَرَبِيَّةُ"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Català"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},cs:{name:"Czech",nativeName:"čeština"},cu:{name:"Old Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"Dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"ދިވެހި"},dz:{name:"Dzongkha",nativeName:"རྫོང་ཁ"},ee:{name:"Ewe",nativeName:"Eʋegbe"},el:{name:"Greek",nativeName:"Ελληνικά"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Español"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"فارسی"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fo:{name:"Faroese",nativeName:"Føroyskt"},fr:{name:"French",nativeName:"Français"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"Gàidhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaraní",nativeName:"Avañe'ẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"هَوُسَ"},he:{name:"Hebrew",nativeName:"עברית"},hi:{name:"Hindi",nativeName:"हिन्दी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"Հայերեն"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"Iñupiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"ქართული"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"Gĩkũyũ"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"қазақ тілі"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"ខេមរភាសា"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},ko:{name:"Korean",nativeName:"한국어"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी"},ku:{name:"Kurdish",nativeName:"Kurdî"},kv:{name:"Komi",nativeName:"коми кыв"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"Кыргызча"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:"Kiluba"},lv:{name:"Latvian",nativeName:"latviešu valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mi:{name:"Māori",nativeName:"te reo Māori"},mk:{name:"Macedonian",nativeName:"македонски јазик"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mn:{name:"Mongolian",nativeName:"Монгол хэл"},mr:{name:"Marathi",nativeName:"मराठी"},ms:{name:"Malay",nativeName:"Bahasa Melayu"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"ဗမာစာ"},na:{name:"Nauru",nativeName:"Dorerin Naoero"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Diné bizaad"},ny:{name:"Chichewa",nativeName:"chiCheŵa"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Panjabi",nativeName:"ਪੰਜਾਬੀ"},pi:{name:"Pāli",nativeName:"पाऴि"},pl:{name:"Polish",nativeName:"Polski"},ps:{name:"Pashto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Română"},ru:{name:"Russian",nativeName:"Русский"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"संस्कृतम्"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},si:{name:"Sinhala",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovenian",nativeName:"slovenščina"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"српски језик"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"тоҷикӣ"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},tk:{name:"Turkmen",nativeName:"Türkmençe"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татар теле"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"ئۇيغۇرچە‎"},uk:{name:"Ukrainian",nativeName:"Українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"Ўзбек"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang",nativeName:"Saɯ cueŋƅ"},zh:{name:"Chinese",nativeName:"中文"},zu:{name:"Zulu",nativeName:"isiZulu"}};var Ere=kre;const gf=Ere,fM={},_g={},pM=[],hM=[],mM=[];for(const e in gf){const{name:t,nativeName:n}=gf[e];fM[e]=_g[t.toLowerCase()]=_g[n.toLowerCase()]={code:e,name:t,nativeName:n},pM.push(e),hM.push(t),mM.push(n)}var Rre=class cm{static getLanguages(t=[]){return t.map(n=>cm.validate(n)?Object.assign({},fM[n]):{code:n,name:"",nativeName:""})}static getName(t){return cm.validate(t)?gf[t].name:""}static getAllNames(){return hM.slice()}static getNativeName(t){return cm.validate(t)?gf[t].nativeName:""}static getAllNativeNames(){return mM.slice()}static getCode(t){return t=t.toLowerCase(),_g.hasOwnProperty(t)?_g[t].code:""}static getAllCodes(){return pM.slice()}static validate(t){return gf.hasOwnProperty(t)}};const HR=Ga(Rre),Pre=()=>{var s;const{manifest:e}=Yr(),{setting$:t}=ui(),{i18n:n}=yZ(),r=n.resolvedLanguage,[i,o]=C.useState();if(C.useEffect(()=>{const a=t==null?void 0:t.subscribe(l=>o(l));return()=>a==null?void 0:a.unsubscribe()},[t]),!(!e||!i))return v.jsxs(rn,{component:"main",sx:{p:"1rem"},children:[v.jsx(fs,{children:v.jsx(Xa,{children:v.jsx(_t,{children:"Settings"})})}),v.jsxs(_t,{variant:"h6",children:["GB Playbook ","2.1.0"]}),v.jsxs(_t,{variant:"caption",children:["(","2024-07-15T16:20:18.658Z",")"]}),v.jsx(Lo,{sx:{my:2}}),v.jsx(_t,{children:"Season and Errata Version:"}),v.jsx(xl,{children:v.jsx(Pl,{value:i.toJSON().data.dataSet,onChange:a=>{i==null||i.incrementalPatch({dataSet:a.target.value})},children:e==null?void 0:e.datafiles.map((a,l)=>v.jsx(yi,{value:a.filename,children:`[${a.version}] ${a.description}`},l))})}),v.jsx("p",{}),v.jsx(_t,{children:"Language Preference"}),v.jsx(_t,{variant:"subtitle2",children:"(available languages vary by Season and Errata setting)"}),v.jsx(xl,{children:v.jsxs(Pl,{value:i.toJSON().data.language??"auto",onChange:a=>{i==null||i.incrementalPatch({language:a.target.value})},children:[v.jsx(yi,{value:"auto",children:`Automatic Detection (${HR.getNativeName(r??"en")})`},"auto"),["en"].concat(Object.keys(((s=e.datafiles.find(a=>a.filename===i.toJSON().data.dataSet))==null?void 0:s.translations)??{})).map((a,l)=>v.jsx(yi,{value:a,children:`${HR.getNativeName(a)}`},l))]})}),v.jsx(Lo,{sx:{my:2}}),v.jsx(_t,{children:"UI Options:"}),v.jsx(_t,{children:"Initial Screen:"}),v.jsx(xl,{children:v.jsxs(Pl,{value:i==null?void 0:i.toJSON().data.initialScreen,onChange:a=>{i==null||i.incrementalPatch({initialScreen:a.target.value})},children:[v.jsx(yi,{value:"/game",children:"Game Play"}),v.jsx(yi,{value:"/library",children:"Card Library"})]})}),v.jsx("p",{}),v.jsx(xl,{children:v.jsx(Ms,{control:v.jsx(H7,{size:"small",checked:i==null?void 0:i.toJSON().data.uiPreferences.displayStatLine,onChange:a=>{i==null||i.incrementalPatch({uiPreferences:{displayStatLine:a.target.checked}})}}),label:"Stat Line in Game Roster List"})}),v.jsx("p",{}),v.jsx(_t,{children:"Prefered Card Layout:"}),v.jsx(_t,{variant:"subtitle2",children:"(Only applies to updated cards, where both styles are available)"}),v.jsx(xl,{children:v.jsxs(Pl,{value:i==null?void 0:i.toJSON().data.cardPreferences.preferredStyle,onChange:a=>{i==null||i.incrementalPatch({cardPreferences:{preferredStyle:a.target.value}})},children:[v.jsx(yi,{value:"sfg",children:"Steamforged"}),v.jsx(yi,{value:"gbcp",children:"Community"})]})})]})};var WS={},Tre=so;Object.defineProperty(WS,"__esModule",{value:!0});var gM=WS.default=void 0,Ore=Tre(ds()),jre=v;gM=WS.default=(0,Ore.default)((0,jre.jsx)("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3m-3 11H8v-5h8zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m-1-9H6v4h12z"}),"Print");var GS={},Lre=so;Object.defineProperty(GS,"__esModule",{value:!0});var vM=GS.default=void 0,Ire=Lre(ds()),Mre=v;vM=GS.default=(0,Ire.default)((0,Mre.jsx)("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"}),"DoneAll");var HS={},Nre=so;Object.defineProperty(HS,"__esModule",{value:!0});var yM=HS.default=void 0,$re=Nre(ds()),Are=v;yM=HS.default=(0,$re.default)((0,Are.jsx)("path",{d:"m1.79 12 5.58 5.59L5.96 19 .37 13.41zm.45-7.78L12.9 14.89l-1.28 1.28L7.44 12l-1.41 1.41L11.62 19l2.69-2.69 4.89 4.89 1.41-1.41L3.65 2.81zm14.9 9.27L23.62 7 22.2 5.59l-6.48 6.48zM17.96 7l-1.41-1.41-3.65 3.66 1.41 1.41z"}),"RemoveDone");var VS={},Dre=so;Object.defineProperty(VS,"__esModule",{value:!0});var bM=VS.default=void 0,Bre=Dre(ds()),Fre=v;bM=VS.default=(0,Bre.default)((0,Fre.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");const zre=e=>{const[t,n]=C.useState(null),r=!!t,i=h=>{n(h.currentTarget)},o=()=>{n(null)},[s,a]=C.useState(!0),{doubleCard:l,setDouble:c,withBleed:u,setBleed:d,noFun:f,setNoFun:m}=e;return C.useEffect(()=>{const h=l?u?"5.24in 3.74in":"5in 3.5in":u?"2.74in 3.74in":"2.5in 3.5in",g=document.createElement("style");return s||(g.innerHTML=` +`);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"header dropcap",children:[v.jsx("span",{children:"Legendary "}),v.jsx("span",{children:"Play"})]}),v.jsxs("div",{className:"legendary",children:[v.jsx(FS,{text:t}),v.jsx("span",{children:ly(n)})]}),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},bg=jt.memo(bte);function WI({children:e,model:t,health$:n}){const r=C.useRef(null),i=C.useRef(null),[o,s]=C.useState(1);C.useLayoutEffect(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)));const a=C.useCallback(()=>{if(!r.current)return;const{width:l,height:c}=r.current.getBoundingClientRect(),u=l/500,d=c/700,f=Math.min(u,d,1);s(f??1)},[]);return v.jsx("div",{ref:r,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{ref:i,className:"flip-card",onClick:()=>{var l;(l=i.current)==null||l.classList.toggle("flipped")},children:v.jsxs("div",{className:"flip-card-inner",children:[v.jsxs("div",{className:"flip-card-front",children:[v.jsx(yg,{model:t,health$:n,style:{"--scale":o}}),e]}),v.jsx("div",{className:"flip-card-back",children:v.jsx(bg,{model:t,style:{"--scale":o}})})]})})})}function AR(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function zS(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(n=>{typeof e[n]>"u"?e[n]=t[n]:AR(t[n])&&AR(e[n])&&Object.keys(t[n]).length>0&&zS(e[n],t[n])})}const GI={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function ed(){const e=typeof document<"u"?document:{};return zS(e,GI),e}const _te={document:GI,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function Di(){const e=typeof window<"u"?window:{};return zS(e,_te),e}function Cte(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function kte(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function X1(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function wg(){return Date.now()}function Ete(e){const t=Di();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function Rte(e,t){t===void 0&&(t="x");const n=Di();let r,i,o;const s=Ete(e);return n.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(a=>a.replace(",",".")).join(", ")),o=new n.WebKitCSSMatrix(i==="none"?"":i)):(o=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=o.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?i=o.m41:r.length===16?i=parseFloat(r[12]):i=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?i=o.m42:r.length===16?i=parseFloat(r[13]):i=parseFloat(r[5])),i||0}function Lh(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function Pte(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function bi(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;nt.indexOf(o)<0);for(let o=0,s=i.length;oo?"next":"prev",u=(f,m)=>c==="next"&&f>=m||c==="prev"&&f<=m,d=()=>{a=new Date().getTime(),s===null&&(s=a);const f=Math.max(Math.min((a-s)/l,1),0),m=.5-Math.cos(f*Math.PI)/2;let h=o+m*(n-o);if(u(h,n)&&(h=n),t.wrapperEl.scrollTo({[r]:h}),u(h,n)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:h})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(d)};d()}function Os(e,t){return t===void 0&&(t=""),[...e.children].filter(n=>n.matches(t))}function xg(e){try{console.warn(e);return}catch{}}function J1(e,t){t===void 0&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:Cte(t)),n}function Tte(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function Ote(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function ka(e,t){return Di().getComputedStyle(e,null).getPropertyValue(t)}function DR(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function jte(e,t){const n=[];let r=e.parentElement;for(;r;)n.push(r),r=r.parentElement;return n}function BR(e,t,n){const r=Di();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}let X0;function Lte(){const e=Di(),t=ed();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function VI(){return X0||(X0=Lte()),X0}let J0;function Ite(e){let{userAgent:t}=e===void 0?{}:e;const n=VI(),r=Di(),i=r.navigator.platform,o=t||r.navigator.userAgent,s={ios:!1,android:!1},a=r.screen.width,l=r.screen.height,c=o.match(/(Android);?[\s\/]+([\d.]+)?/);let u=o.match(/(iPad).*OS\s([\d_]+)/);const d=o.match(/(iPod)(.*OS\s([\d_]+))?/),f=!u&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m=i==="Win32";let h=i==="MacIntel";const g=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!u&&h&&n.touch&&g.indexOf(`${a}x${l}`)>=0&&(u=o.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),h=!1),c&&!m&&(s.os="android",s.android=!0),(u||f||d)&&(s.os="ios",s.ios=!0),s}function KI(e){return e===void 0&&(e={}),J0||(J0=Ite(e)),J0}let Z0;function Mte(){const e=Di(),t=KI();let n=!1;function r(){const a=e.navigator.userAgent.toLowerCase();return a.indexOf("safari")>=0&&a.indexOf("chrome")<0&&a.indexOf("android")<0}if(r()){const a=String(e.navigator.userAgent);if(a.includes("Version/")){const[l,c]=a.split("Version/")[1].split(" ")[0].split(".").map(u=>Number(u));n=l<16||l===16&&c<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),o=r(),s=o||i&&t.ios;return{isSafari:n||o,needPerspectiveFix:n,need3dFix:s,isWebView:i}}function Nte(){return Z0||(Z0=Mte()),Z0}function $te(e){let{swiper:t,on:n,emit:r}=e;const i=Di();let o=null,s=null;const a=()=>{!t||t.destroyed||!t.initialized||(r("beforeResize"),r("resize"))},l=()=>{!t||t.destroyed||!t.initialized||(o=new ResizeObserver(d=>{s=i.requestAnimationFrame(()=>{const{width:f,height:m}=t;let h=f,g=m;d.forEach(R=>{let{contentBoxSize:b,contentRect:w,target:y}=R;y&&y!==t.el||(h=w?w.width:(b[0]||b).inlineSize,g=w?w.height:(b[0]||b).blockSize)}),(h!==f||g!==m)&&a()})}),o.observe(t.el))},c=()=>{s&&i.cancelAnimationFrame(s),o&&o.unobserve&&t.el&&(o.unobserve(t.el),o=null)},u=()=>{!t||t.destroyed||!t.initialized||r("orientationchange")};n("init",()=>{if(t.params.resizeObserver&&typeof i.ResizeObserver<"u"){l();return}i.addEventListener("resize",a),i.addEventListener("orientationchange",u)}),n("destroy",()=>{c(),i.removeEventListener("resize",a),i.removeEventListener("orientationchange",u)})}function Ate(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const o=[],s=Di(),a=function(u,d){d===void 0&&(d={});const f=s.MutationObserver||s.WebkitMutationObserver,m=new f(h=>{if(t.__preventObserver__)return;if(h.length===1){i("observerUpdate",h[0]);return}const g=function(){i("observerUpdate",h[0])};s.requestAnimationFrame?s.requestAnimationFrame(g):s.setTimeout(g,0)});m.observe(u,{attributes:typeof d.attributes>"u"?!0:d.attributes,childList:t.isElement||(typeof d.childList>"u"?!0:d).childList,characterData:typeof d.characterData>"u"?!0:d.characterData}),o.push(m)},l=()=>{if(t.params.observer){if(t.params.observeParents){const u=jte(t.hostEl);for(let d=0;d{o.forEach(u=>{u.disconnect()}),o.splice(0,o.length)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",l),r("destroy",c)}var Dte={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;const i=n?"unshift":"push";return e.split(" ").forEach(o=>{r.eventsListeners[o]||(r.eventsListeners[o]=[]),r.eventsListeners[o][i](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;function i(){r.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var o=arguments.length,s=new Array(o),a=0;a=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(r=>{typeof t>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((i,o)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[r].splice(o,1)})}),n},emit(){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,n,r;for(var i=arguments.length,o=new Array(i),s=0;s{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(c=>{c.apply(r,[l,...n])}),e.eventsListeners&&e.eventsListeners[l]&&e.eventsListeners[l].forEach(c=>{c.apply(r,n)})}),e}};function Bte(){const e=this;let t,n;const r=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=r.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?n=e.params.height:n=r.clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(ka(r,"padding-left")||0,10)-parseInt(ka(r,"padding-right")||0,10),n=n-parseInt(ka(r,"padding-top")||0,10)-parseInt(ka(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function Fte(){const e=this;function t(L,N){return parseFloat(L.getPropertyValue(e.getDirectionLabel(N))||0)}const n=e.params,{wrapperEl:r,slidesEl:i,size:o,rtlTranslate:s,wrongRTL:a}=e,l=e.virtual&&n.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,u=Os(i,`.${e.params.slideClass}, swiper-slide`),d=l?e.virtual.slides.length:u.length;let f=[];const m=[],h=[];let g=n.slidesOffsetBefore;typeof g=="function"&&(g=n.slidesOffsetBefore.call(e));let R=n.slidesOffsetAfter;typeof R=="function"&&(R=n.slidesOffsetAfter.call(e));const b=e.snapGrid.length,w=e.slidesGrid.length;let y=n.spaceBetween,_=-g,k=0,E=0;if(typeof o>"u")return;typeof y=="string"&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*o:typeof y=="string"&&(y=parseFloat(y)),e.virtualSize=-y,u.forEach(L=>{s?L.style.marginLeft="":L.style.marginRight="",L.style.marginBottom="",L.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(Ih(r,"--swiper-centered-offset-before",""),Ih(r,"--swiper-centered-offset-after",""));const P=n.grid&&n.grid.rows>1&&e.grid;P?e.grid.initSlides(u):e.grid&&e.grid.unsetSlides();let I;const A=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(L=>typeof n.breakpoints[L].slidesPerView<"u").length>0;for(let L=0;L1&&f.push(e.virtualSize-o)}if(l&&n.loop){const L=h[0]+y;if(n.slidesPerGroup>1){const N=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),F=L*n.slidesPerGroup;for(let z=0;z!n.cssMode||n.loop?!0:F!==u.length-1).forEach(N=>{N.style[L]=`${y}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let L=0;h.forEach(F=>{L+=F+(y||0)}),L-=y;const N=L-o;f=f.map(F=>F<=0?-g:F>N?N+R:F)}if(n.centerInsufficientSlides){let L=0;h.forEach(F=>{L+=F+(y||0)}),L-=y;const N=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(L+N{f[K]=z-F}),m.forEach((z,K)=>{m[K]=z+F})}}if(Object.assign(e,{slides:u,snapGrid:f,slidesGrid:m,slidesSizesGrid:h}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){Ih(r,"--swiper-centered-offset-before",`${-f[0]}px`),Ih(r,"--swiper-centered-offset-after",`${e.size/2-h[h.length-1]/2}px`);const L=-e.snapGrid[0],N=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(F=>F+L),e.slidesGrid=e.slidesGrid.map(F=>F+N)}if(d!==c&&e.emit("slidesLengthChange"),f.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),m.length!==w&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!l&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const L=`${n.containerModifierClass}backface-hidden`,N=e.el.classList.contains(L);d<=n.maxBackfaceHiddenSlides?N||e.el.classList.add(L):N&&e.el.classList.remove(L)}}function zte(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let i=0,o;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const s=a=>r?t.slides[t.getSlideIndexByData(a)]:t.slides[a];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(a=>{n.push(a)});else for(o=0;ot.slides.length&&!r)break;n.push(s(a))}else n.push(s(t.activeIndex));for(o=0;oi?a:i}(i||i===0)&&(t.wrapperEl.style.height=`${i}px`)}function Ute(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function Wte(e){e===void 0&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:r,rtlTranslate:i,snapGrid:o}=t;if(r.length===0)return;typeof r[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let s=-e;i&&(s=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=n.spaceBetween;typeof a=="string"&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:typeof a=="string"&&(a=parseFloat(a));for(let l=0;l=0&&m<=t.size-t.slidesSizesGrid[l],R=m>=0&&m1&&h<=t.size||m<=0&&h>=t.size;R&&(t.visibleSlides.push(c),t.visibleSlidesIndexes.push(l)),FR(c,R,n.slideVisibleClass),FR(c,g,n.slideFullyVisibleClass),c.progress=i?-d:d,c.originalProgress=i?-f:f}}function Gte(e){const t=this;if(typeof e>"u"){const u=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*u||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:o,isEnd:s,progressLoop:a}=t;const l=o,c=s;if(r===0)i=0,o=!0,s=!0;else{i=(e-t.minTranslate())/r;const u=Math.abs(e-t.minTranslate())<1,d=Math.abs(e-t.maxTranslate())<1;o=u||i<=0,s=d||i>=1,u&&(i=0),d&&(i=1)}if(n.loop){const u=t.getSlideIndexByData(0),d=t.getSlideIndexByData(t.slides.length-1),f=t.slidesGrid[u],m=t.slidesGrid[d],h=t.slidesGrid[t.slidesGrid.length-1],g=Math.abs(e);g>=f?a=(g-f)/h:a=(g+h-m)/h,a>1&&(a-=1)}Object.assign(t,{progress:i,progressLoop:a,isBeginning:o,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!c&&t.emit("reachEnd toEdge"),(l&&!o||c&&!s)&&t.emit("fromEdge"),t.emit("progress",i)}const eb=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function Hte(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:i}=e,o=e.virtual&&n.virtual.enabled,s=e.grid&&n.grid&&n.grid.rows>1,a=d=>Os(r,`.${n.slideClass}${d}, swiper-slide${d}`)[0];let l,c,u;if(o)if(n.loop){let d=i-e.virtual.slidesBefore;d<0&&(d=e.virtual.slides.length+d),d>=e.virtual.slides.length&&(d-=e.virtual.slides.length),l=a(`[data-swiper-slide-index="${d}"]`)}else l=a(`[data-swiper-slide-index="${i}"]`);else s?(l=t.filter(d=>d.column===i)[0],u=t.filter(d=>d.column===i+1)[0],c=t.filter(d=>d.column===i-1)[0]):l=t[i];l&&(s||(u=Ote(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!u&&(u=t[0]),c=Tte(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!c===0&&(c=t[t.length-1]))),t.forEach(d=>{eb(d,d===l,n.slideActiveClass),eb(d,d===u,n.slideNextClass),eb(d,d===c,n.slidePrevClass)}),e.emitSlidesClasses()}const lm=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,r=t.closest(n());if(r){let i=r.querySelector(`.${e.params.lazyPreloaderClass}`);!i&&e.isElement&&(r.shadowRoot?i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),i&&i.remove())})),i&&i.remove()}},tb=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},Z1=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=i,a=[s-t];a.push(...Array.from({length:t}).map((l,c)=>s+r+c)),e.slides.forEach((l,c)=>{a.includes(l.column)&&tb(e,c)});return}const o=i+r-1;if(e.params.rewind||e.params.loop)for(let s=i-t;s<=o+t;s+=1){const a=(s%n+n)%n;(ao)&&tb(e,a)}else for(let s=Math.max(i-t,0);s<=Math.min(o+t,n-1);s+=1)s!==i&&(s>o||s=t[o]&&r=t[o]&&r=t[o]&&(i=o);return n.normalizeSlideIndex&&(i<0||typeof i>"u")&&(i=0),i}function Kte(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:i,activeIndex:o,realIndex:s,snapIndex:a}=t;let l=e,c;const u=m=>{let h=m-t.virtual.slidesBefore;return h<0&&(h=t.virtual.slides.length+h),h>=t.virtual.slides.length&&(h-=t.virtual.slides.length),h};if(typeof l>"u"&&(l=Vte(t)),r.indexOf(n)>=0)c=r.indexOf(n);else{const m=Math.min(i.slidesPerGroupSkip,l);c=m+Math.floor((l-m)/i.slidesPerGroup)}if(c>=r.length&&(c=r.length-1),l===o&&!t.params.loop){c!==a&&(t.snapIndex=c,t.emit("snapIndexChange"));return}if(l===o&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=u(l);return}const d=t.grid&&i.grid&&i.grid.rows>1;let f;if(t.virtual&&i.virtual.enabled&&i.loop)f=u(l);else if(d){const m=t.slides.filter(g=>g.column===l)[0];let h=parseInt(m.getAttribute("data-swiper-slide-index"),10);Number.isNaN(h)&&(h=Math.max(t.slides.indexOf(m),0)),f=Math.floor(h/i.grid.rows)}else if(t.slides[l]){const m=t.slides[l].getAttribute("data-swiper-slide-index");m?f=parseInt(m,10):f=l}else f=l;Object.assign(t,{previousSnapIndex:a,snapIndex:c,previousRealIndex:s,realIndex:f,previousIndex:o,activeIndex:l}),t.initialized&&Z1(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==f&&t.emit("realIndexChange"),t.emit("slideChange"))}function qte(e,t){const n=this,r=n.params;let i=e.closest(`.${r.slideClass}, swiper-slide`);!i&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(a=>{!i&&a.matches&&a.matches(`.${r.slideClass}, swiper-slide`)&&(i=a)});let o=!1,s;if(i){for(let a=0;al?u=l:r&&es?a="next":o"u"&&(t=o.params.speed);const g=Math.min(o.params.slidesPerGroupSkip,s);let R=g+Math.floor((s-g)/o.params.slidesPerGroup);R>=l.length&&(R=l.length-1);const b=-l[R];if(a.normalizeSlideIndex)for(let y=0;y=k&&_=k&&_=k&&(s=y)}if(o.initialized&&s!==d&&(!o.allowSlideNext&&(f?b>o.translate&&b>o.minTranslate():bo.translate&&b>o.maxTranslate()&&(d||0)!==s))return!1;s!==(u||0)&&n&&o.emit("beforeSlideChangeStart"),o.updateProgress(b);let w;if(s>d?w="next":s0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{m[y?"scrollLeft":"scrollTop"]=_})):m[y?"scrollLeft":"scrollTop"]=_,k&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1})}else{if(!o.support.smoothScroll)return HI({swiper:o,targetPosition:_,side:y?"left":"top"}),!0;m.scrollTo({[y?"left":"top"]:_,behavior:"smooth"})}return!0}return o.setTransition(t),o.setTranslate(b),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,r),o.transitionStart(n,w),t===0?o.transitionEnd(n,w):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(_){!o||o.destroyed||_.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,w))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0}function ane(e,t,n,r){e===void 0&&(e=0),n===void 0&&(n=!0),typeof e=="string"&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;typeof t>"u"&&(t=i.params.speed);const o=i.grid&&i.params.grid&&i.params.grid.rows>1;let s=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)s=s+i.virtual.slidesBefore;else{let a;if(o){const f=s*i.params.grid.rows;a=i.slides.filter(m=>m.getAttribute("data-swiper-slide-index")*1===f)[0].column}else a=i.getSlideIndexByData(s);const l=o?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:c}=i.params;let u=i.params.slidesPerView;u==="auto"?u=i.slidesPerViewDynamic():(u=Math.ceil(parseFloat(i.params.slidesPerView,10)),c&&u%2===0&&(u=u+1));let d=l-am.getAttribute("data-swiper-slide-index")*1===f)[0].column}else s=i.getSlideIndexByData(s)}return requestAnimationFrame(()=>{i.slideTo(s,t,n,r)}),i}function lne(e,t,n){t===void 0&&(t=!0);const r=this,{enabled:i,params:o,animating:s}=r;if(!i||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);let a=o.slidesPerGroup;o.slidesPerView==="auto"&&o.slidesPerGroup===1&&o.slidesPerGroupAuto&&(a=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex{r.slideTo(r.activeIndex+l,e,t,n)}),!0}return o.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)}function cne(e,t,n){t===void 0&&(t=!0);const r=this,{params:i,snapGrid:o,slidesGrid:s,rtlTranslate:a,enabled:l,animating:c}=r;if(!l||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const u=r.virtual&&i.virtual.enabled;if(i.loop){if(c&&!u&&i.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const d=a?r.translate:-r.translate;function f(b){return b<0?-Math.floor(Math.abs(b)):Math.floor(b)}const m=f(d),h=o.map(b=>f(b));let g=o[h.indexOf(m)-1];if(typeof g>"u"&&i.cssMode){let b;o.forEach((w,y)=>{m>=w&&(b=y)}),typeof b<"u"&&(g=o[b>0?b-1:b])}let R=0;if(typeof g<"u"&&(R=s.indexOf(g),R<0&&(R=r.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(R=R-r.slidesPerViewDynamic("previous",!0)+1,R=Math.max(R,0))),i.rewind&&r.isBeginning){const b=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(b,e,t,n)}else if(i.loop&&r.activeIndex===0&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(R,e,t,n)}),!0;return r.slideTo(R,e,t,n)}function une(e,t,n){t===void 0&&(t=!0);const r=this;if(!r.destroyed)return typeof e>"u"&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)}function dne(e,t,n,r){t===void 0&&(t=!0),r===void 0&&(r=.5);const i=this;if(i.destroyed)return;typeof e>"u"&&(e=i.params.speed);let o=i.activeIndex;const s=Math.min(i.params.slidesPerGroupSkip,o),a=s+Math.floor((o-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[a]){const c=i.snapGrid[a],u=i.snapGrid[a+1];l-c>(u-c)*r&&(o+=i.params.slidesPerGroup)}else{const c=i.snapGrid[a-1],u=i.snapGrid[a];l-c<=(u-c)*r&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,e,t,n)}function fne(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let i=e.clickedIndex,o;const s=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;o=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?ie.slides.length-e.loopedSlides+r/2?(e.loopFix(),i=e.getSlideIndex(Os(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),X1(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-r?(e.loopFix(),i=e.getSlideIndex(Os(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),X1(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}var pne={slideTo:sne,slideToLoop:ane,slideNext:lne,slidePrev:cne,slideReset:une,slideToClosest:dne,slideToClickedSlide:fne};function hne(e){const t=this,{params:n,slidesEl:r}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const i=()=>{Os(r,`.${n.slideClass}, swiper-slide`).forEach((d,f)=>{d.setAttribute("data-swiper-slide-index",f)})},o=t.grid&&n.grid&&n.grid.rows>1,s=n.slidesPerGroup*(o?n.grid.rows:1),a=t.slides.length%s!==0,l=o&&t.slides.length%n.grid.rows!==0,c=u=>{for(let d=0;d1;c.length"u"?o=l.getSlideIndex(c.filter(z=>z.classList.contains(m.slideActiveClass))[0]):k=o;const E=r==="next"||!r,P=r==="prev"||!r;let I=0,A=0;const L=w?Math.ceil(c.length/m.grid.rows):c.length,F=(w?c[o].column:o)+(h&&typeof i>"u"?-g/2+.5:0);if(F=0;le-=1)c[le].column===Z&&y.push(le)}else y.push(L-K-1)}}else if(F+g>L-b){A=Math.max(F-(L-b*2),R);for(let z=0;z{Z.column===K&&_.push(le)}):_.push(K)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),P&&y.forEach(z=>{c[z].swiperLoopMoveDOM=!0,f.prepend(c[z]),c[z].swiperLoopMoveDOM=!1}),E&&_.forEach(z=>{c[z].swiperLoopMoveDOM=!0,f.append(c[z]),c[z].swiperLoopMoveDOM=!1}),l.recalcSlides(),m.slidesPerView==="auto"?l.updateSlides():w&&(y.length>0&&P||_.length>0&&E)&&l.slides.forEach((z,K)=>{l.grid.updateSlide(K,z,l.slides)}),m.watchSlidesProgress&&l.updateSlidesOffset(),n){if(y.length>0&&P){if(typeof t>"u"){const z=l.slidesGrid[k],Z=l.slidesGrid[k+I]-z;a?l.setTranslate(l.translate-Z):(l.slideTo(k+Math.ceil(I),0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-Z,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-Z))}else if(i){const z=w?y.length/m.grid.rows:y.length;l.slideTo(l.activeIndex+z,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(_.length>0&&E)if(typeof t>"u"){const z=l.slidesGrid[k],Z=l.slidesGrid[k-A]-z;a?l.setTranslate(l.translate-Z):(l.slideTo(k-A,0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-Z,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-Z))}else{const z=w?_.length/m.grid.rows:_.length;l.slideTo(l.activeIndex-z,0,!1,!0)}}if(l.allowSlidePrev=u,l.allowSlideNext=d,l.controller&&l.controller.control&&!s){const z={slideRealIndex:t,direction:r,setTranslate:i,activeSlideIndex:o,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach(K=>{!K.destroyed&&K.params.loop&&K.loopFix({...z,slideTo:K.params.slidesPerView===m.slidesPerView?n:!1})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...z,slideTo:l.controller.control.params.slidesPerView===m.slidesPerView?n:!1})}l.emit("loopFix")}function gne(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(i=>{const o=typeof i.swiperSlideIndex>"u"?i.getAttribute("data-swiper-slide-index")*1:i.swiperSlideIndex;r[o]=i}),e.slides.forEach(i=>{i.removeAttribute("data-swiper-slide-index")}),r.forEach(i=>{n.append(i)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var vne={loopCreate:hne,loopFix:mne,loopDestroy:gne};function yne(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function bne(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var wne={setGrabCursor:yne,unsetGrabCursor:bne};function xne(e,t){t===void 0&&(t=this);function n(r){if(!r||r===ed()||r===Di())return null;r.assignedSlot&&(r=r.assignedSlot);const i=r.closest(e);return!i&&!r.getRootNode?null:i||n(r.getRootNode().host)}return n(t)}function zR(e,t,n){const r=Di(),{params:i}=e,o=i.edgeSwipeDetection,s=i.edgeSwipeThreshold;return o&&(n<=s||n>=r.innerWidth-s)?o==="prevent"?(t.preventDefault(),!0):!1:!0}function Sne(e){const t=this,n=ed();let r=e;r.originalEvent&&(r=r.originalEvent);const i=t.touchEventsData;if(r.type==="pointerdown"){if(i.pointerId!==null&&i.pointerId!==r.pointerId)return;i.pointerId=r.pointerId}else r.type==="touchstart"&&r.targetTouches.length===1&&(i.touchId=r.targetTouches[0].identifier);if(r.type==="touchstart"){zR(t,r,r.targetTouches[0].pageX);return}const{params:o,touches:s,enabled:a}=t;if(!a||!o.simulateTouch&&r.pointerType==="mouse"||t.animating&&o.preventInteractionOnTransition)return;!t.animating&&o.cssMode&&o.loop&&t.loopFix();let l=r.target;if(o.touchEventsTarget==="wrapper"&&!t.wrapperEl.contains(l)||"which"in r&&r.which===3||"button"in r&&r.button>0||i.isTouched&&i.isMoved)return;const c=!!o.noSwipingClass&&o.noSwipingClass!=="",u=r.composedPath?r.composedPath():r.path;c&&r.target&&r.target.shadowRoot&&u&&(l=u[0]);const d=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,f=!!(r.target&&r.target.shadowRoot);if(o.noSwiping&&(f?xne(d,l):l.closest(d))){t.allowClick=!0;return}if(o.swipeHandler&&!l.closest(o.swipeHandler))return;s.currentX=r.pageX,s.currentY=r.pageY;const m=s.currentX,h=s.currentY;if(!zR(t,r,m))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=m,s.startY=h,i.touchStartTime=wg(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(i.allowThresholdMove=!1);let g=!0;l.matches(i.focusableElements)&&(g=!1,l.nodeName==="SELECT"&&(i.isTouched=!1)),n.activeElement&&n.activeElement.matches(i.focusableElements)&&n.activeElement!==l&&n.activeElement.blur();const R=g&&t.allowTouchMove&&o.touchStartPreventDefault;(o.touchStartForcePreventDefault||R)&&!l.isContentEditable&&r.preventDefault(),o.freeMode&&o.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function _ne(e){const t=ed(),n=this,r=n.touchEventsData,{params:i,touches:o,rtlTranslate:s,enabled:a}=n;if(!a||!i.simulateTouch&&e.pointerType==="mouse")return;let l=e;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(r.touchId!==null||l.pointerId!==r.pointerId))return;let c;if(l.type==="touchmove"){if(c=[...l.changedTouches].filter(E=>E.identifier===r.touchId)[0],!c||c.identifier!==r.touchId)return}else c=l;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l);return}const u=c.pageX,d=c.pageY;if(l.preventedByNestedSwiper){o.startX=u,o.startY=d;return}if(!n.allowTouchMove){l.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(o,{startX:u,startY:d,currentX:u,currentY:d}),r.touchStartTime=wg());return}if(i.touchReleaseOnEdges&&!i.loop){if(n.isVertical()){if(do.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else if(uo.startX&&n.translate>=n.minTranslate())return}if(t.activeElement&&l.target===t.activeElement&&l.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",l),o.previousX=o.currentX,o.previousY=o.currentY,o.currentX=u,o.currentY=d;const f=o.currentX-o.startX,m=o.currentY-o.startY;if(n.params.threshold&&Math.sqrt(f**2+m**2)"u"){let E;n.isHorizontal()&&o.currentY===o.startY||n.isVertical()&&o.currentX===o.startX?r.isScrolling=!1:f*f+m*m>=25&&(E=Math.atan2(Math.abs(m),Math.abs(f))*180/Math.PI,r.isScrolling=n.isHorizontal()?E>i.touchAngle:90-E>i.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",l),typeof r.startMoving>"u"&&(o.currentX!==o.startX||o.currentY!==o.startY)&&(r.startMoving=!0),r.isScrolling||l.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let h=n.isHorizontal()?f:m,g=n.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;i.oneWayMovement&&(h=Math.abs(h)*(s?1:-1),g=Math.abs(g)*(s?1:-1)),o.diff=h,h*=i.touchRatio,s&&(h=-h,g=-g);const R=n.touchesDirection;n.swipeDirection=h>0?"prev":"next",n.touchesDirection=g>0?"prev":"next";const b=n.params.loop&&!i.cssMode,w=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(b&&w&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const E=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(E)}r.allowMomentumBounce=!1,i.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",l)}let y;if(new Date().getTime(),r.isMoved&&r.allowThresholdMove&&R!==n.touchesDirection&&b&&w&&Math.abs(h)>=1){Object.assign(o,{startX:u,startY:d,currentX:u,currentY:d,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",l),r.isMoved=!0,r.currentTranslate=h+r.startTranslate;let _=!0,k=i.resistanceRatio;if(i.touchReleaseOnEdges&&(k=0),h>0?(b&&w&&!y&&r.allowThresholdMove&&r.currentTranslate>(i.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(_=!1,i.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+h)**k))):h<0&&(b&&w&&!y&&r.allowThresholdMove&&r.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]:n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-(i.slidesPerView==="auto"?n.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),r.currentTranslater.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),i.threshold>0)if(Math.abs(h)>i.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,r.currentTranslate=r.startTranslate,o.diff=n.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY;return}}else{r.currentTranslate=r.startTranslate;return}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function Cne(e){const t=this,n=t.touchEventsData;let r=e;r.originalEvent&&(r=r.originalEvent);let i;if(r.type==="touchend"||r.type==="touchcancel"){if(i=[...r.changedTouches].filter(k=>k.identifier===n.touchId)[0],!i||i.identifier!==n.touchId)return}else{if(n.touchId!==null||r.pointerId!==n.pointerId)return;i=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return;n.pointerId=null,n.touchId=null;const{params:s,touches:a,rtlTranslate:l,slidesGrid:c,enabled:u}=t;if(!u||!s.simulateTouch&&r.pointerType==="mouse")return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&s.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}s.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const d=wg(),f=d-n.touchStartTime;if(t.allowClick){const k=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(k&&k[0]||r.target,k),t.emit("tap click",r),f<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=wg(),X1(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||a.diff===0&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let m;if(s.followFinger?m=l?t.translate:-t.translate:m=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:m});return}const h=m>=-t.maxTranslate()&&!t.params.loop;let g=0,R=t.slidesSizesGrid[0];for(let k=0;k=c[k]&&m=c[k])&&(g=k,R=c[c.length-1]-c[c.length-2])}let b=null,w=null;s.rewind&&(t.isBeginning?w=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const y=(m-c[g])/R,_=gs.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(y>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?b:g+_):t.slideTo(g)),t.swipeDirection==="prev"&&(y>1-s.longSwipesRatio?t.slideTo(g+_):w!==null&&y<0&&Math.abs(y)>s.longSwipesRatio?t.slideTo(w):t.slideTo(g))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(g+_):t.slideTo(g):(t.swipeDirection==="next"&&t.slideTo(b!==null?b:g+_),t.swipeDirection==="prev"&&t.slideTo(w!==null?w:g))}}function UR(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:i,snapGrid:o}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const a=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!a?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=i,e.allowSlideNext=r,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function kne(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function Ene(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let i;const o=e.maxTranslate()-e.minTranslate();o===0?i=0:i=(e.translate-e.minTranslate())/o,i!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function Rne(e){const t=this;lm(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function Pne(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const YI=(e,t)=>{const n=ed(),{params:r,el:i,wrapperEl:o,device:s}=e,a=!!r.nested,l=t==="on"?"addEventListener":"removeEventListener",c=t;!i||typeof i=="string"||(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:a}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:a}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:a}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&i[l]("click",e.onClick,!0),r.cssMode&&o[l]("scroll",e.onScroll),r.updateOnWindowResize?e[c](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",UR,!0):e[c]("observerUpdate",UR,!0),i[l]("load",e.onLoad,{capture:!0}))};function Tne(){const e=this,{params:t}=e;e.onTouchStart=Sne.bind(e),e.onTouchMove=_ne.bind(e),e.onTouchEnd=Cne.bind(e),e.onDocumentTouchStart=Pne.bind(e),t.cssMode&&(e.onScroll=Ene.bind(e)),e.onClick=kne.bind(e),e.onLoad=Rne.bind(e),YI(e,"on")}function One(){YI(this,"off")}var jne={attachEvents:Tne,detachEvents:One};const WR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function Lne(){const e=this,{realIndex:t,initialized:n,params:r,el:i}=e,o=r.breakpoints;if(!o||o&&Object.keys(o).length===0)return;const s=e.getBreakpoint(o,e.params.breakpointsBase,e.el);if(!s||e.currentBreakpoint===s)return;const l=(s in o?o[s]:void 0)||e.originalParams,c=WR(e,r),u=WR(e,l),d=e.params.grabCursor,f=l.grabCursor,m=r.enabled;c&&!u?(i.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&u&&(i.classList.add(`${r.containerModifierClass}grid`),(l.grid.fill&&l.grid.fill==="column"||!l.grid.fill&&r.grid.fill==="column")&&i.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),d&&!f?e.unsetGrabCursor():!d&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(y=>{if(typeof l[y]>"u")return;const _=r[y]&&r[y].enabled,k=l[y]&&l[y].enabled;_&&!k&&e[y].disable(),!_&&k&&e[y].enable()});const h=l.direction&&l.direction!==r.direction,g=r.loop&&(l.slidesPerView!==r.slidesPerView||h),R=r.loop;h&&n&&e.changeDirection(),bi(e.params,l);const b=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),m&&!b?e.disable():!m&&b&&e.enable(),e.currentBreakpoint=s,e.emit("_beforeBreakpoint",l),n&&(g?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!R&&w?(e.loopCreate(t),e.updateSlides()):R&&!w&&e.loopDestroy()),e.emit("breakpoint",l)}function Ine(e,t,n){if(t===void 0&&(t="window"),!e||t==="container"&&!n)return;let r=!1;const i=Di(),o=t==="window"?i.innerHeight:n.clientHeight,s=Object.keys(e).map(a=>{if(typeof a=="string"&&a.indexOf("@")===0){const l=parseFloat(a.substr(1));return{value:o*l,point:a}}return{value:a,point:a}});s.sort((a,l)=>parseInt(a.value,10)-parseInt(l.value,10));for(let a=0;a{typeof r=="object"?Object.keys(r).forEach(i=>{r[i]&&n.push(t+i)}):typeof r=="string"&&n.push(t+r)}),n}function $ne(){const e=this,{classNames:t,params:n,rtl:r,el:i,device:o}=e,s=Nne(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:o.android},{ios:o.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),i.classList.add(...t),e.emitContainerClasses()}function Ane(){const e=this,{el:t,classNames:n}=e;!t||typeof t=="string"||(t.classList.remove(...n),e.emitContainerClasses())}var Dne={addClasses:$ne,removeClasses:Ane};function Bne(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const i=e.slides.length-1,o=e.slidesGrid[i]+e.slidesSizesGrid[i]+r*2;e.isLocked=e.size>o}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var Fne={checkOverflow:Bne},ew={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function zne(e,t){return function(r){r===void 0&&(r={});const i=Object.keys(r)[0],o=r[i];if(typeof o!="object"||o===null){bi(t,r);return}if(e[i]===!0&&(e[i]={enabled:!0}),i==="navigation"&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),!(i in e&&"enabled"in o)){bi(t,r);return}typeof e[i]=="object"&&!("enabled"in e[i])&&(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),bi(t,r)}}const nb={eventsEmitter:Dte,update:Yte,translate:tne,transition:one,slide:pne,loop:vne,grabCursor:wne,events:jne,breakpoints:Mne,checkOverflow:Fne,classes:Dne},rb={};let US=class ws{constructor(){let t,n;for(var r=arguments.length,i=new Array(r),o=0;o1){const u=[];return s.querySelectorAll(n.el).forEach(d=>{const f=bi({},n,{el:d});u.push(new ws(f))}),u}const a=this;a.__swiper__=!0,a.support=VI(),a.device=KI({userAgent:n.userAgent}),a.browser=Nte(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],n.modules&&Array.isArray(n.modules)&&a.modules.push(...n.modules);const l={};a.modules.forEach(u=>{u({params:n,swiper:a,extendParams:zne(n,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const c=bi({},ew,l);return a.params=bi({},c,rb,n),a.originalParams=bi({},a.params),a.passedParams=bi({},n),a.params&&a.params.on&&Object.keys(a.params.on).forEach(u=>{a.on(u,a.params.on[u])}),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return a.params.direction==="horizontal"},isVertical(){return a.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:n,params:r}=this,i=Os(n,`.${r.slideClass}, swiper-slide`),o=DR(i[0]);return DR(t)-o}getSlideIndexByData(t){return this.getSlideIndex(this.slides.filter(n=>n.getAttribute("data-swiper-slide-index")*1===t)[0])}recalcSlides(){const t=this,{slidesEl:n,params:r}=t;t.slides=Os(n,`.${r.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,n){const r=this;t=Math.min(Math.max(t,0),1);const i=r.minTranslate(),s=(r.maxTranslate()-i)*t+i;r.translateTo(s,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.forEach(r=>{const i=t.getSlideClasses(r);n.push({slideEl:r,classNames:i}),t.emit("_slideClass",r,i)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t,n){t===void 0&&(t="current"),n===void 0&&(n=!1);const r=this,{params:i,slides:o,slidesGrid:s,slidesSizesGrid:a,size:l,activeIndex:c}=r;let u=1;if(typeof i.slidesPerView=="number")return i.slidesPerView;if(i.centeredSlides){let d=o[c]?Math.ceil(o[c].swiperSlideSize):0,f;for(let m=c+1;ml&&(f=!0));for(let m=c-1;m>=0;m-=1)o[m]&&!f&&(d+=o[m].swiperSlideSize,u+=1,d>l&&(f=!0))}else if(t==="current")for(let d=c+1;d=0;d-=1)s[c]-s[d]{s.complete&&lm(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function i(){const s=t.rtlTranslate?t.translate*-1:t.translate,a=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(a),t.updateActiveIndex(),t.updateSlidesClasses()}let o;if(r.freeMode&&r.freeMode.enabled&&!r.cssMode)i(),r.autoHeight&&t.updateAutoHeight();else{if((r.slidesPerView==="auto"||r.slidesPerView>1)&&t.isEnd&&!r.centeredSlides){const s=t.virtual&&r.virtual.enabled?t.virtual.slides:t.slides;o=t.slideTo(s.length-1,0,!1,!0)}else o=t.slideTo(t.activeIndex,0,!1,!0);o||i()}r.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n){n===void 0&&(n=!0);const r=this,i=r.params.direction;return t||(t=i==="horizontal"?"vertical":"horizontal"),t===i||t!=="horizontal"&&t!=="vertical"||(r.el.classList.remove(`${r.params.containerModifierClass}${i}`),r.el.classList.add(`${r.params.containerModifierClass}${t}`),r.emitContainerClasses(),r.params.direction=t,r.slides.forEach(o=>{t==="vertical"?o.style.width="":o.style.height=""}),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.el.classList.add(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.el.classList.remove(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;let r=t||n.params.el;if(typeof r=="string"&&(r=document.querySelector(r)),!r)return!1;r.swiper=n,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===n.params.swiperElementNodeName.toUpperCase()&&(n.isElement=!0);const i=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=r&&r.shadowRoot&&r.shadowRoot.querySelector?r.shadowRoot.querySelector(i()):Os(r,i())[0];return!s&&n.params.createElements&&(s=J1("div",n.params.wrapperClass),r.append(s),Os(r,`.${n.params.slideClass}`).forEach(a=>{s.append(a)})),Object.assign(n,{el:r,wrapperEl:s,slidesEl:n.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:s,hostEl:n.isElement?r.parentNode.host:r,mounted:!0,rtl:r.dir.toLowerCase()==="rtl"||ka(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||ka(r,"direction")==="rtl"),wrongRTL:ka(s,"display")==="-webkit-box"}),!0}init(t){const n=this;if(n.initialized||n.mount(t)===!1)return n;n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.loop&&n.virtual&&n.params.virtual.enabled?n.slideTo(n.params.initialSlide+n.virtual.slidesBefore,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.params.loop&&n.loopCreate(),n.attachEvents();const i=[...n.el.querySelectorAll('[loading="lazy"]')];return n.isElement&&i.push(...n.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(o=>{o.complete?lm(n,o):o.addEventListener("load",s=>{lm(n,s.target)})}),Z1(n),n.initialized=!0,Z1(n),n.emit("init"),n.emit("afterInit"),n}destroy(t,n){t===void 0&&(t=!0),n===void 0&&(n=!0);const r=this,{params:i,el:o,wrapperEl:s,slides:a}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),i.loop&&r.loopDestroy(),n&&(r.removeClasses(),o&&typeof o!="string"&&o.removeAttribute("style"),s&&s.removeAttribute("style"),a&&a.length&&a.forEach(l=>{l.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(l=>{r.off(l)}),t!==!1&&(r.el&&typeof r.el!="string"&&(r.el.swiper=null),kte(r)),r.destroyed=!0),null}static extendDefaults(t){bi(rb,t)}static get extendedDefaults(){return rb}static get defaults(){return ew}static installModule(t){ws.prototype.__modules__||(ws.prototype.__modules__=[]);const n=ws.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>ws.installModule(n)),ws):(ws.installModule(t),ws)}};Object.keys(nb).forEach(e=>{Object.keys(nb[e]).forEach(t=>{US.prototype[t]=nb[e][t]})});US.use([$te,Ate]);const QI=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function oc(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function mu(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:oc(t[r])&&oc(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:mu(e[r],t[r]):e[r]=t[r]})}function XI(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function JI(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function ZI(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function eM(e){e===void 0&&(e="");const t=e.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function Une(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function Wne(e){let{swiper:t,slides:n,passedParams:r,changedParams:i,nextEl:o,prevEl:s,scrollbarEl:a,paginationEl:l}=e;const c=i.filter(A=>A!=="children"&&A!=="direction"&&A!=="wrapperClass"),{params:u,pagination:d,navigation:f,scrollbar:m,virtual:h,thumbs:g}=t;let R,b,w,y,_,k,E,P;i.includes("thumbs")&&r.thumbs&&r.thumbs.swiper&&u.thumbs&&!u.thumbs.swiper&&(R=!0),i.includes("controller")&&r.controller&&r.controller.control&&u.controller&&!u.controller.control&&(b=!0),i.includes("pagination")&&r.pagination&&(r.pagination.el||l)&&(u.pagination||u.pagination===!1)&&d&&!d.el&&(w=!0),i.includes("scrollbar")&&r.scrollbar&&(r.scrollbar.el||a)&&(u.scrollbar||u.scrollbar===!1)&&m&&!m.el&&(y=!0),i.includes("navigation")&&r.navigation&&(r.navigation.prevEl||s)&&(r.navigation.nextEl||o)&&(u.navigation||u.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(_=!0);const I=A=>{t[A]&&(t[A].destroy(),A==="navigation"?(t.isElement&&(t[A].prevEl.remove(),t[A].nextEl.remove()),u[A].prevEl=void 0,u[A].nextEl=void 0,t[A].prevEl=void 0,t[A].nextEl=void 0):(t.isElement&&t[A].el.remove(),u[A].el=void 0,t[A].el=void 0))};i.includes("loop")&&t.isElement&&(u.loop&&!r.loop?k=!0:!u.loop&&r.loop?E=!0:P=!0),c.forEach(A=>{if(oc(u[A])&&oc(r[A]))Object.assign(u[A],r[A]),(A==="navigation"||A==="pagination"||A==="scrollbar")&&"enabled"in r[A]&&!r[A].enabled&&I(A);else{const L=r[A];(L===!0||L===!1)&&(A==="navigation"||A==="pagination"||A==="scrollbar")?L===!1&&I(A):u[A]=r[A]}}),c.includes("controller")&&!b&&t.controller&&t.controller.control&&u.controller&&u.controller.control&&(t.controller.control=u.controller.control),i.includes("children")&&n&&h&&u.virtual.enabled?(h.slides=n,h.update(!0)):i.includes("virtual")&&h&&u.virtual.enabled&&(n&&(h.slides=n),h.update(!0)),i.includes("children")&&n&&u.loop&&(P=!0),R&&g.init()&&g.update(!0),b&&(t.controller.control=u.controller.control),w&&(t.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(u.pagination.el=l),d.init(),d.render(),d.update()),y&&(t.isElement&&(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-scrollbar"),a.part.add("scrollbar"),t.el.appendChild(a)),a&&(u.scrollbar.el=a),m.init(),m.updateSize(),m.setTranslate()),_&&(t.isElement&&((!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-button-next"),o.innerHTML=t.hostEl.constructor.nextButtonSvg,o.part.add("button-next"),t.el.appendChild(o)),(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-button-prev"),s.innerHTML=t.hostEl.constructor.prevButtonSvg,s.part.add("button-prev"),t.el.appendChild(s))),o&&(u.navigation.nextEl=o),s&&(u.navigation.prevEl=s),f.init(),f.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=r.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=r.allowSlidePrev),i.includes("direction")&&t.changeDirection(r.direction,!1),(k||P)&&t.loopDestroy(),(E||P)&&t.loopCreate(),t.update()}function Gne(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);const n={on:{}},r={},i={};mu(n,ew),n._emitClasses=!0,n.init=!1;const o={},s=QI.map(l=>l.replace(/_/,"")),a=Object.assign({},e);return Object.keys(a).forEach(l=>{typeof e[l]>"u"||(s.indexOf(l)>=0?oc(e[l])?(n[l]={},i[l]={},mu(n[l],e[l]),mu(i[l],e[l])):(n[l]=e[l],i[l]=e[l]):l.search(/on[A-Z]/)===0&&typeof e[l]=="function"?t?r[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:n.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:o[l]=e[l])}),["navigation","pagination","scrollbar"].forEach(l=>{n[l]===!0&&(n[l]={}),n[l]===!1&&delete n[l]}),{params:n,passedParams:i,rest:o,events:r}}function Hne(e,t){let{el:n,nextEl:r,prevEl:i,paginationEl:o,scrollbarEl:s,swiper:a}=e;XI(t)&&r&&i&&(a.params.navigation.nextEl=r,a.originalParams.navigation.nextEl=r,a.params.navigation.prevEl=i,a.originalParams.navigation.prevEl=i),JI(t)&&o&&(a.params.pagination.el=o,a.originalParams.pagination.el=o),ZI(t)&&s&&(a.params.scrollbar.el=s,a.originalParams.scrollbar.el=s),a.init(n)}function Vne(e,t,n,r,i){const o=[];if(!t)return o;const s=l=>{o.indexOf(l)<0&&o.push(l)};if(n&&r){const l=r.map(i),c=n.map(i);l.join("")!==c.join("")&&s("children"),r.length!==n.length&&s("children")}return QI.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(oc(e[l])&&oc(t[l])){const c=Object.keys(e[l]),u=Object.keys(t[l]);c.length!==u.length?s(l):(c.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}),u.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}))}else e[l]!==t[l]&&s(l)}),o}const Kne=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{tM(n)?t.push(n):n.props&&n.props.children&&nM(n.props.children).forEach(r=>t.push(r))}),t}function qne(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return jt.Children.toArray(e).forEach(r=>{if(tM(r))t.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const i=nM(r.props.children);i.length>0?i.forEach(o=>t.push(o)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:t,slots:n}}function Yne(e,t,n){if(!n)return null;const r=u=>{let d=u;return u<0?d=t.length+u:d>=t.length&&(d=d-t.length),d},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:o,to:s}=n,a=e.params.loop?-t.length:0,l=e.params.loop?t.length*2:t.length,c=[];for(let u=a;u=o&&u<=s&&c.push(t[r(u)]);return c.map((u,d)=>jt.cloneElement(u,{swiper:e,style:i,key:u.props.virtualIndex||u.key||`slide-${d}`}))}function mf(e,t){return typeof window>"u"?C.useEffect(e,t):C.useLayoutEffect(e,t)}const GR=C.createContext(null),Qne=C.createContext(null),Np=C.forwardRef(function(e,t){let{className:n,tag:r="div",wrapperTag:i="div",children:o,onSwiper:s,...a}=e===void 0?{}:e,l=!1;const[c,u]=C.useState("swiper"),[d,f]=C.useState(null),[m,h]=C.useState(!1),g=C.useRef(!1),R=C.useRef(null),b=C.useRef(null),w=C.useRef(null),y=C.useRef(null),_=C.useRef(null),k=C.useRef(null),E=C.useRef(null),P=C.useRef(null),{params:I,passedParams:A,rest:L,events:N}=Gne(a),{slides:F,slots:z}=qne(o),K=()=>{h(!m)};Object.assign(I.on,{_containerClasses(V,se){u(se)}});const Z=()=>{Object.assign(I.on,N),l=!0;const V={...I};if(delete V.wrapperClass,b.current=new US(V),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=F;const se={cache:!1,slides:F,renderExternal:f,renderExternalUpdate:!1};mu(b.current.params.virtual,se),mu(b.current.originalParams.virtual,se)}};R.current||Z(),b.current&&b.current.on("_beforeBreakpoint",K);const le=()=>{l||!N||!b.current||Object.keys(N).forEach(V=>{b.current.on(V,N[V])})},ce=()=>{!N||!b.current||Object.keys(N).forEach(V=>{b.current.off(V,N[V])})};C.useEffect(()=>()=>{b.current&&b.current.off("_beforeBreakpoint",K)}),C.useEffect(()=>{!g.current&&b.current&&(b.current.emitSlidesClasses(),g.current=!0)}),mf(()=>{if(t&&(t.current=R.current),!!R.current)return b.current.destroyed&&Z(),Hne({el:R.current,nextEl:_.current,prevEl:k.current,paginationEl:E.current,scrollbarEl:P.current,swiper:b.current},I),s&&!b.current.destroyed&&s(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}},[]),mf(()=>{le();const V=Vne(A,w.current,F,y.current,se=>se.key);return w.current=A,y.current=F,V.length&&b.current&&!b.current.destroyed&&Wne({swiper:b.current,slides:F,passedParams:A,changedParams:V,nextEl:_.current,prevEl:k.current,scrollbarEl:P.current,paginationEl:E.current}),()=>{ce()}}),mf(()=>{Kne(b.current)},[d]);function H(){return I.virtual?Yne(b.current,F,d):F.map((V,se)=>jt.cloneElement(V,{swiper:b.current,swiperSlideIndex:se}))}return jt.createElement(r,Sg({ref:R,className:eM(`${c}${n?` ${n}`:""}`)},L),jt.createElement(Qne.Provider,{value:b.current},z["container-start"],jt.createElement(i,{className:Une(I.wrapperClass)},z["wrapper-start"],H(),z["wrapper-end"]),XI(I)&&jt.createElement(jt.Fragment,null,jt.createElement("div",{ref:k,className:"swiper-button-prev"}),jt.createElement("div",{ref:_,className:"swiper-button-next"})),ZI(I)&&jt.createElement("div",{ref:P,className:"swiper-scrollbar"}),JI(I)&&jt.createElement("div",{ref:E,className:"swiper-pagination"}),z["container-end"]))});Np.displayName="Swiper";const Fu=C.forwardRef(function(e,t){let{tag:n="div",children:r,className:i="",swiper:o,zoom:s,lazy:a,virtualIndex:l,swiperSlideIndex:c,...u}=e===void 0?{}:e;const d=C.useRef(null),[f,m]=C.useState("swiper-slide"),[h,g]=C.useState(!1);function R(_,k,E){k===d.current&&m(E)}mf(()=>{if(typeof c<"u"&&(d.current.swiperSlideIndex=c),t&&(t.current=d.current),!(!d.current||!o)){if(o.destroyed){f!=="swiper-slide"&&m("swiper-slide");return}return o.on("_slideClass",R),()=>{o&&o.off("_slideClass",R)}}}),mf(()=>{o&&d.current&&!o.destroyed&&m(o.getSlideClasses(d.current))},[o]);const b={isActive:f.indexOf("swiper-slide-active")>=0,isVisible:f.indexOf("swiper-slide-visible")>=0,isPrev:f.indexOf("swiper-slide-prev")>=0,isNext:f.indexOf("swiper-slide-next")>=0},w=()=>typeof r=="function"?r(b):r,y=()=>{g(!0)};return jt.createElement(n,Sg({ref:d,className:eM(`${f}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:y},u),s&&jt.createElement(GR.Provider,{value:b},jt.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s=="number"?s:void 0},w(),a&&!h&&jt.createElement("div",{className:"swiper-lazy-preloader"}))),!s&&jt.createElement(GR.Provider,{value:b},w(),a&&!h&&jt.createElement("div",{className:"swiper-lazy-preloader"})))});Fu.displayName="SwiperSlide";const Xne=({guild:e})=>{const t=C.useRef(null),[n,r]=C.useState(1);C.useLayoutEffect(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)));const i=C.useCallback(()=>{if(!t.current)return;const{width:o,height:s}=t.current.getBoundingClientRect(),a=o/1e3,l=s/700,c=Math.min(a,l,1);r(c??1)},[]);return v.jsx("div",{ref:t,style:{width:"100%",maxWidth:"1000px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsxs("div",{style:{width:`${1e3*n}px`,height:`${700*n}px`,display:"flex",flexDirection:"row"},children:[v.jsx("div",{className:"card-front",style:{backgroundImage:`url(${cn.get(`${e}_front`)})`,"--scale":n,borderTopRightRadius:0,borderBottomRightRadius:0}}),v.jsx("div",{className:"card-back",style:{backgroundImage:`url(${cn.get(`${e}_back`)})`,"--scale":n,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})};function rM({guild:e}){const t=C.useRef(null),n=C.useRef(null),[r,i]=C.useState(1);C.useLayoutEffect(()=>(o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)));const o=C.useCallback(()=>{if(!t.current)return;const{width:s,height:a}=t.current.getBoundingClientRect(),l=s/500,c=a/700,u=Math.min(l,c,1);i(u??1)},[]);return v.jsx("div",{ref:t,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{ref:n,className:"flip-card",onClick:()=>{var s;(s=n.current)==null||s.classList.toggle("flipped")},children:v.jsxs("div",{className:"flip-card-inner",children:[v.jsx("div",{className:"flip-card-front",children:v.jsx("div",{className:"card-front",style:{backgroundImage:`url(${cn.get(`${e}_front`)})`,"--scale":r}})}),v.jsx("div",{className:"flip-card-back",children:v.jsx("div",{className:"card-back",style:{backgroundImage:`url(${cn.get(`${e}_back`)})`,"--scale":r}})})]})})})}function Jne(){const[e,t]=C.useState(!1),[n,r]=C.useState(!1),i=sD(C.useCallback(s=>s.nextLocation.pathname.startsWith("/game")?(t(!0),!0):!1,[t]));C.useEffect(()=>{r(!0)},[n,r]);const{active:o}=ta();return v.jsxs(rn,{style:{width:"100%",height:"100%",display:"flex",flexDirection:"row"},children:[v.jsx(fs,{children:v.jsxs(rn,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[v.jsxs(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:[v.jsx(Fo,{color:"inherit",href:"/game",size:"small",disabled:o,children:v.jsx(jS,{})}),o?v.jsx(_t,{children:"Draft"}):v.jsx(ko,{underline:"hover",color:"inherit",href:"/game/draft",children:"Draft"}),v.jsx(_t,{children:"Play"})]}),v.jsx(IS,{})]})}),v.jsx(Zne,{}),v.jsx(k7,{open:e,onClose:()=>t(!1),autoHideDuration:5e3,children:v.jsx(u8,{severity:"warning",action:v.jsx(yn,{size:"small",onClick:i.proceed,children:"Exit Game"}),children:"Making changes to the team selections will reset the game state."})})]})}function Zne(){const e=Ni(),t=kx(e.breakpoints.up("sm")),{active:n}=ta(),{gameState1$:r,gameState2$:i}=ay(),[o,s]=C.useState();C.useEffect(()=>{if(!r)return;let d=!1;return(async()=>{const m=await Ln(r);d||s(m)})(),()=>{d=!0}},[r]);const[a,l]=C.useState();C.useEffect(()=>{if(!i)return;let d=!1;return(async()=>{const m=await Ln(i);d||l(m)})(),()=>{d=!0}},[i]);const[c,u]=fo(async d=>{if(!o||!a)return;const f=await d.models.find().where("id").in(o.roster.map(R=>R.name)).exec(),m=await Promise.all(f.map(R=>R.expand()));Ks(m,"id",o.roster.map(R=>R.name));const h=await d.models.find().where("id").in(a.roster.map(R=>R.name)).exec(),g=await Promise.all(h.map(R=>R.expand()));return Ks(g,"id",a.roster.map(R=>R.name)),[m,g]},[o,a])??[];return!o||!a||!c||!u?null:t?v.jsxs(v.Fragment,{children:[v.jsx(ib,{teams:[o],rosters:[c],disabled:[!1]}),v.jsx(Lo,{orientation:"vertical"}),v.jsx(ib,{teams:[a],rosters:[u],disabled:[!!n]})]}):v.jsx(ib,{teams:[o,a],rosters:[c,u],disabled:[!1,!!n]})}const ib=({teams:e,rosters:t,disabled:n})=>{const r=Ni(),i=kx(r.breakpoints.up("sm")),o=C.useRef(null),[s,a]=C.useState(!1),[l,c]=C.useState(0),[u,d]=C.useState(!0),[f,m]=C.useState(500),[h,g]=C.useState(700),[R,b]=C.useState(700);C.useLayoutEffect(()=>(w(),window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)));const w=C.useCallback(()=>{var E,P;const y=((E=o.current)==null?void 0:E.getBoundingClientRect().width)??0,_=((P=o.current)==null?void 0:P.getBoundingClientRect().height)??0,k=i?56:112;m(Math.min(y-12,(_-k)*5/7-12)),g(Math.min(_-k-12,y*7/5-12)),b(_-k)},[i]);return v.jsxs("div",{ref:o,style:{width:"100%",display:"flex",flexDirection:"column"},children:[v.jsx(ste,{disabled:n,teams:e,rosters:t,expanded:u,onClick:(y,_)=>{c(y),d(_),a(!_)}}),v.jsx("div",{style:{position:"relative",overflow:"hidden",flexGrow:1},children:v.jsx(Ev,{disablePortal:!0,sx:{zIndex:1100},open:s,onClose:()=>{a(!1),d(!0)},componentsProps:{root:{style:{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"}},backdrop:{style:{position:"absolute"}}},children:v.jsx(Np,{initialSlide:l,direction:"vertical",centeredSlides:!0,spaceBetween:(R-Math.min(h,500))/2,onInit:y=>{y.el.style.width=`${Math.min(f,500)}px`,y.el.style.height=`${Math.min(h,700)}px`},style:{overflow:"visible"},children:e.map((y,_)=>[()=>v.jsx(rM,{guild:y.guild}),t[_].map((k,E)=>()=>v.jsx(WI,{model:k,health$:y.get$("roster").pipe(qt(P=>P[E].health)),children:v.jsx(ere,{model:k,state:e[_],disabled:n[_]})}))]).flat(2).map((y,_)=>v.jsx(Fu,{children:v.jsx("div",{style:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:y==null?void 0:y()})},_))})})})]})};function ere({state:e,model:t,disabled:n=!1}){return v.jsx(us,{elevation:2,sx:{position:"absolute",right:0,bottom:0},children:v.jsx(zI,{state:e,model:t,disabled:n,stacked:!0})})}function tre(){const e=Js(),{setting$:t}=ui(),[n,r]=C.useState(null);C.useEffect(()=>{t&&Ln(t).then(m=>m==null?void 0:m.incrementalPatch({gamePlayRoute:`${e.pathname}${e.search}`})).catch(console.error)},[e,t]);const{gbdb:i}=Yr(),{active:o,netDoc:s}=ta(),a=o?s==null?void 0:s.get("uid"):"Player1",l=o?s==null?void 0:s.get("oid"):"Player2",[c,u]=C.useState();C.useEffect(()=>{const m=i==null?void 0:i.game_state.findOne(a).$;if(u(m),!m)return;let h=!1;return(async()=>{if(h)return;await Ln(m)===null&&await(i==null?void 0:i.game_state.upsert({_id:a,roster:[]}))})().catch(console.error),()=>{h=!0}},[i,a]);const[d,f]=C.useState();return C.useEffect(()=>{const m=i==null?void 0:i.game_state.findOne(l).$;if(f(m),!m)return;let h=!1;return(async()=>{if(h)return;await Ln(m)===null&&!o&&await(i==null?void 0:i.game_state.upsert({_id:l,roster:[]}))})().catch(console.error),()=>{h=!0}},[i,l,o]),v.jsxs("main",{style:{width:"100%",height:"100%",overflow:"auto",display:"flex"},children:[v.jsxs(fs,{children:[v.jsx(rn,{ref:m=>r(m),sx:{width:"100%",display:"flex",flexDirection:"row"}}),v.jsx(RJ,{})]}),v.jsx(OS.Provider,{value:n,children:v.jsx(nx,{context:{gameState1$:c,gameState2$:d}})})]})}function nre({model:e}){const{setting$:t}=ui(),n=C.useRef(null),[r,i]=C.useState(1),[o,s]=C.useState();C.useEffect(()=>{const d=t==null?void 0:t.pipe(qt(f=>f==null?void 0:f.toJSON().data.cardPreferences.preferredStyle)).subscribe(f=>s(f));return()=>d==null?void 0:d.unsubscribe()},[t]),C.useLayoutEffect(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)));const a=C.useCallback(()=>{if(!n.current)return;const{width:d,height:f}=n.current.getBoundingClientRect(),m=d/1e3,h=f/700,g=Math.min(m,h,1);i(g??1)},[]),l=e.id,u=o==="gbcp"&&(cn.has(`${l}_gbcp_front`)||cn.has(`${l}_full`))?cn.get(`${l}_full`)??void 0:void 0;return v.jsx("div",{ref:n,style:{width:"100%",maxWidth:"1000px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsxs("div",{style:{width:`${1e3*r}px`,height:`${700*r}px`,display:"flex",flexDirection:"row",...u?{backgroundImage:`url(${u})`,backgroundSize:"100%",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:`${25*r}px`}:{}},children:[v.jsx(yg,{model:e,noBackground:!!u,style:{"--scale":r,borderTopRightRadius:0,borderBottomRightRadius:0}}),v.jsx(bg,{model:e,noBackground:!!u,style:{"--scale":r,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})}const rre="/assets/GB-S4-Reference-1-Cx3eC7d4.png",ire="/assets/GB-S4-Reference-2-CJ4YgyH9.png",ore="/assets/GB-S4-Reference-3-BTbZpB51.png",sre="/assets/GB-S4-Reference-4-CpP58Tap.png",are="/assets/GB-S4-Reference-5-Be8xjsp1.png",lre=new URL("/assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",import.meta.url).href,iM=e=>{const t=e.gameplan,n=new Intl.NumberFormat("en-US",{signDisplay:"always"});return v.jsx("div",{className:`card-front ${e.bleed?"bleed":null}`,style:{width:"100%",height:"100%",backgroundImage:`url(${lre})`,...e.style},children:v.jsxs("div",{className:"overlay",children:[v.jsx("div",{style:{height:"255px",flexShrink:0}}),v.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"Crimson Text",letterSpacing:"-1px"},children:[v.jsx("div",{style:{fontFamily:"IM Fell Great Primer SC",fontSize:"33.33pt",display:"flex",flexDirection:"column",alignItems:"center",lineHeight:"0.8em",margin:"0.25em 0"},children:t.title.split(/\n/).map((r,i)=>v.jsx("span",{children:r.split(/(?=[A-Z])/).map((o,s)=>v.jsx("span",{className:new RegExp("^\\p{Lu}","u").test(o)?"dropcap":"",children:v.jsx("span",{children:o},`p${i}s${s}c`)},`p${i}s${s}`))},`l${i}`))}),v.jsxs("div",{style:{fontSize:"20pt",margin:"0 1em",whiteSpace:"pre-wrap",display:"flex",flexDirection:"column",alignItems:"center"},children:[t.text,v.jsx("p",{style:{fontStyle:"italic",margin:"0.5em 0"},children:t.detail})]}),v.jsx("div",{style:{fontSize:"35pt",position:"absolute",bottom:40,left:40,width:"80px",height:"80px",borderRadius:"40px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},children:n.format(t.initiative)}),v.jsx("div",{style:{fontSize:"35pt",position:"absolute",bottom:40,right:40,width:"80px",height:"80px",borderRadius:"40px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},children:n.format(t.influence)}),v.jsx("div",{style:{fontFamily:"serif",fontSize:"10pt",position:"absolute",bottom:"2em",letterSpacing:0,wordSpacing:0},children:"™ & © Steamforged Games LTD 2019"})]})]})})},oM=e=>{const t=C.useRef(null),[n,r]=C.useState(1);C.useLayoutEffect(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)));const i=C.useCallback(()=>{if(!t.current)return;const{width:o,height:s}=t.current.getBoundingClientRect(),a=o/500,l=s/700,c=Math.min(a,l,1);r(c??1)},[]);return v.jsx("div",{ref:t,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",padding:0,margin:0},children:v.jsx("div",{style:{width:`${500*n}px`,height:`${700*n}px`,display:"flex","--scale":n},children:e.children})})},cre=e=>v.jsx(oM,{children:v.jsx(iM,{...e})}),sM=e=>{const t=new URL(Object.assign({"../assets/cards/Reference/GB-S4-Reference-1.png":rre,"../assets/cards/Reference/GB-S4-Reference-2.png":ire,"../assets/cards/Reference/GB-S4-Reference-3.png":ore,"../assets/cards/Reference/GB-S4-Reference-4.png":sre,"../assets/cards/Reference/GB-S4-Reference-5.png":are})[`../assets/cards/Reference/GB-S4-Reference-${e.index}.png`],import.meta.url).href;return v.jsx("div",{className:`card-front ${e.bleed?"bleed":null}`,style:{width:"100%",height:"100%",backgroundImage:`url(${t})`,...e.style}})},ure=e=>v.jsx(oM,{children:v.jsx(sM,{...e})});function dre(){const e=Js(),{setting$:t}=ui(),[n]=LD(),r=C.useRef(n.get("m"));return C.useEffect(()=>{if(t)return Ln(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${r.current}`})).catch(console.error),()=>{Ln(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${r.current}`})).catch(console.error)}},[e,t]),v.jsx("main",{style:{display:"flex",flexDirection:"column-reverse",width:"100%",height:"100%"},children:v.jsx(C.Suspense,{fallback:v.jsx("p",{children:"Loading ..."}),children:v.jsx(nx,{context:{slideRef:r}})})})}function fre(){const{slideRef:e}=up();return e.current=0,v.jsxs(v.Fragment,{children:[v.jsx(fs,{children:v.jsx(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:v.jsx(_t,{children:"Library"})})}),v.jsx(SI,{Controller:pre}),v.jsx(fc,{})]})}function pre(e){const t=qa();return C.useEffect(()=>{const n=e.update$.subscribe(r=>t(r));return()=>n.unsubscribe()},[t,e.update$]),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-evenly",margin:"5px"},children:[v.jsx(V1,{g:{key:"gameplans",name:"gameplans",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("gameplans"),size:e.size}),v.jsx(V1,{g:{key:"refcards",name:"Rules",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("refcards"),size:e.size})]})}function hre(){const{guild:e}=QA(),t=Ni(),n=kx(t.breakpoints.up("sm")),r=C.useRef(null),[i,o]=C.useState(n?1e3:500),[s,a]=C.useState(700),l=C.useCallback(()=>{var b,w;const g=((b=r.current)==null?void 0:b.getBoundingClientRect().width)??0,R=((w=r.current)==null?void 0:w.getBoundingClientRect().height)??0;o(Math.min(g,R*(n?10:5)/7)-12),a(Math.min(R,g*7/5)-12)},[n]);C.useLayoutEffect(()=>(l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)));const[c,u]=C.useState(null),d=qa(),{slideRef:f}=up(),[m,h]=fo(async g=>{const[R,b]=await Promise.all([g.guilds.findOne().where({name:e}).exec(),g.models.find().or([{guild1:e},{guild2:e}]).exec()]);if(!R||!b.length){d("/library");return}Ks(b,"id",R.roster);const w=await Promise.all(b.map(y=>y.expand()));return[R,w]},[e,d])??[];return!m||!h?null:v.jsxs(v.Fragment,{children:[v.jsx(fs,{children:v.jsxs(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:[v.jsx(ko,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(_t,{children:m.name})]})}),v.jsx(vre,{guild:m,swiper:c}),v.jsxs(rn,{ref:r,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsxs(Np,{onSwiper:u,initialSlide:f.current,onSlideChange:g=>{f.current=g.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:s},children:[v.jsx(Fu,{style:{width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:s,width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:n?v.jsx(Xne,{guild:m.name}):v.jsx(rM,{guild:m.name})})},m.name),h.map(g=>v.jsx(Fu,{style:{width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:s,width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:n?v.jsx(nre,{model:g}):v.jsx(WI,{model:g})})},g.id))]}),v.jsx(fc,{})]})]})}function mre(){const t=C.useRef(null),[n,r]=C.useState(500),[i,o]=C.useState(700),s=C.useCallback(()=>{var m,h;const d=((m=t.current)==null?void 0:m.getBoundingClientRect().width)??0,f=((h=t.current)==null?void 0:h.getBoundingClientRect().height)??0;r(Math.min(d,f*5/7)-12),o(Math.min(f,d*7/5)-12)},[!1]);C.useLayoutEffect(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)));const[a,l]=C.useState(null),{slideRef:c}=up(),{gameplans:u}=Yr();return u?v.jsxs(v.Fragment,{children:[v.jsx(fs,{children:v.jsxs(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:[v.jsx(ko,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(_t,{children:"Gameplan Cards"})]})}),v.jsx(yre,{swiper:a}),v.jsxs(rn,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsx(Np,{onSwiper:l,initialSlide:c.current,onSlideChange:d=>{c.current=d.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:i},children:u.map((d,f)=>v.jsx(Fu,{style:{width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:i,width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(cre,{gameplan:d})})},`gameplan-${f}`))}),v.jsx(fc,{})]})]}):null}function gre(){const t=C.useRef(null),[n,r]=C.useState(500),[i,o]=C.useState(700),s=C.useCallback(()=>{var f,m;const u=((f=t.current)==null?void 0:f.getBoundingClientRect().width)??0,d=((m=t.current)==null?void 0:m.getBoundingClientRect().height)??0;r(Math.min(u,d*5/7)-12),o(Math.min(d,u*7/5)-12)},[!1]);C.useLayoutEffect(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)));const[a,l]=C.useState(null),{slideRef:c}=up();return v.jsxs(v.Fragment,{children:[v.jsx(fs,{children:v.jsxs(Xa,{separator:v.jsx(dc,{fontSize:"small"}),children:[v.jsx(ko,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(_t,{children:"Rules Reference Cards"})]})}),v.jsx(bre,{swiper:a}),v.jsxs(rn,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsx(Np,{onSwiper:l,initialSlide:c.current,onSlideChange:u=>{c.current=u.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:i},children:[...Array(5).keys()].map(u=>u+1).map(u=>v.jsx(Fu,{style:{width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:i,width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(ure,{index:u})})},`ref-${u}`))}),v.jsx(fc,{})]})]})}function vre(e){const{guild:t,swiper:n}=e,r=t.roster;return v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsxs(rn,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:[v.jsx(Fo,{sx:{padding:0},onClick:()=>{n==null||n.slideTo(0)},children:v.jsx("span",{children:v.jsx("div",{style:{width:"32px",height:"32px",backgroundColor:"black",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"},children:v.jsx(ji,{icon:t.name,className:"dark",fontSize:"32px",style:{flexShrink:0}})})})}),r.map((i,o)=>v.jsx(Ux,{color:"primary",label:i,onClick:()=>{n==null||n.slideTo(o+1)}},o))]}),v.jsx("div",{style:{flex:"1 1"}})]})}function yre(e){const{gameplans:t}=Yr(),{swiper:n}=e;return t?v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsx(rn,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:t.map((r,i)=>v.jsx(Ux,{color:"primary",label:r.title,onClick:()=>{n==null||n.slideTo(i)}},i))}),v.jsx("div",{style:{flex:"1 1"}})]}):null}function bre(e){const{gameplans:t}=Yr(),{swiper:n}=e;return t?v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsx(rn,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"].map((r,i)=>v.jsx(Ux,{color:"primary",label:r,onClick:()=>{n==null||n.slideTo(i)}},i))}),v.jsx("div",{style:{flex:"1 1"}})]}):null}const wre={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"اَلْعَرَبِيَّةُ"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Català"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},cs:{name:"Czech",nativeName:"čeština"},cu:{name:"Old Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"Dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"ދިވެހި"},dz:{name:"Dzongkha",nativeName:"རྫོང་ཁ"},ee:{name:"Ewe",nativeName:"Eʋegbe"},el:{name:"Greek",nativeName:"Ελληνικά"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Español"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"فارسی"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fo:{name:"Faroese",nativeName:"Føroyskt"},fr:{name:"French",nativeName:"Français"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"Gàidhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaraní",nativeName:"Avañe'ẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"هَوُسَ"},he:{name:"Hebrew",nativeName:"עברית"},hi:{name:"Hindi",nativeName:"हिन्दी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"Հայերեն"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"Iñupiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"ქართული"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"Gĩkũyũ"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"қазақ тілі"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"ខេមរភាសា"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},ko:{name:"Korean",nativeName:"한국어"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी"},ku:{name:"Kurdish",nativeName:"Kurdî"},kv:{name:"Komi",nativeName:"коми кыв"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"Кыргызча"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:"Kiluba"},lv:{name:"Latvian",nativeName:"latviešu valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mi:{name:"Māori",nativeName:"te reo Māori"},mk:{name:"Macedonian",nativeName:"македонски јазик"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mn:{name:"Mongolian",nativeName:"Монгол хэл"},mr:{name:"Marathi",nativeName:"मराठी"},ms:{name:"Malay",nativeName:"Bahasa Melayu"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"ဗမာစာ"},na:{name:"Nauru",nativeName:"Dorerin Naoero"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Diné bizaad"},ny:{name:"Chichewa",nativeName:"chiCheŵa"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Panjabi",nativeName:"ਪੰਜਾਬੀ"},pi:{name:"Pāli",nativeName:"पाऴि"},pl:{name:"Polish",nativeName:"Polski"},ps:{name:"Pashto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Română"},ru:{name:"Russian",nativeName:"Русский"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"संस्कृतम्"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},si:{name:"Sinhala",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovenian",nativeName:"slovenščina"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"српски језик"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"тоҷикӣ"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},tk:{name:"Turkmen",nativeName:"Türkmençe"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татар теле"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"ئۇيغۇرچە‎"},uk:{name:"Ukrainian",nativeName:"Українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"Ўзбек"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang",nativeName:"Saɯ cueŋƅ"},zh:{name:"Chinese",nativeName:"中文"},zu:{name:"Zulu",nativeName:"isiZulu"}};var xre=wre;const gf=xre,aM={},_g={},lM=[],cM=[],uM=[];for(const e in gf){const{name:t,nativeName:n}=gf[e];aM[e]=_g[t.toLowerCase()]=_g[n.toLowerCase()]={code:e,name:t,nativeName:n},lM.push(e),cM.push(t),uM.push(n)}var Sre=class cm{static getLanguages(t=[]){return t.map(n=>cm.validate(n)?Object.assign({},aM[n]):{code:n,name:"",nativeName:""})}static getName(t){return cm.validate(t)?gf[t].name:""}static getAllNames(){return cM.slice()}static getNativeName(t){return cm.validate(t)?gf[t].nativeName:""}static getAllNativeNames(){return uM.slice()}static getCode(t){return t=t.toLowerCase(),_g.hasOwnProperty(t)?_g[t].code:""}static getAllCodes(){return lM.slice()}static validate(t){return gf.hasOwnProperty(t)}};const HR=Ga(Sre),_re=()=>{var s;const{manifest:e}=Yr(),{setting$:t}=ui(),{i18n:n}=pZ(),r=n.resolvedLanguage,[i,o]=C.useState();if(C.useEffect(()=>{const a=t==null?void 0:t.subscribe(l=>o(l));return()=>a==null?void 0:a.unsubscribe()},[t]),!(!e||!i))return v.jsxs(rn,{component:"main",sx:{p:"1rem"},children:[v.jsx(fs,{children:v.jsx(Xa,{children:v.jsx(_t,{children:"Settings"})})}),v.jsxs(_t,{variant:"h6",children:["GB Playbook ","2.1.0"]}),v.jsxs(_t,{variant:"caption",children:["(","2024-07-23T20:15:58.558Z",")"]}),v.jsx(Lo,{sx:{my:2}}),v.jsx(_t,{children:"Season and Errata Version:"}),v.jsx(xl,{children:v.jsx(Pl,{value:i.toJSON().data.dataSet,onChange:a=>{i==null||i.incrementalPatch({dataSet:a.target.value})},children:e==null?void 0:e.datafiles.map((a,l)=>v.jsx(yi,{value:a.filename,children:`[${a.version}] ${a.description}`},l))})}),v.jsx("p",{}),v.jsx(_t,{children:"Language Preference"}),v.jsx(_t,{variant:"subtitle2",children:"(available languages vary by Season and Errata setting)"}),v.jsx(xl,{children:v.jsxs(Pl,{value:i.toJSON().data.language??"auto",onChange:a=>{i==null||i.incrementalPatch({language:a.target.value})},children:[v.jsx(yi,{value:"auto",children:`Automatic Detection (${HR.getNativeName(r??"en")})`},"auto"),["en"].concat(Object.keys(((s=e.datafiles.find(a=>a.filename===i.toJSON().data.dataSet))==null?void 0:s.translations)??{})).map((a,l)=>v.jsx(yi,{value:a,children:`${HR.getNativeName(a)}`},l))]})}),v.jsx(Lo,{sx:{my:2}}),v.jsx(_t,{children:"UI Options:"}),v.jsx(_t,{children:"Initial Screen:"}),v.jsx(xl,{children:v.jsxs(Pl,{value:i==null?void 0:i.toJSON().data.initialScreen,onChange:a=>{i==null||i.incrementalPatch({initialScreen:a.target.value})},children:[v.jsx(yi,{value:"/game",children:"Game Play"}),v.jsx(yi,{value:"/library",children:"Card Library"})]})}),v.jsx("p",{}),v.jsx(xl,{children:v.jsx(Ms,{control:v.jsx(F7,{size:"small",checked:i==null?void 0:i.toJSON().data.uiPreferences.displayStatLine,onChange:a=>{i==null||i.incrementalPatch({uiPreferences:{displayStatLine:a.target.checked}})}}),label:"Stat Line in Game Roster List"})}),v.jsx("p",{}),v.jsx(_t,{children:"Prefered Card Layout:"}),v.jsx(_t,{variant:"subtitle2",children:"(Only applies to updated cards, where both styles are available)"}),v.jsx(xl,{children:v.jsxs(Pl,{value:i==null?void 0:i.toJSON().data.cardPreferences.preferredStyle,onChange:a=>{i==null||i.incrementalPatch({cardPreferences:{preferredStyle:a.target.value}})},children:[v.jsx(yi,{value:"sfg",children:"Steamforged"}),v.jsx(yi,{value:"gbcp",children:"Community"})]})})]})};var WS={},Cre=so;Object.defineProperty(WS,"__esModule",{value:!0});var dM=WS.default=void 0,kre=Cre(ds()),Ere=v;dM=WS.default=(0,kre.default)((0,Ere.jsx)("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3m-3 11H8v-5h8zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m-1-9H6v4h12z"}),"Print");var GS={},Rre=so;Object.defineProperty(GS,"__esModule",{value:!0});var fM=GS.default=void 0,Pre=Rre(ds()),Tre=v;fM=GS.default=(0,Pre.default)((0,Tre.jsx)("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"}),"DoneAll");var HS={},Ore=so;Object.defineProperty(HS,"__esModule",{value:!0});var pM=HS.default=void 0,jre=Ore(ds()),Lre=v;pM=HS.default=(0,jre.default)((0,Lre.jsx)("path",{d:"m1.79 12 5.58 5.59L5.96 19 .37 13.41zm.45-7.78L12.9 14.89l-1.28 1.28L7.44 12l-1.41 1.41L11.62 19l2.69-2.69 4.89 4.89 1.41-1.41L3.65 2.81zm14.9 9.27L23.62 7 22.2 5.59l-6.48 6.48zM17.96 7l-1.41-1.41-3.65 3.66 1.41 1.41z"}),"RemoveDone");var VS={},Ire=so;Object.defineProperty(VS,"__esModule",{value:!0});var hM=VS.default=void 0,Mre=Ire(ds()),Nre=v;hM=VS.default=(0,Mre.default)((0,Nre.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");const $re=e=>{const[t,n]=C.useState(null),r=!!t,i=h=>{n(h.currentTarget)},o=()=>{n(null)},[s,a]=C.useState(!0),{doubleCard:l,setDouble:c,withBleed:u,setBleed:d,noFun:f,setNoFun:m}=e;return C.useEffect(()=>{const h=l?u?"5.24in 3.74in":"5in 3.5in":u?"2.74in 3.74in":"2.5in 3.5in",g=document.createElement("style");return s||(g.innerHTML=` @media print { @page { size: ${h}; @@ -196,4 +196,4 @@ Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,o("_proc margin: 0; } } - `),document.head.appendChild(g),()=>{document.head.removeChild(g)}},[l,u,s]),v.jsxs(v.Fragment,{children:[v.jsx(em,{title:"Print Settings",arrow:!0,children:v.jsx(Fo,{size:"small",onClick:i,children:v.jsx(PJ,{})})}),v.jsx(Uv,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"center"},open:r,onClose:o,children:v.jsxs(Km,{margin:2,children:[v.jsx(Ms,{label:"Double Wide Cards",control:v.jsx(Is,{checked:l,onChange:()=>c(!l)})}),v.jsx(Ms,{label:"With Print Bleed",control:v.jsx(Is,{checked:u,onChange:()=>d(!u)})}),v.jsx(Ms,{label:"Set Page to Card Size",control:v.jsx(Is,{checked:!s,onChange:()=>a(!s)})})]})})]})},Ure=()=>{const{gbdb:e,gameplans:t}=Yr(),n=C.useRef(null),r=C.useRef(),[i,o]=C.useState(),[s,a]=C.useState(),[l,c]=C.useState(!0),[u,d]=C.useState(!1),[f,m]=C.useState(!1);return C.useEffect(()=>{if(!e)return;(async()=>{const[g,E]=await Promise.all([e.guilds.find().where({minor:!1}).exec(),e.guilds.find().where({minor:!0}).exec()]).then(async([b,w])=>Promise.all([b,e.models.find().where("guild1").in(b.map(y=>y.name)).exec(),w,e.models.find().where("guild1").in(w.map(y=>y.name)).exec()])).then(([b,w,y,_])=>(Ks(w,"id",b.flatMap(k=>k.roster)),Ks(_,"id",y.flatMap(k=>k.roster)),[b.concat(y),w.concat(_)]));o(g.map(b=>b.name)),a(E.map(b=>b.id))})().catch(console.error)},[e]),!i||!s?null:v.jsxs(rn,{component:"main",sx:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},children:[v.jsx(fs,{children:v.jsxs(rn,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[v.jsx(_t,{children:"Card Printer"}),v.jsxs(rn,{children:[v.jsx(zre,{withBleed:u,setBleed:d,doubleCard:l,setDouble:c,noFun:f,setNoFun:m}),v.jsx(em,{title:"Print",arrow:!0,children:v.jsx(Fo,{size:"small",onClick:()=>{window.print()},children:v.jsx(gM,{})})})]})]})}),v.jsxs(rn,{className:"controls no-print",sx:{p:"1rem"},children:[v.jsx(Wre,{ref:r}),v.jsxs(rn,{sx:{display:"flex",flexDirection:"column",my:"0.5rem"},children:[v.jsxs(rn,{sx:{position:"relative"},children:[v.jsxs(Vf,{variant:"text",sx:{mb:"0.5rem"},children:[v.jsx(em,{title:"Select All",arrow:!0,children:v.jsx(yn,{onClick:()=>{var h,g,E,b,w,y;(h=r.current)!=null&&h.guild&&((E=(g=n.current)==null?void 0:g.guilds.get(r.current.guild))==null||E.setChecked(!0),(b=n.current)==null||b.models.forEach(_=>{var k;(k=r.current)!=null&&k.guild&&(_.m.guild1===r.current.guild||_.m.guild2===r.current.guild)&&_.setChecked(!0)}),r.current.guild==="gameplans"&&((w=n.current)==null||w.gameplans.forEach(_=>{_.setChecked(!0)})),r.current.guild==="refcards"&&((y=n.current)==null||y.refcards.forEach(_=>{_.setChecked(!0)})))},children:v.jsx(vM,{})})}),v.jsx(em,{title:"Clear All",arrow:!0,children:v.jsx(yn,{onClick:()=>{var h,g,E,b,w,y;(h=r.current)!=null&&h.guild&&((E=(g=n.current)==null?void 0:g.guilds.get(r.current.guild))==null||E.setChecked(!1),(b=n.current)==null||b.models.forEach(_=>{var k;(k=r.current)!=null&&k.guild&&(_.m.guild1===r.current.guild||_.m.guild2===r.current.guild)&&_.setChecked(!1)}),r.current.guild==="gameplans"&&((w=n.current)==null||w.gameplans.forEach(_=>{_.setChecked(!1)})),r.current.guild==="refcards"&&((y=n.current)==null||y.refcards.forEach(_=>{_.setChecked(!1)})))},children:v.jsx(yM,{})})})]}),v.jsx(fc,{})]}),v.jsx(Yre,{ref:n})]}),v.jsx(Lo,{}),v.jsx(rn,{children:v.jsx(yn,{variant:"text",color:"primary",startIcon:v.jsx(bM,{}),onClick:()=>{var h,g,E,b;(h=n.current)==null||h.guilds.forEach(w=>{w.setChecked(!1)}),(g=n.current)==null||g.models.forEach(w=>{w.setChecked(!1)}),(E=n.current)==null||E.gameplans.forEach(w=>{w.setChecked(!1)}),(b=n.current)==null||b.refcards.forEach(w=>{w.setChecked(!1)})},children:"Clear Cards"})})]}),v.jsxs(rn,{className:"Cards",children:[i.map(h=>v.jsx(Xre,{name:h,bleed:u,doubleCard:l},h)),s.map(h=>v.jsx(Qre,{name:h,id:h,bleed:u,noFun:f,doubleCard:l},h)),t==null?void 0:t.map((h,g)=>v.jsx(Jre,{gameplan:h,bleed:u},`gameplan-${g}`)),t==null?void 0:t.map((h,g)=>v.jsx(Zre,{index:g,bleed:u},`refcard-${g}`))]})]})},Wre=C.forwardRef((e,t)=>{const[n,r]=C.useState(void 0);C.useImperativeHandle(t,()=>({guild:n}),[n]);const i=fo(a=>a.guilds.find().exec()),o=C.useCallback(a=>{if(!i)return;document.querySelectorAll(".model-checkbox").forEach(c=>c.classList.add("hide"));const l=i.find(c=>c.name===a);if(l){const{minor:c}=l,u=document.querySelector(".model-list-container");c?(u==null||u.style.setProperty("--major-order","2"),u==null||u.style.setProperty("--minor-order","0")):(u==null||u.style.setProperty("--major-order","0"),u==null||u.style.setProperty("--minor-order","2"))}document.querySelectorAll(`.model-checkbox.${a}`).forEach(c=>c.classList.remove("hide"))},[i]),s=C.useCallback(a=>{r(a.target.value),o(a.target.value)},[o]);if(i)return v.jsxs(xl,{size:"small",children:[v.jsx(aj,{children:"Guild"}),v.jsxs(Pl,{label:"Guild",onChange:s,defaultValue:"",children:[v.jsx(yi,{value:"refcards",dense:!0,children:v.jsx(tw,{text:"Rules Reference Cards",icon:"GB",style:{"--color":"#333333"}})},"redcards"),v.jsx(yi,{value:"gameplans",dense:!0,children:v.jsx(tw,{text:"Gameplans",icon:"GB",style:{"--color":"#333333"}})},"gameplans"),i.map(a=>v.jsx(yi,{value:a.name,dense:!0,children:v.jsx(Gre,{g:a})},a.name))]})]})}),Gre=({g:e})=>v.jsx(tw,{text:e.name,icon:e.name,style:{"--color":e.shadow??e.color}}),tw=({text:e,icon:t,style:n})=>v.jsx("div",{className:"guild",style:{width:"100%",fontSize:"1rem",...n},children:v.jsxs("span",{style:{display:"inline-flex"},children:[v.jsx("div",{style:{backgroundColor:"black",fontSize:"2em",width:"1em",height:"1em",borderRadius:"1em",display:"flex",overflow:"visible",alignItems:"center",justifyContent:"center"},children:v.jsx(ji,{icon:t,className:"dark",style:{flexShrink:0}})}),v.jsx("span",{style:{color:"white",alignSelf:"center",marginLeft:"1em",marginRight:"1em"},children:e})]})},e),Wa=e=>{document.querySelectorAll(`.card#${e}`).forEach(t=>t==null?void 0:t.classList.toggle("hide"))},Hre=C.forwardRef((e,t)=>{const[n,r]=C.useState(!1),i=e.g;return C.useImperativeHandle(t,()=>({g:e.g,checked:n,setChecked:o=>{n!==o&&(r(o),Wa(e.g.name))}}),[e.g,n,r]),v.jsx(Ms,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Is,{checked:n,size:"small",color:"warning"}),label:i.name,className:`model-checkbox ${i.name} hide ${i.minor?"minor":""}`,style:{"--color1":i.shadow??i.color+"80","--color2":"var(--color1)"},onChange:()=>{r(!n),Wa(i.name)}})}),Vre=C.forwardRef((e,t)=>{const[n,r]=C.useState(!1);C.useImperativeHandle(t,()=>({m:e.m,checked:n,setChecked:a=>{n!==a&&(r(a),Wa(e.m.id))}}),[e.m,n,r]);const i=e.m,[o,s]=fo(async a=>Promise.all([a.guilds.findOne().where({name:i.guild1}).exec(),i.guild2?a.guilds.findOne().where({name:i.guild2}).exec():null]),[i.guild1,i.guild2])??[];return o?v.jsx(Ms,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Is,{checked:n,size:"small",color:"warning"}),label:i.id,className:`model-checkbox ${i.guild1} ${i.guild2} ${i.id} hide ${o.minor?"minor":""}`,style:{"--color1":o.shadow??o.color+"80","--color2":s?s.shadow??s.color+"80":"var(--color1)"},onChange:()=>{r(!n),Wa(i.id)}}):null}),Kre=C.forwardRef((e,t)=>{const[n,r]=C.useState(!1),i=e.g;return C.useImperativeHandle(t,()=>({g:e.g,checked:n,setChecked:o=>{n!==o&&(r(o),Wa(e.g.title.replace(/[^a-zA-Z0-9]+/g,"")))}}),[e.g,n,r]),v.jsx(Ms,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Is,{checked:n,size:"small",color:"warning"}),label:i.title,className:`model-checkbox gameplans ${i.title.replace(/[^a-zA-Z0-9]/g,"")} hide`,style:{"--color1":"#333333","--color2":"var(--color1)"},onChange:()=>{r(!n),Wa(e.g.title.replace(/[^a-zA-Z0-9]+/g,""))}})}),qre=C.forwardRef((e,t)=>{const[n,r]=C.useState(!1),i=["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"];return C.useImperativeHandle(t,()=>({id:e.id,checked:n,setChecked:o=>{n!==o&&(r(o),Wa(`refcard-${e.id}`))}}),[e.id,n,r]),v.jsx(Ms,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Is,{checked:n,size:"small",color:"warning"}),label:i[e.id],className:`model-checkbox refcards refcard-${e.id} hide`,style:{"--color1":"#333333","--color2":"var(--color1)"},onChange:()=>{r(!n),Wa(`refcard-${e.id}`)}})}),Yre=C.forwardRef((e,t)=>{const{gbdb:n,gameplans:r}=Yr(),i=C.useRef(new Map),o=C.useRef(new Map),s=C.useRef(new Map),a=C.useRef(new Map);C.useImperativeHandle(t,()=>({models:i.current,guilds:o.current,gameplans:s.current,refcards:a.current}),[i,o,s]);const[l,c]=C.useState(),[u,d]=C.useState();return C.useEffect(()=>{(async()=>{if(!n)return;const[m,h]=await Promise.all([n.guilds.find().where({minor:!1}).exec(),n.guilds.find().where({minor:!0}).exec()]).then(async([g,E])=>Promise.all([g,n.models.find().where("guild1").in(g.map(b=>b.name)).exec(),E,n.models.find().where("guild1").in(E.map(b=>b.name)).exec()])).then(([g,E,b,w])=>(Ks(E,"id",g.flatMap(y=>y.roster)),Ks(w,"id",b.flatMap(y=>y.roster)),[g.concat(b),E.concat(w)]));c(m),d(h)})().catch(console.error)},[n]),!r||!l||!u?null:v.jsxs(rn,{className:"model-list-container",style:{"--major-order":0,"--minor-order":2},children:[r.map(f=>v.jsx(Kre,{g:f,ref:m=>{m?s.current.set(f.title,m):s.current.delete(f.title)}},f.title)),["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"].map((f,m)=>v.jsx(qre,{id:m,ref:h=>{h?a.current.set(f,h):a.current.delete(f)}},`refcard-${m}`)),l.map(f=>v.jsx(Hre,{g:f,ref:m=>{m?o.current.set(f.name,m):o.current.delete(f.name)}},f.name)),u.map(f=>v.jsx(Vre,{m:f,ref:m=>{m?i.current.set(f.id,m):i.current.delete(f.id)}},f.id))]})}),Qre=e=>{const{name:t,id:n,bleed:r,doubleCard:i,noFun:o}=e,[s,a]=C.useState(!1),l=h=>{if(h&&h[0]){const{target:g}=h[0],E=getComputedStyle(g);a(E.getPropertyValue("display")!=="none")}},[c]=oy(l),u=fo(async h=>{const g=await h.models.findOne().where({id:t}).exec();return g==null?void 0:g.expand()},[t]);if(!u)return null;const d=r?"5.24in":"5in",f=r?"2.74in":"2.5in",m=r?"3.74in":"3.5in";return i?v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:d,height:m,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsxs(v.Fragment,{children:[v.jsx(yg,{className:`card-front double ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:d,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"}}),v.jsx(bg,{className:`card-back print double ${r?"bleed":""} ${o?"noFun":""}`,model:u,style:{width:d,borderRadius:0,"--scale":"calc(2.5 * (96 / 500))"}})]})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:f,height:m,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsx(yg,{className:`card-front print ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:f,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"}})}),v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:f,height:m,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsx(bg,{className:`card-back print ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:f,borderRadius:0,"--scale":"calc(2.5 * (96 / 500))"}})})]})},Xre=e=>{const{name:t,bleed:n,doubleCard:r}=e,[i,o]=C.useState(!1),s=d=>{if(d&&d[0]){const{target:f}=d[0],m=getComputedStyle(f);o(m.getPropertyValue("display")!=="none")}},[a]=oy(s),l=n?"5.24in":"5in",c=n?"3.74in":"3.5in",u=n?"2.74in":"2.5in";return r?v.jsx("div",{ref:a,className:`card ${i?"":"hide"}`,id:t,style:{position:"relative",width:l,height:c,display:"inline-flex",flexDirection:"row",gap:0},children:i&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:`card-front double ${n?"bleed":""}`,style:{backgroundImage:`url(${cn.get(`${t}_front`)})`,width:l,borderRadius:0}}),v.jsx("div",{className:`card-back double ${n?"bleed":""}`,style:{backgroundImage:`url(${cn.get(`${t}_back`)})`,width:l,borderRadius:0}})]})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:a,className:`card ${i?"":"hide"}`,id:t,style:{position:"relative",width:u,height:c,display:"inline-flex",flexDirection:"row",gap:0},children:i&&v.jsx(v.Fragment,{children:v.jsx("div",{className:`card-front ${n?"bleed":""}`,style:{backgroundImage:`url(${cn.get(`${t}_front`)})`,width:u,borderRadius:0}})})}),v.jsx("div",{ref:a,className:`card ${i?"":"hide"}`,id:t,style:{position:"relative",width:u,height:c,display:"inline-flex",flexDirection:"row",gap:0},children:i&&v.jsx(v.Fragment,{children:v.jsx("div",{className:`card-back ${n?"bleed":""}`,style:{backgroundImage:`url(${cn.get(`${t}_back`)})`,width:u,borderRadius:0}})})})]})},Jre=e=>{const{gameplan:t,bleed:n}=e,[r,i]=C.useState(!1),o=c=>{if(c&&c[0]){const{target:u}=c[0],d=getComputedStyle(u);i(d.getPropertyValue("display")!=="none")}},[s]=oy(o),a=n?"2.74in":"2.5in",l=n?"3.74in":"3.5in";return v.jsx("div",{ref:s,className:`card ${r?"":"hide"}`,id:t.title.replace(/[^A-Za-z0-9]+/g,""),style:{position:"relative",width:a,height:l,display:"inline-flex",flexDirection:"row",gap:0},children:r&&v.jsx("div",{className:`card-front ${n?"bleed":""}`,style:{height:l,width:a,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"},children:v.jsx(cM,{gameplan:t,style:{borderRadius:0},bleed:n})})})},Zre=e=>{const{index:t,bleed:n}=e,[r,i]=C.useState(!1),o=c=>{if(c&&c[0]){const{target:u}=c[0],d=getComputedStyle(u);i(d.getPropertyValue("display")!=="none")}},[s]=oy(o),a=n?"2.74in":"2.5in",l=n?"3.74in":"3.5in";return v.jsx("div",{ref:s,className:`card ${r?"":"hide"}`,id:`refcard-${t}`,style:{position:"relative",width:a,height:l,display:"inline-flex",flexDirection:"row",gap:0},children:r&&v.jsx(dM,{index:t+1,style:{borderRadius:0},bleed:n})})};function eie(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:o,onRegisterError:s}=e;let a,l;const c=async(d=!0)=>{await l};async function u(){if("serviceWorker"in navigator){if(a=await rJ(async()=>{const{Workbox:d}=await import("./workbox-window.prod.es5-D5gOYdM7.js");return{Workbox:d}},[]).then(({Workbox:d})=>new d("/sw.js",{scope:"/",type:"classic"})).catch(d=>{s==null||s(d)}),!a)return;a.addEventListener("activated",d=>{(d.isUpdate||d.isExternal)&&window.location.reload()}),a.addEventListener("installed",d=>{d.isUpdate||r==null||r()}),a.register({immediate:t}).then(d=>{o?o("/sw.js",d):i==null||i(d)}).catch(d=>{s==null||s(d)})}}return l=u(),c}eie({immediate:!0});const tie=SD(e1(v.jsxs(v.Fragment,{children:[v.jsx(Zr,{path:"/",element:v.jsx(pD,{to:await ln.getLocal("settings").then(e=>{const t=(e==null?void 0:e.get("initialScreen"))??mI.initialScreen;return t==="/game"?(e==null?void 0:e.get("gamePlayRoute"))??t:t==="/library"?(e==null?void 0:e.get("libraryRoute"))??t:t}),replace:!0})}),v.jsxs(Zr,{element:v.jsx(_J,{}),children:[v.jsxs(Zr,{element:v.jsx(sre,{}),children:[v.jsx(Zr,{path:"game",element:v.jsx(Gee,{})}),v.jsx(Zr,{path:"game/draft",element:v.jsx(Jee,{})}),v.jsx(Zr,{path:"game/draft/play",element:v.jsx(rre,{})})]}),v.jsxs(Zr,{path:"library",element:v.jsx(gre,{}),children:[v.jsx(Zr,{index:!0,element:v.jsx(vre,{})}),v.jsx(Zr,{path:"gameplans",element:v.jsx(wre,{})}),v.jsx(Zr,{path:"refcards",element:v.jsx(xre,{})}),v.jsx(Zr,{path:":guild",element:v.jsx(bre,{})})]}),v.jsx(Zr,{path:"print",element:v.jsx(Ure,{})}),v.jsx(Zr,{path:"settings",element:v.jsx(Pre,{})})]})]}))),nie=ob.createRoot(document.getElementById("root"));nie.render(v.jsx(wJ,{children:v.jsx(IZ,{children:v.jsx(OD,{router:tie})})})); + `),document.head.appendChild(g),()=>{document.head.removeChild(g)}},[l,u,s]),v.jsxs(v.Fragment,{children:[v.jsx(em,{title:"Print Settings",arrow:!0,children:v.jsx(Fo,{size:"small",onClick:i,children:v.jsx(_J,{})})}),v.jsx(Uv,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"center"},open:r,onClose:o,children:v.jsxs(Km,{margin:2,children:[v.jsx(Ms,{label:"Double Wide Cards",control:v.jsx(Is,{checked:l,onChange:()=>c(!l)})}),v.jsx(Ms,{label:"With Print Bleed",control:v.jsx(Is,{checked:u,onChange:()=>d(!u)})}),v.jsx(Ms,{label:"Set Page to Card Size",control:v.jsx(Is,{checked:!s,onChange:()=>a(!s)})})]})})]})},Are=()=>{const{gbdb:e,gameplans:t}=Yr(),n=C.useRef(null),r=C.useRef(),[i,o]=C.useState(),[s,a]=C.useState(),[l,c]=C.useState(!0),[u,d]=C.useState(!1),[f,m]=C.useState(!1);return C.useEffect(()=>{if(!e)return;(async()=>{const[g,R]=await Promise.all([e.guilds.find().where({minor:!1}).exec(),e.guilds.find().where({minor:!0}).exec()]).then(async([b,w])=>Promise.all([b,e.models.find().where("guild1").in(b.map(y=>y.name)).exec(),w,e.models.find().where("guild1").in(w.map(y=>y.name)).exec()])).then(([b,w,y,_])=>(Ks(w,"id",b.flatMap(k=>k.roster)),Ks(_,"id",y.flatMap(k=>k.roster)),[b.concat(y),w.concat(_)]));o(g.map(b=>b.name)),a(R.map(b=>b.id))})().catch(console.error)},[e]),!i||!s?null:v.jsxs(rn,{component:"main",sx:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},children:[v.jsx(fs,{children:v.jsxs(rn,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[v.jsx(_t,{children:"Card Printer"}),v.jsxs(rn,{children:[v.jsx($re,{withBleed:u,setBleed:d,doubleCard:l,setDouble:c,noFun:f,setNoFun:m}),v.jsx(em,{title:"Print",arrow:!0,children:v.jsx(Fo,{size:"small",onClick:()=>{window.print()},children:v.jsx(dM,{})})})]})]})}),v.jsxs(rn,{className:"controls no-print",sx:{p:"1rem"},children:[v.jsx(Dre,{ref:r}),v.jsxs(rn,{sx:{display:"flex",flexDirection:"column",my:"0.5rem"},children:[v.jsxs(rn,{sx:{position:"relative"},children:[v.jsxs(Vf,{variant:"text",sx:{mb:"0.5rem"},children:[v.jsx(em,{title:"Select All",arrow:!0,children:v.jsx(yn,{onClick:()=>{var h,g,R,b,w,y;(h=r.current)!=null&&h.guild&&((R=(g=n.current)==null?void 0:g.guilds.get(r.current.guild))==null||R.setChecked(!0),(b=n.current)==null||b.models.forEach(_=>{var k;(k=r.current)!=null&&k.guild&&(_.m.guild1===r.current.guild||_.m.guild2===r.current.guild)&&_.setChecked(!0)}),r.current.guild==="gameplans"&&((w=n.current)==null||w.gameplans.forEach(_=>{_.setChecked(!0)})),r.current.guild==="refcards"&&((y=n.current)==null||y.refcards.forEach(_=>{_.setChecked(!0)})))},children:v.jsx(fM,{})})}),v.jsx(em,{title:"Clear All",arrow:!0,children:v.jsx(yn,{onClick:()=>{var h,g,R,b,w,y;(h=r.current)!=null&&h.guild&&((R=(g=n.current)==null?void 0:g.guilds.get(r.current.guild))==null||R.setChecked(!1),(b=n.current)==null||b.models.forEach(_=>{var k;(k=r.current)!=null&&k.guild&&(_.m.guild1===r.current.guild||_.m.guild2===r.current.guild)&&_.setChecked(!1)}),r.current.guild==="gameplans"&&((w=n.current)==null||w.gameplans.forEach(_=>{_.setChecked(!1)})),r.current.guild==="refcards"&&((y=n.current)==null||y.refcards.forEach(_=>{_.setChecked(!1)})))},children:v.jsx(pM,{})})})]}),v.jsx(fc,{})]}),v.jsx(Gre,{ref:n})]}),v.jsx(Lo,{}),v.jsx(rn,{children:v.jsx(yn,{variant:"text",color:"primary",startIcon:v.jsx(hM,{}),onClick:()=>{var h,g,R,b;(h=n.current)==null||h.guilds.forEach(w=>{w.setChecked(!1)}),(g=n.current)==null||g.models.forEach(w=>{w.setChecked(!1)}),(R=n.current)==null||R.gameplans.forEach(w=>{w.setChecked(!1)}),(b=n.current)==null||b.refcards.forEach(w=>{w.setChecked(!1)})},children:"Clear Cards"})})]}),v.jsxs(rn,{className:"Cards",children:[i.map(h=>v.jsx(Vre,{name:h,bleed:u,doubleCard:l},h)),s.map(h=>v.jsx(Hre,{name:h,id:h,bleed:u,noFun:f,doubleCard:l},h)),t==null?void 0:t.map((h,g)=>v.jsx(Kre,{gameplan:h,bleed:u},`gameplan-${g}`)),t==null?void 0:t.map((h,g)=>v.jsx(qre,{index:g,bleed:u},`refcard-${g}`))]})]})},Dre=C.forwardRef((e,t)=>{const[n,r]=C.useState(void 0);C.useImperativeHandle(t,()=>({guild:n}),[n]);const i=fo(a=>a.guilds.find().exec()),o=C.useCallback(a=>{if(!i)return;document.querySelectorAll(".model-checkbox").forEach(c=>c.classList.add("hide"));const l=i.find(c=>c.name===a);if(l){const{minor:c}=l,u=document.querySelector(".model-list-container");c?(u==null||u.style.setProperty("--major-order","2"),u==null||u.style.setProperty("--minor-order","0")):(u==null||u.style.setProperty("--major-order","0"),u==null||u.style.setProperty("--minor-order","2"))}document.querySelectorAll(`.model-checkbox.${a}`).forEach(c=>c.classList.remove("hide"))},[i]),s=C.useCallback(a=>{r(a.target.value),o(a.target.value)},[o]);if(i)return v.jsxs(xl,{size:"small",children:[v.jsx(tj,{children:"Guild"}),v.jsxs(Pl,{label:"Guild",onChange:s,defaultValue:"",children:[v.jsx(yi,{value:"refcards",dense:!0,children:v.jsx(tw,{text:"Rules Reference Cards",icon:"GB",style:{"--color":"#333333"}})},"redcards"),v.jsx(yi,{value:"gameplans",dense:!0,children:v.jsx(tw,{text:"Gameplans",icon:"GB",style:{"--color":"#333333"}})},"gameplans"),i.map(a=>v.jsx(yi,{value:a.name,dense:!0,children:v.jsx(Bre,{g:a})},a.name))]})]})}),Bre=({g:e})=>v.jsx(tw,{text:e.name,icon:e.name,style:{"--color":e.shadow??e.color}}),tw=({text:e,icon:t,style:n})=>v.jsx("div",{className:"guild",style:{width:"100%",fontSize:"1rem",...n},children:v.jsxs("span",{style:{display:"inline-flex"},children:[v.jsx("div",{style:{backgroundColor:"black",fontSize:"2em",width:"1em",height:"1em",borderRadius:"1em",display:"flex",overflow:"visible",alignItems:"center",justifyContent:"center"},children:v.jsx(ji,{icon:t,className:"dark",style:{flexShrink:0}})}),v.jsx("span",{style:{color:"white",alignSelf:"center",marginLeft:"1em",marginRight:"1em"},children:e})]})},e),Wa=e=>{document.querySelectorAll(`.card#${e}`).forEach(t=>t==null?void 0:t.classList.toggle("hide"))},Fre=C.forwardRef((e,t)=>{const[n,r]=C.useState(!1),i=e.g;return C.useImperativeHandle(t,()=>({g:e.g,checked:n,setChecked:o=>{n!==o&&(r(o),Wa(e.g.name))}}),[e.g,n,r]),v.jsx(Ms,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Is,{checked:n,size:"small",color:"warning"}),label:i.name,className:`model-checkbox ${i.name} hide ${i.minor?"minor":""}`,style:{"--color1":i.shadow??i.color+"80","--color2":"var(--color1)"},onChange:()=>{r(!n),Wa(i.name)}})}),zre=C.forwardRef((e,t)=>{const[n,r]=C.useState(!1);C.useImperativeHandle(t,()=>({m:e.m,checked:n,setChecked:a=>{n!==a&&(r(a),Wa(e.m.id))}}),[e.m,n,r]);const i=e.m,[o,s]=fo(async a=>Promise.all([a.guilds.findOne().where({name:i.guild1}).exec(),i.guild2?a.guilds.findOne().where({name:i.guild2}).exec():null]),[i.guild1,i.guild2])??[];return o?v.jsx(Ms,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Is,{checked:n,size:"small",color:"warning"}),label:i.id,className:`model-checkbox ${i.guild1} ${i.guild2} ${i.id} hide ${o.minor?"minor":""}`,style:{"--color1":o.shadow??o.color+"80","--color2":s?s.shadow??s.color+"80":"var(--color1)"},onChange:()=>{r(!n),Wa(i.id)}}):null}),Ure=C.forwardRef((e,t)=>{const[n,r]=C.useState(!1),i=e.g;return C.useImperativeHandle(t,()=>({g:e.g,checked:n,setChecked:o=>{n!==o&&(r(o),Wa(e.g.title.replace(/[^a-zA-Z0-9]+/g,"")))}}),[e.g,n,r]),v.jsx(Ms,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Is,{checked:n,size:"small",color:"warning"}),label:i.title,className:`model-checkbox gameplans ${i.title.replace(/[^a-zA-Z0-9]/g,"")} hide`,style:{"--color1":"#333333","--color2":"var(--color1)"},onChange:()=>{r(!n),Wa(e.g.title.replace(/[^a-zA-Z0-9]+/g,""))}})}),Wre=C.forwardRef((e,t)=>{const[n,r]=C.useState(!1),i=["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"];return C.useImperativeHandle(t,()=>({id:e.id,checked:n,setChecked:o=>{n!==o&&(r(o),Wa(`refcard-${e.id}`))}}),[e.id,n,r]),v.jsx(Ms,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Is,{checked:n,size:"small",color:"warning"}),label:i[e.id],className:`model-checkbox refcards refcard-${e.id} hide`,style:{"--color1":"#333333","--color2":"var(--color1)"},onChange:()=>{r(!n),Wa(`refcard-${e.id}`)}})}),Gre=C.forwardRef((e,t)=>{const{gbdb:n,gameplans:r}=Yr(),i=C.useRef(new Map),o=C.useRef(new Map),s=C.useRef(new Map),a=C.useRef(new Map);C.useImperativeHandle(t,()=>({models:i.current,guilds:o.current,gameplans:s.current,refcards:a.current}),[i,o,s]);const[l,c]=C.useState(),[u,d]=C.useState();return C.useEffect(()=>{(async()=>{if(!n)return;const[m,h]=await Promise.all([n.guilds.find().where({minor:!1}).exec(),n.guilds.find().where({minor:!0}).exec()]).then(async([g,R])=>Promise.all([g,n.models.find().where("guild1").in(g.map(b=>b.name)).exec(),R,n.models.find().where("guild1").in(R.map(b=>b.name)).exec()])).then(([g,R,b,w])=>(Ks(R,"id",g.flatMap(y=>y.roster)),Ks(w,"id",b.flatMap(y=>y.roster)),[g.concat(b),R.concat(w)]));c(m),d(h)})().catch(console.error)},[n]),!r||!l||!u?null:v.jsxs(rn,{className:"model-list-container",style:{"--major-order":0,"--minor-order":2},children:[r.map(f=>v.jsx(Ure,{g:f,ref:m=>{m?s.current.set(f.title,m):s.current.delete(f.title)}},f.title)),["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"].map((f,m)=>v.jsx(Wre,{id:m,ref:h=>{h?a.current.set(f,h):a.current.delete(f)}},`refcard-${m}`)),l.map(f=>v.jsx(Fre,{g:f,ref:m=>{m?o.current.set(f.name,m):o.current.delete(f.name)}},f.name)),u.map(f=>v.jsx(zre,{m:f,ref:m=>{m?i.current.set(f.id,m):i.current.delete(f.id)}},f.id))]})}),Hre=e=>{const{name:t,id:n,bleed:r,doubleCard:i,noFun:o}=e,[s,a]=C.useState(!1),l=h=>{if(h&&h[0]){const{target:g}=h[0],R=getComputedStyle(g);a(R.getPropertyValue("display")!=="none")}},[c]=oy(l),u=fo(async h=>{const g=await h.models.findOne().where({id:t}).exec();return g==null?void 0:g.expand()},[t]);if(!u)return null;const d=r?"5.24in":"5in",f=r?"2.74in":"2.5in",m=r?"3.74in":"3.5in";return i?v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:d,height:m,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsxs(v.Fragment,{children:[v.jsx(yg,{className:`card-front double ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:d,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"}}),v.jsx(bg,{className:`card-back print double ${r?"bleed":""} ${o?"noFun":""}`,model:u,style:{width:d,borderRadius:0,"--scale":"calc(2.5 * (96 / 500))"}})]})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:f,height:m,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsx(yg,{className:`card-front print ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:f,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"}})}),v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:f,height:m,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsx(bg,{className:`card-back print ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:f,borderRadius:0,"--scale":"calc(2.5 * (96 / 500))"}})})]})},Vre=e=>{const{name:t,bleed:n,doubleCard:r}=e,[i,o]=C.useState(!1),s=d=>{if(d&&d[0]){const{target:f}=d[0],m=getComputedStyle(f);o(m.getPropertyValue("display")!=="none")}},[a]=oy(s),l=n?"5.24in":"5in",c=n?"3.74in":"3.5in",u=n?"2.74in":"2.5in";return r?v.jsx("div",{ref:a,className:`card ${i?"":"hide"}`,id:t,style:{position:"relative",width:l,height:c,display:"inline-flex",flexDirection:"row",gap:0},children:i&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:`card-front double ${n?"bleed":""}`,style:{backgroundImage:`url(${cn.get(`${t}_front`)})`,width:l,borderRadius:0}}),v.jsx("div",{className:`card-back double ${n?"bleed":""}`,style:{backgroundImage:`url(${cn.get(`${t}_back`)})`,width:l,borderRadius:0}})]})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:a,className:`card ${i?"":"hide"}`,id:t,style:{position:"relative",width:u,height:c,display:"inline-flex",flexDirection:"row",gap:0},children:i&&v.jsx(v.Fragment,{children:v.jsx("div",{className:`card-front ${n?"bleed":""}`,style:{backgroundImage:`url(${cn.get(`${t}_front`)})`,width:u,borderRadius:0}})})}),v.jsx("div",{ref:a,className:`card ${i?"":"hide"}`,id:t,style:{position:"relative",width:u,height:c,display:"inline-flex",flexDirection:"row",gap:0},children:i&&v.jsx(v.Fragment,{children:v.jsx("div",{className:`card-back ${n?"bleed":""}`,style:{backgroundImage:`url(${cn.get(`${t}_back`)})`,width:u,borderRadius:0}})})})]})},Kre=e=>{const{gameplan:t,bleed:n}=e,[r,i]=C.useState(!1),o=c=>{if(c&&c[0]){const{target:u}=c[0],d=getComputedStyle(u);i(d.getPropertyValue("display")!=="none")}},[s]=oy(o),a=n?"2.74in":"2.5in",l=n?"3.74in":"3.5in";return v.jsx("div",{ref:s,className:`card ${r?"":"hide"}`,id:t.title.replace(/[^A-Za-z0-9]+/g,""),style:{position:"relative",width:a,height:l,display:"inline-flex",flexDirection:"row",gap:0},children:r&&v.jsx("div",{className:`card-front ${n?"bleed":""}`,style:{height:l,width:a,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"},children:v.jsx(iM,{gameplan:t,style:{borderRadius:0},bleed:n})})})},qre=e=>{const{index:t,bleed:n}=e,[r,i]=C.useState(!1),o=c=>{if(c&&c[0]){const{target:u}=c[0],d=getComputedStyle(u);i(d.getPropertyValue("display")!=="none")}},[s]=oy(o),a=n?"2.74in":"2.5in",l=n?"3.74in":"3.5in";return v.jsx("div",{ref:s,className:`card ${r?"":"hide"}`,id:`refcard-${t}`,style:{position:"relative",width:a,height:l,display:"inline-flex",flexDirection:"row",gap:0},children:r&&v.jsx(sM,{index:t+1,style:{borderRadius:0},bleed:n})})};function Yre(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:o,onRegisterError:s}=e;let a,l;const c=async(d=!0)=>{await l};async function u(){if("serviceWorker"in navigator){if(a=await JX(async()=>{const{Workbox:d}=await import("./workbox-window.prod.es5-D5gOYdM7.js");return{Workbox:d}},[]).then(({Workbox:d})=>new d("/sw.js",{scope:"/",type:"classic"})).catch(d=>{s==null||s(d)}),!a)return;a.addEventListener("activated",d=>{(d.isUpdate||d.isExternal)&&window.location.reload()}),a.addEventListener("installed",d=>{d.isUpdate||r==null||r()}),a.register({immediate:t}).then(d=>{o?o("/sw.js",d):i==null||i(d)}).catch(d=>{s==null||s(d)})}}return l=u(),c}Yre({immediate:!0});const Qre=vD(e1(v.jsxs(v.Fragment,{children:[v.jsx(Zr,{path:"/",element:v.jsx(lD,{to:await ln.getLocal("settings").then(e=>{const t=(e==null?void 0:e.get("initialScreen"))??cI.initialScreen;return t==="/game"?(e==null?void 0:e.get("gamePlayRoute"))??t:t==="/library"?(e==null?void 0:e.get("libraryRoute"))??t:t}),replace:!0})}),v.jsxs(Zr,{element:v.jsx(yJ,{}),children:[v.jsxs(Zr,{element:v.jsx(tre,{}),children:[v.jsx(Zr,{path:"game",element:v.jsx(Bee,{})}),v.jsx(Zr,{path:"game/draft",element:v.jsx(Kee,{})}),v.jsx(Zr,{path:"game/draft/play",element:v.jsx(Jne,{})})]}),v.jsxs(Zr,{path:"library",element:v.jsx(dre,{}),children:[v.jsx(Zr,{index:!0,element:v.jsx(fre,{})}),v.jsx(Zr,{path:"gameplans",element:v.jsx(mre,{})}),v.jsx(Zr,{path:"refcards",element:v.jsx(gre,{})}),v.jsx(Zr,{path:":guild",element:v.jsx(hre,{})})]}),v.jsx(Zr,{path:"print",element:v.jsx(Are,{})}),v.jsx(Zr,{path:"settings",element:v.jsx(_re,{})})]})]}))),Xre=ob.createRoot(document.getElementById("root"));Xre.render(v.jsx(mJ,{children:v.jsx(PZ,{children:v.jsx(kD,{router:Qre})})})); diff --git a/index.html b/index.html index a92e1170..994249e4 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ - + diff --git a/sw.js b/sw.js index be493568..4380dd26 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,n)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const a=s=>l(s,i),o={module:{uri:i},exports:u,require:a};e[i]=Promise.all(r.map((s=>o[s]||a(s)))).then((s=>(n(...s),u)))}}define(["./workbox-f5523f08"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"apple-touch-icon-180x180.png",revision:"c6ade8d120b32268facbde0e632c86d4"},{url:"assets/Angel-00-_OcCE1xs.jpg",revision:null},{url:"assets/Angel-01-RsyL_b7r.jpg",revision:null},{url:"assets/beacon-00-L9zfj4Q8.jpg",revision:null},{url:"assets/beacon-01-vYao7kaT.jpg",revision:null},{url:"assets/beacon-WzU-Fgwo.jpg",revision:null},{url:"assets/Blackheart-00-Barboaw1.jpg",revision:null},{url:"assets/Blackheart-01-DqXGaAGL.jpg",revision:null},{url:"assets/Brisket-00-fpn5lXhR.jpg",revision:null},{url:"assets/Brisket-01-Cz0yKYaC.jpg",revision:null},{url:"assets/brisket3-00-TRUFkM-Q.jpg",revision:null},{url:"assets/brisket3-01-C19fZQ9I.jpg",revision:null},{url:"assets/cast-00-CDhbzPRV.jpg",revision:null},{url:"assets/cast-01-DOJiR9Ch.jpg",revision:null},{url:"assets/compound-DlF-jmUs.svg",revision:null},{url:"assets/crook-00-C4D_gdaM.jpg",revision:null},{url:"assets/crook-01-D9bCOT5R.jpg",revision:null},{url:"assets/egret-00-BKhmAAwA.jpg",revision:null},{url:"assets/egret-01-DCSfZLX7.jpg",revision:null},{url:"assets/Flea-00-PYY29ZDm.jpg",revision:null},{url:"assets/Flea-01-B-ceu-Fs.jpg",revision:null},{url:"assets/Gaffer-00-Chm4XJB6.jpg",revision:null},{url:"assets/Gaffer-01-DChRbbv3.jpg",revision:null},{url:"assets/gaffer-front-large-box-BhDGw3yv.png",revision:null},{url:"assets/GB-S4-Alchemists-19-02-01-VIy3CwEn.jpg",revision:null},{url:"assets/GB-S4-Alchemists-19-02-02-Dar2t4NY.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-30-DjbTACjD.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-31-BTog_cbt.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-32-Dui0dDSy.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-01-C1aHp8XU.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-02-Buw0Sd4K.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-32-DJ0MEQk3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-01-_bnlGcvZ.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-02-Af5aErRU.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-32-Cps3196a.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-33-zps3y-hi.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-34-CdaFu_Sd.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-01-CLWIlX8T.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-02-CFlOzX_b.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-32-CDETLFF4.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-01-B_Vd1DVn.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-02-BCRzyOhW.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-14-2NKQVsMs.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-01-Di9u3X0x.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-02-Cy2lNFLR.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-30-bp8c3Uf4.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-01-DAO812Wl.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-02-C_ro4zOy.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-14-D7WFZjKa.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-01-LmV2xFUn.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-02-COLOFnlA.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-32-DfwzxWCr.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-01-D54clbHu.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-02-D_xvByJF.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-32-Co1is7SR.jpg",revision:null},{url:"assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",revision:null},{url:"assets/GB-S4-Hunters-19-08-01-CmDbpORb.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-02-DP64V92U.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-32-CjwZbZPz.jpg",revision:null},{url:"assets/GB-S4-Masons-19-03-01-CU2vGuj1.jpg",revision:null},{url:"assets/GB-S4-Masons-19-03-02-BT75CHhK.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-18-CCBausup.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-30-6kjit4Y9.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-01-D4YSyCEa.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-02-osGRf8x4.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-14-OmIZrrCX.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-01-DIFD5DK0.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-02-BIp1_EUg.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-34-Cml7KNHH.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-01-M7N3Qnm9.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-02-C0DvULy4.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-04-C54iXdHJ.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-05-DijPkVU0.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-10-kxgvrwFf.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-11-DLBrn3lH.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-14-4LJM_QAb.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-01-asZnKqhR.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-02-DxYxwIyf.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-18-gkj8skFt.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-01-CbXHBUJx.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-02-XbBjNmUR.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-14-D1JyRK5e.jpg",revision:null},{url:"assets/GB-S4-Reference-1-Cx3eC7d4.png",revision:null},{url:"assets/GB-S4-Reference-2-CJ4YgyH9.png",revision:null},{url:"assets/GB-S4-Reference-3-BTbZpB51.png",revision:null},{url:"assets/GB-S4-Reference-4-CpP58Tap.png",revision:null},{url:"assets/GB-S4-Reference-5-Be8xjsp1.png",revision:null},{url:"assets/GB-S4-Shepherds-20-03-01-BszDyn7n.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-02-XqwLekip.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-16-CH7z3m46.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-01-BYUf_cPI.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-02-CAfWuq1n.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-12--TefmgjH.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-30-DOPQxsMF.jpg",revision:null},{url:"assets/gb-symbol-defs-DvUA8_44.svg",revision:null},{url:"assets/heat-00-D38QQgsn.jpg",revision:null},{url:"assets/heat-01-TaWfEq1e.jpg",revision:null},{url:"assets/heat-kg0Ne0rh.jpg",revision:null},{url:"assets/hook-00-BCtxORP2.jpg",revision:null},{url:"assets/hook-01-CFEXTspD.jpg",revision:null},{url:"assets/ikaros-00-BlK23AQW.jpg",revision:null},{url:"assets/ikaros-01-CaTWYr3E.jpg",revision:null},{url:"assets/index-BOX54cO5.css",revision:null},{url:"assets/index-D2awvsKL.js",revision:null},{url:"assets/lamp-beta-63HlWaeb.png",revision:null},{url:"assets/lamps_back_blank-DaxPd_Oo.jpg",revision:null},{url:"assets/Locus-00-BlUYiKL3.jpg",revision:null},{url:"assets/Locus-01-CgJeSABI.jpg",revision:null},{url:"assets/lucky-00--3wf1Q-o.jpg",revision:null},{url:"assets/lucky-01-CeFOEkb7.jpg",revision:null},{url:"assets/lucky-n3AjGPzo.svg",revision:null},{url:"assets/miasma-00-gJuVKj0r.jpg",revision:null},{url:"assets/miasma-01-BFpZKg3H.jpg",revision:null},{url:"assets/minx-00-DKid1QgM.jpg",revision:null},{url:"assets/minx-01-h4AvAe2P.jpg",revision:null},{url:"assets/nightlight-00-DeG30Qno.jpg",revision:null},{url:"assets/nightlight-01-B5GmfHdF.jpg",revision:null},{url:"assets/nightlight-BICbD_Qy.jpg",revision:null},{url:"assets/Order_back-qsepM33g.jpg",revision:null},{url:"assets/phosphor-00-kYBsDzr4.jpg",revision:null},{url:"assets/phosphor-01-aCMgs7Xa.jpg",revision:null},{url:"assets/phosphor-CifRCYrC.jpg",revision:null},{url:"assets/playbook-symbol-defs-Dz3QsL1K.svg",revision:null},{url:"assets/Salt-00-DTipa4Vq.jpg",revision:null},{url:"assets/Salt-01-DgX-3wqX.jpg",revision:null},{url:"assets/soot-00-CjgkmHEF.jpg",revision:null},{url:"assets/soot-01-DLvloUPB.jpg",revision:null},{url:"assets/soot-CXEcs2BT.jpg",revision:null},{url:"assets/steeljaw-00-DBylP57a.jpg",revision:null},{url:"assets/steeljaw-01-DHvdkD3u.jpg",revision:null},{url:"assets/tenderiser-00-DJeWjZaC.jpg",revision:null},{url:"assets/tenderiser-01-Dn53BCqM.jpg",revision:null},{url:"assets/Truffles-00-BxTIIeQ4.jpg",revision:null},{url:"assets/Truffles-01-1xGyMIOv.jpg",revision:null},{url:"assets/Ulfr-00-BXhlGxmA.jpg",revision:null},{url:"assets/Ulfr-01-JQfocVce.jpg",revision:null},{url:"assets/vGutter-00-CpnNh9P4.jpg",revision:null},{url:"assets/vGutter-01-BWHR1234.jpg",revision:null},{url:"assets/wick-00-CEZ6BY1J.jpg",revision:null},{url:"assets/wick-01-DtuDStax.jpg",revision:null},{url:"assets/wick-D10XZuyz.jpg",revision:null},{url:"assets/workbox-window.prod.es5-D5gOYdM7.js",revision:null},{url:"CNAME",revision:"6b62f425122a80ff0107c2b9938f87b7"},{url:"data/gameplans.json",revision:"84197a88c0201e0335c7e8015c953c77"},{url:"data/GB-Playbook-4-3.json",revision:"92b689cb87b03ad4b17a13d4c8149687"},{url:"data/GB-Playbook-4-4.json",revision:"5385d14b70c849f475758648abddbe36"},{url:"data/GB-Playbook-4-5.json",revision:"ebf4b91061ca5728eb53d8f9d41f8edc"},{url:"data/GB-Playbook-4-6.fr.json",revision:"bbfed4136fee67e6888a8ff5e9d7f088"},{url:"data/GB-Playbook-4-6.json",revision:"f609abebce605d01f9308eeb83641f29"},{url:"data/manifest.json",revision:"6e6628107ef21b095998eb272159ec43"},{url:"favicon.ico",revision:"4a2fe2fdcaa08f161283444598a8f468"},{url:"favicon.svg",revision:"6114c7937db75b09f50b3d31b2bd85d6"},{url:"index.html",revision:"861fcb21dc37d4af9e9c2fcd7c982813"},{url:"manifest.webmanifest",revision:"a9121016eaef4c6c02585821c2e74f1a"},{url:"maskable-icon-512x512.png",revision:"6ef31a886aa1b0f4561ddc92364e8bd1"},{url:"privacy.html",revision:"4eaf071255466ce08853754be78169ba"},{url:"pwa-192x192.png",revision:"6d64c647cd785e004c0be60bb1779d89"},{url:"pwa-512x512.png",revision:"d64c4db6a1dcdf625df901c1341ea41c"},{url:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{url:"CNAME",revision:"6b62f425122a80ff0107c2b9938f87b7"},{url:"apple-touch-icon-180x180.png",revision:"c6ade8d120b32268facbde0e632c86d4"},{url:"favicon.ico",revision:"4a2fe2fdcaa08f161283444598a8f468"},{url:"favicon.svg",revision:"6114c7937db75b09f50b3d31b2bd85d6"},{url:"maskable-icon-512x512.png",revision:"6ef31a886aa1b0f4561ddc92364e8bd1"},{url:"privacy.html",revision:"4eaf071255466ce08853754be78169ba"},{url:"pwa-192x192.png",revision:"6d64c647cd785e004c0be60bb1779d89"},{url:"pwa-512x512.png",revision:"d64c4db6a1dcdf625df901c1341ea41c"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"data/GB-Playbook-4-3.json",revision:"92b689cb87b03ad4b17a13d4c8149687"},{url:"data/GB-Playbook-4-4.json",revision:"5385d14b70c849f475758648abddbe36"},{url:"data/GB-Playbook-4-5.json",revision:"ebf4b91061ca5728eb53d8f9d41f8edc"},{url:"data/GB-Playbook-4-6.fr.json",revision:"bbfed4136fee67e6888a8ff5e9d7f088"},{url:"data/GB-Playbook-4-6.json",revision:"f609abebce605d01f9308eeb83641f29"},{url:"data/gameplans.json",revision:"84197a88c0201e0335c7e8015c953c77"},{url:"data/manifest.json",revision:"6e6628107ef21b095998eb272159ec43"},{url:"manifest.webmanifest",revision:"a9121016eaef4c6c02585821c2e74f1a"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"))),s.registerRoute(/^https:\/\/docs\.guildball\.app\/.*/i,new s.CacheFirst({cacheName:"guildball-docs",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(/^https:\/\/fonts\.googleapis\.com\/.*/i,new s.CacheFirst({cacheName:"google-fonts-cache",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com\/.*/i,new s.CacheFirst({cacheName:"gstatic-fonts-cache",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET")})); +if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,n)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const a=s=>l(s,i),o={module:{uri:i},exports:u,require:a};e[i]=Promise.all(r.map((s=>o[s]||a(s)))).then((s=>(n(...s),u)))}}define(["./workbox-f5523f08"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"apple-touch-icon-180x180.png",revision:"c6ade8d120b32268facbde0e632c86d4"},{url:"assets/Angel-00-_OcCE1xs.jpg",revision:null},{url:"assets/Angel-01-RsyL_b7r.jpg",revision:null},{url:"assets/beacon-00-L9zfj4Q8.jpg",revision:null},{url:"assets/beacon-01-vYao7kaT.jpg",revision:null},{url:"assets/beacon-WzU-Fgwo.jpg",revision:null},{url:"assets/Blackheart-00-Barboaw1.jpg",revision:null},{url:"assets/Blackheart-01-DqXGaAGL.jpg",revision:null},{url:"assets/Brisket-00-fpn5lXhR.jpg",revision:null},{url:"assets/Brisket-01-Cz0yKYaC.jpg",revision:null},{url:"assets/brisket3-00-TRUFkM-Q.jpg",revision:null},{url:"assets/brisket3-01-C19fZQ9I.jpg",revision:null},{url:"assets/cast-00-CDhbzPRV.jpg",revision:null},{url:"assets/cast-01-DOJiR9Ch.jpg",revision:null},{url:"assets/compound-DlF-jmUs.svg",revision:null},{url:"assets/crook-00-C4D_gdaM.jpg",revision:null},{url:"assets/crook-01-D9bCOT5R.jpg",revision:null},{url:"assets/egret-00-BKhmAAwA.jpg",revision:null},{url:"assets/egret-01-DCSfZLX7.jpg",revision:null},{url:"assets/Flea-00-PYY29ZDm.jpg",revision:null},{url:"assets/Flea-01-B-ceu-Fs.jpg",revision:null},{url:"assets/Gaffer-00-Chm4XJB6.jpg",revision:null},{url:"assets/Gaffer-01-DChRbbv3.jpg",revision:null},{url:"assets/gaffer-front-large-box-BhDGw3yv.png",revision:null},{url:"assets/GB-S4-Alchemists-19-02-01-VIy3CwEn.jpg",revision:null},{url:"assets/GB-S4-Alchemists-19-02-02-Dar2t4NY.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-30-DjbTACjD.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-31-BTog_cbt.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-32-Dui0dDSy.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-01-C1aHp8XU.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-02-Buw0Sd4K.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-32-DJ0MEQk3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-01-_bnlGcvZ.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-02-Af5aErRU.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-32-Cps3196a.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-33-zps3y-hi.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-34-CdaFu_Sd.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-01-CLWIlX8T.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-02-CFlOzX_b.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-32-CDETLFF4.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-01-B_Vd1DVn.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-02-BCRzyOhW.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-14-2NKQVsMs.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-01-Di9u3X0x.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-02-Cy2lNFLR.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-30-bp8c3Uf4.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-01-DAO812Wl.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-02-C_ro4zOy.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-14-D7WFZjKa.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-01-LmV2xFUn.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-02-COLOFnlA.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-32-DfwzxWCr.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-01-D54clbHu.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-02-D_xvByJF.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-32-Co1is7SR.jpg",revision:null},{url:"assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",revision:null},{url:"assets/GB-S4-Hunters-19-08-01-CmDbpORb.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-02-DP64V92U.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-32-CjwZbZPz.jpg",revision:null},{url:"assets/GB-S4-Masons-19-03-01-CU2vGuj1.jpg",revision:null},{url:"assets/GB-S4-Masons-19-03-02-BT75CHhK.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-18-CCBausup.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-30-6kjit4Y9.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-01-D4YSyCEa.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-02-osGRf8x4.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-14-OmIZrrCX.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-01-DIFD5DK0.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-02-BIp1_EUg.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-34-Cml7KNHH.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-01-M7N3Qnm9.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-02-C0DvULy4.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-04-C54iXdHJ.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-05-DijPkVU0.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-10-kxgvrwFf.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-11-DLBrn3lH.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-14-4LJM_QAb.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-01-asZnKqhR.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-02-DxYxwIyf.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-18-gkj8skFt.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-01-CbXHBUJx.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-02-XbBjNmUR.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-14-D1JyRK5e.jpg",revision:null},{url:"assets/GB-S4-Reference-1-Cx3eC7d4.png",revision:null},{url:"assets/GB-S4-Reference-2-CJ4YgyH9.png",revision:null},{url:"assets/GB-S4-Reference-3-BTbZpB51.png",revision:null},{url:"assets/GB-S4-Reference-4-CpP58Tap.png",revision:null},{url:"assets/GB-S4-Reference-5-Be8xjsp1.png",revision:null},{url:"assets/GB-S4-Shepherds-20-03-01-BszDyn7n.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-02-XqwLekip.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-16-CH7z3m46.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-01-BYUf_cPI.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-02-CAfWuq1n.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-12--TefmgjH.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-30-DOPQxsMF.jpg",revision:null},{url:"assets/gb-symbol-defs-DvUA8_44.svg",revision:null},{url:"assets/heat-00-D38QQgsn.jpg",revision:null},{url:"assets/heat-01-TaWfEq1e.jpg",revision:null},{url:"assets/heat-kg0Ne0rh.jpg",revision:null},{url:"assets/hook-00-BCtxORP2.jpg",revision:null},{url:"assets/hook-01-CFEXTspD.jpg",revision:null},{url:"assets/ikaros-00-BlK23AQW.jpg",revision:null},{url:"assets/ikaros-01-CaTWYr3E.jpg",revision:null},{url:"assets/index-BOX54cO5.css",revision:null},{url:"assets/index-Ddh0WRVV.js",revision:null},{url:"assets/lamp-beta-63HlWaeb.png",revision:null},{url:"assets/lamps_back_blank-DaxPd_Oo.jpg",revision:null},{url:"assets/Locus-00-BlUYiKL3.jpg",revision:null},{url:"assets/Locus-01-CgJeSABI.jpg",revision:null},{url:"assets/lucky-00--3wf1Q-o.jpg",revision:null},{url:"assets/lucky-01-CeFOEkb7.jpg",revision:null},{url:"assets/lucky-n3AjGPzo.svg",revision:null},{url:"assets/miasma-00-gJuVKj0r.jpg",revision:null},{url:"assets/miasma-01-BFpZKg3H.jpg",revision:null},{url:"assets/minx-00-DKid1QgM.jpg",revision:null},{url:"assets/minx-01-h4AvAe2P.jpg",revision:null},{url:"assets/nightlight-00-DeG30Qno.jpg",revision:null},{url:"assets/nightlight-01-B5GmfHdF.jpg",revision:null},{url:"assets/nightlight-BICbD_Qy.jpg",revision:null},{url:"assets/Order_back-qsepM33g.jpg",revision:null},{url:"assets/phosphor-00-kYBsDzr4.jpg",revision:null},{url:"assets/phosphor-01-aCMgs7Xa.jpg",revision:null},{url:"assets/phosphor-CifRCYrC.jpg",revision:null},{url:"assets/playbook-symbol-defs-Dz3QsL1K.svg",revision:null},{url:"assets/Salt-00-DTipa4Vq.jpg",revision:null},{url:"assets/Salt-01-DgX-3wqX.jpg",revision:null},{url:"assets/soot-00-CjgkmHEF.jpg",revision:null},{url:"assets/soot-01-DLvloUPB.jpg",revision:null},{url:"assets/soot-CXEcs2BT.jpg",revision:null},{url:"assets/steeljaw-00-DBylP57a.jpg",revision:null},{url:"assets/steeljaw-01-DHvdkD3u.jpg",revision:null},{url:"assets/tenderiser-00-DJeWjZaC.jpg",revision:null},{url:"assets/tenderiser-01-Dn53BCqM.jpg",revision:null},{url:"assets/Truffles-00-BxTIIeQ4.jpg",revision:null},{url:"assets/Truffles-01-1xGyMIOv.jpg",revision:null},{url:"assets/Ulfr-00-BXhlGxmA.jpg",revision:null},{url:"assets/Ulfr-01-JQfocVce.jpg",revision:null},{url:"assets/vGutter-00-CpnNh9P4.jpg",revision:null},{url:"assets/vGutter-01-BWHR1234.jpg",revision:null},{url:"assets/wick-00-CEZ6BY1J.jpg",revision:null},{url:"assets/wick-01-DtuDStax.jpg",revision:null},{url:"assets/wick-D10XZuyz.jpg",revision:null},{url:"assets/workbox-window.prod.es5-D5gOYdM7.js",revision:null},{url:"CNAME",revision:"6b62f425122a80ff0107c2b9938f87b7"},{url:"data/gameplans.json",revision:"84197a88c0201e0335c7e8015c953c77"},{url:"data/GB-Playbook-4-3.json",revision:"92b689cb87b03ad4b17a13d4c8149687"},{url:"data/GB-Playbook-4-4.json",revision:"5385d14b70c849f475758648abddbe36"},{url:"data/GB-Playbook-4-5.json",revision:"ebf4b91061ca5728eb53d8f9d41f8edc"},{url:"data/GB-Playbook-4-6.fr.json",revision:"bbfed4136fee67e6888a8ff5e9d7f088"},{url:"data/GB-Playbook-4-6.json",revision:"f609abebce605d01f9308eeb83641f29"},{url:"data/manifest.json",revision:"6e6628107ef21b095998eb272159ec43"},{url:"favicon.ico",revision:"4a2fe2fdcaa08f161283444598a8f468"},{url:"favicon.svg",revision:"6114c7937db75b09f50b3d31b2bd85d6"},{url:"index.html",revision:"7683636831fe62803c697ad0f206df95"},{url:"manifest.webmanifest",revision:"a9121016eaef4c6c02585821c2e74f1a"},{url:"maskable-icon-512x512.png",revision:"6ef31a886aa1b0f4561ddc92364e8bd1"},{url:"privacy.html",revision:"4eaf071255466ce08853754be78169ba"},{url:"pwa-192x192.png",revision:"6d64c647cd785e004c0be60bb1779d89"},{url:"pwa-512x512.png",revision:"d64c4db6a1dcdf625df901c1341ea41c"},{url:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{url:"CNAME",revision:"6b62f425122a80ff0107c2b9938f87b7"},{url:"apple-touch-icon-180x180.png",revision:"c6ade8d120b32268facbde0e632c86d4"},{url:"favicon.ico",revision:"4a2fe2fdcaa08f161283444598a8f468"},{url:"favicon.svg",revision:"6114c7937db75b09f50b3d31b2bd85d6"},{url:"maskable-icon-512x512.png",revision:"6ef31a886aa1b0f4561ddc92364e8bd1"},{url:"privacy.html",revision:"4eaf071255466ce08853754be78169ba"},{url:"pwa-192x192.png",revision:"6d64c647cd785e004c0be60bb1779d89"},{url:"pwa-512x512.png",revision:"d64c4db6a1dcdf625df901c1341ea41c"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"data/GB-Playbook-4-3.json",revision:"92b689cb87b03ad4b17a13d4c8149687"},{url:"data/GB-Playbook-4-4.json",revision:"5385d14b70c849f475758648abddbe36"},{url:"data/GB-Playbook-4-5.json",revision:"ebf4b91061ca5728eb53d8f9d41f8edc"},{url:"data/GB-Playbook-4-6.fr.json",revision:"bbfed4136fee67e6888a8ff5e9d7f088"},{url:"data/GB-Playbook-4-6.json",revision:"f609abebce605d01f9308eeb83641f29"},{url:"data/gameplans.json",revision:"84197a88c0201e0335c7e8015c953c77"},{url:"data/manifest.json",revision:"6e6628107ef21b095998eb272159ec43"},{url:"manifest.webmanifest",revision:"a9121016eaef4c6c02585821c2e74f1a"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"))),s.registerRoute(/^https:\/\/docs\.guildball\.app\/.*/i,new s.CacheFirst({cacheName:"guildball-docs",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(/^https:\/\/fonts\.googleapis\.com\/.*/i,new s.CacheFirst({cacheName:"google-fonts-cache",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com\/.*/i,new s.CacheFirst({cacheName:"gstatic-fonts-cache",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET")}));